diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2015-06-03 15:36:34 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2015-06-03 15:41:36 +0100 |
commit | d81f90ccd0109de9ed78aeeb8d86e2c6d4600690 (patch) | |
tree | 6dfdc3458a8684e3633e20b8cf37385ee7082840 /math | |
parent | f014e87eff1c9935a8bd9f7b7ab66ff5ef562ee9 (diff) | |
download | glibc-d81f90ccd0109de9ed78aeeb8d86e2c6d4600690.tar.gz glibc-d81f90ccd0109de9ed78aeeb8d86e2c6d4600690.tar.xz glibc-d81f90ccd0109de9ed78aeeb8d86e2c6d4600690.zip |
This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* to use standard C99 macros. This has no effect on generated code.
Diffstat (limited to 'math')
52 files changed, 116 insertions, 116 deletions
diff --git a/math/e_exp10.c b/math/e_exp10.c index d3205d1bbf..ba79906ed3 100644 --- a/math/e_exp10.c +++ b/math/e_exp10.c @@ -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 diff --git a/math/e_exp10l.c b/math/e_exp10l.c index 9425457749..d17366c681 100644 --- a/math/e_exp10l.c +++ b/math/e_exp10l.c @@ -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 diff --git a/math/e_exp2l.c b/math/e_exp2l.c index 9eb7bafadd..8db34ada53 100644 --- a/math/e_exp2l.c +++ b/math/e_exp2l.c @@ -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; diff --git a/math/e_scalb.c b/math/e_scalb.c index 3bafde4f1a..f3dac6f45d 100644 --- a/math/e_scalb.c +++ b/math/e_scalb.c @@ -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; diff --git a/math/e_scalbf.c b/math/e_scalbf.c index 81321e0c90..08e1979a2a 100644 --- a/math/e_scalbf.c +++ b/math/e_scalbf.c @@ -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; diff --git a/math/e_scalbl.c b/math/e_scalbl.c index 41c525d633..695a865c28 100644 --- a/math/e_scalbl.c +++ b/math/e_scalbl.c @@ -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; diff --git a/math/s_ldexp.c b/math/s_ldexp.c index aa68b017f2..d2f9907790 100644 --- a/math/s_ldexp.c +++ b/math/s_ldexp.c @@ -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) diff --git a/math/s_ldexpf.c b/math/s_ldexpf.c index bd946776e2..24054ffa71 100644 --- a/math/s_ldexpf.c +++ b/math/s_ldexpf.c @@ -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) diff --git a/math/s_ldexpl.c b/math/s_ldexpl.c index 1bcc7680b4..7c7809f272 100644 --- a/math/s_ldexpl.c +++ b/math/s_ldexpl.c @@ -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) diff --git a/math/w_atan2.c b/math/w_atan2.c index 0cb69ac891..ea60ffcca4 100644 --- a/math/w_atan2.c +++ b/math/w_atan2.c @@ -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; } diff --git a/math/w_atan2f.c b/math/w_atan2f.c index c83088dfb9..eb7d968377 100644 --- a/math/w_atan2f.c +++ b/math/w_atan2f.c @@ -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; } diff --git a/math/w_atan2l.c b/math/w_atan2l.c index 96b2321621..3048f97b0b 100644 --- a/math/w_atan2l.c +++ b/math/w_atan2l.c @@ -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; } diff --git a/math/w_cosh.c b/math/w_cosh.c index 57010781bf..0771434ec1 100644 --- a/math/w_cosh.c +++ b/math/w_cosh.c @@ -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 */ diff --git a/math/w_coshf.c b/math/w_coshf.c index df1f681205..dc7fb53ba3 100644 --- a/math/w_coshf.c +++ b/math/w_coshf.c @@ -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 */ diff --git a/math/w_coshl.c b/math/w_coshl.c index 9c638e91e0..27f0a4f4c3 100644 --- a/math/w_coshl.c +++ b/math/w_coshl.c @@ -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 */ diff --git a/math/w_exp10.c b/math/w_exp10.c index 66eec80fe1..c994a23af0 100644 --- a/math/w_exp10.c +++ b/math/w_exp10.c @@ -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; } diff --git a/math/w_exp10f.c b/math/w_exp10f.c index 784bae4291..4ab5bc3849 100644 --- a/math/w_exp10f.c +++ b/math/w_exp10f.c @@ -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; } diff --git a/math/w_exp10l.c b/math/w_exp10l.c index 21226aa543..984c663303 100644 --- a/math/w_exp10l.c +++ b/math/w_exp10l.c @@ -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; } diff --git a/math/w_exp2.c b/math/w_exp2.c index 02820be373..ca17f9ea63 100644 --- a/math/w_exp2.c +++ b/math/w_exp2.c @@ -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; } diff --git a/math/w_exp2f.c b/math/w_exp2f.c index 8430fd5702..61cbd6cda1 100644 --- a/math/w_exp2f.c +++ b/math/w_exp2f.c @@ -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; } diff --git a/math/w_exp2l.c b/math/w_exp2l.c index 33861d584a..47aed3cb83 100644 --- a/math/w_exp2l.c +++ b/math/w_exp2l.c @@ -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; } diff --git a/math/w_fmod.c b/math/w_fmod.c index d4b6a94c51..0ee5ee411c 100644 --- a/math/w_fmod.c +++ b/math/w_fmod.c @@ -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); diff --git a/math/w_fmodf.c b/math/w_fmodf.c index de1109d561..ba9b8470f9 100644 --- a/math/w_fmodf.c +++ b/math/w_fmodf.c @@ -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); diff --git a/math/w_fmodl.c b/math/w_fmodl.c index 969cb8a84d..a64af8efab 100644 --- a/math/w_fmodl.c +++ b/math/w_fmodl.c @@ -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); diff --git a/math/w_hypot.c b/math/w_hypot.c index 2c6de28600..7c662c8e40 100644 --- a/math/w_hypot.c +++ b/math/w_hypot.c @@ -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; diff --git a/math/w_hypotf.c b/math/w_hypotf.c index 6042b8802d..0ecacae715 100644 --- a/math/w_hypotf.c +++ b/math/w_hypotf.c @@ -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); diff --git a/math/w_hypotl.c b/math/w_hypotl.c index 2e942cae30..c784fa2c64 100644 --- a/math/w_hypotl.c +++ b/math/w_hypotl.c @@ -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; diff --git a/math/w_jnl.c b/math/w_jnl.c index 0263147b2f..d17b047956 100644 --- a/math/w_jnl.c +++ b/math/w_jnl.c @@ -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); */ diff --git a/math/w_lgamma.c b/math/w_lgamma.c index 17c546059d..a82b5e397c 100644 --- a/math/w_lgamma.c +++ b/math/w_lgamma.c @@ -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 */ diff --git a/math/w_lgamma_r.c b/math/w_lgamma_r.c index 9d00f58ab7..6578b2c76c 100644 --- a/math/w_lgamma_r.c +++ b/math/w_lgamma_r.c @@ -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 */ diff --git a/math/w_lgammaf.c b/math/w_lgammaf.c index f3166dfd33..dac69dd32a 100644 --- a/math/w_lgammaf.c +++ b/math/w_lgammaf.c @@ -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 */ diff --git a/math/w_lgammaf_r.c b/math/w_lgammaf_r.c index 683fe72dc6..d7d2cb8bc1 100644 --- a/math/w_lgammaf_r.c +++ b/math/w_lgammaf_r.c @@ -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 */ diff --git a/math/w_lgammal.c b/math/w_lgammal.c index 1dc7e58622..8abe6a018f 100644 --- a/math/w_lgammal.c +++ b/math/w_lgammal.c @@ -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 */ diff --git a/math/w_lgammal_r.c b/math/w_lgammal_r.c index ec3428486a..7caeb1264f 100644 --- a/math/w_lgammal_r.c +++ b/math/w_lgammal_r.c @@ -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 */ diff --git a/math/w_pow.c b/math/w_pow.c index a13b4b8467..33a45ac611 100644 --- a/math/w_pow.c +++ b/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) diff --git a/math/w_powf.c b/math/w_powf.c index 10abb9f1e7..1fd7412c1e 100644 --- a/math/w_powf.c +++ b/math/w_powf.c @@ -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) diff --git a/math/w_powl.c b/math/w_powl.c index 67bc4eb88b..eef9f75292 100644 --- a/math/w_powl.c +++ b/math/w_powl.c @@ -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) diff --git a/math/w_remainder.c b/math/w_remainder.c index 3ce4151488..9be4dfd50b 100644 --- a/math/w_remainder.c +++ b/math/w_remainder.c @@ -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 */ diff --git a/math/w_remainderf.c b/math/w_remainderf.c index 9bd2e48db1..b207d84824 100644 --- a/math/w_remainderf.c +++ b/math/w_remainderf.c @@ -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 */ diff --git a/math/w_remainderl.c b/math/w_remainderl.c index 77b54b7778..78842af529 100644 --- a/math/w_remainderl.c +++ b/math/w_remainderl.c @@ -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 */ diff --git a/math/w_scalb.c b/math/w_scalb.c index aabc195ea3..09627f4d84 100644 --- a/math/w_scalb.c +++ b/math/w_scalb.c @@ -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)) diff --git a/math/w_scalbf.c b/math/w_scalbf.c index ce37a40b6e..e7b855b6d1 100644 --- a/math/w_scalbf.c +++ b/math/w_scalbf.c @@ -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)) diff --git a/math/w_scalbl.c b/math/w_scalbl.c index aa3c17a04a..5e1e017294 100644 --- a/math/w_scalbl.c +++ b/math/w_scalbl.c @@ -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)) diff --git a/math/w_scalbln.c b/math/w_scalbln.c index f7a7f3f0fa..7f7675c16c 100644 --- a/math/w_scalbln.c +++ b/math/w_scalbln.c @@ -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; diff --git a/math/w_scalblnf.c b/math/w_scalblnf.c index cd0822ac34..235518dfca 100644 --- a/math/w_scalblnf.c +++ b/math/w_scalblnf.c @@ -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; diff --git a/math/w_scalblnl.c b/math/w_scalblnl.c index dd23b4b5ae..2c4980b31c 100644 --- a/math/w_scalblnl.c +++ b/math/w_scalblnl.c @@ -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; diff --git a/math/w_sinh.c b/math/w_sinh.c index 34ad2d8624..51daf2ff35 100644 --- a/math/w_sinh.c +++ b/math/w_sinh.c @@ -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 */ diff --git a/math/w_sinhf.c b/math/w_sinhf.c index 1347e91728..0e530b1600 100644 --- a/math/w_sinhf.c +++ b/math/w_sinhf.c @@ -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 */ diff --git a/math/w_sinhl.c b/math/w_sinhl.c index f801b4dd92..7df7c0614f 100644 --- a/math/w_sinhl.c +++ b/math/w_sinhl.c @@ -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 */ diff --git a/math/w_tgamma.c b/math/w_tgamma.c index 504996e3c2..1ca7765e2c 100644 --- a/math/w_tgamma.c +++ b/math/w_tgamma.c @@ -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 */ diff --git a/math/w_tgammaf.c b/math/w_tgammaf.c index fb15b6aa5c..9ed7660d73 100644 --- a/math/w_tgammaf.c +++ b/math/w_tgammaf.c @@ -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 */ diff --git a/math/w_tgammal.c b/math/w_tgammal.c index 4e2d66ae84..b3a9e4a015 100644 --- a/math/w_tgammal.c +++ b/math/w_tgammal.c @@ -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 */ |