From 69031ebe9d0ea3a3bb0aebbb5419f8a3a36bec0b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 11 Nov 2007 14:05:50 +0000 Subject: [PATCH] Added static assertion to catch use of long double function overloads when BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS is defined. Made sure that if BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS is defined, then no long double overloads are actually instantiated by the tests. [SVN r41007] --- include/boost/math/tools/promotion.hpp | 12 ++++++++++ octonion/octonion_test.cpp | 9 ++++++-- quaternion/quaternion_test.cpp | 6 ++++- test/acosh_test.hpp | 7 ++++++ test/asinh_test.hpp | 7 ++++++ test/atanh_test.hpp | 14 ++++++++++++ .../compile_test/dist_bernoulli_incl_test.cpp | 2 ++ test/compile_test/dist_beta_incl_test.cpp | 3 ++- test/compile_test/dist_binomial_incl_test.cpp | 2 ++ test/compile_test/dist_cauchy_incl_test.cpp | 2 ++ .../dist_chi_squared_incl_test.cpp | 2 ++ .../dist_exponential_incl_test.cpp | 2 ++ .../dist_extreme_val_incl_test.cpp | 2 ++ test/compile_test/dist_fisher_f_incl_test.cpp | 2 ++ test/compile_test/dist_gamma_incl_test.cpp | 2 ++ .../compile_test/dist_lognormal_incl_test.cpp | 2 ++ .../compile_test/dist_neg_binom_incl_test.cpp | 2 ++ test/compile_test/dist_normal_incl_test.cpp | 2 ++ test/compile_test/dist_pareto_incl_test.cpp | 2 ++ test/compile_test/dist_poisson_incl_test.cpp | 2 ++ .../dist_students_t_incl_test.cpp | 2 ++ .../dist_triangular_incl_test.cpp | 2 ++ test/compile_test/dist_uniform_incl_test.cpp | 2 ++ test/compile_test/dist_weibull_incl_test.cpp | 2 ++ .../distribution_concept_check.cpp | 2 ++ test/compile_test/sf_bessel_incl_test.cpp | 12 ++++++++++ test/compile_test/sf_beta_incl_test.cpp | 8 +++++++ test/compile_test/sf_binomial_incl_test.cpp | 2 ++ test/compile_test/sf_cbrt_incl_test.cpp | 2 ++ test/compile_test/sf_cos_pi_incl_test.cpp | 2 ++ test/compile_test/sf_digamma_incl_test.cpp | 2 ++ test/compile_test/sf_ellint_1_incl_test.cpp | 4 ++++ test/compile_test/sf_ellint_2_incl_test.cpp | 4 ++++ test/compile_test/sf_ellint_3_incl_test.cpp | 4 ++++ test/compile_test/sf_ellint_rc_incl_test.cpp | 2 ++ test/compile_test/sf_ellint_rd_incl_test.cpp | 2 ++ test/compile_test/sf_ellint_rf_incl_test.cpp | 2 ++ test/compile_test/sf_ellint_rj_incl_test.cpp | 2 ++ test/compile_test/sf_erf_incl_test.cpp | 8 +++++++ test/compile_test/sf_expm1_incl_test.cpp | 2 ++ test/compile_test/sf_factorials_incl_test.cpp | 8 +++++++ test/compile_test/sf_fpclassify_incl_test.cpp | 8 +++++++ test/compile_test/sf_gamma_incl_test.cpp | 22 +++++++++++++++++++ test/compile_test/sf_hermite_incl_test.cpp | 2 ++ test/compile_test/sf_hypot_incl_test.cpp | 2 ++ test/compile_test/sf_laguerre_incl_test.cpp | 4 ++++ test/compile_test/sf_legendre_incl_test.cpp | 6 +++++ test/compile_test/sf_log1p_incl_test.cpp | 2 ++ test/compile_test/sf_powm1_incl_test.cpp | 2 ++ test/compile_test/sf_sign_incl_test.cpp | 6 +++++ test/compile_test/sf_sin_pi_incl_test.cpp | 2 ++ test/compile_test/sf_sinc_incl_test.cpp | 2 ++ test/compile_test/sf_sinhc_incl_test.cpp | 2 ++ test/compile_test/sf_sph_harm_incl_test.cpp | 6 +++++ test/compile_test/sf_sqrt1pm1_incl_test.cpp | 2 ++ test/compile_test/std_real_concept_check.cpp | 2 ++ test/compile_test/test_compile_result.hpp | 7 +++++- test/complex_test.cpp | 4 +++- test/hypot_test.cpp | 5 +++++ test/sinc_test.hpp | 9 ++++++++ test/sinhc_test.hpp | 9 ++++++++ test/special_functions_test.cpp | 11 ++++++++-- test/test_cbrt.cpp | 2 ++ 63 files changed, 269 insertions(+), 8 deletions(-) diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index fe32772c8..913574b31 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -19,6 +19,7 @@ #define BOOST_MATH_PROMOTION_HPP // Boost type traits: +#include #include // for boost::is_floating_point; #include // for boost::is_integral #include // for boost::is_convertible @@ -29,6 +30,10 @@ #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#include +#endif + namespace boost { namespace math @@ -99,6 +104,13 @@ namespace boost >::type >::type >::type type; + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + // + // Guard against use of long double if it's not supported: + // + BOOST_STATIC_ASSERT((0 == ::boost::is_same::value)); +#endif }; } // namespace tools diff --git a/octonion/octonion_test.cpp b/octonion/octonion_test.cpp index d49d8a476..848e4de38 100644 --- a/octonion/octonion_test.cpp +++ b/octonion/octonion_test.cpp @@ -33,15 +33,20 @@ template<> struct string_type_name \ DEFINE_TYPE_NAME(float); DEFINE_TYPE_NAME(double); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS DEFINE_TYPE_NAME(long double); +#endif - +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS typedef boost::mpl::list test_types; +#else +typedef boost::mpl::list test_types; +#endif // Apple GCC 4.0 uses the "double double" format for its long double, // which means that epsilon is VERY small but useless for // comparisons. So, don't do those comparisons. -#if defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4 +#if (defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) typedef boost::mpl::list near_eps_test_types; #else typedef boost::mpl::list near_eps_test_types; diff --git a/quaternion/quaternion_test.cpp b/quaternion/quaternion_test.cpp index 362b05196..6da75db40 100644 --- a/quaternion/quaternion_test.cpp +++ b/quaternion/quaternion_test.cpp @@ -35,12 +35,16 @@ DEFINE_TYPE_NAME(double); DEFINE_TYPE_NAME(long double); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS typedef boost::mpl::list test_types; +#else +typedef boost::mpl::list test_types; +#endif // Apple GCC 4.0 uses the "double double" format for its long double, // which means that epsilon is VERY small but useless for // comparisons. So, don't do those comparisons. -#if defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4 +#if (defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) typedef boost::mpl::list near_eps_test_types; #else typedef boost::mpl::list near_eps_test_types; diff --git a/test/acosh_test.hpp b/test/acosh_test.hpp index 162f2809a..fa3f8c6ae 100644 --- a/test/acosh_test.hpp +++ b/test/acosh_test.hpp @@ -70,12 +70,19 @@ void acosh_manual_check() long double xl = static_cast(i-50)/static_cast(5); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << acosh_error_evaluator(xf) << ::std::setw(15) << acosh_error_evaluator(xd) << ::std::setw(15) << acosh_error_evaluator(xl)); +#else + BOOST_MESSAGE( ::std::setw(15) + << acosh_error_evaluator(xf) + << ::std::setw(15) + << acosh_error_evaluator(xd)); +#endif } BOOST_MESSAGE(" "); diff --git a/test/asinh_test.hpp b/test/asinh_test.hpp index b8c80f537..0cb4b2315 100644 --- a/test/asinh_test.hpp +++ b/test/asinh_test.hpp @@ -70,12 +70,19 @@ void asinh_manual_check() long double xl = static_cast(i-40)/static_cast(4); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << asinh_error_evaluator(xf) << ::std::setw(15) << asinh_error_evaluator(xd) << ::std::setw(15) << asinh_error_evaluator(xl)); +#else + BOOST_MESSAGE( ::std::setw(15) + << asinh_error_evaluator(xf) + << ::std::setw(15) + << asinh_error_evaluator(xd)); +#endif } BOOST_MESSAGE(" "); diff --git a/test/atanh_test.hpp b/test/atanh_test.hpp index 32cb7310d..32a628e2f 100644 --- a/test/atanh_test.hpp +++ b/test/atanh_test.hpp @@ -116,12 +116,19 @@ void atanh_manual_check() std::numeric_limits::has_infinity ) { +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) << ::std::setw(15) << atanh_error_evaluator(xd) << ::std::setw(15) << atanh_error_evaluator(xl)); +#else + BOOST_MESSAGE( ::std::setw(15) + << atanh_error_evaluator(xf) + << ::std::setw(15) + << atanh_error_evaluator(xd)); +#endif } else { @@ -144,12 +151,19 @@ void atanh_manual_check() } else { +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) << ::std::setw(15) << atanh_error_evaluator(xd) << ::std::setw(15) << atanh_error_evaluator(xl)); +#else + BOOST_MESSAGE( ::std::setw(15) + << atanh_error_evaluator(xf) + << ::std::setw(15) + << atanh_error_evaluator(xd)); +#endif } } } diff --git a/test/compile_test/dist_bernoulli_incl_test.cpp b/test/compile_test/dist_bernoulli_incl_test.cpp index e30a372b0..b959c61d4 100644 --- a/test/compile_test/dist_bernoulli_incl_test.cpp +++ b/test/compile_test/dist_bernoulli_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::bernoulli_distribution >; template class boost::math::bernoulli_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::bernoulli_distribution >; +#endif diff --git a/test/compile_test/dist_beta_incl_test.cpp b/test/compile_test/dist_beta_incl_test.cpp index 4797496ce..3c69c794e 100644 --- a/test/compile_test/dist_beta_incl_test.cpp +++ b/test/compile_test/dist_beta_incl_test.cpp @@ -20,5 +20,6 @@ void check() template class boost::math::beta_distribution >; template class boost::math::beta_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::beta_distribution >; - +#endif diff --git a/test/compile_test/dist_binomial_incl_test.cpp b/test/compile_test/dist_binomial_incl_test.cpp index 345f579b6..62e823517 100644 --- a/test/compile_test/dist_binomial_incl_test.cpp +++ b/test/compile_test/dist_binomial_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::binomial_distribution >; template class boost::math::binomial_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::binomial_distribution >; +#endif diff --git a/test/compile_test/dist_cauchy_incl_test.cpp b/test/compile_test/dist_cauchy_incl_test.cpp index c99e77364..ff6186672 100644 --- a/test/compile_test/dist_cauchy_incl_test.cpp +++ b/test/compile_test/dist_cauchy_incl_test.cpp @@ -21,4 +21,6 @@ void check() template class boost::math::cauchy_distribution >; template class boost::math::cauchy_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::cauchy_distribution >; +#endif diff --git a/test/compile_test/dist_chi_squared_incl_test.cpp b/test/compile_test/dist_chi_squared_incl_test.cpp index 81f0020bc..8d4b42d03 100644 --- a/test/compile_test/dist_chi_squared_incl_test.cpp +++ b/test/compile_test/dist_chi_squared_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::chi_squared_distribution >; template class boost::math::chi_squared_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::chi_squared_distribution >; +#endif diff --git a/test/compile_test/dist_exponential_incl_test.cpp b/test/compile_test/dist_exponential_incl_test.cpp index d9365b8b0..a65db9364 100644 --- a/test/compile_test/dist_exponential_incl_test.cpp +++ b/test/compile_test/dist_exponential_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::exponential_distribution >; template class boost::math::exponential_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::exponential_distribution >; +#endif diff --git a/test/compile_test/dist_extreme_val_incl_test.cpp b/test/compile_test/dist_extreme_val_incl_test.cpp index b28734a72..44c5ccf67 100644 --- a/test/compile_test/dist_extreme_val_incl_test.cpp +++ b/test/compile_test/dist_extreme_val_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::extreme_value_distribution >; template class boost::math::extreme_value_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::extreme_value_distribution >; +#endif diff --git a/test/compile_test/dist_fisher_f_incl_test.cpp b/test/compile_test/dist_fisher_f_incl_test.cpp index 8a7f97b22..d334a5c34 100644 --- a/test/compile_test/dist_fisher_f_incl_test.cpp +++ b/test/compile_test/dist_fisher_f_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::fisher_f_distribution >; template class boost::math::fisher_f_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::fisher_f_distribution >; +#endif diff --git a/test/compile_test/dist_gamma_incl_test.cpp b/test/compile_test/dist_gamma_incl_test.cpp index 14449b4b1..22ea9a3f8 100644 --- a/test/compile_test/dist_gamma_incl_test.cpp +++ b/test/compile_test/dist_gamma_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::gamma_distribution >; template class boost::math::gamma_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::gamma_distribution >; +#endif diff --git a/test/compile_test/dist_lognormal_incl_test.cpp b/test/compile_test/dist_lognormal_incl_test.cpp index 08c2265a3..cfa9e50f3 100644 --- a/test/compile_test/dist_lognormal_incl_test.cpp +++ b/test/compile_test/dist_lognormal_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::lognormal_distribution >; template class boost::math::lognormal_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::lognormal_distribution >; +#endif diff --git a/test/compile_test/dist_neg_binom_incl_test.cpp b/test/compile_test/dist_neg_binom_incl_test.cpp index 380d245ab..c366e5e94 100644 --- a/test/compile_test/dist_neg_binom_incl_test.cpp +++ b/test/compile_test/dist_neg_binom_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::negative_binomial_distribution >; template class boost::math::negative_binomial_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::negative_binomial_distribution >; +#endif diff --git a/test/compile_test/dist_normal_incl_test.cpp b/test/compile_test/dist_normal_incl_test.cpp index 0e7d9695f..145b904b4 100644 --- a/test/compile_test/dist_normal_incl_test.cpp +++ b/test/compile_test/dist_normal_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::normal_distribution >; template class boost::math::normal_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::normal_distribution >; +#endif diff --git a/test/compile_test/dist_pareto_incl_test.cpp b/test/compile_test/dist_pareto_incl_test.cpp index 8e9d4415c..7bf0397c0 100644 --- a/test/compile_test/dist_pareto_incl_test.cpp +++ b/test/compile_test/dist_pareto_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::pareto_distribution >; template class boost::math::pareto_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::pareto_distribution >; +#endif diff --git a/test/compile_test/dist_poisson_incl_test.cpp b/test/compile_test/dist_poisson_incl_test.cpp index 8b723b311..40a3a7a0c 100644 --- a/test/compile_test/dist_poisson_incl_test.cpp +++ b/test/compile_test/dist_poisson_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::poisson_distribution >; template class boost::math::poisson_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::poisson_distribution >; +#endif diff --git a/test/compile_test/dist_students_t_incl_test.cpp b/test/compile_test/dist_students_t_incl_test.cpp index 2b5f48693..82fc203b1 100644 --- a/test/compile_test/dist_students_t_incl_test.cpp +++ b/test/compile_test/dist_students_t_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::students_t_distribution >; template class boost::math::students_t_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::students_t_distribution >; +#endif diff --git a/test/compile_test/dist_triangular_incl_test.cpp b/test/compile_test/dist_triangular_incl_test.cpp index 64249857f..5272f6472 100644 --- a/test/compile_test/dist_triangular_incl_test.cpp +++ b/test/compile_test/dist_triangular_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::triangular_distribution >; template class boost::math::triangular_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::triangular_distribution >; +#endif diff --git a/test/compile_test/dist_uniform_incl_test.cpp b/test/compile_test/dist_uniform_incl_test.cpp index 4b34be7ab..73c219e38 100644 --- a/test/compile_test/dist_uniform_incl_test.cpp +++ b/test/compile_test/dist_uniform_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::uniform_distribution >; template class boost::math::uniform_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::uniform_distribution >; +#endif diff --git a/test/compile_test/dist_weibull_incl_test.cpp b/test/compile_test/dist_weibull_incl_test.cpp index 8a41d5c86..56d3cf531 100644 --- a/test/compile_test/dist_weibull_incl_test.cpp +++ b/test/compile_test/dist_weibull_incl_test.cpp @@ -20,4 +20,6 @@ void check() template class boost::math::weibull_distribution >; template class boost::math::weibull_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template class boost::math::weibull_distribution >; +#endif diff --git a/test/compile_test/distribution_concept_check.cpp b/test/compile_test/distribution_concept_check.cpp index 039f2dd4a..66c5f476a 100644 --- a/test/compile_test/distribution_concept_check.cpp +++ b/test/compile_test/distribution_concept_check.cpp @@ -42,6 +42,8 @@ int main() { instantiate(float(0)); instantiate(double(0)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS instantiate((long double)(0)); +#endif } diff --git a/test/compile_test/sf_bessel_incl_test.cpp b/test/compile_test/sf_bessel_incl_test.cpp index 5743005ff..c1371b26a 100644 --- a/test/compile_test/sf_bessel_incl_test.cpp +++ b/test/compile_test/sf_bessel_incl_test.cpp @@ -17,25 +17,37 @@ void check() { check_result(boost::math::cyl_bessel_j(f, f)); check_result(boost::math::cyl_bessel_j(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cyl_bessel_j(l, l)); +#endif check_result(boost::math::cyl_neumann(f, f)); check_result(boost::math::cyl_neumann(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cyl_neumann(l, l)); +#endif check_result(boost::math::cyl_bessel_i(f, f)); check_result(boost::math::cyl_bessel_i(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cyl_bessel_i(l, l)); +#endif check_result(boost::math::cyl_bessel_k(f, f)); check_result(boost::math::cyl_bessel_k(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cyl_bessel_k(l, l)); +#endif check_result(boost::math::sph_bessel(u, f)); check_result(boost::math::sph_bessel(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sph_bessel(u, l)); +#endif check_result(boost::math::sph_neumann(u, f)); check_result(boost::math::sph_neumann(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sph_neumann(u, l)); +#endif } diff --git a/test/compile_test/sf_beta_incl_test.cpp b/test/compile_test/sf_beta_incl_test.cpp index 1a09d1758..5b4c0ddac 100644 --- a/test/compile_test/sf_beta_incl_test.cpp +++ b/test/compile_test/sf_beta_incl_test.cpp @@ -17,18 +17,26 @@ void check() { check_result(boost::math::beta(f, f)); check_result(boost::math::beta(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::beta(l, l)); +#endif check_result(boost::math::ibeta(f, f, f)); check_result(boost::math::ibeta(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ibeta(l, l, l)); +#endif check_result(boost::math::ibeta_inv(f, f, f)); check_result(boost::math::ibeta_inv(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ibeta_inv(l, l, l)); +#endif check_result(boost::math::ibeta_inva(f, f, f)); check_result(boost::math::ibeta_inva(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ibeta_inva(l, l, l)); +#endif } diff --git a/test/compile_test/sf_binomial_incl_test.cpp b/test/compile_test/sf_binomial_incl_test.cpp index cc57d5cbe..ebdbdfa21 100644 --- a/test/compile_test/sf_binomial_incl_test.cpp +++ b/test/compile_test/sf_binomial_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::binomial_coefficient(u, u)); check_result(boost::math::binomial_coefficient(u, u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::binomial_coefficient(u, u)); +#endif } diff --git a/test/compile_test/sf_cbrt_incl_test.cpp b/test/compile_test/sf_cbrt_incl_test.cpp index 19ebfd383..6620cc0f8 100644 --- a/test/compile_test/sf_cbrt_incl_test.cpp +++ b/test/compile_test/sf_cbrt_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::cbrt(f)); check_result(boost::math::cbrt(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cbrt(l)); +#endif } diff --git a/test/compile_test/sf_cos_pi_incl_test.cpp b/test/compile_test/sf_cos_pi_incl_test.cpp index 76824b01b..8053aaa4b 100644 --- a/test/compile_test/sf_cos_pi_incl_test.cpp +++ b/test/compile_test/sf_cos_pi_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::cos_pi(f)); check_result(boost::math::cos_pi(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::cos_pi(l)); +#endif } diff --git a/test/compile_test/sf_digamma_incl_test.cpp b/test/compile_test/sf_digamma_incl_test.cpp index 66fd58384..12356d67d 100644 --- a/test/compile_test/sf_digamma_incl_test.cpp +++ b/test/compile_test/sf_digamma_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::digamma(f)); check_result(boost::math::digamma(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::digamma(l)); +#endif } \ No newline at end of file diff --git a/test/compile_test/sf_ellint_1_incl_test.cpp b/test/compile_test/sf_ellint_1_incl_test.cpp index 6660b97ec..74fb5df48 100644 --- a/test/compile_test/sf_ellint_1_incl_test.cpp +++ b/test/compile_test/sf_ellint_1_incl_test.cpp @@ -17,9 +17,13 @@ void check() { check_result(boost::math::ellint_1(f, f)); check_result(boost::math::ellint_1(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_1(l, l)); +#endif check_result(boost::math::ellint_1(f)); check_result(boost::math::ellint_1(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_1(l)); +#endif } diff --git a/test/compile_test/sf_ellint_2_incl_test.cpp b/test/compile_test/sf_ellint_2_incl_test.cpp index bc87d27b9..3ca5ff69b 100644 --- a/test/compile_test/sf_ellint_2_incl_test.cpp +++ b/test/compile_test/sf_ellint_2_incl_test.cpp @@ -17,9 +17,13 @@ void check() { check_result(boost::math::ellint_2(f, f)); check_result(boost::math::ellint_2(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_2(l, l)); +#endif check_result(boost::math::ellint_2(f)); check_result(boost::math::ellint_2(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_2(l)); +#endif } diff --git a/test/compile_test/sf_ellint_3_incl_test.cpp b/test/compile_test/sf_ellint_3_incl_test.cpp index 05f238973..a46444b7d 100644 --- a/test/compile_test/sf_ellint_3_incl_test.cpp +++ b/test/compile_test/sf_ellint_3_incl_test.cpp @@ -17,9 +17,13 @@ void check() { check_result(boost::math::ellint_3(f, f)); check_result(boost::math::ellint_3(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_3(l, l)); +#endif check_result(boost::math::ellint_3(f, f, f)); check_result(boost::math::ellint_3(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_3(l, l, l)); +#endif } diff --git a/test/compile_test/sf_ellint_rc_incl_test.cpp b/test/compile_test/sf_ellint_rc_incl_test.cpp index 0effc39dc..4e67aab04 100644 --- a/test/compile_test/sf_ellint_rc_incl_test.cpp +++ b/test/compile_test/sf_ellint_rc_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::ellint_rc(f, f)); check_result(boost::math::ellint_rc(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_rc(l, l)); +#endif } diff --git a/test/compile_test/sf_ellint_rd_incl_test.cpp b/test/compile_test/sf_ellint_rd_incl_test.cpp index 2116025e4..b0be0fc07 100644 --- a/test/compile_test/sf_ellint_rd_incl_test.cpp +++ b/test/compile_test/sf_ellint_rd_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::ellint_rd(f, f, f)); check_result(boost::math::ellint_rd(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_rd(l, l, l)); +#endif } diff --git a/test/compile_test/sf_ellint_rf_incl_test.cpp b/test/compile_test/sf_ellint_rf_incl_test.cpp index 3b36c081a..6547cf184 100644 --- a/test/compile_test/sf_ellint_rf_incl_test.cpp +++ b/test/compile_test/sf_ellint_rf_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::ellint_rf(f, f, f)); check_result(boost::math::ellint_rf(d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_rf(l, l, l)); +#endif } diff --git a/test/compile_test/sf_ellint_rj_incl_test.cpp b/test/compile_test/sf_ellint_rj_incl_test.cpp index 2f4a6931a..ee7e4d0c7 100644 --- a/test/compile_test/sf_ellint_rj_incl_test.cpp +++ b/test/compile_test/sf_ellint_rj_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::ellint_rj(f, f, f, f)); check_result(boost::math::ellint_rj(d, d, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::ellint_rj(l, l, l, l)); +#endif } diff --git a/test/compile_test/sf_erf_incl_test.cpp b/test/compile_test/sf_erf_incl_test.cpp index 15a5124f3..9931128f7 100644 --- a/test/compile_test/sf_erf_incl_test.cpp +++ b/test/compile_test/sf_erf_incl_test.cpp @@ -17,17 +17,25 @@ void check() { check_result(boost::math::erf(f)); check_result(boost::math::erf(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::erf(l)); +#endif check_result(boost::math::erfc(f)); check_result(boost::math::erfc(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::erfc(l)); +#endif check_result(boost::math::erf_inv(f)); check_result(boost::math::erf_inv(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::erf_inv(l)); +#endif check_result(boost::math::erfc_inv(f)); check_result(boost::math::erfc_inv(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::erfc_inv(l)); +#endif } diff --git a/test/compile_test/sf_expm1_incl_test.cpp b/test/compile_test/sf_expm1_incl_test.cpp index ff92fbddd..dba9e9cca 100644 --- a/test/compile_test/sf_expm1_incl_test.cpp +++ b/test/compile_test/sf_expm1_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::expm1(f)); check_result(boost::math::expm1(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::expm1(l)); +#endif } diff --git a/test/compile_test/sf_factorials_incl_test.cpp b/test/compile_test/sf_factorials_incl_test.cpp index 507ef8b0e..6d2a01817 100644 --- a/test/compile_test/sf_factorials_incl_test.cpp +++ b/test/compile_test/sf_factorials_incl_test.cpp @@ -17,18 +17,26 @@ void check() { check_result(boost::math::factorial(u)); check_result(boost::math::factorial(u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::factorial(u)); +#endif check_result(boost::math::double_factorial(u)); check_result(boost::math::double_factorial(u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::double_factorial(u)); +#endif check_result(boost::math::rising_factorial(f, i)); check_result(boost::math::rising_factorial(d, i)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::rising_factorial(l, i)); +#endif check_result(boost::math::falling_factorial(f, u)); check_result(boost::math::falling_factorial(d, u)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::falling_factorial(l, u)); +#endif } diff --git a/test/compile_test/sf_fpclassify_incl_test.cpp b/test/compile_test/sf_fpclassify_incl_test.cpp index ce693e8b6..4515a901b 100644 --- a/test/compile_test/sf_fpclassify_incl_test.cpp +++ b/test/compile_test/sf_fpclassify_incl_test.cpp @@ -17,19 +17,27 @@ void check() { check_result(boost::math::fpclassify BOOST_NO_MACRO_EXPAND(f)); check_result(boost::math::fpclassify BOOST_NO_MACRO_EXPAND(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::fpclassify BOOST_NO_MACRO_EXPAND(l)); +#endif check_result(boost::math::isfinite BOOST_NO_MACRO_EXPAND(f)); check_result(boost::math::isfinite BOOST_NO_MACRO_EXPAND(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::isfinite BOOST_NO_MACRO_EXPAND(l)); +#endif check_result(boost::math::isinf BOOST_NO_MACRO_EXPAND(f)); check_result(boost::math::isinf BOOST_NO_MACRO_EXPAND(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::isinf BOOST_NO_MACRO_EXPAND(l)); +#endif check_result(boost::math::isnormal BOOST_NO_MACRO_EXPAND(f)); check_result(boost::math::isnormal BOOST_NO_MACRO_EXPAND(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::isnormal BOOST_NO_MACRO_EXPAND(l)); +#endif } diff --git a/test/compile_test/sf_gamma_incl_test.cpp b/test/compile_test/sf_gamma_incl_test.cpp index 579fd38bc..fd0dabbf4 100644 --- a/test/compile_test/sf_gamma_incl_test.cpp +++ b/test/compile_test/sf_gamma_incl_test.cpp @@ -17,45 +17,67 @@ void check() { check_result(boost::math::tgamma(f)); check_result(boost::math::tgamma(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::tgamma(l)); +#endif check_result(boost::math::lgamma(f)); check_result(boost::math::lgamma(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::lgamma(l)); +#endif check_result(boost::math::gamma_p(f, f)); check_result(boost::math::gamma_p(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_p(l, l)); +#endif check_result(boost::math::gamma_q(f, f)); check_result(boost::math::gamma_q(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_q(l, l)); +#endif check_result(boost::math::gamma_p_inv(f, f)); check_result(boost::math::gamma_p_inv(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_p_inv(l, l)); +#endif check_result(boost::math::gamma_q_inv(f, f)); check_result(boost::math::gamma_q_inv(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_q_inv(l, l)); +#endif check_result(boost::math::gamma_p_inva(f, f)); check_result(boost::math::gamma_p_inva(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_p_inva(l, l)); +#endif check_result(boost::math::gamma_q_inva(f, f)); check_result(boost::math::gamma_q_inva(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_q_inva(l, l)); +#endif check_result(boost::math::gamma_p_derivative(f, f)); check_result(boost::math::gamma_p_derivative(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::gamma_p_derivative(l, l)); +#endif check_result(boost::math::tgamma_ratio(f, f)); check_result(boost::math::tgamma_ratio(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::tgamma_ratio(l, l)); +#endif check_result(boost::math::tgamma_delta_ratio(f, f)); check_result(boost::math::tgamma_delta_ratio(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::tgamma_delta_ratio(l, l)); +#endif } diff --git a/test/compile_test/sf_hermite_incl_test.cpp b/test/compile_test/sf_hermite_incl_test.cpp index b02c605fc..757897939 100644 --- a/test/compile_test/sf_hermite_incl_test.cpp +++ b/test/compile_test/sf_hermite_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::hermite(u, f)); check_result(boost::math::hermite(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::hermite(u, l)); +#endif } diff --git a/test/compile_test/sf_hypot_incl_test.cpp b/test/compile_test/sf_hypot_incl_test.cpp index 3e241c4c7..cb2c9d19a 100644 --- a/test/compile_test/sf_hypot_incl_test.cpp +++ b/test/compile_test/sf_hypot_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::hypot(f, f)); check_result(boost::math::hypot(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::hypot(l, l)); +#endif } diff --git a/test/compile_test/sf_laguerre_incl_test.cpp b/test/compile_test/sf_laguerre_incl_test.cpp index c79e9cec7..7683d1aab 100644 --- a/test/compile_test/sf_laguerre_incl_test.cpp +++ b/test/compile_test/sf_laguerre_incl_test.cpp @@ -17,12 +17,16 @@ void check() { check_result(boost::math::laguerre(u, f)); check_result(boost::math::laguerre(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::laguerre(u, l)); +#endif typedef boost::math::policies::policy<> def_pol; def_pol p; check_result(boost::math::laguerre(u, u, f, p)); check_result(boost::math::laguerre(u, u, d, p)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::laguerre(u, u, l, p)); +#endif } diff --git a/test/compile_test/sf_legendre_incl_test.cpp b/test/compile_test/sf_legendre_incl_test.cpp index e208c7516..8ba867249 100644 --- a/test/compile_test/sf_legendre_incl_test.cpp +++ b/test/compile_test/sf_legendre_incl_test.cpp @@ -17,13 +17,19 @@ void check() { check_result(boost::math::legendre_p(i, f)); check_result(boost::math::legendre_p(i, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::legendre_p(i, l)); +#endif check_result(boost::math::legendre_p(i, i, f)); check_result(boost::math::legendre_p(i, i, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::legendre_p(i, i, l)); +#endif check_result(boost::math::legendre_q(u, f)); check_result(boost::math::legendre_q(u, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::legendre_q(u, l)); +#endif } diff --git a/test/compile_test/sf_log1p_incl_test.cpp b/test/compile_test/sf_log1p_incl_test.cpp index be61d3dea..0d4737f6d 100644 --- a/test/compile_test/sf_log1p_incl_test.cpp +++ b/test/compile_test/sf_log1p_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::log1p(f)); check_result(boost::math::log1p(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::log1p(l)); +#endif } diff --git a/test/compile_test/sf_powm1_incl_test.cpp b/test/compile_test/sf_powm1_incl_test.cpp index 233f819fe..56f474709 100644 --- a/test/compile_test/sf_powm1_incl_test.cpp +++ b/test/compile_test/sf_powm1_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::powm1(f, f)); check_result(boost::math::powm1(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::powm1(l, l)); +#endif } diff --git a/test/compile_test/sf_sign_incl_test.cpp b/test/compile_test/sf_sign_incl_test.cpp index 01ee4efde..161b943b1 100644 --- a/test/compile_test/sf_sign_incl_test.cpp +++ b/test/compile_test/sf_sign_incl_test.cpp @@ -17,13 +17,19 @@ void check() { check_result(boost::math::sign(f)); check_result(boost::math::sign(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sign(l)); +#endif check_result(boost::math::signbit(f)); check_result(boost::math::signbit(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::signbit(l)); +#endif check_result(boost::math::copysign(f, f)); check_result(boost::math::copysign(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::copysign(l, l)); +#endif } diff --git a/test/compile_test/sf_sin_pi_incl_test.cpp b/test/compile_test/sf_sin_pi_incl_test.cpp index 64c196e3e..99e8c8853 100644 --- a/test/compile_test/sf_sin_pi_incl_test.cpp +++ b/test/compile_test/sf_sin_pi_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::sin_pi(f)); check_result(boost::math::sin_pi(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sin_pi(l)); +#endif } diff --git a/test/compile_test/sf_sinc_incl_test.cpp b/test/compile_test/sf_sinc_incl_test.cpp index b1384d7f4..4c51cb329 100644 --- a/test/compile_test/sf_sinc_incl_test.cpp +++ b/test/compile_test/sf_sinc_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::sinc_pi(f)); check_result(boost::math::sinc_pi(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sinc_pi(l)); +#endif } diff --git a/test/compile_test/sf_sinhc_incl_test.cpp b/test/compile_test/sf_sinhc_incl_test.cpp index 5b643ec65..7eeb6173a 100644 --- a/test/compile_test/sf_sinhc_incl_test.cpp +++ b/test/compile_test/sf_sinhc_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::sinhc_pi(f)); check_result(boost::math::sinhc_pi(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sinhc_pi(l)); +#endif } diff --git a/test/compile_test/sf_sph_harm_incl_test.cpp b/test/compile_test/sf_sph_harm_incl_test.cpp index 98685b669..741d3b2d0 100644 --- a/test/compile_test/sf_sph_harm_incl_test.cpp +++ b/test/compile_test/sf_sph_harm_incl_test.cpp @@ -23,15 +23,21 @@ void check() { check_result >(boost::math::spherical_harmonic(u, i, f, f)); check_result >(boost::math::spherical_harmonic(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result >(boost::math::spherical_harmonic(u, i, l, l)); +#endif check_result(boost::math::spherical_harmonic_r(u, i, f, f)); check_result(boost::math::spherical_harmonic_r(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::spherical_harmonic_r(u, i, l, l)); +#endif check_result(boost::math::spherical_harmonic_i(u, i, f, f)); check_result(boost::math::spherical_harmonic_i(u, i, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::spherical_harmonic_i(u, i, l, l)); +#endif } diff --git a/test/compile_test/sf_sqrt1pm1_incl_test.cpp b/test/compile_test/sf_sqrt1pm1_incl_test.cpp index 737f96637..b26f6a2eb 100644 --- a/test/compile_test/sf_sqrt1pm1_incl_test.cpp +++ b/test/compile_test/sf_sqrt1pm1_incl_test.cpp @@ -17,5 +17,7 @@ void check() { check_result(boost::math::sqrt1pm1(f)); check_result(boost::math::sqrt1pm1(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS check_result(boost::math::sqrt1pm1(l)); +#endif } diff --git a/test/compile_test/std_real_concept_check.cpp b/test/compile_test/std_real_concept_check.cpp index 2500172f4..10b407d44 100644 --- a/test/compile_test/std_real_concept_check.cpp +++ b/test/compile_test/std_real_concept_check.cpp @@ -193,6 +193,8 @@ struct numeric_limits int main() { +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS instantiate(boost::math::concepts::std_real_concept(0)); +#endif } diff --git a/test/compile_test/test_compile_result.hpp b/test/compile_test/test_compile_result.hpp index 8a9f96466..9a3fd30ae 100644 --- a/test/compile_test/test_compile_result.hpp +++ b/test/compile_test/test_compile_result.hpp @@ -119,8 +119,13 @@ private: } }; // struct DistributionConcept +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #define TEST_DIST_FUNC(dist)\ DistributionConcept< boost::math::dist##_distribution >::constraints();\ DistributionConcept< boost::math::dist##_distribution >::constraints();\ DistributionConcept< boost::math::dist##_distribution >::constraints(); - +#else +#define TEST_DIST_FUNC(dist)\ + DistributionConcept< boost::math::dist##_distribution >::constraints();\ + DistributionConcept< boost::math::dist##_distribution >::constraints(); +#endif diff --git a/test/complex_test.cpp b/test/complex_test.cpp index bcb60c002..cf879c056 100644 --- a/test/complex_test.cpp +++ b/test/complex_test.cpp @@ -853,9 +853,11 @@ int test_main(int, char*[]) check_spots(float(0)); std::cout << "Running complex trig spot checks for type double." << std::endl; check_spots(double(0)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS std::cout << "Running complex trig spot checks for type long double." << std::endl; check_spots((long double)(0)); - +#endif + std::cout << "Running complex trig boundary and accuracy tests." << std::endl; test_boundaries(); return 0; diff --git a/test/hypot_test.cpp b/test/hypot_test.cpp index 0094b13c0..40b2da5f1 100644 --- a/test/hypot_test.cpp +++ b/test/hypot_test.cpp @@ -41,8 +41,13 @@ const float boundaries[] = { void do_test_boundaries(float x, float y) { float expected = static_cast((boost::math::hypot)( +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS static_cast(x), static_cast(y))); +#else + static_cast(x), + static_cast(y))); +#endif float found = (boost::math::hypot)(x, y); BOOST_CHECK_CLOSE(expected, found, tolerance); } diff --git a/test/sinc_test.hpp b/test/sinc_test.hpp index ddd62e506..e2f32c0e6 100644 --- a/test/sinc_test.hpp +++ b/test/sinc_test.hpp @@ -66,6 +66,7 @@ void sinc_pi_manual_check() for (int i = 0; i <= 100; i++) { +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) @@ -75,6 +76,14 @@ void sinc_pi_manual_check() << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50))); +#else + BOOST_MESSAGE( ::std::setw(15) + << sinc_pi(static_cast(i-50)/ + static_cast(50)) + << ::std::setw(15) + << sinc_pi(static_cast(i-50)/ + static_cast(50))); +#endif } BOOST_MESSAGE(" "); diff --git a/test/sinhc_test.hpp b/test/sinhc_test.hpp index a6ffea936..7b7e62ed5 100644 --- a/test/sinhc_test.hpp +++ b/test/sinhc_test.hpp @@ -66,6 +66,7 @@ void sinhc_pi_manual_check() for (int i = 0; i <= 100; i++) { +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_MESSAGE( ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) @@ -75,6 +76,14 @@ void sinhc_pi_manual_check() << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50))); +#else + BOOST_MESSAGE( ::std::setw(15) + << sinhc_pi(static_cast(i-50)/ + static_cast(50)) + << ::std::setw(15) + << sinhc_pi(static_cast(i-50)/ + static_cast(50))); +#endif } BOOST_MESSAGE(" "); diff --git a/test/special_functions_test.cpp b/test/special_functions_test.cpp index 62a4b7c0c..b6f08edbb 100644 --- a/test/special_functions_test.cpp +++ b/test/special_functions_test.cpp @@ -14,6 +14,7 @@ #include #include #include +#include template @@ -28,17 +29,23 @@ template<> struct string_type_name \ } \ } +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS DEFINE_TYPE_NAME(float); DEFINE_TYPE_NAME(double); DEFINE_TYPE_NAME(long double); - typedef boost::mpl::list test_types; +#else +DEFINE_TYPE_NAME(float); +DEFINE_TYPE_NAME(double); + +typedef boost::mpl::list test_types; +#endif // Apple GCC 4.0 uses the "double double" format for its long double, // which means that epsilon is VERY small but useless for // comparisons. So, don't do those comparisons. -#if defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4 +#if (defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ == 4) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) typedef boost::mpl::list near_eps_test_types; #else typedef boost::mpl::list near_eps_test_types; diff --git a/test/test_cbrt.cpp b/test/test_cbrt.cpp index f6d34e8e4..384934693 100644 --- a/test/test_cbrt.cpp +++ b/test/test_cbrt.cpp @@ -119,9 +119,11 @@ int test_main(int, char* []) BOOST_MATH_CONTROL_FP; test_cbrt(0.1F, "float"); test_cbrt(0.1, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS test_cbrt(0.1L, "long double"); #ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS test_cbrt(boost::math::concepts::real_concept(0.1), "real_concept"); +#endif #endif return 0; }