Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building current...



>>> Given this discussion, I'm inclined to view the existence of Inf and NaN a d$
>> (Please don't use paragraph-length lines.)
> I'll try.  Not clear how to get Mac mail to do that.

Whatever you did for this message seems to have worked.

> A signaling NaN is fine.  What I object to is mechanisms that take a
> bug (a mathematically invalid operation) and silently turn it into a
> "valid" answer.

Well...I'm not sure I would characterize it that way.  Computer
arithmetic is not mathematical operations over R, nor even Q; while the
mathematics is to some extent the motivation for computer arithmetic,
and while integer arithmetic generally strongly resembles mathematical
operations in Zn for suitable n, the details of computer floating-point
arithmetic are really a beast unto themselves.  And I think a case like
this, returning -inf where the mathmatical analogy is undefined but in
such a way that minus infinity is a justifiable answer in extensions of
R that have it, is enough of a corner case that I don't really have any
problem with returning -inf in a computer arithmetic that has it.

IMO the actual bug here is that the calling code was supposed to be
more portable than it actually was: it worked only in arithmetics that
did something non-trapping with log(0), which we have a
proof-by-example is not all of them.

> Denorms are a different topic.  That's a way to make the range of the
> numbers slighty larger at the small end, at the expense of losing one
> bit of precision in all other cases.

Hm?  The presence of denormalized numbers does not lose one bit of
precision in all, nor even most, other cases.  IEEE floats still have a
hidden mantissa bit; it's just that when the exponent field is at its
minimum value, the hidden mantissa bit is treated as 0 rather than 1
(and the effective exponent is one larger than what the exponent field
would seem to imply).

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index