diff --git a/bsdsrc/b_exp.c b/bsdsrc/b_exp.c index 61c96eb..d71c7de 100644 --- a/bsdsrc/b_exp.c +++ b/bsdsrc/b_exp.c @@ -152,13 +152,13 @@ double x, c; c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5)))); c = (x*c)/(2.0-c); - return scalb(1.+(hi-(lo - c)), k); + return scalbn(1.+(hi-(lo - c)), k); } /* end of x > lntiny */ else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalb(1.0,-5000)); + if(isfinite(x)) return(scalbn(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -167,5 +167,5 @@ double x, c; else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalb(1.0,5000) : x); + return( isfinite(x) ? scalbn(1.0,5000) : x); } diff --git a/bsdsrc/b_tgamma.c b/bsdsrc/b_tgamma.c index 7380b1d..a5cfb0f 100644 --- a/bsdsrc/b_tgamma.c +++ b/bsdsrc/b_tgamma.c @@ -140,7 +140,7 @@ tgamma(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 is NaN or -Inf */ else return (neg_gam(x)); diff --git a/src/e_scalb.c b/src/e_scalb.c index d575100..e0c9165 100644 --- a/src/e_scalb.c +++ b/src/e_scalb.c @@ -35,7 +35,7 @@ __ieee754_scalb(double x, double fn) return scalbn(x,fn); #else 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/src/e_scalbf.c b/src/e_scalbf.c index d506719..7472d37 100644 --- a/src/e_scalbf.c +++ b/src/e_scalbf.c @@ -30,8 +30,8 @@ __ieee754_scalbf(float x, float fn) #ifdef _SCALB_INT return scalbnf(x,fn); #else - 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); }