aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/math/w_j1.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/math/w_j1.c')
-rw-r--r--newlib/libm/math/w_j1.c50
1 files changed, 6 insertions, 44 deletions
diff --git a/newlib/libm/math/w_j1.c b/newlib/libm/math/w_j1.c
index ba7df1566..127324aad 100644
--- a/newlib/libm/math/w_j1.c
+++ b/newlib/libm/math/w_j1.c
@@ -31,24 +31,12 @@
return __ieee754_j1(x);
#else
double z;
- struct exception exc;
z = __ieee754_j1(x);
if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
if(fabs(x)>X_TLOSS) {
/* j1(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = "j1";
- exc.err = 0;
- exc.arg1 = exc.arg2 = x;
- exc.retval = 0.0;
- 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 0.0;
} else
return z;
#endif
@@ -65,7 +53,6 @@
return __ieee754_y1(x);
#else
double z;
- struct exception exc;
z = __ieee754_y1(x);
if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
if(x <= 0.0){
@@ -76,38 +63,13 @@
SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */
#endif
/* y1(0) = -inf or y1(x<0) = NaN */
- exc.type = DOMAIN; /* should be SING for IEEE */
- exc.name = "y1";
- 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 = EDOM;
- else if (!matherr(&exc)) {
- errno = EDOM;
- }
- if (exc.err != 0)
- errno = exc.err;
- return exc.retval;
+ errno = EDOM;
+ return -HUGE_VAL;
}
if(x>X_TLOSS) {
/* y1(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = "y1";
- exc.err = 0;
- exc.arg1 = exc.arg2 = x;
- exc.retval = 0.0;
- 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 0.0;
} else
return z;
#endif