diff options
author | 2016-09-12 04:39:47 +0000 | |
---|---|---|
committer | 2016-09-12 04:39:47 +0000 | |
commit | eab01a26e008dd07c2bc46ce67ddd6fd3ca35f93 (patch) | |
tree | 460f0928b80f456c4721a9245277f1e09ea17e5e /lib/libm/src | |
parent | Use fe*() routines from <fenv.h> instead of fp*() routines from <ieeefp.h> (diff) | |
download | wireguard-openbsd-eab01a26e008dd07c2bc46ce67ddd6fd3ca35f93.tar.xz wireguard-openbsd-eab01a26e008dd07c2bc46ce67ddd6fd3ca35f93.zip |
Per fpclassify(3): isinff(), isnanf(), finite(), and finitef() are deprecated
in favor of isinf(), isnan(), and isfinite().
ok tb@ martynas@
Diffstat (limited to 'lib/libm/src')
-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 |
6 files changed, 13 insertions, 13 deletions
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) { |