Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51457 - in sandbox/math_toolkit: boost/math boost/math/bindings boost/math/concepts boost/math/distributions boost/math/policies boost/math/special_functions boost/math/special_functions/detail boost/math/tools libs/math libs/math/build libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/distributions libs/math/doc/sf_and_dist/equations libs/math/doc/sf_and_dist/graphs libs/math/minimax libs/math/test libs/math/test/compile_test
From: john_at_[hidden]
Date: 2009-02-26 12:57:36


Author: johnmaddock
Date: 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
New Revision: 51457
URL: http://svn.boost.org/trac/boost/changeset/51457

Log:
Merged changes from Trunk: mostly platform and compiler specific workarounds.
Added:
   sandbox/math_toolkit/boost/math/special_functions/detail/fp_traits.hpp
      - copied unchanged from r51331, /trunk/boost/math/special_functions/detail/fp_traits.hpp
   sandbox/math_toolkit/libs/math/CMakeLists.txt
      - copied unchanged from r51431, /trunk/libs/math/CMakeLists.txt
   sandbox/math_toolkit/libs/math/build/has_long_double_support.cpp
      - copied unchanged from r51431, /trunk/libs/math/build/has_long_double_support.cpp
   sandbox/math_toolkit/libs/math/module.cmake
      - copied unchanged from r51431, /trunk/libs/math/module.cmake
   sandbox/math_toolkit/libs/math/test/CMakeLists.txt
      - copied unchanged from r51431, /trunk/libs/math/test/CMakeLists.txt
   sandbox/math_toolkit/libs/math/test/test_policy_3.cpp
      - copied unchanged from r51431, /trunk/libs/math/test/test_policy_3.cpp
   sandbox/math_toolkit/libs/math/test/test_policy_4.cpp
      - copied unchanged from r51431, /trunk/libs/math/test/test_policy_4.cpp
   sandbox/math_toolkit/libs/math/test/test_policy_5.cpp
      - copied unchanged from r51431, /trunk/libs/math/test/test_policy_5.cpp
   sandbox/math_toolkit/libs/math/test/test_policy_6.cpp
      - copied unchanged from r51431, /trunk/libs/math/test/test_policy_6.cpp
   sandbox/math_toolkit/libs/math/test/test_policy_7.cpp
      - copied unchanged from r51431, /trunk/libs/math/test/test_policy_7.cpp
Properties modified:
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/equations/generate.sh (props changed)
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/generate.sh (props changed)
   sandbox/math_toolkit/libs/math/test/compile_test/generate.sh (props changed)
Text files modified:
   sandbox/math_toolkit/boost/math/bindings/rr.hpp | 8
   sandbox/math_toolkit/boost/math/concepts/real_concept.hpp | 34 +
   sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp | 31 +
   sandbox/math_toolkit/boost/math/distributions/non_central_f.hpp | 5
   sandbox/math_toolkit/boost/math/policies/policy.hpp | 19
   sandbox/math_toolkit/boost/math/special_functions.hpp | 1
   sandbox/math_toolkit/boost/math/special_functions/acosh.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/asinh.hpp | 6
   sandbox/math_toolkit/boost/math/special_functions/atanh.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/bessel.hpp | 23 +
   sandbox/math_toolkit/boost/math/special_functions/beta.hpp | 74 +++++
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jn.hpp | 23 +
   sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp | 31 ++
   sandbox/math_toolkit/boost/math/special_functions/detail/round_fwd.hpp | 12
   sandbox/math_toolkit/boost/math/special_functions/detail/t_distribution_inv.hpp | 1
   sandbox/math_toolkit/boost/math/special_functions/ellint_1.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/ellint_2.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/ellint_3.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/ellint_rj.hpp | 1
   sandbox/math_toolkit/boost/math/special_functions/expint.hpp | 11
   sandbox/math_toolkit/boost/math/special_functions/expm1.hpp | 45 ++
   sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp | 522 ++++++++++++++++++++++++++++++---------
   sandbox/math_toolkit/boost/math/special_functions/gamma.hpp | 12
   sandbox/math_toolkit/boost/math/special_functions/lanczos.hpp | 156 +++++-----
   sandbox/math_toolkit/boost/math/special_functions/log1p.hpp | 12
   sandbox/math_toolkit/boost/math/special_functions/math_fwd.hpp | 20
   sandbox/math_toolkit/boost/math/special_functions/modf.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/next.hpp | 1
   sandbox/math_toolkit/boost/math/special_functions/round.hpp | 10
   sandbox/math_toolkit/boost/math/special_functions/sinc.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/trunc.hpp | 10
   sandbox/math_toolkit/boost/math/tools/config.hpp | 33 ++
   sandbox/math_toolkit/boost/math/tools/roots.hpp | 18
   sandbox/math_toolkit/boost/math/tr1.hpp | 32 +-
   sandbox/math_toolkit/libs/math/build/Jamfile.v2 | 29 +
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/Jamfile.v2 | 1
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/c99_ref.qbk | 30 +-
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/credits.qbk | 3
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/gamma.qbk | 2
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/implementation.qbk | 6
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk | 16
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk | 8
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk | 59 ++--
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1_ref.qbk | 18
   sandbox/math_toolkit/libs/math/minimax/f.cpp | 2
   sandbox/math_toolkit/libs/math/test/Jamfile.v2 | 337 +++++++++++++++++++-----
   sandbox/math_toolkit/libs/math/test/acosh_data.ipp | 7
   sandbox/math_toolkit/libs/math/test/asinh_data.ipp | 7
   sandbox/math_toolkit/libs/math/test/atanh_data.ipp | 7
   sandbox/math_toolkit/libs/math/test/compile_test/dist_find_location_incl_test.cpp | 51 +++
   sandbox/math_toolkit/libs/math/test/compile_test/dist_find_scale_incl_test.cpp | 52 +++
   sandbox/math_toolkit/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp | 25 +
   sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp | 4
   sandbox/math_toolkit/libs/math/test/compile_test/sf_next_incl_test.cpp | 6
   sandbox/math_toolkit/libs/math/test/compile_test/std_real_concept_check.cpp | 5
   sandbox/math_toolkit/libs/math/test/compile_test/test_compile_result.hpp | 22 +
   sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp | 9
   sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp | 4
   sandbox/math_toolkit/libs/math/test/test_binomial.cpp | 54 ++-
   sandbox/math_toolkit/libs/math/test/test_classify.cpp | 37 ++
   sandbox/math_toolkit/libs/math/test/test_constants.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_expint.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_ibeta.cpp | 8
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp | 8
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp | 9
   sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp | 1
   sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp | 16 +
   sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp | 5
   sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_poisson.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_policy_2.cpp | 70 -----
   sandbox/math_toolkit/libs/math/test/test_tr1.cpp | 10
   73 files changed, 1528 insertions(+), 597 deletions(-)

Modified: sandbox/math_toolkit/boost/math/bindings/rr.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/bindings/rr.hpp (original)
+++ sandbox/math_toolkit/boost/math/bindings/rr.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -80,11 +80,11 @@
       assign_large_int(c);
    }
 #ifdef BOOST_HAS_LONG_LONG
- RR(unsigned long long c)
+ RR(boost::ulong_long_type c)
    {
       assign_large_int(c);
    }
- RR(long long c)
+ RR(boost::long_long_type c)
    {
       assign_large_int(c);
    }
@@ -116,8 +116,8 @@
    RR& operator=(long c) { assign_large_int(c); return *this; }
    RR& operator=(unsigned long c) { assign_large_int(c); return *this; }
 #ifdef BOOST_HAS_LONG_LONG
- RR& operator=(long long c) { assign_large_int(c); return *this; }
- RR& operator=(unsigned long long c) { assign_large_int(c); return *this; }
+ RR& operator=(boost::long_long_type c) { assign_large_int(c); return *this; }
+ RR& operator=(boost::ulong_long_type c) { assign_large_int(c); return *this; }
 #endif
    RR& operator=(float c) { m_value = c; return *this; }
    RR& operator=(double c) { m_value = c; return *this; }

Modified: sandbox/math_toolkit/boost/math/concepts/real_concept.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/concepts/real_concept.hpp (original)
+++ sandbox/math_toolkit/boost/math/concepts/real_concept.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -20,6 +20,9 @@
 // but note minor additions are needed - see ntl.diff and documentation
 // "Using With NTL - a High-Precision Floating-Point Library".
 
+#ifndef BOOST_MATH_REAL_CONCEPT_HPP
+#define BOOST_MATH_REAL_CONCEPT_HPP
+
 #include <boost/config.hpp>
 #include <boost/limits.hpp>
 #include <boost/math/special_functions/round.hpp>
@@ -35,8 +38,9 @@
 #include <boost/config/no_tr1/cmath.hpp>
 #include <math.h> // fmodl
 
-#ifndef BOOST_MATH_REAL_CONCEPT_HPP
-#define BOOST_MATH_REAL_CONCEPT_HPP
+#if defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__)
+# include <cstdio>
+#endif
 
 namespace boost{ namespace math{
 
@@ -70,8 +74,8 @@
    real_concept(unsigned long long c) : m_value(static_cast<real_concept_base_type>(c)){}
    real_concept(long long c) : m_value(static_cast<real_concept_base_type>(c)){}
 #elif defined(BOOST_HAS_LONG_LONG)
- real_concept(unsigned long long c) : m_value(static_cast<real_concept_base_type>(c)){}
- real_concept(long long c) : m_value(static_cast<real_concept_base_type>(c)){}
+ real_concept(boost::ulong_long_type c) : m_value(static_cast<real_concept_base_type>(c)){}
+ real_concept(boost::long_long_type c) : m_value(static_cast<real_concept_base_type>(c)){}
 #elif defined(BOOST_HAS_MS_INT64)
    real_concept(unsigned __int64 c) : m_value(static_cast<real_concept_base_type>(c)){}
    real_concept(__int64 c) : m_value(static_cast<real_concept_base_type>(c)){}
@@ -94,8 +98,8 @@
    real_concept& operator=(long c) { m_value = c; return *this; }
    real_concept& operator=(unsigned long c) { m_value = c; return *this; }
 #ifdef BOOST_HAS_LONG_LONG
- real_concept& operator=(long long c) { m_value = static_cast<real_concept_base_type>(c); return *this; }
- real_concept& operator=(unsigned long long c) { m_value = static_cast<real_concept_base_type>(c); return *this; }
+ real_concept& operator=(boost::long_long_type c) { m_value = static_cast<real_concept_base_type>(c); return *this; }
+ real_concept& operator=(boost::ulong_long_type c) { m_value = static_cast<real_concept_base_type>(c); return *this; }
 #endif
    real_concept& operator=(float c) { m_value = c; return *this; }
    real_concept& operator=(double c) { m_value = c; return *this; }
@@ -256,9 +260,9 @@
 
 #ifdef BOOST_HAS_LONG_LONG
 template <class Policy>
-inline long long llround(const concepts::real_concept& v, const Policy& pol)
+inline boost::long_long_type llround(const concepts::real_concept& v, const Policy& pol)
 { return boost::math::llround(v.value(), pol); }
-inline long long llround(const concepts::real_concept& v)
+inline boost::long_long_type llround(const concepts::real_concept& v)
 { return boost::math::llround(v.value(), policies::policy<>()); }
 #endif
 
@@ -275,9 +279,9 @@
 
 #ifdef BOOST_HAS_LONG_LONG
 template <class Policy>
-inline long long lltrunc(const concepts::real_concept& v, const Policy& pol)
+inline boost::long_long_type lltrunc(const concepts::real_concept& v, const Policy& pol)
 { return boost::math::lltrunc(v.value(), pol); }
-inline long long lltrunc(const concepts::real_concept& v)
+inline boost::long_long_type lltrunc(const concepts::real_concept& v)
 { return boost::math::lltrunc(v.value(), policies::policy<>()); }
 #endif
 
@@ -419,6 +423,16 @@
 
 #endif
 
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+//
+// For some strange reason ADL sometimes fails to find the
+// correct overloads, unless we bring these declarations into scope:
+//
+using concepts::itrunc;
+using concepts::iround;
+
+#endif
+
 } // namespace math
 } // namespace boost
 

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -61,8 +61,8 @@
    std_real_concept(unsigned long long c) : m_value(static_cast<std_real_concept_base_type>(c)){}
    std_real_concept(long long c) : m_value(static_cast<std_real_concept_base_type>(c)){}
 #elif defined(BOOST_HAS_LONG_LONG)
- std_real_concept(unsigned long long c) : m_value(static_cast<std_real_concept_base_type>(c)){}
- std_real_concept(long long c) : m_value(static_cast<std_real_concept_base_type>(c)){}
+ std_real_concept(boost::ulong_long_type c) : m_value(static_cast<std_real_concept_base_type>(c)){}
+ std_real_concept(boost::long_long_type c) : m_value(static_cast<std_real_concept_base_type>(c)){}
 #endif
    std_real_concept(float c) : m_value(c){}
    std_real_concept(double c) : m_value(c){}
@@ -85,8 +85,8 @@
    std_real_concept& operator=(unsigned long long c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
    std_real_concept& operator=(long long c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
 #elif defined(BOOST_HAS_LONG_LONG)
- std_real_concept& operator=(long long c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
- std_real_concept& operator=(unsigned long long c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
+ std_real_concept& operator=(boost::long_long_type c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
+ std_real_concept& operator=(boost::ulong_long_type c) { m_value = static_cast<std_real_concept_base_type>(c); return *this; }
 #endif
    std_real_concept& operator=(float c) { m_value = c; return *this; }
    std_real_concept& operator=(double c) { m_value = c; return *this; }
@@ -259,11 +259,11 @@
 #ifdef BOOST_HAS_LONG_LONG
 
 template <class Policy>
-inline long long llround(const concepts::std_real_concept& v, const Policy& pol)
+inline boost::long_long_type llround(const concepts::std_real_concept& v, const Policy& pol)
 {
    return boost::math::llround(v.value(), pol);
 }
-inline long long llround(const concepts::std_real_concept& v)
+inline boost::long_long_type llround(const concepts::std_real_concept& v)
 {
    return boost::math::llround(v.value(), policies::policy<>());
 }
@@ -293,11 +293,11 @@
 #ifdef BOOST_HAS_LONG_LONG
 
 template <class Policy>
-inline long long lltrunc(const concepts::std_real_concept& v, const Policy& pol)
+inline boost::long_long_type lltrunc(const concepts::std_real_concept& v, const Policy& pol)
 {
    return boost::math::lltrunc(v.value(), pol);
 }
-inline long long lltrunc(const concepts::std_real_concept& v)
+inline boost::long_long_type lltrunc(const concepts::std_real_concept& v)
 {
    return boost::math::lltrunc(v.value(), policies::policy<>());
 }
@@ -320,7 +320,11 @@
 }
 
 } // namespace concepts
+}}
+
+#include <boost/math/tools/precision.hpp>
 
+namespace boost{ namespace math{
 namespace tools
 {
 
@@ -363,9 +367,20 @@
 
 } // namespace tools
 
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+using concepts::itrunc;
+using concepts::ltrunc;
+using concepts::lltrunc;
+using concepts::iround;
+using concepts::lround;
+using concepts::llround;
+#endif
+
 } // namespace math
 } // namespace boost
 
 #endif // BOOST_MATH_STD_REAL_CONCEPT_HPP
 
 
+
+

Modified: sandbox/math_toolkit/boost/math/distributions/non_central_f.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/non_central_f.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/non_central_f.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -12,6 +12,7 @@
 
 #include <boost/math/distributions/non_central_beta.hpp>
 #include <boost/math/distributions/detail/generic_mode.hpp>
+#include <boost/math/special_functions/pow.hpp>
 
 namespace boost
 {
@@ -253,8 +254,8 @@
             + 4 * (10 + m) * (-2 + m + n) * l3
             + (10 + m) * l4))
             /
