diff options
Diffstat (limited to 'libm')
-rw-r--r-- | libm/Makefile.in | 39 | ||||
-rw-r--r-- | libm/e_scalb.c | 2 | ||||
-rw-r--r-- | libm/float_wrappers.c | 10 | ||||
-rw-r--r-- | libm/ldouble_wrappers.c | 56 | ||||
-rw-r--r-- | libm/s_finite.c | 2 | ||||
-rw-r--r-- | libm/s_finitef.c | 2 | ||||
-rw-r--r-- | libm/s_fma.c | 6 | ||||
-rw-r--r-- | libm/s_fpclassify.c | 2 | ||||
-rw-r--r-- | libm/s_fpclassifyf.c | 6 | ||||
-rw-r--r-- | libm/s_isinf.c | 2 | ||||
-rw-r--r-- | libm/s_isinff.c | 2 | ||||
-rw-r--r-- | libm/s_isnan.c | 9 | ||||
-rw-r--r-- | libm/s_isnanf.c | 4 | ||||
-rw-r--r-- | libm/s_ldexp.c | 4 | ||||
-rw-r--r-- | libm/s_signbitf.c | 1 | ||||
-rw-r--r-- | libm/s_significand.c | 1 | ||||
-rw-r--r-- | libm/w_drem.c | 1 | ||||
-rw-r--r-- | libm/w_exp.c | 2 | ||||
-rw-r--r-- | libm/w_gamma.c | 3 | ||||
-rw-r--r-- | libm/w_gamma_r.c | 2 | ||||
-rw-r--r-- | libm/w_hypot.c | 2 | ||||
-rw-r--r-- | libm/w_j0.c | 2 | ||||
-rw-r--r-- | libm/w_j1.c | 2 | ||||
-rw-r--r-- | libm/w_jn.c | 2 | ||||
-rw-r--r-- | libm/w_lgamma.c | 2 | ||||
-rw-r--r-- | libm/w_lgamma_r.c | 3 | ||||
-rw-r--r-- | libm/w_log2.c | 1 | ||||
-rw-r--r-- | libm/w_pow.c | 8 | ||||
-rw-r--r-- | libm/w_scalb.c | 5 | ||||
-rw-r--r-- | libm/w_sinh.c | 2 | ||||
-rw-r--r-- | libm/w_tgamma.c | 2 |
31 files changed, 112 insertions, 75 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in index 9ddd8c8a5..b490ec8bf 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -86,13 +86,13 @@ FL_MOBJ := \ scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \ tgammaf.o truncf.o cargf.o llrintf.o -LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cbrtl.o \ +LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cargl.o cbrtl.o \ ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \ - expm1l.o fabsl.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o \ - frexpl.o gammal.o hypotl.o ilogbl.o ldexpl.o lgammal.o llrintl.o \ + expm1l.o fabsl.o finitel.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o fpclassifyl.o \ + frexpl.o gammal.o hypotl.o ilogbl.o isinfl.o isnanl.o ldexpl.o lgammal.o llrintl.o \ llroundl.o log10l.o log1pl.o XXXlog2l.o logbl.o logl.o lrintl.o lroundl.o \ modfl.o nearbyintl.o nextafterl.o XXXnexttowardl.o powl.o remainderl.o \ - remquol.o rintl.o roundl.o scalblnl.o scalbnl.o sinhl.o sinl.o sqrtl.o \ + remquol.o rintl.o roundl.o scalblnl.o scalbnl.o signbitl.o sinhl.o sinl.o sqrtl.o \ tanhl.o tanl.o tgammal.o truncl.o else # This list of math functions was taken from POSIX/IEEE 1003.1b-1993 @@ -139,21 +139,21 @@ libm_SRC := $(patsubst %.c,$(libm_DIR)/%.c,$(libm_CSRC)) libm_OBJ := $(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC)) ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y) -libm_MSRC2 := $(libm_DIR)/$(LD_MSRC) -libm_MOBJ2 := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ)) +libm_MSRC_LD := $(libm_DIR)/$(LD_MSRC) +libm_MOBJ_LD := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ)) endif -libm_MSRC := $(libm_DIR)/$(FL_MSRC) -libm_MOBJ := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ)) +libm_MSRC_FL := $(libm_DIR)/$(FL_MSRC) +libm_MOBJ_FL := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ)) ifneq ($(DOMULTI),n) -CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ)))) +CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_FL)))) ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y) -CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ2)))) +CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_LD)))) endif endif -libm_OBJS := $(libm_OBJ) $(libm_MOBJ) $(libm_MOBJ2) +libm_OBJS := $(libm_OBJ) $(libm_MOBJ_FL) $(libm_MOBJ_LD) ifeq ($(DOPIC),y) libm-a-y += $(libm_OBJS:.o=.os) @@ -182,7 +182,7 @@ $(libm_OUT)/libm_so.a: $(libm-so-y) $(Q)$(RM) $@ $(do_ar) -$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_MSRC2) $(libm_ARCH_SRC) +$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC_FL) $(libm_MSRC_LD) $(libm_ARCH_SRC) $(Q)$(RM) $@ $(compile-m) @@ -191,17 +191,24 @@ $(top_builddir)lib/libm.a: $(libm-a-y) $(Q)$(RM) $@ $(do_ar) -$(libm_MOBJ): $(libm_MSRC) +$(libm_MOBJ_FL): $(libm_MSRC_FL) $(compile.m) -$(libm_MOBJ2): $(libm_MSRC2) +$(libm_MOBJ_LD): $(libm_MSRC_LD) $(compile.m) -$(libm_MOBJ:.o=.os): $(libm_MSRC) +$(libm_MOBJ_FL:.o=.os): $(libm_MSRC_FL) $(compile.m) -$(libm_MOBJ2:.o=.os): $(libm_MSRC2) +$(libm_MOBJ_LD:.o=.os): $(libm_MSRC_LD) $(compile.m) +# spare us from adding a gazillion dummy two-liner files +$(libm_MOBJ_FL:.o=.i): $(libm_MSRC_FL) + $(compile.mi) + +$(libm_MOBJ_LD:.o=.i): $(libm_MSRC_LD) + $(compile.mi) + libm_clean: $(do_rm) $(addprefix $(libm_OUT)/,$(foreach e, o os oS a,$(foreach d, *. */*. */*/*.,$(d)$(e)))) diff --git a/libm/e_scalb.c b/libm/e_scalb.c index 2f0dba14a..33eaeeac6 100644 --- a/libm/e_scalb.c +++ b/libm/e_scalb.c @@ -44,7 +44,7 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $"; 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/libm/float_wrappers.c b/libm/float_wrappers.c index 26041d088..36efcfbea 100644 --- a/libm/float_wrappers.c +++ b/libm/float_wrappers.c @@ -39,6 +39,7 @@ float asinhf(float); float atan2f(float, float); float atanf(float); float atanhf(float); +float cargf(float complex); float cbrtf(float); float ceilf(float); float copysignf(float, float); @@ -136,7 +137,7 @@ float atanhf (float x) #ifdef L_cargf float cargf (float complex x) { - return (float) carg( (double)x ); + return (float) carg( (double complex)x ); } #endif @@ -535,3 +536,10 @@ float truncf (float x) return (float) trunc( (double)x ); } #endif + +#ifdef L_fmaf +float fmaf (float x, float y, float z) +{ + return (float) fma( (double)x, (double)y, (double)z ); +} +#endif diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c index 62732bae9..a4f13f429 100644 --- a/libm/ldouble_wrappers.c +++ b/libm/ldouble_wrappers.c @@ -14,6 +14,8 @@ /* Prevent math.h from defining colliding inlines */ #undef __USE_EXTERN_INLINES #include "math.h" +#include <complex.h> + /* Implement the following, as defined by SuSv3 */ #if 0 @@ -24,6 +26,7 @@ long double asinl(long double); long double atan2l(long double, long double); long double atanhl(long double); long double atanl(long double); +long double cargl(long double complex); long double cbrtl(long double); long double ceill(long double); long double copysignl(long double, long double); @@ -131,6 +134,14 @@ long double atanl (long double x) #endif +#ifdef L_cargl +long double cargl (long double complex x) +{ + return (long double) carg( (double complex)x ); +} +#endif + + #ifdef L_cbrtl long double cbrtl (long double x) { @@ -524,3 +535,48 @@ long double truncl (long double x) return (long double) trunc( (double)x ); } #endif + + +#ifdef __DO_C99_MATH__ + +#ifdef L_fpclassifyl +int __fpclassifyl (long double x) +{ + return __fpclassify ( (double) x ); +} +libm_hidden_def(__fpclassifyl) +#endif + +#ifdef L_finitel +int __finitel (long double x) +{ + return __finite ( (double)x ); +} +libm_hidden_def(__finitel) +#endif + +#ifdef L_signbitl +int __signbitl (long double x) +{ + return __signbitl ( (double)x ); +} +libm_hidden_def(__signbitl) +#endif + +#ifdef L_isnanl +int __isnanl (long double x) +{ + return __isnan ( (double)x ); +} +libm_hidden_def(__isnanl) +#endif + +#ifdef L_isinfl +int __isinfl (long double x) +{ + return __isinf ( (double)x ); +} +libm_hidden_def(__isinfl) +#endif + +#endif diff --git a/libm/s_finite.c b/libm/s_finite.c index 2235d0a42..357c3d4af 100644 --- a/libm/s_finite.c +++ b/libm/s_finite.c @@ -28,5 +28,3 @@ int __finite(double x) return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31); } libm_hidden_def(__finite) -weak_alias(__finite,finite) -libm_hidden_weak(finite) diff --git a/libm/s_finitef.c b/libm/s_finitef.c index 66eba8f98..b7c853d4a 100644 --- a/libm/s_finitef.c +++ b/libm/s_finitef.c @@ -21,7 +21,6 @@ #include "math.h" #include "math_private.h" -libm_hidden_proto(__finitef) int __finitef(float x) { int32_t ix; @@ -29,4 +28,3 @@ int __finitef(float x) return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31); } libm_hidden_def(__finitef) -strong_alias(__finitef,finitef) diff --git a/libm/s_fma.c b/libm/s_fma.c index f9e8cf974..7a87fbdd3 100644 --- a/libm/s_fma.c +++ b/libm/s_fma.c @@ -20,11 +20,9 @@ #include <math.h> -libm_hidden_proto(__fma) double -__fma (double x, double y, double z) +fma (double x, double y, double z) { return (x * y) + z; } -libm_hidden_def(__fma) -strong_alias (__fma, fma) +libm_hidden_def(fma) diff --git a/libm/s_fpclassify.c b/libm/s_fpclassify.c index d2c4c8232..f2d6736e3 100644 --- a/libm/s_fpclassify.c +++ b/libm/s_fpclassify.c @@ -40,4 +40,4 @@ __fpclassify (double x) return retval; } -libm_hidden_def (__fpclassify) +libm_hidden_def(__fpclassify) diff --git a/libm/s_fpclassifyf.c b/libm/s_fpclassifyf.c index edc0db635..23ae59f18 100644 --- a/libm/s_fpclassifyf.c +++ b/libm/s_fpclassifyf.c @@ -21,9 +21,7 @@ #include <math.h> #include "math_private.h" -libm_hidden_proto(__fpclassifyf) -int -__fpclassifyf (float x) +int __fpclassifyf (float x) { u_int32_t wx; int retval = FP_NORMAL; @@ -39,4 +37,4 @@ __fpclassifyf (float x) return retval; } -libm_hidden_def (__fpclassifyf) +libm_hidden_def(__fpclassifyf) diff --git a/libm/s_isinf.c b/libm/s_isinf.c index 99a1cdf18..b73aa6696 100644 --- a/libm/s_isinf.c +++ b/libm/s_isinf.c @@ -22,5 +22,3 @@ __isinf (double x) return ~(lx >> 31) & (hx >> 30); } libm_hidden_def(__isinf) -weak_alias (__isinf, isinf) -libm_hidden_weak(isinf) diff --git a/libm/s_isinff.c b/libm/s_isinff.c index 6827024af..e25912834 100644 --- a/libm/s_isinff.c +++ b/libm/s_isinff.c @@ -11,7 +11,6 @@ #include "math.h" #include "math_private.h" -libm_hidden_proto(__isinff) int __isinff (float x) { @@ -23,4 +22,3 @@ __isinff (float x) return ~(t >> 31) & (ix >> 30); } libm_hidden_def(__isinff) -strong_alias (__isinff, isinff) diff --git a/libm/s_isnan.c b/libm/s_isnan.c index 671c5cb2e..51ed94e04 100644 --- a/libm/s_isnan.c +++ b/libm/s_isnan.c @@ -18,12 +18,7 @@ #include "math.h" #include "math_private.h" -#ifdef __STDC__ - int __isnan(double x) -#else - int __isnan(x) - double x; -#endif +int __isnan(double x) { int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); @@ -33,5 +28,3 @@ return (int)(((u_int32_t)hx)>>31); } libm_hidden_def(__isnan) -weak_alias(__isnan,isnan) -libm_hidden_weak(isnan) diff --git a/libm/s_isnanf.c b/libm/s_isnanf.c index 6afa5df06..d868264f7 100644 --- a/libm/s_isnanf.c +++ b/libm/s_isnanf.c @@ -21,7 +21,6 @@ #include "math.h" #include "math_private.h" -libm_hidden_proto(__isnanf) int __isnanf(float x) { int32_t ix; @@ -30,5 +29,4 @@ int __isnanf(float x) ix = 0x7f800000 - ix; return (int)(((u_int32_t)(ix))>>31); } -libm_hidden_def (__isnanf) -weak_alias (__isnanf, isnanf) +libm_hidden_def(__isnanf) diff --git a/libm/s_ldexp.c b/libm/s_ldexp.c index a065f5ada..02dae6fcf 100644 --- a/libm/s_ldexp.c +++ b/libm/s_ldexp.c @@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $"; double value; int exp; #endif { - 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) errno = ERANGE; + if(!isfinite(value)||value==0.0) errno = ERANGE; return value; } libm_hidden_def(ldexp) diff --git a/libm/s_signbitf.c b/libm/s_signbitf.c index 3a5cf0c2a..a15e26a09 100644 --- a/libm/s_signbitf.c +++ b/libm/s_signbitf.c @@ -24,7 +24,6 @@ #include <math.h> #include "math_private.h" -libm_hidden_proto(__signbitf) int __signbitf (float x) { diff --git a/libm/s_significand.c b/libm/s_significand.c index 2a7980a44..100ac0889 100644 --- a/libm/s_significand.c +++ b/libm/s_significand.c @@ -33,4 +33,3 @@ static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Ex { return __ieee754_scalb(x,(double) -ilogb(x)); } -libm_hidden_def(significand) diff --git a/libm/w_drem.c b/libm/w_drem.c index 6b3dd3937..4f9127b1e 100644 --- a/libm/w_drem.c +++ b/libm/w_drem.c @@ -12,4 +12,3 @@ double drem(double x, double y) { return remainder(x, y); } -libm_hidden_def(drem) diff --git a/libm/w_exp.c b/libm/w_exp.c index e11222499..067279664 100644 --- a/libm/w_exp.c +++ b/libm/w_exp.c @@ -42,7 +42,7 @@ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ double z; z = __ieee754_exp(x); if(_LIB_VERSION == _IEEE_) return z; - if(finite(x)) { + if(isfinite(x)) { if(x>o_threshold) return __kernel_standard(x,x,6); /* exp overflow */ else if(x<u_threshold) diff --git a/libm/w_gamma.c b/libm/w_gamma.c index 0b286e190..5d8bca0ee 100644 --- a/libm/w_gamma.c +++ b/libm/w_gamma.c @@ -37,7 +37,7 @@ libm_hidden_proto(signgam) double y; y = __ieee754_lgamma_r(x,&signgam); if(_LIB_VERSION == _IEEE_) return y; - if(!finite(y)&&finite(x)) { + if(!isfinite(y)&&isfinite(x)) { if(floor(x)==x&&x<=0.0) return __kernel_standard(x,x,41); /* gamma pole */ else @@ -46,4 +46,3 @@ libm_hidden_proto(signgam) return y; #endif } -libm_hidden_def(gamma) diff --git a/libm/w_gamma_r.c b/libm/w_gamma_r.c index b9f14fb48..a8eb2994d 100644 --- a/libm/w_gamma_r.c +++ b/libm/w_gamma_r.c @@ -37,7 +37,7 @@ libm_hidden_proto(gamma_r) double y; y = __ieee754_lgamma_r(x,signgamp); if(_LIB_VERSION == _IEEE_) return y; - if(!finite(y)&&finite(x)) { + if(!isfinite(y)&&isfinite(x)) { if(floor(x)==x&&x<=0.0) return __kernel_standard(x,x,41); /* gamma pole */ else diff --git a/libm/w_hypot.c b/libm/w_hypot.c index 9ed348e3e..a6abb8032 100644 --- a/libm/w_hypot.c +++ b/libm/w_hypot.c @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $"; double z; z = __ieee754_hypot(x,y); if(_LIB_VERSION == _IEEE_) return z; - if((!finite(z))&&finite(x)&&finite(y)) + if((!isfinite(z))&&isfinite(x)&&isfinite(y)) return __kernel_standard(x,y,4); /* hypot overflow */ else return z; diff --git a/libm/w_j0.c b/libm/w_j0.c index 27290c858..61f4f20fc 100644 --- a/libm/w_j0.c +++ b/libm/w_j0.c @@ -39,7 +39,6 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; return z; #endif } -libm_hidden_def(j0) #ifdef __STDC__ double y0(double x) /* wrapper y0 */ @@ -68,4 +67,3 @@ libm_hidden_def(j0) return z; #endif } -libm_hidden_def(y0) diff --git a/libm/w_j1.c b/libm/w_j1.c index 9ce34cca3..389dc156c 100644 --- a/libm/w_j1.c +++ b/libm/w_j1.c @@ -40,7 +40,6 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; return z; #endif } -libm_hidden_def(j1) #ifdef __STDC__ double y1(double x) /* wrapper y1 */ @@ -69,4 +68,3 @@ libm_hidden_def(j1) return z; #endif } -libm_hidden_def(y1) diff --git a/libm/w_jn.c b/libm/w_jn.c index 2ba74d812..173f6aa9e 100644 --- a/libm/w_jn.c +++ b/libm/w_jn.c @@ -62,7 +62,6 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; return z; #endif } -libm_hidden_def(jn) #ifdef __STDC__ double yn(int n, double x) /* wrapper yn */ @@ -91,4 +90,3 @@ libm_hidden_def(jn) return z; #endif } -libm_hidden_def(yn) diff --git a/libm/w_lgamma.c b/libm/w_lgamma.c index 24b8b02b4..20a237488 100644 --- a/libm/w_lgamma.c +++ b/libm/w_lgamma.c @@ -37,7 +37,7 @@ libm_hidden_proto(signgam) double y; y = __ieee754_lgamma_r(x,&signgam); if(_LIB_VERSION == _IEEE_) return y; - if(!finite(y)&&finite(x)) { + if(!isfinite(y)&&isfinite(x)) { if(floor(x)==x&&x<=0.0) return __kernel_standard(x,x,15); /* lgamma pole */ else diff --git a/libm/w_lgamma_r.c b/libm/w_lgamma_r.c index 20b002608..f3d0b847b 100644 --- a/libm/w_lgamma_r.c +++ b/libm/w_lgamma_r.c @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $ double y; y = __ieee754_lgamma_r(x,signgamp); if(_LIB_VERSION == _IEEE_) return y; - if(!finite(y)&&finite(x)) { + if(!isfinite(y)&&isfinite(x)) { if(floor(x)==x&&x<=0.0) return __kernel_standard(x,x,15); /* lgamma pole */ else @@ -43,4 +43,3 @@ static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $ return y; #endif } -libm_hidden_def(lgamma_r) diff --git a/libm/w_log2.c b/libm/w_log2.c index ec274f761..7b1a1b18d 100644 --- a/libm/w_log2.c +++ b/libm/w_log2.c @@ -11,4 +11,3 @@ double log2 (double d) { return __ieee754_log2 (d); } -libm_hidden_def(log2) diff --git a/libm/w_pow.c b/libm/w_pow.c index 94d30bcec..09e0b5c2c 100644 --- a/libm/w_pow.c +++ b/libm/w_pow.c @@ -41,19 +41,19 @@ if(x==0.0){ if(y==0.0) return __kernel_standard(x,y,20); /* pow(0.0,0.0) */ - if(finite(y)&&y<0.0) + if(isfinite(y)&&y<0.0) return __kernel_standard(x,y,23); /* pow(0.0,negative) */ return z; } - if(!finite(z)) { - if(finite(x)&&finite(y)) { + if(!isfinite(z)) { + if(isfinite(x)&&isfinite(y)) { if(isnan(z)) return __kernel_standard(x,y,24); /* pow neg**non-int */ else return __kernel_standard(x,y,21); /* pow overflow */ } } - if(z==0.0&&finite(x)&&finite(y)) + if(z==0.0&&isfinite(x)&&isfinite(y)) return __kernel_standard(x,y,22); /* pow underflow */ return z; #endif diff --git a/libm/w_scalb.c b/libm/w_scalb.c index a770877ea..2ad6c6ed1 100644 --- a/libm/w_scalb.c +++ b/libm/w_scalb.c @@ -46,16 +46,15 @@ static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $"; double z; z = __ieee754_scalb(x,fn); if(_LIB_VERSION == _IEEE_) return z; - if(!(finite(z)||isnan(z))&&finite(x)) { + if(!(isfinite(z)||isnan(z))&&isfinite(x)) { return __kernel_standard(x,(double)fn,32); /* scalb overflow */ } if(z==0.0&&z!=x) { return __kernel_standard(x,(double)fn,33); /* scalb underflow */ } #ifndef _SCALB_INT - if(!finite(fn)) errno = ERANGE; + if(!isfinite(fn)) errno = ERANGE; #endif return z; #endif } -libm_hidden_def(scalb) diff --git a/libm/w_sinh.c b/libm/w_sinh.c index dabfdd918..5d1903fbf 100644 --- a/libm/w_sinh.c +++ b/libm/w_sinh.c @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; double z; z = __ieee754_sinh(x); if(_LIB_VERSION == _IEEE_) return z; - if(!finite(z)&&finite(x)) { + if(!isfinite(z)&&isfinite(x)) { return __kernel_standard(x,x,25); /* sinh overflow */ } else return z; diff --git a/libm/w_tgamma.c b/libm/w_tgamma.c index 0449e16d8..abfb119bd 100644 --- a/libm/w_tgamma.c +++ b/libm/w_tgamma.c @@ -35,7 +35,7 @@ libm_hidden_proto(signgam) #else if(_LIB_VERSION == _IEEE_) return y; - if(!finite(y)&&finite(x)) { + if(!isfinite(y)&&isfinite(x)) { if(floor(x)==x&&x<=0.0) return __kernel_standard(x,x,41); /* tgamma pole */ else |