mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* to use standard C99 macros. This has no effect on generated code.
This commit is contained in:
parent
f014e87eff
commit
d81f90ccd0
93
ChangeLog
93
ChangeLog
@ -1,3 +1,96 @@
|
||||
2015-06-03 Wilco Dijkstra <wdijkstr@arm.com>
|
||||
|
||||
* math/e_exp10.c: Replace __isinf*, __isnan*, __finite* and
|
||||
__signbit* with standard C99 macros.
|
||||
* math/e_exp10l.c: Likewise.
|
||||
* math/e_exp2l.c: Likewise.
|
||||
* math/e_scalb.c: Likewise.
|
||||
* math/e_scalbf.c: Likewise.
|
||||
* math/e_scalbl.c: Likewise.
|
||||
* math/s_ldexp.c: Likewise.
|
||||
* math/s_ldexpf.c: Likewise.
|
||||
* math/s_ldexpl.c: Likewise.
|
||||
* math/w_atan2.c: Likewise.
|
||||
* math/w_atan2f.c: Likewise.
|
||||
* math/w_atan2l.c: Likewise.
|
||||
* math/w_cosh.c: Likewise.
|
||||
* math/w_coshf.c: Likewise.
|
||||
* math/w_coshl.c: Likewise.
|
||||
* math/w_exp10.c: Likewise.
|
||||
* math/w_exp10f.c: Likewise.
|
||||
* math/w_exp10l.c: Likewise.
|
||||
* math/w_exp2.c: Likewise.
|
||||
* math/w_exp2f.c: Likewise.
|
||||
* math/w_exp2l.c: Likewise.
|
||||
* math/w_fmod.c: Likewise.
|
||||
* math/w_fmodf.c: Likewise.
|
||||
* math/w_fmodl.c: Likewise.
|
||||
* math/w_hypot.c: Likewise.
|
||||
* math/w_hypotf.c: Likewise.
|
||||
* math/w_hypotl.c: Likewise.
|
||||
* math/w_jnl.c: Likewise.
|
||||
* math/w_lgamma.c: Likewise.
|
||||
* math/w_lgamma_r.c: Likewise.
|
||||
* math/w_lgammaf.c: Likewise.
|
||||
* math/w_lgammaf_r.c: Likewise.
|
||||
* math/w_lgammal.c: Likewise.
|
||||
* math/w_lgammal_r.c: Likewise.
|
||||
* math/w_pow.c: Likewise.
|
||||
* math/w_powf.c: Likewise.
|
||||
* math/w_powl.c: Likewise.
|
||||
* math/w_remainder.c: Likewise.
|
||||
* math/w_remainderf.c: Likewise.
|
||||
* math/w_remainderl.c: Likewise.
|
||||
* math/w_scalb.c: Likewise.
|
||||
* math/w_scalbf.c: Likewise.
|
||||
* math/w_scalbl.c: Likewise.
|
||||
* math/w_scalbln.c: Likewise.
|
||||
* math/w_scalblnf.c: Likewise.
|
||||
* math/w_scalblnl.c: Likewise.
|
||||
* math/w_sinh.c: Likewise.
|
||||
* math/w_sinhf.c: Likewise.
|
||||
* math/w_sinhl.c: Likewise.
|
||||
* math/w_tgamma.c: Likewise.
|
||||
* math/w_tgammaf.c: Likewise.
|
||||
* math/w_tgammal.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_exp10.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_exp2.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_j1.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_jn.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
|
||||
* sysdeps/ieee754/dbl-64/w_exp.c: Likewise.
|
||||
* sysdeps/ieee754/flt-32/e_expf.c: Likewise.
|
||||
* sysdeps/ieee754/flt-32/e_j1f.c: Likewise.
|
||||
* sysdeps/ieee754/flt-32/e_jnf.c: Likewise.
|
||||
* sysdeps/ieee754/flt-32/w_expf.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_exp10l.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_expl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_j0l.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/s_cbrtl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128/w_expl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_acosl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_exp10l.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_expl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_ctanl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/w_expl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-96/e_j1l.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-96/w_expl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-opt/nldbl-finite.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-opt/nldbl-isinf.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-opt/nldbl-isnan.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-opt/nldbl-signbit.c: Likewise.
|
||||
* stdio-common/printf_fp.c: Likewise.
|
||||
* stdio-common/printf_fphex.c: Likewise.
|
||||
* stdio-common/printf_size.c: Likewise.
|
||||
|
||||
2015-06-03 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #18470]
|
||||
|
@ -23,7 +23,7 @@
|
||||
double
|
||||
__ieee754_exp10 (double arg)
|
||||
{
|
||||
if (__finite (arg) && arg < DBL_MIN_10_EXP - DBL_DIG - 10)
|
||||
if (isfinite (arg) && arg < DBL_MIN_10_EXP - DBL_DIG - 10)
|
||||
return DBL_MIN * DBL_MIN;
|
||||
else
|
||||
/* This is a very stupid and inprecise implementation. It'll get
|
||||
|
@ -23,7 +23,7 @@
|
||||
long double
|
||||
__ieee754_exp10l (long double arg)
|
||||
{
|
||||
if (__finitel (arg) && arg < LDBL_MIN_10_EXP - LDBL_DIG - 10)
|
||||
if (isfinite (arg) && arg < LDBL_MIN_10_EXP - LDBL_DIG - 10)
|
||||
return LDBL_MIN * LDBL_MIN;
|
||||
else
|
||||
/* This is a very stupid and inprecise implementation. It'll get
|
||||
|
@ -45,7 +45,7 @@ __ieee754_exp2l (long double x)
|
||||
else
|
||||
{
|
||||
/* Underflow or exact zero. */
|
||||
if (__isinfl (x))
|
||||
if (isinf (x))
|
||||
return 0;
|
||||
else
|
||||
return LDBL_MIN * LDBL_MIN;
|
||||
|
@ -40,11 +40,11 @@ invalid_fn (double x, double fn)
|
||||
double
|
||||
__ieee754_scalb (double x, double fn)
|
||||
{
|
||||
if (__glibc_unlikely (__isnan (x)))
|
||||
if (__glibc_unlikely (isnan (x)))
|
||||
return x * fn;
|
||||
if (__glibc_unlikely (!__finite (fn)))
|
||||
if (__glibc_unlikely (!isfinite (fn)))
|
||||
{
|
||||
if (__isnan (fn) || fn > 0.0)
|
||||
if (isnan (fn) || fn > 0.0)
|
||||
return x * fn;
|
||||
if (x == 0.0)
|
||||
return x;
|
||||
|
@ -40,11 +40,11 @@ invalid_fn (float x, float fn)
|
||||
float
|
||||
__ieee754_scalbf (float x, float fn)
|
||||
{
|
||||
if (__glibc_unlikely (__isnanf (x)))
|
||||
if (__glibc_unlikely (isnan (x)))
|
||||
return x * fn;
|
||||
if (__glibc_unlikely (!__finitef (fn)))
|
||||
if (__glibc_unlikely (!isfinite (fn)))
|
||||
{
|
||||
if (__isnanf (fn) || fn > 0.0f)
|
||||
if (isnan (fn) || fn > 0.0f)
|
||||
return x * fn;
|
||||
if (x == 0.0f)
|
||||
return x;
|
||||
|
@ -40,11 +40,11 @@ invalid_fn (long double x, long double fn)
|
||||
long double
|
||||
__ieee754_scalbl (long double x, long double fn)
|
||||
{
|
||||
if (__glibc_unlikely (__isnanl (x)))
|
||||
if (__glibc_unlikely (isnan (x)))
|
||||
return x * fn;
|
||||
if (__glibc_unlikely (!__finitel (fn)))
|
||||
if (__glibc_unlikely (!isfinite (fn)))
|
||||
{
|
||||
if (__isnanl (fn) || fn > 0.0L)
|
||||
if (isnan (fn) || fn > 0.0L)
|
||||
return x * fn;
|
||||
if (x == 0.0L)
|
||||
return x;
|
||||
|
@ -20,9 +20,9 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
|
||||
|
||||
double __ldexp(double value, int exp)
|
||||
{
|
||||
if(!__finite(value)||value==0.0) return value;
|
||||
if(!isfinite(value)||value==0.0) return value;
|
||||
value = __scalbn(value,exp);
|
||||
if(!__finite(value)||value==0.0) __set_errno (ERANGE);
|
||||
if(!isfinite(value)||value==0.0) __set_errno (ERANGE);
|
||||
return value;
|
||||
}
|
||||
weak_alias (__ldexp, ldexp)
|
||||
|
@ -23,9 +23,9 @@ static char rcsid[] = "$NetBSD: s_ldexpf.c,v 1.3 1995/05/10 20:47:42 jtc Exp $";
|
||||
|
||||
float __ldexpf(float value, int exp)
|
||||
{
|
||||
if(!__finitef(value)||value==(float)0.0) return value;
|
||||
if(!isfinite(value)||value==(float)0.0) return value;
|
||||
value = __scalbnf(value,exp);
|
||||
if(!__finitef(value)||value==(float)0.0) __set_errno (ERANGE);
|
||||
if(!isfinite(value)||value==(float)0.0) __set_errno (ERANGE);
|
||||
return value;
|
||||
}
|
||||
weak_alias (__ldexpf, ldexpf)
|
||||
|
@ -24,9 +24,9 @@ static char rcsid[] = "$NetBSD: $";
|
||||
|
||||
long double __ldexpl(long double value, int exp)
|
||||
{
|
||||
if(!__finitel(value)||value==0.0) return value;
|
||||
if(!isfinite(value)||value==0.0) return value;
|
||||
value = __scalbnl(value,exp);
|
||||
if(!__finitel(value)||value==0.0) __set_errno (ERANGE);
|
||||
if(!isfinite(value)||value==0.0) __set_errno (ERANGE);
|
||||
return value;
|
||||
}
|
||||
weak_alias (__ldexpl, ldexpl)
|
||||
|
@ -34,7 +34,7 @@ __atan2 (double y, double x)
|
||||
return __kernel_standard (y, x, 3); /* atan2(+-0,+-0) */
|
||||
|
||||
z = __ieee754_atan2 (y, x);
|
||||
if (__glibc_unlikely (z == 0.0 && y != 0.0 && __finite (x)))
|
||||
if (__glibc_unlikely (z == 0.0 && y != 0.0 && isfinite (x)))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ __atan2f (float y, float x)
|
||||
return __kernel_standard_f (y, x, 103); /* atan2(+-0,+-0) */
|
||||
|
||||
z = __ieee754_atan2f (y, x);
|
||||
if (__glibc_unlikely (z == 0.0f && y != 0.0f && __finitef (x)))
|
||||
if (__glibc_unlikely (z == 0.0f && y != 0.0f && isfinite (x)))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ __atan2l (long double y, long double x)
|
||||
return __kernel_standard_l (y, x, 203); /* atan2(+-0,+-0) */
|
||||
|
||||
z = __ieee754_atan2l (y, x);
|
||||
if (__glibc_unlikely (z == 0.0L && y != 0.0L && __finitel (x)))
|
||||
if (__glibc_unlikely (z == 0.0L && y != 0.0L && isfinite (x)))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ double
|
||||
__cosh (double x)
|
||||
{
|
||||
double z = __ieee754_cosh (x);
|
||||
if (__builtin_expect (!__finite (z), 0) && __finite (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 5); /* cosh overflow */
|
||||
|
||||
|
@ -25,7 +25,7 @@ float
|
||||
__coshf (float x)
|
||||
{
|
||||
float z = __ieee754_coshf (x);
|
||||
if (__builtin_expect (!__finitef (z), 0) && __finitef (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 105); /* cosh overflow */
|
||||
|
||||
|
@ -26,7 +26,7 @@ long double
|
||||
__coshl (long double x)
|
||||
{
|
||||
long double z = __ieee754_coshl (x);
|
||||
if (__builtin_expect (!__finitel (z), 0) && __finitel (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 205); /* cosh overflow */
|
||||
|
||||
|
@ -28,10 +28,10 @@ double
|
||||
__exp10 (double x)
|
||||
{
|
||||
double z = __ieee754_exp10 (x);
|
||||
if (__builtin_expect (!__finite (z) || z == 0, 0)
|
||||
&& __finite (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */
|
||||
return __kernel_standard (x, x, 46 + !!__signbit (x));
|
||||
return __kernel_standard (x, x, 46 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ float
|
||||
__exp10f (float x)
|
||||
{
|
||||
float z = __ieee754_exp10f (x);
|
||||
if (__builtin_expect (!__finitef (z) || z == 0, 0)
|
||||
&& __finitef (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */
|
||||
return __kernel_standard_f (x, x, 146 + !!__signbitf (x));
|
||||
return __kernel_standard_f (x, x, 146 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ long double
|
||||
__exp10l (long double x)
|
||||
{
|
||||
long double z = __ieee754_exp10l (x);
|
||||
if (__builtin_expect (!__finitel (z) || z == 0, 0)
|
||||
&& __finitel (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */
|
||||
return __kernel_standard_l (x, x, 246 + !!__signbitl (x));
|
||||
return __kernel_standard_l (x, x, 246 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ double
|
||||
__exp2 (double x)
|
||||
{
|
||||
double z = __ieee754_exp2 (x);
|
||||
if (__builtin_expect (!__finite (z) || z == 0, 0)
|
||||
&& __finite (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp2 overflow: 44, exp2 underflow: 45 */
|
||||
return __kernel_standard (x, x, 44 + !!__signbit (x));
|
||||
return __kernel_standard (x, x, 44 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ float
|
||||
__exp2f (float x)
|
||||
{
|
||||
float z = __ieee754_exp2f (x);
|
||||
if (__builtin_expect (!__finitef (z) || z == 0, 0)
|
||||
&& __finitef (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp2 overflow: 144, exp2 underflow: 145 */
|
||||
return __kernel_standard_f (x, x, 144 + !!__signbitf (x));
|
||||
return __kernel_standard_f (x, x, 144 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ long double
|
||||
__exp2l (long double x)
|
||||
{
|
||||
long double z = __ieee754_exp2l (x);
|
||||
if (__builtin_expect (!__finitel (z) || z == 0, 0)
|
||||
&& __finitel (x) && _LIB_VERSION != _IEEE_)
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
/* exp2 overflow: 244, exp2 underflow: 245 */
|
||||
return __kernel_standard_l (x, x, 244 + !!__signbitl (x));
|
||||
return __kernel_standard_l (x, x, 244 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ double
|
||||
__fmod (double x, double y)
|
||||
{
|
||||
if (__builtin_expect (__isinf_ns (x) || y == 0.0, 0)
|
||||
&& _LIB_VERSION != _IEEE_ && !__isnan (y) && !__isnan (x))
|
||||
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
|
||||
/* fmod(+-Inf,y) or fmod(x,0) */
|
||||
return __kernel_standard (x, y, 27);
|
||||
|
||||
|
@ -24,7 +24,7 @@ float
|
||||
__fmodf (float x, float y)
|
||||
{
|
||||
if (__builtin_expect (__isinf_nsf (x) || y == 0.0f, 0)
|
||||
&& _LIB_VERSION != _IEEE_ && !__isnanf (y) && !__isnanf (x))
|
||||
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
|
||||
/* fmod(+-Inf,y) or fmod(x,0) */
|
||||
return __kernel_standard_f (x, y, 127);
|
||||
|
||||
|
@ -24,7 +24,7 @@ long double
|
||||
__fmodl (long double x, long double y)
|
||||
{
|
||||
if (__builtin_expect (__isinf_nsl (x) || y == 0.0L, 0)
|
||||
&& _LIB_VERSION != _IEEE_ && !__isnanl (y) && !__isnanl (x))
|
||||
&& _LIB_VERSION != _IEEE_ && !isnan (y) && !isnan (x))
|
||||
/* fmod(+-Inf,y) or fmod(x,0) */
|
||||
return __kernel_standard_l (x, y, 227);
|
||||
|
||||
|
@ -22,8 +22,8 @@ double
|
||||
__hypot (double x, double y)
|
||||
{
|
||||
double z = __ieee754_hypot(x,y);
|
||||
if(__builtin_expect(!__finite(z), 0)
|
||||
&& __finite(x) && __finite(y) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(z), 0)
|
||||
&& isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard(x, y, 4); /* hypot overflow */
|
||||
|
||||
return z;
|
||||
|
@ -25,8 +25,8 @@ float
|
||||
__hypotf(float x, float y)
|
||||
{
|
||||
float z = __ieee754_hypotf(x,y);
|
||||
if(__builtin_expect(!__finitef(z), 0)
|
||||
&& __finitef(x) && __finitef(y) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(z), 0)
|
||||
&& isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_)
|
||||
/* hypot overflow */
|
||||
return __kernel_standard_f(x, y, 104);
|
||||
|
||||
|
@ -27,8 +27,8 @@ __hypotl(long double x, long double y)
|
||||
{
|
||||
long double z;
|
||||
z = __ieee754_hypotl(x,y);
|
||||
if(__builtin_expect(!__finitel(z), 0)
|
||||
&& __finitel(x) && __finitel(y) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(z), 0)
|
||||
&& isfinite(x) && isfinite(y) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l(x, y, 204); /* hypot overflow */
|
||||
|
||||
return z;
|
||||
|
@ -56,7 +56,7 @@ long double __jnl(int n, long double x) /* wrapper jnl */
|
||||
z = __ieee754_jnl(n,x);
|
||||
if (_LIB_VERSION == _IEEE_
|
||||
|| _LIB_VERSION == _POSIX_
|
||||
|| __isnanl(x))
|
||||
|| isnan(x))
|
||||
return z;
|
||||
if(fabsl(x)>X_TLOSS) {
|
||||
return __kernel_standard_l((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
|
||||
@ -73,7 +73,7 @@ long double __ynl(int n, long double x) /* wrapper ynl */
|
||||
#else
|
||||
long double z;
|
||||
z = __ieee754_ynl(n,x);
|
||||
if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
|
||||
if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
|
||||
if(x <= 0.0){
|
||||
if(x==0.0)
|
||||
/* d= -one/(x-x); */
|
||||
|
@ -29,8 +29,8 @@ __lgamma(double x)
|
||||
global variable. */
|
||||
? &signgam
|
||||
: &local_signgam);
|
||||
if(__builtin_expect(!__finite(y), 0)
|
||||
&& __finite(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard(x, x,
|
||||
__floor(x)==x&&x<=0.0
|
||||
? 15 /* lgamma pole */
|
||||
|
@ -22,8 +22,8 @@ double
|
||||
__lgamma_r(double x, int *signgamp)
|
||||
{
|
||||
double y = __ieee754_lgamma_r(x,signgamp);
|
||||
if(__builtin_expect(!__finite(y), 0)
|
||||
&& __finite(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard(x, x,
|
||||
__floor(x)==x&&x<=0.0
|
||||
? 15 /* lgamma pole */
|
||||
|
@ -26,8 +26,8 @@ __lgammaf(float x)
|
||||
global variable. */
|
||||
? &signgam
|
||||
: &local_signgam);
|
||||
if(__builtin_expect(!__finitef(y), 0)
|
||||
&& __finitef(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f(x, x,
|
||||
__floorf(x)==x&&x<=0.0f
|
||||
? 115 /* lgamma pole */
|
||||
|
@ -25,8 +25,8 @@ float
|
||||
__lgammaf_r(float x, int *signgamp)
|
||||
{
|
||||
float y = __ieee754_lgammaf_r(x,signgamp);
|
||||
if(__builtin_expect(!__finitef(y), 0)
|
||||
&& __finitef(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f(x, x,
|
||||
__floorf(x)==x&&x<=0.0f
|
||||
? 115 /* lgamma pole */
|
||||
|
@ -33,8 +33,8 @@ __lgammal(long double x)
|
||||
global variable. */
|
||||
? &signgam
|
||||
: &local_signgam);
|
||||
if(__builtin_expect(!__finitel(y), 0)
|
||||
&& __finitel(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l(x, x,
|
||||
__floorl(x)==x&&x<=0.0L
|
||||
? 215 /* lgamma pole */
|
||||
|
@ -26,8 +26,8 @@ long double
|
||||
__lgammal_r(long double x, int *signgamp)
|
||||
{
|
||||
long double y = __ieee754_lgammal_r(x,signgamp);
|
||||
if(__builtin_expect(!__finitel(y), 0)
|
||||
&& __finitel(x) && _LIB_VERSION != _IEEE_)
|
||||
if(__builtin_expect(!isfinite(y), 0)
|
||||
&& isfinite(x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard(x, x,
|
||||
__floorl(x)==x&&x<=0.0
|
||||
? 215 /* lgamma pole */
|
||||
|
10
math/w_pow.c
10
math/w_pow.c
@ -25,19 +25,19 @@ double
|
||||
__pow (double x, double y)
|
||||
{
|
||||
double z = __ieee754_pow (x, y);
|
||||
if (__glibc_unlikely (!__finite (z)))
|
||||
if (__glibc_unlikely (!isfinite (z)))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (__isnan (x))
|
||||
if (isnan (x))
|
||||
{
|
||||
if (y == 0.0)
|
||||
/* pow(NaN,0.0) */
|
||||
return __kernel_standard (x, y, 42);
|
||||
}
|
||||
else if (__finite (x) && __finite (y))
|
||||
else if (isfinite (x) && isfinite (y))
|
||||
{
|
||||
if (__isnan (z))
|
||||
if (isnan (z))
|
||||
/* pow neg**non-int */
|
||||
return __kernel_standard (x, y, 24);
|
||||
else if (x == 0.0 && y < 0.0)
|
||||
@ -55,7 +55,7 @@ __pow (double x, double y)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (__builtin_expect (z == 0.0, 0) && __finite (x) && __finite (y)
|
||||
else if (__builtin_expect (z == 0.0, 0) && isfinite (x) && isfinite (y)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0)
|
||||
|
@ -25,19 +25,19 @@ float
|
||||
__powf (float x, float y)
|
||||
{
|
||||
float z = __ieee754_powf (x, y);
|
||||
if (__glibc_unlikely (!__finitef (z)))
|
||||
if (__glibc_unlikely (!isfinite (z)))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (__isnanf (x))
|
||||
if (isnan (x))
|
||||
{
|
||||
if (y == 0.0f)
|
||||
/* pow(NaN,0.0) */
|
||||
return __kernel_standard_f (x, y, 142);
|
||||
}
|
||||
else if (__finitef (x) && __finitef (y))
|
||||
else if (isfinite (x) && isfinite (y))
|
||||
{
|
||||
if (__isnanf (z))
|
||||
if (isnan (z))
|
||||
/* pow neg**non-int */
|
||||
return __kernel_standard_f (x, y, 124);
|
||||
else if (x == 0.0f && y < 0.0f)
|
||||
@ -55,7 +55,7 @@ __powf (float x, float y)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (__builtin_expect (z == 0.0f, 0) && __finitef (x) && __finitef (y)
|
||||
else if (__builtin_expect (z == 0.0f, 0) && isfinite (x) && isfinite (y)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0f)
|
||||
|
@ -25,19 +25,19 @@ long double
|
||||
__powl (long double x, long double y)
|
||||
{
|
||||
long double z = __ieee754_powl (x, y);
|
||||
if (__glibc_unlikely (!__finitel (z)))
|
||||
if (__glibc_unlikely (!isfinite (z)))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (__isnanl (x))
|
||||
if (isnan (x))
|
||||
{
|
||||
if (y == 0.0L)
|
||||
/* pow(NaN,0.0) */
|
||||
return __kernel_standard_l (x, y, 242);
|
||||
}
|
||||
else if (__finitel (x) && __finitel (y))
|
||||
else if (isfinite (x) && isfinite (y))
|
||||
{
|
||||
if (__isnanl (z))
|
||||
if (isnan (z))
|
||||
/* pow neg**non-int */
|
||||
return __kernel_standard_l (x, y, 224);
|
||||
else if (x == 0.0L && y < 0.0L)
|
||||
@ -55,7 +55,7 @@ __powl (long double x, long double y)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (__builtin_expect (z == 0.0L, 0) && __finitel (x) && __finitel (y)
|
||||
else if (__builtin_expect (z == 0.0L, 0) && isfinite (x) && isfinite (y)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0L)
|
||||
|
@ -24,8 +24,8 @@
|
||||
double
|
||||
__remainder (double x, double y)
|
||||
{
|
||||
if (((__builtin_expect (y == 0.0, 0) && ! __isnan (x))
|
||||
|| (__builtin_expect (__isinf_ns (x), 0) && ! __isnan (y)))
|
||||
if (((__builtin_expect (y == 0.0, 0) && ! isnan (x))
|
||||
|| (__builtin_expect (__isinf_ns (x), 0) && ! isnan (y)))
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, y, 28); /* remainder domain */
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
float
|
||||
__remainderf (float x, float y)
|
||||
{
|
||||
if (((__builtin_expect (y == 0.0f, 0) && ! __isnanf (x))
|
||||
|| (__builtin_expect (__isinf_nsf (x), 0) && ! __isnanf (y)))
|
||||
if (((__builtin_expect (y == 0.0f, 0) && ! isnan (x))
|
||||
|| (__builtin_expect (__isinf_nsf (x), 0) && ! isnan (y)))
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, y, 128); /* remainder domain */
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
long double
|
||||
__remainderl (long double x, long double y)
|
||||
{
|
||||
if (((__builtin_expect (y == 0.0L, 0) && ! __isnanl (x))
|
||||
|| (__builtin_expect (__isinf_nsl (x), 0) && ! __isnanl (y)))
|
||||
if (((__builtin_expect (y == 0.0L, 0) && ! isnan (x))
|
||||
|| (__builtin_expect (__isinf_nsl (x), 0) && ! isnan (y)))
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, y, 228); /* remainder domain */
|
||||
|
||||
|
@ -27,9 +27,9 @@ sysv_scalb (double x, double fn)
|
||||
{
|
||||
double z = __ieee754_scalb (x, fn);
|
||||
|
||||
if (__glibc_unlikely (__isinf (z)))
|
||||
if (__glibc_unlikely (isinf (z)))
|
||||
{
|
||||
if (__finite (x))
|
||||
if (isfinite (x))
|
||||
return __kernel_standard (x, fn, 32); /* scalb overflow */
|
||||
else
|
||||
__set_errno (ERANGE);
|
||||
@ -51,11 +51,11 @@ __scalb (double x, double fn)
|
||||
{
|
||||
double z = __ieee754_scalb (x, fn);
|
||||
|
||||
if (__glibc_unlikely (!__finite (z) || z == 0.0))
|
||||
if (__glibc_unlikely (!isfinite (z) || z == 0.0))
|
||||
{
|
||||
if (__isnan (z))
|
||||
if (isnan (z))
|
||||
{
|
||||
if (!__isnan (x) && !__isnan (fn))
|
||||
if (!isnan (x) && !isnan (fn))
|
||||
__set_errno (EDOM);
|
||||
}
|
||||
else if (__isinf_ns (z))
|
||||
|
@ -27,9 +27,9 @@ sysv_scalbf (float x, float fn)
|
||||
{
|
||||
float z = __ieee754_scalbf (x, fn);
|
||||
|
||||
if (__glibc_unlikely (__isinff (z)))
|
||||
if (__glibc_unlikely (isinf (z)))
|
||||
{
|
||||
if (__finitef (x))
|
||||
if (isfinite (x))
|
||||
return __kernel_standard_f (x, fn, 132); /* scalb overflow */
|
||||
else
|
||||
__set_errno (ERANGE);
|
||||
@ -51,11 +51,11 @@ __scalbf (float x, float fn)
|
||||
{
|
||||
float z = __ieee754_scalbf (x, fn);
|
||||
|
||||
if (__glibc_unlikely (!__finitef (z) || z == 0.0f))
|
||||
if (__glibc_unlikely (!isfinite (z) || z == 0.0f))
|
||||
{
|
||||
if (__isnanf (z))
|
||||
if (isnan (z))
|
||||
{
|
||||
if (!__isnanf (x) && !__isnanf (fn))
|
||||
if (!isnan (x) && !isnan (fn))
|
||||
__set_errno (EDOM);
|
||||
}
|
||||
else if (__isinf_nsf (z))
|
||||
|
@ -27,9 +27,9 @@ sysv_scalbl (long double x, long double fn)
|
||||
{
|
||||
long double z = __ieee754_scalbl (x, fn);
|
||||
|
||||
if (__glibc_unlikely (__isinfl (z)))
|
||||
if (__glibc_unlikely (isinf (z)))
|
||||
{
|
||||
if (__finitel (x))
|
||||
if (isfinite (x))
|
||||
return __kernel_standard_l (x, fn, 232); /* scalb overflow */
|
||||
else
|
||||
__set_errno (ERANGE);
|
||||
@ -51,11 +51,11 @@ __scalbl (long double x, long double fn)
|
||||
{
|
||||
long double z = __ieee754_scalbl (x, fn);
|
||||
|
||||
if (__glibc_unlikely (!__finitel (z) || z == 0.0L))
|
||||
if (__glibc_unlikely (!isfinite (z) || z == 0.0L))
|
||||
{
|
||||
if (__isnanl (z))
|
||||
if (isnan (z))
|
||||
{
|
||||
if (!__isnanl (x) && !__isnanl (fn))
|
||||
if (!isnan (x) && !isnan (fn))
|
||||
__set_errno (EDOM);
|
||||
}
|
||||
else if (__isinf_nsl (z))
|
||||
|
@ -23,12 +23,12 @@
|
||||
double
|
||||
__w_scalbln (double x, long int n)
|
||||
{
|
||||
if (!__finite (x) || x == 0.0)
|
||||
if (!isfinite (x) || x == 0.0)
|
||||
return x;
|
||||
|
||||
x = __scalbln (x, n);
|
||||
|
||||
if (!__finite (x) || x == 0.0)
|
||||
if (!isfinite (x) || x == 0.0)
|
||||
__set_errno (ERANGE);
|
||||
|
||||
return x;
|
||||
|
@ -23,12 +23,12 @@
|
||||
float
|
||||
__w_scalblnf (float x, long int n)
|
||||
{
|
||||
if (!__finitef (x) || x == 0.0f)
|
||||
if (!isfinite (x) || x == 0.0f)
|
||||
return x;
|
||||
|
||||
x = __scalblnf (x, n);
|
||||
|
||||
if (!__finitef (x) || x == 0.0f)
|
||||
if (!isfinite (x) || x == 0.0f)
|
||||
__set_errno (ERANGE);
|
||||
|
||||
return x;
|
||||
|
@ -23,12 +23,12 @@
|
||||
long double
|
||||
__w_scalblnl (long double x, long int n)
|
||||
{
|
||||
if (!__finitel (x) || x == 0.0L)
|
||||
if (!isfinite (x) || x == 0.0L)
|
||||
return x;
|
||||
|
||||
x = __scalblnl (x, n);
|
||||
|
||||
if (!__finitel (x) || x == 0.0L)
|
||||
if (!isfinite (x) || x == 0.0L)
|
||||
__set_errno (ERANGE);
|
||||
|
||||
return x;
|
||||
|
@ -21,7 +21,7 @@ double
|
||||
__sinh (double x)
|
||||
{
|
||||
double z = __ieee754_sinh (x);
|
||||
if (__builtin_expect (!__finite (z), 0) && __finite (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 25); /* sinh overflow */
|
||||
|
||||
|
@ -24,7 +24,7 @@ float
|
||||
__sinhf (float x)
|
||||
{
|
||||
float z = __ieee754_sinhf (x);
|
||||
if (__builtin_expect (!__finitef (z), 0) && __finitef (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 125); /* sinhf overflow */
|
||||
|
||||
|
@ -25,7 +25,7 @@ long double
|
||||
__sinhl (long double x)
|
||||
{
|
||||
long double z = __ieee754_sinhl (x);
|
||||
if (__builtin_expect (!__finitel (z), 0) && __finitel (x)
|
||||
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 225); /* sinh overflow */
|
||||
|
||||
|
@ -25,8 +25,8 @@ __tgamma(double x)
|
||||
int local_signgam;
|
||||
double y = __ieee754_gamma_r(x,&local_signgam);
|
||||
|
||||
if(__glibc_unlikely (!__finite (y) || y == 0)
|
||||
&& (__finite (x) || __isinf (x) < 0)
|
||||
if(__glibc_unlikely (!isfinite (y) || y == 0)
|
||||
&& (isfinite (x) || isinf (x) < 0)
|
||||
&& _LIB_VERSION != _IEEE_) {
|
||||
if (x == 0.0)
|
||||
return __kernel_standard(x,x,50); /* tgamma pole */
|
||||
|
@ -23,8 +23,8 @@ __tgammaf(float x)
|
||||
int local_signgam;
|
||||
float y = __ieee754_gammaf_r(x,&local_signgam);
|
||||
|
||||
if(__glibc_unlikely (!__finitef (y) || y == 0)
|
||||
&& (__finitef (x) || __isinff (x) < 0)
|
||||
if(__glibc_unlikely (!isfinite (y) || y == 0)
|
||||
&& (isfinite (x) || isinf (x) < 0)
|
||||
&& _LIB_VERSION != _IEEE_) {
|
||||
if (x == (float)0.0)
|
||||
/* tgammaf pole */
|
||||
|
@ -28,8 +28,8 @@ __tgammal(long double x)
|
||||
int local_signgam;
|
||||
long double y = __ieee754_gammal_r(x,&local_signgam);
|
||||
|
||||
if(__glibc_unlikely (!__finitel (y) || y == 0)
|
||||
&& (__finitel (x) || __isinfl (x) < 0)
|
||||
if(__glibc_unlikely (!isfinite (y) || y == 0)
|
||||
&& (isfinite (x) || isinf (x) < 0)
|
||||
&& _LIB_VERSION != _IEEE_) {
|
||||
if(x==0.0)
|
||||
return __kernel_standard_l(x,x,250); /* tgamma pole */
|
||||
|
@ -333,7 +333,7 @@ ___printf_fp (FILE *fp,
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
int res;
|
||||
if (__isnanl (fpnum.ldbl))
|
||||
if (isnan (fpnum.ldbl))
|
||||
{
|
||||
is_neg = signbit (fpnum.ldbl);
|
||||
if (isupper (info->spec))
|
||||
@ -378,7 +378,7 @@ ___printf_fp (FILE *fp,
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
int res;
|
||||
if (__isnan (fpnum.dbl))
|
||||
if (isnan (fpnum.dbl))
|
||||
{
|
||||
union ieee754_double u = { .d = fpnum.dbl };
|
||||
is_neg = u.ieee.negative != 0;
|
||||
|
@ -165,7 +165,7 @@ __printf_fphex (FILE *fp,
|
||||
fpnum.ldbl = *(const long double *) args[0];
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
if (__isnanl (fpnum.ldbl))
|
||||
if (isnan (fpnum.ldbl))
|
||||
{
|
||||
if (isupper (info->spec))
|
||||
{
|
||||
@ -202,7 +202,7 @@ __printf_fphex (FILE *fp,
|
||||
fpnum.dbl.d = *(const double *) args[0];
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
if (__isnan (fpnum.dbl.d))
|
||||
if (isnan (fpnum.dbl.d))
|
||||
{
|
||||
negative = fpnum.dbl.ieee.negative != 0;
|
||||
if (isupper (info->spec))
|
||||
|
@ -126,7 +126,7 @@ __printf_size (FILE *fp, const struct printf_info *info,
|
||||
fpnum.ldbl = *(const long double *) args[0];
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
if (__isnanl (fpnum.ldbl))
|
||||
if (isnan (fpnum.ldbl))
|
||||
{
|
||||
special = "nan";
|
||||
wspecial = L"nan";
|
||||
@ -151,7 +151,7 @@ __printf_size (FILE *fp, const struct printf_info *info,
|
||||
fpnum.dbl.d = *(const double *) args[0];
|
||||
|
||||
/* Check for special values: not a number or infinity. */
|
||||
if (__isnan (fpnum.dbl.d))
|
||||
if (isnan (fpnum.dbl.d))
|
||||
{
|
||||
special = "nan";
|
||||
wspecial = L"nan";
|
||||
|
@ -217,7 +217,7 @@ __ieee754_exp (double x)
|
||||
retval = res * binexp.x * t256.x;
|
||||
else
|
||||
retval = __slowexp (x);
|
||||
if (__isinf (retval))
|
||||
if (isinf (retval))
|
||||
goto ret_huge;
|
||||
else
|
||||
goto ret;
|
||||
|
@ -29,7 +29,7 @@ __ieee754_exp10 (double arg)
|
||||
double arg_high, arg_low;
|
||||
double exp_high, exp_low;
|
||||
|
||||
if (!__finite (arg))
|
||||
if (!isfinite (arg))
|
||||
return __ieee754_exp (arg);
|
||||
if (arg < DBL_MIN_10_EXP - DBL_DIG - 10)
|
||||
return DBL_MIN * DBL_MIN;
|
||||
|
@ -48,7 +48,7 @@ __ieee754_exp2 (double x)
|
||||
/* Exceptional cases: */
|
||||
if (__glibc_unlikely (!isgreaterequal (x, lomark)))
|
||||
{
|
||||
if (__isinf (x))
|
||||
if (isinf (x))
|
||||
/* e^-inf == 0, with no error. */
|
||||
return 0;
|
||||
else
|
||||
|
@ -207,7 +207,7 @@ __ieee754_y1 (double x)
|
||||
if (__glibc_unlikely (ix <= 0x3c900000)) /* x < 2**-54 */
|
||||
{
|
||||
z = -tpi / x;
|
||||
if (__isinf (z))
|
||||
if (isinf (z))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ __ieee754_yn (int n, double x)
|
||||
a = temp;
|
||||
}
|
||||
/* If B is +-Inf, set up errno accordingly. */
|
||||
if (!__finite (b))
|
||||
if (!isfinite (b))
|
||||
__set_errno (ERANGE);
|
||||
}
|
||||
if (sign > 0)
|
||||
@ -328,7 +328,7 @@ __ieee754_yn (int n, double x)
|
||||
ret = -b;
|
||||
}
|
||||
out:
|
||||
if (__isinf (ret))
|
||||
if (isinf (ret))
|
||||
ret = __copysign (DBL_MAX, ret) * DBL_MAX;
|
||||
return ret;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ __ieee754_pow (double x, double y)
|
||||
retval = (t > 0) ? t : power1 (x, y);
|
||||
}
|
||||
|
||||
if (__isinf (retval))
|
||||
if (isinf (retval))
|
||||
retval = huge * huge;
|
||||
else if (retval == 0)
|
||||
retval = tiny * tiny;
|
||||
@ -180,7 +180,7 @@ __ieee754_pow (double x, double y)
|
||||
SET_RESTORE_ROUND (FE_TONEAREST);
|
||||
retval = -__ieee754_pow (-x, y);
|
||||
}
|
||||
if (__isinf (retval))
|
||||
if (isinf (retval))
|
||||
retval = -huge * huge;
|
||||
else if (retval == 0)
|
||||
retval = -tiny * tiny;
|
||||
|
@ -24,9 +24,9 @@ double
|
||||
__exp (double x)
|
||||
{
|
||||
double z = __ieee754_exp (x);
|
||||
if (__builtin_expect (!__finite (z) || z == 0, 0)
|
||||
&& __finite (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 6 + !!__signbit (x));
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 6 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ __ieee754_expf (float x)
|
||||
/* Exceptional cases: */
|
||||
else if (isless (x, himark))
|
||||
{
|
||||
if (__isinff (x))
|
||||
if (isinf (x))
|
||||
/* e^-inf == 0, with no error. */
|
||||
return 0;
|
||||
else
|
||||
|
@ -137,7 +137,7 @@ __ieee754_y1f(float x)
|
||||
}
|
||||
if(__builtin_expect(ix<=0x33000000, 0)) { /* x < 2**-25 */
|
||||
z = -tpi / x;
|
||||
if (__isinff (z))
|
||||
if (isinf (z))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -208,12 +208,12 @@ __ieee754_ynf(int n, float x)
|
||||
a = temp;
|
||||
}
|
||||
/* If B is +-Inf, set up errno accordingly. */
|
||||
if (! __finitef (b))
|
||||
if (! isfinite (b))
|
||||
__set_errno (ERANGE);
|
||||
if(sign>0) ret = b; else ret = -b;
|
||||
}
|
||||
out:
|
||||
if (__isinff (ret))
|
||||
if (isinf (ret))
|
||||
ret = __copysignf (FLT_MAX, ret) * FLT_MAX;
|
||||
return ret;
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ float
|
||||
__expf (float x)
|
||||
{
|
||||
float z = __ieee754_expf (x);
|
||||
if (__builtin_expect (!__finitef (z) || z == 0, 0)
|
||||
&& __finitef (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 106 + !!__signbitf (x));
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 106 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ __ieee754_exp10l (long double arg)
|
||||
long double arg_high, arg_low;
|
||||
long double exp_high, exp_low;
|
||||
|
||||
if (!__finitel (arg))
|
||||
if (!isfinite (arg))
|
||||
return __ieee754_expl (arg);
|
||||
if (arg < LDBL_MIN_10_EXP - LDBL_DIG - 10)
|
||||
return LDBL_MIN * LDBL_MIN;
|
||||
|
@ -235,7 +235,7 @@ __ieee754_expl (long double x)
|
||||
/* Exceptional cases: */
|
||||
else if (isless (x, himark))
|
||||
{
|
||||
if (__isinfl (x))
|
||||
if (isinf (x))
|
||||
/* e^-inf == 0, with no error. */
|
||||
return 0;
|
||||
else
|
||||
|
@ -680,7 +680,7 @@ __ieee754_j0l (long double x)
|
||||
{
|
||||
long double xx, xinv, z, p, q, c, s, cc, ss;
|
||||
|
||||
if (! __finitel (x))
|
||||
if (! isfinite (x))
|
||||
{
|
||||
if (x != x)
|
||||
return x;
|
||||
@ -826,7 +826,7 @@ long double
|
||||
{
|
||||
long double xx, xinv, z, p, q, c, s, cc, ss;
|
||||
|
||||
if (! __finitel (x))
|
||||
if (! isfinite (x))
|
||||
{
|
||||
if (x != x)
|
||||
return x;
|
||||
|
@ -687,7 +687,7 @@ __ieee754_j1l (long double x)
|
||||
{
|
||||
long double xx, xinv, z, p, q, c, s, cc, ss;
|
||||
|
||||
if (! __finitel (x))
|
||||
if (! isfinite (x))
|
||||
{
|
||||
if (x != x)
|
||||
return x;
|
||||
@ -838,7 +838,7 @@ __ieee754_y1l (long double x)
|
||||
{
|
||||
long double xx, xinv, z, p, q, c, s, cc, ss;
|
||||
|
||||
if (! __finitel (x))
|
||||
if (! isfinite (x))
|
||||
{
|
||||
if (x != x)
|
||||
return x;
|
||||
@ -855,7 +855,7 @@ __ieee754_y1l (long double x)
|
||||
if (xx <= 0x1p-114)
|
||||
{
|
||||
z = -TWOOPI / x;
|
||||
if (__isinfl (z))
|
||||
if (isinf (z))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ __ieee754_ynl (int n, long double x)
|
||||
}
|
||||
}
|
||||
/* If B is +-Inf, set up errno accordingly. */
|
||||
if (! __finitel (b))
|
||||
if (! isfinite (b))
|
||||
__set_errno (ERANGE);
|
||||
if (sign > 0)
|
||||
ret = b;
|
||||
@ -401,7 +401,7 @@ __ieee754_ynl (int n, long double x)
|
||||
ret = -b;
|
||||
}
|
||||
out:
|
||||
if (__isinfl (ret))
|
||||
if (isinf (ret))
|
||||
ret = __copysignl (LDBL_MAX, ret) * LDBL_MAX;
|
||||
return ret;
|
||||
}
|
||||
|
@ -770,12 +770,12 @@ __ieee754_lgammal_r (long double x, int *signgamp)
|
||||
|
||||
*signgamp = 1;
|
||||
|
||||
if (! __finitel (x))
|
||||
if (! isfinite (x))
|
||||
return x * x;
|
||||
|
||||
if (x == 0.0L)
|
||||
{
|
||||
if (__signbitl (x))
|
||||
if (signbit (x))
|
||||
*signgamp = -1;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ __cbrtl (long double x)
|
||||
int e, rem, sign;
|
||||
long double z;
|
||||
|
||||
if (!__finitel (x))
|
||||
if (!isfinite (x))
|
||||
return x + x;
|
||||
|
||||
if (x == 0)
|
||||
|
@ -31,9 +31,9 @@ long double __expl(long double x) /* wrapper exp */
|
||||
return __ieee754_expl(x);
|
||||
#else
|
||||
long double z = __ieee754_expl (x);
|
||||
if (__glibc_unlikely (!__finitel (z) || z == 0)
|
||||
&& __finitel (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 206 + !!__signbitl (x));
|
||||
if (__glibc_unlikely (!isfinite (z) || z == 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 206 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
#endif
|
||||
|
@ -153,7 +153,7 @@ __ieee754_acosl (long double x)
|
||||
{
|
||||
long double a, z, r, w, p, q, s, t, f2;
|
||||
|
||||
if (__glibc_unlikely (__isnanl (x)))
|
||||
if (__glibc_unlikely (isnan (x)))
|
||||
return x + x;
|
||||
a = __builtin_fabsl (x);
|
||||
if (a == 1.0L)
|
||||
|
@ -135,7 +135,7 @@ __ieee754_asinl (long double x)
|
||||
long double a, t, w, p, q, c, r, s;
|
||||
int flag;
|
||||
|
||||
if (__glibc_unlikely (__isnanl (x)))
|
||||
if (__glibc_unlikely (isnan (x)))
|
||||
return x + x;
|
||||
flag = 0;
|
||||
a = __builtin_fabsl (x);
|
||||
|
@ -29,7 +29,7 @@ __ieee754_exp10l (long double arg)
|
||||
long double arg_high, arg_low;
|
||||
long double exp_high, exp_low;
|
||||
|
||||
if (!__finitel (arg))
|
||||
if (!isfinite (arg))
|
||||
return __ieee754_expl (arg);
|
||||
if (arg < LDBL_MIN_10_EXP - LDBL_DIG - 10)
|
||||
return LDBL_MIN * LDBL_MIN;
|
||||
|
@ -233,7 +233,7 @@ __ieee754_expl (long double x)
|
||||
/* Exceptional cases: */
|
||||
else if (isless (x, himark))
|
||||
{
|
||||
if (__isinfl (x))
|
||||
if (isinf (x))
|
||||
/* e^-inf == 0, with no error. */
|
||||
return 0;
|
||||
else
|
||||
|
@ -395,7 +395,7 @@ __ieee754_ynl (int n, long double x)
|
||||
}
|
||||
}
|
||||
/* If B is +-Inf, set up errno accordingly. */
|
||||
if (! __finitel (b))
|
||||
if (! isfinite (b))
|
||||
__set_errno (ERANGE);
|
||||
if (sign > 0)
|
||||
ret = b;
|
||||
@ -403,7 +403,7 @@ __ieee754_ynl (int n, long double x)
|
||||
ret = -b;
|
||||
}
|
||||
out:
|
||||
if (__isinfl (ret))
|
||||
if (isinf (ret))
|
||||
ret = __copysignl (LDBL_MAX, ret) * LDBL_MAX;
|
||||
return ret;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ __ctanhl (__complex__ long double x)
|
||||
|
||||
if (!isfinite (__real__ x) || !isfinite (__imag__ x))
|
||||
{
|
||||
if (__isinfl (__real__ x))
|
||||
if (isinf (__real__ x))
|
||||
{
|
||||
__real__ res = __copysignl (1.0L, __real__ x);
|
||||
__imag__ res = __copysignl (0.0L, __imag__ x);
|
||||
@ -50,7 +50,7 @@ __ctanhl (__complex__ long double x)
|
||||
__imag__ res = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (__isinfl (__imag__ x))
|
||||
if (isinf (__imag__ x))
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ __ctanl (__complex__ long double x)
|
||||
|
||||
if (!isfinite (__real__ x) || !isfinite (__imag__ x))
|
||||
{
|
||||
if (__isinfl (__imag__ x))
|
||||
if (isinf (__imag__ x))
|
||||
{
|
||||
__real__ res = __copysignl (0.0, __real__ x);
|
||||
__imag__ res = __copysignl (1.0, __imag__ x);
|
||||
|
@ -11,7 +11,7 @@ long double __expl(long double x) /* wrapper exp */
|
||||
z = __ieee754_expl(x);
|
||||
if (_LIB_VERSION == _IEEE_)
|
||||
return z;
|
||||
if (__finitel(x))
|
||||
if (isfinite(x))
|
||||
{
|
||||
if (x >= o_thres)
|
||||
return __kernel_standard_l(x,x,206); /* exp overflow */
|
||||
|
@ -236,7 +236,7 @@ __ieee754_y1l (long double x)
|
||||
if (__glibc_unlikely (ix <= 0x3fbe))
|
||||
{ /* x < 2**-65 */
|
||||
z = -tpi / x;
|
||||
if (__isinfl (z))
|
||||
if (isinf (z))
|
||||
__set_errno (ERANGE);
|
||||
return z;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ __ieee754_ynl (int n, long double x)
|
||||
}
|
||||
}
|
||||
/* If B is +-Inf, set up errno accordingly. */
|
||||
if (! __finitel (b))
|
||||
if (! isfinite (b))
|
||||
__set_errno (ERANGE);
|
||||
if (sign > 0)
|
||||
ret = b;
|
||||
@ -386,7 +386,7 @@ __ieee754_ynl (int n, long double x)
|
||||
ret = -b;
|
||||
}
|
||||
out:
|
||||
if (__isinfl (ret))
|
||||
if (isinf (ret))
|
||||
ret = __copysignl (LDBL_MAX, ret) * LDBL_MAX;
|
||||
return ret;
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ long double
|
||||
__expl (long double x)
|
||||
{
|
||||
long double z = __ieee754_expl (x);
|
||||
if (__builtin_expect (!__finitel (z) || z == 0, 0)
|
||||
&& __finitel (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 206 + !!__signbitl (x));
|
||||
if (__builtin_expect (!isfinite (z) || z == 0, 0)
|
||||
&& isfinite (x) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_l (x, x, 206 + !!signbit (x));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ int
|
||||
attribute_hidden
|
||||
__finitel (double x)
|
||||
{
|
||||
return __finite (x);
|
||||
return finite (x);
|
||||
}
|
||||
extern __typeof (__finitel) finitel attribute_hidden;
|
||||
weak_alias (__finitel, finitel)
|
||||
|
@ -4,7 +4,7 @@ int
|
||||
attribute_hidden
|
||||
__isinfl (double x)
|
||||
{
|
||||
return __isinf (x);
|
||||
return isinf (x);
|
||||
}
|
||||
extern __typeof (__isinfl) isinfl attribute_hidden;
|
||||
weak_alias (__isinfl, isinfl)
|
||||
|
@ -4,7 +4,7 @@ int
|
||||
attribute_hidden
|
||||
__isnanl (double x)
|
||||
{
|
||||
return __isnan (x);
|
||||
return isnan (x);
|
||||
}
|
||||
extern __typeof (__isnanl) isnanl attribute_hidden;
|
||||
weak_alias (__isnanl, isnanl)
|
||||
|
@ -6,5 +6,5 @@ int
|
||||
attribute_hidden
|
||||
__signbitl (double x)
|
||||
{
|
||||
return __signbit (x);
|
||||
return signbit (x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user