diff mbox series

[12/23] math: Fix the expected atanf (inf) results

Message ID 20241129132032.476978-13-adhemerval.zanella@linaro.org
State New
Headers show
Series Add remaining CORE-MATH binary32 implementations to libm | expand

Commit Message

Adhemerval Zanella Netto Nov. 29, 2024, 1:17 p.m. UTC
The M_PI_2 (lit_pi_2_d) constant is not the expected value for atanf
on non-default rounding modes.  Instead use the autogenerated value.
---
 math/auto-libm-test-in       |  2 ++
 math/auto-libm-test-out-atan | 50 ++++++++++++++++++++++++++++++++++++
 math/libm-test-atan.inc      |  2 --
 3 files changed, 52 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index b570e88e78..83f125b313 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -394,6 +394,8 @@  asinh -min_subnorm
 asinh max
 asinh -max
 
+atan inf
+atan -inf
 atan 0
 atan -0
 atan max
diff --git a/math/auto-libm-test-out-atan b/math/auto-libm-test-out-atan
index 334894a90a..cc41d61239 100644
--- a/math/auto-libm-test-out-atan
+++ b/math/auto-libm-test-out-atan
@@ -1,3 +1,53 @@ 
+atan inf
+= atan downward binary32 plus_infty : 0x1.921fb4p+0 : inexact-ok
+= atan tonearest binary32 plus_infty : 0x1.921fb6p+0 : inexact-ok
+= atan towardzero binary32 plus_infty : 0x1.921fb4p+0 : inexact-ok
+= atan upward binary32 plus_infty : 0x1.921fb6p+0 : inexact-ok
+= atan downward binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok
+= atan tonearest binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok
+= atan towardzero binary64 plus_infty : 0x1.921fb54442d18p+0 : inexact-ok
+= atan upward binary64 plus_infty : 0x1.921fb54442d19p+0 : inexact-ok
+= atan downward intel96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok
+= atan tonearest intel96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok
+= atan towardzero intel96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok
+= atan upward intel96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok
+= atan downward m68k96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok
+= atan tonearest m68k96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok
+= atan towardzero m68k96 plus_infty : 0x1.921fb54442d18468p+0 : inexact-ok
+= atan upward m68k96 plus_infty : 0x1.921fb54442d1846ap+0 : inexact-ok
+= atan downward binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan tonearest binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan towardzero binary128 plus_infty : 0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan upward binary128 plus_infty : 0x1.921fb54442d18469898cc51701b9p+0 : inexact-ok
+= atan downward ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok
+= atan tonearest ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok
+= atan towardzero ibm128 plus_infty : 0x1.921fb54442d18469898cc517018p+0 : inexact-ok
+= atan upward ibm128 plus_infty : 0x1.921fb54442d18469898cc51702p+0 : inexact-ok
+atan -inf
+= atan downward binary32 minus_infty : -0x1.921fb6p+0 : inexact-ok
+= atan tonearest binary32 minus_infty : -0x1.921fb6p+0 : inexact-ok
+= atan towardzero binary32 minus_infty : -0x1.921fb4p+0 : inexact-ok
+= atan upward binary32 minus_infty : -0x1.921fb4p+0 : inexact-ok
+= atan downward binary64 minus_infty : -0x1.921fb54442d19p+0 : inexact-ok
+= atan tonearest binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok
+= atan towardzero binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok
+= atan upward binary64 minus_infty : -0x1.921fb54442d18p+0 : inexact-ok
+= atan downward intel96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok
+= atan tonearest intel96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok
+= atan towardzero intel96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok
+= atan upward intel96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok
+= atan downward m68k96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok
+= atan tonearest m68k96 minus_infty : -0x1.921fb54442d1846ap+0 : inexact-ok
+= atan towardzero m68k96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok
+= atan upward m68k96 minus_infty : -0x1.921fb54442d18468p+0 : inexact-ok
+= atan downward binary128 minus_infty : -0x1.921fb54442d18469898cc51701b9p+0 : inexact-ok
+= atan tonearest binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan towardzero binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan upward binary128 minus_infty : -0x1.921fb54442d18469898cc51701b8p+0 : inexact-ok
+= atan downward ibm128 minus_infty : -0x1.921fb54442d18469898cc51702p+0 : inexact-ok
+= atan tonearest ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok
+= atan towardzero ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok
+= atan upward ibm128 minus_infty : -0x1.921fb54442d18469898cc517018p+0 : inexact-ok
 atan 0
 = atan downward binary32 0x0p+0 : 0x0p+0 : inexact-ok
 = atan tonearest binary32 0x0p+0 : 0x0p+0 : inexact-ok
diff --git a/math/libm-test-atan.inc b/math/libm-test-atan.inc
index 3581d3b5ee..19e441556b 100644
--- a/math/libm-test-atan.inc
+++ b/math/libm-test-atan.inc
@@ -20,8 +20,6 @@ 
 
 static const struct test_f_f_data atan_test_data[] =
   {
-    TEST_f_f (atan, plus_infty, lit_pi_2_d, ERRNO_UNCHANGED),
-    TEST_f_f (atan, minus_infty, -lit_pi_2_d, ERRNO_UNCHANGED),
     TEST_f_f (atan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (atan, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (atan, snan_value, qnan_value, INVALID_EXCEPTION),