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

Fix some inspection report failures.

This commit is contained in:
jzmaddock
2015-09-08 12:04:27 +01:00
parent d719e4b567
commit ce198cefe8
46 changed files with 213 additions and 47 deletions

View File

@@ -4759,3 +4759,10 @@ CAUTION: Found non-finite result, when a finite value was expected at entry 16[b
[errors_GNU_C_version_5_1_0_linux_double_cyl_neumann_GSL_1_16_Yn_Mathworld_Data]
[errors_Microsoft_Visual_C_version_12_0_Win32_double_cyl_bessel_j_integer_orders___math_h__Bessel_JN_Mathworld_Data_Integer_Version_]
]
[/
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).
]

View File

@@ -24,3 +24,10 @@
[all_tables]
[endsect]
[/
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).
]

View File

@@ -1,2 +1,7 @@
Place the source for the Cephes double precision library here if you want bjam to
build and test it when reporting accuracy results.
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).

View File

@@ -2055,3 +2055,10 @@
[table_Rational_Method_Comparison_with_Intel_C_C_0x_mode_version_1500_on_linux]
[table_Rational_Method_Comparison_with_Microsoft_Visual_C_version_14_0_on_Windows_x64]
]
[/
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).
]

View File

@@ -13,3 +13,9 @@
[performance_all_sections]
[/
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).
]

View File

@@ -150,7 +150,7 @@ public:
std::cerr << "Aborting due to exception: " << e.what() << std::endl;
std::cerr << "In " << distro_name + " (" + std::string(sub_name) + ")" << std::endl;
report_execution_time(
std::numeric_limits<boost::uintmax_t>::max(),
(std::numeric_limits<boost::uintmax_t>::max)(),
std::string("Distribution performance comparison with ") + compiler_name() + std::string(" on ") + platform_name(),
distro_name + " (" + std::string(sub_name) + ")",
column);

View File

@@ -1 +1,6 @@
Add the C source files for DCDFLIB here if you want them to be built and tested for performance comparisons.
Copyright 2015 John Maddock and Paul A. Bristow.
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_0.txt).

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,4 +1,7 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/config.hpp>
#include <iostream>

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
#define SC_(x) static_cast<typename table_type<T>::type>(BOOST_JOIN(x, L))
#endif

View File

@@ -209,38 +209,38 @@ void test_bessel_prime(T, const char* name)
do_test_cyl_bessel_j_prime_int<T>(jn_data, name, "Bessel JN': Mathworld Data (Integer Version)");
static const boost::array<boost::array<T, 3>, 21> jv_data = {{
{{ T(22.5), T(0), SC_(0.0) }},
{{ T(2457)/1024, T(1)/1024, SC_(9.35477929043111040277363766198320562099360690e-6) }},
{{ SC_(5.5), T(3217)/1024, SC_(0.042165579369684463582791278988393873) }},
{{ SC_(-5.5), T(3217)/1024, SC_(3.361570113176257957139775812778503494) }},
{{ SC_(-5.5), SC_(1e+04), SC_(0.007593311396019034252155600098309836289) }},
{{ SC_(5.5), SC_(1e+04), SC_(-0.00245022241637437956702428797044365092) }},
{{ SC_(5.5), SC_(1e+06), SC_(-0.000279242826717266554062248256927185394) }},
{{ SC_(5.125), SC_(1e+06), SC_(0.0001830632695189459708211614700642271) }},
{{ SC_(5.875), SC_(1e+06), SC_(-0.0006474276718101871487286860109203539) }},
{{ SC_(0.5), SC_(101.0), SC_(0.070640819172197226936337703929857171981702865) }},
{{ SC_(-5.5), SC_(1e+04), SC_(0.007593311396019034252155600098309836289) }},
{{ SC_(-5.5), SC_(1e+06), SC_(-0.0007474243882060190346457525218941411076) }},
{{ SC_(-0.5), SC_(101.0), SC_(-0.036238035321276062532981494694583591262302408) }},
{{ T(-10486074) / (1024*1024), T(1)/512, SC_(-7.0724447469115535625316241941528969321944e35) }},
{{ T(-10486074) / (1024*1024), SC_(15.0), SC_(-0.15994088796049823354364759206656917967697690) }},
{{ T(10486074) / (1024*1024), SC_(1e+02), SC_(-0.05778764167290516644655950658602424434253) }},
{{ T(10486074) / (1024*1024), SC_(2e+04), SC_(-0.00091101010794789360775314125410690740803) }},
{{ T(-10486074) / (1024*1024), SC_(1e+02), SC_(-0.057736130385111563671838499496767877709471701) }},
{{ SC_(1.5), T(8034)/1024, SC_(0.2783550354042687982259490073096357) }},
{{ SC_(8.5), boost::math::constants::pi<T>() * 4, SC_(-0.194590144622675911618596506265006877277074) }},
{{ SC_(-8.5), boost::math::constants::pi<T>() * 4, SC_(-0.014516314554743677558496402742690038592728) }},
{{ T(22.5), T(0), SC_(0.0) }},
{{ T(2457)/1024, T(1)/1024, SC_(9.35477929043111040277363766198320562099360690e-6) }},
{{ SC_(5.5), T(3217)/1024, SC_(0.042165579369684463582791278988393873) }},
{{ SC_(-5.5), T(3217)/1024, SC_(3.361570113176257957139775812778503494) }},
{{ SC_(-5.5), SC_(1e+04), SC_(0.007593311396019034252155600098309836289) }},
{{ SC_(5.5), SC_(1e+04), SC_(-0.00245022241637437956702428797044365092) }},
{{ SC_(5.5), SC_(1e+06), SC_(-0.000279242826717266554062248256927185394) }},
{{ SC_(5.125), SC_(1e+06), SC_(0.0001830632695189459708211614700642271) }},
{{ SC_(5.875), SC_(1e+06), SC_(-0.0006474276718101871487286860109203539) }},
{{ SC_(0.5), SC_(101.0), SC_(0.070640819172197226936337703929857171981702865) }},
{{ SC_(-5.5), SC_(1e+04), SC_(0.007593311396019034252155600098309836289) }},
{{ SC_(-5.5), SC_(1e+06), SC_(-0.0007474243882060190346457525218941411076) }},
{{ SC_(-0.5), SC_(101.0), SC_(-0.036238035321276062532981494694583591262302408) }},
{{ T(-10486074) / (1024*1024), T(1)/512, SC_(-7.0724447469115535625316241941528969321944e35) }},
{{ T(-10486074) / (1024*1024), SC_(15.0), SC_(-0.15994088796049823354364759206656917967697690) }},
{{ T(10486074) / (1024*1024), SC_(1e+02), SC_(-0.05778764167290516644655950658602424434253) }},
{{ T(10486074) / (1024*1024), SC_(2e+04), SC_(-0.00091101010794789360775314125410690740803) }},
{{ T(-10486074) / (1024*1024), SC_(1e+02), SC_(-0.057736130385111563671838499496767877709471701) }},
{{ SC_(1.5), T(8034)/1024, SC_(0.2783550354042687982259490073096357) }},
{{ SC_(8.5), boost::math::constants::pi<T>() * 4, SC_(-0.194590144622675911618596506265006877277074) }},
{{ SC_(-8.5), boost::math::constants::pi<T>() * 4, SC_(-0.014516314554743677558496402742690038592728) }},
}};
do_test_cyl_bessel_j_prime<T>(jv_data, name, "Bessel J': Mathworld Data");
static const boost::array<boost::array<T, 3>, 4> jv_large_data = {{
#if LDBL_MAX_10_EXP > 308
{{ SC_(-0.5), static_cast<T>(std::ldexp(0.5, -683)), SC_(-2.8687031947358902542073388638943588627056993e308) }},
{{ SC_(-0.5), static_cast<T>(std::ldexp(0.5, -683)), SC_(-2.8687031947358902542073388638943588627056993e308) }},
#else
{{ SC_(-0.5), static_cast<T>(std::ldexp(0.5, -450)), SC_(-1.7688953183288445554095310240218576026580197125814e203) }},
{{ SC_(-0.5), static_cast<T>(std::ldexp(0.5, -450)), SC_(-1.7688953183288445554095310240218576026580197125814e203) }},
#endif
{{ SC_(256.0), SC_(512.0), SC_(0.032286467266411904239327492993951594201583145) }},
{{ SC_(-256.0), SC_(8.0), SC_(4.6974301387555891979202431551474684165419e-352) }},
{{ SC_(-2.5), SC_(4.0), SC_(-0.3580070651681080294136741901878543615958139) }},
{{ SC_(256.0), SC_(512.0), SC_(0.032286467266411904239327492993951594201583145) }},
{{ SC_(-256.0), SC_(8.0), SC_(4.6974301387555891979202431551474684165419e-352) }},
{{ SC_(-2.5), SC_(4.0), SC_(-0.3580070651681080294136741901878543615958139) }},
}};
if(jv_large_data[0][1] != 0)
do_test_cyl_bessel_j_prime<T>(jv_large_data, name, "Bessel J': Mathworld Data (large values)");

View File

@@ -343,7 +343,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(special_cases, RealT, test_types)
{
const RealT tol = make_tolerance<RealT>();
// When the number of phases is 1, the hyperexponential distribution is an exponential distribution
// When the number of phases is 1, the hyperexponential distribution is an exponential distribution
const RealT rates1[] = { static_cast<RealT>(0.5L) };
boost::math::hyperexponential_distribution<RealT> hexp1(rates1);
boost::math::exponential_distribution<RealT> exp1(rates1[0]);
@@ -356,7 +356,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(special_cases, RealT, test_types)
BOOST_CHECK_CLOSE(boost::math::quantile(hexp1, static_cast<RealT>(0.75L)), boost::math::quantile(exp1, static_cast<RealT>(0.75L)), tol);
BOOST_CHECK_CLOSE(boost::math::mode(hexp1), boost::math::mode(exp1), tol);
// When a k-phase hyperexponential distribution has all rates equal to r, the distribution is an exponential distribution with rate r
// When a k-phase hyperexponential distribution has all rates equal to r, the distribution is an exponential distribution with rate r
const RealT rate2 = static_cast<RealT>(0.5L);
const RealT rates2[] = { rate2, rate2, rate2 };
boost::math::hyperexponential_distribution<RealT> hexp2(rates2);

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -1,3 +1,8 @@
// Copyright John Maddock 2015.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SC_
# define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
#endif

View File

@@ -16,7 +16,7 @@ new max_digits10.
This is needed to produce or select a macro to avoid compilation failure in Boost.Test
for platforms that do not include either or both of these.
BOOST_NO_NUMERIC_LIMITS_LOWEST is suitable but deprecated.
BOOST_NO_CXX11_NUMERIC_LIMITS is suitable.
[Boost C++ Libraries]

View File

@@ -16,11 +16,7 @@ new max_digits10.
This is needed to produce or select a macro to avoid compilation failure in Boost.Test
for platforms that do not include either or both of these.
BOOST_NO_NUMERIC_LIMITS_LOWEST is suitable but is deprecated in favour of
BOOST_NO_CXX11_NUMERIC_LIMITS
and is tested here.
BOOST_NO_CXX11_NUMERIC_LIMITS is tested here.
[Boost C++ Libraries]