diff options
Diffstat (limited to 'sysdeps/libm-ieee754/k_standard.c')
-rw-r--r-- | sysdeps/libm-ieee754/k_standard.c | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/libm-ieee754/k_standard.c index 644108e7a0..35026faa9d 100644 --- a/sysdeps/libm-ieee754/k_standard.c +++ b/sysdeps/libm-ieee754/k_standard.c @@ -111,12 +111,12 @@ static double zero = 0.0; /* used as const */ ? "acosf" : "acosl");; exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("acos: DOMAIN error\n", 19); } - errno = EDOM; + __set_errno (EDOM); } break; case 2: @@ -128,12 +128,12 @@ static double zero = 0.0; /* used as const */ ? "asinf" : "asinl"); exc.retval = zero; if(_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("asin: DOMAIN error\n", 19); } - errno = EDOM; + __set_errno (EDOM); } break; case 3: @@ -147,12 +147,12 @@ static double zero = 0.0; /* used as const */ ? "atan2f" : "atan2l"); exc.retval = zero; if(_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("atan2: DOMAIN error\n", 20); } - errno = EDOM; + __set_errno (EDOM); } break; case 4: @@ -167,9 +167,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 5: @@ -184,9 +184,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 6: @@ -201,9 +201,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 7: @@ -215,9 +215,9 @@ static double zero = 0.0; /* used as const */ ? "expf" : "expl"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 8: @@ -231,12 +231,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y0: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 9: @@ -250,12 +250,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y0: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 10: @@ -269,12 +269,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y1: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 11: @@ -288,12 +288,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y1: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 12: @@ -307,12 +307,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("yn: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 13: @@ -326,12 +326,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("yn: DOMAIN error\n", 17); } - errno = EDOM; + __set_errno (EDOM); } break; case 14: @@ -346,9 +346,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 15: @@ -363,12 +363,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("lgamma: SING error\n", 19); } - errno = EDOM; + __set_errno (EDOM); } break; case 16: @@ -382,12 +382,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log: SING error\n", 16); } - errno = EDOM; + __set_errno (EDOM); } break; case 17: @@ -401,12 +401,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log: DOMAIN error\n", 18); } - errno = EDOM; + __set_errno (EDOM); } break; case 18: @@ -421,12 +421,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log10: SING error\n", 18); } - errno = EDOM; + __set_errno (EDOM); } break; case 19: @@ -441,12 +441,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log10: DOMAIN error\n", 20); } - errno = EDOM; + __set_errno (EDOM); } break; case 20: @@ -460,7 +460,7 @@ static double zero = 0.0; /* used as const */ if (_LIB_VERSION != _SVID_) exc.retval = 1.0; else if (!__matherr(&exc)) { (void) WRITE2("pow(0,0): DOMAIN error\n", 23); - errno = EDOM; + __set_errno (EDOM); } break; case 21: @@ -479,9 +479,9 @@ static double zero = 0.0; /* used as const */ if(x<zero&&__rint(y)!=y) exc.retval = -HUGE_VAL; } if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 22: @@ -492,9 +492,9 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "pow" : (type < 200 ? "powf" : "powl"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 23: @@ -508,12 +508,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("pow(0,neg): DOMAIN error\n", 25); } - errno = EDOM; + __set_errno (EDOM); } break; case 24: @@ -527,12 +527,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = zero/zero; /* X/Open allow NaN */ if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("neg**non-integral: DOMAIN error\n", 32); } - errno = EDOM; + __set_errno (EDOM); } break; case 25: @@ -547,9 +547,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL); if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 26: @@ -564,12 +564,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("sqrt: DOMAIN error\n", 19); } - errno = EDOM; + __set_errno (EDOM); } break; case 27: @@ -584,12 +584,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("fmod: DOMAIN error\n", 20); } - errno = EDOM; + __set_errno (EDOM); } break; case 28: @@ -602,12 +602,12 @@ static double zero = 0.0; /* used as const */ : "remainderl"); exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("remainder: DOMAIN error\n", 24); } - errno = EDOM; + __set_errno (EDOM); } break; case 29: @@ -619,12 +619,12 @@ static double zero = 0.0; /* used as const */ ? "acoshf" : "acoshl"); exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("acosh: DOMAIN error\n", 20); } - errno = EDOM; + __set_errno (EDOM); } break; case 30: @@ -636,12 +636,12 @@ static double zero = 0.0; /* used as const */ ? "atanhf" : "atanhl"); exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("atanh: DOMAIN error\n", 20); } - errno = EDOM; + __set_errno (EDOM); } break; case 31: @@ -653,12 +653,12 @@ static double zero = 0.0; /* used as const */ ? "atanhf" : "atanhl"); exc.retval = x/zero; /* sign(x)*inf */ if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("atanh: SING error\n", 18); } - errno = EDOM; + __set_errno (EDOM); } break; case 32: @@ -670,9 +670,9 @@ static double zero = 0.0; /* used as const */ ? "scalbf" : "scalbl"); exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 33: @@ -684,9 +684,9 @@ static double zero = 0.0; /* used as const */ ? "scalbf" : "scalbl"); exc.retval = __copysign(zero,x); if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 34: @@ -697,13 +697,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "j0" : (type < 200 ? "j0f" : "j0l"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 35: @@ -714,13 +714,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "y0" : (type < 200 ? "y0f" : "y0l"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 36: @@ -731,13 +731,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "j1" : (type < 200 ? "j1f" : "j1l"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 37: @@ -748,13 +748,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "y1" : (type < 200 ? "y1f" : "y1l"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 38: @@ -765,13 +765,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "jn" : (type < 200 ? "jnf" : "jnl"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 39: @@ -782,13 +782,13 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "yn" : (type < 200 ? "ynf" : "ynl"); exc.retval = zero; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); } - errno = ERANGE; + __set_errno (ERANGE); } break; case 40: @@ -803,9 +803,9 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = ERANGE; + __set_errno (ERANGE); else if (!__matherr(&exc)) { - errno = ERANGE; + __set_errno (ERANGE); } break; case 41: @@ -820,12 +820,12 @@ static double zero = 0.0; /* used as const */ else exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) - errno = EDOM; + __set_errno (EDOM); else if (!__matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("gamma: SING error\n", 18); } - errno = EDOM; + __set_errno (EDOM); } break; case 42: @@ -839,7 +839,7 @@ static double zero = 0.0; /* used as const */ if (_LIB_VERSION == _IEEE_ || _LIB_VERSION == _POSIX_) exc.retval = 1.0; else if (!__matherr(&exc)) { - errno = EDOM; + __set_errno (EDOM); } break; } |