]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Fix the expected atanf (inf) results
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 20 Nov 2024 17:21:56 +0000 (14:21 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 18 Dec 2024 20:24:43 +0000 (17:24 -0300)
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
math/auto-libm-test-out-atan
math/libm-test-atan.inc

index 0b7f0d3251fc4a13ca9524c5ba2fe33e10ab931c..85a2fd9b111f4e2d8cd7f2a5086737979acca270 100644 (file)
@@ -515,6 +515,8 @@ asinpi -min
 asinpi min_subnorm
 asinpi -min_subnorm
 
+atan inf
+atan -inf
 atan 0
 atan -0
 atan max
index 334894a90a7b0f74a8c8df68b52fddfd838db4f1..cc41d612395a0137392c8a9161494791ff53f7e1 100644 (file)
@@ -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
index 3581d3b5ee66ee650fafba116b641eb2b52772c4..19e441556bee0b26e547b380414930b5955e6742 100644 (file)
@@ -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),