aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/math/wf_acos.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/math/wf_acos.c')
-rw-r--r--newlib/libm/math/wf_acos.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/newlib/libm/math/wf_acos.c b/newlib/libm/math/wf_acos.c
index 8154c79..15d8699 100644
--- a/newlib/libm/math/wf_acos.c
+++ b/newlib/libm/math/wf_acos.c
@@ -26,24 +26,12 @@
return __ieee754_acosf(x);
#else
float z;
- struct exception exc;
z = __ieee754_acosf(x);
if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(fabsf(x)>(float)1.0) {
+ if(fabsf(x)>1.0f) {
/* acosf(|x|>1) */
- exc.type = DOMAIN;
- exc.name = "acosf";
- exc.err = 0;
- exc.arg1 = exc.arg2 = (double)x;
- exc.retval = nan("");
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- errno = EDOM;
- }
- if (exc.err != 0)
- errno = exc.err;
- return (float)exc.retval;
+ errno = EDOM;
+ return (float) nan("");
} else
return z;
#endif