diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-14 12:27:52 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-14 12:54:47 -0500 |
commit | 98fb27a373f37554232e0060eef1a5bb00a07eb0 (patch) | |
tree | e01d7b58d4340fe3f8bfd1b3acb3abe9d926ab5a /math | |
parent | 374f7f61214967bb4e2257695aeeeecc2a77f369 (diff) | |
download | glibc-98fb27a373f37554232e0060eef1a5bb00a07eb0.zip glibc-98fb27a373f37554232e0060eef1a5bb00a07eb0.tar.gz glibc-98fb27a373f37554232e0060eef1a5bb00a07eb0.tar.bz2 |
PowerPC: remove wrong nearbyintl implementation for PPC64
The nearbyintl assembly implementation
(sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S)
returns wrong results for some inputs where first double is a exact
integer and the precision is determined by second long double.
Checking on implementation comments and history, I am very confident the
assembly implementation was based on a version before commit
5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in
long double (ldbl-128ibm) rounding functions in glibc-2.4).
By just removing the implementation and make the build select
sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c instead fixes the failing
math.
Fixes BZ#16706.
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index c151b7d..1d602eb 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -9521,6 +9521,16 @@ static const struct test_f_f_data nearbyint_test_data[] = TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0, NO_INEXACT_EXCEPTION), TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0, NO_INEXACT_EXCEPTION), #endif +#ifdef TEST_LDOUBLE + /* Check cases where first double is a exact integer higher than 2^52 and + the precision is determined by second long double for IBM long double. */ + TEST_f_f (nearbyint, 34503599627370498.515625L, 34503599627370499.0L), + TEST_f_f (nearbyint, -34503599627370498.515625L, -34503599627370499.0L), +# if LDBL_MANT_DIG >= 106 + TEST_f_f (nearbyint, 1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L), + TEST_f_f (nearbyint, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L), +# endif +#endif }; static void |