diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-11-26 21:20:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 20:20:37 +0200 |
commit | f0d3f10c43c9029378adba11a65b3d1287e4be32 (patch) | |
tree | f82100cab1e5101a5bee0c308164e03cd8d6a1d3 /Python/bytecodes.c | |
parent | 6da9d252ac39d53342455a17bfec7b1087fba697 (diff) | |
download | cpython-f0d3f10c43c9029378adba11a65b3d1287e4be32.tar.gz cpython-f0d3f10c43c9029378adba11a65b3d1287e4be32.zip |
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 'Python/bytecodes.c')
0 files changed, 0 insertions, 0 deletions