diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-11-26 15:57:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 15:57:39 (GMT) |
commit | 987311d42e3ec838de8ff27f9f0575aa791a6bde (patch) | |
tree | d05e0da42e5cdf50d774368dfede7f93ef2ee2bd /Misc/NEWS.d | |
parent | dcf629213bc046318c862ec0af5db3dfd1fc473a (diff) | |
download | cpython-987311d42e3ec838de8ff27f9f0575aa791a6bde.zip cpython-987311d42e3ec838de8ff27f9f0575aa791a6bde.tar.gz cpython-987311d42e3ec838de8ff27f9f0575aa791a6bde.tar.bz2 |
gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829)
"Generally, mixed-mode arithmetic combining real and complex variables should
be performed directly, not by first coercing the real to complex, lest the sign
of zero be rendered uninformative; the same goes for combinations of pure
imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for
complex elementary functions.
This patch implements mixed-mode arithmetic rules, combining real and
complex variables as specified by C standards since C99 (in particular,
there is no special version for the true division with real lhs
operand). Most C compilers implementing C99+ Annex G have only these
special rules (without support for imaginary type, which is going to be
deprecated in C2y).
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Core_and_Builtins/2024-08-03-14-02-27.gh-issue-69639.mW3iKq.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-08-03-14-02-27.gh-issue-69639.mW3iKq.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-08-03-14-02-27.gh-issue-69639.mW3iKq.rst new file mode 100644 index 0000000..72596b0 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-08-03-14-02-27.gh-issue-69639.mW3iKq.rst @@ -0,0 +1,2 @@ +Implement mixed-mode arithmetic rules combining real and complex numbers +as specified by C standards since C99. Patch by Sergey B Kirpichev. |