RELEASED: Python 2.2.1c1

Tim Peters tim.one at comcast.net
Tue Mar 19 11:45:59 EST 2002


[Steven Majewski]
> I got the same on my osx build.
> Specifically: math.sqrt( -1 ) returns NaN.

Please email your results to Michael Hudson.

> When I do:
> 	import fpectl
> 	fpectl.turnon_sigfpe()
> I get:
> 	'Operation not implemented'
>
>
> Are those two connected?

The fpectl module tries to fiddle with HW fp exception masks, in necessarily
platform-specific ways.  Whether your platform libm pays attention to the
setting of HW fp exception masks depends entirely on your platform, but
fpectl doesn't know how to set them on your platform anyway.  IOW, if you
taught fpectl how to enable HW fp exceptions, it's still a crapshoot whether
your libm sqrt would raise a HW fp exception in this case.  In any case,
Python never relies on fpectl by default, so even if fpectl did know how to
fiddle your platform's flags, and your platform libm played along, it still
wouldn't make any difference unless you explicitly turned on fpectl
yourself.





More information about the Python-list mailing list