aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-02-22 13:03:40 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-02-22 13:03:40 +0000
commit6cbeae4719aeb3edb6143fe5dd6d2a5ab45c0248 (patch)
tree2668b282c3712aeab13fd3691bd0a5d9e16817fa /math
parentfe45ce09f366f2260aef528d37ae35070b3a2a36 (diff)
downloadglibc-6cbeae4719aeb3edb6143fe5dd6d2a5ab45c0248.tar
glibc-6cbeae4719aeb3edb6143fe5dd6d2a5ab45c0248.tar.gz
glibc-6cbeae4719aeb3edb6143fe5dd6d2a5ab45c0248.tar.bz2
glibc-6cbeae4719aeb3edb6143fe5dd6d2a5ab45c0248.zip
Fix nearbyintf rounding.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.inc23
1 files changed, 23 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index c8186c8147..1016753c78 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -4632,6 +4632,29 @@ nearbyint_test (void)
TEST_f_f (nearbyint, 524286.75, 524287.0);
TEST_f_f (nearbyint, 524288.75, 524289.0);
+ TEST_f_f (nearbyint, 1048576.75, 1048577.0);
+ TEST_f_f (nearbyint, 2097152.75, 2097153.0);
+ TEST_f_f (nearbyint, 2492472.75, 2492473.0);
+ TEST_f_f (nearbyint, 2886220.75, 2886221.0);
+ TEST_f_f (nearbyint, 3058792.75, 3058793.0);
+ TEST_f_f (nearbyint, -1048576.75, -1048577.0);
+ TEST_f_f (nearbyint, -2097152.75, -2097153.0);
+ TEST_f_f (nearbyint, -2492472.75, -2492473.0);
+ TEST_f_f (nearbyint, -2886220.75, -2886221.0);
+ TEST_f_f (nearbyint, -3058792.75, -3058793.0);
+#ifndef TEST_FLOAT
+ TEST_f_f (nearbyint, 70368744177664.75, 70368744177665.0);
+ TEST_f_f (nearbyint, 140737488355328.75, 140737488355329.0);
+ TEST_f_f (nearbyint, 281474976710656.75, 281474976710657.0);
+ TEST_f_f (nearbyint, 562949953421312.75, 562949953421313.0);
+ TEST_f_f (nearbyint, 1125899906842624.75, 1125899906842625.0);
+ TEST_f_f (nearbyint, -70368744177664.75, -70368744177665.0);
+ TEST_f_f (nearbyint, -140737488355328.75, -140737488355329.0);
+ TEST_f_f (nearbyint, -281474976710656.75, -281474976710657.0);
+ TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0);
+ TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0);
+#endif
+
END (nearbyint);
}