Possible bug (was Re: numpy, overflow, inf, ieee, and richcomparison)

RajGopal Srinivasan raj at grserv.med.jhmi.edu
Wed Oct 11 12:12:05 EDT 2000


I noticed that the version of python 1.5.2 that comes with Redhat 6.2 links
against
-lieee, while the configure script for python2.0c1 does not generate a link to
the
ieee library. So I added -lieee to the  LIBS  definition and now math.exp(-746)
returns 0

 ./python
Python 2.0c1 (#3, Oct 11 2000, 12:05:58)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import math
>>> math.exp(-746)
0.0
>>>

Huaiyu Zhu wrote:

> I'm not interested in where this comes from - the only thing that matters is
> that it worked in 1.5.2 and breaks in 2.0.  Whether the 1.5.2 behavior was
> intended or not, it's not a bug.  The 2.0 behavior is a bug.  If Posix
> conflicts with IEEE floating point arithmetic, then confirming to Posix in
> this regard is a bug.
>
> I would suggest the next thing to do is to introduce an IEEE754 flag and let
> those who do not like it to voice their opinions.  Since this is the same
> behavior as 1.5.2 I doubt any running code would be broken by this.
>
> Huaiyu




More information about the Python-list mailing list