Skip to content

Commit

Permalink
Add more tests of atan.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joseph Myers committed Apr 8, 2015
1 parent 561052a commit 024bcc5
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2015-04-08 Joseph Myers <joseph@codesourcery.com>

* 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 <fweimer@redhat.com>

* elf/pldd.c (main): Rewrite to use struct
Expand Down
3 changes: 3 additions & 0 deletions math/auto-libm-test-in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
75 changes: 75 additions & 0 deletions math/auto-libm-test-out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions sysdeps/i386/fpu/libm-test-ulps
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ ifloat: 1
ildouble: 5
ldouble: 4

Function: "atan":
ildouble: 1
ldouble: 1

Function: "atan2":
ildouble: 1
ldouble: 1
Expand Down
10 changes: 8 additions & 2 deletions sysdeps/x86_64/fpu/libm-test-ulps
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 024bcc5

Please sign in to comment.