[issue8309] Sin(x) is Wrong

Derek O'Connor report at bugs.python.org
Sun Apr 4 11:44:52 CEST 2010


Derek O'Connor <derekroconnor at eircom.net> added the comment:

Reply to Mark Dickinson

Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228
PariGp 2.3.4           gives sin(2^60) = -0.8306492176372546505752817956

So it seems Intel's x87 FSIN is not being used.

Application? I don't have one, but it is not too hard to imagine that buried deep in a large simulation, sin(x) is presented with a large argument, and whose wrong result is never noticed until ...

I quote from Ng's paper :
http://www.derekroconnor.net/Software/Ng--ArgReduction.pdf
--------------------------
"It is often argued that being concerned  about  large  arguments
is  unnecessary, because sophisticated users simply know better 
than to compute with large  angles.  It  is  our contention that this position is suboptimal, because:

    1. It places an unnecessary burden on the user.

    2. The consequences of producing incorrect (inaccurate)answers
       may be catastrophic;  many people assume that computers can
       do arithmetic very well.  While  numerical  analysts know better,
       not all programmers are numerical analysts, nor should they be.

    3. It is a vendors responsibility  to  provide  answers that
       are as correct as possible."
-------------------

Derek O'Connor

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8309>
_______________________________________


More information about the Python-bugs-list mailing list