diff options
Diffstat (limited to 'newlib/libm/math/w_jn.c')
-rw-r--r-- | newlib/libm/math/w_jn.c | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/newlib/libm/math/w_jn.c b/newlib/libm/math/w_jn.c index 6cadc9a01..0482fa95a 100644 --- a/newlib/libm/math/w_jn.c +++ b/newlib/libm/math/w_jn.c @@ -53,25 +53,12 @@ return __ieee754_jn(n,x); #else double z; - struct exception exc; z = __ieee754_jn(n,x); if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(fabs(x)>X_TLOSS) { /* jn(|x|>X_TLOSS) */ - exc.type = TLOSS; - exc.name = "jn"; - exc.err = 0; - exc.arg1 = n; - 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 @@ -88,7 +75,6 @@ return __ieee754_yn(n,x); #else double z; - struct exception exc; z = __ieee754_yn(n,x); if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z; if(x <= 0.0){ @@ -99,40 +85,13 @@ SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */ #endif - exc.type = DOMAIN; /* should be SING for IEEE */ - exc.name = "yn"; - exc.err = 0; - exc.arg1 = n; - 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) { /* yn(x>X_TLOSS) */ - exc.type = TLOSS; - exc.name = "yn"; - exc.err = 0; - exc.arg1 = n; - 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 |