summaryrefslogtreecommitdiff
path: root/src/math/modfl.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
commit97721a5508415a2f10eb068e022093811c9ff8be (patch)
tree88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/modfl.c
parentacb744921b73f5a73803e533e5e4a4896d164a26 (diff)
parent0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff)
downloadmusl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/modfl.c')
-rw-r--r--src/math/modfl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/modfl.c b/src/math/modfl.c
index 2ca67b11..6520a1c2 100644
--- a/src/math/modfl.c
+++ b/src/math/modfl.c
@@ -54,7 +54,7 @@ long double modfl(long double x, long double *iptr)
/* The number of fraction bits in manh, not counting the integer bit */
#define HIBITS (LDBL_MANT_DIG - LDBL_MANL_SIZE)
-static const long double zero[] = { 0.0L, -0.0L };
+static const long double zero[] = { 0.0, -0.0 };
long double modfl(long double x, long double *iptr)
{
@@ -81,7 +81,7 @@ long double modfl(long double x, long double *iptr)
return x - ux.e;
} else if (e >= LDBL_MANT_DIG - 1) { /* x has no fraction part. */
*iptr = x;
- if (x != x) /* Handle NaNs. */
+ if (e == LDBL_MAX_EXP && (ux.bits.manh|ux.bits.manl)) /* nan */
return x;
return zero[ux.bits.sign];
} else { /* Fraction part is in manl. */