- ((-8 + m) * (-6 + m) * pow(n * (-2 + m + n)
- + 2 * (-2 + m + n) * l + l2, 2));
+ ((-8 + m) * (-6 + m) * boost::math::pow<2>(n * (-2 + m + n)
+ + 2 * (-2 + m + n) * l + l2));
             return result;
       } // kurtosis_excess
 

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -33,7 +33,7 @@
 namespace tools{
 
 template <class T>
-int digits(BOOST_EXPLICIT_TEMPLATE_TYPE(T));
+int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
 
 }
 
@@ -92,7 +92,8 @@
 #define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
 #endif
 
-#if !defined(__BORLANDC__)
+#if !defined(__BORLANDC__) \
+ && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
 #define BOOST_MATH_META_INT(type, name, Default)\
    template <type N = Default> struct name : public boost::mpl::int_<N>{};\
    namespace detail{\
@@ -106,7 +107,7 @@
       BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
    };\
    }\
- template <class T> struct is_##name : public boost::mpl::bool_<detail::is_##name##_imp<T>::value>{};
+ template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
 
 #define BOOST_MATH_META_BOOL(name, Default)\
    template <bool N = Default> struct name : public boost::mpl::bool_<N>{};\
@@ -121,7 +122,7 @@
       BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
    };\
    }\
- template <class T> struct is_##name : public boost::mpl::bool_<detail::is_##name##_imp<T>::value>{};
+ template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
 #else
 #define BOOST_MATH_META_INT(Type, name, Default)\
    template <Type N = Default> struct name : public boost::mpl::int_<N>{};\
@@ -137,10 +138,10 @@
    template <class T> struct is_##name##_imp\
    {\
       static T inst;\
- BOOST_STATIC_CONSTANT(bool, value = sizeof(detail::is_##name##_tester<T>::test(inst)) == 1);\
+ BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
    };\
    }\
- template <class T> struct is_##name : public boost::mpl::bool_<detail::is_##name##_imp<T>::value>\
+ template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
    {\
       template <class U> struct apply{ typedef is_##name<U> type; };\
    };
@@ -159,10 +160,10 @@
    template <class T> struct is_##name##_imp\
    {\
       static T inst;\
- BOOST_STATIC_CONSTANT(bool, value = sizeof(detail::is_##name##_tester<T>::test(inst)) == 1);\
+ BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
    };\
    }\
- template <class T> struct is_##name : public boost::mpl::bool_<detail::is_##name##_imp<T>::value>\
+ template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
    {\
       template <class U> struct apply{ typedef is_##name<U> type; };\
    };
@@ -831,7 +832,7 @@
 } // namespace detail
 
 template <class T, class Policy>
-inline int digits()
+inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
 {
    typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
    return detail::digits_imp<T, Policy>(tag_type());

Modified: sandbox/math_toolkit/boost/math/special_functions.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -54,5 +54,6 @@
 #include <boost/math/special_functions/round.hpp>
 #include <boost/math/special_functions/trunc.hpp>
 #include <boost/math/special_functions/pow.hpp>
+#include <boost/math/special_functions/next.hpp>
 
 #endif // BOOST_MATH_SPECIAL_FUNCTIONS_HPP

Modified: sandbox/math_toolkit/boost/math/special_functions/acosh.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/acosh.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/acosh.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -86,7 +86,7 @@
        }
 
         template<typename T, typename Policy>
- inline typename tools::promote_args<T>::type acosh(const T x, const Policy&)
+ inline typename tools::promote_args<T>::type acosh(T x, const Policy&)
         {
             typedef typename tools::promote_args<T>::type result_type;
             typedef typename policies::evaluation<result_type, Policy>::type value_type;
@@ -101,7 +101,7 @@
               "boost::math::acosh<%1%>(%1%)");
         }
         template<typename T>
- inline typename tools::promote_args<T>::type acosh(const T x)
+ inline typename tools::promote_args<T>::type acosh(T x)
         {
            return boost::math::acosh(x, policies::policy<>());
         }

Modified: sandbox/math_toolkit/boost/math/special_functions/asinh.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/asinh.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/asinh.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -57,7 +57,7 @@
                 else if(x < 0.5f)
                 {
                    // As below, but rearranged to preserve digits:
- return boost::math::log1p(x + sqrt1pm1(x * x, pol), pol);
+ return boost::math::log1p(x + boost::math::sqrt1pm1(x * x, pol), pol);
                 }
                 else
                 {
@@ -89,12 +89,12 @@
        }
 
         template<typename T>
- inline typename tools::promote_args<T>::type asinh(const T x)
+ inline typename tools::promote_args<T>::type asinh(T x)
         {
            return boost::math::asinh(x, policies::policy<>());
         }
         template<typename T, typename Policy>
- inline typename tools::promote_args<T>::type asinh(const T x, const Policy&)
+ inline typename tools::promote_args<T>::type asinh(T x, const Policy&)
         {
             typedef typename tools::promote_args<T>::type result_type;
             typedef typename policies::evaluation<result_type, Policy>::type value_type;

Modified: sandbox/math_toolkit/boost/math/special_functions/atanh.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/atanh.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/atanh.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -99,7 +99,7 @@
        }
 
         template<typename T, typename Policy>
- inline typename tools::promote_args<T>::type atanh(const T x, const Policy&)
+ inline typename tools::promote_args<T>::type atanh(T x, const Policy&)
         {
             typedef typename tools::promote_args<T>::type result_type;
             typedef typename policies::evaluation<result_type, Policy>::type value_type;
@@ -114,7 +114,7 @@
               "boost::math::atanh<%1%>(%1%)");
         }
         template<typename T>
- inline typename tools::promote_args<T>::type atanh(const T x)
+ inline typename tools::promote_args<T>::type atanh(T x)
         {
            return boost::math::atanh(x, policies::policy<>());
         }

Modified: sandbox/math_toolkit/boost/math/special_functions/bessel.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/bessel.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/bessel.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -307,6 +307,10 @@
 inline T cyl_neumann_imp(T v, T x, const bessel_no_int_tag&, const Policy& pol)
 {
    static const char* function = "boost::math::cyl_neumann<%1%>(%1%,%1%)";
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(v);
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
    if(x <= 0)
    {
       return (v == 0) && (x == 0) ?
@@ -332,6 +336,10 @@
 {
    BOOST_MATH_STD_USING
    typedef typename bessel_asymptotic_tag<T, Policy>::type tag_type;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(v);
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
    if(floor(v) == v)
    {
       if((fabs(x) > asymptotic_bessel_y_limit<T>(tag_type())) && (fabs(x) > 5 * abs(v)))
@@ -339,12 +347,19 @@
          T r = asymptotic_bessel_y_large_x_2(static_cast<T>(abs(v)), x);
          if((v < 0) && (itrunc(v, pol) & 1))
             r = -r;
+ BOOST_MATH_INSTRUMENT_VARIABLE(r);
          return r;
       }
       else
- return bessel_yn(itrunc(v, pol), x, pol);
+ {
+ T r = bessel_yn(itrunc(v, pol), x, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(r);
+ return r;
+ }
    }
- return cyl_neumann_imp<T>(v, x, bessel_no_int_tag(), pol);
+ T r = cyl_neumann_imp<T>(v, x, bessel_no_int_tag(), pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(r);
+ return r;
 }
 
 template <class T, class Policy>
@@ -352,6 +367,10 @@
 {
    BOOST_MATH_STD_USING
    typedef typename bessel_asymptotic_tag<T, Policy>::type tag_type;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(v);
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
    if((fabs(x) > asymptotic_bessel_y_limit<T>(tag_type())) && (fabs(x) > 5 * abs(v)))
    {
       T r = asymptotic_bessel_y_large_x_2(static_cast<T>(abs(v)), x);

Modified: sandbox/math_toolkit/boost/math/special_functions/beta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/beta.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/beta.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -242,13 +242,25 @@
          // since one of the power terms will evaluate to a number close to 1.
          //
          if(fabs(l1) < 0.1)
+ {
             result *= exp(a * boost::math::log1p(l1, pol));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
          else
+ {
             result *= pow((x * cgh) / agh, a);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
          if(fabs(l2) < 0.1)
+ {
             result *= exp(b * boost::math::log1p(l2, pol));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
          else
+ {
             result *= pow((y * cgh) / bgh, b);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
       }
       else if((std::max)(fabs(l1), fabs(l2)) < 0.5)
       {
@@ -279,6 +291,7 @@
             l3 = l1 + l3 + l3 * l1;
             l3 = a * boost::math::log1p(l3, pol);
             result *= exp(l3);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
          }
          else
          {
@@ -286,6 +299,7 @@
             l3 = l2 + l3 + l3 * l2;
             l3 = b * boost::math::log1p(l3, pol);
             result *= exp(l3);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
          }
       }
       else if(fabs(l1) < fabs(l2))
@@ -294,6 +308,7 @@
          T l = a * boost::math::log1p(l1, pol)
             + b * log((y * cgh) / bgh);
          result *= exp(l);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else
       {
@@ -301,6 +316,7 @@
          T l = b * boost::math::log1p(l2, pol)
             + a * log((x * cgh) / agh);
          result *= exp(l);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
    }
    else
@@ -321,11 +337,13 @@
             result *= pow(pow(b2, b/a) * b1, a);
          else
             result *= pow(pow(b1, a/b) * b2, b);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else
       {
          // finally the normal case:
          result *= pow(b1, a) * pow(b2, b);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
    }
    // combine with the leftover terms from the Lanczos approximation:
@@ -333,6 +351,8 @@
    result *= sqrt(agh / cgh);
    result *= prefix;
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+
    return result;
 }
 //
@@ -624,6 +644,9 @@
 T ibeta_a_step(T a, T b, T x, T y, int k, const Policy& pol, bool normalised, T* p_derivative)
 {
    typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(k);
+
    T prefix = ibeta_power_terms(a, b, x, y, lanczos_type(), normalised, pol);
    if(p_derivative)
    {
@@ -662,6 +685,7 @@
    // This is only called with small k, for large k
    // it is grossly inefficient, do not use outside it's
    // intended purpose!!!
+ BOOST_MATH_INSTRUMENT_VARIABLE(k);
    if(k == 0)
       return 1;
    T result = 1;
@@ -845,6 +869,12 @@
    typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
    BOOST_MATH_STD_USING // for ADL of std math functions.
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(a);
+ BOOST_MATH_INSTRUMENT_VARIABLE(b);
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+ BOOST_MATH_INSTRUMENT_VARIABLE(inv);
+ BOOST_MATH_INSTRUMENT_VARIABLE(normalised);
+
    bool invert = inv;
    T fract;
    T y = 1 - x;
@@ -894,6 +924,7 @@
          std::swap(a, b);
          std::swap(x, y);
          invert = !invert;
+ BOOST_MATH_INSTRUMENT_VARIABLE(invert);
       }
       if((std::max)(a, b) <= 1)
       {
@@ -901,12 +932,16 @@
          if((a >= (std::min)(T(0.2), b)) || (pow(x, a) <= 0.9))
          {
             if(!invert)
+ {
                fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
             else
             {
                fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                invert = false;
                fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
             }
          }
          else
@@ -917,12 +952,16 @@
             if(y >= 0.3)
             {
                if(!invert)
+ {
                   fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
                else
                {
                   fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                   invert = false;
                   fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                }
             }
             else
@@ -939,12 +978,16 @@
                }
                fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative);
                if(!invert)
+ {
                   fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
                else
                {
                   fract -= (normalised ? 1 : boost::math::beta(a, b, pol));
                   invert = false;
                   fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                }
             }
          }
@@ -955,12 +998,16 @@
          if((b <= 1) || ((x < 0.1) && (pow(b * x, a) <= 0.7)))
          {
             if(!invert)
+ {
                fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
             else
             {
                fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                invert = false;
                fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
             }
          }
          else
@@ -972,23 +1019,31 @@
             if(y >= 0.3)
             {
                if(!invert)
+ {
                   fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
                else
                {
                   fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                   invert = false;
                   fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                }
             }
             else if(a >= 15)
             {
                if(!invert)
+ {
                   fract = beta_small_b_large_a_series(a, b, x, y, T(0), T(1), pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
                else
                {
                   fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                   invert = false;
                   fract = -beta_small_b_large_a_series(a, b, x, y, fract, T(1), pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                }
             }
             else
@@ -1004,13 +1059,18 @@
                   prefix = 1;
                }
                fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                if(!invert)
+ {
                   fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
                else
                {
                   fract -= (normalised ? 1 : boost::math::beta(a, b, pol));
                   invert = false;
                   fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
                }
             }
          }
@@ -1033,6 +1093,7 @@
          std::swap(a, b);
          std::swap(x, y);
          invert = !invert;
+ BOOST_MATH_INSTRUMENT_VARIABLE(invert);
       }
       
       if(b < 40)
@@ -1045,16 +1106,21 @@
             fract = binomial_ccdf(n, k, x, y);
             if(!normalised)
                fract *= boost::math::beta(a, b, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
          }
          else if(b * x <= 0.7)
          {
             if(!invert)
+ {
                fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
             else
             {
                fract = -(normalised ? 1 : boost::math::beta(a, b, pol));
                invert = false;
                fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
             }
          }
          else if(a > 15)
@@ -1076,6 +1142,7 @@
             fract = ibeta_a_step(bbar, a, y, x, n, pol, normalised, static_cast<T*>(0));
             fract = beta_small_b_large_a_series(a, bbar, x, y, fract, T(1), pol, normalised);
             fract /= prefix;
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
          }
          else if(normalised)
          {
@@ -1100,12 +1167,19 @@
                fract = -fract;
                invert = false;
             }
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
          }
          else
+ {
             fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
       }
       else
+ {
          fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fract);
+ }
    }
    if(p_derivative)
    {

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jn.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jn.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jn.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -28,14 +28,9 @@
 
     BOOST_MATH_STD_USING
 
- if (n == 0)
- {
- return bessel_j0(x);
- }
- if (n == 1)
- {
- return bessel_j1(x);
- }
+ //
+ // Reflection has to come first:
+ //
     if (n < 0)
     {
         factor = (n & 0x1) ? -1 : 1; // J_{-n}(z) = (-1)^n J_n(z)
@@ -45,12 +40,24 @@
     {
         factor = 1;
     }
+ //
+ // Special cases:
+ //
+ if (n == 0)
+ {
+ return factor * bessel_j0(x);
+ }
+ if (n == 1)
+ {
+ return factor * bessel_j1(x);
+ }
 
     if (x == 0) // n >= 2
     {
         return static_cast<T>(0);
     }
 
+ BOOST_ASSERT(n > 1);
     if (n < abs(x)) // forward recurrence
     {
         prev = bessel_j0(x);

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -109,11 +109,16 @@
    T result;
 
    if(a == 1)
+ {
       result = -log(q);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
    else if(a < 1)
    {
       T g = boost::math::tgamma(a, pol);
       T b = q * g;
+ BOOST_MATH_INSTRUMENT_VARIABLE(g);
+ BOOST_MATH_INSTRUMENT_VARIABLE(b);
       if((b > 0.6) || ((b >= 0.45) && (a >= 0.3)))
       {
          // DiDonato & Morris Eq 21:
@@ -127,12 +132,15 @@
          if((b * q > 1e-8) && (q > 1e-5))
          {
             u = pow(p * g * a, 1 / a);
+ BOOST_MATH_INSTRUMENT_VARIABLE(u);
          }
          else
          {
             u = exp((-q / a) - constants::euler<T>());
+ BOOST_MATH_INSTRUMENT_VARIABLE(u);
          }
          result = u / (1 - (u / (a + 1)));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else if((a < 0.3) && (b >= 0.35))
       {
@@ -140,6 +148,7 @@
          T t = exp(-constants::euler<T>() - b);
          T u = t * exp(t);
          result = t * exp(u);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else if((b > 0.15) || (a >= 0.3))
       {
@@ -147,6 +156,7 @@
          T y = -log(b);
          T u = y - (1 - a) * log(y);
          result = y - (1 - a) * log(u) - log(1 + (1 - a) / (1 + u));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else if (b > 0.1)
       {
@@ -154,6 +164,7 @@
          T y = -log(b);
          T u = y - (1 - a) * log(y);
          result = y - (1 - a) * log(u) - log((u * u + 2 * (3 - a) * u + (2 - a) * (3 - a)) / (u * u + (5 - a) * u + 2));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else
       {
@@ -179,6 +190,7 @@
          T y_3 = y_2 * y;
          T y_4 = y_2 * y_2;
          result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
    }
    else
@@ -186,26 +198,34 @@
       // DiDonato and Morris Eq 31:
       T s = find_inverse_s(p, q);
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(s);
+
       T s_2 = s * s;
       T s_3 = s_2 * s;
       T s_4 = s_2 * s_2;
       T s_5 = s_4 * s;
       T ra = sqrt(a);
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(ra);
+
       T w = a + s * ra + (s * s -1) / 3;
       w += (s_3 - 7 * s) / (36 * ra);
       w -= (3 * s_4 + 7 * s_2 - 16) / (810 * a);
       w += (9 * s_5 + 256 * s_3 - 433 * s) / (38880 * a * ra);
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(w);
+
       if((a >= 500) && (fabs(1 - w / a) < 1e-6))
       {
          result = w;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
       }
       else if (p > 0.5)
       {
          if(w < 3 * a)
          {
             result = w;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
          }
          else
          {
@@ -236,12 +256,14 @@
                T y_3 = y_2 * y;
                T y_4 = y_2 * y_2;
                result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
             }
             else
             {
                // DiDonato and Morris Eq 33:
                T u = -lb + (a - 1) * log(w) - log(1 + (1 - a) / (1 + w));
                result = -lb + (a - 1) * log(u) - log(1 + (1 - a) / (1 + u));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
             }
          }
       }
@@ -253,9 +275,12 @@
          z = didonato_FN(p, a, z, 2, T(0), pol);
          z = didonato_FN(p, a, z, 3, T(0), pol);
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(z);
+
          if((z <= 0.01 * (a + 1)) || (z > 0.7 * (a + 1)))
          {
             result = z;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
          }
          else
          {
@@ -263,6 +288,7 @@
             T zb = didonato_FN(p, a, z, 100, T(1e-4), pol);
             T u = log(p) + boost::math::lgamma(a + 1, pol);
             result = zb * (1 - (a * log(zb) - zb - u + log(didonato_SN(a, z, 100, T(1e-4)))) / (a - zb));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
          }
       }
    }
@@ -349,6 +375,9 @@
 
    static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)";
 
+ BOOST_MATH_INSTRUMENT_VARIABLE(a);
+ BOOST_MATH_INSTRUMENT_VARIABLE(p);
+
    if(a <= 0)
       policies::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
    if((p < 0) || (p > 1))
@@ -361,6 +390,7 @@
    T lower = tools::min_value<T>();
    if(guess <= lower)
       guess = tools::min_value<T>();
+ BOOST_MATH_INSTRUMENT_VARIABLE(guess);
    //
    // Work out how many digits to converge to, normally this is
    // 2/3 of the digits in T, but if the first derivative is very
@@ -379,6 +409,7 @@
       lower,
       tools::max_value<T>(),
       digits);
+ BOOST_MATH_INSTRUMENT_VARIABLE(guess);
    if(guess == lower)
       guess = policies::raise_underflow_error<T>(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol);
    return guess;

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/round_fwd.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/round_fwd.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/round_fwd.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -33,9 +33,9 @@
    long ltrunc(const T& v);
 #ifdef BOOST_HAS_LONG_LONG
    template <class T, class Policy>
- long long lltrunc(const T& v, const Policy& pol);
+ boost::long_long_type lltrunc(const T& v, const Policy& pol);
    template <class T>
- long long lltrunc(const T& v);
+ boost::long_long_type lltrunc(const T& v);
 #endif
    template <class T, class Policy>
    T round(const T& v, const Policy& pol);
@@ -51,9 +51,9 @@
    long lround(const T& v);
 #ifdef BOOST_HAS_LONG_LONG
    template <class T, class Policy>
- long long llround(const T& v, const Policy& pol);
+ boost::long_long_type llround(const T& v, const Policy& pol);
    template <class T>
- long long llround(const T& v);
+ boost::long_long_type llround(const T& v);
 #endif
    template <class T, class Policy>
    T modf(const T& v, T* ipart, const Policy& pol);
@@ -69,9 +69,9 @@
    T modf(const T& v, long* ipart);
 #ifdef BOOST_HAS_LONG_LONG
    template <class T, class Policy>
- T modf(const T& v, long long* ipart, const Policy& pol);
+ T modf(const T& v, boost::long_long_type* ipart, const Policy& pol);
    template <class T>
- T modf(const T& v, long long* ipart);
+ T modf(const T& v, boost::long_long_type* ipart);
 #endif
 
    }

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/t_distribution_inv.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/t_distribution_inv.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/t_distribution_inv.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -13,6 +13,7 @@
 
 #include <boost/math/special_functions/cbrt.hpp>
 #include <boost/math/special_functions/round.hpp>
+#include <boost/math/special_functions/trunc.hpp>
 
 namespace boost{ namespace math{ namespace detail{
 

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_1.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -90,7 +90,7 @@
        BOOST_MATH_INSTRUMENT_CODE("pi/2 = " << constants::pi<T>() / 2);
        T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi<T>() / 2));
        BOOST_MATH_INSTRUMENT_VARIABLE(rphi);
- T m = 2 * (phi - rphi) / constants::pi<T>();
+ T m = floor((2 * phi) / constants::pi<T>());
        BOOST_MATH_INSTRUMENT_VARIABLE(m);
        int s = 1;
        if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5)

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_2.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_2.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_2.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -75,7 +75,7 @@
        // so rewritten to use fmod instead:
        //
        T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi<T>() / 2));
- T m = 2 * (phi - rphi) / constants::pi<T>();
+ T m = floor((2 * phi) / constants::pi<T>());
        int s = 1;
        if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5)
        {

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_3.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_3.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_3.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -183,7 +183,7 @@
     else
     {
        T rphi = boost::math::tools::fmod_workaround(fabs(phi), T(constants::pi<T>() / 2));
- T m = 2 * (fabs(phi) - rphi) / constants::pi<T>();
+ T m = floor((2 * fabs(phi)) / constants::pi<T>());
        int sign = 1;
        if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5)
        {

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_rj.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_rj.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_rj.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -21,6 +21,7 @@
 #include <boost/math/tools/config.hpp>
 #include <boost/math/policies/error_handling.hpp>
 #include <boost/math/special_functions/ellint_rc.hpp>
+#include <boost/math/special_functions/ellint_rf.hpp>
 
 // Carlson's elliptic integral of the third kind
 // R_J(x, y, z, p) = 1.5 * \int_{0}^{\infty} (t+p)^{-1} [(t+x)(t+y)(t+z)]^{-1/2} dt

Modified: sandbox/math_toolkit/boost/math/special_functions/expint.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/expint.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/expint.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -17,6 +17,7 @@
 #include <boost/math/policies/error_handling.hpp>
 #include <boost/math/special_functions/digamma.hpp>
 #include <boost/math/special_functions/log1p.hpp>
+#include <boost/math/special_functions/pow.hpp>
 
 namespace boost{ namespace math{
 
@@ -416,7 +417,7 @@
       fact *= ++k;
    }
    BOOST_MATH_INSTRUMENT_VARIABLE(result)
- result += pow(-z, (int)n - 1)
+ result += pow(-z, static_cast<T>(n - 1))
       * (boost::math::digamma(static_cast<T>(n)) - log(z)) / fact;
    BOOST_MATH_INSTRUMENT_VARIABLE(result)
 
@@ -550,7 +551,7 @@
          -0.138972589601781706598e-4L
       };
 
- static const T r1 = static_cast<T>(1677624236387711.0L) / 4503599627370496uLL;
+ static const T r1 = static_cast<T>(1677624236387711.0L / 4503599627370496.0L);
       static const T r2 = 0.131401834143860282009280387409357165515556574352422001206362e-16L;
       static const T r = static_cast<T>(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L);
       T t = (z / 3) - 1;
@@ -765,7 +766,7 @@
          0.131515429329812837701e-5L
       };
 
- static const T r1 = static_cast<T>(1677624236387711.0L) / 4503599627370496uLL;
+ static const T r1 = static_cast<T>(1677624236387711.0L / 4503599627370496.0L);
       static const T r2 = 0.131401834143860282009280387409357165515556574352422001206362e-16L;
       static const T r = static_cast<T>(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L);
       T t = (z / 3) - 1;
@@ -1011,8 +1012,8 @@
          0.382742953753485333207877784720070523e-12L
       };
 
- static const T r1 = static_cast<T>(1677624236387711.0L) / 4503599627370496uLL;
- static const T r2 = (static_cast<T>(266514582277687.0L) / 4503599627370496uLL) / 4503599627370496uLL;
+ static const T r1 = static_cast<T>(1677624236387711.0L / 4503599627370496.0L);
+ static const T r2 = static_cast<T>(266514582277687.0L / 4503599627370496.0L / 4503599627370496.0L);
       static const T r3 = static_cast<T>(0.283806480836357377069325311780969887585024578164571984232357e-31L);
       static const T r = static_cast<T>(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L);
       T t = (z / 3) - 1;

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -76,12 +76,20 @@
 
    T a = fabs(x);
    if(a > T(0.5f))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
       return exp(x) - T(1);
+ }
    if(a < tools::epsilon<T>())
       return x;
    detail::expm1_series<T> s(x);
    boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
    T result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter);
 #else
    T zero = 0;
@@ -92,13 +100,21 @@
 }
 
 template <class T, class P>
-T expm1_imp(T x, const mpl::int_<53>&, const P&)
+T expm1_imp(T x, const mpl::int_<53>&, const P& pol)
 {
    BOOST_MATH_STD_USING
 
    T a = fabs(x);
    if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
       return exp(x) - T(1);
+ }
    if(a < tools::epsilon<T>())
       return x;
 
@@ -111,13 +127,21 @@
 }
 
 template <class T, class P>
-T expm1_imp(T x, const mpl::int_<64>&, const P&)
+T expm1_imp(T x, const mpl::int_<64>&, const P& pol)
 {
    BOOST_MATH_STD_USING
 
    T a = fabs(x);
    if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
       return exp(x) - T(1);
+ }
    if(a < tools::epsilon<T>())
       return x;
 
@@ -146,13 +170,21 @@
 }
 
 template <class T, class P>
-T expm1_imp(T x, const mpl::int_<113>&, const P&)
+T expm1_imp(T x, const mpl::int_<113>&, const P& pol)
 {
    BOOST_MATH_STD_USING
 
    T a = fabs(x);
    if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
       return exp(x) - T(1);
+ }
    if(a < tools::epsilon<T>())
       return x;
 
@@ -232,8 +264,8 @@
 # undef expm1
 #endif
 
-#ifdef BOOST_HAS_EXPM1
-# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+#if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER))
+# ifdef BOOST_MATH_USE_C99
 inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); }
 inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); }
 #else
