diff options
Diffstat (limited to 'boost/libs/math/test/compile_test')
120 files changed, 5491 insertions, 0 deletions
diff --git a/boost/libs/math/test/compile_test/compl_abs_incl_test.cpp b/boost/libs/math/test/compile_test/compl_abs_incl_test.cpp new file mode 100644 index 00000000..a7a12db6 --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_abs_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/fabs.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/fabs.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<float >(boost::math::fabs(std::complex<float>())); + check_result<double >(boost::math::fabs(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::fabs(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_acos_incl_test.cpp b/boost/libs/math/test/compile_test/compl_acos_incl_test.cpp new file mode 100644 index 00000000..428ea19d --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_acos_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/acos.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/acos.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::acos(std::complex<float>())); + check_result<std::complex<double> >(boost::math::acos(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::acos(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_acosh_incl_test.cpp b/boost/libs/math/test/compile_test/compl_acosh_incl_test.cpp new file mode 100644 index 00000000..4b5ce873 --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_acosh_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/acosh.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/acosh.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::acosh(std::complex<float>())); + check_result<std::complex<double> >(boost::math::acosh(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::acosh(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_asin_incl_test.cpp b/boost/libs/math/test/compile_test/compl_asin_incl_test.cpp new file mode 100644 index 00000000..d6c60209 --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_asin_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/asin.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/asin.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::asin(std::complex<float>())); + check_result<std::complex<double> >(boost::math::asin(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::asin(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_asinh_incl_test.cpp b/boost/libs/math/test/compile_test/compl_asinh_incl_test.cpp new file mode 100644 index 00000000..e4f8e74e --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_asinh_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/asinh.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/asinh.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::asinh(std::complex<float>())); + check_result<std::complex<double> >(boost::math::asinh(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::asinh(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_atan_incl_test.cpp b/boost/libs/math/test/compile_test/compl_atan_incl_test.cpp new file mode 100644 index 00000000..83877a68 --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_atan_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/atan.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/atan.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::atan(std::complex<float>())); + check_result<std::complex<double> >(boost::math::atan(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::atan(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/compl_atanh_incl_test.cpp b/boost/libs/math/test/compile_test/compl_atanh_incl_test.cpp new file mode 100644 index 00000000..bface310 --- /dev/null +++ b/boost/libs/math/test/compile_test/compl_atanh_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/complex/atanh.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/complex/atanh.hpp> + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::atanh(std::complex<float>())); + check_result<std::complex<double> >(boost::math::atanh(std::complex<double>())); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::atanh(std::complex<long double>())); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/constants_incl_test.cpp b/boost/libs/math/test/compile_test/constants_incl_test.cpp new file mode 100644 index 00000000..039596c7 --- /dev/null +++ b/boost/libs/math/test/compile_test/constants_incl_test.cpp @@ -0,0 +1,24 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/constants/constants.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::constants::pi<float>()); + check_result<double>(boost::math::constants::pi<double>()); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::constants::pi<long double>()); +#endif + +} diff --git a/boost/libs/math/test/compile_test/cstdfloat_concept_check_1.cpp b/boost/libs/math/test/compile_test/cstdfloat_concept_check_1.cpp new file mode 100644 index 00000000..e2b79352 --- /dev/null +++ b/boost/libs/math/test/compile_test/cstdfloat_concept_check_1.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2014. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include <boost/cstdfloat.hpp> +#include "poison.hpp" +#include <boost/math/concepts/distributions.hpp> + +#include "instantiate.hpp" + +int main(int +#ifdef BOOST_FLOAT128_C + argc +#endif + , char*[]) +{ +#ifdef BOOST_FLOAT128_C + if(argc > 1000) + instantiate(BOOST_FLOAT128_C(1.23)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/cstdfloat_concept_check_2.cpp b/boost/libs/math/test/compile_test/cstdfloat_concept_check_2.cpp new file mode 100644 index 00000000..a5cca7e1 --- /dev/null +++ b/boost/libs/math/test/compile_test/cstdfloat_concept_check_2.cpp @@ -0,0 +1,26 @@ +// Copyright John Maddock 2014. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include <boost/cstdfloat.hpp> +#include "poison.hpp" +#include <boost/math/concepts/distributions.hpp> + +#include "instantiate.hpp" + + +int main(int +#ifdef BOOST_FLOAT80_C + argc +#endif + , char*[]) +{ +#ifdef BOOST_FLOAT80_C + if(argc > 1000) + instantiate(BOOST_FLOAT80_C(1.23)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/cstdfloat_concept_check_3.cpp b/boost/libs/math/test/compile_test/cstdfloat_concept_check_3.cpp new file mode 100644 index 00000000..6d2781b6 --- /dev/null +++ b/boost/libs/math/test/compile_test/cstdfloat_concept_check_3.cpp @@ -0,0 +1,26 @@ +// Copyright John Maddock 2014. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include <boost/cstdfloat.hpp> +#include "poison.hpp" +#include <boost/math/concepts/distributions.hpp> + +#include "instantiate.hpp" + + +int main(int +#ifdef BOOST_FLOAT64_C + argc +#endif + , char*[]) +{ +#ifdef BOOST_FLOAT64_C + if(argc > 1000) + instantiate(BOOST_FLOAT64_C(1.23)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/cstdfloat_concept_check_4.cpp b/boost/libs/math/test/compile_test/cstdfloat_concept_check_4.cpp new file mode 100644 index 00000000..18449889 --- /dev/null +++ b/boost/libs/math/test/compile_test/cstdfloat_concept_check_4.cpp @@ -0,0 +1,26 @@ +// Copyright John Maddock 2014. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include <boost/cstdfloat.hpp> +#include "poison.hpp" +#include <boost/math/concepts/distributions.hpp> + +#include "instantiate.hpp" + + +int main(int +#ifdef BOOST_FLOAT32_C + argc +#endif + , char*[]) +{ +#ifdef BOOST_FLOAT32_C + if(argc > 1000) + instantiate(BOOST_FLOAT32_C(1.23)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp b/boost/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp new file mode 100644 index 00000000..91397fc3 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/bernoulli.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/bernoulli.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(bernoulli) +} + +template class boost::math::bernoulli_distribution<float, boost::math::policies::policy<> >; +template class boost::math::bernoulli_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::bernoulli_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_beta_incl_test.cpp b/boost/libs/math/test/compile_test/dist_beta_incl_test.cpp new file mode 100644 index 00000000..34f8bc21 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_beta_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/beta.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/beta.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(beta) +} + +template class boost::math::beta_distribution<double, boost::math::policies::policy<> >; +template class boost::math::beta_distribution<float, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::beta_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_binomial_incl_test.cpp b/boost/libs/math/test/compile_test/dist_binomial_incl_test.cpp new file mode 100644 index 00000000..40246ad5 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_binomial_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/binomial.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/binomial.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(binomial) +} + +template class boost::math::binomial_distribution<float, boost::math::policies::policy<> >; +template class boost::math::binomial_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::binomial_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_cauchy_incl_test.cpp b/boost/libs/math/test/compile_test/dist_cauchy_incl_test.cpp new file mode 100644 index 00000000..d07071b2 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_cauchy_incl_test.cpp @@ -0,0 +1,26 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/cauchy.hpp> +// #includes all the files that it needs to. +// +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#include <boost/math/distributions/cauchy.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(cauchy) +} + +template class boost::math::cauchy_distribution<float, boost::math::policies::policy<> >; +template class boost::math::cauchy_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::cauchy_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp b/boost/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp new file mode 100644 index 00000000..b0b198fc --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/chi_squared.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/chi_squared.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(chi_squared) +} + +template class boost::math::chi_squared_distribution<float, boost::math::policies::policy<> >; +template class boost::math::chi_squared_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::chi_squared_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_complement_incl_test.cpp b/boost/libs/math/test/compile_test/dist_complement_incl_test.cpp new file mode 100644 index 00000000..89277614 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_complement_incl_test.cpp @@ -0,0 +1,22 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/complement.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/complement.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::complement(f, f); + boost::math::complement(f, f, d); + boost::math::complement(f, f, d, l); + boost::math::complement(f, f, d, l, i); +} diff --git a/boost/libs/math/test/compile_test/dist_exponential_incl_test.cpp b/boost/libs/math/test/compile_test/dist_exponential_incl_test.cpp new file mode 100644 index 00000000..3cbbc07a --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_exponential_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/exponential.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/exponential.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(exponential) +} + +template class boost::math::exponential_distribution<float, boost::math::policies::policy<> >; +template class boost::math::exponential_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::exponential_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp b/boost/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp new file mode 100644 index 00000000..92f4a50e --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/extreme_value.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/extreme_value.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(extreme_value) +} + +template class boost::math::extreme_value_distribution<float, boost::math::policies::policy<> >; +template class boost::math::extreme_value_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::extreme_value_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_find_location_incl_test.cpp b/boost/libs/math/test/compile_test/dist_find_location_incl_test.cpp new file mode 100644 index 00000000..5edc5569 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_find_location_incl_test.cpp @@ -0,0 +1,61 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/find_location.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/find_location.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +template <class T, class Policy = boost::math::policies::policy<> > +class test_distribution +{ +public: + typedef T value_type; + typedef Policy policy_type; + test_distribution(){} +}; + +template <class T, class Policy> +T quantile(const test_distribution<T, Policy>&, T) +{ + return 0; +} + +template <class T, class Policy> +T quantile(const boost::math::complemented2_type<test_distribution<T, Policy>, T>&) +{ + return 0; +} + +namespace boost{ namespace math{ namespace tools{ + + template <class T, class Policy> struct is_distribution<test_distribution<T, Policy> > : public mpl::true_{}; + template <class T, class Policy> struct is_scaled_distribution<test_distribution<T, Policy> > : public mpl::true_{}; + +}}} + +void compile_and_link_test() +{ + check_result<float>(boost::math::find_location<test_distribution<float> >(f, f, f, boost::math::policies::policy<>())); + check_result<double>(boost::math::find_location<test_distribution<double> >(d, d, d, boost::math::policies::policy<>())); + check_result<long double>(boost::math::find_location<test_distribution<long double> >(l, l, l, boost::math::policies::policy<>())); + + check_result<float>(boost::math::find_location<test_distribution<float> >(f, f, f)); + check_result<double>(boost::math::find_location<test_distribution<double> >(d, d, d)); + check_result<long double>(boost::math::find_location<test_distribution<long double> >(l, l, l)); + + check_result<float>(boost::math::find_location<test_distribution<float> >(boost::math::complement(f, f, f, boost::math::policies::policy<>()))); + check_result<double>(boost::math::find_location<test_distribution<double> >(boost::math::complement(d, d, d, boost::math::policies::policy<>()))); + check_result<long double>(boost::math::find_location<test_distribution<long double> >(boost::math::complement(l, l, l, boost::math::policies::policy<>()))); + + check_result<float>(boost::math::find_location<test_distribution<float> >(boost::math::complement(f, f, f))); + check_result<double>(boost::math::find_location<test_distribution<double> >(boost::math::complement(d, d, d))); + check_result<long double>(boost::math::find_location<test_distribution<long double> >(boost::math::complement(l, l, l))); +} diff --git a/boost/libs/math/test/compile_test/dist_find_scale_incl_test.cpp b/boost/libs/math/test/compile_test/dist_find_scale_incl_test.cpp new file mode 100644 index 00000000..4c19bd54 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_find_scale_incl_test.cpp @@ -0,0 +1,62 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/find_scale.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/find_scale.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +template <class T, class Policy = boost::math::policies::policy<> > +class test_distribution +{ +public: + typedef T value_type; + typedef Policy policy_type; + test_distribution(){} +}; + +template <class T, class Policy> +T quantile(const test_distribution<T, Policy>&, T) +{ + return 0; +} + +template <class T, class Policy> +T quantile(const boost::math::complemented2_type<test_distribution<T, Policy>, T>&) +{ + return 0; +} + +namespace boost{ namespace math{ namespace tools{ + + template <class T, class Policy> struct is_distribution<test_distribution<T, Policy> > : public mpl::true_{}; + template <class T, class Policy> struct is_scaled_distribution<test_distribution<T, Policy> > : public mpl::true_{}; + +}}} + +void compile_and_link_test() +{ + check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f, boost::math::policies::policy<>())); + check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d, boost::math::policies::policy<>())); + check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l, boost::math::policies::policy<>())); + + check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f)); + check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d)); + check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l)); + + check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f, boost::math::policies::policy<>()))); + check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d, boost::math::policies::policy<>()))); + check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l, boost::math::policies::policy<>()))); + + check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f))); + check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d))); + check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l))); +} + diff --git a/boost/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp b/boost/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp new file mode 100644 index 00000000..f8c14b44 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/fisher_f.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/fisher_f.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(fisher_f) +} + +template class boost::math::fisher_f_distribution<float, boost::math::policies::policy<> >; +template class boost::math::fisher_f_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::fisher_f_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_gamma_incl_test.cpp b/boost/libs/math/test/compile_test/dist_gamma_incl_test.cpp new file mode 100644 index 00000000..e6c4ee68 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_gamma_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/gamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/gamma.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(gamma) +} + +template class boost::math::gamma_distribution<float, boost::math::policies::policy<> >; +template class boost::math::gamma_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::gamma_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_hyperexponential_incl_test.cpp b/boost/libs/math/test/compile_test/dist_hyperexponential_incl_test.cpp new file mode 100644 index 00000000..4de172d3 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_hyperexponential_incl_test.cpp @@ -0,0 +1,26 @@ +// Copyright 2014 Marco Guazzone (marco.guazzone@gmail.com) +// +// 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) +// +// Basic sanity check that header <boost/math/distributions/hyperexponential.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/hyperexponential.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(hyperexponential) +} + +template class boost::math::hyperexponential_distribution<float, boost::math::policies::policy<> >; +template class boost::math::hyperexponential_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::hyperexponential_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_hypergeo_incl_test.cpp b/boost/libs/math/test/compile_test/dist_hypergeo_incl_test.cpp new file mode 100644 index 00000000..32edb5f2 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_hypergeo_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/hypergeometric.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/hypergeometric.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(hypergeometric) +} + +template class boost::math::hypergeometric_distribution<float, boost::math::policies::policy<> >; +template class boost::math::hypergeometric_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::hypergeometric_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_inv_chi_sq_incl_test.cpp b/boost/libs/math/test/compile_test/dist_inv_chi_sq_incl_test.cpp new file mode 100644 index 00000000..86313c33 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_inv_chi_sq_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/gamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/inverse_chi_squared.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(inverse_chi_squared) +} + +template class boost::math::inverse_chi_squared_distribution<float, boost::math::policies::policy<> >; +template class boost::math::inverse_chi_squared_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::inverse_chi_squared_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_inv_gamma_incl_test.cpp b/boost/libs/math/test/compile_test/dist_inv_gamma_incl_test.cpp new file mode 100644 index 00000000..c86e5347 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_inv_gamma_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/gamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/inverse_gamma.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(inverse_gamma) +} + +template class boost::math::inverse_gamma_distribution<float, boost::math::policies::policy<> >; +template class boost::math::inverse_gamma_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::inverse_gamma_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_laplace_incl_test.cpp b/boost/libs/math/test/compile_test/dist_laplace_incl_test.cpp new file mode 100644 index 00000000..9a9dabf2 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_laplace_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/laplace.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/laplace.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(laplace) +} + +template class boost::math::laplace_distribution<float, boost::math::policies::policy<> >; +template class boost::math::laplace_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::laplace_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_logistic_incl_test.cpp b/boost/libs/math/test/compile_test/dist_logistic_incl_test.cpp new file mode 100644 index 00000000..456291dd --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_logistic_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/logistic.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/logistic.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(logistic) +} + +template class boost::math::logistic_distribution<float, boost::math::policies::policy<> >; +template class boost::math::logistic_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::logistic_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_lognormal_incl_test.cpp b/boost/libs/math/test/compile_test/dist_lognormal_incl_test.cpp new file mode 100644 index 00000000..11450460 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_lognormal_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/lognormal.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/lognormal.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(lognormal) +} + +template class boost::math::lognormal_distribution<float, boost::math::policies::policy<> >; +template class boost::math::lognormal_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::lognormal_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp b/boost/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp new file mode 100644 index 00000000..12d6ef15 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/non_central_beta.hpp> +// #includes all the files that it needs to. +// +// This must appear *before* any #includes, and precludes pch usage: +// +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +// +#include <boost/math/distributions/non_central_beta.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(non_central_beta) +} + +template class boost::math::non_central_beta_distribution<float, boost::math::policies::policy<> >; +template class boost::math::non_central_beta_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::non_central_beta_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_nc_chi_squ_incl_test.cpp b/boost/libs/math/test/compile_test/dist_nc_chi_squ_incl_test.cpp new file mode 100644 index 00000000..b953418d --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_nc_chi_squ_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/non_central_chi_squared.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/non_central_chi_squared.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(non_central_chi_squared) +} + +template class boost::math::non_central_chi_squared_distribution<float, boost::math::policies::policy<> >; +template class boost::math::non_central_chi_squared_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::non_central_chi_squared_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_nc_f_incl_test.cpp b/boost/libs/math/test/compile_test/dist_nc_f_incl_test.cpp new file mode 100644 index 00000000..2c81b11e --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_nc_f_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/non_central_f.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/non_central_f.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(non_central_f) +} + +template class boost::math::non_central_f_distribution<float, boost::math::policies::policy<> >; +template class boost::math::non_central_f_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::non_central_f_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_nc_t_incl_test.cpp b/boost/libs/math/test/compile_test/dist_nc_t_incl_test.cpp new file mode 100644 index 00000000..8f1e429e --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_nc_t_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/distributions/non_central_t.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/non_central_t.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(non_central_t) +} + +template class boost::math::non_central_t_distribution<float, boost::math::policies::policy<> >; +template class boost::math::non_central_t_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::non_central_t_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp b/boost/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp new file mode 100644 index 00000000..b0368d41 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/negative_binomial.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/negative_binomial.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(negative_binomial) +} + +template class boost::math::negative_binomial_distribution<float, boost::math::policies::policy<> >; +template class boost::math::negative_binomial_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::negative_binomial_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_normal_incl_test.cpp b/boost/libs/math/test/compile_test/dist_normal_incl_test.cpp new file mode 100644 index 00000000..c3ad2ab9 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_normal_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/normal.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/normal.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(normal) +} + +template class boost::math::normal_distribution<float, boost::math::policies::policy<> >; +template class boost::math::normal_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::normal_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_pareto_incl_test.cpp b/boost/libs/math/test/compile_test/dist_pareto_incl_test.cpp new file mode 100644 index 00000000..1d1e1ff2 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_pareto_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/pareto.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/pareto.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(pareto) +} + +template class boost::math::pareto_distribution<float, boost::math::policies::policy<> >; +template class boost::math::pareto_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::pareto_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_poisson_incl_test.cpp b/boost/libs/math/test/compile_test/dist_poisson_incl_test.cpp new file mode 100644 index 00000000..ab69b99b --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_poisson_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/poisson.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/poisson.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(poisson) +} + +template class boost::math::poisson_distribution<float, boost::math::policies::policy<> >; +template class boost::math::poisson_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::poisson_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_skew_norm_incl_test.cpp b/boost/libs/math/test/compile_test/dist_skew_norm_incl_test.cpp new file mode 100644 index 00000000..6f41d4b0 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_skew_norm_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/students_t.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/skew_normal.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(skew_normal) +} + +template class boost::math::skew_normal_distribution<float, boost::math::policies::policy<> >; +template class boost::math::skew_normal_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::skew_normal_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_students_t_incl_test.cpp b/boost/libs/math/test/compile_test/dist_students_t_incl_test.cpp new file mode 100644 index 00000000..6c09a440 --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_students_t_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/students_t.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/students_t.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(students_t) +} + +template class boost::math::students_t_distribution<float, boost::math::policies::policy<> >; +template class boost::math::students_t_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::students_t_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_triangular_incl_test.cpp b/boost/libs/math/test/compile_test/dist_triangular_incl_test.cpp new file mode 100644 index 00000000..8eaebf5b --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_triangular_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/triangular.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/triangular.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(triangular) +} + +template class boost::math::triangular_distribution<float, boost::math::policies::policy<> >; +template class boost::math::triangular_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::triangular_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_uniform_incl_test.cpp b/boost/libs/math/test/compile_test/dist_uniform_incl_test.cpp new file mode 100644 index 00000000..2b3e30ef --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_uniform_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/uniform.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/uniform.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(uniform) +} + +template class boost::math::uniform_distribution<float, boost::math::policies::policy<> >; +template class boost::math::uniform_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::uniform_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/dist_weibull_incl_test.cpp b/boost/libs/math/test/compile_test/dist_weibull_incl_test.cpp new file mode 100644 index 00000000..d73bd58c --- /dev/null +++ b/boost/libs/math/test/compile_test/dist_weibull_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/weibull.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/weibull.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(weibull) +} + +template class boost::math::weibull_distribution<float, boost::math::policies::policy<> >; +template class boost::math::weibull_distribution<double, boost::math::policies::policy<> >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::weibull_distribution<long double, boost::math::policies::policy<> >; +#endif diff --git a/boost/libs/math/test/compile_test/distribution_concept_check.cpp b/boost/libs/math/test/compile_test/distribution_concept_check.cpp new file mode 100644 index 00000000..26b236a5 --- /dev/null +++ b/boost/libs/math/test/compile_test/distribution_concept_check.cpp @@ -0,0 +1,64 @@ +// Copyright John Maddock 2006. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include <boost/math/distributions.hpp> +#include <boost/math/concepts/distributions.hpp> + + +template <class RealType> +void instantiate(RealType) +{ + using namespace boost; + using namespace boost::math; + using namespace boost::math::concepts; + + typedef policies::policy<policies::digits2<std::numeric_limits<RealType>::digits - 2> > custom_policy; + + function_requires<DistributionConcept<bernoulli_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<beta_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<binomial_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<cauchy_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<chi_squared_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<exponential_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<extreme_value_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<fisher_f_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<gamma_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<geometric_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<hypergeometric_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<hypergeometric_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<inverse_chi_squared_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<inverse_gamma_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<inverse_gaussian_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<laplace_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<logistic_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<lognormal_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<negative_binomial_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<non_central_beta_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<non_central_f_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<non_central_t_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<normal_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<pareto_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<poisson_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<rayleigh_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<skew_normal_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<students_t_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<triangular_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<uniform_distribution<RealType, custom_policy> > >(); + function_requires<DistributionConcept<weibull_distribution<RealType, custom_policy> > >(); +} + + +int main() +{ + instantiate(float(0)); + instantiate(double(0)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + instantiate((long double)(0)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/generate.sh b/boost/libs/math/test/compile_test/generate.sh new file mode 100644 index 00000000..ac88405a --- /dev/null +++ b/boost/libs/math/test/compile_test/generate.sh @@ -0,0 +1,46 @@ +for file in ../../../../boost/math/tools/*.hpp; do +cat > tools_$(basename $file .hpp)_inc_test.cpp << EOF; +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/$(basename $file)> +// #includes all the files that it needs to. +// +#include <boost/math/tools/$(basename $file .hpp).hpp> + +EOF +done + +for file in ../../../../boost/math/distributions/*.hpp; do +cat > dist_$(basename $file .hpp)_incl_test.cpp << EOF; +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/distributions/$(basename $file)> +// #includes all the files that it needs to. +// +#include <boost/math/distributions/$(basename $file .hpp).hpp> + +EOF +done + +for file in ../../../../boost/math/special_functions/*.hpp; do +cat > sf_$(basename $file .hpp)_incl_test.cpp << EOF; +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/$(basename $file)> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/$(basename $file .hpp).hpp> + +EOF +done + + diff --git a/boost/libs/math/test/compile_test/instantiate.hpp b/boost/libs/math/test/compile_test/instantiate.hpp new file mode 100644 index 00000000..e3930a2d --- /dev/null +++ b/boost/libs/math/test/compile_test/instantiate.hpp @@ -0,0 +1,1379 @@ +// Copyright John Maddock 2006. +// Copyright Paul A. Bristow 2007, 2010. +// 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 BOOST_LIBS_MATH_TEST_INSTANTIATE_HPP +#define BOOST_LIBS_MATH_TEST_INSTANTIATE_HPP + +#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY +# define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#endif + +#include <boost/math/distributions.hpp> + +#include <boost/math/special_functions.hpp> +#include <boost/math/concepts/distributions.hpp> +#include <boost/concept_archetype.hpp> + +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM + +typedef boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false> > test_policy; + +namespace test{ + +BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(test_policy) + +} + +namespace dist_test{ + +BOOST_MATH_DECLARE_DISTRIBUTIONS(double, test_policy) + +} +#endif + +#if !defined(TEST_GROUP_1) && !defined(TEST_GROUP_2) && !defined(TEST_GROUP_3) \ + && !defined(TEST_GROUP_4) && !defined(TEST_GROUP_5) && !defined(TEST_GROUP_6) \ + && !defined(TEST_GROUP_7) && !defined(TEST_GROUP_8) && !defined(TEST_GROUP_9) +# define TEST_GROUP_1 +# define TEST_GROUP_2 +# define TEST_GROUP_3 +# define TEST_GROUP_4 +# define TEST_GROUP_5 +# define TEST_GROUP_6 +# define TEST_GROUP_7 +# define TEST_GROUP_8 +# define TEST_GROUP_9 +#endif + +template <class RealType> +void instantiate(RealType) +{ + using namespace boost; + using namespace boost::math; + using namespace boost::math::concepts; +#ifdef TEST_GROUP_1 + function_requires<DistributionConcept<arcsine_distribution<RealType> > >(); + function_requires<DistributionConcept<bernoulli_distribution<RealType> > >(); + function_requires<DistributionConcept<beta_distribution<RealType> > >(); + function_requires<DistributionConcept<binomial_distribution<RealType> > >(); + function_requires<DistributionConcept<cauchy_distribution<RealType> > >(); + function_requires<DistributionConcept<chi_squared_distribution<RealType> > >(); + function_requires<DistributionConcept<exponential_distribution<RealType> > >(); + function_requires<DistributionConcept<extreme_value_distribution<RealType> > >(); + function_requires<DistributionConcept<fisher_f_distribution<RealType> > >(); + function_requires<DistributionConcept<gamma_distribution<RealType> > >(); + function_requires<DistributionConcept<geometric_distribution<RealType> > >(); + function_requires<DistributionConcept<hypergeometric_distribution<RealType> > >(); + function_requires<DistributionConcept<hyperexponential_distribution<RealType> > >(); + function_requires<DistributionConcept<inverse_chi_squared_distribution<RealType> > >(); + function_requires<DistributionConcept<inverse_gamma_distribution<RealType> > >(); + function_requires<DistributionConcept<inverse_gaussian_distribution<RealType> > >(); + function_requires<DistributionConcept<laplace_distribution<RealType> > >(); + function_requires<DistributionConcept<logistic_distribution<RealType> > >(); + function_requires<DistributionConcept<lognormal_distribution<RealType> > >(); + function_requires<DistributionConcept<negative_binomial_distribution<RealType> > >(); + function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType> > >(); + function_requires<DistributionConcept<non_central_beta_distribution<RealType> > >(); + function_requires<DistributionConcept<non_central_f_distribution<RealType> > >(); + function_requires<DistributionConcept<non_central_t_distribution<RealType> > >(); + function_requires<DistributionConcept<normal_distribution<RealType> > >(); + function_requires<DistributionConcept<pareto_distribution<RealType> > >(); + function_requires<DistributionConcept<poisson_distribution<RealType> > >(); + function_requires<DistributionConcept<rayleigh_distribution<RealType> > >(); + function_requires<DistributionConcept<students_t_distribution<RealType> > >(); + function_requires<DistributionConcept<skew_normal_distribution<RealType> > >(); + function_requires<DistributionConcept<triangular_distribution<RealType> > >(); + function_requires<DistributionConcept<uniform_distribution<RealType> > >(); + function_requires<DistributionConcept<weibull_distribution<RealType> > >(); +#endif +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM +#ifdef TEST_GROUP_2 + function_requires<DistributionConcept<arcsine_distribution<RealType> > >(); + function_requires<DistributionConcept<bernoulli_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<beta_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<binomial_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<cauchy_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<chi_squared_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<exponential_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<extreme_value_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<fisher_f_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<gamma_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<geometric_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<hypergeometric_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<inverse_chi_squared_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<inverse_gamma_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<inverse_gaussian_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<laplace_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<logistic_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<lognormal_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<negative_binomial_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<non_central_chi_squared_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<non_central_beta_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<non_central_f_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<non_central_t_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<normal_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<pareto_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<poisson_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<rayleigh_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<skew_normal_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<students_t_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<triangular_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<uniform_distribution<RealType, test_policy> > >(); + function_requires<DistributionConcept<weibull_distribution<RealType, test_policy> > >(); +#endif +#ifdef TEST_GROUP_3 + function_requires<DistributionConcept<dist_test::arcsine > >(); + function_requires<DistributionConcept<dist_test::bernoulli > >(); + function_requires<DistributionConcept<dist_test::beta > >(); + function_requires<DistributionConcept<dist_test::binomial > >(); + function_requires<DistributionConcept<dist_test::cauchy > >(); + function_requires<DistributionConcept<dist_test::chi_squared > >(); + function_requires<DistributionConcept<dist_test::exponential > >(); + function_requires<DistributionConcept<dist_test::extreme_value > >(); + function_requires<DistributionConcept<dist_test::fisher_f > >(); + function_requires<DistributionConcept<dist_test::gamma > >(); + function_requires<DistributionConcept<dist_test::geometric > >(); + function_requires<DistributionConcept<dist_test::hypergeometric > >(); + function_requires<DistributionConcept<dist_test::inverse_chi_squared > >(); + function_requires<DistributionConcept<dist_test::inverse_gamma > >(); + function_requires<DistributionConcept<dist_test::inverse_gaussian > >(); + function_requires<DistributionConcept<dist_test::laplace > >(); + function_requires<DistributionConcept<dist_test::logistic > >(); + function_requires<DistributionConcept<dist_test::lognormal > >(); + function_requires<DistributionConcept<dist_test::negative_binomial > >(); + function_requires<DistributionConcept<dist_test::non_central_chi_squared > >(); + function_requires<DistributionConcept<dist_test::non_central_beta > >(); + function_requires<DistributionConcept<dist_test::non_central_f > >(); + function_requires<DistributionConcept<dist_test::non_central_t > >(); + function_requires<DistributionConcept<dist_test::normal > >(); + function_requires<DistributionConcept<dist_test::pareto > >(); + function_requires<DistributionConcept<dist_test::poisson > >(); + function_requires<DistributionConcept<dist_test::rayleigh > >(); + function_requires<DistributionConcept<dist_test::students_t > >(); + function_requires<DistributionConcept<dist_test::triangular > >(); + function_requires<DistributionConcept<dist_test::uniform > >(); + function_requires<DistributionConcept<dist_test::weibull > >(); + function_requires<DistributionConcept<dist_test::hypergeometric > >(); +#endif +#endif + int i; + RealType v1(0.5), v2(0.5), v3(0.5); + boost::detail::dummy_constructor dc; + boost::output_iterator_archetype<RealType> oi(dc); +#ifdef TEST_GROUP_4 + boost::math::tgamma(v1); + boost::math::tgamma1pm1(v1); + boost::math::lgamma(v1); + boost::math::lgamma(v1, &i); + boost::math::digamma(v1); + boost::math::trigamma(v1); + boost::math::polygamma(i, v1); + boost::math::tgamma_ratio(v1, v2); + boost::math::tgamma_delta_ratio(v1, v2); + boost::math::factorial<RealType>(i); + boost::math::unchecked_factorial<RealType>(i); + i = boost::math::max_factorial<RealType>::value; + boost::math::double_factorial<RealType>(i); + boost::math::rising_factorial(v1, i); + boost::math::falling_factorial(v1, i); + boost::math::tgamma(v1, v2); + boost::math::tgamma_lower(v1, v2); + boost::math::gamma_p(v1, v2); + boost::math::gamma_q(v1, v2); + boost::math::gamma_p_inv(v1, v2); + boost::math::gamma_q_inv(v1, v2); + boost::math::gamma_p_inva(v1, v2); + boost::math::gamma_q_inva(v1, v2); + boost::math::erf(v1); + boost::math::erfc(v1); + boost::math::erf_inv(v1); + boost::math::erfc_inv(v1); + boost::math::beta(v1, v2); + boost::math::beta(v1, v2, v3); + boost::math::betac(v1, v2, v3); + boost::math::ibeta(v1, v2, v3); + boost::math::ibetac(v1, v2, v3); + boost::math::ibeta_inv(v1, v2, v3); + boost::math::ibetac_inv(v1, v2, v3); + boost::math::ibeta_inva(v1, v2, v3); + boost::math::ibetac_inva(v1, v2, v3); + boost::math::ibeta_invb(v1, v2, v3); + boost::math::ibetac_invb(v1, v2, v3); + boost::math::gamma_p_derivative(v2, v3); + boost::math::ibeta_derivative(v1, v2, v3); + boost::math::binomial_coefficient<RealType>(i, i); + (boost::math::fpclassify)(v1); + (boost::math::isfinite)(v1); + (boost::math::isnormal)(v1); + (boost::math::isnan)(v1); + (boost::math::isinf)(v1); + (boost::math::signbit)(v1); + (boost::math::copysign)(v1, v2); + (boost::math::changesign)(v1); + (boost::math::sign)(v1); + boost::math::log1p(v1); + boost::math::expm1(v1); + boost::math::cbrt(v1); + boost::math::sqrt1pm1(v1); + boost::math::powm1(v1, v2); + boost::math::legendre_p(1, v1); + boost::math::legendre_p(1, 0, v1); + boost::math::legendre_q(1, v1); + boost::math::legendre_next(2, v1, v2, v3); + boost::math::legendre_next(2, 2, v1, v2, v3); + boost::math::laguerre(1, v1); + boost::math::laguerre(2, 1, v1); + boost::math::laguerre(2u, 1u, v1); + boost::math::laguerre_next(2, v1, v2, v3); + boost::math::laguerre_next(2, 1, v1, v2, v3); + boost::math::hermite(1, v1); + boost::math::hermite_next(2, v1, v2, v3); + boost::math::spherical_harmonic_r(2, 1, v1, v2); + boost::math::spherical_harmonic_i(2, 1, v1, v2); + boost::math::ellint_1(v1); + boost::math::ellint_1(v1, v2); + boost::math::ellint_2(v1); + boost::math::ellint_2(v1, v2); + boost::math::ellint_3(v1, v2); + boost::math::ellint_3(v1, v2, v3); + boost::math::ellint_d(v1); + boost::math::ellint_d(v1, v2); + boost::math::jacobi_zeta(v1, v2); + boost::math::heuman_lambda(v1, v2); + boost::math::ellint_rc(v1, v2); + boost::math::ellint_rd(v1, v2, v3); + boost::math::ellint_rf(v1, v2, v3); + boost::math::ellint_rg(v1, v2, v3); + boost::math::ellint_rj(v1, v2, v3, v1); + boost::math::jacobi_elliptic(v1, v2, &v1, &v2); + boost::math::jacobi_cd(v1, v2); + boost::math::jacobi_cn(v1, v2); + boost::math::jacobi_cs(v1, v2); + boost::math::jacobi_dc(v1, v2); + boost::math::jacobi_dn(v1, v2); + boost::math::jacobi_ds(v1, v2); + boost::math::jacobi_nc(v1, v2); + boost::math::jacobi_nd(v1, v2); + boost::math::jacobi_ns(v1, v2); + boost::math::jacobi_sc(v1, v2); + boost::math::jacobi_sd(v1, v2); + boost::math::jacobi_sn(v1, v2); + boost::math::hypot(v1, v2); + boost::math::sinc_pi(v1); + boost::math::sinhc_pi(v1); + boost::math::asinh(v1); + boost::math::acosh(v1); + boost::math::atanh(v1); + boost::math::sin_pi(v1); + boost::math::cos_pi(v1); + boost::math::cyl_neumann(v1, v2); + boost::math::cyl_neumann(i, v2); + boost::math::cyl_bessel_j(v1, v2); + boost::math::cyl_bessel_j(i, v2); + boost::math::cyl_bessel_i(v1, v2); + boost::math::cyl_bessel_i(i, v2); + boost::math::cyl_bessel_k(v1, v2); + boost::math::cyl_bessel_k(i, v2); + boost::math::sph_bessel(i, v2); + boost::math::sph_bessel(i, 1); + boost::math::sph_neumann(i, v2); + boost::math::sph_neumann(i, i); + boost::math::cyl_neumann_prime(v1, v2); + boost::math::cyl_neumann_prime(i, v2); + boost::math::cyl_bessel_j_prime(v1, v2); + boost::math::cyl_bessel_j_prime(i, v2); + boost::math::cyl_bessel_i_prime(v1, v2); + boost::math::cyl_bessel_i_prime(i, v2); + boost::math::cyl_bessel_k_prime(v1, v2); + boost::math::cyl_bessel_k_prime(i, v2); + boost::math::sph_bessel_prime(i, v2); + boost::math::sph_bessel_prime(i, 1); + boost::math::sph_neumann_prime(i, v2); + boost::math::sph_neumann_prime(i, i); + boost::math::cyl_bessel_j_zero(v1, i); + boost::math::cyl_bessel_j_zero(v1, i, i, oi); + boost::math::cyl_neumann_zero(v1, i); + boost::math::cyl_neumann_zero(v1, i, i, oi); +#ifdef TEST_COMPLEX + boost::math::cyl_hankel_1(v1, v2); + boost::math::cyl_hankel_1(i, v2); + boost::math::cyl_hankel_2(v1, v2); + boost::math::cyl_hankel_2(i, v2); + boost::math::sph_hankel_1(v1, v2); + boost::math::sph_hankel_1(i, v2); + boost::math::sph_hankel_2(v1, v2); + boost::math::sph_hankel_2(i, v2); +#endif + boost::math::airy_ai(v1); + boost::math::airy_bi(v1); + boost::math::airy_ai_prime(v1); + boost::math::airy_bi_prime(v1); + + boost::math::airy_ai_zero<RealType>(i); + boost::math::airy_bi_zero<RealType>(i); + boost::math::airy_ai_zero<RealType>(i, i, oi); + boost::math::airy_bi_zero<RealType>(i, i, oi); + + boost::math::expint(v1); + boost::math::expint(i); + boost::math::expint(i, v2); + boost::math::expint(i, i); + boost::math::zeta(v1); + boost::math::zeta(i); + boost::math::owens_t(v1, v2); + boost::math::trunc(v1); + boost::math::itrunc(v1); + boost::math::ltrunc(v1); + boost::math::round(v1); + boost::math::iround(v1); + boost::math::lround(v1); + boost::math::modf(v1, &v1); + boost::math::modf(v1, &i); + long l; + boost::math::modf(v1, &l); +#ifdef BOOST_HAS_LONG_LONG + boost::math::lltrunc(v1); + boost::math::llround(v1); + boost::long_long_type ll; + boost::math::modf(v1, &ll); +#endif + boost::math::pow<2>(v1); + boost::math::nextafter(v1, v1); + boost::math::float_next(v1); + boost::math::float_prior(v1); + boost::math::float_distance(v1, v1); + boost::math::ulp(v1); + boost::math::relative_difference(v1, v2); + boost::math::epsilon_difference(v1, v2); + + boost::math::unchecked_bernoulli_b2n<RealType>(i); + boost::math::bernoulli_b2n<RealType>(i); + boost::math::bernoulli_b2n<RealType>(i, i, &v1); + boost::math::tangent_t2n<RealType>(i); + boost::math::tangent_t2n<RealType>(i, i, &v1); + +#endif +#ifdef TEST_GROUP_9 + // + // Over again, but arguments may be expression templates: + // + boost::math::tgamma(v1 + 0); + boost::math::tgamma1pm1(v1 + 0); + boost::math::lgamma(v1 * 1); + boost::math::lgamma(v1 * 1, &i); + boost::math::digamma(v1 * 1); + boost::math::trigamma(v1 * 1); + boost::math::polygamma(i, v1 * 1); + boost::math::tgamma_ratio(v1 * 1, v2 + 0); + boost::math::tgamma_delta_ratio(v1 * 1, v2 + 0); + boost::math::factorial<RealType>(i); + boost::math::unchecked_factorial<RealType>(i); + i = boost::math::max_factorial<RealType>::value; + boost::math::double_factorial<RealType>(i); + boost::math::rising_factorial(v1 * 1, i); + boost::math::falling_factorial(v1 * 1, i); + boost::math::tgamma(v1 * 1, v2 + 0); + boost::math::tgamma_lower(v1 * 1, v2 - 0); + boost::math::gamma_p(v1 * 1, v2 + 0); + boost::math::gamma_q(v1 * 1, v2 + 0); + boost::math::gamma_p_inv(v1 * 1, v2 + 0); + boost::math::gamma_q_inv(v1 * 1, v2 + 0); + boost::math::gamma_p_inva(v1 * 1, v2 + 0); + boost::math::gamma_q_inva(v1 * 1, v2 + 0); + boost::math::erf(v1 * 1); + boost::math::erfc(v1 * 1); + boost::math::erf_inv(v1 * 1); + boost::math::erfc_inv(v1 * 1); + boost::math::beta(v1 * 1, v2 + 0); + boost::math::beta(v1 * 1, v2 + 0, v3 / 1); + boost::math::betac(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibeta(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibetac(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibeta_inv(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibetac_inv(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibeta_inva(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibetac_inva(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibeta_invb(v1 * 1, v2 + 0, v3 / 1); + boost::math::ibetac_invb(v1 * 1, v2 + 0, v3 / 1); + boost::math::gamma_p_derivative(v2 * 1, v3 + 0); + boost::math::ibeta_derivative(v1 * 1, v2 + 0, v3 / 1); + (boost::math::fpclassify)(v1 * 1); + (boost::math::isfinite)(v1 * 1); + (boost::math::isnormal)(v1 * 1); + (boost::math::isnan)(v1 * 1); + (boost::math::isinf)(v1 * 1); + (boost::math::signbit)(v1 * 1); + (boost::math::copysign)(v1 * 1, v2 + 0); + (boost::math::changesign)(v1 * 1); + (boost::math::sign)(v1 * 1); + boost::math::log1p(v1 * 1); + boost::math::expm1(v1 * 1); + boost::math::cbrt(v1 * 1); + boost::math::sqrt1pm1(v1 * 1); + boost::math::powm1(v1 * 1, v2 + 0); + boost::math::legendre_p(1, v1 * 1); + boost::math::legendre_p(1, 0, v1 * 1); + boost::math::legendre_q(1, v1 * 1); + boost::math::legendre_next(2, v1 * 1, v2 + 0, v3 / 1); + boost::math::legendre_next(2, 2, v1 * 1, v2 + 0, v3 / 1); + boost::math::laguerre(1, v1 * 1); + boost::math::laguerre(2, 1, v1 * 1); + boost::math::laguerre(2u, 1u, v1 * 1); + boost::math::laguerre_next(2, v1 * 1, v2 + 0, v3 / 1); + boost::math::laguerre_next(2, 1, v1 * 1, v2 + 0, v3 / 1); + boost::math::hermite(1, v1 * 1); + boost::math::hermite_next(2, v1 * 1, v2 + 0, v3 / 1); + boost::math::spherical_harmonic_r(2, 1, v1 * 1, v2 + 0); + boost::math::spherical_harmonic_i(2, 1, v1 * 1, v2 + 0); + boost::math::ellint_1(v1 * 1); + boost::math::ellint_1(v1 * 1, v2 + 0); + boost::math::ellint_2(v1 * 1); + boost::math::ellint_2(v1 * 1, v2 + 0); + boost::math::ellint_3(v1 * 1, v2 + 0); + boost::math::ellint_3(v1 * 1, v2 + 0, v3 / 1); + boost::math::ellint_rc(v1 * 1, v2 + 0); + boost::math::ellint_rd(v1 * 1, v2 + 0, v3 / 1); + boost::math::ellint_rf(v1 * 1, v2 + 0, v3 / 1); + boost::math::ellint_rg(v1 * 1, v2 + 0, v3 / 1); + boost::math::ellint_rj(v1 * 1, v2 + 0, v3 / 1, v1 * 1); + boost::math::ellint_d(v1 * 1); + boost::math::ellint_d(v1 * 1, v2 + 0); + boost::math::jacobi_zeta(v1 * 1, v2 + 0); + boost::math::heuman_lambda(v1 * 1, v2 + 0); + boost::math::jacobi_elliptic(v1 * 1, v2 + 0, &v1, &v2); + boost::math::jacobi_cd(v1 * 1, v2 + 0); + boost::math::jacobi_cn(v1 * 1, v2 + 0); + boost::math::jacobi_cs(v1 * 1, v2 + 0); + boost::math::jacobi_dc(v1 * 1, v2 + 0); + boost::math::jacobi_dn(v1 * 1, v2 + 0); + boost::math::jacobi_ds(v1 * 1, v2 + 0); + boost::math::jacobi_nc(v1 * 1, v2 + 0); + boost::math::jacobi_nd(v1 * 1, v2 + 0); + boost::math::jacobi_ns(v1 * 1, v2 + 0); + boost::math::jacobi_sc(v1 * 1, v2 + 0); + boost::math::jacobi_sd(v1 * 1, v2 + 0); + boost::math::jacobi_sn(v1 * 1, v2 + 0); + boost::math::hypot(v1 * 1, v2 + 0); + boost::math::sinc_pi(v1 * 1); + boost::math::sinhc_pi(v1 * 1); + boost::math::asinh(v1 * 1); + boost::math::acosh(v1 * 1); + boost::math::atanh(v1 * 1); + boost::math::sin_pi(v1 * 1); + boost::math::cos_pi(v1 * 1); + boost::math::cyl_neumann(v1 * 1, v2 + 0); + boost::math::cyl_neumann(i, v2 * 1); + boost::math::cyl_bessel_j(v1 * 1, v2 + 0); + boost::math::cyl_bessel_j(i, v2 * 1); + boost::math::cyl_bessel_i(v1 * 1, v2 + 0); + boost::math::cyl_bessel_i(i, v2 * 1); + boost::math::cyl_bessel_k(v1 * 1, v2 + 0); + boost::math::cyl_bessel_k(i, v2 * 1); + boost::math::sph_bessel(i, v2 * 1); + boost::math::sph_bessel(i, 1); + boost::math::sph_neumann(i, v2 * 1); + boost::math::sph_neumann(i, i); + boost::math::cyl_neumann_prime(v1 * 1, v2 + 0); + boost::math::cyl_neumann_prime(i, v2 * 1); + boost::math::cyl_bessel_j_prime(v1 * 1, v2 + 0); + boost::math::cyl_bessel_j_prime(i, v2 * 1); + boost::math::cyl_bessel_i_prime(v1 * 1, v2 + 0); + boost::math::cyl_bessel_i_prime(i, v2 * 1); + boost::math::cyl_bessel_k_prime(v1 * 1, v2 + 0); + boost::math::cyl_bessel_k_prime(i, v2 * 1); + boost::math::sph_bessel_prime(i, v2 * 1); + boost::math::sph_bessel_prime(i, 1); + boost::math::sph_neumann_prime(i, v2 * 1); + boost::math::sph_neumann_prime(i, i); + boost::math::cyl_bessel_j_zero(v1 * 1, i); + boost::math::cyl_bessel_j_zero(v1 * 1, i, i, oi); + boost::math::cyl_neumann_zero(v1 * 1, i); + boost::math::cyl_neumann_zero(v1 * 1, i, i, oi); +#ifdef TEST_COMPLEX + boost::math::cyl_hankel_1(v1, v2); + boost::math::cyl_hankel_1(i, v2); + boost::math::cyl_hankel_2(v1, v2); + boost::math::cyl_hankel_2(i, v2); + boost::math::sph_hankel_1(v1, v2); + boost::math::sph_hankel_1(i, v2); + boost::math::sph_hankel_2(v1, v2); + boost::math::sph_hankel_2(i, v2); +#endif + boost::math::airy_ai(v1 * 1); + boost::math::airy_bi(v1 * 1); + boost::math::airy_ai_prime(v1 * 1); + boost::math::airy_bi_prime(v1 * 1); + boost::math::expint(v1 * 1); + boost::math::expint(i); + boost::math::expint(i, v2 * 1); + boost::math::expint(i, i); + boost::math::zeta(v1 * 1); + boost::math::zeta(i); + boost::math::owens_t(v1 * 1, v2 + 0); + boost::math::trunc(v1 * 1); + boost::math::itrunc(v1 * 1); + boost::math::ltrunc(v1 * 1); + boost::math::round(v1 * 1); + boost::math::iround(v1 * 1); + boost::math::lround(v1 * 1); + //boost::math::modf(v1 * 1, &v1); + //boost::math::modf(v1 * 1, &i); + //long l; + //boost::math::modf(v1 * 1, &l); +#ifdef BOOST_HAS_LONG_LONG + boost::math::lltrunc(v1 * 1); + boost::math::llround(v1 * 1); + //boost::long_long_type ll; + //boost::math::modf(v1 * 1, &ll); +#endif + boost::math::pow<2>(v1 * 1); + boost::math::nextafter(v1 * 1, v1 + 0); + boost::math::float_next(v1 * 1); + boost::math::float_prior(v1 * 1); + boost::math::float_distance(v1 * 1, v1 * 1); + boost::math::ulp(v1 * 1); + boost::math::relative_difference(v1 * 1, v2 * 1); + boost::math::epsilon_difference(v1 * 1, v2 * 1); +#endif +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM +#ifdef TEST_GROUP_5 + // + // All over again, with a policy this time: + // + test_policy pol; + boost::math::tgamma(v1, pol); + boost::math::tgamma1pm1(v1, pol); + boost::math::lgamma(v1, pol); + boost::math::lgamma(v1, &i, pol); + boost::math::digamma(v1, pol); + boost::math::trigamma(v1, pol); + boost::math::polygamma(i, v1, pol); + boost::math::tgamma_ratio(v1, v2, pol); + boost::math::tgamma_delta_ratio(v1, v2, pol); + boost::math::factorial<RealType>(i, pol); + boost::math::unchecked_factorial<RealType>(i); + i = boost::math::max_factorial<RealType>::value; + boost::math::double_factorial<RealType>(i, pol); + boost::math::rising_factorial(v1, i, pol); + boost::math::falling_factorial(v1, i, pol); + boost::math::tgamma(v1, v2, pol); + boost::math::tgamma_lower(v1, v2, pol); + boost::math::gamma_p(v1, v2, pol); + boost::math::gamma_q(v1, v2, pol); + boost::math::gamma_p_inv(v1, v2, pol); + boost::math::gamma_q_inv(v1, v2, pol); + boost::math::gamma_p_inva(v1, v2, pol); + boost::math::gamma_q_inva(v1, v2, pol); + boost::math::erf(v1, pol); + boost::math::erfc(v1, pol); + boost::math::erf_inv(v1, pol); + boost::math::erfc_inv(v1, pol); + boost::math::beta(v1, v2, pol); + boost::math::beta(v1, v2, v3, pol); + boost::math::betac(v1, v2, v3, pol); + boost::math::ibeta(v1, v2, v3, pol); + boost::math::ibetac(v1, v2, v3, pol); + boost::math::ibeta_inv(v1, v2, v3, pol); + boost::math::ibetac_inv(v1, v2, v3, pol); + boost::math::ibeta_inva(v1, v2, v3, pol); + boost::math::ibetac_inva(v1, v2, v3, pol); + boost::math::ibeta_invb(v1, v2, v3, pol); + boost::math::ibetac_invb(v1, v2, v3, pol); + boost::math::gamma_p_derivative(v2, v3, pol); + boost::math::ibeta_derivative(v1, v2, v3, pol); + boost::math::binomial_coefficient<RealType>(i, i, pol); + boost::math::log1p(v1, pol); + boost::math::expm1(v1, pol); + boost::math::cbrt(v1, pol); + boost::math::sqrt1pm1(v1, pol); + boost::math::powm1(v1, v2, pol); + boost::math::legendre_p(1, v1, pol); + boost::math::legendre_p(1, 0, v1, pol); + boost::math::legendre_q(1, v1, pol); + boost::math::legendre_next(2, v1, v2, v3); + boost::math::legendre_next(2, 2, v1, v2, v3); + boost::math::laguerre(1, v1, pol); + boost::math::laguerre(2, 1, v1, pol); + boost::math::laguerre_next(2, v1, v2, v3); + boost::math::laguerre_next(2, 1, v1, v2, v3); + boost::math::hermite(1, v1, pol); + boost::math::hermite_next(2, v1, v2, v3); + boost::math::spherical_harmonic_r(2, 1, v1, v2, pol); + boost::math::spherical_harmonic_i(2, 1, v1, v2, pol); + boost::math::ellint_1(v1, pol); + boost::math::ellint_1(v1, v2, pol); + boost::math::ellint_2(v1, pol); + boost::math::ellint_2(v1, v2, pol); + boost::math::ellint_3(v1, v2, pol); + boost::math::ellint_3(v1, v2, v3, pol); + boost::math::ellint_d(v1, pol); + boost::math::ellint_d(v1, v2, pol); + boost::math::jacobi_zeta(v1, v2, pol); + boost::math::heuman_lambda(v1, v2, pol); + boost::math::ellint_rc(v1, v2, pol); + boost::math::ellint_rd(v1, v2, v3, pol); + boost::math::ellint_rf(v1, v2, v3, pol); + boost::math::ellint_rg(v1, v2, v3, pol); + boost::math::ellint_rj(v1, v2, v3, v1, pol); + boost::math::jacobi_elliptic(v1, v2, &v1, &v2, pol); + boost::math::jacobi_cd(v1, v2, pol); + boost::math::jacobi_cn(v1, v2, pol); + boost::math::jacobi_cs(v1, v2, pol); + boost::math::jacobi_dc(v1, v2, pol); + boost::math::jacobi_dn(v1, v2, pol); + boost::math::jacobi_ds(v1, v2, pol); + boost::math::jacobi_nc(v1, v2, pol); + boost::math::jacobi_nd(v1, v2, pol); + boost::math::jacobi_ns(v1, v2, pol); + boost::math::jacobi_sc(v1, v2, pol); + boost::math::jacobi_sd(v1, v2, pol); + boost::math::jacobi_sn(v1, v2, pol); + boost::math::hypot(v1, v2, pol); + boost::math::sinc_pi(v1, pol); + boost::math::sinhc_pi(v1, pol); + boost::math::asinh(v1, pol); + boost::math::acosh(v1, pol); + boost::math::atanh(v1, pol); + boost::math::sin_pi(v1, pol); + boost::math::cos_pi(v1, pol); + boost::math::cyl_neumann(v1, v2, pol); + boost::math::cyl_neumann(i, v2, pol); + boost::math::cyl_bessel_j(v1, v2, pol); + boost::math::cyl_bessel_j(i, v2, pol); + boost::math::cyl_bessel_i(v1, v2, pol); + boost::math::cyl_bessel_i(i, v2, pol); + boost::math::cyl_bessel_k(v1, v2, pol); + boost::math::cyl_bessel_k(i, v2, pol); + boost::math::sph_bessel(i, v2, pol); + boost::math::sph_bessel(i, 1, pol); + boost::math::sph_neumann(i, v2, pol); + boost::math::sph_neumann(i, i, pol); + boost::math::cyl_neumann_prime(v1, v2, pol); + boost::math::cyl_neumann_prime(i, v2, pol); + boost::math::cyl_bessel_j_prime(v1, v2, pol); + boost::math::cyl_bessel_j_prime(i, v2, pol); + boost::math::cyl_bessel_i_prime(v1, v2, pol); + boost::math::cyl_bessel_i_prime(i, v2, pol); + boost::math::cyl_bessel_k_prime(v1, v2, pol); + boost::math::cyl_bessel_k_prime(i, v2, pol); + boost::math::sph_bessel_prime(i, v2, pol); + boost::math::sph_bessel_prime(i, 1, pol); + boost::math::sph_neumann_prime(i, v2, pol); + boost::math::sph_neumann_prime(i, i, pol); + boost::math::cyl_bessel_j_zero(v1, i, pol); + boost::math::cyl_bessel_j_zero(v1, i, i, oi, pol); + boost::math::cyl_neumann_zero(v1, i, pol); + boost::math::cyl_neumann_zero(v1, i, i, oi, pol); +#ifdef TEST_COMPLEX + boost::math::cyl_hankel_1(v1, v2, pol); + boost::math::cyl_hankel_1(i, v2, pol); + boost::math::cyl_hankel_2(v1, v2, pol); + boost::math::cyl_hankel_2(i, v2, pol); + boost::math::sph_hankel_1(v1, v2, pol); + boost::math::sph_hankel_1(i, v2, pol); + boost::math::sph_hankel_2(v1, v2, pol); + boost::math::sph_hankel_2(i, v2, pol); +#endif + boost::math::airy_ai(v1, pol); + boost::math::airy_bi(v1, pol); + boost::math::airy_ai_prime(v1, pol); + boost::math::airy_bi_prime(v1, pol); + + boost::math::airy_ai_zero<RealType>(i, pol); + boost::math::airy_bi_zero<RealType>(i, pol); + boost::math::airy_ai_zero<RealType>(i, i, oi, pol); + boost::math::airy_bi_zero<RealType>(i, i, oi, pol); + + boost::math::expint(v1, pol); + boost::math::expint(i, pol); + boost::math::expint(i, v2, pol); + boost::math::expint(i, i, pol); + boost::math::zeta(v1, pol); + boost::math::zeta(i, pol); + boost::math::owens_t(v1, v2, pol); + // + // These next functions are intended to be found via ADL: + // + BOOST_MATH_STD_USING + trunc(v1, pol); + itrunc(v1, pol); + ltrunc(v1, pol); + round(v1, pol); + iround(v1, pol); + lround(v1, pol); + modf(v1, &v1, pol); + modf(v1, &i, pol); + modf(v1, &l, pol); +#ifdef BOOST_HAS_LONG_LONG + using boost::math::lltrunc; + using boost::math::llround; + lltrunc(v1, pol); + llround(v1, pol); + modf(v1, &ll, pol); +#endif + boost::math::pow<2>(v1, pol); + boost::math::nextafter(v1, v1, pol); + boost::math::float_next(v1, pol); + boost::math::float_prior(v1, pol); + boost::math::float_distance(v1, v1, pol); + boost::math::ulp(v1, pol); + + boost::math::bernoulli_b2n<RealType>(i, pol); + boost::math::bernoulli_b2n<RealType>(i, i, &v1, pol); + boost::math::tangent_t2n<RealType>(i, pol); + boost::math::tangent_t2n<RealType>(i, i, &v1, pol); +#endif +#ifdef TEST_GROUP_6 + // + // All over again with the versions in test:: + // + test::tgamma(v1); + test::tgamma1pm1(v1); + test::lgamma(v1); + test::lgamma(v1, &i); + test::digamma(v1); + test::trigamma(v1); + test::polygamma(i, v1); + test::tgamma_ratio(v1, v2); + test::tgamma_delta_ratio(v1, v2); + test::factorial<RealType>(i); + test::unchecked_factorial<RealType>(i); + i = test::max_factorial<RealType>::value; + test::double_factorial<RealType>(i); + test::rising_factorial(v1, i); + test::falling_factorial(v1, i); + test::tgamma(v1, v2); + test::tgamma_lower(v1, v2); + test::gamma_p(v1, v2); + test::gamma_q(v1, v2); + test::gamma_p_inv(v1, v2); + test::gamma_q_inv(v1, v2); + test::gamma_p_inva(v1, v2); + test::gamma_q_inva(v1, v2); + test::erf(v1); + test::erfc(v1); + test::erf_inv(v1); + test::erfc_inv(v1); + test::beta(v1, v2); + test::beta(v1, v2, v3); + test::betac(v1, v2, v3); + test::ibeta(v1, v2, v3); + test::ibetac(v1, v2, v3); + test::ibeta_inv(v1, v2, v3); + test::ibetac_inv(v1, v2, v3); + test::ibeta_inva(v1, v2, v3); + test::ibetac_inva(v1, v2, v3); + test::ibeta_invb(v1, v2, v3); + test::ibetac_invb(v1, v2, v3); + test::gamma_p_derivative(v2, v3); + test::ibeta_derivative(v1, v2, v3); + test::binomial_coefficient<RealType>(i, i); + (test::fpclassify)(v1); + (test::isfinite)(v1); + (test::isnormal)(v1); + (test::isnan)(v1); + (test::isinf)(v1); + (test::signbit)(v1); + (test::copysign)(v1, v2); + (test::changesign)(v1); + (test::sign)(v1); + test::log1p(v1); + test::expm1(v1); + test::cbrt(v1); + test::sqrt1pm1(v1); + test::powm1(v1, v2); + test::legendre_p(1, v1); + test::legendre_p(1, 0, v1); + test::legendre_q(1, v1); + test::legendre_next(2, v1, v2, v3); + test::legendre_next(2, 2, v1, v2, v3); + test::laguerre(1, v1); + test::laguerre(2, 1, v1); + test::laguerre_next(2, v1, v2, v3); + test::laguerre_next(2, 1, v1, v2, v3); + test::hermite(1, v1); + test::hermite_next(2, v1, v2, v3); + test::spherical_harmonic_r(2, 1, v1, v2); + test::spherical_harmonic_i(2, 1, v1, v2); + test::ellint_1(v1); + test::ellint_1(v1, v2); + test::ellint_2(v1); + test::ellint_2(v1, v2); + test::ellint_3(v1, v2); + test::ellint_3(v1, v2, v3); + test::ellint_d(v1); + test::ellint_d(v1, v2); + test::jacobi_zeta(v1, v2); + test::heuman_lambda(v1, v2); + test::ellint_rc(v1, v2); + test::ellint_rd(v1, v2, v3); + test::ellint_rf(v1, v2, v3); + test::ellint_rg(v1, v2, v3); + test::ellint_rj(v1, v2, v3, v1); + test::jacobi_elliptic(v1, v2, &v1, &v2); + test::jacobi_cd(v1, v2); + test::jacobi_cn(v1, v2); + test::jacobi_cs(v1, v2); + test::jacobi_dc(v1, v2); + test::jacobi_dn(v1, v2); + test::jacobi_ds(v1, v2); + test::jacobi_nc(v1, v2); + test::jacobi_nd(v1, v2); + test::jacobi_ns(v1, v2); + test::jacobi_sc(v1, v2); + test::jacobi_sd(v1, v2); + test::jacobi_sn(v1, v2); + test::hypot(v1, v2); + test::sinc_pi(v1); + test::sinhc_pi(v1); + test::asinh(v1); + test::acosh(v1); + test::atanh(v1); + test::sin_pi(v1); + test::cos_pi(v1); + test::cyl_neumann(v1, v2); + test::cyl_neumann(i, v2); + test::cyl_bessel_j(v1, v2); + test::cyl_bessel_j(i, v2); + test::cyl_bessel_i(v1, v2); + test::cyl_bessel_i(i, v2); + test::cyl_bessel_k(v1, v2); + test::cyl_bessel_k(i, v2); + test::sph_bessel(i, v2); + test::sph_bessel(i, 1); + test::sph_neumann(i, v2); + test::sph_neumann(i, i); + test::cyl_neumann_prime(v1, v2); + test::cyl_neumann_prime(i, v2); + test::cyl_bessel_j_prime(v1, v2); + test::cyl_bessel_j_prime(i, v2); + test::cyl_bessel_i_prime(v1, v2); + test::cyl_bessel_i_prime(i, v2); + test::cyl_bessel_k_prime(v1, v2); + test::cyl_bessel_k_prime(i, v2); + test::sph_bessel_prime(i, v2); + test::sph_bessel_prime(i, 1); + test::sph_neumann_prime(i, v2); + test::sph_neumann_prime(i, i); + test::cyl_bessel_j_zero(v1, i); + test::cyl_bessel_j_zero(v1, i, i, oi); + test::cyl_neumann_zero(v1, i); + test::cyl_neumann_zero(v1, i, i, oi); +#ifdef TEST_COMPLEX + test::cyl_hankel_1(v1, v2); + test::cyl_hankel_1(i, v2); + test::cyl_hankel_2(v1, v2); + test::cyl_hankel_2(i, v2); + test::sph_hankel_1(v1, v2); + test::sph_hankel_1(i, v2); + test::sph_hankel_2(v1, v2); + test::sph_hankel_2(i, v2); +#endif + test::airy_ai(i); + test::airy_bi(i); + test::airy_ai_prime(i); + test::airy_bi_prime(i); + + test::airy_ai_zero<RealType>(i); + test::airy_bi_zero<RealType>(i); + test::airy_ai_zero<RealType>(i, i, oi); + test::airy_bi_zero<RealType>(i, i, oi); + + test::expint(v1); + test::expint(i); + test::expint(i, v2); + test::expint(i, i); + test::zeta(v1); + test::zeta(i); + test::owens_t(v1, v2); + test::trunc(v1); + test::itrunc(v1); + test::ltrunc(v1); + test::round(v1); + test::iround(v1); + test::lround(v1); + test::modf(v1, &v1); + test::modf(v1, &i); + test::modf(v1, &l); +#ifdef BOOST_HAS_LONG_LONG + test::lltrunc(v1); + test::llround(v1); + test::modf(v1, &ll); +#endif + test::pow<2>(v1); + test::nextafter(v1, v1); + test::float_next(v1); + test::float_prior(v1); + test::float_distance(v1, v1); + test::ulp(v1); +#endif +#endif +} + +template <class RealType> +void instantiate_mixed(RealType) +{ + using namespace boost; + using namespace boost::math; +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM + int i = 1; + long l = 1; + short s = 1; + float fr = 0.5F; + double dr = 0.5; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + long double lr = 0.5L; +#else + double lr = 0.5L; +#endif +#ifdef TEST_GROUP_7 + boost::math::tgamma(i); + boost::math::tgamma1pm1(i); + boost::math::lgamma(i); + boost::math::lgamma(i, &i); + boost::math::digamma(i); + boost::math::trigamma(i); + boost::math::polygamma(i, i); + boost::math::tgamma_ratio(i, l); + boost::math::tgamma_ratio(fr, lr); + boost::math::tgamma_delta_ratio(i, s); + boost::math::tgamma_delta_ratio(fr, lr); + boost::math::rising_factorial(s, i); + boost::math::falling_factorial(s, i); + boost::math::tgamma(i, l); + boost::math::tgamma(fr, lr); + boost::math::tgamma_lower(i, s); + boost::math::tgamma_lower(fr, lr); + boost::math::gamma_p(i, s); + boost::math::gamma_p(fr, lr); + boost::math::gamma_q(i, s); + boost::math::gamma_q(fr, lr); + boost::math::gamma_p_inv(i, fr); + boost::math::gamma_q_inv(s, fr); + boost::math::gamma_p_inva(i, lr); + boost::math::gamma_q_inva(i, lr); + boost::math::erf(i); + boost::math::erfc(i); + boost::math::erf_inv(i); + boost::math::erfc_inv(i); + boost::math::beta(i, s); + boost::math::beta(fr, lr); + boost::math::beta(i, s, l); + boost::math::beta(fr, dr, lr); + boost::math::betac(l, i, s); + boost::math::betac(fr, dr, lr); + boost::math::ibeta(l, i, s); + boost::math::ibeta(fr, dr, lr); + boost::math::ibetac(l, i, s); + boost::math::ibetac(fr, dr, lr); + boost::math::ibeta_inv(l, s, i); + boost::math::ibeta_inv(fr, dr, lr); + boost::math::ibetac_inv(l, i, s); + boost::math::ibetac_inv(fr, dr, lr); + boost::math::ibeta_inva(l, i, s); + boost::math::ibeta_inva(fr, dr, lr); + boost::math::ibetac_inva(l, i, s); + boost::math::ibetac_inva(fr, dr, lr); + boost::math::ibeta_invb(l, i, s); + boost::math::ibeta_invb(fr, dr, lr); + boost::math::ibetac_invb(l, i, s); + boost::math::ibetac_invb(fr, dr, lr); + boost::math::gamma_p_derivative(i, l); + boost::math::gamma_p_derivative(fr, lr); + boost::math::ibeta_derivative(l, i, s); + boost::math::ibeta_derivative(fr, dr, lr); + (boost::math::fpclassify)(i); + (boost::math::isfinite)(s); + (boost::math::isnormal)(l); + (boost::math::isnan)(i); + (boost::math::isinf)(l); + boost::math::log1p(i); + boost::math::expm1(s); + boost::math::cbrt(l); + boost::math::sqrt1pm1(s); + boost::math::powm1(i, s); + boost::math::powm1(fr, lr); + //boost::math::legendre_p(1, i); + boost::math::legendre_p(1, 0, s); + boost::math::legendre_q(1, i); + boost::math::laguerre(1, i); + boost::math::laguerre(2, 1, i); + boost::math::laguerre(2u, 1u, s); + boost::math::hermite(1, s); + boost::math::spherical_harmonic_r(2, 1, s, i); + boost::math::spherical_harmonic_i(2, 1, fr, lr); + boost::math::ellint_1(i); + boost::math::ellint_1(i, s); + boost::math::ellint_1(fr, lr); + boost::math::ellint_2(i); + boost::math::ellint_2(i, l); + boost::math::ellint_2(fr, lr); + boost::math::ellint_3(i, l); + boost::math::ellint_3(fr, lr); + boost::math::ellint_3(s, l, i); + boost::math::ellint_3(fr, dr, lr); + boost::math::ellint_d(i); + boost::math::ellint_d(i, l); + boost::math::ellint_d(fr, lr); + boost::math::jacobi_zeta(i, l); + boost::math::jacobi_zeta(fr, lr); + boost::math::heuman_lambda(i, l); + boost::math::heuman_lambda(fr, lr); + boost::math::ellint_rc(i, s); + boost::math::ellint_rc(fr, lr); + boost::math::ellint_rd(s, i, l); + boost::math::ellint_rd(fr, lr, dr); + boost::math::ellint_rf(s, l, i); + boost::math::ellint_rf(fr, dr, lr); + boost::math::ellint_rg(s, l, i); + boost::math::ellint_rg(fr, dr, lr); + boost::math::ellint_rj(i, i, s, l); + boost::math::ellint_rj(i, fr, dr, lr); + boost::math::jacobi_cd(i, fr); + boost::math::jacobi_cn(i, fr); + boost::math::jacobi_cs(i, fr); + boost::math::jacobi_dc(i, fr); + boost::math::jacobi_dn(i, fr); + boost::math::jacobi_ds(i, fr); + boost::math::jacobi_nc(i, fr); + boost::math::jacobi_nd(i, fr); + boost::math::jacobi_ns(i, fr); + boost::math::jacobi_sc(i, fr); + boost::math::jacobi_sd(i, fr); + boost::math::jacobi_sn(i, fr); + boost::math::hypot(i, s); + boost::math::hypot(fr, lr); + boost::math::sinc_pi(i); + boost::math::sinhc_pi(i); + boost::math::asinh(s); + boost::math::acosh(l); + boost::math::atanh(l); + boost::math::sin_pi(s); + boost::math::cos_pi(s); + boost::math::cyl_neumann(fr, dr); + boost::math::cyl_neumann(i, s); + boost::math::cyl_bessel_j(fr, lr); + boost::math::cyl_bessel_j(i, s); + boost::math::cyl_bessel_i(fr, lr); + boost::math::cyl_bessel_i(i, s); + boost::math::cyl_bessel_k(fr, lr); + boost::math::cyl_bessel_k(i, s); + boost::math::sph_bessel(i, fr); + boost::math::sph_bessel(i, 1); + boost::math::sph_neumann(i, lr); + boost::math::sph_neumann(i, i); + boost::math::cyl_neumann_prime(fr, dr); + boost::math::cyl_neumann_prime(i, s); + boost::math::cyl_bessel_j_prime(fr, lr); + boost::math::cyl_bessel_j_prime(i, s); + boost::math::cyl_bessel_i_prime(fr, lr); + boost::math::cyl_bessel_i_prime(i, s); + boost::math::cyl_bessel_k_prime(fr, lr); + boost::math::cyl_bessel_k_prime(i, s); + boost::math::sph_bessel_prime(i, fr); + boost::math::sph_bessel_prime(i, 1); + boost::math::sph_neumann_prime(i, lr); + boost::math::sph_neumann_prime(i, i); + boost::math::owens_t(fr, dr); + boost::math::owens_t(i, s); + + boost::math::policies::policy<> pol; + + + boost::math::tgamma(i, pol); + boost::math::tgamma1pm1(i, pol); + boost::math::lgamma(i, pol); + boost::math::lgamma(i, &i, pol); + boost::math::digamma(i, pol); + boost::math::trigamma(i, pol); + boost::math::polygamma(i, i, pol); + boost::math::tgamma_ratio(i, l, pol); + boost::math::tgamma_ratio(fr, lr, pol); + boost::math::tgamma_delta_ratio(i, s, pol); + boost::math::tgamma_delta_ratio(fr, lr, pol); + boost::math::rising_factorial(s, i, pol); + boost::math::falling_factorial(s, i, pol); + boost::math::tgamma(i, l, pol); + boost::math::tgamma(fr, lr, pol); + boost::math::tgamma_lower(i, s, pol); + boost::math::tgamma_lower(fr, lr, pol); + boost::math::gamma_p(i, s, pol); + boost::math::gamma_p(fr, lr, pol); + boost::math::gamma_q(i, s, pol); + boost::math::gamma_q(fr, lr, pol); + boost::math::gamma_p_inv(i, fr, pol); + boost::math::gamma_q_inv(s, fr, pol); + boost::math::gamma_p_inva(i, lr, pol); + boost::math::gamma_q_inva(i, lr, pol); + boost::math::erf(i, pol); + boost::math::erfc(i, pol); + boost::math::erf_inv(i, pol); + boost::math::erfc_inv(i, pol); + boost::math::beta(i, s, pol); + boost::math::beta(fr, lr, pol); + boost::math::beta(i, s, l, pol); + boost::math::beta(fr, dr, lr, pol); + boost::math::betac(l, i, s, pol); + boost::math::betac(fr, dr, lr, pol); + boost::math::ibeta(l, i, s, pol); + boost::math::ibeta(fr, dr, lr, pol); + boost::math::ibetac(l, i, s, pol); + boost::math::ibetac(fr, dr, lr, pol); + boost::math::ibeta_inv(l, s, i, pol); + boost::math::ibeta_inv(fr, dr, lr, pol); + boost::math::ibetac_inv(l, i, s, pol); + boost::math::ibetac_inv(fr, dr, lr, pol); + boost::math::ibeta_inva(l, i, s, pol); + boost::math::ibeta_inva(fr, dr, lr, pol); + boost::math::ibetac_inva(l, i, s, pol); + boost::math::ibetac_inva(fr, dr, lr, pol); + boost::math::ibeta_invb(l, i, s, pol); + boost::math::ibeta_invb(fr, dr, lr, pol); + boost::math::ibetac_invb(l, i, s, pol); + boost::math::ibetac_invb(fr, dr, lr, pol); + boost::math::gamma_p_derivative(i, l, pol); + boost::math::gamma_p_derivative(fr, lr, pol); + boost::math::ibeta_derivative(l, i, s, pol); + boost::math::ibeta_derivative(fr, dr, lr, pol); + boost::math::log1p(i, pol); + boost::math::expm1(s, pol); + boost::math::cbrt(l, pol); + boost::math::sqrt1pm1(s, pol); + boost::math::powm1(i, s, pol); + boost::math::powm1(fr, lr, pol); + //boost::math::legendre_p(1, i, pol); + boost::math::legendre_p(1, 0, s, pol); + boost::math::legendre_q(1, i, pol); + boost::math::laguerre(1, i, pol); + boost::math::laguerre(2, 1, i, pol); + boost::math::laguerre(2u, 1u, s, pol); + boost::math::hermite(1, s, pol); + boost::math::spherical_harmonic_r(2, 1, s, i, pol); + boost::math::spherical_harmonic_i(2, 1, fr, lr, pol); + boost::math::ellint_1(i, pol); + boost::math::ellint_1(i, s, pol); + boost::math::ellint_1(fr, lr, pol); + boost::math::ellint_2(i, pol); + boost::math::ellint_2(i, l, pol); + boost::math::ellint_2(fr, lr, pol); + boost::math::ellint_3(i, l, pol); + boost::math::ellint_3(fr, lr, pol); + boost::math::ellint_3(s, l, i, pol); + boost::math::ellint_3(fr, dr, lr, pol); + boost::math::ellint_d(i, pol); + boost::math::ellint_d(i, l, pol); + boost::math::ellint_d(fr, lr, pol); + boost::math::jacobi_zeta(i, l, pol); + boost::math::jacobi_zeta(fr, lr, pol); + boost::math::heuman_lambda(i, l, pol); + boost::math::heuman_lambda(fr, lr, pol); + boost::math::ellint_rc(i, s, pol); + boost::math::ellint_rc(fr, lr, pol); + boost::math::ellint_rd(s, i, l, pol); + boost::math::ellint_rd(fr, lr, dr, pol); + boost::math::ellint_rf(s, l, i, pol); + boost::math::ellint_rf(fr, dr, lr, pol); + boost::math::ellint_rg(s, l, i, pol); + boost::math::ellint_rg(fr, dr, lr, pol); + boost::math::ellint_rj(i, i, s, l, pol); + boost::math::ellint_rj(i, fr, dr, lr, pol); + boost::math::jacobi_cd(i, fr, pol); + boost::math::jacobi_cn(i, fr, pol); + boost::math::jacobi_cs(i, fr, pol); + boost::math::jacobi_dc(i, fr, pol); + boost::math::jacobi_dn(i, fr, pol); + boost::math::jacobi_ds(i, fr, pol); + boost::math::jacobi_nc(i, fr, pol); + boost::math::jacobi_nd(i, fr, pol); + boost::math::jacobi_ns(i, fr, pol); + boost::math::jacobi_sc(i, fr, pol); + boost::math::jacobi_sd(i, fr, pol); + boost::math::jacobi_sn(i, fr, pol); + boost::math::hypot(i, s, pol); + boost::math::hypot(fr, lr, pol); + boost::math::sinc_pi(i, pol); + boost::math::sinhc_pi(i, pol); + boost::math::asinh(s, pol); + boost::math::acosh(l, pol); + boost::math::atanh(l, pol); + boost::math::sin_pi(s, pol); + boost::math::cos_pi(s, pol); + boost::math::cyl_neumann(fr, dr, pol); + boost::math::cyl_neumann(i, s, pol); + boost::math::cyl_bessel_j(fr, lr, pol); + boost::math::cyl_bessel_j(i, s, pol); + boost::math::cyl_bessel_i(fr, lr, pol); + boost::math::cyl_bessel_i(i, s, pol); + boost::math::cyl_bessel_k(fr, lr, pol); + boost::math::cyl_bessel_k(i, s, pol); + boost::math::sph_bessel(i, fr, pol); + boost::math::sph_bessel(i, 1, pol); + boost::math::sph_neumann(i, lr, pol); + boost::math::sph_neumann(i, i, pol); + boost::math::cyl_neumann_prime(fr, dr, pol); + boost::math::cyl_neumann_prime(i, s, pol); + boost::math::cyl_bessel_j_prime(fr, lr, pol); + boost::math::cyl_bessel_j_prime(i, s, pol); + boost::math::cyl_bessel_i_prime(fr, lr, pol); + boost::math::cyl_bessel_i_prime(i, s, pol); + boost::math::cyl_bessel_k_prime(fr, lr, pol); + boost::math::cyl_bessel_k_prime(i, s, pol); + boost::math::sph_bessel_prime(i, fr, pol); + boost::math::sph_bessel_prime(i, 1, pol); + boost::math::sph_neumann_prime(i, lr, pol); + boost::math::sph_neumann_prime(i, i, pol); + boost::math::owens_t(fr, dr, pol); + boost::math::owens_t(i, s, pol); +#endif +#ifdef TEST_GROUP_8 + test::tgamma(i); + test::tgamma1pm1(i); + test::lgamma(i); + test::lgamma(i, &i); + test::digamma(i); + test::trigamma(i); + test::polygamma(i, i); + test::tgamma_ratio(i, l); + test::tgamma_ratio(fr, lr); + test::tgamma_delta_ratio(i, s); + test::tgamma_delta_ratio(fr, lr); + test::rising_factorial(s, i); + test::falling_factorial(s, i); + test::tgamma(i, l); + test::tgamma(fr, lr); + test::tgamma_lower(i, s); + test::tgamma_lower(fr, lr); + test::gamma_p(i, s); + test::gamma_p(fr, lr); + test::gamma_q(i, s); + test::gamma_q(fr, lr); + test::gamma_p_inv(i, fr); + test::gamma_q_inv(s, fr); + test::gamma_p_inva(i, lr); + test::gamma_q_inva(i, lr); + test::erf(i); + test::erfc(i); + test::erf_inv(i); + test::erfc_inv(i); + test::beta(i, s); + test::beta(fr, lr); + test::beta(i, s, l); + test::beta(fr, dr, lr); + test::betac(l, i, s); + test::betac(fr, dr, lr); + test::ibeta(l, i, s); + test::ibeta(fr, dr, lr); + test::ibetac(l, i, s); + test::ibetac(fr, dr, lr); + test::ibeta_inv(l, s, i); + test::ibeta_inv(fr, dr, lr); + test::ibetac_inv(l, i, s); + test::ibetac_inv(fr, dr, lr); + test::ibeta_inva(l, i, s); + test::ibeta_inva(fr, dr, lr); + test::ibetac_inva(l, i, s); + test::ibetac_inva(fr, dr, lr); + test::ibeta_invb(l, i, s); + test::ibeta_invb(fr, dr, lr); + test::ibetac_invb(l, i, s); + test::ibetac_invb(fr, dr, lr); + test::gamma_p_derivative(i, l); + test::gamma_p_derivative(fr, lr); + test::ibeta_derivative(l, i, s); + test::ibeta_derivative(fr, dr, lr); + (test::fpclassify)(i); + (test::isfinite)(s); + (test::isnormal)(l); + (test::isnan)(i); + (test::isinf)(l); + test::log1p(i); + test::expm1(s); + test::cbrt(l); + test::sqrt1pm1(s); + test::powm1(i, s); + test::powm1(fr, lr); + //test::legendre_p(1, i); + test::legendre_p(1, 0, s); + test::legendre_q(1, i); + test::laguerre(1, i); + test::laguerre(2, 1, i); + test::laguerre(2u, 1u, s); + test::hermite(1, s); + test::spherical_harmonic_r(2, 1, s, i); + test::spherical_harmonic_i(2, 1, fr, lr); + test::ellint_1(i); + test::ellint_1(i, s); + test::ellint_1(fr, lr); + test::ellint_2(i); + test::ellint_2(i, l); + test::ellint_2(fr, lr); + test::ellint_3(i, l); + test::ellint_3(fr, lr); + test::ellint_3(s, l, i); + test::ellint_3(fr, dr, lr); + test::ellint_d(i); + test::ellint_d(i, l); + test::ellint_d(fr, lr); + test::jacobi_zeta(i, l); + test::jacobi_zeta(fr, lr); + test::heuman_lambda(i, l); + test::heuman_lambda(fr, lr); + test::ellint_rc(i, s); + test::ellint_rc(fr, lr); + test::ellint_rd(s, i, l); + test::ellint_rd(fr, lr, dr); + test::ellint_rf(s, l, i); + test::ellint_rf(fr, dr, lr); + test::ellint_rg(s, l, i); + test::ellint_rg(fr, dr, lr); + test::ellint_rj(i, i, s, l); + test::ellint_rj(i, fr, dr, lr); + test::hypot(i, s); + test::hypot(fr, lr); + test::sinc_pi(i); + test::sinhc_pi(i); + test::asinh(s); + test::acosh(l); + test::atanh(l); + test::sin_pi(s); + test::cos_pi(s); + test::cyl_neumann(fr, dr); + test::cyl_neumann(i, s); + test::cyl_bessel_j(fr, lr); + test::cyl_bessel_j(i, s); + test::cyl_bessel_i(fr, lr); + test::cyl_bessel_i(i, s); + test::cyl_bessel_k(fr, lr); + test::cyl_bessel_k(i, s); + test::sph_bessel(i, fr); + test::sph_bessel(i, 1); + test::sph_neumann(i, lr); + test::sph_neumann(i, i); + test::cyl_neumann_prime(fr, dr); + test::cyl_neumann_prime(i, s); + test::cyl_bessel_j_prime(fr, lr); + test::cyl_bessel_j_prime(i, s); + test::cyl_bessel_i_prime(fr, lr); + test::cyl_bessel_i_prime(i, s); + test::cyl_bessel_k_prime(fr, lr); + test::cyl_bessel_k_prime(i, s); + test::sph_bessel_prime(i, fr); + test::sph_bessel_prime(i, 1); + test::sph_neumann_prime(i, lr); + test::sph_neumann_prime(i, i); + test::airy_ai(i); + test::airy_bi(i); + test::airy_ai_prime(i); + test::airy_bi_prime(i); + test::owens_t(fr, dr); + test::owens_t(i, s); +#endif +#endif +} + + +#endif // BOOST_LIBS_MATH_TEST_INSTANTIATE_HPP + diff --git a/boost/libs/math/test/compile_test/main.cpp b/boost/libs/math/test/compile_test/main.cpp new file mode 100644 index 00000000..86493a96 --- /dev/null +++ b/boost/libs/math/test/compile_test/main.cpp @@ -0,0 +1,13 @@ +// Copyright John Maddock 2009. +// 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) + +extern void compile_and_link_test(); + +int main(int argc, char* /*argv*/ []) +{ + if(argc > 1000) + compile_and_link_test(); // should never actually be called. + return 0; +} diff --git a/boost/libs/math/test/compile_test/poison.hpp b/boost/libs/math/test/compile_test/poison.hpp new file mode 100644 index 00000000..b059399a --- /dev/null +++ b/boost/libs/math/test/compile_test/poison.hpp @@ -0,0 +1,96 @@ +// Copyright John Maddock 2013. +// 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 BOOST_MATH_COMPILE_POISON_HPP +#define BOOST_MATH_COMPILE_POISON_HPP + +#include <cmath> +#include <math.h> +// +// We have to include this *before* poisoning the macros +// as it needs to be able to use them! +// +#include <boost/math/special_functions/fpclassify.hpp> + +// +// Poison all the function-like macros in C99 so if we accidentally call them +// in an unsafe manner, we'll get compiler errors. Of course these shouldn't be +// macros in C++ at all... +// + +#ifdef fpclassify +#undef fpclassify +#endif + +#define fpclassify(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isfinite +#undef isfinite +#endif + +#define isfinite(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isinf +#undef isinf +#endif + +#define isinf(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isnan +#undef isnan +#endif + +#define isnan(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isnormal +#undef isnormal +#endif + +#define isnormal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef signbit +#undef signbit +#endif + +#define signbit(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isgreater +#undef isgreater +#endif + +#define isgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isgreaterequal +#undef isgreaterequal +#endif + +#define isgreaterequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isless +#undef isless +#endif + +#define isless(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef islessequal +#undef islessequal +#endif + +#define islessequal(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef islessgreater +#undef islessgreater +#endif + +#define islessgreater(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#ifdef isunordered +#undef isunordered +#endif + +#define isunordered(x) this_should_not_compile(x)}}}}}}}}}}}}}}}}}}} + +#endif + diff --git a/boost/libs/math/test/compile_test/sf_airy_incl_test.cpp b/boost/libs/math/test/compile_test/sf_airy_incl_test.cpp new file mode 100644 index 00000000..be3aa478 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_airy_incl_test.cpp @@ -0,0 +1,42 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/airy.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::airy_ai<float>(f)); + check_result<double>(boost::math::airy_ai<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::airy_ai<long double>(l)); +#endif + + check_result<float>(boost::math::airy_bi<float>(f)); + check_result<double>(boost::math::airy_bi<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::airy_bi<long double>(l)); +#endif + + check_result<float>(boost::math::airy_ai_prime<float>(f)); + check_result<double>(boost::math::airy_ai_prime<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::airy_ai_prime<long double>(l)); +#endif + + check_result<float>(boost::math::airy_bi_prime<float>(f)); + check_result<double>(boost::math::airy_bi_prime<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::airy_bi_prime<long double>(l)); +#endif + +} diff --git a/boost/libs/math/test/compile_test/sf_bernoulli_incl_test.cpp b/boost/libs/math/test/compile_test/sf_bernoulli_incl_test.cpp new file mode 100644 index 00000000..cea6143d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_bernoulli_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bernoulli.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/bernoulli.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::bernoulli_b2n<float>(i)); + check_result<double>(boost::math::bernoulli_b2n<double>(i)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::bernoulli_b2n<long double>(i)); +#endif + + check_result<float>(boost::math::tangent_t2n<float>(i)); + check_result<double>(boost::math::tangent_t2n<double>(i)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::tangent_t2n<long double>(i)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_bessel_deriv_incl_test.cpp b/boost/libs/math/test/compile_test/sf_bessel_deriv_incl_test.cpp new file mode 100644 index 00000000..070bacab --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_bessel_deriv_incl_test.cpp @@ -0,0 +1,53 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/bessel_prime.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::cyl_bessel_j_prime<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_j_prime<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_j_prime<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_neumann_prime<float>(f, f)); + check_result<double>(boost::math::cyl_neumann_prime<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_neumann_prime<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_bessel_i_prime<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_i_prime<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_i_prime<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_bessel_k_prime<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_k_prime<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_k_prime<long double>(l, l)); +#endif + + check_result<float>(boost::math::sph_bessel_prime<float>(u, f)); + check_result<double>(boost::math::sph_bessel_prime<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sph_bessel_prime<long double>(u, l)); +#endif + + check_result<float>(boost::math::sph_neumann_prime<float>(u, f)); + check_result<double>(boost::math::sph_neumann_prime<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sph_neumann_prime<long double>(u, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_bessel_incl_test.cpp b/boost/libs/math/test/compile_test/sf_bessel_incl_test.cpp new file mode 100644 index 00000000..9226ced7 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_bessel_incl_test.cpp @@ -0,0 +1,53 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/bessel.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::cyl_bessel_j<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_j<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_j<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_neumann<float>(f, f)); + check_result<double>(boost::math::cyl_neumann<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_neumann<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_bessel_i<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_i<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_i<long double>(l, l)); +#endif + + check_result<float>(boost::math::cyl_bessel_k<float>(f, f)); + check_result<double>(boost::math::cyl_bessel_k<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cyl_bessel_k<long double>(l, l)); +#endif + + check_result<float>(boost::math::sph_bessel<float>(u, f)); + check_result<double>(boost::math::sph_bessel<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sph_bessel<long double>(u, l)); +#endif + + check_result<float>(boost::math::sph_neumann<float>(u, f)); + check_result<double>(boost::math::sph_neumann<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sph_neumann<long double>(u, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_beta_incl_test.cpp b/boost/libs/math/test/compile_test/sf_beta_incl_test.cpp new file mode 100644 index 00000000..e20431c6 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_beta_incl_test.cpp @@ -0,0 +1,42 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/beta.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/beta.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::beta<float, float>(f, f)); + check_result<double>(boost::math::beta<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::beta<long double>(l, l)); +#endif + + check_result<float>(boost::math::ibeta<float>(f, f, f)); + check_result<double>(boost::math::ibeta<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ibeta<long double>(l, l, l)); +#endif + + check_result<float>(boost::math::ibeta_inv<float>(f, f, f)); + check_result<double>(boost::math::ibeta_inv<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ibeta_inv<long double>(l, l, l)); +#endif + + check_result<float>(boost::math::ibeta_inva<float>(f, f, f)); + check_result<double>(boost::math::ibeta_inva<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ibeta_inva<long double>(l, l, l)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/sf_binomial_incl_test.cpp b/boost/libs/math/test/compile_test/sf_binomial_incl_test.cpp new file mode 100644 index 00000000..fe3ac010 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_binomial_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/binomial.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/binomial.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::binomial_coefficient<float>(u, u)); + check_result<double>(boost::math::binomial_coefficient<double>(u, u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::binomial_coefficient<long double>(u, u)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_cbrt_incl_test.cpp b/boost/libs/math/test/compile_test/sf_cbrt_incl_test.cpp new file mode 100644 index 00000000..ccd94bf7 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_cbrt_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/cbrt.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/cbrt.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::cbrt<float>(f)); + check_result<double>(boost::math::cbrt<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cbrt<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp b/boost/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp new file mode 100644 index 00000000..cc07ee4b --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/cos_pi.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/cos_pi.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::cos_pi<float>(f)); + check_result<double>(boost::math::cos_pi<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::cos_pi<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_digamma_incl_test.cpp b/boost/libs/math/test/compile_test/sf_digamma_incl_test.cpp new file mode 100644 index 00000000..960fd493 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_digamma_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/digamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/digamma.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::digamma<float>(f)); + check_result<double>(boost::math::digamma<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::digamma<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp new file mode 100644 index 00000000..376a7f10 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_1.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_1.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_1<float>(f, f)); + check_result<double>(boost::math::ellint_1<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_1<long double>(l, l)); +#endif + + check_result<float>(boost::math::ellint_1<float>(f)); + check_result<double>(boost::math::ellint_1<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_1<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp new file mode 100644 index 00000000..3eacaaa6 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_2.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_2.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_2<float>(f, f)); + check_result<double>(boost::math::ellint_2<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_2<long double>(l, l)); +#endif + + check_result<float>(boost::math::ellint_2<float>(f)); + check_result<double>(boost::math::ellint_2<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_2<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp new file mode 100644 index 00000000..4d1af4ac --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_3.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_3.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_3<float>(f, f)); + check_result<double>(boost::math::ellint_3<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_3<long double>(l, l)); +#endif + + check_result<float>(boost::math::ellint_3<float>(f, f, f)); + check_result<double>(boost::math::ellint_3<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_3<long double>(l, l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_d_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_d_incl_test.cpp new file mode 100644 index 00000000..c7c4249a --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_d_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_d.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_d.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_d<float>(f, f)); + check_result<double>(boost::math::ellint_d<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_d<long double>(l, l)); +#endif + + check_result<float>(boost::math::ellint_d<float>(f)); + check_result<double>(boost::math::ellint_d<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_d<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp new file mode 100644 index 00000000..ea7e9699 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_rc.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_rc.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_rc<float>(f, f)); + check_result<double>(boost::math::ellint_rc<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_rc<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp new file mode 100644 index 00000000..38879eda --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_rd.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_rd.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_rd<float>(f, f, f)); + check_result<double>(boost::math::ellint_rd<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_rd<long double>(l, l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp new file mode 100644 index 00000000..ca3b00e7 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_rf.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_rf.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_rf<float>(f, f, f)); + check_result<double>(boost::math::ellint_rf<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_rf<long double>(l, l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_rg_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_rg_incl_test.cpp new file mode 100644 index 00000000..fed70d95 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_rg_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_rf.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_rg.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_rg<float>(f, f, f)); + check_result<double>(boost::math::ellint_rg<double>(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_rg<long double>(l, l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp new file mode 100644 index 00000000..96507eae --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_rj.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ellint_rj.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ellint_rj<float>(f, f, f, f)); + check_result<double>(boost::math::ellint_rj<double>(d, d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ellint_rj<long double>(l, l, l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_erf_incl_test.cpp b/boost/libs/math/test/compile_test/sf_erf_incl_test.cpp new file mode 100644 index 00000000..e15d24f4 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_erf_incl_test.cpp @@ -0,0 +1,41 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/erf.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/erf.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::erf<float>(f)); + check_result<double>(boost::math::erf<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::erf<long double>(l)); +#endif + + check_result<float>(boost::math::erfc<float>(f)); + check_result<double>(boost::math::erfc<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::erfc<long double>(l)); +#endif + + check_result<float>(boost::math::erf_inv<float>(f)); + check_result<double>(boost::math::erf_inv<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::erf_inv<long double>(l)); +#endif + + check_result<float>(boost::math::erfc_inv<float>(f)); + check_result<double>(boost::math::erfc_inv<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::erfc_inv<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_expint_incl_test.cpp b/boost/libs/math/test/compile_test/sf_expint_incl_test.cpp new file mode 100644 index 00000000..98fc70cf --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_expint_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2007. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/expint.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/expint.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::expint(f)); + check_result<double>(boost::math::expint(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::expint(l)); +#endif + check_result<float>(boost::math::expint(u, f)); + check_result<double>(boost::math::expint(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::expint(u, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_expm1_incl_test.cpp b/boost/libs/math/test/compile_test/sf_expm1_incl_test.cpp new file mode 100644 index 00000000..4b5a353a --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_expm1_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/expm1.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/expm1.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::expm1<float>(f)); + check_result<double>(boost::math::expm1<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::expm1<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_factorials_incl_test.cpp b/boost/libs/math/test/compile_test/sf_factorials_incl_test.cpp new file mode 100644 index 00000000..d640a4c1 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_factorials_incl_test.cpp @@ -0,0 +1,42 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/factorials.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/factorials.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::factorial<float>(u)); + check_result<double>(boost::math::factorial<double>(u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::factorial<long double>(u)); +#endif + + check_result<float>(boost::math::double_factorial<float>(u)); + check_result<double>(boost::math::double_factorial<double>(u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::double_factorial<long double>(u)); +#endif + + check_result<float>(boost::math::rising_factorial<float>(f, i)); + check_result<double>(boost::math::rising_factorial<double>(d, i)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::rising_factorial<long double>(l, i)); +#endif + + check_result<float>(boost::math::falling_factorial<float>(f, u)); + check_result<double>(boost::math::falling_factorial<double>(d, u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::falling_factorial<long double>(l, u)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp b/boost/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp new file mode 100644 index 00000000..7fb57fce --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp @@ -0,0 +1,43 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/fpclassify.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/fpclassify.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<int>(boost::math::fpclassify BOOST_NO_MACRO_EXPAND<float>(f)); + check_result<int>(boost::math::fpclassify BOOST_NO_MACRO_EXPAND<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<int>(boost::math::fpclassify BOOST_NO_MACRO_EXPAND<long double>(l)); +#endif + + check_result<bool>(boost::math::isfinite BOOST_NO_MACRO_EXPAND<float>(f)); + check_result<bool>(boost::math::isfinite BOOST_NO_MACRO_EXPAND<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<bool>(boost::math::isfinite BOOST_NO_MACRO_EXPAND<long double>(l)); +#endif + + check_result<bool>(boost::math::isinf BOOST_NO_MACRO_EXPAND<float>(f)); + check_result<bool>(boost::math::isinf BOOST_NO_MACRO_EXPAND<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<bool>(boost::math::isinf BOOST_NO_MACRO_EXPAND<long double>(l)); +#endif + + check_result<bool>(boost::math::isnormal BOOST_NO_MACRO_EXPAND<float>(f)); + check_result<bool>(boost::math::isnormal BOOST_NO_MACRO_EXPAND<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<bool>(boost::math::isnormal BOOST_NO_MACRO_EXPAND<long double>(l)); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/sf_gamma_incl_test.cpp b/boost/libs/math/test/compile_test/sf_gamma_incl_test.cpp new file mode 100644 index 00000000..f7ad18e9 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_gamma_incl_test.cpp @@ -0,0 +1,83 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/gamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/gamma.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::tgamma<float>(f)); + check_result<double>(boost::math::tgamma<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::tgamma<long double>(l)); +#endif + + check_result<float>(boost::math::lgamma<float>(f)); + check_result<double>(boost::math::lgamma<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::lgamma<long double>(l)); +#endif + + check_result<float>(boost::math::gamma_p<float>(f, f)); + check_result<double>(boost::math::gamma_p<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_p<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_q<float>(f, f)); + check_result<double>(boost::math::gamma_q<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_q<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_p_inv<float>(f, f)); + check_result<double>(boost::math::gamma_p_inv<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_p_inv<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_q_inv<float>(f, f)); + check_result<double>(boost::math::gamma_q_inv<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_q_inv<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_p_inva<float>(f, f)); + check_result<double>(boost::math::gamma_p_inva<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_p_inva<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_q_inva<float>(f, f)); + check_result<double>(boost::math::gamma_q_inva<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_q_inva<long double>(l, l)); +#endif + + check_result<float>(boost::math::gamma_p_derivative<float>(f, f)); + check_result<double>(boost::math::gamma_p_derivative<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::gamma_p_derivative<long double>(l, l)); +#endif + + check_result<float>(boost::math::tgamma_ratio<float>(f, f)); + check_result<double>(boost::math::tgamma_ratio<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::tgamma_ratio<long double>(l, l)); +#endif + + check_result<float>(boost::math::tgamma_delta_ratio<float>(f, f)); + check_result<double>(boost::math::tgamma_delta_ratio<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::tgamma_delta_ratio<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_hankel_incl_test.cpp b/boost/libs/math/test/compile_test/sf_hankel_incl_test.cpp new file mode 100644 index 00000000..5a32dca2 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_hankel_incl_test.cpp @@ -0,0 +1,46 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/hankel.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::cyl_hankel_1<float>(f, f)); + check_result<std::complex<double> >(boost::math::cyl_hankel_1<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::cyl_hankel_1<long double>(l, l)); +#endif + + check_result<std::complex<float> >(boost::math::cyl_hankel_2<float>(f, f)); + check_result<std::complex<double> >(boost::math::cyl_hankel_2<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::cyl_hankel_2<long double>(l, l)); +#endif + + check_result<std::complex<float> >(boost::math::sph_hankel_1<float>(f, f)); + check_result<std::complex<double> >(boost::math::sph_hankel_1<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::sph_hankel_1<long double>(l, l)); +#endif + + check_result<std::complex<float> >(boost::math::sph_hankel_2<float>(f, f)); + check_result<std::complex<double> >(boost::math::sph_hankel_2<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::sph_hankel_2<long double>(l, l)); +#endif + +} diff --git a/boost/libs/math/test/compile_test/sf_hermite_incl_test.cpp b/boost/libs/math/test/compile_test/sf_hermite_incl_test.cpp new file mode 100644 index 00000000..0ed4ad63 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_hermite_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/hermite.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/hermite.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::hermite<float>(u, f)); + check_result<double>(boost::math::hermite<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::hermite<long double>(u, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_heuman_lambda_incl_test.cpp b/boost/libs/math/test/compile_test/sf_heuman_lambda_incl_test.cpp new file mode 100644 index 00000000..4ed1245d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_heuman_lambda_incl_test.cpp @@ -0,0 +1,23 @@ +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_d.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/heuman_lambda.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::heuman_lambda<float>(f, f)); + check_result<double>(boost::math::heuman_lambda<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::heuman_lambda<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_hypot_incl_test.cpp b/boost/libs/math/test/compile_test/sf_hypot_incl_test.cpp new file mode 100644 index 00000000..c74b7f0f --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_hypot_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/hypot.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/hypot.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::hypot<float>(f, f)); + check_result<double>(boost::math::hypot<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::hypot<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_jacobi_incl_test.cpp b/boost/libs/math/test/compile_test/sf_jacobi_incl_test.cpp new file mode 100644 index 00000000..a1fc66b0 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_jacobi_incl_test.cpp @@ -0,0 +1,96 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/jacobi_elliptic.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::jacobi_elliptic<float>(f, f, static_cast<float*>(0), static_cast<float*>(0))); + check_result<double>(boost::math::jacobi_elliptic<double>(d, d, static_cast<double*>(0), static_cast<double*>(0))); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_elliptic<long double>(l, l, static_cast<long double*>(0), static_cast<long double*>(0))); +#endif + + check_result<float>(boost::math::jacobi_sn<float>(f, f)); + check_result<double>(boost::math::jacobi_sn<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_sn<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_cn<float>(f, f)); + check_result<double>(boost::math::jacobi_cn<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_cn<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_dn<float>(f, f)); + check_result<double>(boost::math::jacobi_dn<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_dn<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_cd<float>(f, f)); + check_result<double>(boost::math::jacobi_cd<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_cd<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_dc<float>(f, f)); + check_result<double>(boost::math::jacobi_dc<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_dc<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_ns<float>(f, f)); + check_result<double>(boost::math::jacobi_ns<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_ns<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_sd<float>(f, f)); + check_result<double>(boost::math::jacobi_sd<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_sd<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_ds<float>(f, f)); + check_result<double>(boost::math::jacobi_ds<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_ds<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_nc<float>(f, f)); + check_result<double>(boost::math::jacobi_nc<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_nc<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_nd<float>(f, f)); + check_result<double>(boost::math::jacobi_nd<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_nd<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_sc<float>(f, f)); + check_result<double>(boost::math::jacobi_sc<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_sc<long double>(l, l)); +#endif + + check_result<float>(boost::math::jacobi_cs<float>(f, f)); + check_result<double>(boost::math::jacobi_cs<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_cs<long double>(l, l)); +#endif + +} diff --git a/boost/libs/math/test/compile_test/sf_jacobi_zeta_incl_test.cpp b/boost/libs/math/test/compile_test/sf_jacobi_zeta_incl_test.cpp new file mode 100644 index 00000000..78dcd288 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_jacobi_zeta_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/ellint_d.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/jacobi_zeta.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::jacobi_zeta<float>(f, f)); + check_result<double>(boost::math::jacobi_zeta<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::jacobi_zeta<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_laguerre_incl_test.cpp b/boost/libs/math/test/compile_test/sf_laguerre_incl_test.cpp new file mode 100644 index 00000000..6b44e479 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_laguerre_incl_test.cpp @@ -0,0 +1,32 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/laguerre.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/laguerre.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::laguerre<float>(u, f)); + check_result<double>(boost::math::laguerre<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::laguerre<long double>(u, l)); +#endif + + typedef boost::math::policies::policy<> def_pol; + def_pol p; + + check_result<float>(boost::math::laguerre<float, def_pol>(u, u, f, p)); + check_result<double>(boost::math::laguerre<double, def_pol>(u, u, d, p)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::laguerre<long double, def_pol>(u, u, l, p)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_lanczos_incl_test.cpp b/boost/libs/math/test/compile_test/sf_lanczos_incl_test.cpp new file mode 100644 index 00000000..ef54883b --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_lanczos_incl_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/lanczos.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/lanczos.hpp> + diff --git a/boost/libs/math/test/compile_test/sf_legendre_incl_test.cpp b/boost/libs/math/test/compile_test/sf_legendre_incl_test.cpp new file mode 100644 index 00000000..48adc76b --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_legendre_incl_test.cpp @@ -0,0 +1,35 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/legendre.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/legendre.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::legendre_p<float>(i, f)); + check_result<double>(boost::math::legendre_p<double>(i, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::legendre_p<long double>(i, l)); +#endif + + check_result<float>(boost::math::legendre_p<float>(i, i, f)); + check_result<double>(boost::math::legendre_p<double>(i, i, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::legendre_p<long double>(i, i, l)); +#endif + + check_result<float>(boost::math::legendre_q<float>(u, f)); + check_result<double>(boost::math::legendre_q<double>(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::legendre_q<long double>(u, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_log1p_incl_test.cpp b/boost/libs/math/test/compile_test/sf_log1p_incl_test.cpp new file mode 100644 index 00000000..3302a59d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_log1p_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/log1p.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/log1p.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::log1p<float>(f)); + check_result<double>(boost::math::log1p<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::log1p<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_math_fwd_incl_test.cpp b/boost/libs/math/test/compile_test/sf_math_fwd_incl_test.cpp new file mode 100644 index 00000000..6e790977 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_math_fwd_incl_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/math_fwd.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/math_fwd.hpp> + diff --git a/boost/libs/math/test/compile_test/sf_modf_incl_test.cpp b/boost/libs/math/test/compile_test/sf_modf_incl_test.cpp new file mode 100644 index 00000000..0df0741d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_modf_incl_test.cpp @@ -0,0 +1,50 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/modf.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/modf.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +float ff; +double dd; +long double lldd; + +int ii; +long ll; +#ifdef BOOST_HAS_LONG_LONG +boost::long_long_type llll; +#endif + +void compile_and_link_test() +{ + check_result<float>(boost::math::modf(f, &ff)); + check_result<double>(boost::math::modf(d, &dd)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::modf(l, &lldd)); +#endif + check_result<float>(boost::math::modf(f, &ii)); + check_result<double>(boost::math::modf(d, &ii)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::modf(l, &ii)); +#endif + check_result<float>(boost::math::modf(f, &ll)); + check_result<double>(boost::math::modf(d, &ll)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::modf(l, &ll)); +#endif +#ifdef BOOST_HAS_LONG_LONG + check_result<float>(boost::math::modf(f, &llll)); + check_result<double>(boost::math::modf(d, &llll)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::modf(l, &llll)); +#endif +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_next_incl_test.cpp b/boost/libs/math/test/compile_test/sf_next_incl_test.cpp new file mode 100644 index 00000000..371a661d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_next_incl_test.cpp @@ -0,0 +1,48 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/next.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/next.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::nextafter<float>(f, f)); + check_result<double>(boost::math::nextafter<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::nextafter<long double>(l, l)); +#endif + + check_result<float>(boost::math::float_next<float>(f)); + check_result<double>(boost::math::float_next<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::float_next<long double>(l)); +#endif + + check_result<float>(boost::math::float_prior<float>(f)); + check_result<double>(boost::math::float_prior<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::float_prior<long double>(l)); +#endif + + check_result<float>(boost::math::float_distance<float>(f, f)); + check_result<double>(boost::math::float_distance<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::float_distance<long double>(l, l)); +#endif + + check_result<float>(boost::math::float_advance<float>(f, 2)); + check_result<double>(boost::math::float_advance<double>(d, 2)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::float_advance<long double>(l, 2)); +#endif + +} diff --git a/boost/libs/math/test/compile_test/sf_owens_t_incl_test.cpp b/boost/libs/math/test/compile_test/sf_owens_t_incl_test.cpp new file mode 100644 index 00000000..2839a077 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_owens_t_incl_test.cpp @@ -0,0 +1,24 @@ +// Copyright John Maddock 2012. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/bessel.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/owens_t.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::owens_t<float>(f, f)); + check_result<double>(boost::math::owens_t<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::owens_t<long double>(l, l)); +#endif + +} diff --git a/boost/libs/math/test/compile_test/sf_polygamma_incl_test.cpp b/boost/libs/math/test/compile_test/sf_polygamma_incl_test.cpp new file mode 100644 index 00000000..88364499 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_polygamma_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/digamma.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/polygamma.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::trigamma<float>(f)); + check_result<double>(boost::math::trigamma<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::trigamma<long double>(l)); +#endif + check_result<float>(boost::math::polygamma<float>(1, f)); + check_result<double>(boost::math::polygamma<double>(1, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::polygamma<long double>(1, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_powm1_incl_test.cpp b/boost/libs/math/test/compile_test/sf_powm1_incl_test.cpp new file mode 100644 index 00000000..04cabb0a --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_powm1_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/powm1.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/powm1.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::powm1<float>(f, f)); + check_result<double>(boost::math::powm1<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::powm1<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_relative_distance_incl_test.cpp b/boost/libs/math/test/compile_test/sf_relative_distance_incl_test.cpp new file mode 100644 index 00000000..6b6ae292 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_relative_distance_incl_test.cpp @@ -0,0 +1,28 @@ +// 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) +// +// Basic sanity check that header <boost/math/special_functions/next.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/relative_difference.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::relative_difference<float>(f, f)); + check_result<double>(boost::math::relative_difference<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::relative_difference<long double>(l, l)); +#endif + check_result<float>(boost::math::epsilon_difference<float>(f, f)); + check_result<double>(boost::math::epsilon_difference<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::epsilon_difference<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_round_incl_test.cpp b/boost/libs/math/test/compile_test/sf_round_incl_test.cpp new file mode 100644 index 00000000..6deb71b3 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_round_incl_test.cpp @@ -0,0 +1,40 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/round.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/round.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::round<float>(f)); + check_result<double>(boost::math::round<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::round<long double>(l)); +#endif + check_result<int>(boost::math::iround<float>(f)); + check_result<int>(boost::math::iround<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<int>(boost::math::iround<long double>(l)); +#endif + check_result<long>(boost::math::lround<float>(f)); + check_result<long>(boost::math::lround<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long>(boost::math::lround<long double>(l)); +#endif +#ifdef BOOST_HAS_LONG_LONG + check_result<boost::long_long_type>(boost::math::llround<float>(f)); + check_result<boost::long_long_type>(boost::math::llround<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<boost::long_long_type>(boost::math::llround<long double>(l)); +#endif +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_sign_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sign_incl_test.cpp new file mode 100644 index 00000000..f4e8dd2f --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sign_incl_test.cpp @@ -0,0 +1,35 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/sign.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/sign.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<int>(boost::math::sign<float>(f)); + check_result<int>(boost::math::sign<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<int>(boost::math::sign<long double>(l)); +#endif + + check_result<int>(boost::math::signbit<float>(f)); + check_result<int>(boost::math::signbit<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<int>(boost::math::signbit<long double>(l)); +#endif + + check_result<float>(boost::math::copysign<float>(f, f)); + check_result<double>(boost::math::copysign<double>(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::copysign<long double>(l, l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp new file mode 100644 index 00000000..a5bd100d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/sin_pi.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/sin_pi.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::sin_pi<float>(f)); + check_result<double>(boost::math::sin_pi<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sin_pi<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_sinc_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sinc_incl_test.cpp new file mode 100644 index 00000000..1c529dfc --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sinc_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/sinc.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/sinc.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::sinc_pi<float>(f)); + check_result<double>(boost::math::sinc_pi<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sinc_pi<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_sinhc_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sinhc_incl_test.cpp new file mode 100644 index 00000000..22a448d5 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sinhc_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/sinhc.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/sinhc.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::sinhc_pi<float>(f)); + check_result<double>(boost::math::sinhc_pi<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sinhc_pi<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp new file mode 100644 index 00000000..ed7de85e --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp @@ -0,0 +1,43 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/spherical_harmonic.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/spherical_harmonic.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +inline void check_result_imp(std::complex<float>, std::complex<float>){} +inline void check_result_imp(std::complex<double>, std::complex<double>){} +inline void check_result_imp(std::complex<long double>, std::complex<long double>){} + +#include "test_compile_result.hpp" + + + +void compile_and_link_test() +{ + check_result<std::complex<float> >(boost::math::spherical_harmonic<float>(u, i, f, f)); + check_result<std::complex<double> >(boost::math::spherical_harmonic<double>(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<std::complex<long double> >(boost::math::spherical_harmonic<long double>(u, i, l, l)); +#endif + + check_result<float>(boost::math::spherical_harmonic_r<float>(u, i, f, f)); + check_result<double>(boost::math::spherical_harmonic_r<double>(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::spherical_harmonic_r<long double>(u, i, l, l)); +#endif + + check_result<float>(boost::math::spherical_harmonic_i<float>(u, i, f, f)); + check_result<double>(boost::math::spherical_harmonic_i<double>(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::spherical_harmonic_i<long double>(u, i, l, l)); +#endif +} + + diff --git a/boost/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp b/boost/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp new file mode 100644 index 00000000..38dfb574 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/sqrt1pm1.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/sqrt1pm1.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::sqrt1pm1<float>(f)); + check_result<double>(boost::math::sqrt1pm1<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::sqrt1pm1<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_trunc_incl_test.cpp b/boost/libs/math/test/compile_test/sf_trunc_incl_test.cpp new file mode 100644 index 00000000..33b9ee34 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_trunc_incl_test.cpp @@ -0,0 +1,40 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/trunc.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/trunc.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::trunc<float>(f)); + check_result<double>(boost::math::trunc<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::trunc<long double>(l)); +#endif + check_result<int>(boost::math::itrunc<float>(f)); + check_result<int>(boost::math::itrunc<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<int>(boost::math::itrunc<long double>(l)); +#endif + check_result<long>(boost::math::ltrunc<float>(f)); + check_result<long>(boost::math::ltrunc<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long>(boost::math::ltrunc<long double>(l)); +#endif +#ifdef BOOST_HAS_LONG_LONG + check_result<boost::long_long_type>(boost::math::lltrunc<float>(f)); + check_result<boost::long_long_type>(boost::math::lltrunc<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<boost::long_long_type>(boost::math::lltrunc<long double>(l)); +#endif +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_ulp_incl_test.cpp b/boost/libs/math/test/compile_test/sf_ulp_incl_test.cpp new file mode 100644 index 00000000..ce70276d --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_ulp_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/next.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/ulp.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::ulp<float>(f)); + check_result<double>(boost::math::ulp<double>(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::ulp<long double>(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/sf_zeta_incl_test.cpp b/boost/libs/math/test/compile_test/sf_zeta_incl_test.cpp new file mode 100644 index 00000000..fa582b57 --- /dev/null +++ b/boost/libs/math/test/compile_test/sf_zeta_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2007. +// 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) +// +// Basic sanity check that header <boost/math/special_functions/zeta.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/special_functions/zeta.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result<float>(boost::math::zeta(f)); + check_result<double>(boost::math::zeta(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result<long double>(boost::math::zeta(l)); +#endif +} diff --git a/boost/libs/math/test/compile_test/std_real_concept_check.cpp b/boost/libs/math/test/compile_test/std_real_concept_check.cpp new file mode 100644 index 00000000..a83297a7 --- /dev/null +++ b/boost/libs/math/test/compile_test/std_real_concept_check.cpp @@ -0,0 +1,203 @@ +// Copyright John Maddock 2006. +// 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) + +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include "poison.hpp" + +#include <boost/math/concepts/std_real_concept.hpp> +#include <boost/math/concepts/distributions.hpp> + +#include "instantiate.hpp" + +// +// The purpose of this test is to verify that our code compiles +// cleanly with a type whose std lib functions are in namespace +// std and can *not* be found by ADL. This verifies that we're +// not finding std lib functions that are in the global namespace +// for example calling ::pow(double) rather than std::pow(long double). +// This is a silent error that does the wrong thing at runtime, and +// of course we can't call std::pow() directly because we want +// the functions to be found by ADL when that's appropriate. +// +// Furthermore our code does different things internally depending +// on numeric_limits<>::digits, so there are some macros that can +// be defined that cause our concept-archetype to emulate various +// floating point types: +// +// EMULATE32: 32-bit float +// EMULATE64: 64-bit double +// EMULATE80: 80-bit long double +// EMULATE128: 128-bit long double +// +// In order to ensure total code coverage this file must be +// compiled with each of the above macros in turn, and then +// without any of the above as well! +// + +#define NULL_MACRO /**/ +#ifdef EMULATE32 +namespace std{ +template<> +struct numeric_limits<boost::math::concepts::std_real_concept> +{ + static const bool is_specialized = true; + static boost::math::concepts::std_real_concept min NULL_MACRO() throw(); + static boost::math::concepts::std_real_concept max NULL_MACRO() throw(); + static const int digits = 24; + static const int digits10 = 6; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static boost::math::concepts::std_real_concept epsilon() throw(); + static boost::math::concepts::std_real_concept round_error() throw(); + static const int min_exponent = -125; + static const int min_exponent10 = -37; + static const int max_exponent = 128; + static const int max_exponent10 = 38; + static const bool has_infinity = true; + static const bool has_quiet_NaN = true; + static const bool has_signaling_NaN = true; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static boost::math::concepts::std_real_concept infinity() throw(); + static boost::math::concepts::std_real_concept quiet_NaN() throw(); + static boost::math::concepts::std_real_concept signaling_NaN() throw(); + static boost::math::concepts::std_real_concept denorm_min() throw(); + static const bool is_iec559 = true; + static const bool is_bounded = false; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; +}; +} +#endif +#ifdef EMULATE64 +namespace std{ +template<> +struct numeric_limits<boost::math::concepts::std_real_concept> +{ + static const bool is_specialized = true; + static boost::math::concepts::std_real_concept min NULL_MACRO() throw(); + static boost::math::concepts::std_real_concept max NULL_MACRO() throw(); + static const int digits = 53; + static const int digits10 = 15; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static boost::math::concepts::std_real_concept epsilon() throw(); + static boost::math::concepts::std_real_concept round_error() throw(); + static const int min_exponent = -1021; + static const int min_exponent10 = -307; + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + static const bool has_infinity = true; + static const bool has_quiet_NaN = true; + static const bool has_signaling_NaN = true; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static boost::math::concepts::std_real_concept infinity() throw(); + static boost::math::concepts::std_real_concept quiet_NaN() throw(); + static boost::math::concepts::std_real_concept signaling_NaN() throw(); + static boost::math::concepts::std_real_concept denorm_min() throw(); + static const bool is_iec559 = true; + static const bool is_bounded = false; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; +}; +} +#endif +#ifdef EMULATE80 +namespace std{ +template<> +struct numeric_limits<boost::math::concepts::std_real_concept> +{ + static const bool is_specialized = true; + static boost::math::concepts::std_real_concept min NULL_MACRO() throw(); + static boost::math::concepts::std_real_concept max NULL_MACRO() throw(); + static const int digits = 64; + static const int digits10 = 18; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static boost::math::concepts::std_real_concept epsilon() throw(); + static boost::math::concepts::std_real_concept round_error() throw(); + static const int min_exponent = -16381; + static const int min_exponent10 = -4931; + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + static const bool has_infinity = true; + static const bool has_quiet_NaN = true; + static const bool has_signaling_NaN = true; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static boost::math::concepts::std_real_concept infinity() throw(); + static boost::math::concepts::std_real_concept quiet_NaN() throw(); + static boost::math::concepts::std_real_concept signaling_NaN() throw(); + static boost::math::concepts::std_real_concept denorm_min() throw(); + static const bool is_iec559 = true; + static const bool is_bounded = false; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; +}; +} +#endif +#ifdef EMULATE128 +namespace std{ +template<> +struct numeric_limits<boost::math::concepts::std_real_concept> +{ + static const bool is_specialized = true; + static boost::math::concepts::std_real_concept min NULL_MACRO() throw(); + static boost::math::concepts::std_real_concept max NULL_MACRO() throw(); + static const int digits = 113; + static const int digits10 = 33; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static boost::math::concepts::std_real_concept epsilon() throw(); + static boost::math::concepts::std_real_concept round_error() throw(); + static const int min_exponent = -16381; + static const int min_exponent10 = -4931; + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + static const bool has_infinity = true; + static const bool has_quiet_NaN = true; + static const bool has_signaling_NaN = true; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static boost::math::concepts::std_real_concept infinity() throw(); + static boost::math::concepts::std_real_concept quiet_NaN() throw(); + static boost::math::concepts::std_real_concept signaling_NaN() throw(); + static boost::math::concepts::std_real_concept denorm_min() throw(); + static const bool is_iec559 = true; + static const bool is_bounded = false; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; +}; +} +#endif + + + +int main(int argc, char*[]) +{ +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(argc > 1000) + instantiate(boost::math::concepts::std_real_concept(0)); +#endif +} + diff --git a/boost/libs/math/test/compile_test/test_compile_result.hpp b/boost/libs/math/test/compile_test/test_compile_result.hpp new file mode 100644 index 00000000..e246c5b9 --- /dev/null +++ b/boost/libs/math/test/compile_test/test_compile_result.hpp @@ -0,0 +1,165 @@ +// Copyright John Maddock 2007. +// 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) + +// +// Note this header must NOT include any other headers, for its +// use to be meaningful (because we use it in tests designed to +// detect missing includes). +// + +static const float f = 0; +static const double d = 0; +static const long double l = 0; +static const unsigned u = 0; +static const int i = 0; + +//template <class T> +//inline void check_result_imp(T, T){} + +inline void check_result_imp(float, float){} +inline void check_result_imp(double, double){} +inline void check_result_imp(long double, long double){} +inline void check_result_imp(int, int){} +inline void check_result_imp(long, long){} +#ifdef BOOST_HAS_LONG_LONG +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) +{ + // 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> +inline void check_result(T2) +{ + T1 a = T1(); + T2 b = T2(); + return check_result_imp(a, b); +} + +union max_align_type +{ + char c; + short s; + int i; + long l; + double d; + long double ld; +#ifdef BOOST_HAS_LONG_LONG + long long ll; +#endif +}; + +template <class Distribution> +struct DistributionConcept +{ + static void constraints() + { + typedef typename Distribution::value_type value_type; + + const Distribution& dist = DistributionConcept<Distribution>::get_object(); + + value_type x = 0; + // The result values are ignored in all these checks. + check_result<value_type>(cdf(dist, x)); + check_result<value_type>(cdf(complement(dist, x))); + check_result<value_type>(pdf(dist, x)); + check_result<value_type>(quantile(dist, x)); + check_result<value_type>(quantile(complement(dist, x))); + check_result<value_type>(mean(dist)); + check_result<value_type>(mode(dist)); + check_result<value_type>(standard_deviation(dist)); + check_result<value_type>(variance(dist)); + check_result<value_type>(hazard(dist, x)); + check_result<value_type>(chf(dist, x)); + check_result<value_type>(coefficient_of_variation(dist)); + check_result<value_type>(skewness(dist)); + check_result<value_type>(kurtosis(dist)); + check_result<value_type>(kurtosis_excess(dist)); + check_result<value_type>(median(dist)); + // + // we can't actually test that at std::pair is returned from these + // because that would mean including some std lib headers.... + // + range(dist); + support(dist); + + check_result<value_type>(cdf(dist, f)); + check_result<value_type>(cdf(complement(dist, f))); + check_result<value_type>(pdf(dist, f)); + check_result<value_type>(quantile(dist, f)); + check_result<value_type>(quantile(complement(dist, f))); + check_result<value_type>(hazard(dist, f)); + check_result<value_type>(chf(dist, f)); + check_result<value_type>(cdf(dist, d)); + check_result<value_type>(cdf(complement(dist, d))); + check_result<value_type>(pdf(dist, d)); + check_result<value_type>(quantile(dist, d)); + check_result<value_type>(quantile(complement(dist, d))); + check_result<value_type>(hazard(dist, d)); + check_result<value_type>(chf(dist, d)); + check_result<value_type>(cdf(dist, l)); + check_result<value_type>(cdf(complement(dist, l))); + check_result<value_type>(pdf(dist, l)); + check_result<value_type>(quantile(dist, l)); + check_result<value_type>(quantile(complement(dist, l))); + check_result<value_type>(hazard(dist, l)); + check_result<value_type>(chf(dist, l)); + check_result<value_type>(cdf(dist, i)); + check_result<value_type>(cdf(complement(dist, i))); + check_result<value_type>(pdf(dist, i)); + check_result<value_type>(quantile(dist, i)); + check_result<value_type>(quantile(complement(dist, i))); + check_result<value_type>(hazard(dist, i)); + check_result<value_type>(chf(dist, i)); + unsigned long li = 1; + check_result<value_type>(cdf(dist, li)); + check_result<value_type>(cdf(complement(dist, li))); + check_result<value_type>(pdf(dist, li)); + check_result<value_type>(quantile(dist, li)); + check_result<value_type>(quantile(complement(dist, li))); + check_result<value_type>(hazard(dist, li)); + check_result<value_type>(chf(dist, li)); + } +private: + static void* storage() + { + static max_align_type storage[sizeof(Distribution)]; + return storage; + } + static Distribution* get_object_p() + { + return static_cast<Distribution*>(storage()); + } + static Distribution& get_object() + { + // will never get called: + return *get_object_p(); + } +}; // struct DistributionConcept + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#define TEST_DIST_FUNC(dist)\ + DistributionConcept< boost::math::dist##_distribution<float> >::constraints();\ + DistributionConcept< boost::math::dist##_distribution<double> >::constraints();\ + DistributionConcept< boost::math::dist##_distribution<long double> >::constraints(); +#else +#define TEST_DIST_FUNC(dist)\ + DistributionConcept< boost::math::dist##_distribution<float> >::constraints();\ + DistributionConcept< boost::math::dist##_distribution<double> >::constraints(); +#endif diff --git a/boost/libs/math/test/compile_test/test_traits.cpp b/boost/libs/math/test/compile_test/test_traits.cpp new file mode 100644 index 00000000..6af0ef36 --- /dev/null +++ b/boost/libs/math/test/compile_test/test_traits.cpp @@ -0,0 +1,56 @@ +// Copyright John Maddock 2007. + +// 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/math/tools/traits.hpp> +#include <boost/static_assert.hpp> +#include <boost/math/distributions.hpp> + +using namespace boost::math; + +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<double>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<int>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<bernoulli>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<beta_distribution<> >::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<binomial>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<cauchy>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<chi_squared>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<exponential>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<extreme_value>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<fisher_f>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<gamma_distribution<> >::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<lognormal>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<negative_binomial>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<normal>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<pareto>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<poisson>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<rayleigh>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<students_t>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<triangular>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<uniform>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<weibull>::value); + +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<double>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<int>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<bernoulli>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<beta_distribution<> >::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<binomial>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<cauchy>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<chi_squared>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<exponential>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<extreme_value>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<fisher_f>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<gamma_distribution<> >::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<lognormal>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<negative_binomial>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<normal>::value); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<pareto>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<poisson>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<rayleigh>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<students_t>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<triangular>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<uniform>::value == false); +BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<weibull>::value == false); + diff --git a/boost/libs/math/test/compile_test/tools_config_inc_test.cpp b/boost/libs/math/test/compile_test/tools_config_inc_test.cpp new file mode 100644 index 00000000..d9f76594 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_config_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/config.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/config.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_fraction_inc_test.cpp b/boost/libs/math/test/compile_test/tools_fraction_inc_test.cpp new file mode 100644 index 00000000..e185137e --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_fraction_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/fraction.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/fraction.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_minima_inc_test.cpp b/boost/libs/math/test/compile_test/tools_minima_inc_test.cpp new file mode 100644 index 00000000..367d7b63 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_minima_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/minima.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/minima.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_polynomial_inc_test.cpp b/boost/libs/math/test/compile_test/tools_polynomial_inc_test.cpp new file mode 100644 index 00000000..111d5be5 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_polynomial_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/polynomial.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/polynomial.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_precision_inc_test.cpp b/boost/libs/math/test/compile_test/tools_precision_inc_test.cpp new file mode 100644 index 00000000..84c59ef9 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_precision_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/precision.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/precision.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_rational_inc_test.cpp b/boost/libs/math/test/compile_test/tools_rational_inc_test.cpp new file mode 100644 index 00000000..46b5de44 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_rational_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/rational.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/rational.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_real_cast_inc_test.cpp b/boost/libs/math/test/compile_test/tools_real_cast_inc_test.cpp new file mode 100644 index 00000000..e46bdc94 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_real_cast_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/real_cast.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/real_cast.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_remez_inc_test.cpp b/boost/libs/math/test/compile_test/tools_remez_inc_test.cpp new file mode 100644 index 00000000..121b0b4d --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_remez_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/remez.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/remez.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_roots_inc_test.cpp b/boost/libs/math/test/compile_test/tools_roots_inc_test.cpp new file mode 100644 index 00000000..61527c7c --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_roots_inc_test.cpp @@ -0,0 +1,40 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/roots.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/roots.hpp> +#include <boost/math/tools/tuple.hpp> +#include <utility> // for std::pair, our headers don't know what tuple type is to be used, we have to supply it. +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +inline void check_result_imp(std::pair<float, float>, std::pair<float, float>){} +inline void check_result_imp(std::pair<double, double>, std::pair<double, double>){} +inline void check_result_imp(std::pair<long double, long double>, std::pair<long double, long double>){} + +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + typedef double (*F)(double); + typedef std::pair<double, double> (*F2)(double); + typedef boost::math::tuple<double, double, double> (*F3)(double); + typedef boost::math::tools::eps_tolerance<double> Tol; + Tol tol(u); + boost::uintmax_t max_iter = 0; + F f = 0; + F2 f2 = 0; + F3 f3 = 0; + + check_result<std::pair<double, double> >(boost::math::tools::bisect<F, double, Tol>(f, d, d, tol, max_iter)); + check_result<std::pair<double, double> >(boost::math::tools::bisect<F, double, Tol>(f, d, d, tol)); + check_result<double>(boost::math::tools::newton_raphson_iterate<F2, double>(f2, d, d, d, i, max_iter)); + check_result<double>(boost::math::tools::halley_iterate<F3, double>(f3, d, d, d, i, max_iter)); + check_result<double>(boost::math::tools::schroder_iterate<F3, double>(f3, d, d, d, i, max_iter)); +} + diff --git a/boost/libs/math/test/compile_test/tools_series_inc_test.cpp b/boost/libs/math/test/compile_test/tools_series_inc_test.cpp new file mode 100644 index 00000000..f8558443 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_series_inc_test.cpp @@ -0,0 +1,35 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/series.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/series.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +struct Functor +{ + typedef double result_type; + double operator()(); +}; +#define U double + +Functor func; +boost::uintmax_t uim = 0; + +void compile_and_link_test() +{ + check_result<Functor::result_type>(boost::math::tools::sum_series<Functor>(func, i)); + check_result<Functor::result_type>(boost::math::tools::sum_series<Functor>(func, i, uim)); + check_result<Functor::result_type>(boost::math::tools::sum_series<Functor, U>(func, i, d)); + check_result<Functor::result_type>(boost::math::tools::sum_series<Functor, U>(func, i, uim, d)); + check_result<Functor::result_type>(boost::math::tools::kahan_sum_series<Functor>(func, i)); + check_result<Functor::result_type>(boost::math::tools::kahan_sum_series<Functor>(func, i, uim)); +} + diff --git a/boost/libs/math/test/compile_test/tools_solve_inc_test.cpp b/boost/libs/math/test/compile_test/tools_solve_inc_test.cpp new file mode 100644 index 00000000..a0dcd0d3 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_solve_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/solve.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/solve.hpp> + diff --git a/boost/libs/math/test/compile_test/tools_stats_inc_test.cpp b/boost/libs/math/test/compile_test/tools_stats_inc_test.cpp new file mode 100644 index 00000000..6d5898b4 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_stats_inc_test.cpp @@ -0,0 +1,11 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/stats.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/stats.hpp> + +template class boost::math::tools::stats<double>; diff --git a/boost/libs/math/test/compile_test/tools_test_data_inc_test.cpp b/boost/libs/math/test/compile_test/tools_test_data_inc_test.cpp new file mode 100644 index 00000000..d2daa5e9 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_test_data_inc_test.cpp @@ -0,0 +1,21 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/test_data.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/test_data.hpp> + +#define T double + +template boost::math::tools::parameter_info<T> boost::math::tools::make_random_param<T>(T start_range, T end_range, int n_points); +template boost::math::tools::parameter_info<T> boost::math::tools::make_periodic_param<T>(T start_range, T end_range, int n_points); +template boost::math::tools::parameter_info<T> boost::math::tools::make_power_param<T>(T basis, int start_exponent, int end_exponent); + +template class boost::math::tools::test_data<T>; + +template bool boost::math::tools::get_user_parameter_info<T>(boost::math::tools::parameter_info<T>& info, const char* param_name); + + diff --git a/boost/libs/math/test/compile_test/tools_test_inc_test.cpp b/boost/libs/math/test/compile_test/tools_test_inc_test.cpp new file mode 100644 index 00000000..8cc73377 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_test_inc_test.cpp @@ -0,0 +1,36 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/test.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/test.hpp> +#include <boost/array.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +inline void check_result_imp(boost::math::tools::test_result<double>, boost::math::tools::test_result<double>){} + +#include "test_compile_result.hpp" + + +void compile_and_link_test() +{ + check_result<float>(boost::math::tools::relative_error<float>(f, f)); + + #define A boost::array<boost::array<double, 2>, 2> + typedef double (*F1)(const boost::array<double, 2>&); + typedef F1 F2; + A a; + F1 f1 = 0; + F2 f2 = 0; + + check_result<boost::math::tools::test_result< + boost::math::tools::calculate_result_type<A>::value_type> > + (boost::math::tools::test<A, F1, F2>(a, f1, f2)); + +} + diff --git a/boost/libs/math/test/compile_test/tools_toms748_inc_test.cpp b/boost/libs/math/test/compile_test/tools_toms748_inc_test.cpp new file mode 100644 index 00000000..3c321006 --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_toms748_inc_test.cpp @@ -0,0 +1,18 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/toms748_solve.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/toms748_solve.hpp> + +#define T double +#define Tol boost::math::tools::eps_tolerance<double> + +typedef T (*F)(T); + +template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol >(F, const T&, const T&, const T&, const T&, Tol, boost::uintmax_t&); +template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol>(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter); +template std::pair<T, T> boost::math::tools::bracket_and_solve_root<F, T, Tol>(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter); diff --git a/boost/libs/math/test/compile_test/tools_tuple_inc_test.cpp b/boost/libs/math/test/compile_test/tools_tuple_inc_test.cpp new file mode 100644 index 00000000..39910e9b --- /dev/null +++ b/boost/libs/math/test/compile_test/tools_tuple_inc_test.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header <boost/math/tools/config.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tools/tuple.hpp> + diff --git a/boost/libs/math/test/compile_test/tr1_incl_test.cpp b/boost/libs/math/test/compile_test/tr1_incl_test.cpp new file mode 100644 index 00000000..43baafbe --- /dev/null +++ b/boost/libs/math/test/compile_test/tr1_incl_test.cpp @@ -0,0 +1,366 @@ +// Copyright John Maddock 2008. +// 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) +// +// Basic sanity check that header <boost/math/tr1.hpp> +// #includes all the files that it needs to. +// +#include <boost/math/tr1.hpp> +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + unsigned ui = 0; + + check_result<float>(boost::math::tr1::assoc_laguerre(ui, ui, f)); + check_result<float>(boost::math::tr1::assoc_laguerref(ui, ui, f)); + check_result<double>(boost::math::tr1::assoc_laguerre(ui, ui, d)); + check_result<long double>(boost::math::tr1::assoc_laguerre(ui, ui, l)); + check_result<long double>(boost::math::tr1::assoc_laguerrel(ui, ui, l)); + check_result<double>(boost::math::tr1::assoc_laguerre(ui, ui, i)); + check_result<double>(boost::math::tr1::assoc_laguerre(ui, ui, ui)); + + check_result<float>(boost::math::tr1::assoc_legendre(ui, ui, f)); + check_result<float>(boost::math::tr1::assoc_legendref(ui, ui, f)); + check_result<double>(boost::math::tr1::assoc_legendre(ui, ui, d)); + check_result<long double>(boost::math::tr1::assoc_legendre(ui, ui, l)); + check_result<long double>(boost::math::tr1::assoc_legendrel(ui, ui, l)); + check_result<double>(boost::math::tr1::assoc_legendre(ui, ui, i)); + check_result<double>(boost::math::tr1::assoc_legendre(ui, ui, ui)); + + check_result<float>(boost::math::tr1::beta(f, f)); + check_result<float>(boost::math::tr1::betaf(f, f)); + check_result<double>(boost::math::tr1::beta(d, d)); + check_result<long double>(boost::math::tr1::beta(l, l)); + check_result<long double>(boost::math::tr1::betal(l, l)); + check_result<double>(boost::math::tr1::beta(ui, ui)); + check_result<double>(boost::math::tr1::beta(i, ui)); + check_result<double>(boost::math::tr1::beta(f, d)); + check_result<long double>(boost::math::tr1::beta(l, d)); + + check_result<float>(boost::math::tr1::comp_ellint_1(f)); + check_result<float>(boost::math::tr1::comp_ellint_1f(f)); + check_result<double>(boost::math::tr1::comp_ellint_1(d)); + check_result<long double>(boost::math::tr1::comp_ellint_1(l)); + check_result<long double>(boost::math::tr1::comp_ellint_1l(l)); + check_result<double>(boost::math::tr1::comp_ellint_1(ui)); + check_result<double>(boost::math::tr1::comp_ellint_1(i)); + + check_result<float>(boost::math::tr1::comp_ellint_2(f)); + check_result<float>(boost::math::tr1::comp_ellint_2f(f)); + check_result<double>(boost::math::tr1::comp_ellint_2(d)); + check_result<long double>(boost::math::tr1::comp_ellint_2(l)); + check_result<long double>(boost::math::tr1::comp_ellint_2l(l)); + check_result<double>(boost::math::tr1::comp_ellint_2(ui)); + check_result<double>(boost::math::tr1::comp_ellint_2(i)); + + check_result<float>(boost::math::tr1::comp_ellint_3(f, f)); + check_result<float>(boost::math::tr1::comp_ellint_3f(f, f)); + check_result<double>(boost::math::tr1::comp_ellint_3(d, d)); + check_result<long double>(boost::math::tr1::comp_ellint_3(l, l)); + check_result<long double>(boost::math::tr1::comp_ellint_3l(l, l)); + check_result<double>(boost::math::tr1::comp_ellint_3(ui, ui)); + check_result<double>(boost::math::tr1::comp_ellint_3(i, ui)); + check_result<double>(boost::math::tr1::comp_ellint_3(f, d)); + check_result<long double>(boost::math::tr1::comp_ellint_3(l, d)); + + check_result<float>(boost::math::tr1::cyl_bessel_i(f, f)); + check_result<float>(boost::math::tr1::cyl_bessel_if(f, f)); + check_result<double>(boost::math::tr1::cyl_bessel_i(d, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_i(l, l)); + check_result<long double>(boost::math::tr1::cyl_bessel_il(l, l)); + check_result<double>(boost::math::tr1::cyl_bessel_i(ui, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_i(i, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_i(f, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_i(l, d)); + + check_result<float>(boost::math::tr1::cyl_bessel_j(f, f)); + check_result<float>(boost::math::tr1::cyl_bessel_jf(f, f)); + check_result<double>(boost::math::tr1::cyl_bessel_j(d, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_j(l, l)); + check_result<long double>(boost::math::tr1::cyl_bessel_jl(l, l)); + check_result<double>(boost::math::tr1::cyl_bessel_j(ui, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_j(i, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_j(f, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_j(l, d)); + + check_result<float>(boost::math::tr1::cyl_bessel_k(f, f)); + check_result<float>(boost::math::tr1::cyl_bessel_kf(f, f)); + check_result<double>(boost::math::tr1::cyl_bessel_k(d, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_k(l, l)); + check_result<long double>(boost::math::tr1::cyl_bessel_kl(l, l)); + check_result<double>(boost::math::tr1::cyl_bessel_k(ui, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_k(i, ui)); + check_result<double>(boost::math::tr1::cyl_bessel_k(f, d)); + check_result<long double>(boost::math::tr1::cyl_bessel_k(l, d)); + + check_result<float>(boost::math::tr1::cyl_neumann(f, f)); + check_result<float>(boost::math::tr1::cyl_neumannf(f, f)); + check_result<double>(boost::math::tr1::cyl_neumann(d, d)); + check_result<long double>(boost::math::tr1::cyl_neumann(l, l)); + check_result<long double>(boost::math::tr1::cyl_neumannl(l, l)); + check_result<double>(boost::math::tr1::cyl_neumann(ui, ui)); + check_result<double>(boost::math::tr1::cyl_neumann(i, ui)); + check_result<double>(boost::math::tr1::cyl_neumann(f, d)); + check_result<long double>(boost::math::tr1::cyl_neumann(l, d)); + + check_result<float>(boost::math::tr1::ellint_1(f, f)); + check_result<float>(boost::math::tr1::ellint_1f(f, f)); + check_result<double>(boost::math::tr1::ellint_1(d, d)); + check_result<long double>(boost::math::tr1::ellint_1(l, l)); + check_result<long double>(boost::math::tr1::ellint_1l(l, l)); + check_result<double>(boost::math::tr1::ellint_1(ui, ui)); + check_result<double>(boost::math::tr1::ellint_1(i, ui)); + check_result<double>(boost::math::tr1::ellint_1(f, d)); + check_result<long double>(boost::math::tr1::ellint_1(l, d)); + + check_result<float>(boost::math::tr1::ellint_2(f, f)); + check_result<float>(boost::math::tr1::ellint_2f(f, f)); + check_result<double>(boost::math::tr1::ellint_2(d, d)); + check_result<long double>(boost::math::tr1::ellint_2(l, l)); + check_result<long double>(boost::math::tr1::ellint_2l(l, l)); + check_result<double>(boost::math::tr1::ellint_2(ui, ui)); + check_result<double>(boost::math::tr1::ellint_2(i, ui)); + check_result<double>(boost::math::tr1::ellint_2(f, d)); + check_result<long double>(boost::math::tr1::ellint_2(l, d)); + + check_result<float>(boost::math::tr1::ellint_3(f, f, f)); + check_result<float>(boost::math::tr1::ellint_3f(f, f, f)); + check_result<double>(boost::math::tr1::ellint_3(d, d, d)); + check_result<long double>(boost::math::tr1::ellint_3(l, l, l)); + check_result<long double>(boost::math::tr1::ellint_3l(l, l, l)); + check_result<double>(boost::math::tr1::ellint_3(ui, ui, i)); + check_result<double>(boost::math::tr1::ellint_3(i, ui, f)); + check_result<double>(boost::math::tr1::ellint_3(f, d, i)); + check_result<long double>(boost::math::tr1::ellint_3(l, d, f)); + + check_result<float>(boost::math::tr1::expint(f)); + check_result<float>(boost::math::tr1::expintf(f)); + check_result<double>(boost::math::tr1::expint(d)); + check_result<long double>(boost::math::tr1::expint(l)); + check_result<long double>(boost::math::tr1::expintl(l)); + check_result<double>(boost::math::tr1::expint(ui)); + check_result<double>(boost::math::tr1::expint(i)); + + check_result<float>(boost::math::tr1::hermite(ui, f)); + check_result<float>(boost::math::tr1::hermitef(ui, f)); + check_result<double>(boost::math::tr1::hermite(ui, d)); + check_result<long double>(boost::math::tr1::hermite(ui, l)); + check_result<long double>(boost::math::tr1::hermitel(ui, l)); + check_result<double>(boost::math::tr1::hermite(ui, i)); + check_result<double>(boost::math::tr1::hermite(ui, ui)); + + check_result<float>(boost::math::tr1::laguerre(ui, f)); + check_result<float>(boost::math::tr1::laguerref(ui, f)); + check_result<double>(boost::math::tr1::laguerre(ui, d)); + check_result<long double>(boost::math::tr1::laguerre(ui, l)); + check_result<long double>(boost::math::tr1::laguerrel(ui, l)); + check_result<double>(boost::math::tr1::laguerre(ui, i)); + check_result<double>(boost::math::tr1::laguerre(ui, ui)); + + check_result<float>(boost::math::tr1::legendre(ui, f)); + check_result<float>(boost::math::tr1::legendref(ui, f)); + check_result<double>(boost::math::tr1::legendre(ui, d)); + check_result<long double>(boost::math::tr1::legendre(ui, l)); + check_result<long double>(boost::math::tr1::legendrel(ui, l)); + check_result<double>(boost::math::tr1::legendre(ui, i)); + check_result<double>(boost::math::tr1::legendre(ui, ui)); + + check_result<float>(boost::math::tr1::riemann_zeta(f)); + check_result<float>(boost::math::tr1::riemann_zetaf(f)); + check_result<double>(boost::math::tr1::riemann_zeta(d)); + check_result<long double>(boost::math::tr1::riemann_zeta(l)); + check_result<long double>(boost::math::tr1::riemann_zetal(l)); + check_result<double>(boost::math::tr1::riemann_zeta(ui)); + check_result<double>(boost::math::tr1::riemann_zeta(i)); + + check_result<float>(boost::math::tr1::sph_bessel(ui, f)); + check_result<float>(boost::math::tr1::sph_besself(ui, f)); + check_result<double>(boost::math::tr1::sph_bessel(ui, d)); + check_result<long double>(boost::math::tr1::sph_bessel(ui, l)); + check_result<long double>(boost::math::tr1::sph_bessell(ui, l)); + check_result<double>(boost::math::tr1::sph_bessel(ui, i)); + check_result<double>(boost::math::tr1::sph_bessel(ui, ui)); + + check_result<float>(boost::math::tr1::sph_legendre(ui, ui, f)); + check_result<float>(boost::math::tr1::sph_legendref(ui, ui, f)); + check_result<double>(boost::math::tr1::sph_legendre(ui, ui, d)); + check_result<long double>(boost::math::tr1::sph_legendre(ui, ui, l)); + check_result<long double>(boost::math::tr1::sph_legendrel(ui, ui, l)); + check_result<double>(boost::math::tr1::sph_legendre(ui, ui, i)); + check_result<double>(boost::math::tr1::sph_legendre(ui, ui, ui)); + + check_result<float>(boost::math::tr1::sph_neumann(ui, f)); + check_result<float>(boost::math::tr1::sph_neumannf(ui, f)); + check_result<double>(boost::math::tr1::sph_neumann(ui, d)); + check_result<long double>(boost::math::tr1::sph_neumann(ui, l)); + check_result<long double>(boost::math::tr1::sph_neumannl(ui, l)); + check_result<double>(boost::math::tr1::sph_neumann(ui, i)); + check_result<double>(boost::math::tr1::sph_neumann(ui, ui)); + + check_result<float>(boost::math::tr1::acosh(f)); + check_result<float>(boost::math::tr1::acoshf(f)); + check_result<double>(boost::math::tr1::acosh(d)); + check_result<long double>(boost::math::tr1::acosh(l)); + check_result<long double>(boost::math::tr1::acoshl(l)); + check_result<double>(boost::math::tr1::acosh(ui)); + check_result<double>(boost::math::tr1::acosh(i)); + + check_result<float>(boost::math::tr1::asinh(f)); + check_result<float>(boost::math::tr1::asinhf(f)); + check_result<double>(boost::math::tr1::asinh(d)); + check_result<long double>(boost::math::tr1::asinh(l)); + check_result<long double>(boost::math::tr1::asinhl(l)); + check_result<double>(boost::math::tr1::asinh(ui)); + check_result<double>(boost::math::tr1::asinh(i)); + + check_result<float>(boost::math::tr1::atanh(f)); + check_result<float>(boost::math::tr1::atanhf(f)); + check_result<double>(boost::math::tr1::atanh(d)); + check_result<long double>(boost::math::tr1::atanh(l)); + check_result<long double>(boost::math::tr1::atanhl(l)); + check_result<double>(boost::math::tr1::atanh(ui)); + check_result<double>(boost::math::tr1::atanh(i)); + + check_result<float>(boost::math::tr1::cbrt(f)); + check_result<float>(boost::math::tr1::cbrtf(f)); + check_result<double>(boost::math::tr1::cbrt(d)); + check_result<long double>(boost::math::tr1::cbrt(l)); + check_result<long double>(boost::math::tr1::cbrtl(l)); + check_result<double>(boost::math::tr1::cbrt(ui)); + check_result<double>(boost::math::tr1::cbrt(i)); + + check_result<float>(boost::math::tr1::copysign(f, f)); + check_result<float>(boost::math::tr1::copysignf(f, f)); + check_result<double>(boost::math::tr1::copysign(d, d)); + check_result<long double>(boost::math::tr1::copysign(l, l)); + check_result<long double>(boost::math::tr1::copysignl(l, l)); + check_result<double>(boost::math::tr1::copysign(d, i)); + check_result<double>(boost::math::tr1::copysign(ui, f)); + + check_result<float>(boost::math::tr1::erf(f)); + check_result<float>(boost::math::tr1::erff(f)); + check_result<double>(boost::math::tr1::erf(d)); + check_result<long double>(boost::math::tr1::erf(l)); + check_result<long double>(boost::math::tr1::erfl(l)); + check_result<double>(boost::math::tr1::erf(ui)); + check_result<double>(boost::math::tr1::erf(i)); + + check_result<float>(boost::math::tr1::erfc(f)); + check_result<float>(boost::math::tr1::erfcf(f)); + check_result<double>(boost::math::tr1::erfc(d)); + check_result<long double>(boost::math::tr1::erfc(l)); + check_result<long double>(boost::math::tr1::erfcl(l)); + check_result<double>(boost::math::tr1::erfc(ui)); + check_result<double>(boost::math::tr1::erfc(i)); + + check_result<float>(boost::math::tr1::expm1(f)); + check_result<float>(boost::math::tr1::expm1f(f)); + check_result<double>(boost::math::tr1::expm1(d)); + check_result<long double>(boost::math::tr1::expm1(l)); + check_result<long double>(boost::math::tr1::expm1l(l)); + check_result<double>(boost::math::tr1::expm1(ui)); + check_result<double>(boost::math::tr1::expm1(i)); + + check_result<float>(boost::math::tr1::fmin(f, f)); + check_result<float>(boost::math::tr1::fminf(f, f)); + check_result<double>(boost::math::tr1::fmin(d, d)); + check_result<long double>(boost::math::tr1::fmin(l, l)); + check_result<long double>(boost::math::tr1::fminl(l, l)); + check_result<double>(boost::math::tr1::fmin(d, i)); + check_result<double>(boost::math::tr1::fmin(ui, f)); + + check_result<float>(boost::math::tr1::fmax(f, f)); + check_result<float>(boost::math::tr1::fmaxf(f, f)); + check_result<double>(boost::math::tr1::fmax(d, d)); + check_result<long double>(boost::math::tr1::fmax(l, l)); + check_result<long double>(boost::math::tr1::fmaxl(l, l)); + check_result<double>(boost::math::tr1::fmax(d, i)); + check_result<double>(boost::math::tr1::fmax(ui, f)); + + check_result<float>(boost::math::tr1::hypot(f, f)); + check_result<float>(boost::math::tr1::hypotf(f, f)); + check_result<double>(boost::math::tr1::hypot(d, d)); + check_result<long double>(boost::math::tr1::hypot(l, l)); + check_result<long double>(boost::math::tr1::hypotl(l, l)); + check_result<double>(boost::math::tr1::hypot(d, i)); + check_result<double>(boost::math::tr1::hypot(ui, f)); + + check_result<float>(boost::math::tr1::lgamma(f)); + check_result<float>(boost::math::tr1::lgammaf(f)); + check_result<double>(boost::math::tr1::lgamma(d)); + check_result<long double>(boost::math::tr1::lgamma(l)); + check_result<long double>(boost::math::tr1::lgammal(l)); + check_result<double>(boost::math::tr1::lgamma(ui)); + check_result<double>(boost::math::tr1::lgamma(i)); + + check_result<long long>(boost::math::tr1::llround(f)); + check_result<long long>(boost::math::tr1::llroundf(f)); + check_result<long long>(boost::math::tr1::llround(d)); + check_result<long long>(boost::math::tr1::llround(l)); + check_result<long long>(boost::math::tr1::llroundl(l)); + check_result<long long>(boost::math::tr1::llround(ui)); + check_result<long long>(boost::math::tr1::llround(i)); + + check_result<float>(boost::math::tr1::log1p(f)); + check_result<float>(boost::math::tr1::log1pf(f)); + check_result<double>(boost::math::tr1::log1p(d)); + check_result<long double>(boost::math::tr1::log1p(l)); + check_result<long double>(boost::math::tr1::log1pl(l)); + check_result<double>(boost::math::tr1::log1p(ui)); + check_result<double>(boost::math::tr1::log1p(i)); + + check_result<long>(boost::math::tr1::lround(f)); + check_result<long>(boost::math::tr1::lroundf(f)); + check_result<long>(boost::math::tr1::lround(d)); + check_result<long>(boost::math::tr1::lround(l)); + check_result<long>(boost::math::tr1::lroundl(l)); + check_result<long>(boost::math::tr1::lround(ui)); + check_result<long>(boost::math::tr1::lround(i)); + + check_result<float>(boost::math::tr1::round(f)); + check_result<float>(boost::math::tr1::roundf(f)); + check_result<double>(boost::math::tr1::round(d)); + check_result<long double>(boost::math::tr1::round(l)); + check_result<long double>(boost::math::tr1::roundl(l)); + check_result<double>(boost::math::tr1::round(ui)); + check_result<double>(boost::math::tr1::round(i)); + + check_result<float>(boost::math::tr1::nextafter(f, f)); + check_result<float>(boost::math::tr1::nextafterf(f, f)); + check_result<double>(boost::math::tr1::nextafter(d, d)); + check_result<long double>(boost::math::tr1::nextafter(l, l)); + check_result<long double>(boost::math::tr1::nextafterl(l, l)); + check_result<double>(boost::math::tr1::nextafter(d, i)); + check_result<double>(boost::math::tr1::nextafter(ui, f)); + + check_result<float>(boost::math::tr1::nexttoward(f, f)); + check_result<float>(boost::math::tr1::nexttowardf(f, f)); + check_result<double>(boost::math::tr1::nexttoward(d, d)); + check_result<long double>(boost::math::tr1::nexttoward(l, l)); + check_result<long double>(boost::math::tr1::nexttowardl(l, l)); + check_result<double>(boost::math::tr1::nexttoward(d, i)); + check_result<double>(boost::math::tr1::nexttoward(ui, f)); + + check_result<float>(boost::math::tr1::tgamma(f)); + check_result<float>(boost::math::tr1::tgammaf(f)); + check_result<double>(boost::math::tr1::tgamma(d)); + check_result<long double>(boost::math::tr1::tgamma(l)); + check_result<long double>(boost::math::tr1::tgammal(l)); + check_result<double>(boost::math::tr1::tgamma(ui)); + check_result<double>(boost::math::tr1::tgamma(i)); + + check_result<float>(boost::math::tr1::trunc(f)); + check_result<float>(boost::math::tr1::truncf(f)); + check_result<double>(boost::math::tr1::trunc(d)); + check_result<long double>(boost::math::tr1::trunc(l)); + check_result<long double>(boost::math::tr1::truncl(l)); + check_result<double>(boost::math::tr1::trunc(ui)); + check_result<double>(boost::math::tr1::trunc(i)); + +} |
