diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2009-07-09 21:04:56 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2009-07-09 21:04:56 +0400 |
commit | 664f00763b20bcf07de6f06d37c3152061132c6e (patch) | |
tree | b989e9993b67eda54606821755662b10e72dd0f8 /newlib/libm/math | |
parent | b2cbcab19f75032ba62afe9a464c70894d78a9c9 (diff) |
2009-07-09 Craig Howland <howland@LGSInnovations.com>
* libm/math/ef_scalb.c: Replace isnanf() (pre-C99 function call) with
isnan() (C99 macro).
* libm/math/wf_log.c: Ditto.
* libm/math/wf_j0.c: Ditto.
* libm/math/wf_sqrt.c: Ditto.
* libm/math/wf_pow.c: Ditto.
* libm/math/wf_fmod.c: Ditto.
* libm/math/wf_remainder.c: Ditto.
* libm/math/wf_scalb.c: Ditto.
* libm/math/wf_atanh.c: Ditto.
* libm/math/wf_cosh.c: Ditto.
* libm/math/wf_acos.c: Ditto.
* libm/math/wf_acosh.c: Ditto.
* libm/math/wf_jn.c: Ditto.
* libm/math/wf_log10.c: Ditto.
* libm/math/wf_asin.c: Ditto.
* libm/math/wf_j1.c: Ditto.
* libm/common/sf_isnan.c: Add #include <ieeefp.h>, fix comment.
* libm/common/sf_isinf.c: Add #include <ieeefp.h>, adjust comment to
match that from s_isinf.c.
* libc/include/machine/ieeefp.h: Simplify isinf and isnan macros to
remove un-necessary extension use (in a similar manner to as was
recently done in math.h).
* libc/include/math.h: Remove isnanf and isinff prototypes (are in
ieeefp.h).
* libm/machine/spu/sf_isinf.c: Fix comment (remove <math.h>).
Diffstat (limited to 'newlib/libm/math')
-rw-r--r-- | newlib/libm/math/ef_scalb.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_acos.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_acosh.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_asin.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_atanh.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_cosh.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_fmod.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_j0.c | 4 | ||||
-rw-r--r-- | newlib/libm/math/wf_j1.c | 4 | ||||
-rw-r--r-- | newlib/libm/math/wf_jn.c | 4 | ||||
-rw-r--r-- | newlib/libm/math/wf_log.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_log10.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_pow.c | 6 | ||||
-rw-r--r-- | newlib/libm/math/wf_remainder.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_scalb.c | 2 | ||||
-rw-r--r-- | newlib/libm/math/wf_sqrt.c | 2 |
16 files changed, 21 insertions, 21 deletions
diff --git a/newlib/libm/math/ef_scalb.c b/newlib/libm/math/ef_scalb.c index 3677a3b1f..8d973b1e7 100644 --- a/newlib/libm/math/ef_scalb.c +++ b/newlib/libm/math/ef_scalb.c @@ -35,7 +35,7 @@ #ifdef _SCALB_INT return scalbnf(x,fn); #else - if (isnanf(x)||isnanf(fn)) return x*fn; + if (isnan(x)||isnan(fn)) return x*fn; if (!finitef(fn)) { if(fn>(float)0.0) return x*fn; else return x/(-fn); diff --git a/newlib/libm/math/wf_acos.c b/newlib/libm/math/wf_acos.c index 38817b82b..ff9f80b26 100644 --- a/newlib/libm/math/wf_acos.c +++ b/newlib/libm/math/wf_acos.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_acosf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(fabsf(x)>(float)1.0) { /* acosf(|x|>1) */ exc.type = DOMAIN; diff --git a/newlib/libm/math/wf_acosh.c b/newlib/libm/math/wf_acosh.c index 19c2450e6..fc8ec3a0a 100644 --- a/newlib/libm/math/wf_acosh.c +++ b/newlib/libm/math/wf_acosh.c @@ -34,7 +34,7 @@ float z; struct exception exc; z = __ieee754_acoshf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(x<(float)1.0) { /* acoshf(x<1) */ exc.type = DOMAIN; diff --git a/newlib/libm/math/wf_asin.c b/newlib/libm/math/wf_asin.c index fc39e977c..385de5499 100644 --- a/newlib/libm/math/wf_asin.c +++ b/newlib/libm/math/wf_asin.c @@ -35,7 +35,7 @@ float z; struct exception exc; z = __ieee754_asinf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(fabsf(x)>(float)1.0) { /* asinf(|x|>1) */ exc.type = DOMAIN; diff --git a/newlib/libm/math/wf_atanh.c b/newlib/libm/math/wf_atanh.c index 457cdc6e2..565630411 100644 --- a/newlib/libm/math/wf_atanh.c +++ b/newlib/libm/math/wf_atanh.c @@ -32,7 +32,7 @@ float z,y; struct exception exc; z = __ieee754_atanhf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; y = fabsf(x); if(y>=(float)1.0) { if(y>(float)1.0) { diff --git a/newlib/libm/math/wf_cosh.c b/newlib/libm/math/wf_cosh.c index 82b76f3c4..02eb12472 100644 --- a/newlib/libm/math/wf_cosh.c +++ b/newlib/libm/math/wf_cosh.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_coshf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(fabsf(x)>(float)8.9415985107e+01) { /* coshf(finite) overflow */ #ifndef HUGE_VAL diff --git a/newlib/libm/math/wf_fmod.c b/newlib/libm/math/wf_fmod.c index 320daabde..030ca3e7a 100644 --- a/newlib/libm/math/wf_fmod.c +++ b/newlib/libm/math/wf_fmod.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_fmodf(x,y); - if(_LIB_VERSION == _IEEE_ ||isnanf(y)||isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z; if(y==(float)0.0) { /* fmodf(x,0) */ exc.type = DOMAIN; diff --git a/newlib/libm/math/wf_j0.c b/newlib/libm/math/wf_j0.c index 0f3a7c1c6..1f7f5ede5 100644 --- a/newlib/libm/math/wf_j0.c +++ b/newlib/libm/math/wf_j0.c @@ -32,7 +32,7 @@ #else struct exception exc; float z = __ieee754_j0f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(fabsf(x)>(float)X_TLOSS) { /* j0f(|x|>X_TLOSS) */ exc.type = TLOSS; @@ -66,7 +66,7 @@ float z; struct exception exc; z = __ieee754_y0f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(x <= (float)0.0){ #ifndef HUGE_VAL #define HUGE_VAL inf diff --git a/newlib/libm/math/wf_j1.c b/newlib/libm/math/wf_j1.c index f9d3e0ed8..b91962881 100644 --- a/newlib/libm/math/wf_j1.c +++ b/newlib/libm/math/wf_j1.c @@ -34,7 +34,7 @@ float z; struct exception exc; z = __ieee754_j1f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(fabsf(x)>(float)X_TLOSS) { /* j1f(|x|>X_TLOSS) */ exc.type = TLOSS; @@ -68,7 +68,7 @@ float z; struct exception exc; z = __ieee754_y1f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(x <= (float)0.0){ /* y1f(0) = -inf or y1f(x<0) = NaN */ #ifndef HUGE_VAL diff --git a/newlib/libm/math/wf_jn.c b/newlib/libm/math/wf_jn.c index c3a52630b..837b6b703 100644 --- a/newlib/libm/math/wf_jn.c +++ b/newlib/libm/math/wf_jn.c @@ -30,7 +30,7 @@ float z; struct exception exc; z = __ieee754_jnf(n,x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(fabsf(x)>(float)X_TLOSS) { /* jnf(|x|>X_TLOSS) */ exc.type = TLOSS; @@ -65,7 +65,7 @@ float z; struct exception exc; z = __ieee754_ynf(n,x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(x <= (float)0.0){ /* ynf(n,0) = -inf or ynf(x<0) = NaN */ #ifndef HUGE_VAL diff --git a/newlib/libm/math/wf_log.c b/newlib/libm/math/wf_log.c index 989eeb335..4518b863b 100644 --- a/newlib/libm/math/wf_log.c +++ b/newlib/libm/math/wf_log.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_logf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x) || x > (float)0.0) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x) || x > (float)0.0) return z; #ifndef HUGE_VAL #define HUGE_VAL inf double inf = 0.0; diff --git a/newlib/libm/math/wf_log10.c b/newlib/libm/math/wf_log10.c index 41dd93a7b..11c595637 100644 --- a/newlib/libm/math/wf_log10.c +++ b/newlib/libm/math/wf_log10.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_log10f(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(x<=(float)0.0) { #ifndef HUGE_VAL #define HUGE_VAL inf diff --git a/newlib/libm/math/wf_pow.c b/newlib/libm/math/wf_pow.c index eaeed85ab..a30f8808e 100644 --- a/newlib/libm/math/wf_pow.c +++ b/newlib/libm/math/wf_pow.c @@ -33,8 +33,8 @@ float z; struct exception exc; z=__ieee754_powf(x,y); - if(_LIB_VERSION == _IEEE_|| isnanf(y)) return z; - if(isnanf(x)) { + if(_LIB_VERSION == _IEEE_|| isnan(y)) return z; + if(isnan(x)) { if(y==(float)0.0) { /* powf(NaN,0.0) */ /* error only if _LIB_VERSION == _SVID_ & _XOPEN_ */ @@ -97,7 +97,7 @@ } if(!finitef(z)) { if(finitef(x)&&finitef(y)) { - if(isnanf(z)) { + if(isnan(z)) { /* neg**non-integral */ exc.type = DOMAIN; exc.name = "powf"; diff --git a/newlib/libm/math/wf_remainder.c b/newlib/libm/math/wf_remainder.c index 0071a9772..f38c23785 100644 --- a/newlib/libm/math/wf_remainder.c +++ b/newlib/libm/math/wf_remainder.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_remainderf(x,y); - if(_LIB_VERSION == _IEEE_ || isnanf(y)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(y)) return z; if(y==(float)0.0) { /* remainderf(x,0) */ exc.type = DOMAIN; diff --git a/newlib/libm/math/wf_scalb.c b/newlib/libm/math/wf_scalb.c index bd2d9f8b4..d2c3cd2aa 100644 --- a/newlib/libm/math/wf_scalb.c +++ b/newlib/libm/math/wf_scalb.c @@ -50,7 +50,7 @@ struct exception exc; z = __ieee754_scalbf(x,fn); if(_LIB_VERSION == _IEEE_) return z; - if(!(finitef(z)||isnanf(z))&&finitef(x)) { + if(!(finitef(z)||isnan(z))&&finitef(x)) { /* scalbf overflow; SVID also returns +-HUGE_VAL */ exc.type = OVERFLOW; exc.name = "scalbf"; diff --git a/newlib/libm/math/wf_sqrt.c b/newlib/libm/math/wf_sqrt.c index 6e792c923..4536ba0ac 100644 --- a/newlib/libm/math/wf_sqrt.c +++ b/newlib/libm/math/wf_sqrt.c @@ -33,7 +33,7 @@ float z; struct exception exc; z = __ieee754_sqrtf(x); - if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z; + if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; if(x<(float)0.0) { /* sqrtf(negative) */ exc.type = DOMAIN; |