summaryrefslogtreecommitdiffstats
path: root/newlib/libm/machine/spu/headers/sqrtf.h
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-09-28 18:58:10 +0000
committerJeff Johnston <jjohnstn@redhat.com>2007-09-28 18:58:10 +0000
commit1671fbe1ca0825a77cb9137a08cf4ad8a48d0f95 (patch)
tree79e8a71cd7363e82effb317acda5cd10c04050c7 /newlib/libm/machine/spu/headers/sqrtf.h
parente30a7b84aa1527df63f20fe0cb3605afab652d94 (diff)
downloadcygnal-1671fbe1ca0825a77cb9137a08cf4ad8a48d0f95.tar.gz
cygnal-1671fbe1ca0825a77cb9137a08cf4ad8a48d0f95.tar.bz2
cygnal-1671fbe1ca0825a77cb9137a08cf4ad8a48d0f95.zip
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/sqrtf.h')
-rw-r--r--newlib/libm/machine/spu/headers/sqrtf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/newlib/libm/machine/spu/headers/sqrtf.h b/newlib/libm/machine/spu/headers/sqrtf.h
index 4ef91428b..c1f5ab223 100644
--- a/newlib/libm/machine/spu/headers/sqrtf.h
+++ b/newlib/libm/machine/spu/headers/sqrtf.h
@@ -1,6 +1,16 @@
#include "headers/sqrtf4.h"
+#include "headers/dom_chkf_less_than.h"
static __inline float _sqrtf(float in)
{
- return spu_extract(_sqrtf4(spu_promote(in, 0)), 0);
+ float res;
+ vector float vx;
+ vector float vc = { 0.0, 0.0, 0.0, 0.0 };
+
+ vx = spu_promote(in, 0);
+ res = spu_extract(_sqrtf4(vx), 0);
+#ifndef _IEEE_LIBM
+ dom_chkf_less_than(vx, vc);
+#endif
+ return res;
}