Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-11-14 07:11:34


Author: johnmaddock
Date: 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
New Revision: 41085
URL: http://svn.boost.org/trac/boost/changeset/41085

Log:
Merged changes from Trunk.
Added:
   sandbox/math_toolkit/libs/math/test/test_policy_2.cpp
      - copied unchanged from r41064, /trunk/libs/math/test/test_policy_2.cpp
Removed:
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/compilers.qbk
Text files modified:
   sandbox/math_toolkit/boost/math/concepts/distributions.hpp | 3
   sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp | 4
   sandbox/math_toolkit/boost/math/distributions/find_location.hpp | 7 +
   sandbox/math_toolkit/boost/math/distributions/find_scale.hpp | 6 +
   sandbox/math_toolkit/boost/math/policies/policy.hpp | 3
   sandbox/math_toolkit/boost/math/special_functions/expm1.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/gamma.hpp | 6
   sandbox/math_toolkit/boost/math/special_functions/log1p.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp | 2
   sandbox/math_toolkit/boost/math/tools/config.hpp | 17 ++++
   sandbox/math_toolkit/boost/math/tools/promotion.hpp | 12 +++
   sandbox/math_toolkit/boost/math/tools/test.hpp | 2
   sandbox/math_toolkit/boost/math/tools/test_data.hpp | 5
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/common_overviews.qbk | 132 ++++++++++++++++++++++++++++++++++++++++
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/implementation.qbk | 65 +++++++++++++++++++
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk | 7 +
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk | 4
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/win32_nmake.mak | 19 +++++
   sandbox/math_toolkit/libs/math/minimax/f.cpp | 19 +++++
   sandbox/math_toolkit/libs/math/minimax/main.cpp | 21 ++++-
   sandbox/math_toolkit/libs/math/performance/Jamfile.v2 | 5 +
   sandbox/math_toolkit/libs/math/test/Jamfile.v2 | 2
   sandbox/math_toolkit/libs/math/test/acosh_test.hpp | 7 ++
   sandbox/math_toolkit/libs/math/test/asinh_test.hpp | 19 +++-
   sandbox/math_toolkit/libs/math/test/atanh_test.hpp | 14 ++++
   sandbox/math_toolkit/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_beta_incl_test.cpp | 3
   sandbox/math_toolkit/libs/math/test/compile_test/dist_binomial_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_cauchy_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_exponential_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_gamma_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_lognormal_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_normal_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_pareto_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_poisson_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_students_t_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_triangular_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_uniform_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/dist_weibull_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/distribution_concept_check.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp | 28 ++++----
   sandbox/math_toolkit/libs/math/test/compile_test/sf_bessel_incl_test.cpp | 12 +++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_beta_incl_test.cpp | 8 ++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_binomial_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_cbrt_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_digamma_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp | 4 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp | 4 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp | 4 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_erf_incl_test.cpp | 8 ++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_expm1_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_factorials_incl_test.cpp | 8 ++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp | 40 ++++++-----
   sandbox/math_toolkit/libs/math/test/compile_test/sf_gamma_incl_test.cpp | 22 ++++++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_hermite_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_hypot_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_laguerre_incl_test.cpp | 4 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_legendre_incl_test.cpp | 6 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_log1p_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_powm1_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sign_incl_test.cpp | 6 +
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sinc_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sinhc_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp | 11 ++
   sandbox/math_toolkit/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/std_real_concept_check.cpp | 2
   sandbox/math_toolkit/libs/math/test/compile_test/test_compile_result.hpp | 8 ++
   sandbox/math_toolkit/libs/math/test/compile_test/tools_roots_inc_test.cpp | 4
   sandbox/math_toolkit/libs/math/test/compile_test/tools_test_inc_test.cpp | 4
   sandbox/math_toolkit/libs/math/test/hypot_test.cpp | 5 +
   sandbox/math_toolkit/libs/math/test/sinc_test.hpp | 9 ++
   sandbox/math_toolkit/libs/math/test/sinhc_test.hpp | 9 ++
   sandbox/math_toolkit/libs/math/test/special_functions_test.cpp | 11 ++
   sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp | 86 ++++++++++++++++++++-----
   sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp | 21 ++++-
   sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp | 23 ++++++
   sandbox/math_toolkit/libs/math/test/test_cbrt.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_classify.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_constants.cpp | 5 +
   sandbox/math_toolkit/libs/math/test/test_erf.cpp | 36 ++++++++++
   sandbox/math_toolkit/libs/math/test/test_gamma.cpp | 12 +++
   sandbox/math_toolkit/libs/math/test/test_ibeta.cpp | 26 +++++--
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp | 32 +++++++-
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp | 8 +
   sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp | 29 ++++++--
   sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp | 31 ++++++--
   sandbox/math_toolkit/libs/math/test/test_minima.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_normal.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_poisson.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_policy.cpp | 78 -----------------------
   sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp | 9 ++
   sandbox/math_toolkit/libs/math/test/test_roots.cpp | 27 ++++++-
   sandbox/math_toolkit/libs/math/test/test_students_t.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_triangular.cpp | 2
   105 files changed, 896 insertions(+), 222 deletions(-)

Modified: sandbox/math_toolkit/boost/math/concepts/distributions.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/concepts/distributions.hpp (original)
+++ sandbox/math_toolkit/boost/math/concepts/distributions.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -191,7 +191,8 @@
    static Distribution& get_object()
    {
       // will never get called:
- return * reinterpret_cast<Distribution*>(0);
+ static char buf[sizeof(Distribution)];
+ return * reinterpret_cast<Distribution*>(buf);
    }
 }; // struct DistributionConcept
 

Modified: sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp (original)
+++ sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -52,7 +52,7 @@
    std_real_concept(int c) : m_value(c){}
    std_real_concept(unsigned long c) : m_value(c){}
    std_real_concept(long c) : m_value(c){}
-#ifdef BOOST_HAS_LONG_LONG
+#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX) || defined(__SUNPRO_CC)
    std_real_concept(unsigned long long c) : m_value(static_cast<long double>(c)){}
    std_real_concept(long long c) : m_value(static_cast<long double>(c)){}
 #endif
@@ -73,7 +73,7 @@
    std_real_concept& operator=(unsigned int c) { m_value = c; return *this; }
    std_real_concept& operator=(long c) { m_value = c; return *this; }
    std_real_concept& operator=(unsigned long c) { m_value = c; return *this; }
-#ifdef BOOST_HAS_LONG_LONG
+#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX) || defined(__SUNPRO_CC)
    std_real_concept& operator=(long long c) { m_value = static_cast<long double>(c); return *this; }
    std_real_concept& operator=(unsigned long long c) { m_value = static_cast<long double>(c); return *this; }
 #endif

Modified: sandbox/math_toolkit/boost/math/distributions/find_location.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/find_location.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/find_location.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -36,10 +36,13 @@
       const Policy& pol
       )
     {
+#if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+ // Will fail to compile here if try to use with a distribution without scale & location,
+ // for example pareto, and many others. These tests are disabled by the pp-logic
+ // above if the compiler doesn't support the SFINAE tricks used in the traits class.
       BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<Dist>::value);
       BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<Dist>::value);
- // Will fail to compile here if try to use with a distribution without scale & location,
- // for example pareto, and many others.
+#endif
       static const char* function = "boost::math::find_location<Dist, Policy>&, %1%)";
 
       if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))

Modified: sandbox/math_toolkit/boost/math/distributions/find_scale.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/find_scale.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/find_scale.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -37,8 +37,10 @@
       const Policy& pol
       )
     {
+#if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
       BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<Dist>::value);
       BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<Dist>::value);
+#endif
       static const char* function = "boost::math::find_scale<Dist, Policy>(%1%, %1%, %1%, Policy)";
 
       if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))
@@ -107,8 +109,10 @@
       // << quantile(Dist(), c.param1) //q
       // << endl;
 
+#if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
       BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<Dist>::value);
       BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<Dist>::value);
+#endif
       static const char* function = "boost::math::find_scale<Dist, Policy>(complement(%1%, %1%, %1%, Policy))";
 
       // Checks on arguments, as not complemented version,
@@ -159,8 +163,10 @@
       // << quantile(Dist(), c.param1) //q
       // << endl;
 
+#if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
       BOOST_STATIC_ASSERT(::boost::math::tools::is_distribution<Dist>::value);
       BOOST_STATIC_ASSERT(::boost::math::tools::is_scaled_distribution<Dist>::value);
+#endif
       static const char* function = "boost::math::find_scale<Dist, Policy>(complement(%1%, %1%, %1%, Policy))";
 
       // Checks on arguments, as not complemented version,

Modified: sandbox/math_toolkit/boost/math/policies/policy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policies/policy.hpp (original)
+++ sandbox/math_toolkit/boost/math/policies/policy.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -6,8 +6,6 @@
 #ifndef BOOST_MATH_POLICY_HPP
 #define BOOST_MATH_POLICY_HPP
 
