From c2e3af6ee68d6c36164d49df92ec501e9343475f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 1 Mar 1998 11:06:48 +0000 Subject: 1998-03-01 19:05 H.J. Lu (hjl@gnu.org) * sysdeps/libm-ieee754/e_exp.c (__ieee754_exp): Use __isinf. Changed type of TWO43, TWO52 from float to double. * sysdeps/libm-ieee754/e_expf.c (__ieee754_expf): Use __isinff. * sysdeps/libm-ieee754/s_exp2.c (__ieee754_exp2): Use __isinf. Changed type of TWO43 from float to double. * sysdeps/libm-ieee754/s_exp2f.c (__ieee754_exp2f): Fix a typo. Use __isinff. 1998-03-01 19:05 H.J. Lu (hjl@gnu.org) * sysdeps/libm-ieee754/e_exp.c (__ieee754_exp): Use __isinf. Changed type of TWO43, TWO52 from float to double. * sysdeps/libm-ieee754/e_expf.c (__ieee754_expf): Use __isinff. * sysdeps/libm-ieee754/s_exp2.c (__ieee754_exp2): Use __isinf. Changed type of TWO43 from float to double. * sysdeps/libm-ieee754/s_exp2f.c (__ieee754_exp2f): Fix a typo. Use __isinff. --- sysdeps/libm-ieee754/s_exp2f.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sysdeps/libm-ieee754/s_exp2f.c') diff --git a/sysdeps/libm-ieee754/s_exp2f.c b/sysdeps/libm-ieee754/s_exp2f.c index 428f46f241..641b7548f1 100644 --- a/sysdeps/libm-ieee754/s_exp2f.c +++ b/sysdeps/libm-ieee754/s_exp2f.c @@ -43,7 +43,6 @@ static const volatile float TWO127 = 1.7014118346e+38; float __ieee754_exp2f (float x) { - static const uint32_t a_minf = 0xff800000; static const float himark = (float) FLT_MAX_EXP; static const float lomark = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1) - 1.0; @@ -76,7 +75,7 @@ __ieee754_exp2f (float x) else { rx = x - TWO15; -+ rx += TWO15; + rx += TWO15; } x -= rx; /* Compute x=x1. */ /* Compute tval = (ex*256 + t)+128. @@ -123,7 +122,7 @@ __ieee754_exp2f (float x) /* Exceptional cases: */ else if (isless (x, himark)) { - if (x == *(const float *) &a_minf) + if (__isinff (x)) /* e^-inf == 0, with no error. */ return 0; else -- cgit 1.4.1