Mark Dickinson <dicki...@gmail.com> added the comment: 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! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com