-//#define BOOST_PARAMETER_MAX_ARITY 15
-
 #include <boost/mpl/list.hpp>
 #include <boost/mpl/contains.hpp>
 #include <boost/mpl/if.hpp>
@@ -843,3 +841,4 @@
 #endif // BOOST_MATH_POLICY_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/expm1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/expm1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/expm1.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -253,11 +253,13 @@
 {
    return expm1<double>(z);
 }
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 inline long double expm1(long double z)
 {
    return expm1<long double>(z);
 }
 #endif
+#endif
 
 } // namespace math
 } // namespace boost

Modified: sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -40,8 +40,8 @@
 # undef BOOST_HAS_FPCLASSIFY
 # define BOOST_FPCLASSIFY_PREFIX
 # endif
-#elif defined(__HP_aCC)
-// aCC appears to do "#define fpclassify fpclassify" which messes us up a bit!
+#elif (defined(__HP_aCC) && !defined(__hppa))
+// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
 # define BOOST_FPCLASSIFY_PREFIX ::
 #else
 # define BOOST_FPCLASSIFY_PREFIX

Modified: sandbox/math_toolkit/boost/math/special_functions/gamma.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/gamma.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/gamma.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -148,7 +148,7 @@
       result = -boost::math::constants::pi<T>() / result;
       if(result == 0)
          return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
- if(boost::math::fpclassify(result) == FP_SUBNORMAL)
+ if((boost::math::fpclassify)(result) == FP_SUBNORMAL)
          return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
       return result;
    }
@@ -348,7 +348,7 @@
       result = -boost::math::constants::pi<T>() / result;
       if(result == 0)
          return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
- if(boost::math::fpclassify(result) == FP_SUBNORMAL)
+ if((boost::math::fpclassify)(result) == FP_SUBNORMAL)
          return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
       return result;
    }
@@ -580,7 +580,7 @@
    // This error handling isn't very good: it happens after the fact
    // rather than before it...
    //
- if(boost::math::fpclassify(prefix) == FP_INFINITE)
+ if((boost::math::fpclassify)(prefix) == FP_INFINITE)
       policies::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol);
 
    return prefix;

Modified: sandbox/math_toolkit/boost/math/special_functions/log1p.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/log1p.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/log1p.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -112,11 +112,13 @@
 {
    return log1p<double>(z);
 }
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 inline long double log1p(long double z)
 {
    return log1p<long double>(z);
 }
 #endif
+#endif
 
 #ifdef log1p
 # ifndef BOOST_HAS_LOG1P
@@ -128,7 +130,7 @@
 #ifdef BOOST_HAS_LOG1P
 # if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \
    || ((defined(linux) || defined(__linux) || defined(__linux__)) && !defined(__SUNPRO_CC)) \
- || (defined(__hpux) && !defined(_PA_RISC1_1))
+ || (defined(__hpux) && !defined(__hppa))
 template <class Policy>
 inline float log1p(float x, const Policy& pol)
 {

Modified: sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,6 +17,8 @@
 T sin_pi(T x)
 {
    BOOST_MATH_STD_USING // ADL of std names
+ if(x < 0)
+ return -sin_pi(-x);
    // sin of pi*x:
    bool invert;
    if(x < 0.5)

Modified: sandbox/math_toolkit/boost/math/tools/config.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/config.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/config.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -18,7 +18,7 @@
 
 #include <boost/math/tools/user.hpp>
 
-#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(_PA_RISC1_1)
+#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__hppa)
 # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
@@ -39,6 +39,21 @@
 //
 # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double)
+// may segfault depending upon the value of the arguments passed
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
 
 #ifdef BOOST_MSVC
    // Better safe than sorry, our tests don't support hardware exceptions:

Modified: sandbox/math_toolkit/boost/math/tools/promotion.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/promotion.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/promotion.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -19,6 +19,7 @@
 #define BOOST_MATH_PROMOTION_HPP
 
 // Boost type traits:
+#include <boost/math/tools/config.hpp>
 #include <boost/type_traits/is_floating_point.hpp> // for boost::is_floating_point;
 #include <boost/type_traits/is_integral.hpp> // for boost::is_integral
 #include <boost/type_traits/is_convertible.hpp> // for boost::is_convertible
@@ -29,6 +30,10 @@
 #include <boost/mpl/and.hpp> // for boost::mpl::if_c.
 #include <boost/mpl/or.hpp> // for boost::mpl::if_c.
 
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#include <boost/static_assert.hpp>
+#endif
+
 namespace boost
 {
   namespace math
@@ -99,6 +104,13 @@
>::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<type, long double>::value));
+#endif
       };
 
     } // namespace tools

Modified: sandbox/math_toolkit/boost/math/tools/test.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/test.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -213,7 +213,7 @@
          std::cout << std::endl;
       }
 #endif
- if(!boost::math::isfinite(point) && boost::math::isfinite(expected))
+ if(!(boost::math::isfinite)(point) && (boost::math::isfinite)(expected))
       {
          std::cout << "CAUTION: Found non-finite result, when a finite value was expected at entry " << i << "\n";
          std::cout << "Found: " << point << " Expected " << expected << " Error: " << err << std::endl;

Modified: sandbox/math_toolkit/boost/math/tools/test_data.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/test_data.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/test_data.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -6,7 +6,7 @@
 #ifndef BOOST_MATH_TOOLS_TEST_DATA_HPP
 #define BOOST_MATH_TOOLS_TEST_DATA_HPP
 
-#include <boost/config.hpp>
+#include <boost/math/tools/config.hpp>
 #include <boost/assert.hpp>
 #ifdef BOOST_MSVC
 # pragma warning(push)
@@ -41,7 +41,7 @@
    random_in_range = 0,
    periodic_in_range = 1,
    power_series = 2,
- dummy_param = 0x80,
+ dummy_param = 0x80
 };
 
 parameter_type operator | (parameter_type a, parameter_type b)
@@ -333,6 +333,7 @@
 template <class T>
 void test_data<T>::create_test_points(std::set<T>& points, const parameter_info<T>& arg1)
 {
+ BOOST_MATH_STD_USING
    //
    // Generate a set of test points as requested, try and generate points
    // at only float precision: otherwise when testing float versions of functions

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/common_overviews.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/common_overviews.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/common_overviews.qbk 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -82,6 +82,138 @@
 
 ]
 
+[template compilers_overview[]
+
+This section contains some information about how various compilers
+work with this library.
+It is not comprehensive and updated experiences are always welcome.
+Some effort has been made to suppress unhelpful warnings but it is
+difficult to achieve this on all systems.
+
+[table Supported/Tested Compilers
+[[Platform][Compiler][Has long double support][Notes]]
+[[Windows][MSVC 7.1 and later][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free at level 4 with
+ this compiler.]]
+[[Windows][Intel 8.1 and later][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free at level 4 with
+ this compiler. However, The tests cases tend to generate a lot of
+ warnings relating to numeric underflow of the test data: these are
+ harmless.]]
+[[Windows][GNU Mingw32 C++][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free with -Wall with this compiler.]]
+[[Windows][GNU Cygwin C++][No]
+ [All tests OK.
+
+ We aim to keep our headers warning free with -Wall with this compiler.
+
+ Long double support has been disabled because there are no native
+ long double C std library functions available.]]
+[[Windows][Borland C++ 5.8.2 (Developer studio 2006)][No]
+ [We have only partial compatability with this compiler:
+
+ Long double support has been disabled because the native
+ long double C standard library functions really only forward to the
+ double versions. This can result in unpredictable behaviour when
+ using the long double overloads: for example `sqrtl` applied to a
+ finite value, can result in an infinite result.
+
+ Some functions still fail to compile, there are no known workarounds at present.]]
+
+[[Linux][GNU C++ 3.4 and later][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free with -Wall with this compiler.]]
+[[Linux][Intel C++ 10.0 and later][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free with -Wall with this compiler.
+ However, The tests cases tend to generate a lot of
+ warnings relating to numeric underflow of the test data: these are
+ harmless.]]
+[[Linux][Intel C++ 8.1 and 9.1][No]
+ [All tests OK.
+
+ Long double support has been disabled with these compiler releases
+ because calling the standard library long double math functions
+ can result in a segfault. The issue is Linux distribution and
+ glibc version specific and is Intel bug report #409291. Fully up to date
+ releases of Intel 9.1 (post version l_cc_c_9.1.046)
+ shouldn't have this problem. If you need long
+ double support with this compiler, then comment out the define of
+ BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS at line 55 of
+ [@../../../../../boost/math/tools/config.hpp boost/math/tools/config.hpp].
+
+ We aim to keep our headers warning free with -Wall with this compiler.
+ However, The tests cases tend to generate a lot of
+ warnings relating to numeric underflow of the test data: these are
+ harmless.]]
+[[Linux][QLogic PathScale 3.0][Yes]
+ [Some tests involving conceptual checks fail to build, otherwise
+ there appear to be no issues.]]
+[[Linux][Sun Studio 12][Yes]
+ [Some tests involving function overload resolution fail to build,
+ these issues should be rairly encountered in practice.]]
+[[Solaris][Sun Studio 12][Yes]
+ [Some tests involving function overload resolution fail to build,
+ these issues should be rairly encountered in practice.]]
+[[Solaris][GNU C++ 4.x][Yes]
+ [All tests OK.
+
+ We aim to keep our headers warning free with -Wall with this compiler.]]
+[[HP Tru64][Compaq C++ 7.1][Yes]
+ [All tests OK.]]
+[[HP-UX Itanium][HP aCC 6.x][Yes]
+ [All tests OK.
+
+ Unfortunately this compiler emits quite a few warnings from libraries
+ upon which we depend (TR1, Array etc).]]
+[[HP-UX PA-RISC][GNU C++ 3.4][No]
+ [All tests OK.]]
+[[Apple Mac OS X, Intel][Darwin/GNU C++ 4.x][Yes][All tests OK.]]
+[[Apple Mac OS X, PowerPC][Darwin/GNU C++ 4.x][No]
+ [All tests OK.
+
+ Long double support has been disabled on this platform due to the
+ rather strange nature of Darwin's 106-bit long double
+ implementation. It should be possible to make this work if someone
+ is prepared to offer assistance.]]
+[[IMB AIX][IBM xlc 5.3][Yes]
+ [Currently our accuracy tests are unable to be run on this platform
+ due to compiler errors in our /test/ code. The IBM compiler group
+ are aware of the problem.]]
+]
+
+[table Unsupported Compilers
+[[Platform][Compiler]]
+[[Windows][Borland C++ 5.9.2 (Borland Developer Studio 2007)]]
+[[Windows][MSVC 6 and 7]]
+]
+
+If you're compiler or platform is not listed above, please try running the
+regression tests: cd into boost-root/libs/math/test and do a:
+
+ bjam mytoolset
+
+where "mytoolset" is the name of the
+[@../../../../../tools/build/index.html Boost.Build] toolset used for your
+compiler. The chances are that [*many of the accuracy tests will fail
+at this stage] - don't panic - the default acceptable error tolerances
+are quite tight, especially for long double types with an extended
+exponent range (these cause more extreme test cases to be executed
+for some functions).
+You will need to cast an eye over the output from
+the failing tests and make a judgement as to whether
+the error rates are acceptable or not.
+
+]
+
 [/ math.qbk
   Copyright 2007 John Maddock and Paul A. Bristow.
   Distributed under the Boost Software License, Version 1.0.

Deleted: sandbox/math_toolkit/libs/math/doc/sf_and_dist/compilers.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/compilers.qbk 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
+++ (empty file)
@@ -1,34 +0,0 @@
-[section:compilers Compilers]
-
-This section contains some information about how various compilers work with this library.
-It is not comprehensive and updated experiences are always welcome.
-Some effort has been made to suppress unhelpful warnings but it is difficult to achieve this on all systems.
-
-The code has been compiled and tested with:
-[table Compiler Notes
-[[Compiler][Platform][Notes]]
-[[Intel 9.1, 8.1][Win32 and Linux][The tests cases tend to generate a lot of
- warnings relating to numeric underflow of the test data: these are
- harmless. The headers all appear to be warning free.]]
-[[g++ ][Linux and HP-UX][The test suite doesn't compile with -pedantic
- (a problem with system headers included by Boost.Test not compiling
- with that option), otherwise our headers should be warning free.]]
-[[HP aCC][HP-UX][ Unfortunately this emits quite a few warnings from libraries
- upon which we depend (TR1, Array etc).]]
-[[Borland 5.8.2][Windows][Almost works: some effort has been put into porting to this compiler.
- However, during testing a number of instances were encountered where this compiler
- generated incorrect code: completely omitting a function call seemingly at random.
- For this reason, [*we cannot recommend using this library with this compiler], as the
- correct operation of the code cannot be guaranteed.]]
-[[MSVC 8.0][Windows][Warning free at level 4]]
-]
-
-[endsect][/section:compilers Compilers]
-
-[/
- Copyright 2006 John Maddock and Paul A. Bristow.
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt).
-]
-

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/implementation.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/implementation.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/implementation.qbk 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -417,7 +417,20 @@
 [pre cat filename | tr -d "\\r\\n" \| sed -e 's\/.*\\(<math\[^>\]\*>.\*<\/math>\\).\*\/\\1\/' > newfile]
 
 Setting up fonts for SVGMath is currently rather tricky, on a Windows XP system
-JM's font setup [@../svgmath.xml looks like this].
+JM's font setup is the same as the sample config file provided with SVGMath
+but with:
+
+[pre
+ <!\-\- Double\-struck \-\->
+ <mathvariant name\="double\-struck" family\="Mathematica7, Lucida Sans Unicode"\/>
+]
+
+changed to:
+
+[pre
+ <!\-\- Double\-struck \-\->
+ <mathvariant name\="double\-struck" family\="Lucida Sans Unicode"\/>
+]
 
 Note that unlike the sample config file supplied with SVGMath, this does not
 make use of the Mathematica 7 font as this lacks sufficient Unicode information
@@ -445,7 +458,55 @@
 (html is generated at math_toolkit\libs\math\doc\sf_and_dist\html\index.html
 using just bjam -a).
 
-JM's XEP config file [@../xep.xml looks like this].
+JM's XEP config file has the following font configuration section added:
+
+[pre
+ <font\-group xml:base\="file:\/C:\/Windows\/Fonts\/" label\="Windows TrueType" embed\="true" subset\="true">
+ <font\-family name\="Arial">
+ <font><font\-data ttf\="arial.ttf"\/><\/font>
+ <font style\="oblique"><font\-data ttf\="ariali.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="arialbd.ttf"\/><\/font>
+ <font weight\="bold" style\="oblique"><font\-data ttf\="arialbi.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Times New Roman" ligatures\="&#xFB01; &#xFB02;">
+ <font><font\-data ttf\="times.ttf"\/><\/font>
+ <font style\="italic"><font\-data ttf\="timesi.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="timesbd.ttf"\/><\/font>
+ <font weight\="bold" style\="italic"><font\-data ttf\="timesbi.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Courier New">
+ <font><font\-data ttf\="cour.ttf"\/><\/font>
+ <font style\="oblique"><font\-data ttf\="couri.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="courbd.ttf"\/><\/font>
+ <font weight\="bold" style\="oblique"><font\-data ttf\="courbi.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Tahoma" embed\="true">
+ <font><font\-data ttf\="tahoma.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="tahomabd.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Verdana" embed\="true">
+ <font><font\-data ttf\="verdana.ttf"\/><\/font>
+ <font style\="oblique"><font\-data ttf\="verdanai.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="verdanab.ttf"\/><\/font>
+ <font weight\="bold" style\="oblique"><font\-data ttf\="verdanaz.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Palatino" embed\="true" ligatures\="&#xFB00; &#xFB01; &#xFB02; &#xFB03; &#xFB04;">
+ <font><font\-data ttf\="pala.ttf"\/><\/font>
+ <font style\="italic"><font\-data ttf\="palai.ttf"\/><\/font>
+ <font weight\="bold"><font\-data ttf\="palab.ttf"\/><\/font>
+ <font weight\="bold" style\="italic"><font\-data ttf\="palabi.ttf"\/><\/font>
+ <\/font\-family>
+
+ <font\-family name\="Lucida Sans Unicode">
+ <font><font\-data ttf\="lsansuni.ttf"\/><\/font>
+ <\/font\-family>
+]
+
 PAB had to alter his because the Lucida Sans Unicode font had a different name.
 Changes are very likely to be required if you are not using Windows.
 

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -273,6 +273,9 @@
 [include result_type_calc.qbk]
 [include error_handling.qbk]
 
+[section:compilers_overview Compilers]
+[compilers_overview]
+[endsect]
 [section:pol_overview Configuration and Policies]
 [policy_overview]
 [endsect]
@@ -388,7 +391,9 @@
 [section:history1 History and What's New]
 [history]
 [endsect]
-[include compilers.qbk]
+[section:compilers Compilers]
+[compilers_overview]
+[endsect]
 [include issues.qbk]
 [include credits.qbk]
 [/include test_HTML4_symbols.qbk]

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -59,8 +59,7 @@
 
 SVN Revisions:
 
-Sandbox revision merged to trunk: 39833.
-Trunk revision: 39833.
+Sandbox and trunk last synchonised at revision: 40161.
 
 ]
 [/
@@ -69,3 +68,4 @@
   (See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt).
 ]
