summaryrefslogtreecommitdiff
path: root/src/math/modfl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/modfl.c')
-rw-r--r--src/math/modfl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/math/modfl.c b/src/math/modfl.c
index f736bba4..4b03a4be 100644
--- a/src/math/modfl.c
+++ b/src/math/modfl.c
@@ -3,7 +3,12 @@
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double modfl(long double x, long double *iptr)
{
- return modf(x, (double *)iptr);
+ double d;
+ long double r;
+
+ r = modf(x, &d);
+ *iptr = d;
+ return r;
}
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
#if LDBL_MANT_DIG == 64