2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-29 07:42:11 +00:00

Merge accumulated Boost.Math fixes from Trunk: predominantly fixes for expression template and or arbitrary precision types. Plus refactored test code to make it usable with types other than float/double/long double.

[SVN r76269]
This commit is contained in:
John Maddock
2012-01-02 11:21:41 +00:00
parent 6770ec305a
commit 1970b6c393
382 changed files with 57730 additions and 57443 deletions

View File

@@ -84,12 +84,12 @@ void test_spots()
//
// COS:
//
boost::array<boost::array<long double, 2>, 4> cos_test_data = {
boost::array<boost::array<long double, 2>, 4> cos_test_data = {{
0, 1,
0.125L, 0.992197667229329053149096907788250869543327304736601263468910L,
1.125L, 0.431176516798666176551969042921689826840697850225767471037314L,
1.75L, -0.178246055649492090382676943942631358969920851291548272886063L,
};
}};
unary_proc = std::cos;
inv_unary_proc = std::acos;
do_test_std_function(cos_test_data, "long double", "std::cos", "Mathematica data", unary_proc, "std::acos", inv_unary_proc);
@@ -99,14 +99,14 @@ void test_spots()
//
// SIN:
//
boost::array<boost::array<long double, 2>, 6> sin_test_data = {
boost::array<boost::array<long double, 2>, 6> sin_test_data = {{
0, 0,
0.125L, 0.124674733385227689957442708712108467587834905641679257885515L,
-0.125L, -0.124674733385227689957442708712108467587834905641679257885515L,
1.125L, 0.902267594099095162918416128654829100758989018716070814389152L,
1e-500L, 1e-500L,
1e-1500L, 1e-1500L,
};
}};
unary_proc = std::sin;
inv_unary_proc = std::asin;
do_test_std_function(sin_test_data, "long double", "std::sin", "Mathematica data", unary_proc, "std::asin", inv_unary_proc);
@@ -116,7 +116,7 @@ void test_spots()
//
// TAN:
//
boost::array<boost::array<long double, 2>, 7> tan_test_data = {
boost::array<boost::array<long double, 2>, 7> tan_test_data = {{
0, 0,
0.125L, 0.125655136575130967792678218629774000758665763892225542668867L,
-0.125L, -0.125655136575130967792678218629774000758665763892225542668867L,
@@ -128,7 +128,7 @@ void test_spots()
#else
0, 0,
#endif
};
}};
unary_proc = std::tan;
inv_unary_proc = std::atan;
do_test_std_function(tan_test_data, "long double", "std::tan", "Mathematica data", unary_proc, "std::atan", inv_unary_proc);
@@ -138,7 +138,7 @@ void test_spots()
//
// EXP:
//
boost::array<boost::array<long double, 2>, 16> exp_test_data = {
boost::array<boost::array<long double, 2>, 16> exp_test_data = {{
0, 1,
0.125L, 1.13314845306682631682900722781179387256550313174518162591282L,
-0.125L, 0.882496902584595402864892143229050736222004824990650741770309L,
@@ -164,7 +164,7 @@ void test_spots()
0, 1,
0, 1,
#endif
};
}};
unary_proc = std::exp;
inv_unary_proc = std::log;
do_test_std_function(exp_test_data, "long double", "std::exp", "Mathematica data", unary_proc, "std::log", inv_unary_proc);
@@ -174,7 +174,7 @@ void test_spots()
//
// SQRT:
//
boost::array<boost::array<long double, 2>, 8> sqrt_test_data = {
boost::array<boost::array<long double, 2>, 8> sqrt_test_data = {{
1, 1,
0.125L, 0.353553390593273762200422181052424519642417968844237018294170L,
1.125L, 1.06066017177982128660126654315727355892725390653271105488251L,
@@ -189,7 +189,7 @@ void test_spots()
1, 1,
1, 1,
#endif
};
}};
unary_proc = std::sqrt;
inv_unary_proc = 0;
do_test_std_function(sqrt_test_data, "long double", "std::sqrt", "Mathematica data", unary_proc, "", inv_unary_proc);