[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow
Sebastian Berg
report at bugs.python.org
Wed Aug 4 14:29:00 EDT 2021
Sebastian Berg <sebastian at sipsolutions.net> added the comment:
Hmm, sorry, I overshot/misread :(.
The thing that the NumPy test-suite trips over is that:
c_powi(inf+0j, 3)
seems to not raise, but:
_Py_c_pow(inf+0j, 3.+0j)
(or nan+0.j rather then inf+0j)
does seem to raise (returning `nan+nanj` in both cases). If this is the `inf` code path, raising an error may actually be fix and the integer code path should maybe also do it.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44698>
_______________________________________
More information about the Python-bugs-list
mailing list