[Python-Dev] Cross-platform math functions?

Andreas Raab andreas.raab at gmx.de
Mon Sep 4 23:36:19 CEST 2006


Hi -

I'm curious if there is any interest in the Python community to achieve 
better cross-platform math behavior. A quick test[1] shows a 
non-surprising difference between the platform implementations. 
Question: Is there any interest in changing the behavior to produce 
identical results across platforms (for example by utilizing fdlibm 
[2])? Since I have need for a set of cross-platform math functions I'll 
probably start with a math-compatible fdlibm module (unless somebody has 
done that already ;-)

Cheers,
   - Andreas

[1] Using Python 2.4:
 >>> import math
 >>> math.cos(1.0e32)

WinXP:    -0.39929634612021897
LinuxX86: -0.49093671143542561

[2] http://www.netlib.org/fdlibm/



More information about the Python-Dev mailing list