+

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/win32_nmake.mak
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/win32_nmake.mak (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/win32_nmake.mak 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -1,8 +1,26 @@
+# Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt).
+#
+# Example makefile that builds the docs.
+# Note that all the following paths will have to be changed to match
+# your actual installation paths.
+#
 
+# Path to quickbook executable:
 QB="C:/download/open/xml/bin/quickbook.exe"
+
+# Path to xsltproc:
 XSLTPROC="C:/download/open/xml/bin/xsltproc-win32/xsltproc.exe"
+
+# Path to Boost Trunc:
 BOOST=c:/data/boost/boost/trunk
+
+# Path to FO processor (XEP):
 FO=C:/Progra~1/xep/xep.bat
+
+# Configuration options:
 COMMON_XSL_PARAM=--stringparam admon.graphics "1" --stringparam body.start.indent "0pt" --stringparam chunk.first.sections "1" --stringparam chunk.section.depth "10" --stringparam fop.extensions "0" --stringparam generate.section.toc.level "10" --stringparam html.stylesheet "../../../../../../trunk/doc/html/boostbook.css" --stringparam navig.graphics "1" --stringparam page.margin.inner "0.5in" --stringparam page.margin.outer "0.5in" --stringparam paper.type "A4" --stringparam toc.max.depth "4" --stringparam toc.section.depth "10" --stringparam xep.extensions "1"
 PDF_XSL_PARAM=--stringparam admon.graphics.extension ".svg" --stringparam use.role.for.mediaobject 1 --stringparam preferred.mediaobject.role print --stringparam admon.graphics.path "../html/images/"
 HTML_XSL_PARAM=
@@ -52,3 +70,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/minimax/f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/minimax/f.cpp (original)
+++ sandbox/math_toolkit/libs/math/minimax/f.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -9,6 +9,7 @@
 #include <boost/math/bindings/rr.hpp>
 #include <boost/math/tools/polynomial.hpp>
 #include <boost/math/special_functions.hpp>
+#include <boost/math/special_functions/zeta.hpp>
 
 #include <cmath>
 
@@ -145,7 +146,8 @@
          //
          static boost::math::tools::eps_tolerance<boost::math::ntl::RR> tol(1000);
          static boost::uintmax_t max_iter = 1000;
- static const boost::math::ntl::RR root = boost::math::tools::bracket_and_solve_root(&boost::math::digamma, boost::math::ntl::RR(1.4), boost::math::ntl::RR(1.5), true, tol, max_iter).first;
+ boost::math::ntl::RR (*pdg)(boost::math::ntl::RR) = &boost::math::digamma;
+ static const boost::math::ntl::RR root = boost::math::tools::bracket_and_solve_root(pdg, boost::math::ntl::RR(1.4), boost::math::ntl::RR(1.5), true, tol, max_iter).first;
 
          boost::math::ntl::RR x2 = x;
          double lim = 1e-65;
@@ -225,6 +227,21 @@
          boost::math::ntl::RR z = 1 / (boost::math::ntl::RR(1)/16 - x);
          return boost::math::cyl_bessel_i(0, z) * sqrt(z) / exp(z);
       }
+ case 18:
+ // Zeta over [0, 1]
+ {
+ return boost::math::zeta(1 - x) * x - x;
+ }
+ case 19:
+ // Zeta over [1, n]
+ {
+ return boost::math::zeta(x) - 1 / (x - 1);
+ }
+ case 20:
+ // Zeta over [a, b] : a >> 1
+ {
+ return log(boost::math::zeta(x) - 1);
+ }
    }
    return 0;
 }

Modified: sandbox/math_toolkit/libs/math/minimax/main.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/minimax/main.cpp (original)
+++ sandbox/math_toolkit/libs/math/minimax/main.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -5,8 +5,12 @@
 
 #define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits<real_type>::type_sqrt (boost::math::tools::epsilon <real_type>()))
 #define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits<real_type>::type_sqrt ( boost::math::tools::min_value<real_type>()))
+#define BOOST_UBLAS_NDEBUG
 
 #include <boost/math/bindings/rr.hpp>
+namespace std{
+using boost::math::ntl::pow;
+} // workaround for spirit parser.
 #include <boost/math/tools/remez.hpp>
 #include <boost/math/tools/test.hpp>
 #include <boost/spirit/core.hpp>
@@ -32,8 +36,8 @@
 bool pin(false);
 int orderN(3);
 int orderD(1);
-int target_precision(53);
-int working_precision(250);
+int target_precision = boost::math::tools::digits<long double>();
+int working_precision = target_precision * 2;
 bool started(false);
 int variant(0);
 int skew(0);
@@ -147,14 +151,14 @@
       std::cout << "P = {";
       for(i = 0; i < n.size(); ++i)
       {
- std::cout << " " << n[i] << std::endl;
+ std::cout << " " << n[i] << "L," << std::endl;
       }
       std::cout << " }\n";
 
       std::cout << "Q = {";
       for(i = 0; i < d.size(); ++i)
       {
- std::cout << " " << d[i] << std::endl;
+ std::cout << " " << d[i] << "L," << std::endl;
       }
       std::cout << " }\n";
 
@@ -260,7 +264,11 @@
          std::cout << std::setprecision(6) << std::setw(15) << std::left << absissa
             << boost::math::tools::real_cast<T>(err) << std::endl;
       }
