aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-04-08 17:32:17 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-04-08 17:32:17 +0000
commit8431838dde9187c061ac64b8d61290e8de021dda (patch)
tree4acac47ebfabfa8931fc426364326deadf520e81 /sysdeps/x86_64/fpu
parentae63c7ebedcaa57017df4cb8ff0494a4705321ee (diff)
downloadglibc-8431838dde9187c061ac64b8d61290e8de021dda.tar
glibc-8431838dde9187c061ac64b8d61290e8de021dda.tar.gz
glibc-8431838dde9187c061ac64b8d61290e8de021dda.tar.bz2
glibc-8431838dde9187c061ac64b8d61290e8de021dda.zip
Fix dbl-64 atan2 in non-default rounding modes (bug 18210, bug 18211).
The dbl-64 implementation of atan2 does computations that expect to run in round-to-nearest mode, and in other modes the errors can accumulate to more than the maximum accepted 9ulp. This patch makes it use FE_TONEAREST internally, similar to other functions with such issues. Tests that previously produced large errors are added for atan2 and the closely related carg, clog and clog10 functions. Tested for x86_64 and x86 and ulps updated accordingly. [BZ #18210] [BZ #18211] * sysdeps/ieee754/dbl-64/e_atan2.c: Include <fenv.h>. (__ieee754_atan2): Set FE_TONEAREST mode for internal computations. * math/auto-libm-test-in: Add more tests of atan2, carg, clog and clog10. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps72
1 files changed, 38 insertions, 34 deletions
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index abeeaf9178..d0aea07d62 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -228,9 +228,9 @@ ildouble: 2
ldouble: 2
Function: Real part of "cacos_downward":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 2
ldouble: 2
@@ -244,9 +244,9 @@ ildouble: 5
ldouble: 5
Function: Real part of "cacos_towardzero":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 2
ldouble: 2
@@ -300,9 +300,9 @@ ildouble: 5
ldouble: 5
Function: Imaginary part of "cacosh_downward":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 2
ldouble: 2
@@ -316,9 +316,9 @@ ildouble: 5
ldouble: 5
Function: Imaginary part of "cacosh_towardzero":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 2
ldouble: 2
@@ -339,6 +339,12 @@ ifloat: 2
ildouble: 2
ldouble: 2
+Function: "carg":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
Function: "carg_downward":
double: 1
float: 2
@@ -348,8 +354,10 @@ ildouble: 1
ldouble: 1
Function: "carg_towardzero":
-float: 1
-ifloat: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
ildouble: 1
ldouble: 1
@@ -410,9 +418,9 @@ ildouble: 5
ldouble: 5
Function: Real part of "casin_upward":
-double: 1
+double: 2
float: 1
-idouble: 1
+idouble: 2
ifloat: 1
ildouble: 2
ldouble: 2
@@ -482,9 +490,9 @@ ildouble: 5
ldouble: 5
Function: Imaginary part of "casinh_upward":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 2
ldouble: 2
@@ -534,9 +542,7 @@ ildouble: 4
ldouble: 4
Function: Real part of "catan_upward":
-double: 1
float: 1
-idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
@@ -602,9 +608,7 @@ ildouble: 4
ldouble: 4
Function: Imaginary part of "catanh_upward":
-double: 1
float: 1
-idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
@@ -820,9 +824,9 @@ ildouble: 4
ldouble: 4
Function: Imaginary part of "clog10_downward":
-double: 3
+double: 1
float: 2
-idouble: 3
+idouble: 1
ifloat: 2
ildouble: 2
ldouble: 2
@@ -836,9 +840,9 @@ ildouble: 4
ldouble: 4
Function: Imaginary part of "clog10_towardzero":
-double: 3
+double: 1
float: 2
-idouble: 3
+idouble: 1
ifloat: 2
ildouble: 2
ldouble: 2
@@ -852,10 +856,10 @@ ildouble: 4
ldouble: 4
Function: Imaginary part of "clog10_upward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
ildouble: 2
ldouble: 2
@@ -893,16 +897,16 @@ ldouble: 1
Function: Real part of "clog_upward":
double: 2
-float: 1
+float: 2
idouble: 2
-ifloat: 1
+ifloat: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "clog_upward":
-double: 2
+double: 1
float: 2
-idouble: 2
+idouble: 1
ifloat: 2
ildouble: 1
ldouble: 1
@@ -984,9 +988,9 @@ ildouble: 7
ldouble: 7
Function: Imaginary part of "cpow_downward":
-double: 2
+double: 1
float: 2
-idouble: 2
+idouble: 1
ifloat: 2
ildouble: 2
ldouble: 2
@@ -1000,9 +1004,9 @@ ildouble: 7
ldouble: 7
Function: Imaginary part of "cpow_towardzero":
-double: 2
+double: 1
float: 2
-idouble: 2
+idouble: 1
ifloat: 2
ildouble: 1
ldouble: 1