Fix test failures for special functions.

This commit is contained in:
jzmaddock
2015-06-04 13:17:29 +01:00
parent fec524f93a
commit f866903e9d
8 changed files with 217 additions and 0 deletions

View File

@@ -698,7 +698,9 @@ if $(enable-specfun)
<define>TEST_MPFR_50
<optimization>speed
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_mpfr ;
run $(source) gmp
@@ -712,7 +714,9 @@ if $(enable-specfun)
<optimization>speed
<define>TEST_MPF_50
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_mpf ;
run $(source) /boost/test//boost_unit_test_framework/<link>static
@@ -723,8 +727,10 @@ if $(enable-specfun)
: # requirements
<define>TEST_CPP_DEC_FLOAT
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<optimization>speed
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_cpp_dec_float ;
run $(source) /boost/test//boost_unit_test_framework/<link>static
@@ -735,8 +741,10 @@ if $(enable-specfun)
: # requirements
<define>TEST_CPP_BIN_FLOAT
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<optimization>speed
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_cpp_bin_float ;
run $(source) quadmath
@@ -750,7 +758,9 @@ if $(enable-specfun)
<optimization>speed
<define>TEST_FLOAT128
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_float128 ;
run $(source)
@@ -764,7 +774,9 @@ if $(enable-specfun)
<optimization>speed
<define>TEST_FLOAT128
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<toolset>msvc:<cxxflags>-bigobj
<include>../../math/include_private
release
: $(source:B)_intel_quad ;
}
@@ -782,8 +794,10 @@ if $(enable-specfun)
: # requirements
<optimization>speed
<define>BOOST_ALL_NO_LIB
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
<toolset>msvc:<cxxflags>-bigobj
[ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
<include>../../math/include_private
release ;
}
}

View File

@@ -33,6 +33,7 @@ project : requirements
<toolset>gcc:<cxxflags>-Wall
<toolset>gcc:<cxxflags>-Wextra
<toolset>intel:<define>SLOW_COMPILER
<define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
;
lib gmp : : <search>$(gmp_path) ;

View File

@@ -0,0 +1,63 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
#define TEST1
#include <boost/math/special_functions/math_fwd.hpp>
#include <boost/math/special_functions/ellint_rf.hpp>
#include "libs/math/test/test_carlson.hpp"
void expected_results()
{
//
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*RJ.*", // test data group
".*", 2700, 250); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*", // test data group
".*", 40, 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.
//
std::cout << "Tests run with " << BOOST_COMPILER << ", "
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
template <class T>
void test(T t, const char* p)
{
test_spots(t, p);
}
BOOST_AUTO_TEST_CASE( test_main )
{
using namespace boost::multiprecision;
expected_results();
//
// Test at:
// 18 decimal digits: tests 80-bit long double approximations
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
ALL_TESTS
}

View File

@@ -6,6 +6,7 @@
#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
#define TEST2
#include <boost/math/special_functions/math_fwd.hpp>
#include "libs/math/test/test_carlson.hpp"

View File

@@ -0,0 +1,62 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
#define TEST3
#include <boost/math/special_functions/math_fwd.hpp>
#include "libs/math/test/test_carlson.hpp"
void expected_results()
{
//
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*RJ.*", // test data group
".*", 2700, 250); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*", // test data group
".*", 40, 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.
//
std::cout << "Tests run with " << BOOST_COMPILER << ", "
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
template <class T>
void test(T t, const char* p)
{
test_spots(t, p);
}
BOOST_AUTO_TEST_CASE( test_main )
{
using namespace boost::multiprecision;
expected_results();
//
// Test at:
// 18 decimal digits: tests 80-bit long double approximations
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
ALL_TESTS
}

View File

@@ -0,0 +1,62 @@
///////////////////////////////////////////////////////////////
// Copyright 2011 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
#define TEST4
#include <boost/math/special_functions/math_fwd.hpp>
#include "libs/math/test/test_carlson.hpp"
void expected_results()
{
//
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*RJ.*", // test data group
".*", 2700, 250); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*", // test data group
".*", 40, 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.
//
std::cout << "Tests run with " << BOOST_COMPILER << ", "
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
template <class T>
void test(T t, const char* p)
{
test_spots(t, p);
}
BOOST_AUTO_TEST_CASE( test_main )
{
using namespace boost::multiprecision;
expected_results();
//
// Test at:
// 18 decimal digits: tests 80-bit long double approximations
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
ALL_TESTS
}

View File

@@ -30,6 +30,13 @@ void expected_results()
".*", // test type(s)
".*Negative.*", // test data group
".*", 350, 40); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*cpp_dec_float.*", // test type(s)
".*Near the Positive Root.*", // test data group
".*", 2500, 200); // test function
add_expected_result(
".*", // compiler
".*", // stdlib

View File

@@ -37,6 +37,13 @@ void expected_results()
".*", // test type(s)
".*Large.*", // test data group
".*", 75, 40); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
".*cpp_bin_float_quad.*", // test type(s)
".*Mathworld.*", // test data group
".*", 500, 100); // test function
#ifdef BOOST_INTEL
add_expected_result(
".*", // compiler