@@ -272,3 +304,4 @@
 
 
 
+

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1,10 +1,5 @@
-/*!
- \file fpclassify.hpp
- \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN.
- \version 1.0
- \author John Maddock
- */
-// Copyright John Maddock 2005-2006.
+// Copyright John Maddock 2005-2008.
+// Copyright (c) 2006-2008 Johan Rade
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -22,6 +17,65 @@
 #include <boost/math/tools/real_cast.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
+/*!
+ \file fpclassify.hpp
+ \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN.
+ \version 1.0
+ \author John Maddock
+ */
+
+/*
+
+1. If the platform is C99 compliant, then the native floating point
+classification functions are used. However, note that we must only
+define the functions which call std::fpclassify etc if that function
+really does exist: otherwise a compiler may reject the code even though
+the template is never instantiated.
+
+2. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can be determined
+at compile time, then the following algorithm is used:
+
+ If all exponent bits, the flag bit (if there is one),
+ and all significand bits are 0, then the number is zero.
+
+ If all exponent bits and the flag bit (if there is one) are 0,
+ and at least one significand bit is 1, then the number is subnormal.
+
+ If all exponent bits are 1 and all significand bits are 0,
+ then the number is infinity.
+
+ If all exponent bits are 1 and at least one significand bit is 1,
+ then the number is a not-a-number.
+
+ Otherwise the number is normal.
+
+ This algorithm works for the IEEE 754 representation,
+ and also for several non IEEE 754 formats.
+
+ Most formats have the structure
+ sign bit + exponent bits + significand bits.
+
+ A few have the structure
+ sign bit + exponent bits + flag bit + significand bits.
+ The flag bit is 0 for zero and subnormal numbers,
+ and 1 for normal numbers and NaN.
+ It is 0 (Motorola 68K) or 1 (Intel) for infinity.
+
+ To get the bits, the four or eight most significant bytes are copied
+ into an uint32_t or uint64_t and bit masks are applied.
+ This covers all the exponent bits and the flag bit (if there is one),
+ but not always all the significand bits.
+ Some of the functions below have two implementations,
+ depending on whether all the significand bits are copied or not.
+
+3. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can not be determined
+at compile time, then comparison with std::numeric_limits values
+is used.
+
+*/
 
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 #include <float.h>
@@ -31,46 +85,7 @@
   namespace std{ using ::abs; using ::fabs; }
 #endif
 
-#ifndef FP_NORMAL
-
-#define FP_ZERO 0
-#define FP_NORMAL 1
-#define FP_INFINITE 2
-#define FP_NAN 3
-#define FP_SUBNORMAL 4
-
-#else
-
-#define BOOST_HAS_FPCLASSIFY
-
-#ifndef fpclassify
-# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
- && defined(_GLIBCXX_USE_C99_MATH) \
- && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
- && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
-# ifdef _STLP_VENDOR_CSTD
-# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD::
-# else
-# define BOOST_FPCLASSIFY_PREFIX ::std::
-# endif
-# else
-# undef BOOST_HAS_FPCLASSIFY
-# define BOOST_FPCLASSIFY_PREFIX
-# endif
-#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
-#endif
-
-#ifdef __MINGW32__
-# undef BOOST_HAS_FPCLASSIFY
-#endif
-
-#endif
-
-namespace boost{
+namespace boost{
 
 #if defined(BOOST_HAS_FPCLASSIFY) || defined(isnan)
 //
@@ -104,9 +119,19 @@
 
 namespace detail{
 
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
 template <class T>
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const mpl::true_&)
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&)
 {
+ return (std::fpclassify)(t);
+}
+#endif
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
+{
+ BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
    // whenever possible check for Nan's first:
 #ifdef BOOST_HAS_FPCLASSIFY
    if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
@@ -139,121 +164,370 @@
 }
 
 template <class T>
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const mpl::false_&)
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
 {
- //
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<T>::is_specialized)
+ return fp_classify_imp(t, mpl::true_());
+#endif
+ //
    // An unknown type with no numeric_limits support,
    // so what are we supposed to do we do here?
    //
+ BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
    return t == 0 ? FP_ZERO : FP_NORMAL;
 }
 
+template<class T>
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
+{
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ BOOST_MATH_INSTRUMENT_VARIABLE(a);
+ a &= traits::exponent | traits::flag | traits::significand;
+ BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
+ BOOST_MATH_INSTRUMENT_VARIABLE(a);
+
+ if(a <= traits::significand) {
+ if(a == 0)
+ return FP_ZERO;
+ else
+ return FP_SUBNORMAL;
+ }
+
+ if(a < traits::exponent) return FP_NORMAL;
+
+ a &= traits::significand;
+ if(a == 0) return FP_INFINITE;
+
+ return FP_NAN;
+}
+
+template<class T>
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
+{
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::flag | traits::significand;
+
+ if(a <= traits::significand) {
+ if(x == 0)
+ return FP_ZERO;
+ else
+ return FP_SUBNORMAL;
+ }
+
+ if(a < traits::exponent) return FP_NORMAL;
+
+ a &= traits::significand;
+ traits::set_bits(x,a);
+ if(x == 0) return FP_INFINITE;
+
+ return FP_NAN;
+}
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline int fpclassify_imp<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+ return boost::math::detail::fpclassify_imp(t, generic_tag<true>());
+}
+#endif
+
 } // namespace detail
 
 template <class T>
 inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
 {
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
 #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- if(std::numeric_limits<T>::is_specialized)
- return detail::fpclassify_imp(t, mpl::true_());
- return detail::fpclassify_imp(t, mpl::false_());
+ if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(method()))
+ return detail::fpclassify_imp(t, detail::generic_tag<true>());
+ return detail::fpclassify_imp(t, method());
 #else
