gh-155526: correct errno handling in complex_abs() - #155527
Conversation
|
CC @vstinner |
|
This breaks >>> import cmath
>>> cmath.polar(complex(1e300, 1e-320))
Traceback (most recent call last):
...
OverflowError: math range error
|
|
@serhiy-storchaka, are you suggesting (1) reversion of |
Co-authored-by: Victor Stinner <vstinner@python.org>
Documentation build overview
8 files changed ·
|
|
Just FYI, GH code search has no hits for |
vstinner
left a comment
There was a problem hiding this comment.
The change mostly LGTM. I just have a last request about the change documentation.
I understand that this change fix a bug in math.isnan() if errno is non-zero. Would it make sense to backport the fix to 3.13-3.15 branches, without the C API change?
|
|
||
| * :c:func:`_Py_c_abs` no longer sets :c:data:`errno` to zero on success, | ||
| rather leave it unchanged. | ||
| (Contributed by Sergey B Kirpichev in :gh:`155526`.) |
There was a problem hiding this comment.
Would you mind to copy that in second C API Changelog (NEWS) entry?
Co-authored-by: hpkfft.com <paul@hpkfft.com>
Co-authored-by: hpkfft.com <paul@hpkfft.com>
|
I applied the 2 @hpkfft's suggestions (fixing typos). |
Uh oh!
There was an error while loading. Please reload this page.