aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--NEWS2
-rw-r--r--math/libm-test.inc11
-rw-r--r--sysdeps/ieee754/ldbl-128/s_roundl.c2
4 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b58951..35106b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-28 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #18346]
+ * sysdeps/ieee754/ldbl-128/s_roundl.c (__roundl): Handle all
+ exponents less than 48 as cases where high part of mantissa needs
+ examining to determine whether argument is integral.
+ * math/libm-test.inc (round_test_data): Add more tests.
+
2015-04-28 Mark Wielaard <mjw@redhat.com>
* elf/elf.h (SHF_EXCLUDE): Use unsigned 1 for shift.
diff --git a/NEWS b/NEWS
index 72e15f5..fc3911d 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Version 2.22
17967, 17969, 17978, 17987, 17991, 17996, 17998, 17999, 18019, 18020,
18029, 18030, 18032, 18036, 18038, 18039, 18042, 18043, 18046, 18047,
18068, 18080, 18093, 18100, 18104, 18110, 18111, 18128, 18138, 18185,
- 18197, 18206, 18210, 18211, 18247, 18287, 18333.
+ 18197, 18206, 18210, 18211, 18247, 18287, 18333, 18346.
* Cache information can be queried via sysconf() function on s390 e.g. with
_SC_LEVEL1_ICACHE_SIZE as argument.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 5d7f5a2..4cade14 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -9012,6 +9012,17 @@ static const struct test_f_f_data round_test_data[] =
TEST_f_f (round, 2097152.5, 2097153),
TEST_f_f (round, -2097152.5, -2097153),
+#ifndef TEST_FLOAT
+ TEST_f_f (round, 0xffffffffffff.0p0L, 0xffffffffffff.0p0L),
+ TEST_f_f (round, 0xffffffffffff.4p0L, 0xffffffffffff.0p0L),
+ TEST_f_f (round, 0xffffffffffff.8p0L, 0x1000000000000.0p0L),
+ TEST_f_f (round, 0xffffffffffff.cp0L, 0x1000000000000.0p0L),
+ TEST_f_f (round, -0xffffffffffff.0p0L, -0xffffffffffff.0p0L),
+ TEST_f_f (round, -0xffffffffffff.4p0L, -0xffffffffffff.0p0L),
+ TEST_f_f (round, -0xffffffffffff.8p0L, -0x1000000000000.0p0L),
+ TEST_f_f (round, -0xffffffffffff.cp0L, -0x1000000000000.0p0L),
+#endif
+
#ifdef TEST_LDOUBLE
/* The result can only be represented in long double. */
TEST_f_f (round, 4503599627370495.5L, 4503599627370496.0L),
diff --git a/sysdeps/ieee754/ldbl-128/s_roundl.c b/sysdeps/ieee754/ldbl-128/s_roundl.c
index 9df0092..3ff6ebe 100644
--- a/sysdeps/ieee754/ldbl-128/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-128/s_roundl.c
@@ -34,7 +34,7 @@ __roundl (long double x)
GET_LDOUBLE_WORDS64 (i0, i1, x);
j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
- if (j0 < 31)
+ if (j0 < 48)
{
if (j0 < 0)
{