aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2007-01-06 21:22:57 +0000
committerDavid Schultz <das@FreeBSD.org>2007-01-06 21:22:57 +0000
commit829d55ac9c8ec945f1f131937efb319a30535ae0 (patch)
treebfca874f15315a955331be299d09c628536fda60 /lib
parent9fa229fc8d732540b7057e8f8a7cdf2b8653d769 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/msun/src/s_modff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/msun/src/s_modff.c b/lib/msun/src/s_modff.c
index 69b64e901cf9..4436764ecb24 100644
--- a/lib/msun/src/s_modff.c
+++ b/lib/msun/src/s_modff.c
@@ -49,6 +49,8 @@ modff(float x, float *iptr)
} else { /* no fraction part */
u_int32_t ix;
*iptr = x*one;
+ if (x != x) /* NaN */
+ return x;
GET_FLOAT_WORD(ix,x);
SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */
return x;