Numerics, NaNs, IEEE 754 and C99

Grant Edwards grante at visi.com
Thu Jun 15 09:43:26 EDT 2006


On 2006-06-15, Nick Maclaren <nmm1 at cus.cam.ac.uk> wrote:
>
> In article <12917f6jp7u90f8 at corp.supernews.com>,
> Grant Edwards <grante at visi.com> writes:
>|> 
>|> I assume the "you" in that sentence refers to the IEEE FP
>|> standards group.  I just try to follow the standard, but I have
>|> found that the behavior required by the IEEE standard is
>|> generally what works best for my applications.
>
> Well, it could be, but actually it was a reference to the
> sentence "This makes sense since such is the limit of division
> by a quantity that goes to zero."

That sentence was written by the IEEE FP standards committee
explaining why they chose the behavior they did.

> The point here is that +infinity is the correct answer when the zero is
> known to be a positive infinitesimal, just as -infinity is when it is
> known to be a negative one.  NaN is the only numerically respectable
> result if the sign is not known, or it might be a true zero.

OK, you're right.  I still prefer that Python follow the
standard they everything else does.   Part of what I use Python
for is to simulate devices that obey the IEEE 754 floating
point standards.  I need Python to follow the standard.

-- 
Grant Edwards                   grante             Yow!  Yow! Now we can
                                  at               become alcoholics!
                               visi.com            



More information about the Python-list mailing list