Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/machine/spu/headers/atanhf.h')
-rw-r--r--newlib/libm/machine/spu/headers/atanhf.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/newlib/libm/machine/spu/headers/atanhf.h b/newlib/libm/machine/spu/headers/atanhf.h
index e21dfefd1..f838c9f47 100644
--- a/newlib/libm/machine/spu/headers/atanhf.h
+++ b/newlib/libm/machine/spu/headers/atanhf.h
@@ -1,6 +1,18 @@
#include "headers/atanhf4.h"
+#include "headers/dom_chkf_negone_one.h"
static __inline float _atanhf(float x)
{
- return spu_extract(_atanhf4(spu_promote(x, 0)), 0);
+ float res;
+ vector float vx;
+
+ vx = spu_splats(x);
+ res = spu_extract(_atanhf4(vx), 0);
+#ifndef _IEEE_LIBM
+ /*
+ * Domain error if not in the interval [-1, +1]
+ */
+ dom_chkf_negone_one(vx);
+#endif
+ return res;
}