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_isinf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'newlib/libm/math/sf_isinf.c') diff --git a/newlib/libm/math/sf_isinf.c b/newlib/libm/math/sf_isinf.c index 1af4aab2a..43a8abdf2 100644 --- a/newlib/libm/math/sf_isinf.c +++ b/newlib/libm/math/sf_isinf.c @@ -1,6 +1,5 @@ /* - * isinff(x) returns 1 if x is infinity, else 0; - * no branching! + * isinff(x) returns 1 if x is +-infinity, else 0; * Added by Cygnus Support. */ @@ -16,8 +15,7 @@ __int32_t ix; GET_FLOAT_WORD(ix,x); ix &= 0x7fffffff; - ix = 0x7f800000 - ix; - return 1 - (int)((__uint32_t)(ix|(-ix))>>31); + return FLT_UWORD_IS_INFINITE(ix); } #ifdef _DOUBLE_IS_32BITS -- cgit v1.2.3