diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-06-28 00:12:01 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-06-28 00:12:01 +0400 |
commit | 7daa789107361022a40d7163829d92a49e757477 (patch) | |
tree | 435b5dfeb040c60f3947888a7abaf2cec09fb7bf /newlib | |
parent | 8a7cd7e5f9761cb996adfb3e1fe92331bf1272d1 (diff) |
2003-06-27 Joe Vornehm <joev@mitre.org>
* libm/common/s_fpclassify.c (__fpclassifyf): Fix
comparisons to account for unsigned internal value w.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libm/common/s_fpclassify.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index e516a783a..d5896f0b8 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2003-06-27 Joe Vornehm <joev@mitre.org> + + * libm/common/s_fpclassify.c (__fpclassifyf): Fix + comparisons to account for unsigned internal value w. + 2003-06-26 Jeff Johnston <jjohnstn@redhat.com> * libc/sys/linux/mq_open.c (mq_open): Must allocate rdbuf and diff --git a/newlib/libm/common/s_fpclassify.c b/newlib/libm/common/s_fpclassify.c index 0911915ff..2820f0373 100644 --- a/newlib/libm/common/s_fpclassify.c +++ b/newlib/libm/common/s_fpclassify.c @@ -16,10 +16,10 @@ __fpclassifyf (float x) if (w == 0x00000000 || w == 0x80000000) return FP_ZERO; else if ((w >= 0x00800000 && w <= 0x7f7fffff) || - (w >= 0xff7fffff && w <= 0x80800000)) + (w >= 0x80800000 && w <= 0xff7fffff)) return FP_NORMAL; else if ((w >= 0x00000001 && w <= 0x007fffff) || - (w >= 0x807fffff && w <= 0x80000001)) + (w >= 0x80000001 && w <= 0x807fffff)) return FP_SUBNORMAL; else if (w == 0x7f800000 || w == 0xff800000) return FP_INFINITE; @@ -38,10 +38,10 @@ __fpclassifyd (double x) (msw == 0x80000000 && lsw == 0x00000000)) return FP_ZERO; else if ((msw >= 0x00100000 && msw <= 0x7fefffff) || - (msw >= 0xffefffff && msw <= 0x80100000)) + (msw >= 0x80100000 && msw <= 0xffefffff)) return FP_NORMAL; else if ((msw >= 0x00000000 && msw <= 0x000fffff) || - (msw >= 0x800fffff && msw <= 0x80000000)) + (msw >= 0x80000000 && msw <= 0x800fffff)) /* zero is already handled above */ return FP_SUBNORMAL; else if ((msw == 0x7ff00000 && lsw == 0x00000000) || |