- return detail::fpclassify_imp(t, mpl::bool_< ::std::numeric_limits<T>::is_specialized>());
+ return detail::fpclassify_imp(t, method());
 #endif
 }
 
-#if defined(BOOST_HAS_FPCLASSIFY)
-inline int fpclassify BOOST_NO_MACRO_EXPAND(float t)
-{
- return BOOST_FPCLASSIFY_PREFIX fpclassify(t);
-}
-inline int fpclassify BOOST_NO_MACRO_EXPAND(double t)
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+ template<class T>
+ inline bool isfinite_impl(T x, native_tag const&)
+ {
+ return (std::isfinite)(x);
+ }
+#endif
+
+ template<class T>
+ inline bool isfinite_impl(T x, generic_tag<true> const&)
+ {
+ return x >= -(std::numeric_limits<T>::max)()
+ && x <= (std::numeric_limits<T>::max)();
+ }
+
+ template<class T>
+ inline bool isfinite_impl(T x, generic_tag<false> const&)
+ {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<T>::is_specialized)
+ return isfinite_impl(x, mpl::true_());
+#endif
+ (void)x; // warning supression.
+ return true;
+ }
+
+ template<class T>
+ inline bool isfinite_impl(T x, ieee_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent;
+ return a != traits::exponent;
+ }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isfinite_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
- return BOOST_FPCLASSIFY_PREFIX fpclassify(t);
+ return boost::math::detail::isfinite_impl(t, generic_tag<true>());
 }
-#if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-// The native fpclassify broken for long doubles with aCC
-// use portable one instead....
-inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t)
-{
- return BOOST_FPCLASSIFY_PREFIX fpclassify(t);
+#endif
+
 }
+
+template<class T>
+inline bool (isfinite)(T x)
+{ //!< \brief return true if floating-point type t is finite.
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isfinite_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+ template<class T>
+ inline bool isnormal_impl(T x, native_tag const&)
+ {
+ return (std::isnormal)(x);
+ }
+#endif
+
+ template<class T>
+ inline bool isnormal_impl(T x, generic_tag<true> const&)
+ {
+ if(x < 0) x = -x;
+ return x >= (std::numeric_limits<T>::min)()
+ && x <= (std::numeric_limits<T>::max)();
+ }
+
+ template<class T>
+ inline bool isnormal_impl(T x, generic_tag<false> const&)
+ {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<T>::is_specialized)
+ return isnormal_impl(x, mpl::true_());
 #endif
+ return !(x == 0);
+ }
 
-#elif defined(_MSC_VER)
-// This only works for type double, for both float
-// and long double it gives misleading answers.
-inline int fpclassify BOOST_NO_MACRO_EXPAND(double t)
+ template<class T>
+ inline bool isnormal_impl(T x, ieee_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::flag;
+ return (a != 0) && (a < traits::exponent);
+ }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isnormal_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
- switch(::_fpclass(t))
- {
- case _FPCLASS_SNAN /* Signaling NaN */ :
- case _FPCLASS_QNAN /* Quiet NaN */ :
- return FP_NAN;
- case _FPCLASS_NINF /*Negative infinity ( -INF) */ :
- case _FPCLASS_PINF /* Positive infinity (+INF) */ :
- return FP_INFINITE;
- case _FPCLASS_NN /* Negative normalized non-zero */ :
- case _FPCLASS_PN /* Positive normalized non-zero */ :
- return FP_NORMAL;
- case _FPCLASS_ND /* Negative denormalized */:
- case _FPCLASS_PD /* Positive denormalized */ :
- return FP_SUBNORMAL;
- case _FPCLASS_NZ /* Negative zero ( - 0) */ :
- case _FPCLASS_PZ /* Positive 0 (+0) */ :
- return FP_ZERO;
- default:
- /**/ ;
- }
- return FP_NAN; // should never get here!!!
+ return boost::math::detail::isnormal_impl(t, generic_tag<true>());
 }
 #endif
 
-template <class T>
-inline bool isfinite BOOST_NO_MACRO_EXPAND(T z)
-{ //!< \brief return true if floating-point type t is finite.
- int t = (::boost::math::fpclassify)(z);
- return (t != (int)FP_NAN) && (t != (int)FP_INFINITE);
 }
 
-template <class T>
-inline bool isinf BOOST_NO_MACRO_EXPAND(T t)
-{//!< \brief return true if floating-point type t is infinite.
- return (::boost::math::fpclassify)(t) == (int)FP_INFINITE;
+template<class T>
+inline bool (isnormal)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isnormal_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+ template<class T>
+ inline bool isinf_impl(T x, native_tag const&)
+ {
+ return (std::isinf)(x);
+ }
+#endif
+
+ template<class T>
+ inline bool isinf_impl(T x, generic_tag<true> const&)
+ {
+ return std::numeric_limits<T>::has_infinity
+ && ( x == std::numeric_limits<T>::infinity()
+ || x == -std::numeric_limits<T>::infinity());
+ }
+
+ template<class T>
+ inline bool isinf_impl(T x, generic_tag<false> const&)
+ {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<T>::is_specialized)
+ return isinf_impl(x, mpl::true_());
+#endif
+ (void)x; // warning supression.
+ return false;
+ }
+
+ template<class T>
+ inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ return a == traits::exponent;
+ }
+
+ template<class T>
+ inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ if(a != traits::exponent)
+ return false;
+
+ traits::set_bits(x,0);
+ return x == 0;
+ }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isinf_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+ return boost::math::detail::isinf_impl(t, generic_tag<true>());
 }
+#endif
 
-template <class T>
-inline bool isnan BOOST_NO_MACRO_EXPAND(T t)
-{//!< \brief return true if floating-point type t is NaN (Not A Number).
- return (::boost::math::fpclassify)(t) == (int)FP_NAN;
+} // namespace detail
+
+template<class T>
+inline bool (isinf)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isinf_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+ template<class T>
+ inline bool isnan_impl(T x, native_tag const&)
+ {
+ return (std::isnan)(x);
+ }
+#endif
+
+ template<class T>
+ inline bool isnan_impl(T x, generic_tag<true> const&)
+ {
+ return std::numeric_limits<T>::has_infinity
+ ? !(x <= std::numeric_limits<T>::infinity())
+ : x != x;
+ }
+
+ template<class T>
+ inline bool isnan_impl(T x, generic_tag<false> const&)
+ {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<T>::is_specialized)
+ return isnan_impl(x, mpl::true_());
+#endif
+ (void)x; // warning supression
+ return false;
+ }
+
+ template<class T>
+ inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ return a > traits::exponent;
+ }
+
+ template<class T>
+ inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+
+ a &= traits::exponent | traits::significand;
+ if(a < traits::exponent)
+ return false;
+
+ a &= traits::significand;
+ traits::set_bits(x,a);
+ return x != 0;
+ }
+
+} // namespace detail
+
+template<class T> bool (isnan)(T x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isnan_impl(x, method());
 }
+
 #ifdef isnan
 template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
 template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
 template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
-#elif defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false'
-# pragma warning(disable: 4244) // conversion from 'long double' to 'double',
-// No possible loss of data because they are same size.
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return _isnan(t); }
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return _isnan(t); }
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return _isnan(t); }
-#pragma warning (pop)
 #endif
 
-template <class T>
-inline bool isnormal BOOST_NO_MACRO_EXPAND(T t)
-{
- return (::boost::math::fpclassify)(t) == (int)FP_NORMAL;
-}
-
 } // namespace math
 } // namespace boost
 
 #endif // BOOST_MATH_FPCLASSIFY_HPP
 
-
-
-
-

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1194,7 +1194,7 @@
 
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
- tgamma(T1 a, T2 z, const Policy& pol, const mpl::false_)
+ tgamma(T1 a, T2 z, const Policy&, const mpl::false_)
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
@@ -1230,7 +1230,7 @@
 
 template <class T, class Policy>
 inline typename tools::promote_args<T>::type
- lgamma(T z, int* sign, const Policy& pol)
+ lgamma(T z, int* sign, const Policy&)
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T>::type result_type;
@@ -1316,7 +1316,7 @@
 //
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
- tgamma_lower(T1 a, T2 z, const Policy& pol)
+ tgamma_lower(T1 a, T2 z, const Policy&)
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
@@ -1374,7 +1374,7 @@
 //
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
- gamma_p(T1 a, T2 z, const Policy& pol)
+ gamma_p(T1 a, T2 z, const Policy&)
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
@@ -1424,7 +1424,7 @@
 }
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
- tgamma_ratio(T1 a, T2 b, const Policy& pol)
+ tgamma_ratio(T1 a, T2 b, const Policy&)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
    typedef typename policies::evaluation<result_type, Policy>::type value_type;
@@ -1446,7 +1446,7 @@
 
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
- gamma_p_derivative(T1 a, T2 x, const Policy& pol)
+ gamma_p_derivative(T1 a, T2 x, const Policy&)
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;

Modified: sandbox/math_toolkit/boost/math/special_functions/lanczos.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/lanczos.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/lanczos.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -431,28 +431,28 @@
          static_cast<T>(2.50662827463100050241576528481104525333L)
       };
       static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
- (0uLL),
- (2432902008176640000uLL),
- (8752948036761600000uLL),
- (13803759753640704000uLL),
- (12870931245150988800uLL),
- (8037811822645051776uLL),
- (3599979517947607200uLL),
- (1206647803780373360uLL),
- (311333643161390640uLL),
- (63030812099294896uLL),
- (10142299865511450uLL),
- (1307535010540395uLL),
- (135585182899530uLL),
- (11310276995381uLL),
- (756111184500uLL),
- (40171771630uLL),
- (1672280820uLL),
- (53327946uLL),
- (1256850uLL),
- (20615uLL),
- (210uLL),
- (1uLL)
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
       };
       return boost::math::tools::evaluate_rational(num, denom, z);
    }
@@ -485,28 +485,28 @@
          static_cast<T>(0.3765495513732730583386223384116545391759e-9L)
       };
       static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
- (0uLL),
- (2432902008176640000uLL),
- (8752948036761600000uLL),
- (13803759753640704000uLL),
- (12870931245150988800uLL),
- (8037811822645051776uLL),
- (3599979517947607200uLL),
- (1206647803780373360uLL),
- (311333643161390640uLL),
- (63030812099294896uLL),
- (10142299865511450uLL),
- (1307535010540395uLL),
- (135585182899530uLL),
- (11310276995381uLL),
- (756111184500uLL),
- (40171771630uLL),
- (1672280820uLL),
- (53327946uLL),
- (1256850uLL),
- (20615uLL),
- (210uLL),
- (1uLL)
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
       };
       return boost::math::tools::evaluate_rational(num, denom, z);
    }
@@ -849,23 +849,23 @@
          static_cast<T>(2.50662827463100050241576877135758834683L)
       };
       static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
- (0uLL),
- (1307674368000uLL),
- (4339163001600uLL),
- (6165817614720uLL),
- (5056995703824uLL),
- (2706813345600uLL),
- (1009672107080uLL),
- (272803210680uLL),
- (54631129553uLL),
- (8207628000uLL),
- (928095740uLL),
- (78558480uLL),
- (4899622uLL),
- (218400uLL),
- (6580uLL),
- (120uLL),
- (1uLL)
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
       };
       return boost::math::tools::evaluate_rational(num, denom, z);
    }
@@ -893,23 +893,23 @@
          static_cast<T>(0.1229541408909435212800785616808830746135e-4L)
       };
       static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
- (0uLL),
- (1307674368000uLL),
- (4339163001600uLL),
- (6165817614720uLL),
- (5056995703824uLL),
- (2706813345600uLL),
- (1009672107080uLL),
- (272803210680uLL),
- (54631129553uLL),
- (8207628000uLL),
- (928095740uLL),
- (78558480uLL),
- (4899622uLL),
- (218400uLL),
- (6580uLL),
- (120uLL),
- (1uLL)
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
       };
       return boost::math::tools::evaluate_rational(num, denom, z);
    }

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -94,7 +94,7 @@
       return x;
    detail::log1p_series<result_type> s(x);
    boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
    result_type result = tools::sum_series(s, policies::digits<result_type, Policy>(), max_iter);
 #else
    result_type zero = 0;
@@ -315,10 +315,8 @@
 # undef log1p
 #endif
 
-#ifdef BOOST_HAS_LOG1P
-# if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \
- || ((defined(linux) || defined(__linux) || defined(__linux__)) && !defined(__SUNPRO_CC)) \
- || (defined(__hpux) && !defined(__hppa))
+#if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER))
+# ifdef BOOST_MATH_USE_C99
 template <class Policy>
 inline float log1p(float x, const Policy& pol)
 {
@@ -330,6 +328,7 @@
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1pf(x);
 }
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 template <class Policy>
 inline long double log1p(long double x, const Policy& pol)
 {
@@ -341,6 +340,7 @@
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1pl(x);
 }
+#endif
 #else
 template <class Policy>
 inline float log1p(float x, const Policy& pol)
@@ -452,7 +452,7 @@
 }
 
 template <class T>
-inline T log1pmx(T x)
+inline typename tools::promote_args<T>::type log1pmx(T x)
 {
    return log1pmx(x, policies::policy<>());
 }

Modified: sandbox/math_toolkit/boost/math/special_functions/math_fwd.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/math_fwd.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/math_fwd.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -531,22 +531,22 @@
 
    // inverse hyperbolics:
    template<typename T>
- typename tools::promote_args<T>::type asinh(const T x);
+ typename tools::promote_args<T>::type asinh(T x);
 
    template<typename T, class Policy>
- typename tools::promote_args<T>::type asinh(const T x, const Policy&);
+ typename tools::promote_args<T>::type asinh(T x, const Policy&);
 
    template<typename T>
- typename tools::promote_args<T>::type acosh(const T x);
+ typename tools::promote_args<T>::type acosh(T x);
 
    template<typename T, class Policy>
- typename tools::promote_args<T>::type acosh(const T x, const Policy&);
+ typename tools::promote_args<T>::type acosh(T x, const Policy&);
 
    template<typename T>
- typename tools::promote_args<T>::type atanh(const T x);
+ typename tools::promote_args<T>::type atanh(T x);
 
    template<typename T, class Policy>
