From 024bcc5106a48307e2efc42ab85b3bbec6958163 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 8 Apr 2015 21:00:03 +0000 Subject: Add more tests of atan. This patch adds some randomly-generated tests of atan that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of atan. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. --- ChangeLog | 7 ++++ math/auto-libm-test-in | 3 ++ math/auto-libm-test-out | 75 +++++++++++++++++++++++++++++++++++++++ sysdeps/i386/fpu/libm-test-ulps | 4 +++ sysdeps/x86_64/fpu/libm-test-ulps | 10 ++++-- 5 files changed, 97 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd79b12823..d4181e2782 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-04-08 Joseph Myers + + * math/auto-libm-test-in: Add more tests of atan. + * math/auto-libm-test-out: Regenerated. + * sysdeps/i386/fpu/libm-test-ulps: Update. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + 2015-04-08 Florian Weimer * elf/pldd.c (main): Rewrite to use struct diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index 9cf1f583ed..0fa1f97602 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -242,6 +242,9 @@ atan 0x1p-600 atan 0x1p-10000 atan -0x3.b02d84p-4 atan -0x3.3fb708p-4 +atan -0x2.3249ap+0 +atan -0x1.363f46p+0 +atan -0x1.ad4c0ap+0 atan min atan -min atan min_subnorm diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out index 46e931cb4d..76331ee630 100644 --- a/math/auto-libm-test-out +++ b/math/auto-libm-test-out @@ -7927,6 +7927,81 @@ atan -0x3.3fb708p-4 = atan tonearest ldbl-128ibm -0x3.3fb708p-4L : -0x3.348f092072331fd8ca0cbff349p-4L : inexact-ok = atan towardzero ldbl-128ibm -0x3.3fb708p-4L : -0x3.348f092072331fd8ca0cbff348p-4L : inexact-ok = atan upward ldbl-128ibm -0x3.3fb708p-4L : -0x3.348f092072331fd8ca0cbff348p-4L : inexact-ok +atan -0x2.3249ap+0 += atan downward flt-32 -0x2.3249ap+0f : -0x1.24c034p+0f : inexact-ok += atan tonearest flt-32 -0x2.3249ap+0f : -0x1.24c032p+0f : inexact-ok += atan towardzero flt-32 -0x2.3249ap+0f : -0x1.24c032p+0f : inexact-ok += atan upward flt-32 -0x2.3249ap+0f : -0x1.24c032p+0f : inexact-ok += atan downward dbl-64 -0x2.3249ap+0 : -0x1.24c032fe9a703p+0 : inexact-ok += atan tonearest dbl-64 -0x2.3249ap+0 : -0x1.24c032fe9a703p+0 : inexact-ok += atan towardzero dbl-64 -0x2.3249ap+0 : -0x1.24c032fe9a702p+0 : inexact-ok += atan upward dbl-64 -0x2.3249ap+0 : -0x1.24c032fe9a702p+0 : inexact-ok += atan downward ldbl-96-intel -0x2.3249ap+0L : -0x1.24c032fe9a702f74p+0L : inexact-ok += atan tonearest ldbl-96-intel -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan towardzero ldbl-96-intel -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan upward ldbl-96-intel -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan downward ldbl-96-m68k -0x2.3249ap+0L : -0x1.24c032fe9a702f74p+0L : inexact-ok += atan tonearest ldbl-96-m68k -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan towardzero ldbl-96-m68k -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan upward ldbl-96-m68k -0x2.3249ap+0L : -0x1.24c032fe9a702f72p+0L : inexact-ok += atan downward ldbl-128 -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75e01cp+0L : inexact-ok += atan tonearest ldbl-128 -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75e01cp+0L : inexact-ok += atan towardzero ldbl-128 -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75e01bp+0L : inexact-ok += atan upward ldbl-128 -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75e01bp+0L : inexact-ok += atan downward ldbl-128ibm -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75e08p+0L : inexact-ok += atan tonearest ldbl-128ibm -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75ep+0L : inexact-ok += atan towardzero ldbl-128ibm -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75ep+0L : inexact-ok += atan upward ldbl-128ibm -0x2.3249ap+0L : -0x1.24c032fe9a702f7255968f75ep+0L : inexact-ok +atan -0x1.363f46p+0 += atan downward flt-32 -0x1.363f46p+0f : -0xe.1832ep-4f : inexact-ok += atan tonearest flt-32 -0x1.363f46p+0f : -0xe.1832ep-4f : inexact-ok += atan towardzero flt-32 -0x1.363f46p+0f : -0xe.1832dp-4f : inexact-ok += atan upward flt-32 -0x1.363f46p+0f : -0xe.1832dp-4f : inexact-ok += atan downward dbl-64 -0x1.363f46p+0 : -0xe.1832df50b23ap-4 : inexact-ok += atan tonearest dbl-64 -0x1.363f46p+0 : -0xe.1832df50b2398p-4 : inexact-ok += atan towardzero dbl-64 -0x1.363f46p+0 : -0xe.1832df50b2398p-4 : inexact-ok += atan upward dbl-64 -0x1.363f46p+0 : -0xe.1832df50b2398p-4 : inexact-ok += atan downward ldbl-96-intel -0x1.363f46p+0L : -0xe.1832df50b2398e5p-4L : inexact-ok += atan tonearest ldbl-96-intel -0x1.363f46p+0L : -0xe.1832df50b2398e5p-4L : inexact-ok += atan towardzero ldbl-96-intel -0x1.363f46p+0L : -0xe.1832df50b2398e4p-4L : inexact-ok += atan upward ldbl-96-intel -0x1.363f46p+0L : -0xe.1832df50b2398e4p-4L : inexact-ok += atan downward ldbl-96-m68k -0x1.363f46p+0L : -0xe.1832df50b2398e5p-4L : inexact-ok += atan tonearest ldbl-96-m68k -0x1.363f46p+0L : -0xe.1832df50b2398e5p-4L : inexact-ok += atan towardzero ldbl-96-m68k -0x1.363f46p+0L : -0xe.1832df50b2398e4p-4L : inexact-ok += atan upward ldbl-96-m68k -0x1.363f46p+0L : -0xe.1832df50b2398e4p-4L : inexact-ok += atan downward ldbl-128 -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f7f8p-4L : inexact-ok += atan tonearest ldbl-128 -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f7f8p-4L : inexact-ok += atan towardzero ldbl-128 -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f7fp-4L : inexact-ok += atan upward ldbl-128 -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f7fp-4L : inexact-ok += atan downward ldbl-128ibm -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f8p-4L : inexact-ok += atan tonearest ldbl-128ibm -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f8p-4L : inexact-ok += atan towardzero ldbl-128ibm -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f4p-4L : inexact-ok += atan upward ldbl-128ibm -0x1.363f46p+0L : -0xe.1832df50b2398e4a96945ef0f4p-4L : inexact-ok +atan -0x1.ad4c0ap+0 += atan downward flt-32 -0x1.ad4c0ap+0f : -0x1.087838p+0f : inexact-ok += atan tonearest flt-32 -0x1.ad4c0ap+0f : -0x1.087838p+0f : inexact-ok += atan towardzero flt-32 -0x1.ad4c0ap+0f : -0x1.087836p+0f : inexact-ok += atan upward flt-32 -0x1.ad4c0ap+0f : -0x1.087836p+0f : inexact-ok += atan downward dbl-64 -0x1.ad4c0ap+0 : -0x1.0878377062daep+0 : inexact-ok += atan tonearest dbl-64 -0x1.ad4c0ap+0 : -0x1.0878377062daep+0 : inexact-ok += atan towardzero dbl-64 -0x1.ad4c0ap+0 : -0x1.0878377062dadp+0 : inexact-ok += atan upward dbl-64 -0x1.ad4c0ap+0 : -0x1.0878377062dadp+0 : inexact-ok += atan downward ldbl-96-intel -0x1.ad4c0ap+0L : -0x1.0878377062dada2cp+0L : inexact-ok += atan tonearest ldbl-96-intel -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan towardzero ldbl-96-intel -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan upward ldbl-96-intel -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan downward ldbl-96-m68k -0x1.ad4c0ap+0L : -0x1.0878377062dada2cp+0L : inexact-ok += atan tonearest ldbl-96-m68k -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan towardzero ldbl-96-m68k -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan upward ldbl-96-m68k -0x1.ad4c0ap+0L : -0x1.0878377062dada2ap+0L : inexact-ok += atan downward ldbl-128 -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e46577p+0L : inexact-ok += atan tonearest ldbl-128 -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e46577p+0L : inexact-ok += atan towardzero ldbl-128 -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e46576p+0L : inexact-ok += atan upward ldbl-128 -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e46576p+0L : inexact-ok += atan downward ldbl-128ibm -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e4658p+0L : inexact-ok += atan tonearest ldbl-128ibm -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e4658p+0L : inexact-ok += atan towardzero ldbl-128ibm -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e465p+0L : inexact-ok += atan upward ldbl-128ibm -0x1.ad4c0ap+0L : -0x1.0878377062dada2af4f466e465p+0L : inexact-ok atan min = atan downward flt-32 0x4p-128f : 0x3.fffff8p-128f : inexact-ok underflow-ok errno-erange-ok = atan tonearest flt-32 0x4p-128f : 0x4p-128f : inexact-ok underflow-ok errno-erange-ok diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index 924abc912d..e3554ede68 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -77,6 +77,10 @@ ifloat: 1 ildouble: 5 ldouble: 4 +Function: "atan": +ildouble: 1 +ldouble: 1 + Function: "atan2": ildouble: 1 ldouble: 1 diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index deac26fe82..33e597a956 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -125,6 +125,12 @@ ifloat: 3 ildouble: 4 ldouble: 4 +Function: "atan": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + Function: "atan2": float: 1 ifloat: 1 @@ -173,9 +179,9 @@ ldouble: 1 Function: "atan_upward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 1 ldouble: 1 -- cgit 1.4.1