aboutsummaryrefslogtreecommitdiff
path: root/math/libm-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/libm-test.c')
-rw-r--r--math/libm-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/math/libm-test.c b/math/libm-test.c
index 8fa473eaf5..ea5716ff81 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -1703,6 +1703,10 @@ modf_test (void)
check ("modf (-0, &x) returns -0", result, minus_zero);
check ("modf (-0, &x) sets x to -0", intpart, minus_zero);
+ result = FUNC(modf) (1.5, &intpart);
+ check ("modf (1.5, &x) returns 0.5", result, 0.5);
+ check ("modf (1.5, &x) sets x to 1", intpart, 1);
+
result = FUNC(modf) (2.5, &intpart);
check ("modf (2.5, &x) returns 0.5", result, 0.5);
check ("modf (2.5, &x) sets x to 2", intpart, 2);