diff options
| author | David Schultz <das@FreeBSD.org> | 2007-01-06 21:22:38 +0000 |
|---|---|---|
| committer | David Schultz <das@FreeBSD.org> | 2007-01-06 21:22:38 +0000 |
| commit | 9fa229fc8d732540b7057e8f8a7cdf2b8653d769 (patch) | |
| tree | 5ca29b961a5cd0c413b0b506693d4f58ceb7eb47 /lib | |
| parent | 6642c3fa745854c4eeff178a3fb314ae88384fe6 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/msun/src/s_modf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c index 8cfe56884a01..ab13191b9004 100644 --- a/lib/msun/src/s_modf.c +++ b/lib/msun/src/s_modf.c @@ -55,6 +55,10 @@ modf(double x, double *iptr) } } else if (j0>51) { /* no fraction part */ u_int32_t high; + if (j0 == 0x400) { /* inf/NaN */ + *iptr = x; + return 0.0 / x; + } *iptr = x*one; GET_HIGH_WORD(high,x); INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ |
