diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-06-12 16:55:51 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-06-12 16:55:51 -0400 |
commit | cddd2c295513ccd11c4dfbc17cb7365c1a1009d3 (patch) | |
tree | 91493c7c899e2738c540af82474bc458e9104e43 | |
parent | 44634107af38c667fa803f2a2797bb0aede3c171 (diff) | |
download | vecmathlib-cddd2c295513ccd11c4dfbc17cb7365c1a1009d3.zip vecmathlib-cddd2c295513ccd11c4dfbc17cb7365c1a1009d3.tar.gz |
Some QPX corrections/optimizations
-rw-r--r-- | vec_double_qpx.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vec_double_qpx.h b/vec_double_qpx.h index e4d14a2..8ffdf67 100644 --- a/vec_double_qpx.h +++ b/vec_double_qpx.h @@ -506,7 +506,11 @@ namespace vecmathlib { realvec operator+(realvec x) const { return vec_add(v, x.v); } realvec operator-(realvec x) const { return vec_sub(v, x.v); } realvec operator*(realvec x) const { return vec_mul(v, x.v); } - realvec operator/(realvec x) const { return vec_swdiv_nochk(v, x.v); } + realvec operator/(realvec x) const + { + // return vec_swdiv_nochk(v, x.v); + return div_fastd4(v, x.v); + } realvec& operator+=(realvec const& x) { return *this=*this+x; } realvec& operator-=(realvec const& x) { return *this=*this-x; } @@ -586,9 +590,9 @@ namespace vecmathlib { realvec log10() const { return log10d4(v); } realvec log1p() const { return log1pd4(v); } realvec log2() const { return log2d4(v); } - realvec nextafter(realvec y) const { return nexafterd4(v, y.v); } + realvec nextafter(realvec y) const { return MF::vml_nextafter(*this, y); } realvec pow(realvec y) const { return powd4(v, y.v); } - realvec rcp() const { return RV(1.0)/(*this); } + realvec rcp() const { return recip_fastd4(v); } realvec remainder(realvec y) const { return MF::vml_remainder(*this, y); } realvec rint() const { return MF::vml_rint(*this); } realvec round() const { return vec_round(v); } |