#include <boost/multiprecision/cpp_bin_float.hpp>
#endif
+template <class T>
+struct has_poor_large_value_support
+{
+ static const bool value = false;
+};
+#ifdef TEST_CPP_DEC_FLOAT
+template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct has_poor_large_value_support<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >
+{
+ static const bool value = true;
+};
+#endif
+#ifdef TEST_CPP_BIN_FLOAT
+template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct has_poor_large_value_support<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >
+{
+ static const bool value = true;
+};
+#endif
+
template <class T>
void test()
{
}
}
std::cout << "Max error was: " << max_err << std::endl;
-}
+ if (has_poor_large_value_support<T>::value)
+ {
+ T bug_value = 12 / std::numeric_limits<T>::epsilon();
+ for (unsigned i = 0; i < 20; ++i, bug_value *= 1.1)
+ {
+ BOOST_TEST(tan(bug_value) == 0);
+ }
+ }
+
+}
int main()
{