- typename tools::promote_args<T>::type atanh(const T x, const Policy&);
+ typename tools::promote_args<T>::type atanh(T x, const Policy&);
 
    namespace detail{
 
@@ -704,13 +704,13 @@
 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
    \
    template <class T>\
- inline T modf(const T& v, long long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+ inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
    \
    template <class T>\
- inline long long lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
+ inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
    \
    template <class T>\
- inline long long llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
+ inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
 
 #else
 #define BOOST_MATH_DETAIL_LL_FUNC(Policy)
@@ -1043,6 +1043,7 @@
    \
    template <int N, class T>\
    inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
+ \
    template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
    template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
    template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
@@ -1051,3 +1052,4 @@
 
 #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/modf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/modf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/modf.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -53,13 +53,13 @@
 
 #ifdef BOOST_HAS_LONG_LONG
 template <class T, class Policy>
-inline T modf(const T& v, long long* ipart, const Policy& pol)
+inline T modf(const T& v, boost::long_long_type* ipart, const Policy& pol)
 {
    *ipart = lltrunc(v, pol);
    return v - *ipart;
 }
 template <class T>
-inline T modf(const T& v, long long* ipart)
+inline T modf(const T& v, boost::long_long_type* ipart)
 {
    return modf(v, ipart, policies::policy<>());
 }

Modified: sandbox/math_toolkit/boost/math/special_functions/next.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/next.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/next.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -13,6 +13,7 @@
 #include <boost/math/policies/error_handling.hpp>
 #include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/trunc.hpp>
 
 #ifdef BOOST_MSVC
 #include <float.h>

Modified: sandbox/math_toolkit/boost/math/special_functions/round.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/round.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/round.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -71,16 +71,16 @@
 #ifdef BOOST_HAS_LONG_LONG
 
 template <class T, class Policy>
-inline long long llround(const T& v, const Policy& pol)
+inline boost::long_long_type llround(const T& v, const Policy& pol)
 {
    BOOST_MATH_STD_USING
    T r = boost::math::round(v, pol);
- if(fabs(r) > (std::numeric_limits<long long>::max)())
- return static_cast<long long>(policies::raise_rounding_error("boost::math::llround<%1%>(%1%)", 0, v, pol));
- return static_cast<long long>(r);
+ if(fabs(r) > (std::numeric_limits<boost::long_long_type>::max)())
+ return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::llround<%1%>(%1%)", 0, v, pol));
+ return static_cast<boost::long_long_type>(r);
 }
 template <class T>
-inline long long llround(const T& v)
+inline boost::long_long_type llround(const T& v)
 {
    return llround(v, policies::policy<>());
 }

Modified: sandbox/math_toolkit/boost/math/special_functions/sinc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sinc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sinc.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -116,8 +116,8 @@
         inline U<T> sinc_pi(const U<T> x)
         {
 #if defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) || defined(__GNUC__)
- BOOST_MATH_STD_USING
-#elif defined(BOOST_NO_STDC_NAMESPACE)
+ using namespace std;
+#elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(__SUNPRO_CC)
             using ::abs;
             using ::sin;
             using ::sqrt;

Modified: sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -23,7 +23,6 @@
 #include <string>
 #include <stdexcept>
 
-
 #include <boost/config.hpp>
 
 
@@ -113,8 +112,8 @@
         inline U<T> sinhc_pi(const U<T> x)
         {
 #if defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) || defined(__GNUC__)
- BOOST_MATH_STD_USING
-#elif defined(BOOST_NO_STDC_NAMESPACE)
+ using namespace std;
+#elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(__SUNPRO_CC)
             using ::abs;
             using ::sinh;
             using ::sqrt;

Modified: sandbox/math_toolkit/boost/math/special_functions/trunc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/trunc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/trunc.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -71,16 +71,16 @@
 #ifdef BOOST_HAS_LONG_LONG
 
 template <class T, class Policy>
-inline long long lltrunc(const T& v, const Policy& pol)
+inline boost::long_long_type lltrunc(const T& v, const Policy& pol)
 {
    BOOST_MATH_STD_USING
    T r = boost::math::trunc(v, pol);
- if(fabs(r) > (std::numeric_limits<long long>::max)())
- return static_cast<long long>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, pol));
- return static_cast<long long>(r);
+ if(fabs(r) > (std::numeric_limits<boost::long_long_type>::max)())
+ return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, pol));
+ return static_cast<boost::long_long_type>(r);
 }
 template <class T>
-inline long long lltrunc(const T& v)
+inline boost::long_long_type lltrunc(const T& v)
 {
    return lltrunc(v, policies::policy<>());
 }

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -23,7 +23,8 @@
 #include <boost/math/tools/user.hpp>
 #include <boost/math/special_functions/detail/round_fwd.hpp>
 
-#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__hppa)
+#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+ || defined(__hppa) || defined(__NO_LONG_DOUBLE_MATH)
 # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
@@ -69,6 +70,24 @@
 # define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
 #endif
 
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))
+# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
 #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
 
 # include "boost/type.hpp"
@@ -134,6 +153,12 @@
 # define BOOST_MATH_POLY_METHOD 3
 # define BOOST_MATH_RATIONAL_METHOD 3
 # define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
 #endif
 
 //
@@ -158,6 +183,10 @@
 #ifndef BOOST_MATH_INT_TABLE_TYPE
 # define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
 #endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+
 //
 // Helper macro for controlling the FP behaviour:
 //
@@ -218,7 +247,7 @@
 } // namespace tools
 }} // namespace boost namespace math
 
-#ifdef __linux__
+#if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)
 
    #include <fenv.h>
 

Modified: sandbox/math_toolkit/boost/math/tools/roots.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/roots.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/roots.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -297,6 +297,11 @@
       delta2 = delta1;
       delta1 = delta;
       std::tr1::tie(f0, f1, f2) = f(result);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(f0);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f1);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f2);
+
       if(0 == f0)
          break;
       if((f1 == 0) && (f2 == 0))
@@ -313,6 +318,10 @@
          {
             T denom = 2 * f0;
             T num = 2 * f1 - f0 * (f2 / f1);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(denom);
+ BOOST_MATH_INSTRUMENT_VARIABLE(num);
+
             if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value<T>()))
             {
                // possible overflow, use Newton step:
@@ -340,9 +349,11 @@
          // reset delta2 so that this branch will *not* be taken on the
          // next iteration:
          delta2 = delta * 3;
+ BOOST_MATH_INSTRUMENT_VARIABLE(delta);
       }
       guess = result;
       result -= delta;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
 
       // check for out of bounds step:
       if(result < min)
@@ -398,13 +409,6 @@
 
 #ifdef BOOST_MATH_INSTRUMENT
    std::cout << "Halley iteration, final count = " << max_iter << std::endl;
-
- static boost::uintmax_t max_count = 0;
- if(max_iter > max_count)
- {
- max_count = max_iter;
- std::cout << "Maximum iterations: " << max_iter << std::endl;
- }
 #endif
 
    return result;

Modified: sandbox/math_toolkit/boost/math/tr1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tr1.hpp (original)
+++ sandbox/math_toolkit/boost/math/tr1.hpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -171,15 +171,16 @@
 double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
 float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
 long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#ifdef BOOST_HAS_LONG_LONG
 #if 0
-long long BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-long long BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long long BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-#endif
-long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-
+::boost::long_long_type BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+::boost::long_long_type BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
 double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
 float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
 long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
@@ -487,19 +488,20 @@
 template <class T>
 inline typename tools::promote_args<T>::type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
 { return boost::math::tr1::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#ifdef BOOST_HAS_LONG_LONG
 #if 0
-long long llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-long long llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long long llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+::boost::long_long_type llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+::boost::long_long_type llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+::boost::long_long_type llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
 #endif
-inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+inline ::boost::long_long_type llround BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 { return boost::math::tr1::llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
-inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+inline ::boost::long_long_type llround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 { return boost::math::tr1::llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
 template <class T>
-inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+inline ::boost::long_long_type llround BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
 { return llround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<double>(x)); }
-
+#endif
 inline float log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 { return boost::math::tr1::boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
 inline double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x)

Modified: sandbox/math_toolkit/libs/math/build/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/build/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/build/Jamfile.v2 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -5,7 +5,7 @@
 
 import testing ;
 
-cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ;
+cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ;
 
 C99_SOURCES = acosh
 asinh
@@ -53,42 +53,49 @@
 sph_neumann
 ;
 
+if --disable-long-double in [ modules.peek : ARGV ]
+{
+ long-double-opts = <build>no ;
+}
+
 lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <include>../src/tr1
+ <include>../src/tr1
    ;
 
 lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <include>../src/tr1
+ <include>../src/tr1
    ;
 
 lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <include>../src/tr1
- <dependency>../config//has_long_double_support
+ <dependency>../config//has_long_double_support
+ <include>../src/tr1
+ $(long-double-opts)
    ;
 
 lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <include>../src/tr1
+ <include>../src/tr1
    ;
 
 lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <include>../src/tr1
+ <include>../src/tr1
    ;
 
 lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch
     :
               <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
- <dependency>../config//has_long_double_support
- <include>../src/tr1
+ <dependency>../config//has_long_double_support
+ <include>../src/tr1
+ $(long-double-opts)
    ;
 
 
@@ -97,7 +104,3 @@
 
 
 
-
-
-
-

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/Jamfile.v2 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -70,6 +70,7 @@
         <format>pdf:<xsl:param>img.src.path=$(images_location)/
         <format>pdf:<xsl:param>admon.graphics.path=$(images_location)/images/
         <format>pdf:<xsl:param>draft.mode="no"
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/math/doc/sf_and_dist/html
     ;
 
 install pdf-install : standalone : <location>. <install-type>PDF ;

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/c99_ref.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/c99_ref.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/c99_ref.qbk 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -88,7 +88,7 @@
    long double truncl(long double x);
 
    }}}} // namespaces
-
+
 In addition sufficient additional overloads of the `double` versions of the
 above functions are provided, so that calling the function with any mixture
 of `float`, `double`, `long double`, or /integer/ arguments is supported, with the
@@ -110,7 +110,7 @@
 
    typedef unspecified float_t;
    typedef unspecified double_t;
-
+
 In this implementation `float_t` is the same as type `float`, and
 `double_t` the same as type `double` unless the preprocessor symbol
 FLT_EVAL_METHOD is defined, in which case these are set as follows:
@@ -149,7 +149,7 @@
    double cbrt(double x);
    float cbrtf(float x);
    long double cbrtl(long double x);
-
+
 Returns the cubed root of /x/.
 
 See also __cbrt for the full template (header only) version of this function.
@@ -212,7 +212,7 @@
    double lgamma(double x);
    float lgammaf(float x);
    long double lgammal(long double x);
-
+
 Returns the log of the gamma function of /x/.
 
 [equation lgamm1]
@@ -222,8 +222,8 @@
    long long llround(double x);
    long long llroundf(float x);
    long long llroundl(long double x);
-
-Returns the value /x/ rounded to the nearest integer as a `long long`:
+
+Returns the value /x/ rounded to the nearest integer as a `long long`:
 equivalent to `floor(x + 0.5)`
 
 See also __llround for the full template (header only) version of this function.
@@ -231,8 +231,8 @@
    double log1p(double x);
    float log1pf(float x);
    long double log1pl(long double x);
-
-Returns the `log(x+1)` without the loss of precision
+
+Returns the `log(x+1)` without the loss of precision
 implied by that formulation.
 
 See also __log1p for the full template (header only) version of this function.
@@ -241,7 +241,7 @@
    long lroundf(float x);
    long lroundl(long double x);
 
-Returns the value /x/ rounded to the nearest integer as a `long`:
+Returns the value /x/ rounded to the nearest integer as a `long`:
 equivalent to `floor(x + 0.5)`
 
 See also __lround for the full template (header only) version of this function.
@@ -249,21 +249,21 @@
    double nextafter(double x, double y);
    float nextafterf(float x, float y);
    long double nextafterl(long double x, long double y);
-
+
 Returns the next representable floating point number after /x/
 in the direction of /y/, or /x/ if `x == y`.
 
    double nexttoward(double x, long double y);
    float nexttowardf(float x, long double y);
    long double nexttowardl(long double x, long double y);
-
+
 As `nextafter`, but with /y/ always expressed as a `long double`.
 
    double round(double x);
    float roundf(float x);
    long double roundl(long double x);
 
-Returns the value /x/ rounded to the nearest integer:
+Returns the value /x/ rounded to the nearest integer:
 equivalent to `floor(x + 0.5)`
 
 See also __round for the full template (header only) version of this function.
@@ -271,7 +271,7 @@
    double tgamma(double x);
    float tgammaf(float x);
    long double tgammal(long double x);
-
+
 Returns the gamma function of /x/:
 
 [equation gamm1]
@@ -281,7 +281,7 @@
    double trunc(double x);
    float truncf(float x);
    long double truncl(long double x);
-
+
 Returns /x/ truncated to the nearest integer.
 
 See also __trunc for the full template (header only) version of this function.
@@ -290,7 +290,7 @@
 
 [endsect]
 
-[/
+[/
   Copyright 2008 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

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/credits.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/credits.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/credits.qbk 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -22,6 +22,9 @@
 
 Bruno Lalande submitted the "compile time power of a runtime base" code.
 
+Johan R'''&#xE5;'''de wrote the optimised floating point classification
+code.
+
 Gautam Sewani coded the logistic distribution as part of a Google Summer of Code project 2008.
 
 M. A. (Thijs) van den Berg coded the Laplace distribution.

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/gamma.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/gamma.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/gamma.qbk 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -39,7 +39,7 @@
 Instead if you want
 a double precision gamma distribution you can use
 
-``boost::gamma_distribution<>``]
+``boost::math::gamma_distribution<>``]
 
 For shape parameter /k/ and scale parameter [theta][space] it is defined by the
 probability density function:

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -557,12 +557,12 @@
 [h4 Producing Graphs]
 
 Graphs were produced in SVG format and then converted to PNG's using the same
-process as the equations.
+process as the equations.
 
-The programs
+The programs
 /libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp
 and /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp
-generate the SVG's directly using the
+generate the SVG's directly using the
 [@http://code.google.com/soc/2007/boost/about.html Google Summer of Code 2007]
 project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization).
 

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1,13 +1,13 @@
 [article Math Toolkit
     [quickbook 1.4]
- [copyright 2006, 2007, 2008, 2009 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang, Bruno Lalande, Gautam Sewani and Thijs van den Berg]
+ [copyright 2006, 2007, 2008, 2009 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan R&#xE5;de, Gautam Sewani and Thijs van den Berg]
     [purpose ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22]
     [license
         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])
     ]
- [authors [Maddock, John], [Bristow, Paul A.], [Holin, Hubert], [Zhang, Xiaogang], [Lalande, Bruno], [Sewani, Gautam], [van den Berg, Thijs]]
+ [authors [Maddock, John], [Bristow, Paul A.], [Holin, Hubert], [Zhang, Xiaogang], [Lalande, Bruno], [R&#xE5;de, Johan], [Sewani, Gautam], [van den Berg, Thijs]]
     [category math]
     [purpose mathematics]
     [/last-revision $Date$]
@@ -200,6 +200,7 @@
 [def __expint [link math_toolkit.special.expint.expint_i expint]]
 [def __spherical_harmonic [link math_toolkit.special.sf_poly.sph_harm spherical_harmonic]]
 
+
 [/ distribution non-members]
 [def __cdf [link math.dist.cdf Cumulative Distribution Function]]
 [def __pdf [link math.dist.pdf Probability Density Function]]
@@ -233,9 +234,10 @@
 [def __logistic_distrib [link math_toolkit.dist.dist_ref.dists.logistic_dist Logistic Distribution]]
 [def __lognormal_distrib [link math_toolkit.dist.dist_ref.dists.lognormal_dist Log-normal Distribution]]
 [def __negative_binomial_distrib [link math_toolkit.dist.dist_ref.dists.negative_binomial_dist Negative Binomial Distribution]]
-[def __non_central_chi_squared_distrib [link math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist Non Central Chi Squared]]
-[def __non_central_beta_distrib [link math_toolkit.dist.dist_ref.dists.nc_beta_dist noncentral beta distribution]]
-[def __non_central_F_distrib [link math_toolkit.dist.dist_ref.dists.nc_f_dist noncentral F distribution]]
+[def __non_central_chi_squared_distrib [link math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist Noncentral Chi Squared Distribution]]
+[def __non_central_beta_distrib [link math_toolkit.dist.dist_ref.dists.nc_beta_dist Noncentral Beta Distribution]]
+[def __non_central_F_distrib [link math_toolkit.dist.dist_ref.dists.nc_f_dist Noncentral F Distribution]]
+[def __non_central_T_distrib [link math_toolkit.dist.dist_ref.dists.nc_t_dist Noncentral T Distribution]]
 [def __non_central_t_distrib [link math_toolkit.dist.dist_ref.dists.nc_t_dist noncentral T distribution]]
 [def __normal_distrib [link math_toolkit.dist.dist_ref.dists.normal_dist Normal Distribution]]
 [def __poisson_distrib [link math_toolkit.dist.dist_ref.dists.poisson_dist Poisson Distribution]]
@@ -310,8 +312,8 @@
 ] [/ caution]
 ] [/ template discrete_quantile_warning]
 
