summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/s_expm1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_expm1.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index 54d771007a..8f1c95bd04 100644
--- a/sysdeps/ieee754/dbl-64/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
@@ -111,7 +111,10 @@
#include <errno.h>
#include <float.h>
#include <math.h>
+#include <math-barriers.h>
#include <math_private.h>
+#include <math-underflow.h>
+#include <libm-alias-double.h>
#define one Q[0]
static const double
huge = 1.0e+300,
@@ -132,7 +135,7 @@ __expm1 (double x)
{
double y, hi, lo, c, t, e, hxs, hfx, r1, h2, h4, R1, R2, R3;
int32_t k, xsb;
- u_int32_t hx;
+ uint32_t hx;
GET_HIGH_WORD (hx, x);
xsb = hx & 0x80000000; /* sign bit of x */
@@ -149,7 +152,7 @@ __expm1 (double x)
{
if (hx >= 0x7ff00000)
{
- u_int32_t low;
+ uint32_t low;
GET_LOW_WORD (low, x);
if (((hx & 0xfffff) | low) != 0)
return x + x; /* NaN */
@@ -228,7 +231,7 @@ __expm1 (double x)
}
if (k <= -2 || k > 56) /* suffice to return exp(x)-1 */
{
- u_int32_t high;
+ uint32_t high;
y = one - (e - x);
GET_HIGH_WORD (high, y);
SET_HIGH_WORD (y, high + (k << 20)); /* add k to y's exponent */
@@ -237,7 +240,7 @@ __expm1 (double x)
t = one;
if (k < 20)
{
- u_int32_t high;
+ uint32_t high;
SET_HIGH_WORD (t, 0x3ff00000 - (0x200000 >> k)); /* t=1-2^-k */
y = t - (e - x);
GET_HIGH_WORD (high, y);
@@ -245,7 +248,7 @@ __expm1 (double x)
}
else
{
- u_int32_t high;
+ uint32_t high;
SET_HIGH_WORD (t, ((0x3ff - k) << 20)); /* 2^-k */
y = x - (e + t);
y += one;
@@ -255,8 +258,4 @@ __expm1 (double x)
}
return y;
}
-weak_alias (__expm1, expm1)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__expm1, __expm1l)
-weak_alias (__expm1, expm1l)
-#endif
+libm_alias_double (__expm1, expm1)