Author mark.dickinson
Recipients derekroconnor, eric.smith, isandler, mark.dickinson
Date 2010-04-04.08:17:38
SpamBayes Score 6.96573e-07
Marked as misclassified No
Message-id <>
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?
Date User Action Args
2010-04-04 08:17:41mark.dickinsonsetrecipients: + mark.dickinson, isandler, eric.smith, derekroconnor
2010-04-04 08:17:41mark.dickinsonsetmessageid: <>
2010-04-04 08:17:39mark.dickinsonlinkissue8309 messages
2010-04-04 08:17:38mark.dickinsoncreate