-This manual is also available in
-[@http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf
+This manual is also available in
+[@http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf
 printer friendly PDF format].
 
 [section:main_overview Overview]

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -9,6 +9,12 @@
 * Updated performance test code to include new distributions, and improved the performance of the non-central distributions.
 * Added SSE2 optimised __lanczos code, from Gautam Sewani's Google Summer of Code project.
 
+[h4 Boost-1.38.0]
+
+* Added Johan R'''&#xE5;'''de's optimised floating point classification routines.
+* Fixed code so that it compiles in GCC's -pedantic mode (bug report
+[@https://svn.boost.org/trac/boost/ticket/1451 #1451]).
+
 [h4 Boost-1.37.0]
 
 * Improved accuracy and testing of the inverse hypergeometric functions.
@@ -23,6 +29,7 @@
 * Added Zeta Function.
 * Added Rounding and Truncation functions.
 * Added Compile time powers of runtime bases.
+* Added SSE2 optimizations for Lanczos evaluation.
 
 [h4 Boost-1.35.0: Post Review First Official Release]
 
@@ -94,4 +101,3 @@
   http://www.boost.org/LICENSE_1_0.txt).
 ]
 
-

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -17,18 +17,18 @@
 
 * You will need to compile and link to the external Boost.Math libraries.
 * Limited to support for the types, `float`, `double` and `long double`.
-* Error handling is handled via setting ::errno and returning NaN's and
+* Error handling is handled via setting ::errno and returning NaN's and
 infinities: this may be less flexible than an C++ exception based approach.
 
 [note The separate libraries are required *only* if you choose to use
 boost/math/tr1.hpp rather than some other Boost.Math header, the rest
 of Boost.Math remains header-only.]
 
-The separate libraries required in order to use tr1.hpp can be compiled
-using bjam from within the libs/math/build directory, or from the Boost
-root directory using the usual Boost-wide install procedure.
+The separate libraries required in order to use tr1.hpp can be compiled
+using bjam from within the libs/math/build directory, or from the Boost
+root directory using the usual Boost-wide install procedure.
 Alternatively the source files are located in libs/math/src and each have
-the same name as the function they implement. The various libraries are
+the same name as the function they implement. The various libraries are
 named as follows:
 
 [table
@@ -41,19 +41,19 @@
 [[boost_math_tr1l-<suffix>][long double][TR1 Functions]]
 ]
 
-Where `<suffix>` encodes the compiler and build options used to
+Where `<suffix>` encodes the compiler and build options used to
 build the libraries: for example "libboost_math_tr1-vc80-mt-gd.lib"
-would be the statically linked TR1 library to use with Visual C++ 8.0,
+would be the statically linked TR1 library to use with Visual C++ 8.0,
 in multithreading debug mode, with the DLL VC++ runtime, where as
 "boost_math_tr1-vc80-mt.lib" would be import library for the TR1 DLL
 to be used with Visual C++ 8.0 with the release multithreaded DLL
 VC++ runtime.
-Refer to the getting started guide for a
-[@http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming
+Refer to the getting started guide for a
+[@http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming
 full explanation of the `<suffix>` meanings].
 
 [note
-Visual C++ users will typically have the correct library variant to link
+Visual C++ users will typically have the correct library variant to link
 against selected for them by boost/math/tr1.hpp based on your compiler
 settings.
 
@@ -61,11 +61,11 @@
 their code if they want to link against the DLL versions of these libraries
 rather than the static versions.
 
-Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when
-building: this is typically only used when linking against a customised
+Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when
+building: this is typically only used when linking against a customised
 build of the libraries.]
 
-[note Linux and Unix users will generally only have one variant of
+[note Linux and Unix users will generally only have one variant of
 these libraries installed, and can generally just link against
 -lboost_math_tr1 etc.]
 
@@ -80,26 +80,26 @@
 Which option you choose depends largely on how you prefer to work
 and how your system is set up.
 
-For example a casual user who just needs the acosh function, would
+For example a casual user who just needs the acosh function, would
 probably be better off including `<boost/math/special_functions/acosh.hpp>`
-and using `boost::math::acosh(x)` in their code.
+and using `boost::math::acosh(x)` in their code.
 
 However, for large scale
 software development where compile times are significant, and where the
 Boost libraries are already built and installed on the system, then
 including `<boost/math/tr1.hpp>` and using `boost::math::tr1::acosh(x)`
-will speed up compile times, reduce object files sizes (since there are
-no templates being instantiated any more), and also speed up debugging
-runtimes - since the externally compiled libraries can be
+will speed up compile times, reduce object files sizes (since there are
+no templates being instantiated any more), and also speed up debugging
+runtimes - since the externally compiled libraries can be
 compiler optimised, rather than built using full settings - the difference
-in performance between
-[link math_toolkit.perf.getting_best
+in performance between
+[link math_toolkit.perf.getting_best
 release and debug builds can be as much as 20 times],
 so for complex applications this can be a big win.
 
 [h4 Supported C99 Functions]
 
-See also the [link math_toolkit.special.extern_c.c99
+See also the [link math_toolkit.special.extern_c.c99
 quick reference guide for these functions].
 
    namespace boost{ namespace math{ namespace tr1{ extern "C"{
@@ -188,14 +188,14 @@
    long double truncl(long double x);
 
    }}}} // namespaces
-
+
 [h4 Supported TR1 Functions]
 
-See also the [link math_toolkit.special.extern_c.tr1
+See also the [link math_toolkit.special.extern_c.tr1
 quick reference guide for these functions].
 
    namespace boost{ namespace math{ namespace tr1{ extern "C"{
-
+
    // [5.2.1.1] associated Laguerre polynomials:
    double assoc_laguerre(unsigned n, unsigned m, double x);
    float assoc_laguerref(unsigned n, unsigned m, float x);
@@ -302,14 +302,14 @@
    double sph_neumann(unsigned n, double x);
    float sph_neumannf(unsigned n, float x);
    long double sph_neumannl(unsigned n, long double x);
-
+
    }}}} // namespaces
-
+
 In addition sufficient additional overloads of the `double` versions of the
 above functions are provided, so that calling the function with any mixture
 of `float`, `double`, `long double`, or /integer/ arguments is supported, with the
 return type determined by the __arg_pomotion_rules.
-
+
 [h4 Currently Unsupported C99 Functions]
 
    double exp2(double x);
@@ -371,7 +371,7 @@
    double scalbn(double x, int ex);
    float scalbnf(float x, int ex);
    long double scalbnl(long double x, int ex);
-
+
 [h4 Currently Unsupported TR1 Functions]
 
    // [5.2.1.7] confluent hypergeometric functions:
@@ -388,10 +388,11 @@
 
 ]
 
-[/
+[/
   Copyright 2008 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/tr1_ref.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1_ref.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1_ref.qbk 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -4,7 +4,7 @@
 [h4 Supported TR1 Functions]
 
    namespace boost{ namespace math{ namespace tr1{ extern "C"{
-
+
    // [5.2.1.1] associated Laguerre polynomials:
    double assoc_laguerre(unsigned n, unsigned m, double x);
    float assoc_laguerref(unsigned n, unsigned m, float x);
@@ -111,14 +111,14 @@
    double sph_neumann(unsigned n, double x);
    float sph_neumannf(unsigned n, float x);
    long double sph_neumannl(unsigned n, long double x);
-
+
    }}}} // namespaces
-
+
 In addition sufficient additional overloads of the `double` versions of the
 above functions are provided, so that calling the function with any mixture
 of `float`, `double`, `long double`, or /integer/ arguments is supported, with the
 return type determined by the __arg_pomotion_rules.
-
+
 For example:
 
    expintf(2.0f); // float version, returns float.
@@ -134,7 +134,7 @@
    double assoc_laguerre(unsigned n, unsigned m, double x);
    float assoc_laguerref(unsigned n, unsigned m, float x);
    long double assoc_laguerrel(unsigned n, unsigned m, long double x);
-
+
 The assoc_laguerre functions return:
 
 [equation laguerre_1]
@@ -156,7 +156,7 @@
    double beta(double x, double y);
    float betaf(float x, float y);
    long double betal(long double x, long double y);
-
+
 Returns the beta function of /x/ and /y/:
 
 [equation beta1]
@@ -344,7 +344,7 @@
    double sph_legendre(unsigned l, unsigned m, double theta);
    float sph_legendref(unsigned l, unsigned m, float theta);
    long double sph_legendrel(unsigned l, unsigned m, long double theta);
-
+
 Returns the spherical associated Legendre function of /l/, /m/ and /theta/:
 
 [equation spherical_3]
@@ -377,14 +377,14 @@
    float hypergf(float a, float b, float c, float x);
    long double hypergl(long double a, long double b, long double c,
    long double x);
-
+
 [note These two functions are not implemented as they are not believed
 to be numerically stable.]
 
 
 [endsect]
 
-[/
+[/
   Copyright 2008, 2009 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

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -312,7 +312,7 @@
       }
    case 28:
       {
- // log1p over [-0.5,0.5]
+ // log1p over [-0.5,0.5]
          boost::math::ntl::RR y = x;
          if(fabs(y) < 1e-100)
             y = (y == 0) ? 1e-100 : boost::math::sign(y) * 1e-100;

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -39,6 +39,7 @@
       # Sunpro has problems building regex as a shared lib:
       <toolset>sun:<link>static
       <define>BOOST_ALL_NO_LIB=1
+ <define>BOOST_UBLAS_UNSUPPORTED_COMPILER=0
       <include>.
       <include>$(ntl-path)/include
       <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx
@@ -64,25 +65,78 @@
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_binomial_float ;
 run test_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_binomial_double ;
 run test_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_binomial_long_double ;
 run test_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
- : test_binomial_real_concept ;
+ <define>TEST_ROUNDING=0
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept0 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=1
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept1 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=2
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept2 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=3
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept3 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=4
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept4 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=5
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept5 ;
+run test_binomial.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_ROUNDING=6
+ <toolset>intel:<pch>off
+ : test_binomial_real_concept6 ;
 run test_binomial_coeff.cpp pch ;
 run test_carlson.cpp pch ;
 run test_cauchy.cpp ;
@@ -111,157 +165,250 @@
         : # input files
         : # requirements
               <define>TEST_QUANT=0
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist0 ;
 run test_hypergeometric_dist.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_QUANT=1
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist1 ;
 run test_hypergeometric_dist.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_QUANT=2
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist2 ;
 run test_hypergeometric_dist.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_QUANT=3
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist3 ;
 run test_hypergeometric_dist.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_QUANT=4
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist4 ;
 run test_hypergeometric_dist.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_QUANT=5
+ <toolset>intel:<pch>off
         : test_hypergeometric_dist5 ;
 run test_ibeta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_ibeta_float ;
 run test_ibeta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_double ;
 run test_ibeta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_long_double ;
 run test_ibeta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
- : test_ibeta_real_concept ;
+ <define>TEST_DATA=1
+ <toolset>intel:<pch>off
+ : test_ibeta_real_concept1 ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=2
+ <toolset>intel:<pch>off
+ : test_ibeta_real_concept2 ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=3
+ <toolset>intel:<pch>off
+ : test_ibeta_real_concept3 ;
+run test_ibeta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=4
+ <toolset>intel:<pch>off
+ : test_ibeta_real_concept4 ;
 run test_ibeta_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_ibeta_inv_float ;
 run test_ibeta_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_inv_double ;
 run test_ibeta_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_inv_long_double ;
 run test_ibeta_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
- : test_ibeta_inv_real_concept ;
+ <define>TEST_DATA=1
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_real_concept1 ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=2
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_real_concept2 ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=3
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_real_concept3 ;
+run test_ibeta_inv.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=4
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_real_concept4 ;
 run test_ibeta_inv_ab.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_ibeta_inv_ab_float ;
 run test_ibeta_inv_ab.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_inv_ab_double ;
 run test_ibeta_inv_ab.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_ibeta_inv_ab_long_double ;
 run test_ibeta_inv_ab.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
- : test_ibeta_inv_ab_real_concept ;
+ <define>TEST_DATA=1
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_ab_real_concept1 ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=2
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_ab_real_concept2 ;
+run test_ibeta_inv_ab.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=3
+ <toolset>intel:<pch>off
+ : test_ibeta_inv_ab_real_concept3 ;
 run test_igamma.cpp pch ;
 run test_igamma_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_igamma_inv_float ;
 run test_igamma_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_igamma_inv_double ;
 run test_igamma_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_igamma_inv_long_double ;
 run test_igamma_inv.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_igamma_inv_real_concept ;
 run test_igamma_inva.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_igamma_inva_float ;
 run test_igamma_inva.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_igamma_inva_double ;
 run test_igamma_inva.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_igamma_inva_long_double ;
 run test_igamma_inva.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_igamma_inva_real_concept ;
 run test_instantiate1.cpp test_instantiate2.cpp ;
 run test_laplace.cpp /boost/unit_test//boost_unit_test_framework/<link>static ;
@@ -276,24 +423,28 @@
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_negative_binomial_float ;
 run test_negative_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_negative_binomial_double ;
 run test_negative_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_negative_binomial_long_double ;
 run test_negative_binomial.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_negative_binomial_real_concept ;
 run test_next.cpp pch pch ;
 run test_nc_chi_squared.cpp pch
@@ -301,73 +452,94 @@
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_nc_chi_squared_float ;
 run test_nc_chi_squared.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_nc_chi_squared_double ;
 run test_nc_chi_squared.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_nc_chi_squared_long_double ;
 run test_nc_chi_squared.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_nc_chi_squared_real_concept ;
 run test_nc_beta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_nc_beta_float ;
 run test_nc_beta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_nc_beta_double ;
 run test_nc_beta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_nc_beta_long_double ;
 run test_nc_beta.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
- : test_nc_beta_real_concept ;
+ <define>TEST_DATA=1
+ <toolset>intel:<pch>off
+ : test_nc_beta_real_concept1 ;
+run test_nc_beta.cpp
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_REAL_CONCEPT
+ <define>TEST_DATA=2
+ <toolset>intel:<pch>off
+ : test_nc_beta_real_concept2 ;
 run test_nc_f.cpp pch ;
 run test_nc_t.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_nc_t_float ;
 run test_nc_t.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_nc_t_double ;
 run test_nc_t.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_nc_t_long_double ;
 run test_nc_t.cpp pch
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_nc_t_real_concept ;
 run test_normal.cpp pch ;
 run test_pareto.cpp ;
@@ -376,24 +548,28 @@
         : # input files
         : # requirements
               <define>TEST_FLOAT
+ <toolset>intel:<pch>off
         : test_poisson_float ;
 run test_poisson.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_DOUBLE
+ <toolset>intel:<pch>off
         : test_poisson_double ;
 run test_poisson.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_LDOUBLE
+ <toolset>intel:<pch>off
         : test_poisson_long_double ;
 run test_poisson.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_REAL_CONCEPT
+ <toolset>intel:<pch>off
         : test_poisson_real_concept ;
 run test_rayleigh.cpp ;
 
@@ -433,6 +609,11 @@
 
 run test_policy.cpp ;
 run test_policy_2.cpp ;
+run test_policy_3.cpp ;
+run test_policy_4.cpp ;
+run test_policy_5.cpp ;
+run test_policy_6.cpp ;
+run test_policy_7.cpp ;
 run test_policy_sf.cpp ;
 
 run test_tr1.cpp
@@ -452,80 +633,80 @@
    test_tr1_long_double
    ;
 
-compile compile_test/compl_abs_incl_test.cpp ;
-compile compile_test/compl_acos_incl_test.cpp ;
-compile compile_test/compl_acosh_incl_test.cpp ;
-compile compile_test/compl_asin_incl_test.cpp ;
-compile compile_test/compl_asinh_incl_test.cpp ;
-compile compile_test/compl_atan_incl_test.cpp ;
-compile compile_test/compl_atanh_incl_test.cpp ;
-compile compile_test/dist_bernoulli_incl_test.cpp ;
-compile compile_test/dist_beta_incl_test.cpp ;
-compile compile_test/dist_binomial_incl_test.cpp ;
-compile compile_test/dist_cauchy_incl_test.cpp ;
-compile compile_test/dist_chi_squared_incl_test.cpp ;
-compile compile_test/dist_complement_incl_test.cpp ;
-compile compile_test/dist_exponential_incl_test.cpp ;
-compile compile_test/dist_extreme_val_incl_test.cpp ;
-compile compile_test/dist_find_location_incl_test.cpp ;
-compile compile_test/dist_find_scale_incl_test.cpp ;
-compile compile_test/dist_fisher_f_incl_test.cpp ;
-compile compile_test/dist_gamma_incl_test.cpp ;
-compile compile_test/dist_hypergeo_incl_test.cpp ;
-compile compile_test/dist_laplace_incl_test.cpp ;
-compile compile_test/dist_logistic_incl_test.cpp ;
-compile compile_test/dist_lognormal_incl_test.cpp ;
-compile compile_test/dist_neg_binom_incl_test.cpp ;
-compile compile_test/dist_nc_chi_squ_incl_test.cpp ;
-compile compile_test/dist_nc_beta_incl_test.cpp ;
-compile compile_test/dist_nc_f_incl_test.cpp ;
-compile compile_test/dist_nc_t_incl_test.cpp ;
-compile compile_test/dist_normal_incl_test.cpp ;
-compile compile_test/dist_poisson_incl_test.cpp ;
-compile compile_test/dist_students_t_incl_test.cpp ;
-compile compile_test/dist_triangular_incl_test.cpp ;
-compile compile_test/dist_uniform_incl_test.cpp ;
-compile compile_test/dist_weibull_incl_test.cpp ;
-compile compile_test/distribution_concept_check.cpp ;
-compile compile_test/sf_beta_incl_test.cpp ;
-compile compile_test/sf_bessel_incl_test.cpp ;
-compile compile_test/sf_binomial_incl_test.cpp ;
-compile compile_test/sf_cbrt_incl_test.cpp ;
-compile compile_test/sf_cos_pi_incl_test.cpp ;
-compile compile_test/sf_digamma_incl_test.cpp ;
-compile compile_test/sf_ellint_1_incl_test.cpp ;
-compile compile_test/sf_ellint_2_incl_test.cpp ;
-compile compile_test/sf_ellint_3_incl_test.cpp ;
-compile compile_test/sf_ellint_rc_incl_test.cpp ;
-compile compile_test/sf_ellint_rd_incl_test.cpp ;
-compile compile_test/sf_ellint_rf_incl_test.cpp ;
-compile compile_test/sf_ellint_rj_incl_test.cpp ;
-compile compile_test/sf_erf_incl_test.cpp ;
-compile compile_test/sf_expint_incl_test.cpp ;
-compile compile_test/sf_expm1_incl_test.cpp ;
-compile compile_test/sf_factorials_incl_test.cpp ;
-compile compile_test/sf_fpclassify_incl_test.cpp ;
-compile compile_test/sf_gamma_incl_test.cpp ;
-compile compile_test/sf_hermite_incl_test.cpp ;
-compile compile_test/sf_hypot_incl_test.cpp ;
-compile compile_test/sf_laguerre_incl_test.cpp ;
+run compile_test/compl_abs_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_acos_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_acosh_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_asin_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_asinh_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_atan_incl_test.cpp compile_test/main.cpp ;
+run compile_test/compl_atanh_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_bernoulli_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_beta_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_binomial_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_cauchy_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_chi_squared_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_complement_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_exponential_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_extreme_val_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_find_location_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_find_scale_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_fisher_f_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_gamma_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_hypergeo_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_laplace_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_logistic_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_lognormal_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_neg_binom_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_nc_chi_squ_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_nc_beta_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_nc_f_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_nc_t_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_normal_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_poisson_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_students_t_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_triangular_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_uniform_incl_test.cpp compile_test/main.cpp ;
+run compile_test/dist_weibull_incl_test.cpp compile_test/main.cpp ;
+run compile_test/distribution_concept_check.cpp ;
+run compile_test/sf_beta_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_bessel_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_binomial_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_cbrt_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_cos_pi_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_digamma_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_1_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_2_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_3_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_rc_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_rd_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_rf_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_ellint_rj_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_erf_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_expint_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_expm1_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_factorials_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_fpclassify_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_gamma_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_hermite_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_hypot_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_laguerre_incl_test.cpp compile_test/main.cpp ;
 compile compile_test/sf_lanczos_incl_test.cpp ;
-compile compile_test/sf_legendre_incl_test.cpp ;
-compile compile_test/sf_log1p_incl_test.cpp ;
+run compile_test/sf_legendre_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_log1p_incl_test.cpp compile_test/main.cpp ;
 compile compile_test/sf_math_fwd_incl_test.cpp ;
-compile compile_test/sf_modf_incl_test.cpp ;
-compile compile_test/sf_next_incl_test.cpp ;
-compile compile_test/sf_powm1_incl_test.cpp ;
-compile compile_test/sf_round_incl_test.cpp ;
-compile compile_test/sf_sign_incl_test.cpp ;
-compile compile_test/sf_sin_pi_incl_test.cpp ;
-compile compile_test/sf_sinc_incl_test.cpp ;
-compile compile_test/sf_sinhc_incl_test.cpp ;
-compile compile_test/sf_sph_harm_incl_test.cpp ;
-compile compile_test/sf_sqrt1pm1_incl_test.cpp ;
-compile compile_test/sf_trunc_incl_test.cpp ;
-compile compile_test/sf_zeta_incl_test.cpp ;
-compile compile_test/std_real_concept_check.cpp ;
+run compile_test/sf_modf_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_next_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_powm1_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_round_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sign_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sin_pi_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sinc_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sinhc_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sph_harm_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_sqrt1pm1_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_trunc_incl_test.cpp compile_test/main.cpp ;
+run compile_test/sf_zeta_incl_test.cpp compile_test/main.cpp ;
+run compile_test/std_real_concept_check.cpp ;
 compile compile_test/test_traits.cpp ;
 compile compile_test/tools_config_inc_test.cpp ;
 compile compile_test/tools_fraction_inc_test.cpp ;
@@ -547,3 +728,5 @@
 compile mpfr_concept_check.cpp : <dependency>../config//has_mpfr_class ;
 
 build-project ../example ;
+
+

Modified: sandbox/math_toolkit/libs/math/test/acosh_data.ipp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/acosh_data.ipp (original)
+++ sandbox/math_toolkit/libs/math/test/acosh_data.ipp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 261> acosh_data = {{
       { SC_(1.000001430511474609375), SC_(0.001691455665129294448190238354291760044433) },

Modified: sandbox/math_toolkit/libs/math/test/asinh_data.ipp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/asinh_data.ipp (original)
+++ sandbox/math_toolkit/libs/math/test/asinh_data.ipp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 281> asinh_data = {{
       { SC_(-497.181640625), SC_(-6.902103625349694816896128061929344488774) },

Modified: sandbox/math_toolkit/libs/math/test/atanh_data.ipp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/atanh_data.ipp (original)
+++ sandbox/math_toolkit/libs/math/test/atanh_data.ipp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 260> atanh_data = {{
       { SC_(-0.9999983310699462890625), SC_(-6.998237084679026894944012639589359039154) },

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_find_location_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_find_location_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_find_location_incl_test.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -7,4 +7,55 @@
 // #includes all the files that it needs to.
 //
 #include <boost/math/distributions/find_location.hpp>
+//
+// Note this header includes no other headers, this is
+// important if this test is to be meaningful:
+//
+#include "test_compile_result.hpp"
+
+template <class T, class Policy = boost::math::policies::policy<> >
+class test_distribution
+{
+public:
+ typedef T value_type;
+ typedef Policy policy_type;
+ test_distribution(){}
+};
+
+template <class T, class Policy>
+T quantile(const test_distribution<T, Policy>&, T)
+{
+ return 0;
+}
+
+template <class T, class Policy>
+T quantile(const boost::math::complemented2_type<test_distribution<T, Policy>, T>&)
+{
+ return 0;
+}
+
+namespace boost{ namespace math{ namespace tools{
+
+ template <class T, class Policy> struct is_distribution<test_distribution<T, Policy> > : public mpl::true_{};
+ template <class T, class Policy> struct is_scaled_distribution<test_distribution<T, Policy> > : public mpl::true_{};
+
+}}}
+
+void check()
+{
+ check_result<float>(boost::math::find_location<test_distribution<float> >(f, f, f, boost::math::policies::policy<>()));
+ check_result<double>(boost::math::find_location<test_distribution<double> >(d, d, d, boost::math::policies::policy<>()));
+ check_result<long double>(boost::math::find_location<test_distribution<long double> >(l, l, l, boost::math::policies::policy<>()));
+
+ check_result<float>(boost::math::find_location<test_distribution<float> >(f, f, f));
+ check_result<double>(boost::math::find_location<test_distribution<double> >(d, d, d));
+ check_result<long double>(boost::math::find_location<test_distribution<long double> >(l, l, l));
+
+ check_result<float>(boost::math::find_location<test_distribution<float> >(boost::math::complement(f, f, f, boost::math::policies::policy<>())));
+ check_result<double>(boost::math::find_location<test_distribution<double> >(boost::math::complement(d, d, d, boost::math::policies::policy<>())));
+ check_result<long double>(boost::math::find_location<test_distribution<long double> >(boost::math::complement(l, l, l, boost::math::policies::policy<>())));
 
+ check_result<float>(boost::math::find_location<test_distribution<float> >(boost::math::complement(f, f, f)));
+ check_result<double>(boost::math::find_location<test_distribution<double> >(boost::math::complement(d, d, d)));
+ check_result<long double>(boost::math::find_location<test_distribution<long double> >(boost::math::complement(l, l, l)));
+}

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_find_scale_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_find_scale_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_find_scale_incl_test.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -7,4 +7,56 @@
 // #includes all the files that it needs to.
 //
 #include <boost/math/distributions/find_scale.hpp>
+//
+// Note this header includes no other headers, this is
+// important if this test is to be meaningful:
+//
+#include "test_compile_result.hpp"
+
+template <class T, class Policy = boost::math::policies::policy<> >
+class test_distribution
+{
+public:
+ typedef T value_type;
+ typedef Policy policy_type;
+ test_distribution(){}
+};
+
+template <class T, class Policy>
+T quantile(const test_distribution<T, Policy>&, T)
+{
+ return 0;
+}
+
+template <class T, class Policy>
+T quantile(const boost::math::complemented2_type<test_distribution<T, Policy>, T>&)
+{
+ return 0;
+}
+
+namespace boost{ namespace math{ namespace tools{
+
+ template <class T, class Policy> struct is_distribution<test_distribution<T, Policy> > : public mpl::true_{};
+ template <class T, class Policy> struct is_scaled_distribution<test_distribution<T, Policy> > : public mpl::true_{};
+
+}}}
+
+void check()
+{
+ check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f, boost::math::policies::policy<>()));
+ check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d, boost::math::policies::policy<>()));
+ check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l, boost::math::policies::policy<>()));
+
+ check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f));
+ check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d));
+ check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l));
+
+ check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f, boost::math::policies::policy<>())));
+ check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d, boost::math::policies::policy<>())));
+ check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l, boost::math::policies::policy<>())));
+
+ check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f)));
+ check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d)));
+ check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l)));
+}
 

