summaryrefslogtreecommitdiff
path: root/libc/sysdeps/ieee754/dbl-64
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-04-21 17:19:39 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-04-21 17:19:39 +0000
commitded28410835671021876e845572816d3083efe34 (patch)
treed1f9b748d0c562708657f80cd2830c7582d455f6 /libc/sysdeps/ieee754/dbl-64
parent854e95fe80cf2750477daaa1fcce14b8ef43418c (diff)
Merge changes between r17813 and r18165 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18166 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/ieee754/dbl-64')
-rw-r--r--libc/sysdeps/ieee754/dbl-64/e_ilogb.c (renamed from libc/sysdeps/ieee754/dbl-64/s_ilogb.c)7
-rw-r--r--libc/sysdeps/ieee754/dbl-64/e_pow.c5
-rw-r--r--libc/sysdeps/ieee754/dbl-64/w_exp.c4
3 files changed, 6 insertions, 10 deletions
diff --git a/libc/sysdeps/ieee754/dbl-64/s_ilogb.c b/libc/sysdeps/ieee754/dbl-64/e_ilogb.c
index 05c66d70f..0452a71fb 100644
--- a/libc/sysdeps/ieee754/dbl-64/s_ilogb.c
+++ b/libc/sysdeps/ieee754/dbl-64/e_ilogb.c
@@ -25,7 +25,7 @@ static char rcsid[] = "$NetBSD: s_ilogb.c,v 1.9 1995/05/10 20:47:28 jtc Exp $";
#include <math.h>
#include <math_private.h>
-int __ilogb(double x)
+int __ieee754_ilogb(double x)
{
int32_t hx,lx,ix;
@@ -52,8 +52,3 @@ int __ilogb(double x)
}
return FP_ILOGBNAN;
}
-weak_alias (__ilogb, ilogb)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ilogb, __ilogbl)
-weak_alias (__ilogb, ilogbl)
-#endif
diff --git a/libc/sysdeps/ieee754/dbl-64/e_pow.c b/libc/sysdeps/ieee754/dbl-64/e_pow.c
index 26ffaaddc..6c41af93b 100644
--- a/libc/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/libc/sysdeps/ieee754/dbl-64/e_pow.c
@@ -47,6 +47,7 @@
# define SECTION
#endif
+static const double huge = 1.0e300, tiny = 1.0e-300;
double __exp1(double x, double xx, double error);
static double log1(double x, double *delta, double *error);
@@ -156,8 +157,8 @@ __ieee754_pow(double x, double y) {
if (qy > 0x45f00000 && qy < 0x7ff00000) {
if (x == 1.0) return 1.0;
- if (y>0) return (x>1.0)?INF.x:0;
- if (y<0) return (x<1.0)?INF.x:0;
+ if (y>0) return (x>1.0)?huge*huge:tiny*tiny;
+ if (y<0) return (x<1.0)?huge*huge:tiny*tiny;
}
if (x == 1.0) return 1.0;
diff --git a/libc/sysdeps/ieee754/dbl-64/w_exp.c b/libc/sysdeps/ieee754/dbl-64/w_exp.c
index b584ed83d..aa8ff7689 100644
--- a/libc/sysdeps/ieee754/dbl-64/w_exp.c
+++ b/libc/sysdeps/ieee754/dbl-64/w_exp.c
@@ -31,12 +31,12 @@ __exp (double x)
if (__builtin_expect (isgreater (x, o_threshold), 0))
{
if (_LIB_VERSION != _IEEE_)
- return __kernel_standard_f (x, x, 6);
+ return __kernel_standard (x, x, 6);
}
else if (__builtin_expect (isless (x, u_threshold), 0))
{
if (_LIB_VERSION != _IEEE_)
- return __kernel_standard_f (x, x, 7);
+ return __kernel_standard (x, x, 7);
}
return __ieee754_exp (x);