Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Building current...
>>> Unfortunately, this is one of those places where the VAX not doing IEEE FP$
(Please don't use paragraph-length lines.)
Well, bites people who blindly assume floating point is IEEE.
>> Why not simply fix the bug? log(0) is invalid. [...]
Mathematically, it is undefined (for the reals->reals log, at least),
but lim(x->0+) log(x) is minus infinity (in the usual sense in which a
limit is said to be an infinity), so it is not unreasonable to return
-inf for log(0).
> Yes, except I suspect that people are happy just to write the code
> that way, as IEEE FP actually "can deal with it". log(0) indeed do
> not give a valid value, and the IEEE version indeed returns an
> invalid value.
In what sense? In IEEE floating point, infinities are not invalid in
any sense as far as I can tell.
> I can't really go around and start fixing all the code people write
> to change the logic... :-/
We fix _other_ bugs; unless the code is actually intended to depend on
having IEEE floats available (which I gather is unlikely to be the case
here), asking for the logarithm of zero is a bug and IMO should be
fixed like any other bug.
/~\ 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