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:
authorJeff Johnston <jjohnstn@redhat.com>2007-09-28 22:58:10 +0400
committerJeff Johnston <jjohnstn@redhat.com>2007-09-28 22:58:10 +0400
commit1671fbe1ca0825a77cb9137a08cf4ad8a48d0f95 (patch)
tree79e8a71cd7363e82effb317acda5cd10c04050c7 /newlib/libm/machine/spu/headers/acos.h
parente30a7b84aa1527df63f20fe0cb3605afab652d94 (diff)
2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
* libm/machine/spu/headers/dom_chkd_less_than.h: New file. * libm/machine/spu/headers/dom_chkd_negone_one.h: Ditto. * libm/machine/spu/headers/dom_chkf_less_than.h: Ditto. * libm/machine/spu/headers/dom_chkf_negone_one.h: Ditto. * libm/machine/spu/headers/acos.h: Add domain check. * libm/machine/spu/headers/acosf.h: Ditto. * libm/machine/spu/headers/acosh.h: Ditto. * libm/machine/spu/headers/acoshf.h: Ditto. * libm/machine/spu/headers/asin.h: Ditto. * libm/machine/spu/headers/asinf.h: Ditto. * libm/machine/spu/headers/atanh.h: Ditto. * libm/machine/spu/headers/atanhf.h: Ditto. * libm/machine/spu/headers/fmod.h: Ditto. * libm/machine/spu/headers/fmodf.h: Ditto. * libm/machine/spu/headers/log.h: Ditto. * libm/machine/spu/headers/log10.h: Ditto. * libm/machine/spu/headers/log1p.h: Ditto. * libm/machine/spu/headers/log1pf.h: Ditto. * libm/machine/spu/headers/log2.h: Ditto. * libm/machine/spu/headers/log2f.h: Ditto. * libm/machine/spu/headers/sqrt.h: Ditto. * libm/machine/spu/headers/sqrtf.h: Ditto. * libm/machine/spu/headers/tgamma.h: Ditto. * libm/machine/spu/headers/tgammaf.h: Ditto.
Diffstat (limited to 'newlib/libm/machine/spu/headers/acos.h')
-rw-r--r--newlib/libm/machine/spu/headers/acos.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/newlib/libm/machine/spu/headers/acos.h b/newlib/libm/machine/spu/headers/acos.h
index a647ef2d5..feec8c329 100644
--- a/newlib/libm/machine/spu/headers/acos.h
+++ b/newlib/libm/machine/spu/headers/acos.h
@@ -1,6 +1,18 @@
#include "headers/acosd2.h"
+#include "headers/dom_chkd_negone_one.h"
static __inline double _acos(double x)
{
- return spu_extract(_acosd2(spu_promote(x, 0)), 0);
+ double res;
+ vector double vx;
+
+ vx = spu_splats(x);
+ res = spu_extract(_acosd2(vx), 0);
+#ifndef _IEEE_LIBM
+ /*
+ * Domain error if not in the interval [-1, +1]
+ */
+ dom_chkd_negone_one(vx);
+#endif
+ return res;
}