|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-10-10 12:05:27
Author: johnmaddock
Date: 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
New Revision: 39893
URL: http://svn.boost.org/trac/boost/changeset/39893
Log:
Added Compaq CXX long long workaround to real_concept.hpp.
Added missing forward declaration to ellint_1.hpp.
Adjusted native log1p support for aCC.
Removed bad forward declaration of fpclassify: correct declaration appears later in the file.
Adjusted compile_test/test_compile_result.hpp to not return a NULL reference.
Adjusted permitted error-limits for new platforms.
Split some of the tests into smaller units so we don't get compiler timeouts when building (hopefully!)
Text files modified:
trunk/boost/math/concepts/real_concept.hpp | 2
trunk/boost/math/special_functions/ellint_1.hpp | 3
trunk/boost/math/special_functions/log1p.hpp | 2
trunk/boost/math/special_functions/math_fwd.hpp | 4
trunk/libs/math/test/Jamfile.v2 | 200 ++++++++++++++++++++++++++++++++++++++-
trunk/libs/math/test/compile_test/test_compile_result.hpp | 3
trunk/libs/math/test/test_binomial.cpp | 15 +++
trunk/libs/math/test/test_gamma.cpp | 2
trunk/libs/math/test/test_ibeta.cpp | 15 +++
trunk/libs/math/test/test_ibeta_inv.cpp | 15 +++
trunk/libs/math/test/test_ibeta_inv_ab.cpp | 14 ++
trunk/libs/math/test/test_igamma.cpp | 8
trunk/libs/math/test/test_igamma_inv.cpp | 15 +++
trunk/libs/math/test/test_igamma_inva.cpp | 15 +++
trunk/libs/math/test/test_negative_binomial.cpp | 15 +++
trunk/libs/math/test/test_poisson.cpp | 15 +++
16 files changed, 323 insertions(+), 20 deletions(-)
Modified: trunk/boost/math/concepts/real_concept.hpp
==============================================================================
--- trunk/boost/math/concepts/real_concept.hpp (original)
+++ trunk/boost/math/concepts/real_concept.hpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -55,7 +55,7 @@
real_concept(int c) : m_value(c){}
real_concept(unsigned long c) : m_value(c){}
real_concept(long c) : m_value(c){}
-#ifdef BOOST_HAS_LONG_LONG
+#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX)
real_concept(unsigned long long c) : m_value(static_cast<long double>(c)){}
real_concept(long long c) : m_value(static_cast<long double>(c)){}
#elif defined(BOOST_HAS_MS_INT64)
Modified: trunk/boost/math/special_functions/ellint_1.hpp
==============================================================================
--- trunk/boost/math/special_functions/ellint_1.hpp (original)
+++ trunk/boost/math/special_functions/ellint_1.hpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -29,6 +29,9 @@
namespace detail{
+template <typename T, typename Policy>
+T ellint_k_imp(T k, const Policy& pol);
+
// Elliptic integral (Legendre form) of the first kind
template <typename T, typename Policy>
T ellint_f_imp(T phi, T k, const Policy& pol)
Modified: trunk/boost/math/special_functions/log1p.hpp
==============================================================================
--- trunk/boost/math/special_functions/log1p.hpp (original)
+++ trunk/boost/math/special_functions/log1p.hpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -128,7 +128,7 @@
#ifdef BOOST_HAS_LOG1P
# if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \
|| defined(linux) || defined(__linux) || defined(__linux__) \
- || defined(__hpux)
+ || (defined(__hpux) && !defined(_PA_RISC1_1))
template <class Policy>
inline float log1p(float x, const Policy& pol)
{
Modified: trunk/boost/math/special_functions/math_fwd.hpp
==============================================================================
--- trunk/boost/math/special_functions/math_fwd.hpp (original)
+++ trunk/boost/math/special_functions/math_fwd.hpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -347,10 +347,6 @@
template <class RT, class Policy>
typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
- // Fpclassify - classify floating-point as NaN or infinity...
- template <class T>
- int fpclassify (T);
-
// Gamma functions.
template <class RT>
typename tools::promote_args<RT>::type tgamma(RT z);
Modified: trunk/libs/math/test/Jamfile.v2
==============================================================================
--- trunk/libs/math/test/Jamfile.v2 (original)
+++ trunk/libs/math/test/Jamfile.v2 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -44,7 +44,30 @@
run test_constants.cpp ;
run test_beta.cpp ;
run test_beta_dist.cpp ;
-run test_binomial.cpp ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_binomial_float ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_binomial_double ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_binomial_long_double ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_binomial_real_concept ;
run test_binomial_coeff.cpp ;
run test_carlson.cpp ;
run test_cauchy.cpp ;
@@ -67,21 +90,182 @@
run test_gamma.cpp ;
run test_gamma_dist.cpp ;
run test_hermite.cpp ;
-run test_ibeta.cpp ;
-run test_ibeta_inv.cpp ;
-run test_ibeta_inv_ab.cpp ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_ibeta_float ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_ibeta_double ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_ibeta_long_double ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_ibeta_real_concept ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_ibeta_inv_float ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_ibeta_inv_double ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_ibeta_inv_long_double ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_ibeta_inv_real_concept ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_ibeta_inv_ab_float ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_ibeta_inv_ab_double ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_ibeta_inv_ab_long_double ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_ibeta_inv_ab_real_concept ;
run test_igamma.cpp ;
-run test_igamma_inv.cpp ;
-run test_igamma_inva.cpp ;
+run test_igamma_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_igamma_inv_float ;
+run test_igamma_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_igamma_inv_double ;
+run test_igamma_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_igamma_inv_long_double ;
+run test_igamma_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_igamma_inv_real_concept ;
+run test_igamma_inva.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_igamma_inva_float ;
+run test_igamma_inva.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_igamma_inva_double ;
+run test_igamma_inva.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_igamma_inva_long_double ;
+run test_igamma_inva.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_igamma_inva_real_concept ;
run test_instantiate1.cpp test_instantiate2.cpp ;
run test_laguerre.cpp ;
run test_legendre.cpp ;
run test_lognormal.cpp ;
run test_minima.cpp ;
-run test_negative_binomial.cpp ;
+run test_negative_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_negative_binomial_float ;
+run test_negative_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_negative_binomial_double ;
+run test_negative_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_negative_binomial_long_double ;
+run test_negative_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_negative_binomial_real_concept ;
run test_normal.cpp ;
run test_pareto.cpp ;
-run test_poisson.cpp ;
+run test_poisson.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT
+ : test_poisson_float ;
+run test_poisson.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_DOUBLE
+ : test_poisson_double ;
+run test_poisson.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_LDOUBLE
+ : test_poisson_long_double ;
+run test_poisson.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ : test_poisson_real_concept ;
run test_rayleigh.cpp ;
run test_rationals.cpp
Modified: trunk/libs/math/test/compile_test/test_compile_result.hpp
==============================================================================
--- trunk/libs/math/test/compile_test/test_compile_result.hpp (original)
+++ trunk/libs/math/test/compile_test/test_compile_result.hpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -105,10 +105,11 @@
check_result<value_type>(chf(dist, li));
}
private:
+ static Distribution* get_object_p();
static Distribution& get_object()
{
// will never get called:
- return * reinterpret_cast<Distribution*>(0);
+ return *get_object_p();
}
}; // struct DistributionConcept
Modified: trunk/libs/math/test/test_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_binomial.cpp (original)
+++ trunk/libs/math/test/test_binomial.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -12,6 +12,13 @@
#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
#ifdef _MSC_VER
# pragma warning(disable: 4127) // conditional expression is constant.
#endif
@@ -694,13 +701,21 @@
// Basic sanity-check spot values.
// (Parameter value, arbitrarily zero, only communicates the floating point type).
+#ifdef TEST_FLOAT
test_spots(0.0F); // Test float.
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0); // Test double.
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_spots(0.0L); // Test long double.
+#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_gamma.cpp
==============================================================================
--- trunk/libs/math/test/test_gamma.cpp (original)
+++ trunk/libs/math/test/test_gamma.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -191,7 +191,7 @@
".*", // compiler
".*", // stdlib
"Sun.*", // platform
- "real_concept" // test type(s)
+ "real_concept", // test type(s)
"factorials", // test data group
"boost::math::tgamma", 300, 50); // test function
Modified: trunk/libs/math/test/test_ibeta.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta.cpp (original)
+++ trunk/libs/math/test/test_ibeta.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -20,6 +20,13 @@
#include "test_beta_hooks.hpp"
#include "handle_test_result.hpp"
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
//
// DESCRIPTION:
// ~~~~~~~~~~~~
@@ -521,15 +528,23 @@
#endif
#endif
+#ifdef TEST_FLOAT
test_beta(0.1F, "float");
+#endif
+#ifdef TEST_DOUBLE
test_beta(0.1, "double");
+#endif
+#ifdef TEST_LDOUBLE
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_beta(0.1L, "long double");
+#endif
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_beta(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta_inv.cpp (original)
+++ trunk/libs/math/test/test_ibeta_inv.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -20,6 +20,13 @@
#include "test_beta_hooks.hpp"
#include "handle_test_result.hpp"
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
//
// DESCRIPTION:
// ~~~~~~~~~~~~
@@ -313,13 +320,21 @@
test_spots(boost::math::concepts::real_concept(0.1));
#endif
+#ifdef TEST_FLOAT
test_beta(0.1F, "float");
+#endif
+#ifdef TEST_DOUBLE
test_beta(0.1, "double");
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_beta(0.1L, "long double");
+#endif
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#ifdef TEST_REAL_CONCEPT
test_beta(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_ibeta_inv_ab.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta_inv_ab.cpp (original)
+++ trunk/libs/math/test/test_ibeta_inv_ab.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -24,6 +24,12 @@
#include "handle_test_result.hpp"
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
//
// DESCRIPTION:
// ~~~~~~~~~~~~
@@ -270,13 +276,21 @@
gsl_set_error_handler_off();
#endif
+#ifdef TEST_FLOAT
test_beta(0.1F, "float");
+#endif
+#ifdef TEST_DOUBLE
test_beta(0.1, "double");
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_beta(0.1L, "long double");
+#endif
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#ifdef TEST_REAL_CONCEPT
test_beta(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_igamma.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma.cpp (original)
+++ trunk/libs/math/test/test_igamma.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -174,15 +174,15 @@
"[^|]*", // compiler
"[^|]*", // stdlib
"Sun.*", // platform
- largest_real, // test type(s)
+ largest_type, // test type(s)
"[^|]*medium[^|]*", // test data group
- "[^|]*", 500, 100); // test function
+ "[^|]*", 500, 100); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
"Sun.*", // platform
- largest_real, // test type(s)
- "[^|]*integer[^|]*", // test data group
+ largest_type, // test type(s)
+ "[^|]*integer[^|]*", // test data group
"[^|]*", 100, 30); // test function
add_expected_result(
"[^|]*", // compiler
Modified: trunk/libs/math/test/test_igamma_inv.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma_inv.cpp (original)
+++ trunk/libs/math/test/test_igamma_inv.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -20,6 +20,13 @@
#include "test_gamma_hooks.hpp"
#include "handle_test_result.hpp"
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
//
// DESCRIPTION:
// ~~~~~~~~~~~~
@@ -377,16 +384,24 @@
#endif
#ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#ifdef TEST_FLOAT
test_gamma(0.1F, "float");
#endif
+#endif
+#ifdef TEST_DOUBLE
test_gamma(0.1, "double");
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_gamma(0.1L, "long double");
+#endif
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_gamma(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_igamma_inva.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma_inva.cpp (original)
+++ trunk/libs/math/test/test_igamma_inva.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -19,6 +19,13 @@
#include "handle_test_result.hpp"
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
//
// DESCRIPTION:
// ~~~~~~~~~~~~
@@ -250,16 +257,24 @@
expected_results();
#ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#ifdef TEST_FLOAT
test_gamma(0.1F, "float");
#endif
+#endif
+#ifdef TEST_DOUBLE
test_gamma(0.1, "double");
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_gamma(0.1L, "long double");
+#endif
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_gamma(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
#endif
+#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
"either because the long double overloads of the usual math functions are "
Modified: trunk/libs/math/test/test_negative_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_negative_binomial.cpp (original)
+++ trunk/libs/math/test/test_negative_binomial.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -19,6 +19,13 @@
# pragma warning(disable: 4127) // conditional expression is constant.
#endif
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
#include <boost/math/distributions/negative_binomial.hpp> // for negative_binomial_distribution
using boost::math::negative_binomial_distribution;
@@ -801,12 +808,20 @@
BOOST_CHECK_EQUAL(my8dist.success_fraction(), static_cast<double>(1./4.));
// (Parameter value, arbitrarily zero, only communicates the floating point type).
+#ifdef TEST_FLOAT
test_spots(0.0F); // Test float.
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0); // Test double.
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_spots(0.0L); // Test long double.
+#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
+#endif
#endif
#else
std::cout << "<note>The long double tests have been disabled on this platform "
Modified: trunk/libs/math/test/test_poisson.cpp
==============================================================================
--- trunk/libs/math/test/test_poisson.cpp (original)
+++ trunk/libs/math/test/test_poisson.cpp 2007-10-10 12:05:26 EDT (Wed, 10 Oct 2007)
@@ -12,6 +12,13 @@
#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
+#if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT)
+# define TEST_FLOAT
+# define TEST_DOUBLE
+# define TEST_LDOUBLE
+# define TEST_REAL_CONCEPT
+#endif
+
#ifdef _MSC_VER
# pragma warning(disable: 4127) // conditional expression is constant.
#endif
@@ -578,16 +585,24 @@
#endif
// (Parameter value, arbitrarily zero, only communicates the floating-point type).
+#ifdef TEST_POISSON
test_spots(0.0F); // Test float.
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0); // Test double.
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
if (numeric_limits<long double>::digits10 > numeric_limits<double>::digits10)
{ // long double is better than double (so not MSVC where they are same).
+#ifdef TEST_LDOUBLE
test_spots(0.0L); // Test long double.
+#endif
}
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.)); // Test real concept.
+#endif
#endif
#endif
return 0;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk