Message102330
> Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228
Interesting. I get
>>> sin(2.**60)
-0.83064921763725463
On both OS X 10.6.3 (64-bit build) and OS X 10.5.something (32-bit build). But this is all down to the platform math library, of course.
I agree it's not ideal, but it's not really in Python's power to fix this, without adding a huge extra maintenance burden (from adding the necessary high-precision arithmetic to Python itself) or another external dependency.
You could always try to come up with a patch that adds a configure option for linking Python's math library into MPFR instead of the system math library. (crlibm would also work, and would be faster; it doesn't seem to be so well maintained these days though; Pari/GP isn't such a great option since its floating-point model isn't so compatible with IEEE 754). |
|
Date |
User |
Action |
Args |
2010-04-04 09:59:13 | mark.dickinson | set | recipients:
+ mark.dickinson, isandler, eric.smith, derekroconnor |
2010-04-04 09:59:12 | mark.dickinson | set | messageid: <1270375152.98.0.653333826323.issue8309@psf.upfronthosting.co.za> |
2010-04-04 09:59:11 | mark.dickinson | link | issue8309 messages |
2010-04-04 09:59:11 | mark.dickinson | create | |
|