You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-133895: correct values of cmath.cosh/sinh in case of overflows
This is a split-off gh-134995.
The C17 standard says (cis(y) is defined as cos(y) + i sin(y)):
* ccosh(+∞ + i0) returns +∞ + i0.
* ccosh(+∞ + iy) returns +∞ cis(y), for finite nonzero y.
and
* csinh(+∞ + i0) returns +∞ + i0.
* csinh(+∞ + iy) returns +∞ cis(y), for positive finite y.
So far values, computed for exceptions, aren't accessible from the
pure-Python world, yet we are trying to be correct in other places. The
Lib/test/mathdata/cmath_testcases.txt has data points with correct
numbers (see cosh0032 and sinh0032).
Also, use AC magic for the rect() value.
0 commit comments