- std::cout << "Max error found: " << std::setprecision(6) << boost::math::tools::real_cast<T>(max_error) << std::endl;
+ std::string msg = "Max Error found at ";
+ msg += name;
+ msg += " precision = ";
+ msg.append(62 - 17 - msg.size(), ' ');
+ std::cout << msg << std::setprecision(6) << boost::math::tools::real_cast<T>(max_error) << std::endl;
    }
    else
    {
@@ -419,6 +427,7 @@
 int test_main(int, char* [])
 {
    std::string line;
+ real_parser<long double/*boost::math::ntl::RR*/ > const rr_p;
    while(std::getline(std::cin, line))
    {
       if(parse(line.c_str(), str_p("quit"), space_p).full)
@@ -426,7 +435,7 @@
       if(false == parse(line.c_str(),
          (
 
- str_p("range")[assign_a(started, false)] && real_p[assign_a(a)] && real_p[assign_a(b)]
+ str_p("range")[assign_a(started, false)] && rr_p[assign_a(a)] && rr_p[assign_a(b)]
       ||
             str_p("relative")[assign_a(started, false)][assign_a(rel_error, true)]
       ||

Modified: sandbox/math_toolkit/libs/math/performance/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/performance/Jamfile.v2 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -1,3 +1,7 @@
+# Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt).
 
 
 exe math_performance :
@@ -20,3 +24,4 @@
     release
     ;
 
+

Modified: sandbox/math_toolkit/libs/math/test/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/test/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/test/Jamfile.v2 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -302,12 +302,14 @@
 run test_uniform.cpp ;
 run test_weibull.cpp ;
 run test_policy.cpp ;
+run test_policy_2.cpp ;
 run test_policy_sf.cpp ;
 
 run test_bessel_j.cpp ;
 run test_bessel_y.cpp ;
 run test_bessel_i.cpp ;
 run test_bessel_k.cpp ;
+run test_zeta.cpp ;
 
 compile compile_test/dist_bernoulli_incl_test.cpp ;
 compile compile_test/dist_beta_incl_test.cpp ;

Modified: sandbox/math_toolkit/libs/math/test/acosh_test.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/acosh_test.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/acosh_test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -70,12 +70,19 @@
         long double xl =
                 static_cast<long double>(i-50)/static_cast<long double>(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(" ");

Modified: sandbox/math_toolkit/libs/math/test/asinh_test.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/asinh_test.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/asinh_test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -47,9 +47,9 @@
     BOOST_MESSAGE("Testing asinh in the real domain for "
         << string_type_name<T>::_() << ".");
     
- for (int i = 0; i <= 100; i++)
+ for (int i = 0; i <= 80; i++)
     {
- T x = static_cast<T>(i-50)/static_cast<T>(5);
+ T x = static_cast<T>(i-40)/static_cast<T>(4);
         
         BOOST_CHECK_PREDICATE(::std::less_equal<T>(),
             (asinh_error_evaluator(x))
@@ -63,19 +63,26 @@
     BOOST_MESSAGE(" ");
     BOOST_MESSAGE("asinh");
     
- for (int i = 0; i <= 100; i++)
+ for (int i = 0; i <= 80; i++)
     {
- float xf = static_cast<float>(i-50)/static_cast<float>(5);
- double xd = static_cast<double>(i-50)/static_cast<double>(5);
+ float xf = static_cast<float>(i-40)/static_cast<float>(4);
+ double xd = static_cast<double>(i-40)/static_cast<double>(4);
         long double xl =
- static_cast<long double>(i-50)/static_cast<long double>(5);
+ static_cast<long double>(i-40)/static_cast<long double>(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(" ");

Modified: sandbox/math_toolkit/libs/math/test/atanh_test.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/atanh_test.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/atanh_test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -116,12 +116,19 @@
                 std::numeric_limits<long double>::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 @@
             }
             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
             }
         }
     }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_bernoulli_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_beta_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_beta_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_beta_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,5 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_binomial_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_binomial_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_binomial_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_cauchy_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_cauchy_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_cauchy_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -21,4 +21,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_chi_squared_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_exponential_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_exponential_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_exponential_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_extreme_val_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_fisher_f_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_gamma_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_gamma_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_gamma_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_lognormal_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_lognormal_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_lognormal_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_neg_binom_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_normal_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_normal_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_normal_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_pareto_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_pareto_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_pareto_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_poisson_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_poisson_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_poisson_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_students_t_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_students_t_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_students_t_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_triangular_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_triangular_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_triangular_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_uniform_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_uniform_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_uniform_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_weibull_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_weibull_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_weibull_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -20,4 +20,6 @@
 
 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/distribution_concept_check.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/distribution_concept_check.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/distribution_concept_check.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -42,6 +42,8 @@
 {
    instantiate(float(0));
    instantiate(double(0));
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    instantiate((long double)(0));
+#endif
 }
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -137,10 +137,10 @@
    boost::math::ibetac_invb(v1, v2, v3);
    boost::math::gamma_p_derivative(v2, v3);
    boost::math::ibeta_derivative(v1, v2, v3);
- boost::math::fpclassify(v1);
- boost::math::isfinite(v1);
- boost::math::isnormal(v1);
- boost::math::isnan(v1);
+ (boost::math::fpclassify)(v1);
+ (boost::math::isfinite)(v1);
+ (boost::math::isnormal)(v1);
+ (boost::math::isnan)(v1);
    boost::math::isinf(v1);
    boost::math::log1p(v1);
    boost::math::expm1(v1);
@@ -233,11 +233,11 @@
    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::fpclassify(v1);
- boost::math::isfinite(v1);
- boost::math::isnormal(v1);
- boost::math::isnan(v1);
- boost::math::isinf(v1);
+ (boost::math::fpclassify)(v1);
+ (boost::math::isfinite)(v1);
+ (boost::math::isnormal)(v1);
+ (boost::math::isnan)(v1);
+ (boost::math::isinf)(v1);
    boost::math::log1p(v1, pol);
    boost::math::expm1(v1, pol);
    boost::math::cbrt(v1, pol);
@@ -327,11 +327,11 @@
    test::ibetac_invb(v1, v2, v3);
    test::gamma_p_derivative(v2, v3);
    test::ibeta_derivative(v1, v2, v3);
- test::fpclassify(v1);
- test::isfinite(v1);
- test::isnormal(v1);
- test::isnan(v1);
- test::isinf(v1);
+ (test::fpclassify)(v1);
+ (test::isfinite)(v1);
+ (test::isnormal)(v1);
+ (test::isnan)(v1);
+ (test::isinf)(v1);
    test::log1p(v1);
    test::expm1(v1);
    test::cbrt(v1);

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_bessel_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_bessel_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_bessel_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,25 +17,37 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_beta_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_beta_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_beta_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,18 +17,26 @@
 {
    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
 }
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_binomial_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_binomial_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_binomial_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_cbrt_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_cbrt_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_cbrt_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_cos_pi_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_digamma_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_digamma_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_digamma_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }
\ No newline at end of file

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_1_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,9 +17,13 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_2_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,9 +17,13 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_3_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,9 +17,13 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rc_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rd_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rf_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_ellint_rj_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_erf_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_erf_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_erf_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,17 +17,25 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_expm1_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_expm1_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_expm1_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_factorials_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_factorials_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_factorials_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,18 +17,26 @@
 {
    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
 }
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_fpclassify_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -13,25 +13,31 @@
 //
 #include "test_compile_result.hpp"
 
-inline void check_result_imp(bool, bool){}
-
 void check()
 {
- check_result<int>(boost::math::fpclassify<float>(f));
- check_result<int>(boost::math::fpclassify<double>(d));
- check_result<int>(boost::math::fpclassify<long double>(l));
-
- check_result<bool>(boost::math::isfinite<float>(f));
- check_result<bool>(boost::math::isfinite<double>(d));
- check_result<bool>(boost::math::isfinite<long double>(l));
-
- check_result<bool>(boost::math::isinf<float>(f));
- check_result<bool>(boost::math::isinf<double>(d));
- check_result<bool>(boost::math::isinf<long double>(l));
-
- check_result<bool>(boost::math::isnormal<float>(f));
- check_result<bool>(boost::math::isnormal<double>(d));
- check_result<bool>(boost::math::isnormal<long double>(l));
+ 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
 }
 
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_gamma_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_gamma_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_gamma_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,45 +17,67 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_hermite_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_hermite_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_hermite_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_hypot_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_hypot_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_hypot_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_laguerre_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_laguerre_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_laguerre_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,12 +17,16 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_legendre_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_legendre_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_legendre_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,13 +17,19 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_log1p_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_log1p_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_log1p_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_powm1_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_powm1_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_powm1_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sign_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sign_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sign_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,13 +17,19 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sin_pi_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sinc_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sinc_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sinc_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sinhc_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sinhc_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sinhc_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sph_harm_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -11,26 +11,33 @@
 // 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>){}
 
+#include "test_compile_result.hpp"
+
+
 
 void check()
 {
    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
 }
 
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_sqrt1pm1_incl_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -17,5 +17,7 @@
 {
    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
 }

Modified: sandbox/math_toolkit/libs/math/test/compile_test/std_real_concept_check.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/std_real_concept_check.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/std_real_concept_check.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -193,6 +193,8 @@
 
 int main()
 {
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    instantiate(boost::math::concepts::std_real_concept(0));
+#endif
 }
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/test_compile_result.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/test_compile_result.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/test_compile_result.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -22,6 +22,7 @@
 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(bool, bool){}
 
 template <class T1, class T2>
 inline void check_result_imp(T1, T2)
@@ -118,8 +119,13 @@
    }
 }; // 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

Modified: sandbox/math_toolkit/libs/math/test/compile_test/tools_roots_inc_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/tools_roots_inc_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/tools_roots_inc_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -11,12 +11,12 @@
 // 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::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 check()
 {
    typedef double (*F)(double);

Modified: sandbox/math_toolkit/libs/math/test/compile_test/tools_test_inc_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/tools_test_inc_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/tools_test_inc_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -12,10 +12,10 @@
 // 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(boost::math::tools::test_result<double>, boost::math::tools::test_result<double>){}
 
+#include "test_compile_result.hpp"
+
 
 void check()
 {

Modified: sandbox/math_toolkit/libs/math/test/hypot_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/hypot_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/hypot_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -41,8 +41,13 @@
 void do_test_boundaries(float x, float y)
 {
    float expected = static_cast<float>((boost::math::hypot)(
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
       static_cast<long double>(x),
       static_cast<long double>(y)));
+#else
+ static_cast<double>(x),
+ static_cast<double>(y)));
+#endif
    float found = (boost::math::hypot)(x, y);
    BOOST_CHECK_CLOSE(expected, found, tolerance);
 }

Modified: sandbox/math_toolkit/libs/math/test/sinc_test.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/sinc_test.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/sinc_test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -66,6 +66,7 @@
     
     for (int i = 0; i <= 100; i++)
     {
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
         BOOST_MESSAGE( ::std::setw(15)
                     << sinc_pi<float>(static_cast<float>(i-50)/
                                                 static_cast<float>(50))
@@ -75,6 +76,14 @@
                     << ::std::setw(15)
                     << sinc_pi<long double>(static_cast<long double>(i-50)/
                                                 static_cast<long double>(50)));
+#else
+ BOOST_MESSAGE( ::std::setw(15)
+ << sinc_pi<float>(static_cast<float>(i-50)/
+ static_cast<float>(50))
+ << ::std::setw(15)
+ << sinc_pi<double>(static_cast<double>(i-50)/
+ static_cast<double>(50)));
+#endif
     }
     
     BOOST_MESSAGE(" ");

Modified: sandbox/math_toolkit/libs/math/test/sinhc_test.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/sinhc_test.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/sinhc_test.hpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -66,6 +66,7 @@
     
     for (int i = 0; i <= 100; i++)
     {
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
         BOOST_MESSAGE( ::std::setw(15)
                     << sinhc_pi<float>(static_cast<float>(i-50)/
                                                 static_cast<float>(50))
@@ -75,6 +76,14 @@
                     << ::std::setw(15)
                     << sinhc_pi<long double>(static_cast<long double>(i-50)/
                                                 static_cast<long double>(50)));
+#else
+ BOOST_MESSAGE( ::std::setw(15)
+ << sinhc_pi<float>(static_cast<float>(i-50)/
+ static_cast<float>(50))
+ << ::std::setw(15)
+ << sinhc_pi<double>(static_cast<double>(i-50)/
+ static_cast<double>(50)));
+#endif
     }
     
     BOOST_MESSAGE(" ");

Modified: sandbox/math_toolkit/libs/math/test/special_functions_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/special_functions_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/special_functions_test.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -14,6 +14,7 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/test/unit_test_log.hpp>
 #include <boost/test/test_case_template.hpp>
+#include <boost/math/tools/config.hpp>
 
 
 template<typename T>
@@ -28,17 +29,23 @@
     } \
 }
 
+#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<float,double,long double> test_types;
+#else
+DEFINE_TYPE_NAME(float);
+DEFINE_TYPE_NAME(double);
+
+typedef boost::mpl::list<float,double> 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<float,double> near_eps_test_types;
 #else
 typedef boost::mpl::list<float,double,long double> near_eps_test_types;

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -59,14 +59,9 @@
    //
    // HP-UX specific rates:
    //
- // Does this need more investigation or is test data limited????
- add_expected_result(
- ".*", // compiler
- ".*", // stdlib
- "HP-UX", // platform
- "double", // test type(s)
- ".*Tricky.*", // test data group
- ".*", 100000, 100000); // test function
+ // Error rate for double precision are limited by the accuracy of
+ // the approximations use, which bracket rather than preserve the root.
+ //
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
@@ -85,10 +80,60 @@
       ".*", // compiler
       ".*", // stdlib
       "HP-UX", // platform
+ "double", // test type(s)
+ ".*Tricky.*", // test data group
+ ".*", 100000, 100000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "HP-UX", // platform
       largest_type, // test type(s)
       ".*J.*Tricky.*", // test data group
       ".*", 3000, 500); // test function
-
+ //
+ // HP Tru64:
+ //
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ "double", // test type(s)
+ ".*Tricky.*", // test data group
+ ".*", 100000, 100000); // test function
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ largest_type, // test type(s)
+ ".*Tricky large.*", // test data group
+ ".*", 3000, 1000); // test function
+ //
+ // Solaris specific rates:
+ //
+ // Error rate for double precision are limited by the accuracy of
+ // the approximations use, which bracket rather than preserve the root.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Sun Solaris", // platform
+ largest_type, // test type(s)
+ "Bessel J: Random Data.*Tricky.*", // test data group
+ ".*", 3000, 500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Sun Solaris", // platform
+ "double", // test type(s)
+ ".*Tricky.*", // test data group
+ ".*", 200000, 100000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Sun Solaris", // platform
+ largest_type, // test type(s)
+ ".*J.*tricky.*", // test data group
+ ".*", 400000000, 200000000); // test function
    //
    // Mac OS X:
    //
