[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson 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

[issue8986] math.erfc OverflowError

2010-06-13 Thread geremy condra
geremy condra added the comment: On Sun, Jun 13, 2010 at 5:47 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Geremy, can you verify that the attached patch fixes the problem?  If so, > I'll add tests and commit. I've only tested it from 2**16 + 1 to -2**16 at unit and ha

[issue8986] math.erfc OverflowError

2010-06-13 Thread geremy condra
geremy condra added the comment: On Sun, Jun 13, 2010 at 5:14 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Thanks for the report.  What platform are you on?  I'm not seeing this > behaviour on OS X: I'm on Ubuntu 10.04 64-bit. Geremy Condra > Python 3.2a0 (py3k:81935

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Geremy, can you verify that the attached patch fixes the problem? If so, I'll add tests and commit. -- keywords: +patch Added file: http://bugs.python.org/file17654/issue8986.patch ___ Python tracker

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Looking at the source, I think I know where this is coming from: one of the terms in the expression for erfc(x) is exp(-x*x). For abs(x) >= 27.284 or so, this underflows to zero. So the likely cause is that whatever platform you're on is setting errno to E

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. What platform are you on? I'm not seeing this behaviour on OS X: Python 3.2a0 (py3k:81935M, Jun 12 2010, 10:01:38) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue8986] math.erfc OverflowError

2010-06-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +mark.dickinson stage: -> unit test needed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8986] math.erfc OverflowError

2010-06-12 Thread geremy condra
New submission from geremy condra : In Python3.2, calling math.erfc with a value in [-27.2, -30) raises an OverflowError: math range error. This is inconsistent with the erfc function from scipy (scipy.special.erfc) as well as with the C99 function by the same name, both of which return 2. I susp