summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-11-28 09:40:04 -0500
committerErik Schnetter <schnetter@gmail.com>2013-11-28 09:40:04 -0500
commitdc22b1e0187b35f131c82350a946c97c4d2dd913 (patch)
tree165f98bcf4c8fa37ae9568fc241c9ab9bd5d3a57
parent2d47971cd11677ede752786be93ad821ef2d8e87 (diff)
downloadvecmathlib-dc22b1e0187b35f131c82350a946c97c4d2dd913.zip
vecmathlib-dc22b1e0187b35f131c82350a946c97c4d2dd913.tar.gz
Add to-do items
-rw-r--r--mathfuncs_exp.h3
-rw-r--r--mathfuncs_fabs.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/mathfuncs_exp.h b/mathfuncs_exp.h
index c7a1498..d357a21 100644
--- a/mathfuncs_exp.h
+++ b/mathfuncs_exp.h
@@ -14,6 +14,9 @@ namespace vecmathlib {
template<typename realvec_t>
realvec_t mathfuncs<realvec_t>::vml_exp2(realvec_t x)
{
+ // TODO: Check SLEEF 2.80 algorithm
+ // (in particular the improved-precision truncation)
+
// Rescale
realvec_t x0 = x;
diff --git a/mathfuncs_fabs.h b/mathfuncs_fabs.h
index baf5f33..4baec9b 100644
--- a/mathfuncs_fabs.h
+++ b/mathfuncs_fabs.h
@@ -76,6 +76,7 @@ namespace vecmathlib {
template<typename realvec_t>
typename realvec_t::intvec_t mathfuncs<realvec_t>::vml_ilogb(realvec_t x)
{
+ // TODO: Check SLEEF 2.80 algorithm
intvec_t e = lsr(as_int(x) & IV(FP::exponent_mask), FP::mantissa_bits);
intvec_t r = e - IV(FP::exponent_offset);
r = ifthen(convert_bool(e), r, IV(std::numeric_limits<int_t>::min()));
@@ -164,6 +165,7 @@ namespace vecmathlib {
template<typename realvec_t>
realvec_t mathfuncs<realvec_t>::vml_ldexp(realvec_t x, intvec_t n)
{
+ // TODO: Check SLEEF 2.80 algorithm
realvec_t r = as_float(as_int(x) + (n << I(FP::mantissa_bits)));
r = ifthen((as_int(x) & IV(FP::exponent_mask)) == IV(I(0)), x, r);
return r;
OpenPOWER on IntegriCloud