about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/e_exp2f.c6
-rw-r--r--sysdeps/ieee754/flt-32/e_log2f.c (renamed from sysdeps/ieee754/flt-32/s_log2f.c)5
-rw-r--r--sysdeps/ieee754/flt-32/s_ilogbf.c8
3 files changed, 12 insertions, 7 deletions
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c
index 4d529ea285..263ee16a9f 100644
--- a/sysdeps/ieee754/flt-32/e_exp2f.c
+++ b/sysdeps/ieee754/flt-32/e_exp2f.c
@@ -1,5 +1,5 @@
 /* Single-precision floating point 2^x.
-   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
 
@@ -45,10 +45,10 @@ float
 __ieee754_exp2f (float x)
 {
   static const float himark = (float) FLT_MAX_EXP;
-  static const float lomark = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1) - 1.0;
+  static const float lomark = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
 
   /* Check for usual case.  */
-  if (isless (x, himark) && isgreater (x, lomark))
+  if (isless (x, himark) && isgreaterequal (x, lomark))
     {
       static const float THREEp14 = 49152.0;
       int tval, unsafe;
diff --git a/sysdeps/ieee754/flt-32/s_log2f.c b/sysdeps/ieee754/flt-32/e_log2f.c
index 2377acd36a..af3c6eadfe 100644
--- a/sysdeps/ieee754/flt-32/s_log2f.c
+++ b/sysdeps/ieee754/flt-32/e_log2f.c
@@ -40,9 +40,9 @@ static float zero   =  0.0;
 #endif
 
 #ifdef __STDC__
-	float __log2f(float x)
+	float __ieee754_log2f(float x)
 #else
-	float __log2f(x)
+	float __ieee754_log2f(x)
 	float x;
 #endif
 {
@@ -88,4 +88,3 @@ static float zero   =  0.0;
 	    return dk-((s*(f-R))-f)/ln2;
 	}
 }
-weak_alias (__log2f, log2f)
diff --git a/sysdeps/ieee754/flt-32/s_ilogbf.c b/sysdeps/ieee754/flt-32/s_ilogbf.c
index e652b93619..ea3dc13bcb 100644
--- a/sysdeps/ieee754/flt-32/s_ilogbf.c
+++ b/sysdeps/ieee754/flt-32/s_ilogbf.c
@@ -17,6 +17,7 @@
 static char rcsid[] = "$NetBSD: s_ilogbf.c,v 1.4 1995/05/10 20:47:31 jtc Exp $";
 #endif
 
+#include <limits.h>
 #include "math.h"
 #include "math_private.h"
 
@@ -39,6 +40,11 @@ static char rcsid[] = "$NetBSD: s_ilogbf.c,v 1.4 1995/05/10 20:47:31 jtc Exp $";
 	    return ix;
 	}
 	else if (hx<0x7f800000) return (hx>>23)-127;
-	else return FP_ILOGBNAN;
+	else if (FP_ILOGBNAN != INT_MAX) {
+	    /* ISO C99 requires ilogbf(+-Inf) == INT_MAX.  */
+	    if (hx==0x7f800000)
+		return INT_MAX;
+	}
+	return FP_ILOGBNAN;
 }
 weak_alias (__ilogbf, ilogbf)