diff options
Diffstat (limited to 'newlib/libm/math/wf_cosh.c')
-rw-r--r-- | newlib/libm/math/wf_cosh.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/newlib/libm/math/wf_cosh.c b/newlib/libm/math/wf_cosh.c index 02eb12472..1b507b09b 100644 --- a/newlib/libm/math/wf_cosh.c +++ b/newlib/libm/math/wf_cosh.c @@ -31,10 +31,9 @@ return __ieee754_coshf(x); #else float z; - struct exception exc; z = __ieee754_coshf(x); if(_LIB_VERSION == _IEEE_ || isnan(x)) return z; - if(fabsf(x)>(float)8.9415985107e+01) { + if(fabsf(x)>8.9415985107e+01f) { /* coshf(finite) overflow */ #ifndef HUGE_VAL #define HUGE_VAL inf @@ -42,22 +41,8 @@ SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */ #endif - exc.type = OVERFLOW; - exc.name = "coshf"; - exc.err = 0; - exc.arg1 = exc.arg2 = (double)x; - if (_LIB_VERSION == _SVID_) - exc.retval = HUGE; - else - exc.retval = HUGE_VAL; - if (_LIB_VERSION == _POSIX_) - errno = ERANGE; - else if (!matherr(&exc)) { - errno = ERANGE; - } - if (exc.err != 0) - errno = exc.err; - return (float)exc.retval; + errno = ERANGE; + return (float)HUGE_VAL; } else return z; #endif |