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 debatem1, mark.dickinson
Date 2010-06-13.11:01:59
SpamBayes Score 0.008162185
Marked as misclassified No
Message-id <1276426922.15.0.563818656445.issue8986@psf.upfronthosting.co.za>
In-reply-to
Content
Fixed in r81967 (trunk) and r81968 (py3k).

I had to weaken the tests for erfc:  its accuracy for largish arguments (25.0 or so) is not ideal---I was seeing errors of 100 ulps and more.  However, I think this level of error is acceptable in practice, since for arguments this size the difference between erfc(x) and erfc(next_float_up(x)) is already several hundred ulps.

If anyone wants to look at improving the accuracy for large arguments, it's the calculation of exp(-x*x) that's the source of the error.  The way to fix it, if anyone cared, would be to do the multiplication x*x in double-double precision, giving x*x = y + z for doubles y and z, and then use exp(-y) * exp(-z) in place of exp(-x*x).

Thanks for catching this, Geremy!
History
Date User Action Args
2010-06-13 11:02:02mark.dickinsonsetrecipients: + mark.dickinson, debatem1
2010-06-13 11:02:02mark.dickinsonsetmessageid: <1276426922.15.0.563818656445.issue8986@psf.upfronthosting.co.za>
2010-06-13 11:02:00mark.dickinsonlinkissue8986 messages
2010-06-13 11:01:59mark.dickinsoncreate