Modified: sandbox/math_toolkit/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/dist_nc_beta_incl_test.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -17,19 +17,34 @@
 namespace boost{ namespace math{
 
 template <class T, class Policy>
-T mean(const non_central_beta_distribution<T, Policy>&);
+T mean(const non_central_beta_distribution<T, Policy>&)
+{
+ return 0;
+}
 
 template <class T, class Policy>
-T variance(const non_central_beta_distribution<T, Policy>&);
+T variance(const non_central_beta_distribution<T, Policy>&)
+{
+ return 0;
+}
 
 template <class T, class Policy>
-T skewness(const non_central_beta_distribution<T, Policy>&);
+T skewness(const non_central_beta_distribution<T, Policy>&)
+{
+ return 0;
+}
 
 template <class T, class Policy>
-T kurtosis(const non_central_beta_distribution<T, Policy>&);
+T kurtosis(const non_central_beta_distribution<T, Policy>&)
+{
+ return 0;
+}
 
 template <class T, class Policy>
-T kurtosis_excess(const non_central_beta_distribution<T, Policy>&);
+T kurtosis_excess(const non_central_beta_distribution<T, Policy>&)
+{
+ return 0;
+}
 
 }}
 

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -183,7 +183,7 @@
    (boost::math::isfinite)(v1);
    (boost::math::isnormal)(v1);
    (boost::math::isnan)(v1);
- boost::math::isinf(v1);
+ (boost::math::isinf)(v1);
    boost::math::log1p(v1);
    boost::math::expm1(v1);
    boost::math::cbrt(v1);
@@ -260,6 +260,7 @@
    boost::math::float_next(v1);
    boost::math::float_prior(v1);
    boost::math::float_distance(v1, v1);
+#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
    //
    // All over again, with a policy this time:
    //
@@ -505,6 +506,7 @@
    test::float_next(v1);
    test::float_prior(v1);
    test::float_distance(v1, v1);
+#endif
 }
 
 template <class RealType>

Modified: sandbox/math_toolkit/libs/math/test/compile_test/sf_next_incl_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/sf_next_incl_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/sf_next_incl_test.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -39,4 +39,10 @@
    check_result<long double>(boost::math::float_distance<long double>(l, l));
 #endif
 
+ check_result<float>(boost::math::float_advance<float>(f, 2));
+ check_result<double>(boost::math::float_advance<double>(d, 2));
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ check_result<long double>(boost::math::float_advance<long double>(l, 2));
+#endif
+
 }

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -191,10 +191,11 @@
 
 
 
-int main()
+int main(int argc, char*[])
 {
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- instantiate(boost::math::concepts::std_real_concept(0));
+ if(argc > 1000)
+ 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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -42,6 +42,18 @@
    return check_result_imp(a, b);
 }
 
+union max_align_type
+{
+ char c;
+ short s;
+ int i;
+ long l;
+ double d;
+ long double ld;
+#ifdef BOOST_HAS_LONG_LONG
+ long long ll;
+#endif
+};
 
 template <class Distribution>
 struct DistributionConcept
@@ -115,7 +127,15 @@
       check_result<value_type>(chf(dist, li));
    }
 private:
- static Distribution* get_object_p();
+ static void* storage()
+ {
+ static max_align_type storage[sizeof(Distribution)];
+ return storage;
+ }
+ static Distribution* get_object_p()
+ {
+ return static_cast<Distribution*>(storage());
+ }
    static Distribution& get_object()
    {
       // will never get called:

Modified: sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -130,6 +130,14 @@
       BOOST_CHECK_EQUAL(boost::math::log1p(m_one), -std::numeric_limits<T>::infinity());
       BOOST_CHECK_EQUAL(boost::math::expm1(-std::numeric_limits<T>::infinity()), m_one);
       BOOST_CHECK_EQUAL(boost::math::expm1(std::numeric_limits<T>::infinity()), std::numeric_limits<T>::infinity());
+#ifndef __BORLANDC__
+ // When building with Borland's compiler, simply the *presence*
+ // of these tests cause other unrelated tests to fail!!! :-(
+ using namespace boost::math::policies;
+ typedef policy<overflow_error<throw_on_error> > pol;
+ BOOST_CHECK_THROW(boost::math::log1p(m_one, pol()), std::overflow_error);
+ BOOST_CHECK_THROW(boost::math::expm1(std::numeric_limits<T>::infinity(), pol()), std::overflow_error);
+#endif
    }
 }
 
@@ -158,3 +166,4 @@
 #endif
    return 0;
 }
