From 16740220a22d09a1c63714d93f1efc5fbe3927f3 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 4 Apr 2001 13:33:01 +0000 Subject: * libc/include/machine/ieeefp.h: Comment about new configuration macros _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS. * libm/common/fdlib.h: Define new macros for testing floats. * libm/common/sf_*: Use them. * libm/math/ef_*: Likewise. * libm/math/sf_*: Likewise. --- newlib/libm/math/sf_frexp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libm/math/sf_frexp.c') diff --git a/newlib/libm/math/sf_frexp.c b/newlib/libm/math/sf_frexp.c index 271fb9dca..8dd8a9767 100644 --- a/newlib/libm/math/sf_frexp.c +++ b/newlib/libm/math/sf_frexp.c @@ -33,8 +33,8 @@ two25 = 3.3554432000e+07; /* 0x4c000000 */ GET_FLOAT_WORD(hx,x); ix = 0x7fffffff&hx; *eptr = 0; - if(ix>=0x7f800000||(ix==0)) return x; /* 0,inf,nan */ - if (ix<0x00800000) { /* subnormal */ + if(!FLT_UWORD_IS_FINITE(ix)||FLT_UWORD_IS_ZERO(ix)) return x; /* 0,inf,nan */ + if (FLT_UWORD_IS_SUBNORMAL(ix)) { /* subnormal */ x *= two25; GET_FLOAT_WORD(hx,x); ix = hx&0x7fffffff; -- cgit v1.2.3