@@ -96,6 +141,20 @@
       ".*", // compiler
       ".*", // stdlib
       "Mac OS", // platform
+ largest_type, // test type(s)
+ ".*J0.*Tricky.*", // test data group
+ ".*", 400000000, 400000000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ ".*J1.*Tricky.*", // test data group
+ ".*", 3000000, 2000000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
       largest_type, // test type(s)
       "Bessel JN.*", // test data group
       ".*", 40000, 20000); // test function
@@ -107,15 +166,6 @@
       "Bessel J:.*", // test data group
       ".*", 50000, 20000); // test function
 
- // This shouldn't be required, could be limited test data precision
- // i.e. not enough bits in double input to get double result.
- add_expected_result(
- ".*", // compiler
- ".*", // stdlib
- "Mac OS", // platform
- "double", // test type(s)
- ".*Tricky.*", // test data group
- ".*", 200000, 200000); // test function
 
 
    //

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -55,27 +55,36 @@
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
- largest_type = "(long\\s+)?double";
+ largest_type = "(long\\s+)?double|real_concept";
    }
    else
    {
- largest_type = "long double";
+ largest_type = "long double|real_concept";
    }
 #else
- largest_type = "(long\\s+)?double";
+ largest_type = "(long\\s+)?double|real_concept";
 #endif
+ //
+ // On MacOS X cyl_bessel_k has much higher error levels than
+ // expected: given that the implementation is basically
+ // just a continued fraction evaluation combined with
+ // exponentiation, we conclude that exp and pow are less
+ // accurate on this platform, especially when the result
+ // is outside the range of a double.
+ //
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
- ".*", // platform
+ "Mac OS", // platform
       largest_type, // test type(s)
       ".*", // test data group
- ".*", 35, 15); // test function
+ ".*", 4000, 1300); // test function
+
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
- "real_concept", // test type(s)
+ largest_type, // test type(s)
       ".*", // test data group
       ".*", 35, 15); // test function
    //

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -59,21 +59,38 @@
 #endif
 
    //
- // HP-UX rates are very slightly higher:
+ // HP-UX and Solaris rates are very slightly higher:
    //
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
- "HP-UX", // platform
+ "HP-UX|Sun Solaris", // platform
       largest_type, // test type(s)
       ".*(Y[nv]|y).*Random.*", // test data group
       ".*", 30000, 30000); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
- "HP-UX", // platform
+ "HP-UX|Sun Solaris", // platform
       largest_type, // test type(s)
       ".*Y[01Nv].*", // test data group
+ ".*", 1300, 500); // test function
+ //
+ // Tru64:
+ //
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ largest_type, // test type(s)
+ ".*(Y[nv]|y).*Random.*", // test data group
+ ".*", 30000, 30000); // test function
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ largest_type, // test type(s)
+ ".*Y[01Nv].*", // test data group
       ".*", 400, 200); // test function
 
    //

Modified: sandbox/math_toolkit/libs/math/test/test_cbrt.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_cbrt.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_cbrt.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -119,10 +119,12 @@
    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;
 }
 

Modified: sandbox/math_toolkit/libs/math/test/test_classify.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_classify.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_classify.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -41,7 +41,7 @@
          BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL);
       }
       t = std::numeric_limits<T>::denorm_min();
- if(t != 0)
+ if((t != 0) && (t < (std::numeric_limits<T>::min)()))
       {
          BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_SUBNORMAL);
          BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL);

Modified: sandbox/math_toolkit/libs/math/test/test_constants.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_constants.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_constants.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -42,8 +42,13 @@
    BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(2)/3, twothirds<RealType>(), tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(0.14159265358979323846264338327950288419716939937510L), pi_minus_three<RealType>(), tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(4. - 3.14159265358979323846264338327950288419716939937510L), four_minus_pi<RealType>(), tolerance);
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(pow((4 - 3.14159265358979323846264338327950288419716939937510L), 1.5L)), pow23_four_minus_pi<RealType>(), tolerance);
    BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(exp(-0.5L)), exp_minus_half<RealType>(), tolerance);
+#else
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(pow((4 - 3.14159265358979323846264338327950288419716939937510), 1.5)), pow23_four_minus_pi<RealType>(), tolerance);
+ BOOST_CHECK_CLOSE_FRACTION(static_cast<RealType>(exp(-0.5)), exp_minus_half<RealType>(), tolerance);
+#endif
 
 } // template <class RealType>void test_spots(RealType)
 

Modified: sandbox/math_toolkit/libs/math/test/test_erf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_erf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_erf.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -46,6 +46,42 @@
    // Define the max and mean errors expected for
    // various compilers and platforms.
    //
+ const char* largest_type;
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
+ {
+ largest_type = "(long\\s+)?double|real_concept";
+ }
+ else
+ {
+ largest_type = "long double|real_concept";
+ }
+#else
+ largest_type = "(long\\s+)?double";
+#endif
+ //
+ // On MacOS X erfc has much higher error levels than
+ // expected: given that the implementation is basically
+ // just a rational function evaluation combined with
+ // exponentiation, we conclude that exp and pow are less
+ // accurate on this platform, especially when the result
+ // is outside the range of a double.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "Erf Function:.*Large.*", // test data group
+ "boost::math::erfc", 4300, 1300); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "Erf Function:.*", // test data group
+ "boost::math::erfc", 40, 10); // test function
+
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib

Modified: sandbox/math_toolkit/libs/math/test/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -175,6 +175,16 @@
       "tgamma1pm1.*", // test data group
       "boost::math::tgamma1pm1", 200, 80); // test function
    //
+ // Tru64:
+ //
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ "real_concept", // test type(s)
+ "factorials", // test data group
+ "boost::math::lgamma", 50, 20); // test function
+ //
    // Sun OS:
    //
    add_expected_result(
@@ -251,7 +261,7 @@
       ".*", // platform
       "real_concept", // test type(s)
       "factorials", // test data group
- "boost::math::lgamma", 30, 4); // test function
+ "boost::math::lgamma", 40, 4); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -106,17 +106,19 @@
    add_expected_result(
       "[^|]*", // compiler
       "[^|]*", // stdlib
- "linux|Mac OS|Sun.*", // platform
- "double", // test type(s)
+ "linux|Mac OS", // platform
+ largest_type, // test type(s)
       "(?i).*large.*", // test data group
- ".*", 40, 20); // test function
+ ".*", 200000, 10000); // test function
+#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
    add_expected_result(
       "[^|]*", // compiler
       "[^|]*", // stdlib
- "linux|Mac OS", // platform
- largest_type, // test type(s)
+ "linux|Mac OS|Sun.*", // platform
+ "double", // test type(s)
       "(?i).*large.*", // test data group
- ".*", 200000, 10000); // test function
+ ".*", 40, 20); // test function
+#endif
    add_expected_result(
       "[^|]*", // compiler
       "[^|]*", // stdlib
@@ -140,6 +142,16 @@
       "(?i).*large.*", // test data group
       ".*", 200000, 10000); // test function
    //
