Message76843
> (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 |
|
Date |
User |
Action |
Args |
2008-12-03 21:30:25 | mark.dickinson | set | recipients:
+ mark.dickinson, skip.montanaro |
2008-12-03 21:30:25 | mark.dickinson | set | messageid: <1228339825.17.0.783504500876.issue4506@psf.upfronthosting.co.za> |
2008-12-03 21:30:24 | mark.dickinson | link | issue4506 messages |
2008-12-03 21:30:23 | mark.dickinson | create | |
|