Mark Dickinson <[EMAIL PROTECTED]> added the comment: > (1.5802653829857376e+307+inf*j)
Those values look right; except that there's some code near the end of the cexp function that's supposed to set errno to ERANGE if either the real or imaginary component of the result is infinity (and then math_1 knows to raise OverflowError as a result). It looks like that's not happening for some reason. If you have time, could you try the attached patch and report what gets printed when cmath.exp(710+1.5j) is called? On my machine, I get: Python 3.1a0 (py3k:67510M, Dec 3 2008, 20:56:19) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cmath >>> cmath.exp(710.0 + 1.5j) r.real, r.imag: 1.58027e+307, inf Py_IS_INFINITY(r.real), Py_IS_INFINITY(r.imag): 0, 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: math range error Mark ---------- keywords: +patch Added file: http://bugs.python.org/file12211/cmath_debug.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4506> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com