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