4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

Delete check in catan, catanf, and catanl functions.

The check incorrectly results in catan returning nan + inf i when real part is +/- 1 and
imaginary part is 0.  The same occurs for real 0.8 and imaginary 0.6.

The change ends up matching glibc behaviour.
This commit is contained in:
Joseph Faulls 2023-10-10 15:12:00 -04:00 committed by Jeff Johnston
parent fe5886a500
commit dcb2b7d7b8
3 changed files with 0 additions and 6 deletions

View File

@ -105,8 +105,6 @@ catan(double complex z)
x2 = x * x;
a = 1.0 - x2 - (y * y);
if (a == 0.0)
goto ovrf;
t = 0.5 * atan2(2.0 * x, a);
w = _redupi(t);

View File

@ -54,8 +54,6 @@ catanf(float complex z)
x2 = x * x;
a = 1.0f - x2 - (y * y);
if (a == 0.0f)
goto ovrf;
t = 0.5f * atan2f(2.0f * x, a);
w = _redupif(t);

View File

@ -51,8 +51,6 @@ catanl(long double complex z)
x2 = x * x;
a = 1.0L - x2 - (y * y);
if (a == 0.0)
goto ovrf;
t = 0.5L * atan2l(2.0L * x, a);
w = _redupil(t);