aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/math/w_cosh.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/math/w_cosh.c')
-rw-r--r--newlib/libm/math/w_cosh.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/newlib/libm/math/w_cosh.c b/newlib/libm/math/w_cosh.c
index e5b08df00..a26442178 100644
--- a/newlib/libm/math/w_cosh.c
+++ b/newlib/libm/math/w_cosh.c
@@ -41,9 +41,6 @@ RETURNS
an overflow, <<cosh>> returns the value <<HUGE_VAL>> with the
appropriate sign, and the global value <<errno>> is set to <<ERANGE>>.
- You can modify error handling for these functions using the
- function <<matherr>>.
-
PORTABILITY
<<cosh>> is ANSI.
<<coshf>> is an extension.
@@ -73,7 +70,6 @@ QUICKREF
return __ieee754_cosh(x);
#else
double z;
- struct exception exc;
z = __ieee754_cosh(x);
if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
if(fabs(x)>7.10475860073943863426e+02) {
@@ -84,22 +80,8 @@ QUICKREF
SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */
#endif
- exc.type = OVERFLOW;
- exc.name = "cosh";
- exc.err = 0;
- exc.arg1 = exc.arg2 = 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 exc.retval;
+ errno = ERANGE;
+ return HUGE_VAL;
} else
return z;
#endif