+

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -452,7 +452,9 @@
         SC_(1), SC_(10667654)/(1024*1024), SC_(1.24591331097191900488116495350277530373473085499043086981229e-7),
     };
 
- static const boost::array<boost::array<T, 3>, 14> jn_data = {
+ static const boost::array<boost::array<T, 3>, 15> jn_data = {
+ // This first one is a modified test case from https://svn.boost.org/trac/boost/ticket/2733
+ SC_(-1), SC_(1.25), SC_(-0.510623260319880467069474837274910375352924050139633057168856),
         SC_(2), SC_(0), SC_(0),
         SC_(2), SC_(1e-02), SC_(1.249989583365885362413250958437642113452e-05),
         SC_(5), SC_(10), SC_(-0.2340615281867936404436949416457777864635),

Modified: sandbox/math_toolkit/libs/math/test/test_binomial.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_binomial.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_binomial.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -218,7 +218,8 @@
   RealType tolerance = (std::max)
       (boost::math::tools::epsilon<RealType>(),
       static_cast<RealType>(std::numeric_limits<double>::epsilon()));
- tolerance *= 100 * 1000;
+ tolerance *= 100 * 1000;
+ RealType tol2 = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a persent
 
   cout << "Tolerance = " << tolerance << "%." << endl;
 
@@ -234,6 +235,7 @@
   using ::boost::math::cdf;
   using ::boost::math::pdf;
 
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 0)
   // Test binomial using cdf spot values from MathCAD.
   // These test quantiles and complements as well.
   test_spot(
@@ -438,7 +440,6 @@
     static_cast<RealType>(0.00001525878906250000000000000000), // k=8 p = 0.25
     tolerance);
 
- RealType tol2 = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a persent
     binomial_distribution<RealType> dist(static_cast<RealType>(8), static_cast<RealType>(0.25));
     RealType x = static_cast<RealType>(0.125);
     using namespace std; // ADL of std names.
@@ -590,6 +591,8 @@
           static_cast<RealType>(7)), static_cast<RealType>(0)
        );
 
+#endif
+
   {
     // This is a visual sanity check that everything is OK:
     binomial_distribution<RealType> my8dist(8., 0.25); // Note: double values (matching the distribution definition) avoid the need for any casting.
@@ -623,7 +626,13 @@
     //7 0.00036621093749999984 0.9999847412109375
     //8 1.52587890625e-005 1 1 0
   }
+#if !defined(TEST_REAL_CONCEPT)
 #define T RealType
+#else
+ // This reduces compile time and compiler memory usage by storing test data
+ // as an array of long double's rather than an array of real_concept's:
+#define T long double
+#endif
 #include "binomial_quantile.ipp"
 
   for(unsigned i = 0; i < binomial_quantile_data.size(); ++i)
@@ -638,54 +647,67 @@
      RealType tol = boost::math::tools::epsilon<RealType>() * 500;
      if(!boost::is_floating_point<RealType>::value)
         tol *= 10; // no lanczos approximation implies less accuracy
+ RealType x;
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 1)
      //
      // Check full real value first:
      //
      binomial_distribution<RealType, P1> p1(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
- RealType x = quantile(p1, binomial_quantile_data[i][2]);
- BOOST_CHECK_CLOSE_FRACTION(x, binomial_quantile_data[i][3], tol);
- x = quantile(complement(p1, binomial_quantile_data[i][2]));
- BOOST_CHECK_CLOSE_FRACTION(x, binomial_quantile_data[i][4], tol);
+ x = quantile(p1, binomial_quantile_data[i][2]);
+ BOOST_CHECK_CLOSE_FRACTION(x, (RealType)binomial_quantile_data[i][3], tol);
+ x = quantile(complement(p1, (RealType)binomial_quantile_data[i][2]));
+ BOOST_CHECK_CLOSE_FRACTION(x, (RealType)binomial_quantile_data[i][4], tol);
+#endif
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 2)
      //
      // Now with round down to integer:
      //
      binomial_distribution<RealType, P2> p2(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
      x = quantile(p2, binomial_quantile_data[i][2]);
- BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][3]));
+ BOOST_CHECK_EQUAL(x, (RealType)floor(binomial_quantile_data[i][3]));
      x = quantile(complement(p2, binomial_quantile_data[i][2]));
- BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][4]));
+ BOOST_CHECK_EQUAL(x, (RealType)floor(binomial_quantile_data[i][4]));
+#endif
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 3)
      //
      // Now with round up to integer:
      //
      binomial_distribution<RealType, P3> p3(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
      x = quantile(p3, binomial_quantile_data[i][2]);
- BOOST_CHECK_EQUAL(x, ceil(binomial_quantile_data[i][3]));
+ BOOST_CHECK_EQUAL(x, (RealType)ceil(binomial_quantile_data[i][3]));
      x = quantile(complement(p3, binomial_quantile_data[i][2]));
- BOOST_CHECK_EQUAL(x, ceil(binomial_quantile_data[i][4]));
+ BOOST_CHECK_EQUAL(x, (RealType)ceil(binomial_quantile_data[i][4]));
+#endif
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 4)
      //
      // Now with round to integer "outside":
      //
      binomial_distribution<RealType, P4> p4(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
      x = quantile(p4, binomial_quantile_data[i][2]);
- BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][3]) : ceil(binomial_quantile_data[i][3]));
+ BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][3]) : ceil(binomial_quantile_data[i][3])));
      x = quantile(complement(p4, binomial_quantile_data[i][2]));
- BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][4]) : floor(binomial_quantile_data[i][4]));
+ BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][4]) : floor(binomial_quantile_data[i][4])));
+#endif
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 5)
      //
      // Now with round to integer "inside":
      //
      binomial_distribution<RealType, P5> p5(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
      x = quantile(p5, binomial_quantile_data[i][2]);
- BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][3]) : floor(binomial_quantile_data[i][3]));
+ BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][3]) : floor(binomial_quantile_data[i][3])));
      x = quantile(complement(p5, binomial_quantile_data[i][2]));
- BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][4]) : ceil(binomial_quantile_data[i][4]));
+ BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][4]) : ceil(binomial_quantile_data[i][4])));
+#endif
+#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 6)
      //
      // Now with round to nearest integer:
      //
      binomial_distribution<RealType, P6> p6(binomial_quantile_data[i][0], binomial_quantile_data[i][1]);
      x = quantile(p6, binomial_quantile_data[i][2]);
- BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][3] + 0.5f));
+ BOOST_CHECK_EQUAL(x, (RealType)(floor(binomial_quantile_data[i][3] + 0.5f)));
      x = quantile(complement(p6, binomial_quantile_data[i][2]));
- BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][4] + 0.5f));
+ BOOST_CHECK_EQUAL(x, (RealType)(floor(binomial_quantile_data[i][4] + 0.5f)));
+#endif
   }
 
 } // template <class RealType>void test_spots(RealType)

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -17,10 +17,46 @@
 #pragma warning(disable: 4127) // conditional expression is constant
 #endif
 
+const char* method_name(const boost::math::detail::native_tag&)
+{
+ return "Native";
+}
+
+const char* method_name(const boost::math::detail::generic_tag<true>&)
+{
+ return "Generic (with numeric limits)";
+}
+
+const char* method_name(const boost::math::detail::generic_tag<false>&)
+{
+ return "Generic (without numeric limits)";
+}
+
+const char* method_name(const boost::math::detail::ieee_tag&)
+{
+ return "IEEE std";
+}
+
+const char* method_name(const boost::math::detail::ieee_copy_all_bits_tag&)
+{
+ return "IEEE std, copy all bits";
+}
+
+const char* method_name(const boost::math::detail::ieee_copy_leading_bits_tag&)
+{
+ return "IEEE std, copy leading bits";
+}
+
 template <class T>
 void test_classify(T t, const char* type)
 {
    std::cout << "Testing type " << type << std::endl;
+
+ typedef typename boost::math::detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+
+ std::cout << "Evaluation method = " << method_name(method()) << std::endl;
+
    t = 2;
    T u = 2;
    BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL);
@@ -52,6 +88,7 @@
    }
    if(std::numeric_limits<T>::has_denorm)
    {
+ t = (std::numeric_limits<T>::min)();
       t /= 2;
       if(t != 0)
       {

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -22,8 +22,8 @@
 {
    // Basic sanity checks for constants.
 
- RealType tolerance = static_cast<RealType>(2e-15); // double
- //cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ RealType tolerance = boost::math::tools::epsilon<RealType>() * 2; // double
+ std::cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << std::endl;
 
    using namespace boost::math::constants;
    using namespace std; // Help ADL of std exp, log...
@@ -88,3 +88,6 @@
 
 
 
+
+
+

Modified: sandbox/math_toolkit/libs/math/test/test_expint.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_expint.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_expint.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -117,6 +117,13 @@
          ".*", 150, 50); // test function
    }
    add_expected_result(
+ "Sun.*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ "real_concept", // test type(s)
+ ".*Ei.*", // test data group
+ ".*", 150, 50); // test function
+ add_expected_result(
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -365,21 +365,29 @@
    // The contents are as follows, each row of data contains
    // five items, input value a, input value b, integration limits x, beta(a, b, x) and ibeta(a, b, x):
    //
+#if !defined(TEST_DATA) || (TEST_DATA == 1)
 # include "ibeta_small_data.ipp"
 
    do_test_beta(ibeta_small_data, name, "Incomplete Beta Function: Small Values");
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 2)
 # include "ibeta_data.ipp"
 
    do_test_beta(ibeta_data, name, "Incomplete Beta Function: Medium Values");
 
+#endif
+#if !defined(TEST_DATA) || (TEST_DATA == 3)
 # include "ibeta_large_data.ipp"
 
    do_test_beta(ibeta_large_data, name, "Incomplete Beta Function: Large and Diverse Values");
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 4)
 # include "ibeta_int_data.ipp"
 
    do_test_beta(ibeta_int_data, name, "Incomplete Beta Function: Small Integer Values");
+#endif
 }
 
 template <class T>

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -280,21 +280,29 @@
    // The contents are as follows, each row of data contains
    // five items, input value a, input value b, integration limits x, beta(a, b, x) and ibeta(a, b, x):
    //
+#if !defined(TEST_DATA) || (TEST_DATA == 1)
 # include "ibeta_small_data.ipp"
 
    test_inverses(ibeta_small_data);
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 2)
 # include "ibeta_data.ipp"
 
    test_inverses(ibeta_data);
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 3)
 # include "ibeta_large_data.ipp"
 
    test_inverses(ibeta_large_data);
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 4)
 # include "ibeta_inv_data.ipp"
 
    test_inverses2(ibeta_inv_data, name, "Inverse incomplete beta");
+#endif
 }
 
 template <class T>

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -256,17 +256,25 @@
    //
    std::cout << "Running sanity checks for type " << name << std::endl;
 
+#if !defined(TEST_DATA) || (TEST_DATA == 1)
 # include "ibeta_small_data.ipp"
 
    test_inverses(ibeta_small_data);
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 2)
 # include "ibeta_data.ipp"
 
    test_inverses(ibeta_data);
+#endif
 
+#if !defined(TEST_DATA) || (TEST_DATA == 3)
 # include "ibeta_large_data.ipp"
 
    test_inverses(ibeta_large_data);
+#endif
+
+#if !defined(TEST_REAL_CONCEPT) || defined(FULL_TEST)
 #ifndef FULL_TEST
    if(boost::is_floating_point<T>::value){
 #endif
@@ -282,6 +290,7 @@
 #ifndef FULL_TEST
    }
 #endif
+#endif
 }
 
 int test_main(int, char* [])

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -307,3 +307,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -67,13 +67,27 @@
       ".*", // stdlib
       ".*", // platform
       "real_concept", // test type(s)
+ "atanh.*", // test data group
+ ".*", 6, 2); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ largest_type, // test type(s)
+ "atanh.*", // test data group
+ ".*", 6, 1); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ "real_concept", // test type(s)
       ".*", // test data group
       ".*", 4, 2); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
- ".*", // test type(s)
+ largest_type, // test type(s)
       ".*", // test data group
       ".*", 4, 1); // test function
 

Modified: sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -395,14 +395,17 @@
 template <typename T>
 void test_accuracy(T, const char* type_name)
 {
+#if !defined(TEST_DATA) || (TEST_DATA == 1)
 #include "ncbeta.ipp"
     do_test_nc_chi_squared(ncbeta, type_name, "Non Central Beta, medium parameters");
     quantile_sanity_check(ncbeta, type_name, "Non Central Beta, medium parameters");
-
+#endif
+#if !defined(TEST_DATA) || (TEST_DATA == 2)
 #include "ncbeta_big.ipp"
     do_test_nc_chi_squared(ncbeta_big, type_name, "Non Central Beta, large parameters");
     // Takes too long to run:
     // quantile_sanity_check(ncbeta_big, type_name, "Non Central Beta, large parameters");
+#endif
 }
 
 int test_main(int, char* [])

Modified: sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -193,7 +193,7 @@
 {
    RealType tolerance = (std::max)(
       boost::math::tools::epsilon<RealType>(),
- (RealType)boost::math::tools::epsilon<double>() * 5) * 100;
+ (RealType)boost::math::tools::epsilon<double>() * 5) * 150;
    //
    // At float precision we need to up the tolerance, since
    // the input values are rounded off to inexact quantities
@@ -548,3 +548,4 @@
    return 0;
 } // int test_main(int, char* [])
 
+

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 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -442,7 +442,7 @@
      RealType x = quantile(p1, poisson_quantile_data[i][1]);
      BOOST_CHECK_CLOSE_FRACTION(x, poisson_quantile_data[i][2], tol);
      x = quantile(complement(p1, poisson_quantile_data[i][1]));
- BOOST_CHECK_CLOSE_FRACTION(x, poisson_quantile_data[i][3], tol);
+ BOOST_CHECK_CLOSE_FRACTION(x, poisson_quantile_data[i][3], tol * 3);
      //
      // Now with round down to integer:
      //

Modified: sandbox/math_toolkit/libs/math/test/test_policy_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_2.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -39,76 +39,6 @@
    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> >::indeterminate_result_error_type, indeterminate_result_error<BOOST_MATH_INDETERMINATE_RESULT_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> >::indeterminate_result_error_type, indeterminate_result_error<BOOST_MATH_INDETERMINATE_RESULT_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::indeterminate_result_error_type, indeterminate_result_error<BOOST_MATH_INDETERMINATE_RESULT_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::indeterminate_result_error_type, indeterminate_result_error<BOOST_MATH_INDETERMINATE_RESULT_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(indeterminate_result_error<ignore_error>()), normalise<policy<indeterminate_result_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>(), indeterminate_result_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>, evaluation_error<ignore_error>, indeterminate_result_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>(), indeterminate_result_error<throw_on_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>, indeterminate_result_error<throw_on_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>(), indeterminate_result_error<throw_on_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>, indeterminate_result_error<throw_on_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>(), indeterminate_result_error<throw_on_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>, indeterminate_result_error<throw_on_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>(), indeterminate_result_error<throw_on_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>, indeterminate_result_error<throw_on_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>(), indeterminate_result_error<throw_on_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>, indeterminate_result_error<throw_on_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_tr1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_tr1.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_tr1.cpp 2009-02-26 12:57:27 EST (Thu, 26 Feb 2009)
@@ -3,11 +3,6 @@
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifdef _MSC_VER
-# pragma warning (disable : 4100) // unreferenced formal parameter
-// Can't just comment parameter out because reference or not depends on macro define.
-#endif
-
 #include <boost/test/included/test_exec_monitor.hpp>
 #include <boost/test/floating_point_comparison.hpp>
 #include <boost/math/tools/precision.hpp>
@@ -21,6 +16,11 @@
 namespace tr1 = boost::math::tr1;
 #endif
 
+#ifdef _MSC_VER
+# pragma warning (disable : 4100) // unreferenced formal parameter
+// Can't just comment parameter out because reference or not depends on macro define.
+#endif
+
 void test_values(float, const char* name)
 {
    std::cout << "Testing type " << name << std::endl;


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