2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Fix gcc-4.8.x warnings.

Fix some Mingw failures.
Fixes #8855.

[SVN r85131]
This commit is contained in:
John Maddock
2013-07-23 11:09:47 +00:00
parent 30193aee08
commit 7858278bec
41 changed files with 54 additions and 80 deletions

View File

@@ -13,6 +13,7 @@ project
#<toolset>intel-linux:<pch>off
<toolset>intel-darwin:<pch>off
<toolset>msvc-7.1:<pch>off
<toolset>gcc-mingw:<pch>off
#<toolset>gcc:<cxxflags>-fvisibility=hidden
<toolset>intel-linux:<cxxflags>-fvisibility=hidden
<toolset>sun:<cxxflags>-xldscope=hidden

View File

@@ -286,7 +286,7 @@ namespace detail
// Define the distribution, using gamma_nooverflow:
typedef gamma_distribution<RealType, no_overthrow_policy> gamma_nooverflow;
gamma_distribution<RealType, no_overthrow_policy> g(static_cast<RealType>(0.5), static_cast<RealType>(1.));
gamma_nooverflow g(static_cast<RealType>(0.5), static_cast<RealType>(1.));
// gamma_nooverflow g(static_cast<RealType>(0.5), static_cast<RealType>(1.));
// R qgamma(0.2, 0.5, 1) 0.0320923

View File

@@ -348,7 +348,7 @@ inline T airy_ai_zero(unsigned m, const Policy& pol)
policies::discrete_quantile<>,
policies::assert_undefined<> >::type forwarding_policy;
BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits<T>::is_integer, "Airy return type must be a floating-point type.");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_ai_zero_imp<T>(m, pol), "boost::math::airy_ai_zero<%1%>(unsigned)");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_ai_zero_imp<value_type>(m, forwarding_policy()), "boost::math::airy_ai_zero<%1%>(unsigned)");
}
template <class T>
@@ -396,7 +396,7 @@ inline T airy_bi_zero(unsigned m, const Policy& pol)
policies::discrete_quantile<>,
policies::assert_undefined<> >::type forwarding_policy;
BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits<T>::is_integer, "Airy return type must be a floating-point type.");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_bi_zero_imp<T>(m, pol), "boost::math::airy_bi_zero<%1%>(unsigned)");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_bi_zero_imp<value_type>(m, forwarding_policy()), "boost::math::airy_bi_zero<%1%>(unsigned)");
}
template <typename T>

View File

@@ -1331,7 +1331,6 @@ inline typename tools::promote_args<RT1, RT2, RT3>::type
BOOST_FPU_EXCEPTION_GUARD
typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
typedef typename policies::evaluation<result_type, Policy>::type value_type;
typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
typedef typename policies::normalise<
Policy,
policies::promote_float<false>,
@@ -1349,7 +1348,6 @@ inline typename tools::promote_args<RT1, RT2, RT3>::type
BOOST_FPU_EXCEPTION_GUARD
typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
typedef typename policies::evaluation<result_type, Policy>::type value_type;
typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
typedef typename policies::normalise<
Policy,
policies::promote_float<false>,

View File

@@ -36,6 +36,7 @@ project
<toolset>msvc:<cxxflags>/wd4189 # local variable is initialized but not referenced
<toolset>msvc-7.1:<source>../vc71_fix//vc_fix
<toolset>msvc-7.1:<pch>off
<toolset>gcc-mingw:<pch>off
<toolset>borland:<runtime-link>static
# <toolset>msvc:<cxxflags>/wd4506 has no effect?
# suppress xstring(237) : warning C4506: no definition for inline function

View File

@@ -28,10 +28,20 @@ inline void check_result_imp(boost::long_long_type, boost::long_long_type){}
#endif
inline void check_result_imp(bool, bool){}
//
// If the compiler warns about unused typedefs then enable this:
//
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
# define BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
#else
# define BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE
#endif
template <class T1, class T2>
inline void check_result_imp(T1, T2)
{
typedef int static_assertion[sizeof(T1) == 0xFFFF];
// This is a static assertion that should always fail to compile...
typedef BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE int static_assertion[sizeof(T1) == 0xFFFF];
}
template <class T1, class T2>

View File

@@ -14,7 +14,6 @@
template <class Real, class T>
void do_test(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);

View File

@@ -74,6 +74,13 @@ void expected_results()
".*Random.*", // test data group
".*", 400, 200); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Win32.*", // platform
largest_type, // test type(s)
".*Random.*", // test data group
".*", 400, 200); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib

View File

@@ -32,7 +32,6 @@ T cyl_bessel_i_int_wrapper(T v, T x)
template <class Real, class T>
void do_test_cyl_bessel_i(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -80,7 +79,6 @@ void do_test_cyl_bessel_i(const T& data, const char* type_name, const char* test
template <class Real, class T>
void do_test_cyl_bessel_i_int(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -25,7 +25,6 @@
template <class Real, class T>
void do_test_cyl_bessel_j(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -78,7 +77,6 @@ T cyl_bessel_j_int_wrapper(T v, T x)
template <class Real, class T>
void do_test_cyl_bessel_j_int(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -107,7 +105,6 @@ void do_test_cyl_bessel_j_int(const T& data, const char* type_name, const char*
template <class Real, class T>
void do_test_sph_bessel_j(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, value_type);
@@ -117,8 +114,6 @@ void do_test_sph_bessel_j(const T& data, const char* type_name, const char* test
pg funcp = boost::math::sph_bessel;
#endif
typedef int (*cast_t)(value_type);
boost::math::tools::test_result<value_type> result;
std::cout << "Testing " << test_name << " with type " << type_name

View File

@@ -32,7 +32,6 @@ T cyl_bessel_k_int_wrapper(T v, T x)
template <class Real, class T>
void do_test_cyl_bessel_k(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -78,7 +77,6 @@ void do_test_cyl_bessel_k(const T& data, const char* type_name, const char* test
template <class Real, class T>
void do_test_cyl_bessel_k_int(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -25,7 +25,6 @@
template <class Real, class T>
void do_test_cyl_neumann_y(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -77,7 +76,6 @@ T cyl_neumann_int_wrapper(T v, T x)
template <class Real, class T>
void do_test_cyl_neumann_y_int(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -106,7 +104,6 @@ void do_test_cyl_neumann_y_int(const T& data, const char* type_name, const char*
template <class Real, class T>
void do_test_sph_neumann_y(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, value_type);
@@ -116,8 +113,6 @@ void do_test_sph_neumann_y(const T& data, const char* type_name, const char* tes
pg funcp = boost::math::sph_neumann;
#endif
typedef int (*cast_t)(value_type);
boost::math::tools::test_result<value_type> result;
std::cout << "Testing " << test_name << " with type " << type_name

View File

@@ -35,7 +35,6 @@
template <class Real, class T>
void do_test_beta(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -24,7 +24,6 @@
template <class Real, typename T>
void do_test_ellint_rf(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -50,7 +49,6 @@ void do_test_ellint_rf(T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_rc(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -76,7 +74,6 @@ void do_test_ellint_rc(T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_rj(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -102,7 +99,6 @@ void do_test_ellint_rj(T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_rd(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;

View File

@@ -38,7 +38,6 @@ struct negative_cbrt
template <class Real, class T>
void do_test_cbrt(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);

View File

@@ -22,7 +22,6 @@
template <class Real, class T>
void do_test_digamma(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);

View File

@@ -27,7 +27,6 @@
template <class Real, typename T>
void do_test_ellint_f(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -53,8 +52,7 @@ void do_test_ellint_f(T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_k(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef Real value_type;
boost::math::tools::test_result<value_type> result;
std::cout << "Testing: " << test << std::endl;

View File

@@ -27,7 +27,6 @@
template <class Real, typename T>
void do_test_ellint_e2(const T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -52,8 +51,7 @@ void do_test_ellint_e2(const T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_e1(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef Real value_type;
boost::math::tools::test_result<value_type> result;
std::cout << "Testing: " << test << std::endl;

View File

@@ -28,7 +28,6 @@
template <class Real, typename T>
void do_test_ellint_pi3(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -54,7 +53,6 @@ void do_test_ellint_pi3(T& data, const char* type_name, const char* test)
template <class Real, typename T>
void do_test_ellint_pi2(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;

View File

@@ -25,7 +25,6 @@
template <class Real, class T>
void do_test_erf(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);
@@ -87,7 +86,6 @@ void do_test_erf(const T& data, const char* type_name, const char* test_name)
template <class Real, class T>
void do_test_erf_inv(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);
@@ -114,7 +112,6 @@ void do_test_erf_inv(const T& data, const char* type_name, const char* test_name
template <class Real, class T>
void do_test_erfc_inv(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);

View File

@@ -46,7 +46,6 @@ void do_test_expint(const T& data, const char* type_name, const char* test_name)
// test En(T) against data:
//
using namespace std;
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << test_name << " with type " << type_name << std::endl;
@@ -91,7 +90,6 @@ void do_test_expint_Ei(const T& data, const char* type_name, const char* test_na
// test Ei(T) against data:
//
using namespace std;
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << test_name << " with type " << type_name << std::endl;

View File

@@ -76,7 +76,7 @@ void expected_results()
"Win32.*", // platform
"real_concept", // test type(s)
"factorials", // test data group
"boost::math::tgamma", 200, 100); // test function
"boost::math::tgamma", 250, 100); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib

View File

@@ -29,7 +29,6 @@
template <class Real, class T>
void do_test_gamma(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);
@@ -92,7 +91,6 @@ void do_test_gamma(const T& data, const char* type_name, const char* test_name)
template <class Real, class T>
void do_test_gammap1m1(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type);

View File

@@ -31,7 +31,6 @@
template <class Real, class T>
void do_test_hermite(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, value_type);
@@ -41,8 +40,6 @@ void do_test_hermite(const T& data, const char* type_name, const char* test_name
pg funcp = boost::math::hermite;
#endif
typedef unsigned (*cast_t)(value_type);
boost::math::tools::test_result<value_type> result;
std::cout << "Testing " << test_name << " with type " << type_name

View File

@@ -147,7 +147,6 @@ void do_test_hypergeometric(const T& data, const char* type_name, const char* te
(void)test_name;
#if !defined(TEST_QUANT) || (TEST_QUANT == 0)
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type, value_type, value_type);
@@ -207,7 +206,6 @@ void do_test_hypergeometric(const T& data, const char* type_name, const char* te
template <class Real, class T>
void do_test_hypergeometric_quantile(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Checking quantiles with " << test_name << " with type " << type_name

View File

@@ -231,7 +231,7 @@ void expected_results()
"[^|]*", // platform
largest_type, // test type(s)
"(?i).*medium.*", // test data group
".*", 150, 50); // test function
".*", 350, 50); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib

View File

@@ -27,7 +27,6 @@
template <class Real, class T>
void do_test_beta(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type, value_type);

View File

@@ -197,13 +197,20 @@ void expected_results()
//
// Minw:
//
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Win32[^|]*", // platform
"real_concept", // test type(s)
"[^|]*medium[^|]*", // test data group
"[^|]*", 700, 200); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Win32[^|]*", // platform
largest_type, // test type(s)
"[^|]*medium[^|]*", // test data group
"[^|]*", 200, 100); // test function
"[^|]*", 700, 200); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
@@ -215,16 +222,16 @@ void expected_results()
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Win32[^|]*", // platform
"real_concept", // test type(s)
"[^|]*medium[^|]*", // test data group
"[^|]*", 400, 100); // test function
largest_type, // test type(s)
"[^|]*integer[^|]*", // test data group
".*", 120, 50); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Win32[^|]*", // platform
"real_concept", // test type(s)
"[^|]*integer[^|]*", // test data group
".*", 80, 50); // test function
".*", 100, 50); // test function
//
// Large exponent range causes more extreme test cases to be evaluated:

View File

@@ -29,7 +29,6 @@
template <class Real, class T>
void do_test_gamma_2(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -46,7 +46,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name
// test gamma_p_inv(T, T) against data:
//
using namespace std;
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << test_name << " with type " << type_name << std::endl;
@@ -116,7 +115,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name
template <class Real, class T>
void do_test_gamma_inv(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -46,7 +46,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name
// test gamma_p_inva(T, T) against data:
//
using namespace std;
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << test_name << " with type " << type_name << std::endl;
@@ -116,7 +115,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name
template <class Real, class T>
void do_test_gamma_inva(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -29,7 +29,6 @@
template <class Real, typename T>
void do_test_sn(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;

View File

@@ -24,7 +24,6 @@
template <class Real, class T>
void do_test_laguerre2(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, value_type);
@@ -54,7 +53,6 @@ void do_test_laguerre2(const T& data, const char* type_name, const char* test_na
template <class Real, class T>
void do_test_laguerre3(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, unsigned, value_type);

View File

@@ -28,7 +28,6 @@
template <class Real, class T>
void do_test_legendre_p(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(int, value_type);
@@ -95,7 +94,6 @@ void do_test_legendre_p(const T& data, const char* type_name, const char* test_n
template <class Real, class T>
void do_test_assoc_legendre_p(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(int, int, value_type);

View File

@@ -295,7 +295,6 @@ T nc_beta_ccdf(T a, T b, T nc, T x)
template <typename Real, typename T>
void do_test_nc_chi_squared(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << "Testing: " << test << std::endl;
@@ -334,7 +333,6 @@ void do_test_nc_chi_squared(T& data, const char* type_name, const char* test)
template <typename Real, typename T>
void quantile_sanity_check(T& data, const char* type_name, const char* test)
{
typedef typename T::value_type row_type;
typedef Real value_type;
//

View File

@@ -337,7 +337,7 @@ void test_spots(RealType)
BOOST_CHECK_CLOSE( // mean:
mean(dist)
, static_cast<RealType>(-0.579908992539856825862549L), tol100);
, static_cast<RealType>(-0.579908992539856825862549L), tol100 * 2);
BOOST_CHECK_CLOSE( // variance:
variance(dist)
, static_cast<RealType>(2.0179057767837232633904L), tol100);

View File

@@ -101,7 +101,6 @@ void expected_results()
template <class Real, class T>
void do_test_spherical_harmonic(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(unsigned, int, value_type, value_type);
@@ -145,7 +144,6 @@ void do_test_spherical_harmonic(const T& data, const char* type_name, const char
template <class Real, class T>
void test_complex_spherical_harmonic(const T& data, const char* /* name */, boost::mpl::true_ const &)
{
typedef typename T::value_type row_type;
typedef Real value_type;
for(unsigned i = 0; i < sizeof(data) / sizeof(data[0]); ++i)

View File

@@ -367,19 +367,19 @@ void test_spots(RealType)
students_t_distribution<RealType>(1e20f), static_cast<RealType>(0.25f))),
static_cast<RealType>(0.25f), tolerance);
BOOST_CHECK_CLOSE(boost::math::cdf(
students_t_distribution<RealType>(0x7FFFFFFF),
students_t_distribution<RealType>(static_cast<RealType>(0x7FFFFFFF)),
boost::math::quantile(
students_t_distribution<RealType>(0x7FFFFFFF), static_cast<RealType>(0.25f))),
students_t_distribution<RealType>(static_cast<RealType>(0x7FFFFFFF)), static_cast<RealType>(0.25f))),
static_cast<RealType>(0.25f), tolerance);
BOOST_CHECK_CLOSE(boost::math::cdf(
students_t_distribution<RealType>(0x10000000),
students_t_distribution<RealType>(static_cast<RealType>(0x10000000)),
boost::math::quantile(
students_t_distribution<RealType>(0x10000000), static_cast<RealType>(0.25f))),
students_t_distribution<RealType>(static_cast<RealType>(0x10000000)), static_cast<RealType>(0.25f))),
static_cast<RealType>(0.25f), tolerance);
BOOST_CHECK_CLOSE(boost::math::cdf(
students_t_distribution<RealType>(0x0fffffff),
students_t_distribution<RealType>(static_cast<RealType>(0x0fffffff)),
boost::math::quantile(
students_t_distribution<RealType>(0x0fffffff), static_cast<RealType>(0.25f))),
students_t_distribution<RealType>(static_cast<RealType>(0x0fffffff)), static_cast<RealType>(0.25f))),
static_cast<RealType>(0.25f), tolerance);
}

View File

@@ -77,6 +77,14 @@ void expected_results()
"real_concept", // test type(s)
"[^|]*", // test data group
"boost::math::tgamma_ratio[^|]*", 300, 100); // test function
add_expected_result(
"GNU.*", // compiler
"[^|]*", // stdlib
"Win32.*", // platform
largest_type, // test type(s)
"[^|]*", // test data group
"boost::math::tgamma_ratio[^|]*", 300, 100); // test function
//
// Catch all cases come last:
//

View File

@@ -36,7 +36,6 @@ struct negative_tgamma_ratio
template <class Real, class T>
void do_test_tgamma_delta_ratio(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);
@@ -69,7 +68,6 @@ void do_test_tgamma_delta_ratio(const T& data, const char* type_name, const char
template <class Real, class T>
void do_test_tgamma_ratio(const T& data, const char* type_name, const char* test_name)
{
typedef typename T::value_type row_type;
typedef Real value_type;
typedef value_type (*pg)(value_type, value_type);

View File

@@ -31,7 +31,6 @@ void do_test_zeta(const T& data, const char* type_name, const char* test_name)
// test zeta(T) against data:
//
using namespace std;
typedef typename T::value_type row_type;
typedef Real value_type;
std::cout << test_name << " with type " << type_name << std::endl;