diff --git a/include/universal/number/dd/dd.hpp b/include/universal/number/dd/dd.hpp index 7d3c48d47..75b500063 100644 --- a/include/universal/number/dd/dd.hpp +++ b/include/universal/number/dd/dd.hpp @@ -57,15 +57,13 @@ #include #include - - //////////////////////////////////////////////////////////////////////////////////////// /// INCLUDE FILES that make up the library #include #include #include -#include #include +#include // useful functions to work with doubledoubles #include diff --git a/include/universal/number/dd/dd_impl.hpp b/include/universal/number/dd/dd_impl.hpp index 97fc44997..447835683 100644 --- a/include/universal/number/dd/dd_impl.hpp +++ b/include/universal/number/dd/dd_impl.hpp @@ -427,6 +427,7 @@ class dd { (InfType == INF_TYPE_NEGATIVE ? isNegInf : (InfType == INF_TYPE_POSITIVE ? isPosInf : false))); } + BIT_CAST_CONSTEXPR bool isfinite() const noexcept { return std::isfinite(hi); } constexpr bool sign() const noexcept { return (hi < 0.0); } constexpr int scale() const noexcept { return _extractExponent(hi); } @@ -1274,7 +1275,7 @@ inline dd reciprocal(const dd& a) { // power functions dd cbrt(const dd& a) { - if (!isfinite(a) || a.iszero()) + if (!a.isfinite() || a.iszero()) return a; // NaN returns NaN; +/-Inf returns +/-Inf, +/-0.0 returns +/-0.0 bool signA = signbit(a);