You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pythongh-120010: fix invalid (nan+nanj) results in _Py_c_prod()
In some cases, previosly computed as (nan+nanj), we could recover
meaningful component values in the result, see e.g. the C11, Annex
G.5.2, routine _Cmuld():
>>> z = 1e300+1j
>>> z*(inf+infj) # was (nan+nanj)
(nan+infj)
That also fix some complex powers for small integer exponents, computed
by optimised algorithm (by squaring):
>>> z**5 # was (nan+nanj)
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
z**5
~^^~
OverflowError: complex exponentiation
0 commit comments