Message107732
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! |
|
Date |
User |
Action |
Args |
2010-06-13 11:02:02 | mark.dickinson | set | recipients:
+ mark.dickinson, debatem1 |
2010-06-13 11:02:02 | mark.dickinson | set | messageid: <1276426922.15.0.563818656445.issue8986@psf.upfronthosting.co.za> |
2010-06-13 11:02:00 | mark.dickinson | link | issue8986 messages |
2010-06-13 11:01:59 | mark.dickinson | create | |
|