diff options
Diffstat (limited to 'newlib/libm/machine/spu/headers/acosf.h')
-rw-r--r-- | newlib/libm/machine/spu/headers/acosf.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/newlib/libm/machine/spu/headers/acosf.h b/newlib/libm/machine/spu/headers/acosf.h index ba93fa266..49ab628fc 100644 --- a/newlib/libm/machine/spu/headers/acosf.h +++ b/newlib/libm/machine/spu/headers/acosf.h @@ -1,6 +1,18 @@ #include "headers/acosf4.h" +#include "headers/dom_chkf_negone_one.h" static __inline float _acosf(float x) { - return spu_extract(_acosf4(spu_promote(x, 0)), 0); + float res; + vector float vx; + + vx = spu_splats(x); + res = spu_extract(_acosf4(vx), 0); +#ifndef _IEEE_LIBM + /* + * Domain error if not in the interval [-1, +1] + */ + dom_chkf_negone_one(vx); +#endif + return res; } |