Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop

This commit is contained in:
jzmaddock
2016-06-05 18:31:22 +01:00
12 changed files with 75 additions and 11 deletions

View File

@@ -488,7 +488,6 @@ struct expression<terminal, Arg1, void, void, void>
result_type r(*this);
return static_cast<bool>(r);
}
explicit operator void()const {}
# endif
#else
operator unmentionable_type()const
@@ -556,7 +555,6 @@ struct expression<tag, Arg1, Arg2, void, void>
result_type r(*this);
return static_cast<bool>(r);
}
explicit operator void()const {}
# endif
#else
operator unmentionable_type()const
@@ -635,7 +633,6 @@ struct expression<tag, Arg1, Arg2, Arg3, void>
result_type r(*this);
return static_cast<bool>(r);
}
explicit operator void()const {}
# endif
#else
operator unmentionable_type()const
@@ -723,7 +720,6 @@ struct expression
result_type r(*this);
return static_cast<bool>(r);
}
explicit operator void()const {}
# endif
#else
operator unmentionable_type()const

View File

@@ -6,7 +6,7 @@
#ifndef BOOST_MP_MR_HPP
#define BOOST_MP_MR_HPP
#include <boost/multiprecision/random.hpp>
#include <boost/random.hpp>
#include <boost/multiprecision/integer.hpp>
namespace boost{

View File

@@ -10,6 +10,7 @@
#endif
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#undef BOOST_MATH_SMALL_CONSTANT
#define BOOST_MATH_SMALL_CONSTANT(x) x
#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) \

View File

@@ -18,6 +18,13 @@ void expected_results()
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*RJ.*", // test data group
".*", 40000, 4000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
@@ -25,6 +32,20 @@ void expected_results()
".*", // test type(s)
".*RJ.*", // test data group
".*", 2700, 250); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*RC.*", // test data group
".*", 7000, 1000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*RF.*", // test data group
".*", 12000, 700); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -17,6 +17,20 @@ void expected_results()
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*RJ.*", // test data group
".*", 40000, 4000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*RC.*", // test data group
".*", 7000, 1000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -24,6 +24,13 @@ void expected_results()
".*", // test type(s)
".*RJ.*", // test data group
".*", 2700, 250); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*RD: y = z", // test data group
".*", 120, 30); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -17,6 +17,13 @@ void expected_results()
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
"RG: two values the same", // test data group
".*", 10000, 700); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -29,7 +29,7 @@ void expected_results()
".*", // platform
".*", // test type(s)
".*", // test data group
".*", 40, 20); // test function
".*", 70, 20); // test function
//
// Finish off by printing out the compiler/stdlib/platform names,
// we do this to make it easier to mark up expected error rates.

View File

@@ -37,6 +37,13 @@ void expected_results()
".*mpfr_float_backend<0>.*", // test type(s)
".*Mathworld.*", // test data group
".*", 10000, 3000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*", // test data group
".*", 10000, 1200); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -36,7 +36,7 @@ void expected_results()
".*", // platform
".*", // test type(s)
"factorials", // test data group
"tgamma", 140, 70); // test function
"tgamma", 170, 70); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -25,6 +25,13 @@ void expected_results()
".*mpfr_float_backend<0>.*", // test type(s)
".*", // test data group
".*", 20000000, 1000000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*gmp_float<0>.*", // test type(s)
".*", // test data group
".*", 20000000, 1000000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -414,8 +414,10 @@ void test_integer_ops(const boost::mpl::int_<boost::multiprecision::number_kind_
BOOST_CHECK_EQUAL(a , 20 % 7);
#endif
a = 20;
BOOST_CHECK_EQUAL(++a , 21);
BOOST_CHECK_EQUAL(--a , 20);
++a;
BOOST_CHECK_EQUAL(a , 21);
--a;
BOOST_CHECK_EQUAL(a , 20);
BOOST_CHECK_EQUAL(a++ , 20);
BOOST_CHECK_EQUAL(a , 21);
BOOST_CHECK_EQUAL(a-- , 21);
@@ -449,9 +451,11 @@ void test_integer_ops(const boost::mpl::int_<boost::multiprecision::number_kind_
#endif
// Unless they fit within range:
a = 2000L;
BOOST_CHECK_EQUAL((a <<= 20uLL) , (2000L << 20));
a <<= 20uLL;
BOOST_CHECK_EQUAL(a, (2000L << 20));
a = 2000;
BOOST_CHECK_EQUAL((a <<= 20LL) , (2000L << 20));
a <<= 20LL;
BOOST_CHECK_EQUAL(a, (2000L << 20));
#ifndef BOOST_NO_EXCEPTIONS
BOOST_CHECK_THROW(Real(a >> (1uLL << (sizeof(long long) * CHAR_BIT - 2))), std::out_of_range);