#include <iostream>
#include <iomanip>
-#ifdef BOOST_MSVC
+#ifdef _MSC_VER
#pragma warning(disable:4127)
#endif
//
// Returns false if value has guard digits that are non-zero
//
- boost::intmax_t shift = std::numeric_limits<T>::digits - ilogb(val) - 1;
+ std::intmax_t shift = std::numeric_limits<T>::digits - ilogb(val) - 1;
T shifted = scalbn(val, shift);
return floor(shifted) == shifted;
}
template <class T>
void test_values(const T& val, const char* name)
{
- static const T a = boost::lexical_cast<T>("1.3456724e22");
- static const T b = boost::lexical_cast<T>("1.3456724e-22");
+ static const T a = T("1.3456724e22");
+ static const T b = T("1.3456724e-22");
static const T z = 0;
static const T one = 1;
static const T radix = std::numeric_limits<T>::radix;
//test_values(boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::cpp_dec_float_50::backend_type> >(0), "cpp_dec_float_50");
// Faster, but no good for diagnosing the cause of any issues:
+ #ifndef BOOST_MATH_STANDALONE
test_values(boost::multiprecision::cpp_dec_float_50(0), "cpp_dec_float_50");
+ #endif
}