summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j0l.c16
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c16
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_expl.c8
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_expm1l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_log1pl.c8
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c8
6 files changed, 24 insertions, 34 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index 67ef371153..f235372916 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -768,16 +768,15 @@ __ieee754_j0l (long double x)
= 1/sqrt(2) * (sin(x) - cos(x))
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = s - c;
cc = s + c;
- z = -cosl (xx + xx);
+ z = -__cosl (xx + xx);
if ((s * c) < 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx);
+ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
return z;
}
@@ -836,7 +835,7 @@ long double
/* 0 <= x <= 2 */
z = xx * xx;
p = neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
- p = TWOOPI * logl(x) * __ieee754_j0l(x) + p;
+ p = TWOOPI * __ieee754_logl (x) * __ieee754_j0l (x) + p;
return p;
}
@@ -908,15 +907,14 @@ long double
= 1/sqrt(2) * (sin(x) - cos(x))
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
cf. Fdlibm. */
- c = cosl (x);
- s = sinl (x);
+ __sincosl (x, &s, &c);
ss = s - c;
cc = s + c;
- z = -cosl (x + x);
+ z = -__cosl (x + x);
if ((s * c) < 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * ss + q * cc) / sqrtl (x);
+ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x);
return z;
}
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 3a977c2a84..7ec073d9e2 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -773,16 +773,15 @@ __ieee754_j1l (long double x)
sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
= -1/sqrt(2) * (sin(x) + cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = -s - c;
cc = s - c;
- z = cosl (xx + xx);
+ z = __cosl (xx + xx);
if ((s * c) > 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx);
+ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
if (x < 0)
z = -z;
return z;
@@ -844,7 +843,7 @@ __ieee754_y1l (long double x)
z = xx * xx;
p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
p = -TWOOPI / xx + p;
- p = TWOOPI * logl(x) * __ieee754_j1l (x) + p;
+ p = TWOOPI * __ieee754_logl (x) * __ieee754_j1l (x) + p;
return p;
}
@@ -915,15 +914,14 @@ __ieee754_y1l (long double x)
sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
= -1/sqrt(2) * (sin(x) + cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = -s - c;
cc = s - c;
- z = cosl (xx + xx);
+ z = __cosl (xx + xx);
if ((s * c) > 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx);
+ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx);
return z;
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
index 3c4088f75f..daf2cba323 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999,2004,2006 Free Software Foundation, Inc.
+ Copyright (C) 1999,2004,2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -148,15 +148,15 @@ __ieee754_expl (long double x)
fesetround (FE_TONEAREST);
#endif
- n = roundl(x*M_1_LN2);
+ n = __roundl (x*M_1_LN2);
x = x-n*M_LN2_0;
xl = n*M_LN2_1;
- tval1 = roundl(x*TWO8);
+ tval1 = __roundl (x*TWO8);
x -= __expl_table[T_EXPL_ARG1+2*tval1];
xl -= __expl_table[T_EXPL_ARG1+2*tval1+1];
- tval2 = roundl(x*TWO15);
+ tval2 = __roundl (x*TWO15);
x -= __expl_table[T_EXPL_ARG2+2*tval2];
xl -= __expl_table[T_EXPL_ARG2+2*tval2+1];
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
index 4908d4e4f3..735006575f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
@@ -152,7 +152,7 @@ __expm1l (long double x)
exp(x) - 1 = 2^k (qx + 1) - 1
= 2^k qx + 2^k - 1. */
- px = ldexpl (1.0L, k);
+ px = __ldexpl (1.0L, k);
x = px * qx + (px - 1.0);
return x;
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
index f1863fb688..5ccf541b71 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
@@ -121,12 +121,6 @@ static const long double maxlog = 1.1356523406294143949491931077970764891253E4L;
static const long double big = 2e300L;
static const long double zero = 0.0L;
-#if 1
-/* Make sure these are prototyped. */
-long double frexpl (long double, int *);
-long double ldexpl (long double, int);
-#endif
-
long double
__log1pl (long double xm1)
@@ -161,7 +155,7 @@ __log1pl (long double xm1)
/* Separate mantissa from exponent. */
/* Use frexp used so that denormal numbers will be handled properly. */
- x = frexpl (x, &e);
+ x = __frexpl (x, &e);
/* Logarithm using log(x) = z + z^3 P(z^2)/Q(z^2),
where z = 2(x-1)/x+1). */
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
index 2561fda329..36c5a164dc 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
@@ -1,6 +1,6 @@
/* Round to int long double floating-point values without raising inexact.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -84,8 +84,8 @@ __nearbyintl (x)
{
/* Else the high double is pre rounded and we need to
adjust for that. */
-
- tau = nextafter (u.dd[0], 0.0);
+
+ tau = __nextafter (u.dd[0], 0.0);
tau = (u.dd[0] - tau) * 2.0;
high = u.dd[0] - tau;
low = u.dd[1] + tau;
@@ -106,7 +106,7 @@ __nearbyintl (x)
{
/* Else the high double is pre rounded and we need to
adjust for that. */
- tau = nextafter (u.dd[0], 0.0);
+ tau = __nextafter (u.dd[0], 0.0);
tau = (u.dd[0] - tau) * 2.0;
high = u.dd[0] - tau;
low = u.dd[1] + tau;