diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-09-12 04:39:48 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-09-12 04:39:48 +0000 |
commit | c855a6660ecd379c54a5d20beb4553ff3eeae00f (patch) | |
tree | ab512117d9e6a23f82641d1a4c31936916f96b5a | |
parent | e5188618ac5c222627ac16815336898801afbef2 (diff) |
Per fpclassify(3): isinff(), isnanf(), finite(), and finitef() are deprecated
in favor of isinf(), isnan(), and isfinite().
ok tb@ martynas@
-rw-r--r-- | lib/libm/noieee_src/n_atan2.c | 10 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_erf.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_exp.c | 12 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_expm1.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_floor.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_fmod.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_hypot.c | 16 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_j0.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_j1.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_jn.c | 10 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_lgamma.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_log.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_log1p.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_pow.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_sincos.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_support.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_tan.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_tanh.c | 6 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_tgamma.c | 4 | ||||
-rw-r--r-- | lib/libm/src/b_exp__D.c | 8 | ||||
-rw-r--r-- | lib/libm/src/b_tgamma.c | 4 | ||||
-rw-r--r-- | lib/libm/src/e_scalb.c | 2 | ||||
-rw-r--r-- | lib/libm/src/e_scalbf.c | 4 | ||||
-rw-r--r-- | lib/libm/src/ld128/e_lgammal.c | 4 | ||||
-rw-r--r-- | lib/libm/src/s_roundf.c | 4 |
25 files changed, 81 insertions, 81 deletions
diff --git a/lib/libm/noieee_src/n_atan2.c b/lib/libm/noieee_src/n_atan2.c index e7c39a80c06..27eed2d7022 100644 --- a/lib/libm/noieee_src/n_atan2.c +++ b/lib/libm/noieee_src/n_atan2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_atan2.c,v 1.18 2013/07/15 04:08:26 espie Exp $ */ +/* $OpenBSD: n_atan2.c,v 1.19 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_atan2.c,v 1.1 1995/10/10 23:36:37 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -151,7 +151,7 @@ atan2(double y, double x) signx = copysign(one,x) ; /* if x is 1.0, goto begin */ - if(x==1) { y=copysign(y,one); t=y; if(finite(t)) goto begin;} + if(x==1) { y=copysign(y,one); t=y; if(isfinite(t)) goto begin;} /* when y = 0 */ if(y==zero) return((signx==one)?y:copysign(PI,signy)); @@ -160,14 +160,14 @@ atan2(double y, double x) if(x==zero) return(copysign(PIo2,signy)); /* when x is INF */ - if(!finite(x)) - if(!finite(y)) + if(!isfinite(x)) + if(!isfinite(y)) return(copysign((signx==one)?PIo4:3*PIo4,signy)); else return(copysign((signx==one)?zero:PI,signy)); /* when y is INF */ - if(!finite(y)) return(copysign(PIo2,signy)); + if(!isfinite(y)) return(copysign(PIo2,signy)); /* compute y/x */ x=copysign(x,one); diff --git a/lib/libm/noieee_src/n_erf.c b/lib/libm/noieee_src/n_erf.c index 09995049b61..dcdf10a08e4 100644 --- a/lib/libm/noieee_src/n_erf.c +++ b/lib/libm/noieee_src/n_erf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_erf.c,v 1.7 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_erf.c,v 1.8 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_erf.c,v 1.1 1995/10/10 23:36:43 ragge Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -255,7 +255,7 @@ double erf(double x) { double R, S, P, Q, ax, s, y, z, r; - if(!finite(x)) { /* erf(nan)=nan */ + if(!isfinite(x)) { /* erf(nan)=nan */ if (isnan(x)) return(x); return (x > 0 ? one : -one); /* erf(+/-inf)= +/-1 */ @@ -313,7 +313,7 @@ double erfc(double x) { double R, S, P, Q, s, ax, y, z, r; - if (!finite(x)) { + if (!isfinite(x)) { if (isnan(x)) /* erfc(NaN) = NaN */ return(x); else if (x > 0) /* erfc(+-inf)=0,2 */ diff --git a/lib/libm/noieee_src/n_exp.c b/lib/libm/noieee_src/n_exp.c index b018ff18757..dd0a168daec 100644 --- a/lib/libm/noieee_src/n_exp.c +++ b/lib/libm/noieee_src/n_exp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_exp.c,v 1.10 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_exp.c,v 1.11 2016/09/12 04:39:47 guenther Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ * Required system supported functions: * scalbn(x,n) * copysign(x,y) - * finite(x) + * isfinite(x) * * Method: * 1. Argument Reduction: given the input x, find r and integer k such @@ -115,7 +115,7 @@ exp(double x) else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalbn(1.0,-5000)); + if(isfinite(x)) return(scalbn(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -124,7 +124,7 @@ exp(double x) else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalbn(1.0,5000) : x); + return( isfinite(x) ? scalbn(1.0,5000) : x); } /* returns exp(r = x + c) for |c| < |x| with no overlap. */ @@ -160,7 +160,7 @@ __exp__D(double x, double c) else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalbn(1.0,-5000)); + if(isfinite(x)) return(scalbn(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -169,5 +169,5 @@ __exp__D(double x, double c) else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalbn(1.0,5000) : x); + return( isfinite(x) ? scalbn(1.0,5000) : x); } diff --git a/lib/libm/noieee_src/n_expm1.c b/lib/libm/noieee_src/n_expm1.c index 435f4c63c6c..9494c41f3e4 100644 --- a/lib/libm/noieee_src/n_expm1.c +++ b/lib/libm/noieee_src/n_expm1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_expm1.c,v 1.12 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_expm1.c,v 1.13 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_expm1.c,v 1.1 1995/10/10 23:36:46 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -38,7 +38,7 @@ * Required system supported functions: * scalbn(x,n) * copysign(x,y) - * finite(x) + * isfinite(x) * * Kernel function: * exp__E(x,c) @@ -135,7 +135,7 @@ expm1(double x) else /* expm1(-big#) rounded to -1 (inexact) */ - if(finite(x)) + if(isfinite(x)) return(tiny-one); /* expm1(-INF) is -1 */ @@ -145,5 +145,5 @@ expm1(double x) else /* expm1(INF) is INF, expm1(+big#) overflows to INF */ - return( finite(x) ? scalbn(one,5000) : x); + return( isfinite(x) ? scalbn(one,5000) : x); } diff --git a/lib/libm/noieee_src/n_floor.c b/lib/libm/noieee_src/n_floor.c index d549ffc2193..7e77d02fa69 100644 --- a/lib/libm/noieee_src/n_floor.c +++ b/lib/libm/noieee_src/n_floor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_floor.c,v 1.19 2013/07/05 05:44:10 espie Exp $ */ +/* $OpenBSD: n_floor.c,v 1.20 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_floor.c,v 1.1 1995/10/10 23:36:48 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -84,7 +84,7 @@ floorf(float x) { volatile float y; - if (isnanf(x) || x >= F) /* already an even integer */ + if (isnan(x) || x >= F) /* already an even integer */ return x; else if (x < (float)0) return -ceilf(-x); @@ -100,7 +100,7 @@ ceilf(float x) { volatile float y; - if (isnanf(x) || x >= F) /* already an even integer */ + if (isnan(x) || x >= F) /* already an even integer */ return x; else if (x < (float)0) return -floorf(-x); @@ -158,7 +158,7 @@ rintf(float x) volatile float t; const float one = 1.0f; - if (isnanf(x)) + if (isnan(x)) return (x); if (copysignf(x, one) >= F) /* already an integer */ diff --git a/lib/libm/noieee_src/n_fmod.c b/lib/libm/noieee_src/n_fmod.c index e78ae985a62..f43d15dce0c 100644 --- a/lib/libm/noieee_src/n_fmod.c +++ b/lib/libm/noieee_src/n_fmod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_fmod.c,v 1.7 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_fmod.c,v 1.8 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_fmod.c,v 1.1 1995/10/10 23:36:49 ragge Exp $ */ /* * Copyright (c) 1989, 1993 @@ -65,7 +65,7 @@ fmod(double x, double y) int ir,iy; double r,w; - if (y == (double)0 || isnan(y) || !finite(x)) + if (y == (double)0 || isnan(y) || !isfinite(x)) return (x*y)/(x*y); r = fabs(x); diff --git a/lib/libm/noieee_src/n_hypot.c b/lib/libm/noieee_src/n_hypot.c index c4e35ba5ea8..d326add64bf 100644 --- a/lib/libm/noieee_src/n_hypot.c +++ b/lib/libm/noieee_src/n_hypot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_hypot.c,v 1.4 2013/07/15 04:08:26 espie Exp $ */ +/* $OpenBSD: n_hypot.c,v 1.5 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_cabs.c,v 1.1 1995/10/10 23:36:39 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -37,7 +37,7 @@ * * Required system supported functions : * copysign(x,y) - * finite(x) + * isfinite(x) * scalbn(x,N) * sqrt(x) * @@ -104,8 +104,8 @@ hypot(double x, double y) double t,r; int exp; - if(finite(x)) - if(finite(y)) + if(isfinite(x)) + if(isfinite(y)) { x=copysign(x,one); y=copysign(y,one); @@ -141,7 +141,7 @@ hypot(double x, double y) else if(isinf(x)) /* x is +-INF */ return (copysign(x,one)); - else if(finite(y)) + else if(isfinite(y)) return(x); /* x is NaN, y is finite */ else if (isnan(y)) return (y); @@ -161,8 +161,8 @@ hypot(double x, double y) double temp; int exp; - if(finite(x)) - if(finite(y)) + if(isfinite(x)) + if(isfinite(y)) { x=copysign(x,one); y=copysign(y,one); @@ -187,7 +187,7 @@ hypot(double x, double y) else if(isinf(x)) /* x is +-INF */ return (copysign(x,one)); - else if(finite(y)) + else if(isfinite(y)) return(x); /* x is NaN, y is finite */ else if(isnan(y)) return(y); /* x and y is NaN */ else return(copysign(y,one)); /* y is INF */ diff --git a/lib/libm/noieee_src/n_j0.c b/lib/libm/noieee_src/n_j0.c index 02c56dd9165..6274b17cde2 100644 --- a/lib/libm/noieee_src/n_j0.c +++ b/lib/libm/noieee_src/n_j0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_j0.c,v 1.7 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_j0.c,v 1.8 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_j0.c,v 1.1 1995/10/10 23:36:52 ragge Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -138,7 +138,7 @@ j0(double x) { double z, s,c,ss,cc,r,u,v; - if (!finite(x)) + if (!isfinite(x)) if (_IEEE) return one/(x*x); else return (0); x = fabs(x); @@ -200,7 +200,7 @@ y0(double x) { double z, s, c, ss, cc, u, v; /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */ - if (!finite(x)) + if (!isfinite(x)) if (_IEEE) return (one/(x+x*x)); else diff --git a/lib/libm/noieee_src/n_j1.c b/lib/libm/noieee_src/n_j1.c index dd8f28a9a0e..0bb2181b68b 100644 --- a/lib/libm/noieee_src/n_j1.c +++ b/lib/libm/noieee_src/n_j1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_j1.c,v 1.7 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_j1.c,v 1.8 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_j1.c,v 1.1 1995/10/10 23:36:53 ragge Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -143,7 +143,7 @@ j1(double x) { double z, s,c,ss,cc,r,u,v,y; y = fabs(x); - if (!finite(x)) /* Inf or NaN */ + if (!isfinite(x)) /* Inf or NaN */ if (isnan(x)) return(x); else @@ -206,7 +206,7 @@ y1(double x) { double z, s, c, ss, cc, u, v; /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */ - if (!finite(x)) + if (!isfinite(x)) if (x < 0) return(zero/zero); else if (x > 0) diff --git a/lib/libm/noieee_src/n_jn.c b/lib/libm/noieee_src/n_jn.c index b5c9d51b9a7..d8c6111f54f 100644 --- a/lib/libm/noieee_src/n_jn.c +++ b/lib/libm/noieee_src/n_jn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_jn.c,v 1.7 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_jn.c,v 1.8 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_jn.c,v 1.1 1995/10/10 23:36:54 ragge Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -122,7 +122,7 @@ jn(int n, double x) if (n==1) return(j1(x)); sgn = (n&1)&(x < zero); /* even n -- 0, odd n -- sign(x) */ x = fabs(x); - if (x == 0 || !finite (x)) /* if x is 0 or inf */ + if (x == 0 || !isfinite (x)) /* if x is 0 or inf */ b = zero; else if ((double) n <= x) { /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ @@ -261,7 +261,7 @@ yn(int n, double x) else if (x < 0) return (infnan(EDOM)); else if (_IEEE) return -one/zero; else return(infnan(-ERANGE)); - else if (!finite(x)) return(0); + else if (!isfinite(x)) return(0); sign = 1; if (n<0){ n = -n; @@ -294,13 +294,13 @@ yn(int n, double x) a = y0(x); b = y1(x); /* quit if b is -inf */ - for (i = 1; i < n && !finite(b); i++){ + for (i = 1; i < n && !isfinite(b); i++){ temp = b; b = ((double)(i+i)/x)*b - a; a = temp; } } - if (!_IEEE && !finite(b)) + if (!_IEEE && !isfinite(b)) return (infnan(-sign * ERANGE)); return ((sign > 0) ? b : -b); } diff --git a/lib/libm/noieee_src/n_lgamma.c b/lib/libm/noieee_src/n_lgamma.c index 6758234c623..44a1922e000 100644 --- a/lib/libm/noieee_src/n_lgamma.c +++ b/lib/libm/noieee_src/n_lgamma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_lgamma.c,v 1.9 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_lgamma.c,v 1.10 2016/09/12 04:39:47 guenther Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -141,7 +141,7 @@ lgamma(double x) endian = ((*(int *) &one)) ? 1 : 0; #endif - if (!finite(x)) + if (!isfinite(x)) if (_IEEE) return (x+x); else return (infnan(EDOM)); @@ -197,7 +197,7 @@ large_lgam(double x) v.b = (x - v.a) - 0.5; t.a = u.a*v.a; t.b = x*u.b + v.b*u.a; - if (_IEEE == 0 && !finite(t.a)) + if (_IEEE == 0 && !isfinite(t.a)) return(infnan(ERANGE)); return(t.a + t.b); } diff --git a/lib/libm/noieee_src/n_log.c b/lib/libm/noieee_src/n_log.c index e5c34f764de..64a93609d90 100644 --- a/lib/libm/noieee_src/n_log.c +++ b/lib/libm/noieee_src/n_log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_log.c,v 1.8 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_log.c,v 1.9 2016/09/12 04:39:47 guenther Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -375,7 +375,7 @@ log(double x) return (infnan(-ERANGE)); else return (infnan(EDOM)); - else if (!finite(x)) + else if (!isfinite(x)) if (_IEEE) /* x = NaN, Inf */ return (x+x); else diff --git a/lib/libm/noieee_src/n_log1p.c b/lib/libm/noieee_src/n_log1p.c index 22f6526b341..154cb1c4901 100644 --- a/lib/libm/noieee_src/n_log1p.c +++ b/lib/libm/noieee_src/n_log1p.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_log1p.c,v 1.11 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_log1p.c,v 1.12 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_log1p.c,v 1.1 1995/10/10 23:37:00 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -39,7 +39,7 @@ * scalbn(x,n) * copysign(x,y) * logb(x) - * finite(x) + * isfinite(x) * * Required kernel function: * log__L(z) @@ -107,7 +107,7 @@ log1p(double x) if (isnan(x)) return (x); - if(finite(x)) { + if(isfinite(x)) { if( x > negone ) { /* argument reduction */ @@ -143,7 +143,7 @@ log1p(double x) #endif /* defined(__vax__) */ } } - /* end of if (finite(x)) */ + /* end of if (isfinite(x)) */ /* log(-INF) is NaN */ else if(x<0) diff --git a/lib/libm/noieee_src/n_pow.c b/lib/libm/noieee_src/n_pow.c index 50d5cccc8b9..eeb06e6c845 100644 --- a/lib/libm/noieee_src/n_pow.c +++ b/lib/libm/noieee_src/n_pow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_pow.c,v 1.12 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_pow.c,v 1.13 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_pow.c,v 1.1 1995/10/10 23:37:02 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -39,7 +39,7 @@ * scalbn(x,n) * logb(x) * copysign(x,y) - * finite(x) + * isfinite(x) * remainder(x,y) * * Required kernel functions: @@ -127,7 +127,7 @@ pow(double x, double y) return (x); /* if x is NaN or y=1 */ else if (isnan(y)) /* if y is NaN */ return (y); - else if (!finite(y)) /* if y is INF */ + else if (!isfinite(y)) /* if y is INF */ if ((t=fabs(x))==one) /* +-1 ** +-INF is NaN */ return (y - y); else if (t>one) @@ -175,7 +175,7 @@ pow_P(double x, double y) return (infnan(ERANGE)); if (x == one) return (one); - if (!finite(x)) + if (!isfinite(x)) if (y < zero) return (zero); else if (_IEEE) diff --git a/lib/libm/noieee_src/n_sincos.c b/lib/libm/noieee_src/n_sincos.c index e00114ad8c3..a5ee9ed5c13 100644 --- a/lib/libm/noieee_src/n_sincos.c +++ b/lib/libm/noieee_src/n_sincos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_sincos.c,v 1.14 2013/07/15 04:08:26 espie Exp $ */ +/* $OpenBSD: n_sincos.c,v 1.15 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_sincos.c,v 1.1 1995/10/10 23:37:04 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -44,7 +44,7 @@ sin(double x) { double a,c,z; - if(!finite(x)) /* sin(NaN) and sin(INF) must be NaN */ + if(!isfinite(x)) /* sin(NaN) and sin(INF) must be NaN */ return x-x; x=remainder(x,PI2); /* reduce x into [-PI,PI] */ a=copysign(x,one); @@ -81,7 +81,7 @@ cos(double x) { double a,c,z,s = 1.0; - if(!finite(x)) /* cos(NaN) and cos(INF) must be NaN */ + if(!isfinite(x)) /* cos(NaN) and cos(INF) must be NaN */ return x-x; x=remainder(x,PI2); /* reduce x into [-PI,PI] */ a=copysign(x,one); diff --git a/lib/libm/noieee_src/n_support.c b/lib/libm/noieee_src/n_support.c index aff227338e7..ae54f830173 100644 --- a/lib/libm/noieee_src/n_support.c +++ b/lib/libm/noieee_src/n_support.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_support.c,v 1.23 2013/07/15 04:08:26 espie Exp $ */ +/* $OpenBSD: n_support.c,v 1.24 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_support.c,v 1.1 1995/10/10 23:37:06 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -270,7 +270,7 @@ sqrt(double x) } /* sqrt(INF) is INF */ - if(!finite(x)) return(x); + if(!isfinite(x)) return(x); /* scale x to [1,4) */ n=logb(x); diff --git a/lib/libm/noieee_src/n_tan.c b/lib/libm/noieee_src/n_tan.c index dfe2e476c9b..b36dd16d379 100644 --- a/lib/libm/noieee_src/n_tan.c +++ b/lib/libm/noieee_src/n_tan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_tan.c,v 1.14 2013/07/15 04:08:26 espie Exp $ */ +/* $OpenBSD: n_tan.c,v 1.15 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_tan.c,v 1.1 1995/10/10 23:37:07 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -45,7 +45,7 @@ tan(double x) double a,z,ss,cc,c; int k; - if(!finite(x)) /* tan(NaN) and tan(INF) must be NaN */ + if(!isfinite(x)) /* tan(NaN) and tan(INF) must be NaN */ return x-x; x = remainder(x,PI); /* reduce x into [-PI/2, PI/2] */ a = copysign(x,one); /* ... = abs(x) */ diff --git a/lib/libm/noieee_src/n_tanh.c b/lib/libm/noieee_src/n_tanh.c index cc13f3e304b..3db4a516e63 100644 --- a/lib/libm/noieee_src/n_tanh.c +++ b/lib/libm/noieee_src/n_tanh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_tanh.c,v 1.9 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_tanh.c,v 1.10 2016/09/12 04:39:47 guenther Exp $ */ /* $NetBSD: n_tanh.c,v 1.1 1995/10/10 23:37:08 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -39,7 +39,7 @@ * * Required system supported functions : * copysign(x,y) - * finite(x) + * isfinite(x) * * Required kernel function: * expm1(x) ...exp(x)-1 @@ -88,7 +88,7 @@ tanh(double x) t = big + x; return(copysign(x,sign) - (t-(big+x))); } - else if(finite(x)) + else if(isfinite(x)) return (sign+1.0E-37); /* raise the INEXACT flag */ else return(sign); /* x is +- INF */ diff --git a/lib/libm/noieee_src/n_tgamma.c b/lib/libm/noieee_src/n_tgamma.c index c752f0ba317..1bd2f13bbee 100644 --- a/lib/libm/noieee_src/n_tgamma.c +++ b/lib/libm/noieee_src/n_tgamma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_tgamma.c,v 1.4 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_tgamma.c,v 1.5 2016/09/12 04:39:47 guenther Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -161,7 +161,7 @@ tgamma(double x) u.a = one - tiny; /* raise inexact */ } return (one/x); - } else if (!finite(x)) { + } else if (!isfinite(x)) { if (_IEEE) /* x = NaN, -Inf */ return (x - x); else diff --git a/lib/libm/src/b_exp__D.c b/lib/libm/src/b_exp__D.c index 6dd24342dea..fd53b976a48 100644 --- a/lib/libm/src/b_exp__D.c +++ b/lib/libm/src/b_exp__D.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_exp__D.c,v 1.5 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: b_exp__D.c,v 1.6 2016/09/12 04:39:47 guenther Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ * Required system supported functions: * scalb(x,n) * copysign(x,y) - * finite(x) + * isfinite(x) * * Method: * 1. Argument Reduction: given the input x, find r and integer k such @@ -110,7 +110,7 @@ __exp__D(double x, double c) else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalb(1.0,-5000)); + if(isfinite(x)) return(scalb(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -119,5 +119,5 @@ __exp__D(double x, double c) else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalb(1.0,5000) : x); + return( isfinite(x) ? scalb(1.0,5000) : x); } diff --git a/lib/libm/src/b_tgamma.c b/lib/libm/src/b_tgamma.c index 2c31909251e..2a7e564986e 100644 --- a/lib/libm/src/b_tgamma.c +++ b/lib/libm/src/b_tgamma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_tgamma.c,v 1.8 2013/07/03 04:46:36 espie Exp $ */ +/* $OpenBSD: b_tgamma.c,v 1.9 2016/09/12 04:39:47 guenther Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -138,7 +138,7 @@ tgamma(double x) if (x != 0.0) u.a = one - tiny; /* raise inexact */ return (one/x); - } else if (!finite(x)) { + } else if (!isfinite(x)) { return (x - x); /* x = NaN, -Inf */ } else return (neg_gam(x)); diff --git a/lib/libm/src/e_scalb.c b/lib/libm/src/e_scalb.c index ee459448122..5762ea98098 100644 --- a/lib/libm/src/e_scalb.c +++ b/lib/libm/src/e_scalb.c @@ -32,7 +32,7 @@ double scalb(double x, double fn) { if (isnan(x)||isnan(fn)) return x*fn; - if (!finite(fn)) { + if (!isfinite(fn)) { if(fn>0.0) return x*fn; else return x/(-fn); } diff --git a/lib/libm/src/e_scalbf.c b/lib/libm/src/e_scalbf.c index 12983efd9f0..f66271f968f 100644 --- a/lib/libm/src/e_scalbf.c +++ b/lib/libm/src/e_scalbf.c @@ -28,8 +28,8 @@ scalbf(float x, int fn) float scalbf(float x, float fn) { - if (isnanf(x)||isnanf(fn)) return x*fn; - if (!finitef(fn)) { + if (isnan(x)||isnan(fn)) return x*fn; + if (!isfinite(fn)) { if(fn>(float)0.0) return x*fn; else return x/(-fn); } diff --git a/lib/libm/src/ld128/e_lgammal.c b/lib/libm/src/ld128/e_lgammal.c index 5af2057355e..04b1546f7d2 100644 --- a/lib/libm/src/ld128/e_lgammal.c +++ b/lib/libm/src/ld128/e_lgammal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_lgammal.c,v 1.3 2011/07/09 05:29:06 martynas Exp $ */ +/* $OpenBSD: e_lgammal.c,v 1.4 2016/09/12 04:39:47 guenther Exp $ */ /* * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> @@ -764,7 +764,7 @@ lgammal(long double x) signgam = 1; - if (! finite (x)) + if (! isfinite (x)) return x * x; if (x == 0.0L) diff --git a/lib/libm/src/s_roundf.c b/lib/libm/src/s_roundf.c index f56d2187875..ddfacc0bdb2 100644 --- a/lib/libm/src/s_roundf.c +++ b/lib/libm/src/s_roundf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_roundf.c,v 1.1 2006/07/12 07:26:08 brad Exp $ */ +/* $OpenBSD: s_roundf.c,v 1.2 2016/09/12 04:39:47 guenther Exp $ */ /*- * Copyright (c) 2003, Steven G. Kargl @@ -34,7 +34,7 @@ roundf(float x) { float t; - if (isinff(x) || isnanf(x)) + if (isinf(x) || isnan(x)) return (x); if (x >= 0.0) { |