+ // Tru64:
+ //
+ add_expected_result(
+ ".*Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ largest_type, // test type(s)
+ "(?i).*large.*", // test data group
+ ".*", 130000, 10000); // test function
+ //
    // Sun OS:
    //
    add_expected_result(
@@ -148,7 +160,7 @@
       "Sun.*", // platform
       largest_type, // test type(s)
       "(?i).*large.*", // test data group
- ".*", 110000, 10000); // test function
+ ".*", 130000, 10000); // test function
    add_expected_result(
       "[^|]*", // compiler
       "[^|]*", // stdlib

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -78,6 +78,8 @@
 #else
    largest_type = "(long\\s+)?double";
 #endif
+
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    //
    // Linux etc,
    // Extended exponent range of long double
@@ -107,6 +109,7 @@
          ".*", // test data group
          ".*", 5000000L, 500000); // test function
    }
+#endif
    //
    // MinGW,
    // Extended exponent range of long double
@@ -128,17 +131,30 @@
       ".*", 300000, 20000); // test function
 
    //
- // HP-UX
+ // HP-UX and Solaris:
    // Extended exponent range of long double
    // causes more extreme test cases to be executed:
    //
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
- "HP-UX", // platform
- "long double", // test type(s)
+ "HP-UX|Sun Solaris", // platform
+ "long double", // test type(s)
+ ".*", // test data group
+ ".*", 200000, 100000); // test function
+
+ //
+ // HP Tru64:
+ // Extended exponent range of long double
+ // causes more extreme test cases to be executed:
+ //
+ add_expected_result(
+ "HP Tru64.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ "long double", // test type(s)
       ".*", // test data group
- ".*", 200000, 100000); // test function
+ ".*", 200000, 100000); // test function
 
    //
    // Catch all cases come last:
@@ -187,7 +203,9 @@
       //
       if(data[i][5] == 0)
          BOOST_CHECK_EQUAL(boost::math::ibeta_inv(data[i][0], data[i][1], data[i][5]), value_type(0));
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001)
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::ibeta_inv(data[i][0], data[i][1], data[i][5]);
          BOOST_CHECK_CLOSE(data[i][2], inv, precision);
@@ -197,7 +215,9 @@
 
       if(data[i][6] == 0)
          BOOST_CHECK_EQUAL(boost::math::ibetac_inv(data[i][0], data[i][1], data[i][6]), value_type(1));
- else if((1 - data[i][6] > 0.001) && (fabs(data[i][6]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][6] > 0.001)
+ && (fabs(data[i][6]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][6]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::ibetac_inv(data[i][0], data[i][1], data[i][6]);
          BOOST_CHECK_CLOSE(data[i][2], inv, precision);

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -137,7 +137,9 @@
          BOOST_CHECK_EQUAL(boost::math::ibeta_inva(data[i][1], data[i][2], data[i][5]), boost::math::tools::max_value<value_type>());
          BOOST_CHECK_EQUAL(boost::math::ibeta_invb(data[i][0], data[i][2], data[i][5]), boost::math::tools::min_value<value_type>());
       }
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001)
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::ibeta_inva(data[i][1], data[i][2], data[i][5]);
          BOOST_CHECK_CLOSE(data[i][0], inv, precision);
@@ -155,7 +157,9 @@
          BOOST_CHECK_EQUAL(boost::math::ibetac_inva(data[i][1], data[i][2], data[i][6]), boost::math::tools::min_value<value_type>());
          BOOST_CHECK_EQUAL(boost::math::ibetac_invb(data[i][0], data[i][2], data[i][6]), boost::math::tools::max_value<value_type>());
       }
- else if((1 - data[i][6] > 0.001) && (fabs(data[i][6]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][6] > 0.001)
+ && (fabs(data[i][6]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][6]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::ibetac_inva(data[i][1], data[i][2], data[i][6]);
          BOOST_CHECK_CLOSE(data[i][0], inv, precision);

Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -185,6 +185,19 @@
       << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
 }
 
+#define BOOST_CHECK_CLOSE_EX(a, b, prec, i) \
+ {\
+ unsigned int failures = boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed;\
+ BOOST_CHECK_CLOSE(a, b, prec); \
+ if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\
+ {\
+ std::cerr << "Failure was at row " << i << std::endl;\
+ std::cerr << std::setprecision(35); \
+ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\
+ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\
+ }\
+ }
+
 template <class T>
 void do_test_gamma_2(const T& data, const char* type_name, const char* test_name)
 {
@@ -222,10 +235,12 @@
       //
       if(data[i][5] == 0)
          BOOST_CHECK_EQUAL(boost::math::gamma_p_inv(data[i][0], data[i][5]), value_type(0));
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001)
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::gamma_p_inv(data[i][0], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][1], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][1], inv, precision, i);
       }
       else if(1 == data[i][5])
          BOOST_CHECK_EQUAL(boost::math::gamma_p_inv(data[i][0], data[i][5]), boost::math::tools::max_value<value_type>());
@@ -234,24 +249,24 @@
          // not enough bits in our input to get back to x, but we should be in
          // the same ball park:
          value_type inv = boost::math::gamma_p_inv(data[i][0], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][1], inv, 100000);
+ BOOST_CHECK_CLOSE_EX(data[i][1], inv, 100000, i);
       }
 
       if(data[i][3] == 0)
          BOOST_CHECK_EQUAL(boost::math::gamma_q_inv(data[i][0], data[i][3]), boost::math::tools::max_value<value_type>());
- else if((1 - data[i][3] > 0.001) && (fabs(data[i][3]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][3] > 0.001) && (fabs(data[i][3]) > 2 * boost::math::tools::min_value<value_type>()))
       {
          value_type inv = boost::math::gamma_q_inv(data[i][0], data[i][3]);
- BOOST_CHECK_CLOSE(data[i][1], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][1], inv, precision, i);
       }
       else if(1 == data[i][3])
          BOOST_CHECK_EQUAL(boost::math::gamma_q_inv(data[i][0], data[i][3]), value_type(0));
- else
+ else if(fabs(data[i][3]) > 2 * boost::math::tools::min_value<value_type>())
       {
          // not enough bits in our input to get back to x, but we should be in
          // the same ball park:
          value_type inv = boost::math::gamma_q_inv(data[i][0], data[i][3]);
- BOOST_CHECK_CLOSE(data[i][1], inv, 100);
+ BOOST_CHECK_CLOSE_EX(data[i][1], inv, 100, i);
       }
    }
    std::cout << std::endl;

Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -111,6 +111,19 @@
       << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
 }
 
+#define BOOST_CHECK_CLOSE_EX(a, b, prec, i) \
+ {\
+ unsigned int failures = boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed;\
+ BOOST_CHECK_CLOSE(a, b, prec); \
+ if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\
+ {\
+ std::cerr << "Failure was at row " << i << std::endl;\
+ std::cerr << std::setprecision(35); \
+ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\
+ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\
+ }\
+ }
+
 template <class T>
 void do_test_gamma_2(const T& data, const char* type_name, const char* test_name)
 {
@@ -148,36 +161,38 @@
       //
       if(data[i][5] == 0)
          BOOST_CHECK_EQUAL(boost::math::gamma_p_inva(data[i][1], data[i][5]), boost::math::tools::max_value<value_type>());
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>()))
       {
          value_type inv = boost::math::gamma_p_inva(data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][0], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][0], inv, precision, i);
       }
       else if(1 == data[i][5])
          BOOST_CHECK_EQUAL(boost::math::gamma_p_inva(data[i][1], data[i][5]), boost::math::tools::min_value<value_type>());
- else
+ else if(data[i][3] > 2 * boost::math::tools::min_value<value_type>())
       {
          // not enough bits in our input to get back to x, but we should be in
          // the same ball park:
          value_type inv = boost::math::gamma_p_inva(data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][0], inv, 100);
+ BOOST_CHECK_CLOSE_EX(data[i][0], inv, 100, i);
       }
 
       if(data[i][3] == 0)
          BOOST_CHECK_EQUAL(boost::math::gamma_q_inva(data[i][1], data[i][3]), boost::math::tools::min_value<value_type>());
- else if((1 - data[i][3] > 0.001) && (fabs(data[i][3]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][3] > 0.001)
+ && (fabs(data[i][3]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][3]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = boost::math::gamma_q_inva(data[i][1], data[i][3]);
- BOOST_CHECK_CLOSE(data[i][0], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][0], inv, precision, i);
       }
       else if(1 == data[i][3])
          BOOST_CHECK_EQUAL(boost::math::gamma_q_inva(data[i][1], data[i][3]), boost::math::tools::max_value<value_type>());
