mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141004: soft-deprecate Py_INFINITY macro (#141033)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
c6f3dd6a50
commit
e2026731f5
13 changed files with 45 additions and 36 deletions
|
|
@ -139,8 +139,8 @@ _Py_c_prod(Py_complex z, Py_complex w)
|
|||
recalc = 1;
|
||||
}
|
||||
if (recalc) {
|
||||
r.real = Py_INFINITY*(a*c - b*d);
|
||||
r.imag = Py_INFINITY*(a*d + b*c);
|
||||
r.real = INFINITY*(a*c - b*d);
|
||||
r.imag = INFINITY*(a*d + b*c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -229,8 +229,8 @@ _Py_c_quot(Py_complex a, Py_complex b)
|
|||
{
|
||||
const double x = copysign(isinf(a.real) ? 1.0 : 0.0, a.real);
|
||||
const double y = copysign(isinf(a.imag) ? 1.0 : 0.0, a.imag);
|
||||
r.real = Py_INFINITY * (x*b.real + y*b.imag);
|
||||
r.imag = Py_INFINITY * (y*b.real - x*b.imag);
|
||||
r.real = INFINITY * (x*b.real + y*b.imag);
|
||||
r.imag = INFINITY * (y*b.real - x*b.imag);
|
||||
}
|
||||
else if ((isinf(abs_breal) || isinf(abs_bimag))
|
||||
&& isfinite(a.real) && isfinite(a.imag))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue