diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-14 12:49:45 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-14 12:54:47 -0500 |
commit | c7de50250367167d8c9f35594b264f6a0af8dd0c (patch) | |
tree | 2b495e050f5b00060824d9d4f83b22c6ba486b2e /math | |
parent | 98fb27a373f37554232e0060eef1a5bb00a07eb0 (diff) | |
download | glibc-c7de50250367167d8c9f35594b264f6a0af8dd0c.zip glibc-c7de50250367167d8c9f35594b264f6a0af8dd0c.tar.gz glibc-c7de50250367167d8c9f35594b264f6a0af8dd0c.tar.bz2 |
PowerPC: remove wrong roundl implementation for PowerPC64
The roundl assembly implementation
(sysdeps/powerpc/powerpc64/fpu/s_roundl.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_roundl.c instead fixes the failing math.
This fixes 16707.
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 1d602eb..2c0130b 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -10629,6 +10629,15 @@ static const struct test_f_f_data round_test_data[] = TEST_f_f (round, -72057594037927936.75L, -72057594037927937.0L), TEST_f_f (round, -72057594037927937.5L, -72057594037927938.0L), + /* 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 (round, 34503599627370498.515625L, 34503599627370499.0L), + TEST_f_f (round, -34503599627370498.515625L, -34503599627370499.0L), +# if LDBL_MANT_DIG >= 106 + TEST_f_f (round, 1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L), + TEST_f_f (round, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L), +# endif + TEST_f_f (round, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L), TEST_f_f (round, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L), TEST_f_f (round, 10141204801825835211973625643008.5L, 10141204801825835211973625643009.0L), |