@@ -35,9 +35,5 @@ libm_hidden_proto (__expl)
libm_hidden_proto (__expm1l)
# endif
-extern int __isinf_ns (double);
-extern int __isinf_nsf (float);
-extern int __isinf_nsl (long double);
-
#endif
#endif
@@ -61,7 +61,7 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
s_catan s_casin s_ccos s_csin s_ctan s_ctanh s_cacos \
s_casinh s_cacosh s_catanh s_csqrt s_cpow s_cproj s_clog10 \
s_fma s_lrint s_llrint s_lround s_llround e_exp10 w_log2 \
- s_isinf_ns s_issignaling $(calls:s_%=m_%) x2y2m1 k_casinh \
+ s_issignaling $(calls:s_%=m_%) x2y2m1 k_casinh \
gamma_product k_standard lgamma_neg lgamma_product
dbl-only-routines := branred doasin dosincos halfulp mpa mpatan2 \
@@ -54,19 +54,19 @@ __divtc3 (long double a, long double b, long double c, long double d)
x = __copysignl (INFINITY, c) * a;
y = __copysignl (INFINITY, c) * b;
}
- else if ((__isinf_nsl (a) || __isinf_nsl (b))
+ else if ((isinf (a) || isinf (b))
&& isfinite (c) && isfinite (d))
{
- a = __copysignl (__isinf_nsl (a) ? 1 : 0, a);
- b = __copysignl (__isinf_nsl (b) ? 1 : 0, b);
+ a = __copysignl (isinf (a) ? 1 : 0, a);
+ b = __copysignl (isinf (b) ? 1 : 0, b);
x = INFINITY * (a * c + b * d);
y = INFINITY * (b * c - a * d);
}
- else if ((__isinf_nsl (c) || __isinf_nsl (d))
+ else if ((isinf (c) || isinf (d))
&& isfinite (a) && isfinite (b))
{
- c = __copysignl (__isinf_nsl (c) ? 1 : 0, c);
- d = __copysignl (__isinf_nsl (d) ? 1 : 0, d);
+ c = __copysignl (isinf (c) ? 1 : 0, c);
+ d = __copysignl (isinf (d) ? 1 : 0, d);
x = 0.0 * (a * c + b * d);
y = 0.0 * (b * c - a * d);
}
@@ -38,29 +38,29 @@ __multc3 (long double a, long double b, long double c, long double d)
{
/* Recover infinities that computed as NaN + iNaN. */
bool recalc = 0;
- if (__isinf_nsl (a) || __isinf_nsl (b))
+ if (isinf (a) || isinf (b))
{
/* z is infinite. "Box" the infinity and change NaNs in
the other factor to 0. */
- a = __copysignl (__isinf_nsl (a) ? 1 : 0, a);
- b = __copysignl (__isinf_nsl (b) ? 1 : 0, b);
+ a = __copysignl (isinf (a) ? 1 : 0, a);
+ b = __copysignl (isinf (b) ? 1 : 0, b);
if (isnan (c)) c = __copysignl (0, c);
if (isnan (d)) d = __copysignl (0, d);
recalc = 1;
}
- if (__isinf_nsl (c) || __isinf_nsl (d))
+ if (isinf (c) || isinf (d))
{
/* w is infinite. "Box" the infinity and change NaNs in
the other factor to 0. */
- c = __copysignl (__isinf_nsl (c) ? 1 : 0, c);
- d = __copysignl (__isinf_nsl (d) ? 1 : 0, d);
+ c = __copysignl (isinf (c) ? 1 : 0, c);
+ d = __copysignl (isinf (d) ? 1 : 0, d);
if (isnan (a)) a = __copysignl (0, a);
if (isnan (b)) b = __copysignl (0, b);
recalc = 1;
}
if (!recalc
- && (__isinf_nsl (ac) || __isinf_nsl (bd)
- || __isinf_nsl (ad) || __isinf_nsl (bc)))
+ && (isinf (ac) || isinf (bd)
+ || isinf (ad) || isinf (bc)))
{
/* Recover infinities from overflow by changing NaNs to 0. */
if (isnan (a)) a = __copysignl (0, a);
@@ -33,7 +33,7 @@ __casin (__complex__ double x)
{
res = x;
}
- else if (__isinf_ns (__real__ x) || __isinf_ns (__imag__ x))
+ else if (isinf (__real__ x) || isinf (__imag__ x))
{
__real__ res = __nan ("");
__imag__ res = __copysign (HUGE_VAL, __imag__ x);
@@ -33,7 +33,7 @@ __casinf (__complex__ float x)
{
res = x;
}
- else if (__isinf_nsf (__real__ x) || __isinf_nsf (__imag__ x))
+ else if (isinf (__real__ x) || isinf (__imag__ x))
{
__real__ res = __nanf ("");
__imag__ res = __copysignf (HUGE_VALF, __imag__ x);
@@ -33,7 +33,7 @@ __casinl (__complex__ long double x)
{
res = x;
}
- else if (__isinf_nsl (__real__ x) || __isinf_nsl (__imag__ x))
+ else if (isinf (__real__ x) || isinf (__imag__ x))
{
__real__ res = __nanl ("");
__imag__ res = __copysignl (HUGE_VALL, __imag__ x);
@@ -25,7 +25,7 @@
__complex__ double
__cproj (__complex__ double x)
{
- if (__isinf_ns (__real__ x) || __isinf_ns (__imag__ x))
+ if (isinf (__real__ x) || isinf (__imag__ x))
{
__complex__ double res;
@@ -25,7 +25,7 @@
__complex__ float
__cprojf (__complex__ float x)
{
- if (__isinf_nsf (__real__ x) || __isinf_nsf (__imag__ x))
+ if (isinf (__real__ x) || isinf (__imag__ x))
{
__complex__ float res;
@@ -25,7 +25,7 @@
__complex__ long double
__cprojl (__complex__ long double x)
{
- if (__isinf_nsl (__real__ x) || __isinf_nsl (__imag__ x))
+ if (isinf (__real__ x) || isinf (__imag__ x))
{
__complex__ long double res;
@@ -30,7 +30,7 @@ __ctan (__complex__ double x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_ns (__imag__ x))
+ if (isinf (__imag__ x))
{
if (isfinite (__real__ x) && fabs (__real__ x) > 1.0)
{
@@ -51,7 +51,7 @@ __ctan (__complex__ double x)
__real__ res = __nan ("");
__imag__ res = __nan ("");
- if (__isinf_ns (__real__ x))
+ if (isinf (__real__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -30,7 +30,7 @@ __ctanf (__complex__ float x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_nsf (__imag__ x))
+ if (isinf (__imag__ x))
{
if (isfinite (__real__ x) && fabsf (__real__ x) > 1.0f)
{
@@ -51,7 +51,7 @@ __ctanf (__complex__ float x)
__real__ res = __nanf ("");
__imag__ res = __nanf ("");
- if (__isinf_nsf (__real__ x))
+ if (isinf (__real__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -30,7 +30,7 @@ __ctanh (__complex__ double x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_ns (__real__ x))
+ if (isinf (__real__ x))
{
__real__ res = __copysign (1.0, __real__ x);
if (isfinite (__imag__ x) && fabs (__imag__ x) > 1.0)
@@ -51,7 +51,7 @@ __ctanh (__complex__ double x)
__real__ res = __nan ("");
__imag__ res = __nan ("");
- if (__isinf_ns (__imag__ x))
+ if (isinf (__imag__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -30,7 +30,7 @@ __ctanhf (__complex__ float x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_nsf (__real__ x))
+ if (isinf (__real__ x))
{
__real__ res = __copysignf (1.0, __real__ x);
if (isfinite (__imag__ x) && fabsf (__imag__ x) > 1.0f)
@@ -51,7 +51,7 @@ __ctanhf (__complex__ float x)
__real__ res = __nanf ("");
__imag__ res = __nanf ("");
- if (__isinf_nsf (__imag__ x))
+ if (isinf (__imag__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -37,7 +37,7 @@ __ctanhl (__complex__ long double x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_nsl (__real__ x))
+ if (isinf (__real__ x))
{
__real__ res = __copysignl (1.0, __real__ x);
if (isfinite (__imag__ x) && fabsl (__imag__ x) > 1.0L)
@@ -58,7 +58,7 @@ __ctanhl (__complex__ long double x)
__real__ res = __nanl ("");
__imag__ res = __nanl ("");
- if (__isinf_nsl (__imag__ x))
+ if (isinf (__imag__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -37,7 +37,7 @@ __ctanl (__complex__ long double x)
if (__glibc_unlikely (!isfinite (__real__ x) || !isfinite (__imag__ x)))
{
- if (__isinf_nsl (__imag__ x))
+ if (isinf (__imag__ x))
{
if (isfinite (__real__ x) && fabsl (__real__ x) > 1.0L)
{
@@ -58,7 +58,7 @@ __ctanl (__complex__ long double x)
__real__ res = __nanl ("");
__imag__ res = __nanl ("");
- if (__isinf_nsl (__real__ x))
+ if (isinf (__real__ x))
feraiseexcept (FE_INVALID);
}
}
@@ -23,7 +23,7 @@
double
__fmod (double x, double y)
{
- if (__builtin_expect (__isinf_ns (x) || y == 0.0, 0)
+ if (__builtin_expect (isinf (x) || y == 0.0, 0)
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
/* fmod(+-Inf,y) or fmod(x,0) */
return __kernel_standard (x, y, 27);
@@ -23,7 +23,7 @@
float
__fmodf (float x, float y)
{
- if (__builtin_expect (__isinf_nsf (x) || y == 0.0f, 0)
+ if (__builtin_expect (isinf (x) || y == 0.0f, 0)
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
/* fmod(+-Inf,y) or fmod(x,0) */
return __kernel_standard_f (x, y, 127);
@@ -23,7 +23,7 @@
long double
__fmodl (long double x, long double y)
{
- if (__builtin_expect (__isinf_nsl (x) || y == 0.0L, 0)
+ if (__builtin_expect (isinf (x) || y == 0.0L, 0)
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
/* fmod(+-Inf,y) or fmod(x,0) */
return __kernel_standard_l (x, y, 227);
@@ -25,7 +25,7 @@ double
__remainder (double x, double y)
{
if (((__builtin_expect (y == 0.0, 0) && ! isnan (x))
- || (__builtin_expect (__isinf_ns (x), 0) && ! isnan (y)))
+ || (__builtin_expect (isinf (x), 0) && ! isnan (y)))
&& _LIB_VERSION != _IEEE_)
return __kernel_standard (x, y, 28); /* remainder domain */
@@ -25,7 +25,7 @@ float
__remainderf (float x, float y)
{
if (((__builtin_expect (y == 0.0f, 0) && ! isnan (x))
- || (__builtin_expect (__isinf_nsf (x), 0) && ! isnan (y)))
+ || (__builtin_expect (isinf (x), 0) && ! isnan (y)))
&& _LIB_VERSION != _IEEE_)
return __kernel_standard_f (x, y, 128); /* remainder domain */
@@ -25,7 +25,7 @@ long double
__remainderl (long double x, long double y)
{
if (((__builtin_expect (y == 0.0L, 0) && ! isnan (x))
- || (__builtin_expect (__isinf_nsl (x), 0) && ! isnan (y)))
+ || (__builtin_expect (isinf (x), 0) && ! isnan (y)))
&& _LIB_VERSION != _IEEE_)
return __kernel_standard_l (x, y, 228); /* remainder domain */
@@ -58,15 +58,15 @@ __scalb (double x, double fn)
if (!isnan (x) && !isnan (fn))
__set_errno (EDOM);
}
- else if (__isinf_ns (z))
+ else if (isinf (z))
{
- if (!__isinf_ns (x) && !__isinf_ns (fn))
+ if (!isinf (x) && !isinf (fn))
__set_errno (ERANGE);
}
else
{
/* z == 0. */
- if (x != 0.0 && !__isinf_ns (fn))
+ if (x != 0.0 && !isinf (fn))
__set_errno (ERANGE);
}
}
@@ -58,15 +58,15 @@ __scalbf (float x, float fn)
if (!isnan (x) && !isnan (fn))
__set_errno (EDOM);
}
- else if (__isinf_nsf (z))
+ else if (isinf (z))
{
- if (!__isinf_nsf (x) && !__isinf_nsf (fn))
+ if (!isinf (x) && !isinf (fn))
__set_errno (ERANGE);
}
else
{
/* z == 0. */
- if (x != 0.0f && !__isinf_nsf (fn))
+ if (x != 0.0f && !isinf (fn))
__set_errno (ERANGE);
}
}
@@ -58,15 +58,15 @@ __scalbl (long double x, long double fn)
if (!isnan (x) && !isnan (fn))
__set_errno (EDOM);
}
- else if (__isinf_nsl (z))
+ else if (isinf (z))
{
- if (!__isinf_nsl (x) && !__isinf_nsl (fn))
+ if (!isinf (x) && !isinf (fn))
__set_errno (ERANGE);
}
else
{
/* z == 0. */
- if (x != 0.0L && !__isinf_nsl (fn))
+ if (x != 0.0L && !isinf (fn))
__set_errno (ERANGE);
}
}
deleted file mode 100644
@@ -1,20 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>.
- */
-
-/*
- * __isinf_ns(x) returns != 0 if x is ±inf, else 0;
- * no branching!
- */
-
-#include <math.h>
-#include <math_private.h>
-
-#undef __isinf_ns
-int
-__isinf_ns (double x)
-{
- int32_t hx, lx;
- EXTRACT_WORDS (hx, lx, x);
- return !(lx | ((hx & 0x7fffffff) ^ 0x7ff00000));
-}
@@ -37,7 +37,7 @@ __sincos (double x, double *sinx, double *cosx)
{
/* sin(Inf or NaN) is NaN */
*sinx = *cosx = x - x;
- if (__isinf_ns (x))
+ if (isinf (x))
__set_errno (EDOM);
}
else
deleted file mode 100644
@@ -1,36 +0,0 @@
-#ifndef _MATH_PRIVATE_H_
-
-#include_next <math_private.h>
-#include <stdint.h>
-
-#ifndef __isnan
-extern __always_inline int
-__isnan (double d)
-{
- uint64_t di;
- EXTRACT_WORDS64 (di, d);
- return (di & 0x7fffffffffffffffull) > 0x7ff0000000000000ull;
-}
-#endif
-
-#ifndef __isinf_ns
-extern __always_inline int
-__isinf_ns (double d)
-{
- uint64_t di;
- EXTRACT_WORDS64 (di, d);
- return (di & 0x7fffffffffffffffull) == 0x7ff0000000000000ull;
-}
-#endif
-
-#ifndef __finite
-extern __always_inline int
-__finite (double d)
-{
- uint64_t di;
- EXTRACT_WORDS64 (di, d);
- return (di & 0x7fffffffffffffffull) < 0x7ff0000000000000ull;
-}
-#endif
-
-#endif /* _MATH_PRIVATE_H_ */
deleted file mode 100644
@@ -1,20 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>.
- */
-
-/*
- * __isinf_ns(x) returns != 0 if x is ±inf, else 0;
- * no branching!
- */
-
-#include <math.h>
-#include <math_private.h>
-
-#undef __isinf_ns
-int
-__isinf_ns (double x)
-{
- int64_t ix;
- EXTRACT_WORDS64(ix,x);
- return (ix & UINT64_C(0x7fffffffffffffff)) == UINT64_C(0x7ff0000000000000);
-}
@@ -122,7 +122,7 @@ __ieee754_exp2f (float x)
/* Exceptional cases: */
else if (isless (x, himark))
{
- if (__isinf_nsf (x))
+ if (isinf (x))
/* e^-inf == 0, with no error. */
return 0;
else
deleted file mode 100644
@@ -1,35 +0,0 @@
-#ifndef _MATH_PRIVATE_H_
-
-#include_next <math_private.h>
-
-#ifndef __isnanf
-extern __always_inline int
-__isnanf (float d)
-{
- u_int32_t di;
- GET_FLOAT_WORD (di, d);
- return (di & 0x7fffffff) > 0x7f800000;
-}
-#endif
-
-#ifndef __isinf_nsf
-extern __always_inline int
-__isinf_nsf (float d)
-{
- u_int32_t di;
- GET_FLOAT_WORD (di, d);
- return (di & 0x7fffffff) == 0x7f800000;
-}
-#endif
-
-#ifndef __finitef
-extern __always_inline int
-__finitef (float d)
-{
- u_int32_t di;
- GET_FLOAT_WORD (di, d);
- return (di & 0x7fffffff) < 0x7f800000;
-}
-#endif
-
-#endif /* _MATH_PRIVATE_H_ */
deleted file mode 100644
@@ -1,20 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>.
- */
-
-/*
- * __isinf_nsf(x) returns != 0 if x is ±inf, else 0;
- * no branching!
- */
-
-#include <math.h>
-#include <math_private.h>
-
-#undef __isinf_nsf
-int
-__isinf_nsf (float x)
-{
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- return (ix & 0x7fffffff) == 0x7f800000;
-}
deleted file mode 100644
@@ -1,19 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>
- */
-
-/*
- * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
- * no branching!
- */
-
-#include <math.h>
-#include <math_private.h>
-
-int
-__isinf_nsl (long double x)
-{
- int64_t hx,lx;
- GET_LDOUBLE_WORDS64(hx,lx,x);
- return !(lx | ((hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL));
-}
@@ -39,7 +39,7 @@ __sincosl (long double x, long double *sinx, long double *cosx)
{
/* sin(Inf or NaN) is NaN */
*sinx = *cosx = x - x;
- if (__isinf_nsl (x))
+ if (isinf (x))
__set_errno (EDOM);
}
else
deleted file mode 100644
@@ -1,23 +0,0 @@
-/*
- * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
- * no branching!
- * slightly dodgy in relying on signed shift right copying sign bit
- */
-
-#include <math.h>
-#include <math_private.h>
-
-int
-__isinf_nsl (long double x)
-{
- double xhi;
- int64_t hx, mask;
-
- xhi = ldbl_high (x);
- EXTRACT_WORDS64 (hx, xhi);
-
- mask = (hx & 0x7fffffffffffffffLL) ^ 0x7ff0000000000000LL;
- mask |= -mask;
- mask >>= 63;
- return ~mask;
-}
@@ -42,7 +42,7 @@ __sincosl (long double x, long double *sinx, long double *cosx)
{
/* sin(Inf or NaN) is NaN */
*sinx = *cosx = x - x;
- if (__isinf_nsl (x))
+ if (isinf (x))
__set_errno (EDOM);
}
else
deleted file mode 100644
@@ -1,18 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>.
- */
-
-/*
- * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
- */
-
-#include <math.h>
-#include <math_private.h>
-
-int
-__isinf_nsl (long double x)
-{
- int32_t se,hx,lx;
- GET_LDOUBLE_WORDS(se,hx,lx,x);
- return !(((se & 0x7fff) ^ 0x7fff) | lx | (hx & 0x7fffffff));
-}
@@ -42,7 +42,7 @@ __sincosl (long double x, long double *sinx, long double *cosx)
{
/* sin(Inf or NaN) is NaN */
*sinx = *cosx = x - x;
- if (__isinf_nsl (x))
+ if (isinf (x))
__set_errno (EDOM);
}
else