This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients derekroconnor, eric.smith, isandler, mark.dickinson
Date 2010-04-04.08:17:38
SpamBayes Score 6.965731e-07
Marked as misclassified No
Message-id <1270369061.25.0.344557574619.issue8309@psf.upfronthosting.co.za>
In-reply-to
Content
What Ilya Sandler said!

Computing sin or cos with large arguments requires high precision for the intermediate calculations (e.g., for sin(1e22) you'd need around 40 digits of precision for the reduction step), so most math libraries don't bother.  

This is also the reason that Intel's x87 FSIN instruction (which may or may not be being used here) requires that the argument be in the range -2**63 to 2**63.

Short of Python using its own math library, or adding a dependence on a correctly rounded math library like MPFR or crlibm, there's no real way to fix this.

Out of curiosity, what application do you have that requires evaluating sin for such large arguments?
History
Date User Action Args
2010-04-04 08:17:41mark.dickinsonsetrecipients: + mark.dickinson, isandler, eric.smith, derekroconnor
2010-04-04 08:17:41mark.dickinsonsetmessageid: <1270369061.25.0.344557574619.issue8309@psf.upfronthosting.co.za>
2010-04-04 08:17:39mark.dickinsonlinkissue8309 messages
2010-04-04 08:17:38mark.dickinsoncreate