summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-24 19:57:55 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-24 19:57:55 +0000
commitaf0498dc955f23c4e2eb28b1658ec2e86b4ab069 (patch)
tree48b7c50b5d05137ec01dbf6c4abcf95c4b3b70ee /math
parent0facd3df4b2faeb6088fa9bf47e94ff6af256750 (diff)
downloadglibc-af0498dc955f23c4e2eb28b1658ec2e86b4ab069.tar.gz
glibc-af0498dc955f23c4e2eb28b1658ec2e86b4ab069.tar.xz
glibc-af0498dc955f23c4e2eb28b1658ec2e86b4ab069.zip
[BZ #5857]
2008-03-09  Andreas Jaeger  <aj@suse.de>
	[BZ #5857]
	* sysdeps/ieee754/dbl-64/s_rint.c (__rint): Handle j0==18.
	* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Likewise.
  	Patch by Mark Elliott <mark.h.elliott@lmco.com>.

	* math/libm-test.inc (nearbyint_test): Add new test cases from #5857.
	(rint_test): Likewise.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index e698923f4e..a33a182857 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -4481,6 +4481,11 @@ nearbyint_test (void)
   TEST_f_f (nearbyint, -0.5, minus_zero);
   TEST_f_f (nearbyint, -1.5, -2.0);
 
+  TEST_f_f (nearbyint, 262144.75, 262145.0);
+  TEST_f_f (nearbyint, 262142.75, 262143.0);
+  TEST_f_f (nearbyint, 524286.75, 524287.0);
+  TEST_f_f (nearbyint, 524288.75, 524289.0);
+
   END (nearbyint);
 }
 
@@ -4852,6 +4857,10 @@ rint_test (void)
   TEST_f_f (rint, -0.1, -0.0);
   TEST_f_f (rint, -0.25, -0.0);
   TEST_f_f (rint, -0.625, -1.0);
+  TEST_f_f (rint, 262144.75, 262145.0);
+  TEST_f_f (rint, 262142.75, 262143.0);
+  TEST_f_f (rint, 524286.75, 524287.0);
+  TEST_f_f (rint, 524288.75, 524289.0);
 #ifdef TEST_LDOUBLE
   /* The result can only be represented in long double.  */
   TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);