diff options
author | Joseph Faulls <Joseph.Faulls@imgtec.com> | 2023-10-10 22:12:00 +0300 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2023-10-10 22:18:54 +0300 |
commit | dcb2b7d7b8456827d4cd82b5798526e7cd483e36 (patch) | |
tree | 5625385dd711f5aa1553f0163be8b9541cabbd6b /newlib | |
parent | fe5886a500e66cddf0f57eea3049d25d5f8765e9 (diff) |
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.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libm/complex/catan.c | 2 | ||||
-rw-r--r-- | newlib/libm/complex/catanf.c | 2 | ||||
-rw-r--r-- | newlib/libm/complex/catanl.c | 2 |
3 files changed, 0 insertions, 6 deletions
diff --git a/newlib/libm/complex/catan.c b/newlib/libm/complex/catan.c index 77510ec2f..34d75b849 100644 --- a/newlib/libm/complex/catan.c +++ b/newlib/libm/complex/catan.c @@ -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); diff --git a/newlib/libm/complex/catanf.c b/newlib/libm/complex/catanf.c index ac1a65c08..9dc2fb23f 100644 --- a/newlib/libm/complex/catanf.c +++ b/newlib/libm/complex/catanf.c @@ -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); diff --git a/newlib/libm/complex/catanl.c b/newlib/libm/complex/catanl.c index ee2a25930..13839ac73 100644 --- a/newlib/libm/complex/catanl.c +++ b/newlib/libm/complex/catanl.c @@ -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); |