Author mark.dickinson
Recipients mark.dickinson, skip.montanaro
Date 2008-12-03.21:30:23
SpamBayes Score 1.11022e-16
Marked as misclassified No
Message-id <>
> (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

Date User Action Args
2008-12-03 21:30:25mark.dickinsonsetrecipients: + mark.dickinson, skip.montanaro
2008-12-03 21:30:25mark.dickinsonsetmessageid: <>
2008-12-03 21:30:24mark.dickinsonlinkissue4506 messages
2008-12-03 21:30:23mark.dickinsoncreate