- else
+ else if(data[i][3] > 2 * boost::math::tools::min_value<value_type>())
       {
          // not enough bits in our input to get back to x, but we should be in
          // the same ball park:
          value_type inv = boost::math::gamma_q_inva(data[i][1], data[i][3]);
- BOOST_CHECK_CLOSE(data[i][0], inv, 100);
+ BOOST_CHECK_CLOSE_EX(data[i][0], inv, 100, i);
       }
    }
    std::cout << std::endl;

Modified: sandbox/math_toolkit/libs/math/test/test_minima.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_minima.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_minima.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -42,7 +42,9 @@
 {
    test_minima(0.1f, "float");
    test_minima(0.1, "double");
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
    test_minima(0.1L, "long double");
+#endif
    return 0;
 }
 

Modified: sandbox/math_toolkit/libs/math/test/test_normal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_normal.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_normal.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -81,7 +81,7 @@
 void test_spots(RealType)
 {
    // Basic sanity checks
- RealType tolerance = static_cast<RealType>(std::pow(10., -(4-2))); // 1e-4 (as %)
+ RealType tolerance = 1e-2f; // 1e-4 (as %)
    // Some tests only pass at 1e-4 because values generated by
    // http://faculty.vassar.edu/lowry/VassarStats.html
    // give only 5 or 6 *fixed* places, so small values have fewer digits.

Modified: sandbox/math_toolkit/libs/math/test/test_poisson.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_poisson.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_poisson.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -63,7 +63,7 @@
   }
 
    decdigits -= 1; // Perhaps allow some decimal digit(s) margin of numerical error.
- RealType tolerance = static_cast<RealType>(std::pow(10., -(decdigits-2))); // 1e-6 (-2 so as %)
+ RealType tolerance = static_cast<RealType>(std::pow(10., static_cast<double>(2-decdigits))); // 1e-6 (-2 so as %)
    tolerance *= 2; // Allow some bit(s) small margin (2 means + or - 1 bit) of numerical error.
    // Typically 2e-13% = 2e-15 as fraction for double.
 

Modified: sandbox/math_toolkit/libs/math/test/test_policy.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -146,84 +146,6 @@
    BOOST_CHECK((is_same<policy<discrete_quantile<integer_round_up> >::promote_double_type, policy<>::promote_double_type>::value));
    BOOST_CHECK((is_same<policy<discrete_quantile<integer_round_up> >::discrete_quantile_type, discrete_quantile<integer_round_up> >::value));
 
- //
- // Now try again with 2 policies:
- //
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::overflow_error_type, overflow_error<ignore_error> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::precision_type, policy<>::precision_type>::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::promote_float_type, policy<>::promote_float_type>::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::promote_double_type, policy<>::promote_double_type>::value));
- BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
-
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::denorm_error_type, denorm_error<throw_on_error> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::precision_type, policy<>::precision_type>::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::promote_float_type, policy<>::promote_float_type>::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::promote_double_type, policy<>::promote_double_type>::value));
- BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
-
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::denorm_error_type, denorm_error<throw_on_error> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::precision_type, digits2<20> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::promote_float_type, promote_float<false> >::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::promote_double_type, policy<>::promote_double_type>::value));
- BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::discrete_quantile_type, discrete_quantile<integer_round_down> >::value));
-
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::domain_error_type, domain_error<ignore_error> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::denorm_error_type, denorm_error<throw_on_error> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::precision_type, digits2<20> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::promote_float_type, promote_float<false> >::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::promote_double_type, policy<>::promote_double_type>::value));
- BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::discrete_quantile_type, discrete_quantile<integer_round_down> >::value));
-
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::domain_error_type, domain_error<ignore_error> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::denorm_error_type, denorm_error<throw_on_error> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::precision_type, digits2<20> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::promote_float_type, promote_float<false> >::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::promote_double_type, policy<>::promote_double_type>::value));
- BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_round_down>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::discrete_quantile_type, discrete_quantile<integer_round_down> >::value));
-
- BOOST_CHECK(check_same(make_policy(), policy<>()));
- BOOST_CHECK(check_same(make_policy(denorm_error<ignore_error>()), normalise<policy<denorm_error<ignore_error> > >::type()));
- BOOST_CHECK(check_same(make_policy(digits2<20>()), normalise<policy<digits2<20> > >::type()));
- BOOST_CHECK(check_same(make_policy(promote_float<false>()), normalise<policy<promote_float<false> > >::type()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>()), normalise<policy<domain_error<ignore_error> > >::type()));
- BOOST_CHECK(check_same(make_policy(pole_error<ignore_error>()), normalise<policy<pole_error<ignore_error> > >::type()));
-
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>()), policy<domain_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits10<5>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<19> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false> >()));
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>(), promote_double<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false>, promote_double<false> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>(), promote_double<false>(), discrete_quantile<integer_round_down>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false>, promote_double<false>, discrete_quantile<integer_round_down> >()));
-#endif
    return 0;
 } // int test_main(int, char* [])
 

Modified: sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -28,6 +28,15 @@
 #define TEST_POLICY_SF(call)\
    BOOST_CHECK_EQUAL(boost::math::call , test::call)
 
+//
+// Prevent some macro conflicts just in case:
+//
+#undef fpclassify
+#undef isnormal
+#undef isinf
+#undef isfinite
+#undef isnan
+
 int test_main(int, char* [])
 {
    int i;

Modified: sandbox/math_toolkit/libs/math/test/test_roots.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_roots.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_roots.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -5,10 +5,25 @@
 
 #include <boost/test/included/test_exec_monitor.hpp>
 #include <boost/test/floating_point_comparison.hpp>
+#include <boost/test/results_collector.hpp>
 #include <boost/math/special_functions/beta.hpp>
 #include <boost/math/tools/roots.hpp>
 #include <boost/array.hpp>
 
+#define BOOST_CHECK_CLOSE_EX(a, b, prec, i) \
+ {\
+ unsigned int failures = boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed;\
+ BOOST_CHECK_CLOSE(a, b, prec); \
+ if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\
+ {\
+ std::cerr << "Failure was at row " << i << std::endl;\
+ std::cerr << std::setprecision(35); \
+ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\
+ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\
+ }\
+ }
+
+
 //
 // Implement various versions of inverse of the incomplete beta
 // using different root finding algorithms, and deliberately "bad"
@@ -244,16 +259,18 @@
          BOOST_CHECK_EQUAL(inverse_ibeta_newton(data[i][0], data[i][1], data[i][5]), value_type(0));
          BOOST_CHECK_EQUAL(inverse_ibeta_bisect(data[i][0], data[i][1], data[i][5]), value_type(0));
       }
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001)
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>())
+ && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<double>()))
       {
          value_type inv = inverse_ibeta_halley(data[i][0], data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][2], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][2], inv, precision, i);
          inv = inverse_ibeta_schroeder(data[i][0], data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][2], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][2], inv, precision, i);
          inv = inverse_ibeta_newton(data[i][0], data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][2], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][2], inv, precision, i);
          inv = inverse_ibeta_bisect(data[i][0], data[i][1], data[i][5]);
- BOOST_CHECK_CLOSE(data[i][2], inv, precision);
+ BOOST_CHECK_CLOSE_EX(data[i][2], inv, precision, i);
       }
       else if(1 == data[i][5])
       {

Modified: sandbox/math_toolkit/libs/math/test/test_students_t.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_students_t.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_students_t.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -54,7 +54,7 @@
 void test_spots(RealType)
 {
   // Basic sanity checks
- RealType tolerance = static_cast<RealType>(std::pow(10., -(6-2))); // 1e-6 (as %)
+ RealType tolerance = 1e-4; // 1e-6 (as %)
    // Some tests only pass at 1e-5 because probability value is less accurate,
    // a digit in 6th decimal place, although calculated using
    // a t-distribution generator (claimed 6 decimal digits) at

Modified: sandbox/math_toolkit/libs/math/test/test_triangular.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_triangular.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_triangular.cpp 2007-11-14 07:11:23 EST (Wed, 14 Nov 2007)
@@ -486,7 +486,7 @@
     triangular_distribution<RealType, inf_policy> tridef_inf(-1, 0., 1);
     // But can't use BOOST_CHECK_EQUAL(?, quiet_NaN)
     using boost::math::isnan;
- BOOST_CHECK(isnan(pdf(tridef_inf, std::numeric_limits<RealType>::infinity())));
+ BOOST_CHECK((isnan)(pdf(tridef_inf, std::numeric_limits<RealType>::infinity())));
   } // test for infinity using std::numeric_limits<>::infinity()
   else
   { // real_concept case, does has_infinfity == false, so can't check it throws.


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