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/common/sf_log1p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libm/common/sf_log1p.c') diff --git a/newlib/libm/common/sf_log1p.c b/newlib/libm/common/sf_log1p.c index 5ae7fb936..e09170f3e 100644 --- a/newlib/libm/common/sf_log1p.c +++ b/newlib/libm/common/sf_log1p.c @@ -51,6 +51,7 @@ static float zero = 0.0; ax = hx&0x7fffffff; k = 1; + if (!FLT_UWORD_IS_FINITE(hx)) return x+x; if (hx < 0x3ed413d7) { /* x < 0.41422 */ if(ax>=0x3f800000) { /* x <= -1.0 */ if(x==(float)-1.0) return -two25/zero; /* log1p(-1)=+inf */ @@ -65,8 +66,7 @@ static float zero = 0.0; } if(hx>0||hx<=((__int32_t)0xbe95f61f)) { k=0;f=x;hu=1;} /* -0.2929= 0x7f800000) return x+x; + } if(k!=0) { if(hx<0x5a000000) { u = (float)1.0+x; -- cgit v1.2.3