aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-23 20:15:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-23 20:15:14 +0000
commit863893ec95f316a3d156d487b99242ee1b52f803 (patch)
tree88b7b115fcd0036af09a8089645db9e9cc221f7a /sysdeps/x86_64/fpu
parent4da6db51880289f0bf41b39e05cf9bb1c4769c47 (diff)
downloadglibc-863893ec95f316a3d156d487b99242ee1b52f803.zip
glibc-863893ec95f316a3d156d487b99242ee1b52f803.tar.gz
glibc-863893ec95f316a3d156d487b99242ee1b52f803.tar.bz2
Test cpow in all rounding modes.
This patch enables testing of cpow in all rounding modes using ALL_RM_TEST. There were two reasons this was previously deferred: * MPC has complicated rounding-mode-dependent rules for the signs of exact zero real or imaginary parts in the result of mpc_pow. Annex G does not impose any such requirements and I don't think glibc should try to implement any particular logic here. This patch adds support for gen-auto-libm-tests passing the IGNORE_ZERO_INF_SIGN flag to libm-test.inc. * Error accumulations in some tests in non-default rounding modes exceed the maximum error permitted in libm-test.inc. This patch marks the problem tests with xfail-rounding. (It might be possible to reduce the accumulations a bit by using round-to-nearest when cpow calls clog, but I don't think there's much point; the implementation approach for cpow is fundamentally deficient, as discussed in the existing bug for cpow inaccuracy which can reasonably be considered to cover these less-inaccurate cases as well. It's possible that the test "cpow 2 0 10 0" will also need xfail-rounding on some platforms.) Tested x86_64 and x86 and ulps updated accordingly. * math/gen-auto-libm-tests.c: Document use of ignore-zero-inf-sign. (input_flag_type): Add value flag_ignore_zero_inf_sign. (input_flags): Add ignore-zero-inf-sign. (output_for_one_input_case): Handle flag_ignore_zero_inf_sign. * math/gen-libm-test.pl (generate_testfile): Handle ignore-zero-inf-sign. * math/auto-libm-test-in: Mark some cpow tests with ignore-zero-inf-sign and some with xfail-rounding. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (cpow_test): Use ALL_RM_TEST. * 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-ulps48
1 files changed, 48 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 8edd40b..5469887 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -959,6 +959,54 @@ ifloat: 2
ildouble: 4
ldouble: 4
+Function: Real part of "cpow_downward":
+double: 4
+float: 8
+idouble: 4
+ifloat: 8
+ildouble: 7
+ldouble: 7
+
+Function: Imaginary part of "cpow_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "cpow_towardzero":
+double: 4
+float: 8
+idouble: 4
+ifloat: 8
+ildouble: 7
+ldouble: 7
+
+Function: Imaginary part of "cpow_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cpow_upward":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "cpow_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
Function: Real part of "csin":
double: 1
float: 1