Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-08-03 06:13:59


Author: pbristow
Date: 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
New Revision: 38413
URL: http://svn.boost.org/trac/boost/changeset/38413

Log:
Paul's Big policy revison
Text files modified:
   sandbox/math_toolkit/boost/math/concepts/real_concept.hpp | 5
   sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp | 5
   sandbox/math_toolkit/boost/math/distributions/bernoulli.hpp | 26 +--
   sandbox/math_toolkit/boost/math/distributions/beta.hpp | 23 +-
   sandbox/math_toolkit/boost/math/distributions/binomial.hpp | 20 +--
   sandbox/math_toolkit/boost/math/distributions/cauchy.hpp | 25 +--
   sandbox/math_toolkit/boost/math/distributions/chi_squared.hpp | 16 +-
   sandbox/math_toolkit/boost/math/distributions/detail/common_error_handling.hpp | 15 +-
   sandbox/math_toolkit/boost/math/distributions/detail/derived_accessors.hpp | 4
   sandbox/math_toolkit/boost/math/distributions/detail/inv_discrete_quantile.hpp | 29 ++--
   sandbox/math_toolkit/boost/math/distributions/exponential.hpp | 10
   sandbox/math_toolkit/boost/math/distributions/extreme_value.hpp | 12
   sandbox/math_toolkit/boost/math/distributions/fisher_f.hpp | 20 +-
   sandbox/math_toolkit/boost/math/distributions/gamma.hpp | 13 +
   sandbox/math_toolkit/boost/math/distributions/lognormal.hpp | 9
   sandbox/math_toolkit/boost/math/distributions/negative_binomial.hpp | 36 ++--
   sandbox/math_toolkit/boost/math/distributions/normal.hpp | 3
   sandbox/math_toolkit/boost/math/distributions/pareto.hpp | 23 +-
   sandbox/math_toolkit/boost/math/distributions/poisson.hpp | 36 ++---
   sandbox/math_toolkit/boost/math/distributions/rayleigh.hpp | 10
   sandbox/math_toolkit/boost/math/distributions/students_t.hpp | 16 +-
   sandbox/math_toolkit/boost/math/distributions/triangular.hpp | 17 +-
   sandbox/math_toolkit/boost/math/distributions/uniform.hpp | 11
   sandbox/math_toolkit/boost/math/distributions/weibull.hpp | 11
   sandbox/math_toolkit/boost/math/policy/error_handling.hpp | 95 ++++++++-------
   sandbox/math_toolkit/boost/math/policy/policy.hpp | 37 +++--
   sandbox/math_toolkit/boost/math/special_functions/acosh.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/atanh.hpp | 11
   sandbox/math_toolkit/boost/math/special_functions/bessel.hpp | 86 ++++++------
   sandbox/math_toolkit/boost/math/special_functions/beta.hpp | 153 ++++++++++++------------
   sandbox/math_toolkit/boost/math/special_functions/binomial.hpp | 11
   sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_ik.hpp | 12
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy.hpp | 8
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy_asym.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k1.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_kn.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y0.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y1.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/detail/bessel_yn.hpp | 4
   sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp | 56 ++++----
   sandbox/math_toolkit/boost/math/special_functions/detail/gamma_inva.hpp | 9
   sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inv_ab.hpp | 13 +
   sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp | 59 ++++----
   sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp | 38 +++--
   sandbox/math_toolkit/boost/math/special_functions/detail/igamma_large.hpp | 3
   sandbox/math_toolkit/boost/math/special_functions/detail/t_distribution_inv.hpp | 19 +-
   sandbox/math_toolkit/boost/math/special_functions/digamma.hpp | 10
   sandbox/math_toolkit/boost/math/special_functions/ellint_1.hpp | 22 +-
   sandbox/math_toolkit/boost/math/special_functions/ellint_2.hpp | 18 +-
   sandbox/math_toolkit/boost/math/special_functions/ellint_3.hpp | 26 ++--
   sandbox/math_toolkit/boost/math/special_functions/ellint_rc.hpp | 12
   sandbox/math_toolkit/boost/math/special_functions/ellint_rd.hpp | 16 +-
   sandbox/math_toolkit/boost/math/special_functions/ellint_rf.hpp | 14 +-
   sandbox/math_toolkit/boost/math/special_functions/ellint_rj.hpp | 18 +-
   sandbox/math_toolkit/boost/math/special_functions/erf.hpp | 47 +++---
   sandbox/math_toolkit/boost/math/special_functions/expm1.hpp | 33 ++--
   sandbox/math_toolkit/boost/math/special_functions/factorials.hpp | 10
   sandbox/math_toolkit/boost/math/special_functions/gamma.hpp | 248 ++++++++++++++++++++-------------------
   sandbox/math_toolkit/boost/math/special_functions/hermite.hpp | 7
   sandbox/math_toolkit/boost/math/special_functions/hypot.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/laguerre.hpp | 15 +-
   sandbox/math_toolkit/boost/math/special_functions/lanczos.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/legendre.hpp | 25 ++-
   sandbox/math_toolkit/boost/math/special_functions/log1p.hpp | 49 ++++---
   sandbox/math_toolkit/boost/math/special_functions/math_fwd.hpp | 16 +-
   sandbox/math_toolkit/boost/math/special_functions/powm1.hpp | 3
   sandbox/math_toolkit/boost/math/special_functions/spherical_harmonic.hpp | 19 +-
   sandbox/math_toolkit/boost/math/special_functions/sqrt1pm1.hpp | 3
   sandbox/math_toolkit/boost/math/tools/minima.hpp | 3
   sandbox/math_toolkit/boost/math/tools/ntl.hpp | 15 +-
   sandbox/math_toolkit/boost/math/tools/precision.hpp | 2
   sandbox/math_toolkit/boost/math/tools/remez.hpp | 9
   sandbox/math_toolkit/boost/math/tools/roots.hpp | 9
   sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp | 14 +-
   sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj | 4
   sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj.user | 4
   sandbox/math_toolkit/libs/math/example/C_error_policy_example.cpp | 18 +-
   sandbox/math_toolkit/libs/math/example/Jamfile.v2 | 4
   sandbox/math_toolkit/libs/math/example/Neg_binomial_confidence_limits.cpp | 63 ++++-----
   sandbox/math_toolkit/libs/math/example/distribution_construction.cpp | 16 -
   sandbox/math_toolkit/libs/math/example/error_policies_example.cpp | 24 +-
   sandbox/math_toolkit/libs/math/example/error_policy_example.cpp | 6
   sandbox/math_toolkit/libs/math/example/neg_binomial_sample_sizes.cpp | 96 ++++----------
   sandbox/math_toolkit/libs/math/example/negative_binomial_construction_examples.cpp | 12 -
   sandbox/math_toolkit/libs/math/example/negative_binomial_example1.cpp | 58 +--------
   sandbox/math_toolkit/libs/math/example/negative_binomial_example2.cpp | 94 +++++---------
   sandbox/math_toolkit/libs/math/example/negative_binomial_example3.cpp | 12 -
   sandbox/math_toolkit/libs/math/test/Jamfile.v2 | 9 +
   sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp | 2
   sandbox/math_toolkit/libs/math/test/std_real_concept_check.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp | 23 --
   sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_beta.cpp | 5
   sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp | 30 ----
   sandbox/math_toolkit/libs/math/test/test_binomial.cpp | 73 -----------
   sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_carlson.cpp | 11
   sandbox/math_toolkit/libs/math/test/test_cauchy.cpp | 67 ++++-----
   sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp | 33 ----
   sandbox/math_toolkit/libs/math/test/test_constants.cpp | 19 --
   sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp | 31 ++--
   sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp | 2
   sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp | 11
   sandbox/math_toolkit/libs/math/test/test_erf.cpp | 150 ++++++++++++++++++++++-
   sandbox/math_toolkit/libs/math/test/test_error_handling.cpp | 116 ++++++++++++++----
   sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp | 40 +----
   sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp | 35 ----
   sandbox/math_toolkit/libs/math/test/test_factorials.cpp | 23 --
   sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp | 31 ----
   sandbox/math_toolkit/libs/math/test/test_gamma.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp | 28 +---
   sandbox/math_toolkit/libs/math/test/test_hermite.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_ibeta.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_igamma.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp | 7
   sandbox/math_toolkit/libs/math/test/test_laguerre.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_legendre.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_lognormal.cpp | 62 +++------
   sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp | 70 +++-------
   sandbox/math_toolkit/libs/math/test/test_normal.cpp | 36 +----
   sandbox/math_toolkit/libs/math/test/test_pareto.cpp | 18 --
   sandbox/math_toolkit/libs/math/test/test_poisson.cpp | 107 +----------------
   sandbox/math_toolkit/libs/math/test/test_policy.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp | 25 ---
   sandbox/math_toolkit/libs/math/test/test_roots.cpp | 13 +
   sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_students_t.cpp | 28 ---
   sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp | 3
   sandbox/math_toolkit/libs/math/test/test_triangular.cpp | 46 +-----
   sandbox/math_toolkit/libs/math/test/test_uniform.cpp | 43 ++----
   sandbox/math_toolkit/libs/math/test/test_weibull.cpp | 44 ++++---
   sandbox/math_toolkit/libs/math/tools/carlson_ellint_data.cpp | 9
   sandbox/math_toolkit/libs/math/tools/ellint_pi2_data.cpp | 9
   sandbox/math_toolkit/libs/math/tools/ellint_pi3_data.cpp | 9 +
   sandbox/math_toolkit/libs/math/tools/ibeta_data.cpp | 3
   145 files changed, 1556 insertions(+), 1908 deletions(-)

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -325,13 +325,13 @@
 
 } // namespace tools
 
-namespace policy{
+namespace policies{
 
 template <>
 inline int digits<concepts::real_concept, policy<> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(concepts::real_concept))
 { // Assume number of significand bits is same as long double,
   // unless std::numeric_limits<T>::is_specialized to provide digits.
- return boost::math::policy::digits<long double, boost::math::policy::policy<> >();
+ return boost::math::policies::digits<long double, boost::math::policies::policy<> >();
    // Note that if numeric_limits real concept is NOT specialized to provide digits10
    // (or max_digits10) then the default precision of 6 decimal digits will be used
    // by Boost test (giving misleading error messages like
@@ -374,3 +374,4 @@
 
 #endif // BOOST_MATH_REAL_CONCEPT_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp (original)
+++ sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -331,10 +331,10 @@
 
 } // namespace tools
 
-namespace policy{
+namespace policies{
 
 template <>
-inline int digits<concepts::std_real_concept, boost::math::policy::policy<> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(concepts::std_real_concept))
+inline int digits<concepts::std_real_concept, boost::math::policies::policy<> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(concepts::std_real_concept))
 { // Assume number of significand bits is same as long double,
   // unless std::numeric_limits<T>::is_specialized to provide digits.
    return digits<long double, policy<> >();
@@ -351,3 +351,4 @@
 
 #endif // BOOST_MATH_STD_REAL_CONCEPT_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/bernoulli.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/bernoulli.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/bernoulli.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // boost\math\distributions\bernoulli.hpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -35,13 +35,6 @@
 
 #include <utility>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
-# pragma warning(push)
-# pragma warning (disable: 4180) // qualifier applied to function type has no meaning; ignored
-//# pragma warning(disable: 4702) // unreachable code
-// in domain_error_imp in error_handling
-#endif
-
 namespace boost
 {
   namespace math
@@ -50,11 +43,11 @@
     {
       // Common error checking routines for bernoulli distribution functions:
       template <class RealType, class Policy>
- inline bool check_success_fraction(const char* function, const RealType& p, RealType* result, const Policy& pol)
+ inline bool check_success_fraction(const char* function, const RealType& p, RealType* result, const Policy& /* pol */)
       {
         if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Success fraction argument is %1%, but must be >= 0 and <= 1 !", p, Policy());
           return false;
@@ -62,7 +55,7 @@
         return true;
       }
       template <class RealType, class Policy>
- inline bool check_dist(const char* function, const RealType& p, RealType* result, const Policy& pol)
+ inline bool check_dist(const char* function, const RealType& p, RealType* result, const Policy& /* pol */)
       {
         return check_success_fraction(function, p, result, Policy());
       }
@@ -75,7 +68,7 @@
         }
         if(!(boost::math::isfinite)(k) || !((k == 0) || (k == 1)))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Number of successes argument is %1%, but must be 0 or 1 !", k, pol);
           return false;
@@ -83,7 +76,7 @@
        return true;
       }
       template <class RealType, class Policy>
- inline bool check_dist_and_prob(const char* function, RealType p, RealType prob, RealType* result, const Policy& Pol)
+ inline bool check_dist_and_prob(const char* function, RealType p, RealType prob, RealType* result, const Policy& /* pol */)
       {
         if(check_dist(function, p, result, Policy()) && detail::check_probability(function, prob, result, Policy()) == false)
         {
@@ -94,7 +87,7 @@
     } // namespace bernoulli_detail
 
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class bernoulli_distribution
     {
     public:
@@ -326,10 +319,7 @@
 // keep compilers that support two-phase lookup happy.
 #include <boost/math/distributions/detail/derived_accessors.hpp>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
-# pragma warning(pop)
-#endif
-
 #endif // BOOST_MATH_SPECIAL_BERNOULLI_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/beta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/beta.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/beta.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -31,7 +31,7 @@
 #include <boost/math/special_functions/fpclassify.hpp> // isnan.
 #include <boost/math/tools/roots.hpp> // for root finding.
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
+#if defined (BOOST_MSVC)
 # pragma warning(push)
 # pragma warning(disable: 4702) // unreachable code
 // in domain_error_imp in error_handling
@@ -51,7 +51,7 @@
       {
         if(!(boost::math::isfinite)(alpha) || (alpha <= 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Alpha argument is %1%, but must be > 0 !", alpha, pol);
           return false;
@@ -64,7 +64,7 @@
       {
         if(!(boost::math::isfinite)(beta) || (beta <= 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Beta argument is %1%, but must be > 0 !", beta, pol);
           return false;
@@ -77,7 +77,7 @@
       {
         if((p < 0) || (p > 1) || !(boost::math::isfinite)(p))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Probability argument is %1%, but must be >= 0 and <= 1 !", p, pol);
           return false;
@@ -90,7 +90,7 @@
       {
         if(!(boost::math::isfinite)(x) || (x < 0) || (x > 1))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "x argument is %1%, but must be >= 0 and <= 1 !", x, pol);
           return false;
@@ -124,7 +124,7 @@
       {
         if(!(boost::math::isfinite)(mean) || (mean <= 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "mean argument is %1%, but must be > 0 !", mean, pol);
           return false;
@@ -136,7 +136,7 @@
       {
         if(!(boost::math::isfinite)(variance) || (variance <= 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "variance argument is %1%, but must be > 0 !", variance, pol);
           return false;
@@ -149,7 +149,7 @@
     // is deliberately NOT included to avoid a name clash with the beta function.
     // Use beta_distribution<> mybeta(...) to construct type double.
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class beta_distribution
     {
     public:
@@ -311,7 +311,7 @@
       RealType result;
       if ((dist.alpha() <= 1))
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "mode undefined for alpha = %1%, must be > 1!", dist.alpha(), Policy());
         return result;
@@ -319,7 +319,7 @@
 
       if ((dist.beta() <= 1))
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "mode undefined for beta = %1%, must be > 1!", dist.beta(), Policy());
         return result;
@@ -535,9 +535,10 @@
 // keep compilers that support two-phase lookup happy.
 #include <boost/math/distributions/detail/derived_accessors.hpp>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
+#if defined (BOOST_MSVC)
 # pragma warning(pop)
 #endif
 
 #endif // BOOST_MATH_DIST_BETA_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/binomial.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/binomial.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/binomial.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // boost\math\distributions\binomial.hpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -76,7 +76,6 @@
 // To enforce the strict mathematical model, users should use floor or ceil functions
 // on k outside this function to ensure that k is integral.
 
-
 #ifndef BOOST_MATH_SPECIAL_BINOMIAL_HPP
 #define BOOST_MATH_SPECIAL_BINOMIAL_HPP
 
@@ -88,12 +87,6 @@
 #include <boost/math/special_functions/fpclassify.hpp> // isnan.
 #include <boost/math/tools/roots.hpp> // for root finding.
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
-# pragma warning(push)
-//# pragma warning(disable: 4702) // unreachable code
-// in domain_error_imp in error_handling
-#endif
-
 #include <utility>
 
 namespace boost
@@ -111,7 +104,7 @@
         {
            if((N < 0) || !(boost::math::isfinite)(N))
            {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
                   function,
                   "Number of Trials argument is %1%, but must be >= 0 !", N, pol);
                return false;
@@ -123,7 +116,7 @@
         {
            if((p < 0) || (p > 1) || !(boost::math::isfinite)(p))
            {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
                   function,
                   "Success fraction argument is %1%, but must be >= 0 and <= 1 !", p, pol);
                return false;
@@ -145,14 +138,14 @@
               return false;
            if((k < 0) || !(boost::math::isfinite)(k))
            {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
                   function,
                   "Number of Successes argument is %1%, but must be >= 0 !", k, pol);
                return false;
            }
            if(k > N)
            {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
                   function,
                   "Number of Successes argument is %1%, but must be <= Number of Trials !", k, pol);
                return false;
@@ -282,7 +275,7 @@
     // is deliberately NOT included to avoid a name clash with function.
     //typedef binomial_distribution<double> binomial; // Reserved name of type double.
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class binomial_distribution
     {
     public:
@@ -729,3 +722,4 @@
 
 #endif // BOOST_MATH_SPECIAL_BINOMIAL_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/cauchy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/cauchy.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/cauchy.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -35,7 +35,7 @@
 {
    if(scale <= 0)
    {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
          func,
          "The scale parameter for the Cauchy distribution must be > 0 but got %1%.",
          scale, pol);
@@ -105,9 +105,9 @@
    using namespace std; // for ADL of std functions
    // Special cases:
    if(p == 1)
- return (complement ? -1 : 1) * policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return (complement ? -1 : 1) * policies::raise_overflow_error<RealType>(function, 0, Policy());
    if(p == 0)
- return (complement ? 1 : -1) * policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return (complement ? 1 : -1) * policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    RealType result;
    RealType loc = dist.location();
@@ -130,7 +130,7 @@
 
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class cauchy_distribution
 {
 public:
@@ -216,17 +216,10 @@
 template <class RealType, class Policy>
 inline RealType mean(const cauchy_distribution<RealType, Policy>&)
 { // There is no mean:
-#ifdef BOOST_MATH_COMPILE_FAIL_IF_UNDEFINED
-# ifdef BOOST_MSVC
-# error Mean of the Cauchy distribution is undefined!
-# else
- BOOST_STATIC_ASSERT(sizeof(RealType) == 0);
-# endif
-#endif
    typedef typename Policy::assert_undefined_type assert_type;
    BOOST_STATIC_ASSERT(assert_type::value == 0);
 
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
       "boost::math::mean(cauchy<%1%>&)",
       "The Cauchy distribution does not have a mean: "
       "the only possible return value is %1%.",
@@ -240,7 +233,7 @@
    typedef typename Policy::assert_undefined_type assert_type;
    BOOST_STATIC_ASSERT(assert_type::value == 0);
 
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
       "boost::math::variance(cauchy<%1%>&)",
       "The Cauchy distribution does not have a variance: "
       "the only possible return value is %1%.",
@@ -265,7 +258,7 @@
    typedef typename Policy::assert_undefined_type assert_type;
    BOOST_STATIC_ASSERT(assert_type::value == 0);
 
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
       "boost::math::skewness(cauchy<%1%>&)",
       "The Cauchy distribution does not have a skewness: "
       "the only possible return value is %1%.",
@@ -279,7 +272,7 @@
    typedef typename Policy::assert_undefined_type assert_type;
    BOOST_STATIC_ASSERT(assert_type::value == 0);
 
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
       "boost::math::kurtosis(cauchy<%1%>&)",
       "The Cauchy distribution does not have a kurtosis: "
       "the only possible return value is %1%.",
@@ -293,7 +286,7 @@
    typedef typename Policy::assert_undefined_type assert_type;
    BOOST_STATIC_ASSERT(assert_type::value == 0);
 
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
       "boost::math::kurtosis_excess(cauchy<%1%>&)",
       "The Cauchy distribution does not have a kurtosis: "
       "the only possible return value is %1%.",

Modified: sandbox/math_toolkit/boost/math/distributions/chi_squared.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/chi_squared.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/chi_squared.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -18,7 +18,7 @@
 
 namespace boost{ namespace math{
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
 class chi_squared_distribution
 {
 public:
@@ -84,7 +84,7 @@
 
    if((chi_square < 0) || !(boost::math::isfinite)(chi_square))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Chi Square parameter was %1%, but must be > 0 !", chi_square, Policy());
    }
 
@@ -93,7 +93,7 @@
       // Handle special cases:
       if(degrees_of_freedom < 2)
       {
- return policy::raise_overflow_error<RealType>(
+ return policies::raise_overflow_error<RealType>(
             function, 0, Policy());
       }
       else if(degrees_of_freedom == 2)
@@ -123,7 +123,7 @@
 
    if((chi_square < 0) || !(boost::math::isfinite)(chi_square))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Chi Square parameter was %1%, but must be > 0 !", chi_square, Policy());
    }
 
@@ -160,7 +160,7 @@
 
    if((chi_square < 0) || !(boost::math::isfinite)(chi_square))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Chi Square parameter was %1%, but must be > 0 !", chi_square, Policy());
    }
 
@@ -202,7 +202,7 @@
    RealType df = dist.degrees_of_freedom();
    static const char* function = "boost::math::mode(const chi_squared_distribution<%1%>&)";
    if(df <= 2)
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function,
          "The Chi-Squared distribution only has a mode for degrees of freedom >= 2, but got degrees of freedom = %1%.",
          df, Policy());
@@ -300,13 +300,13 @@
       hint = 1;
 
    detail::df_estimator<RealType, Policy> f(alpha, beta, variance, difference_from_variance);
- tools::eps_tolerance<RealType> tol(policy::digits<RealType, Policy>());
+ tools::eps_tolerance<RealType> tol(policies::digits<RealType, Policy>());
    boost::uintmax_t max_iter = 10000;
    std::pair<RealType, RealType> r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy());
    RealType result = r.first + (r.second - r.first) / 2;
    if(max_iter == 10000)
    {
- policy::raise_evaluation_error<RealType>(function, "Unable to locate solution in a reasonable time:"
+ policies::raise_evaluation_error<RealType>(function, "Unable to locate solution in a reasonable time:"
          " either there is no answer to how many degrees of freedom are required"
          " or the answer is infinite. Current best guess is %1%", result, Policy());
    }

Modified: sandbox/math_toolkit/boost/math/distributions/detail/common_error_handling.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/detail/common_error_handling.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/detail/common_error_handling.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,5 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -13,7 +14,7 @@
 
 #ifdef BOOST_MSVC
 # pragma warning(push)
-# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
+//# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
 #endif
 
 namespace boost{ namespace math{ namespace detail{
@@ -23,8 +24,8 @@
 {
    if((prob < 0) || (prob > 1) || !(boost::math::isfinite)(prob))
    {
- *result = policy::raise_domain_error<RealType>(
- function,
+ *result = policies::raise_domain_error<RealType>(
+ function,
          "Probability argument is %1%, but must be >= 0 and <= 1 !", prob, pol);
       return false;
    }
@@ -36,8 +37,8 @@
 {
    if((df <= 0) || !(boost::math::isfinite)(df))
    {
- *result = policy::raise_domain_error<RealType>(
- function,
+ *result = policies::raise_domain_error<RealType>(
+ function,
          "Degrees of freedom argument is %1%, but must be > 0 !", df, pol);
       return false;
    }
@@ -53,8 +54,8 @@
 {
    if((scale < 0) || !(boost::math::isfinite)(scale))
    {
- *result = policy::raise_domain_error<RealType>(
- function,
+ *result = policies::raise_domain_error<RealType>(
+ function,
          "Scale parameter is %1%, but must be > 0 !", scale, pol);
       return false;
    }

Modified: sandbox/math_toolkit/boost/math/distributions/detail/derived_accessors.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/detail/derived_accessors.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/detail/derived_accessors.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -64,7 +64,7 @@
    value_type p = cdf(complement(dist, x));
    value_type d = pdf(dist, x);
    if(d > p * tools::max_value<value_type>())
- return policy::raise_overflow_error<value_type>(
+ return policies::raise_overflow_error<value_type>(
       "boost::math::hazard(const Distribution&, %1%)", 0, policy_type());
    if(d == 0)
    {
@@ -94,7 +94,7 @@
    value_type d = standard_deviation(dist);
    if((abs(m) < 1) && (d > abs(m) * tools::max_value<value_type>()))
    { // Checks too that m is not zero,
- return policy::raise_overflow_error<value_type>("boost::math::coefficient_of_variation(const Distribution&, %1%)", 0, policy_type());
+ return policies::raise_overflow_error<value_type>("boost::math::coefficient_of_variation(const Distribution&, %1%)", 0, policy_type());
    }
    return d / m; // so MSVC warning on zerodivide is spurious, and suppressed.
 }

Modified: sandbox/math_toolkit/boost/math/distributions/detail/inv_discrete_quantile.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/detail/inv_discrete_quantile.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/detail/inv_discrete_quantile.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -42,24 +42,24 @@
 // in the root no longer being bracketed.
 //
 template <class Real, class Tol>
-void adjust_bounds(Real& a, Real& b, Tol const& tol){}
+void adjust_bounds(Real& /* a */, Real& /* b */, Tol const& /* tol */){}
 
 template <class Real>
-void adjust_bounds(Real& a, Real& b, tools::equal_floor const& tol)
+void adjust_bounds(Real& /* a */, Real& b, tools::equal_floor const& /* tol */)
 {
    using namespace std;
    b -= tools::epsilon<Real>() * b;
 }
 
 template <class Real>
-void adjust_bounds(Real& a, Real& b, tools::equal_ceil const& tol)
+void adjust_bounds(Real& a, Real& /* b */, tools::equal_ceil const& /* tol */)
 {
    using namespace std;
    a += tools::epsilon<Real>() * a;
 }
 
 template <class Real>
-void adjust_bounds(Real& a, Real& b, tools::equal_nearest_integer const& tol)
+void adjust_bounds(Real& a, Real& b, tools::equal_nearest_integer const& /* tol */)
 {
    using namespace std;
    a += tools::epsilon<Real>() * a;
@@ -101,7 +101,7 @@
 
    value_type fa = f(guess);
    boost::uintmax_t count = max_iter - 1;
- value_type fb(fa), a(guess), b;
+ value_type fb(fa), a(guess), b =0; // Compiler warning C4701: potentially uninitialized local variable 'b' used
 
    if(fa == 0)
       return guess;
@@ -211,7 +211,7 @@
          while(sign(fb) == sign(fa))
          {
             if(count == 0)
- policy::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, policy_type());
+ policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, policy_type());
             a = b;
             fa = fb;
             b *= multiplier;
@@ -238,7 +238,7 @@
                return 0;
             }
             if(count == 0)
- policy::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, policy_type());
+ policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, policy_type());
             b = a;
             fb = fa;
             a /= multiplier;
@@ -289,7 +289,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::real>&,
+ const policies::discrete_quantile<policies::real>&,
       boost::uintmax_t& max_iter)
 {
    if(p <= pdf(dist, 0))
@@ -301,7 +301,7 @@
       guess,
       multiplier,
       adder,
- tools::eps_tolerance<typename Dist::value_type>(policy::digits<typename Dist::value_type, typename Dist::policy_type>()),
+ tools::eps_tolerance<typename Dist::value_type>(policies::digits<typename Dist::value_type, typename Dist::policy_type>()),
       max_iter);
 }
 
@@ -314,7 +314,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_outside>&,
+ const policies::discrete_quantile<policies::integer_outside>&,
       boost::uintmax_t& max_iter)
 {
    typedef typename Dist::value_type value_type;
@@ -356,7 +356,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_inside>&,
+ const policies::discrete_quantile<policies::integer_inside>&,
       boost::uintmax_t& max_iter)
 {
    typedef typename Dist::value_type value_type;
@@ -398,7 +398,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_below>&,
+ const policies::discrete_quantile<policies::integer_below>&,
       boost::uintmax_t& max_iter)
 {
    typedef typename Dist::value_type value_type;
@@ -425,7 +425,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_above>&,
+ const policies::discrete_quantile<policies::integer_above>&,
       boost::uintmax_t& max_iter)
 {
    using namespace std;
@@ -451,7 +451,7 @@
       const typename Dist::value_type& guess,
       const typename Dist::value_type& multiplier,
       const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_nearest>&,
+ const policies::discrete_quantile<policies::integer_nearest>&,
       boost::uintmax_t& max_iter)
 {
    typedef typename Dist::value_type value_type;
@@ -478,3 +478,4 @@
 
 #endif // BOOST_MATH_DISTRIBUTIONS_DETAIL_INV_DISCRETE_QUANTILE
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/exponential.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/exponential.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/exponential.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -32,7 +32,7 @@
 {
    if(l <= 0)
    {
- *presult = policy::raise_domain_error<RealType>(
+ *presult = policies::raise_domain_error<RealType>(
          function,
          "The scale parameter \"lambda\" must be > 0, but was: %1%.", l, pol);
       return false;
@@ -45,7 +45,7 @@
 {
    if(x < 0)
    {
- *presult = policy::raise_domain_error<RealType>(
+ *presult = policies::raise_domain_error<RealType>(
          function,
          "The random variable must be >= 0, but was: %1%.", x, pol);
       return false;
@@ -55,7 +55,7 @@
 
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class exponential_distribution
 {
 public:
@@ -144,7 +144,7 @@
    if(p == 0)
       return 0;
    if(p == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = -boost::math::log1p(-p, Policy()) / lambda;
    return result;
@@ -187,7 +187,7 @@
    if(q == 1)
       return 0;
    if(q == 0)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = -log(q) / lambda;
    return result;

Modified: sandbox/math_toolkit/boost/math/distributions/extreme_value.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/extreme_value.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/extreme_value.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -39,7 +39,7 @@
 {
    if(b <= 0)
    {
- *presult = policy::raise_domain_error<RealType>(
+ *presult = policies::raise_domain_error<RealType>(
          function,
          "The scale parameter \"b\" must be > 0, but was: %1%.", b, pol);
       return false;
@@ -49,7 +49,7 @@
 
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class extreme_value_distribution
 {
 public:
@@ -133,9 +133,9 @@
       return result;
 
    if(p == 0)
- return -policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return -policies::raise_overflow_error<RealType>(function, 0, Policy());
    if(p == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = a - log(-log(p)) * b;
 
@@ -175,9 +175,9 @@
       return result;
 
    if(q == 0)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
    if(q == 1)
- return -policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return -policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = a - log(-boost::math::log1p(-q, Policy())) * b;
 

Modified: sandbox/math_toolkit/boost/math/distributions/fisher_f.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/fisher_f.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/fisher_f.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -18,7 +18,7 @@
 
 namespace boost{ namespace math{
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class fisher_f_distribution
 {
 public:
@@ -86,7 +86,7 @@
 
    if((x < 0) || !(boost::math::isfinite)(x))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Random variable parameter was %1%, but must be > 0 !", x, Policy());
    }
 
@@ -94,7 +94,7 @@
    {
       // special cases:
       if(df1 < 2)
- return policy::raise_overflow_error<RealType>(
+ return policies::raise_overflow_error<RealType>(
             function, 0, Policy());
       else if(df1 == 2)
          return 1;
@@ -142,7 +142,7 @@
 
    if((x < 0) || !(boost::math::isfinite)(x))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Random Variable parameter was %1%, but must be > 0 !", x, Policy());
    }
 
@@ -201,7 +201,7 @@
 
    if((x < 0) || !(boost::math::isfinite)(x))
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Random Variable parameter was %1%, but must be > 0 !", x, Policy());
    }
 
@@ -259,7 +259,7 @@
       return error_result;
    if(df2 <= 2)
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Second degree of freedom was %1% but must be > 2 in order for the distribution to have a mean.", df2, Policy());
    }
    return df2 / (df2 - 2);
@@ -280,7 +280,7 @@
       return error_result;
    if(df2 <= 4)
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Second degree of freedom was %1% but must be > 4 in order for the distribution to have a valid variance.", df2, Policy());
    }
    return 2 * df2 * df2 * (df1 + df2 - 2) / (df1 * (df2 - 2) * (df2 - 2) * (df2 - 4));
@@ -301,7 +301,7 @@
       return error_result;
    if(df2 <= 2)
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Second degree of freedom was %1% but must be > 2 in order for the distribution to have a mode.", df2, Policy());
    }
    return df2 * (df1 - 2) / (df1 * (df2 + 2));
@@ -332,7 +332,7 @@
       return error_result;
    if(df2 <= 6)
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Second degree of freedom was %1% but must be > 6 in order for the distribution to have a skewness.", df2, Policy());
    }
    return 2 * (df2 + 2 * df1 - 2) * sqrt((2 * df2 - 8) / (df1 * (df2 + df1 - 2))) / (df2 - 6);
@@ -363,7 +363,7 @@
       return error_result;
    if(df2 <= 8)
    {
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function, "Second degree of freedom was %1% but must be > 8 in order for the distribution to have a kutosis.", df2, Policy());
    }
    RealType df2_2 = df2 * df2;

Modified: sandbox/math_toolkit/boost/math/distributions/gamma.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/gamma.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/gamma.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,7 +30,7 @@
 {
    if((shape <= 0) || !(boost::math::isfinite)(shape))
    {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
          function,
          "Shape parameter is %1%, but must be > 0 !", shape, pol);
       return false;
@@ -46,7 +46,7 @@
 {
    if((x < 0) || !(boost::math::isfinite)(x))
    {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
          function,
          "Random variate is %1% but must be >= 0 !", x, pol);
       return false;
@@ -66,7 +66,7 @@
 
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class gamma_distribution
 {
 public:
@@ -175,7 +175,7 @@
       return result;
 
    if(p == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = gamma_p_inv(shape, p, Policy()) * scale;
 
@@ -221,7 +221,7 @@
       return result;
 
    if(q == 0)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = gamma_q_inv(shape, q, Policy()) * scale;
 
@@ -279,7 +279,7 @@
       return result;
 
    if(shape < 1)
- return policy::raise_domain_error<RealType>(
+ return policies::raise_domain_error<RealType>(
          function,
          "The mode of the gamma distribution is only defined for values of the shape parameter >= 1, but got %1%.",
          shape, Policy());
@@ -345,3 +345,4 @@
 
 #endif // BOOST_STATS_GAMMA_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/lognormal.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/lognormal.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/lognormal.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,7 +30,7 @@
   {
      if((x < 0) || !(boost::math::isfinite)(x))
      {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
            function,
            "Random variate is %1% but must be >= 0 !", x, pol);
         return false;
@@ -41,7 +41,7 @@
 } // namespace detail
 
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class lognormal_distribution
 {
 public:
@@ -150,7 +150,7 @@
    if(p == 0)
       return 0;
    if(p == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    normal_distribution<RealType, Policy> norm(dist.location(), dist.scale());
    return exp(quantile(norm, p));
@@ -188,7 +188,7 @@
    if(c.param == 1)
       return 0;
    if(c.param == 0)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    normal_distribution<RealType, Policy> norm(c.dist.location(), c.dist.scale());
    return exp(quantile(complement(norm, c.param)));
@@ -307,3 +307,4 @@
 
 #endif // BOOST_STATS_STUDENTS_T_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/negative_binomial.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/negative_binomial.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/negative_binomial.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,6 @@
 // boost\math\special_functions\negative_binomial.hpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -55,7 +55,7 @@
 #include <limits> // using std::numeric_limits;
 #include <utility>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
+#if defined (BOOST_MSVC)
 # pragma warning(push)
 # pragma warning(disable: 4702) // unreachable code.
 // in domain_error_imp in error_handling.
@@ -73,7 +73,7 @@
       {
         if( !(boost::math::isfinite)(r) || (r <= 0) )
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Number of successes argument is %1%, but must be > 0 !", r, pol);
           return false;
@@ -85,7 +85,7 @@
       {
         if( !(boost::math::isfinite)(p) || (p < 0) || (p > 1) )
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Success fraction argument is %1%, but must be >= 0 and <= 1 !", p, pol);
           return false;
@@ -107,7 +107,7 @@
         }
         if( !(boost::math::isfinite)(k) || (k < 0) )
         { // Check k failures.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Number of failures argument is %1%, but must be >= 0 !", k, pol);
           return false;
@@ -126,7 +126,7 @@
       } // check_dist_and_prob
     } // namespace negative_binomial_detail
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class negative_binomial_distribution
     {
     public:
@@ -153,7 +153,7 @@
         return m_r;
       }
 
- static RealType estimate_lower_bound_on_p(
+ static RealType find_lower_bound_on_p(
         RealType trials,
         RealType successes,
         RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test.
@@ -176,9 +176,9 @@
         // http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf
         //
         return ibeta_inv(successes, failures + 1, alpha, static_cast<RealType*>(0), Policy());
- } // estimate_lower_bound_on_p
+ } // find_lower_bound_on_p
 
- static RealType estimate_upper_bound_on_p(
+ static RealType find_upper_bound_on_p(
         RealType trials,
         RealType successes,
         RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test.
@@ -204,12 +204,12 @@
         // http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf
         //
         return ibetac_inv(successes, failures, alpha, static_cast<RealType*>(0), Policy());
- } // estimate_upper_bound_on_p
+ } // find_upper_bound_on_p
 
       // Estimate number of trials :
       // "How many trials do I need to be P% sure of seeing k or fewer failures?"
 
- static RealType estimate_minimum_number_of_trials(
+ static RealType find_minimum_number_of_trials(
         RealType k, // number of failures (k >= 0).
         RealType p, // success fraction 0 <= p <= 1.
         RealType alpha) // risk level threshold 0 <= alpha <= 1.
@@ -224,9 +224,9 @@
 
         result = ibeta_inva(k + 1, p, alpha, Policy()); // returns n - k
         return result + k;
- } // RealType estimate_number_of_failures
+ } // RealType find_number_of_failures
 
- static RealType estimate_maximum_number_of_trials(
+ static RealType find_maximum_number_of_trials(
         RealType k, // number of failures (k >= 0).
         RealType p, // success fraction 0 <= p <= 1.
         RealType alpha) // risk level threshold 0 <= alpha <= 1.
@@ -241,7 +241,7 @@
 
         result = ibetac_inva(k + 1, p, alpha, Policy()); // returns n - k
         return result + k;
- } // RealType estimate_number_of_trials complemented
+ } // RealType find_number_of_trials complemented
 
     private:
       RealType m_r; // successes.
@@ -274,7 +274,7 @@
     //template <class RealType, class Policy>
     //inline RealType median(const negative_binomial_distribution<RealType, Policy>& dist)
     //{ // Median of negative_binomial_distribution is not defined.
- // return policy::raise_domain_error<RealType>(BOOST_CURRENT_FUNCTION, "Median is not implemented, result is %1%!", std::numeric_limits<RealType>::quiet_NaN());
+ // return policies::raise_domain_error<RealType>(BOOST_CURRENT_FUNCTION, "Median is not implemented, result is %1%!", std::numeric_limits<RealType>::quiet_NaN());
     //} // median
     // Now implemented via quantile(half) in derived accessors.
 
@@ -439,7 +439,7 @@
       // Special cases.
       if (P == 1)
       { // Would need +infinity failures for total confidence.
- result = policy::raise_overflow_error<RealType>(
+ result = policies::raise_overflow_error<RealType>(
             function,
             "Probability argument is 1, which implies infinite failures !", Policy());
         return result;
@@ -528,7 +528,7 @@
        if(Q == 0)
        { // Probability 1 - Q == 1 so infinite failures to achieve certainty.
           // Would need +infinity failures for total confidence.
- result = policy::raise_overflow_error<RealType>(
+ result = policies::raise_overflow_error<RealType>(
              function,
              "Probability argument complement is 0, which implies infinite failures !", Policy());
           return result;
@@ -575,7 +575,7 @@
 // keep compilers that support two-phase lookup happy.
 #include <boost/math/distributions/detail/derived_accessors.hpp>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
+#if defined (BOOST_MSVC)
 # pragma warning(pop)
 #endif
 

Modified: sandbox/math_toolkit/boost/math/distributions/normal.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/normal.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/normal.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -21,7 +21,7 @@
 
 namespace boost{ namespace math{
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class normal_distribution
 {
 public:
@@ -201,3 +201,4 @@
 
 #endif // BOOST_STATS_NORMAL_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/pareto.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/pareto.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/pareto.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -41,7 +41,7 @@
           }
           else
           {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
               function,
               "Location parameter is %1%, but must be > 0!", location, pol);
             return false;
@@ -49,7 +49,7 @@
         }
         else
         { // Not finite.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Location parameter is %1%, but must be finite!", location, pol);
           return false;
@@ -70,7 +70,7 @@
           }
           else
           {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
               function,
               "Shape parameter is %1%, but must be > 0!", shape, pol);
             return false;
@@ -78,7 +78,7 @@
         }
         else
         { // Not finite.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Shape parameter is %1%, but must be finite!", shape, pol);
           return false;
@@ -99,7 +99,7 @@
           }
           else
           {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
               function,
               "x parameter is %1%, but must be > 0 !", x, pol);
             return false;
@@ -107,7 +107,7 @@
         }
         else
         { // Not finite..
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "x parameter is %1%, but must be finite!", x, pol);
           return false;
@@ -127,7 +127,7 @@
 
     } // namespace detail
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class pareto_distribution
     {
     public:
@@ -349,7 +349,7 @@
       }
       else
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "variance is undefined for shape <= 2, but got %1%.", dist.shape(), Policy());
       }
@@ -375,7 +375,7 @@
       }
       else
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "skewness is undefined for shape <= 3, but got %1%.", dist.shape(), Policy());
       }
@@ -399,7 +399,7 @@
       }
       else
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "kurtosis_excess is undefined for shape <= 4, but got %1%.", shape, Policy());
       }
@@ -423,7 +423,7 @@
       }
       else
       {
- result = policy::raise_domain_error<RealType>(
+ result = policies::raise_domain_error<RealType>(
           function,
           "kurtosis_excess is undefined for shape <= 4, but got %1%.", dist.shape(), Policy());
       }
@@ -440,3 +440,4 @@
 
 #endif // BOOST_STATS_PARETO_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/poisson.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/poisson.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/poisson.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // boost\math\distributions\poisson.hpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -47,13 +47,6 @@
 
 #include <utility>
 
-#if defined (BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
-# pragma warning(push)
-# pragma warning(disable: 4702) // unreachable code
-// in domain_error_imp in error_handling
-# pragma warning(disable: 4189) // local variable is initialized but not referenced
-#endif
-
 namespace boost
 {
   namespace math
@@ -67,7 +60,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_nearest>&,
+ const policies::discrete_quantile<policies::integer_nearest>&,
             boost::uintmax_t& max_iter);
       template <class Dist>
       inline typename Dist::value_type
@@ -77,7 +70,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_above>&,
+ const policies::discrete_quantile<policies::integer_above>&,
             boost::uintmax_t& max_iter);
       template <class Dist>
       inline typename Dist::value_type
@@ -87,7 +80,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_below>&,
+ const policies::discrete_quantile<policies::integer_below>&,
             boost::uintmax_t& max_iter);
       template <class Dist>
       inline typename Dist::value_type
@@ -97,7 +90,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_outside>&,
+ const policies::discrete_quantile<policies::integer_outside>&,
             boost::uintmax_t& max_iter);
       template <class Dist>
       inline typename Dist::value_type
@@ -107,7 +100,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::integer_inside>&,
+ const policies::discrete_quantile<policies::integer_inside>&,
             boost::uintmax_t& max_iter);
       template <class Dist>
       inline typename Dist::value_type
@@ -117,7 +110,7 @@
             const typename Dist::value_type& guess,
             const typename Dist::value_type& multiplier,
             const typename Dist::value_type& adder,
- const policy::discrete_quantile<policy::real>&,
+ const policies::discrete_quantile<policies::real>&,
             boost::uintmax_t& max_iter);
      }
     namespace poisson_detail
@@ -131,7 +124,7 @@
       {
         if(!(boost::math::isfinite)(mean) || (mean < 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Mean argument is %1%, but must be >= 0 !", mean, pol);
           return false;
@@ -144,7 +137,7 @@
       { // mean == 0 is considered an error.
         if( !(boost::math::isfinite)(mean) || (mean <= 0))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Mean argument is %1%, but must be > 0 !", mean, pol);
           return false;
@@ -163,7 +156,7 @@
       {
         if((k < 0) || !(boost::math::isfinite)(k))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Number of events k argument is %1%, but must be >= 0 !", k, pol);
           return false;
@@ -187,7 +180,7 @@
       { // Check 0 <= p <= 1
         if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "Probability argument is %1%, but must be >= 0 and <= 1 !", p, pol);
           return false;
@@ -208,7 +201,7 @@
 
     } // namespace poisson_detail
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
     class poisson_distribution
     {
     public:
@@ -601,10 +594,6 @@
   } // namespace math
 } // namespace boost
 
-#if defined(BOOST_MSVC) && defined(BOOST_MATH_THROW_ON_DOMAIN_ERROR)
-# pragma warning(pop)
-#endif
-
 // This include must be at the end, *after* the accessors
 // for this distribution have been defined, in order to
 // keep compilers that support two-phase lookup happy.
@@ -614,3 +603,4 @@
 #endif // BOOST_MATH_SPECIAL_POISSON_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/rayleigh.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/rayleigh.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/rayleigh.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,7 +30,7 @@
   {
      if(sigma <= 0)
      {
- *presult = policy::raise_domain_error<RealType>(
+ *presult = policies::raise_domain_error<RealType>(
            function,
            "The scale parameter \"sigma\" must be > 0, but was: %1%.", sigma, pol);
         return false;
@@ -43,7 +43,7 @@
   {
      if(x < 0)
      {
- *presult = policy::raise_domain_error<RealType>(
+ *presult = policies::raise_domain_error<RealType>(
            function,
            "The random variable must be >= 0, but was: %1%.", x, pol);
         return false;
@@ -52,7 +52,7 @@
   } // bool verify_rayleigh_x
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class rayleigh_distribution
 {
 public:
@@ -152,7 +152,7 @@
    }
    if(p == 1)
    {
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
    }
    result = sqrt(-2 * sigma * sigma * boost::math::log1p(-p, Policy()));
    return result;
@@ -202,7 +202,7 @@
    }
    if(q == 0)
    {
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
    }
    result = sqrt(-2 * sigma * sigma * log(q));
    return result;

Modified: sandbox/math_toolkit/boost/math/distributions/students_t.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/students_t.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/students_t.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -24,7 +24,7 @@
 
 namespace boost{ namespace math{
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class students_t_distribution
 {
 public:
@@ -170,9 +170,9 @@
 
    // Special cases, regardless of degrees_of_freedom.
    if (probability == 0)
- return -policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return -policies::raise_overflow_error<RealType>(function, 0, Policy());
    if (probability == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
    if (probability == static_cast<RealType>(0.5))
      return 0;
    //
@@ -273,13 +273,13 @@
       hint = 1;
 
    detail::sample_size_func<RealType, Policy> f(alpha, beta, sd, difference_from_mean);
- tools::eps_tolerance<RealType> tol(policy::digits<RealType, Policy>());
+ tools::eps_tolerance<RealType> tol(policies::digits<RealType, Policy>());
    boost::uintmax_t max_iter = 10000;
    std::pair<RealType, RealType> r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy());
    RealType result = r.first + (r.second - r.first) / 2;
    if(max_iter == 10000)
    {
- policy::raise_evaluation_error<RealType>(function, "Unable to locate solution in a reasonable time:"
+ policies::raise_evaluation_error<RealType>(function, "Unable to locate solution in a reasonable time:"
          " either there is no answer to how many degrees of freedom are required"
          " or the answer is infinite. Current best guess is %1%", result, Policy());
    }
@@ -322,7 +322,7 @@
 {
    if(dist.degrees_of_freedom() <= 3)
    {
- policy::raise_domain_error<RealType>(
+ policies::raise_domain_error<RealType>(
          "boost::math::skewness(students_t_distribution<%1%> const&, %1%)",
          "Skewness is undefined for degrees of freedom <= 3, but got %1%.",
          dist.degrees_of_freedom(), Policy());
@@ -336,7 +336,7 @@
    RealType df = dist.degrees_of_freedom();
    if(df <= 3)
    {
- policy::raise_domain_error<RealType>(
+ policies::raise_domain_error<RealType>(
          "boost::math::kurtosis(students_t_distribution<%1%> const&, %1%)",
          "Skewness is undefined for degrees of freedom <= 3, but got %1%.",
          df, Policy());
@@ -351,7 +351,7 @@
    RealType df = dist.degrees_of_freedom();
    if(df <= 3)
    {
- policy::raise_domain_error<RealType>(
+ policies::raise_domain_error<RealType>(
          "boost::math::kurtosis_excess(students_t_distribution<%1%> const&, %1%)",
          "Skewness is undefined for degrees of freedom <= 3, but got %1%.",
          df, Policy());

Modified: sandbox/math_toolkit/boost/math/distributions/triangular.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/triangular.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/triangular.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -34,7 +34,7 @@
       }
       else
       { // Not finite: infinity or NaN.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "Lower parameter is %1%, but must be finite!", lower, pol);
         return false;
@@ -53,7 +53,7 @@
       }
       else
       { // Not finite: infinity or NaN.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "Mode parameter is %1%, but must be finite!", mode, pol);
         return false;
@@ -72,7 +72,7 @@
       }
       else
       { // Not finite: infinity or NaN.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "Upper parameter is %1%, but must be finite!", upper, pol);
         return false;
@@ -91,7 +91,7 @@
       }
       else
       { // Not finite: infinity or NaN.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "x parameter is %1%, but must be finite!", x, pol);
         return false;
@@ -114,14 +114,14 @@
       {
         if (mode < lower)
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "mode parameter is %1%, but must be >= than lower!", lower, pol);
           return false;
         }
         if (mode > upper )
         {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
             function,
             "mode parameter is %1%, but must be <= than upper!", upper, pol);
           return false;
@@ -130,7 +130,7 @@
       }
       else
       { // upper and lower have each been checked before, so must be lower >= upper.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "lower parameter is %1%, but must be less than upper!", lower, pol);
         return false;
@@ -138,7 +138,7 @@
     } // bool check_triangular
   } // namespace detail
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
   class triangular_distribution
   {
   public:
@@ -518,3 +518,4 @@
 #endif // BOOST_STATS_TRIANGULAR_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/uniform.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/uniform.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/uniform.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -37,7 +37,7 @@
       }
       else
       { // Not finite.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "Lower parameter is %1%, but must be finite!", lower, pol);
         return false;
@@ -56,7 +56,7 @@
       }
       else
       { // Not finite.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "Upper parameter is %1%, but must be finite!", upper, pol);
         return false;
@@ -75,7 +75,7 @@
       }
       else
       { // Not finite..
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "x parameter is %1%, but must be finite!", x, pol);
         return false;
@@ -97,7 +97,7 @@
       }
       else
       { // upper and lower have been checked before, so must be lower >= upper.
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
           function,
           "lower parameter is %1%, but must be less than upper!", lower, pol);
         return false;
@@ -106,7 +106,7 @@
 
   } // namespace detail
 
- template <class RealType = double, class Policy = policy::policy<> >
+ template <class RealType = double, class Policy = policies::policy<> >
   class uniform_distribution
   {
   public:
@@ -372,3 +372,4 @@
 #endif // BOOST_STATS_UNIFORM_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/distributions/weibull.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/weibull.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/weibull.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,7 +30,7 @@
 {
    if((shape < 0) || !(boost::math::isfinite)(shape))
    {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
          function,
          "Shape parameter is %1%, but must be > 0 !", shape, pol);
       return false;
@@ -46,7 +46,7 @@
 {
    if((x < 0) || !(boost::math::isfinite)(x))
    {
- *result = policy::raise_domain_error<RealType>(
+ *result = policies::raise_domain_error<RealType>(
          function,
          "Random variate is %1% but must be >= 0 !", x, pol);
       return false;
@@ -66,7 +66,7 @@
 
 } // namespace detail
 
-template <class RealType = double, class Policy = policy::policy<> >
+template <class RealType = double, class Policy = policies::policy<> >
 class weibull_distribution
 {
 public:
@@ -177,7 +177,7 @@
       return result;
 
    if(p == 1)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = scale * pow(-boost::math::log1p(-p, Policy()), 1 / shape);
 
@@ -223,7 +223,7 @@
       return result;
 
    if(q == 0)
- return policy::raise_overflow_error<RealType>(function, 0, Policy());
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
 
    result = scale * pow(-log(q), 1 / shape);
 
@@ -379,3 +379,4 @@
 
 #endif // BOOST_STATS_WEIBULL_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/policy/error_handling.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policy/error_handling.hpp (original)
+++ sandbox/math_toolkit/boost/math/policy/error_handling.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,6 @@
 // Copyright John Maddock 2007.
+// Copyright Paul A. Bristow 2007.
+
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,7 +36,7 @@
    evaluation_error(const std::string& s) : std::runtime_error(s){}
 };
 
-namespace policy{
+namespace policies{
 //
 // Forward declarations of user error handlers,
 // it's up to the user to provide the definition of these:
@@ -52,7 +54,8 @@
 template <class T>
 T user_evaluation_error(const char* function, const char* message, const T& val);
 
-namespace detail{
+namespace detail
+{
 
 template <class E, class T>
 void raise_error(const char* function, const char* message)
@@ -84,7 +87,7 @@
   msg += ": ";
   msg += message;
 
- int prec = 2 + (boost::math::policy::digits<T, boost::math::policy::policy<> >() * 30103UL) / 100000UL;
+ int prec = 2 + (boost::math::policies::digits<T, boost::math::policies::policy<> >() * 30103UL) / 100000UL;
   msg = (boost::format(msg) % boost::io::group(std::setprecision(prec), val)).str();
 
   E e(msg);
@@ -96,7 +99,7 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::domain_error< ::boost::math::policy::throw_on_error>&)
+ const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>&)
 {
    raise_error<std::domain_error, T>(function, message, val);
    // we never get here:
@@ -108,7 +111,7 @@
            const char* ,
            const char* ,
            const T& ,
- const ::boost::math::policy::domain_error< ::boost::math::policy::ignore_error>&)
+ const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>&)
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
@@ -120,7 +123,7 @@
            const char* ,
            const char* ,
            const T& ,
- const ::boost::math::policy::domain_error< ::boost::math::policy::errno_on_error>&)
+ const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>&)
 {
    errno = EDOM;
    // This may or may not do the right thing, but the user asked for the error
@@ -133,7 +136,7 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::domain_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::domain_error< ::boost::math::policies::user_error>&)
 {
    return user_domain_error(function, message, val);
 }
@@ -143,9 +146,9 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::pole_error< ::boost::math::policy::throw_on_error>&)
+ const ::boost::math::policies::pole_error< ::boost::math::policies::throw_on_error>&)
 {
- return boost::math::policy::detail::raise_domain_error(function, message, val, ::boost::math::policy::domain_error< ::boost::math::policy::throw_on_error>());
+ return boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>());
 }
 
 template <class T>
@@ -153,9 +156,9 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::pole_error< ::boost::math::policy::ignore_error>&)
+ const ::boost::math::policies::pole_error< ::boost::math::policies::ignore_error>&)
 {
- return ::boost::math::policy::detail::raise_domain_error(function, message, val, ::boost::math::policy::domain_error< ::boost::math::policy::ignore_error>());
+ return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>());
 }
 
 template <class T>
@@ -163,9 +166,9 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::pole_error< ::boost::math::policy::errno_on_error>&)
+ const ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>&)
 {
- return ::boost::math::policy::detail::raise_domain_error(function, message, val, ::boost::math::policy::domain_error< ::boost::math::policy::errno_on_error>());
+ return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>());
 }
 
 template <class T>
@@ -173,7 +176,7 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::pole_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::pole_error< ::boost::math::policies::user_error>&)
 {
    return user_pole_error(function, message, val);
 }
@@ -182,7 +185,7 @@
 inline T raise_overflow_error(
            const char* function,
            const char* message,
- const ::boost::math::policy::overflow_error< ::boost::math::policy::throw_on_error>&)
+ const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&)
 {
    raise_error<std::overflow_error, T>(function, message ? message : "numeric overflow");
    // we never get here:
@@ -193,7 +196,7 @@
 inline T raise_overflow_error(
            const char* ,
            const char* ,
- const ::boost::math::policy::overflow_error< ::boost::math::policy::ignore_error>&)
+ const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&)
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
@@ -204,7 +207,7 @@
 inline T raise_overflow_error(
            const char* ,
            const char* ,
- const ::boost::math::policy::overflow_error< ::boost::math::policy::errno_on_error>&)
+ const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&)
 {
    errno = ERANGE;
    // This may or may not do the right thing, but the user asked for the error
@@ -216,7 +219,7 @@
 inline T raise_overflow_error(
            const char* function,
            const char* message,
- const ::boost::math::policy::overflow_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&)
 {
    return user_overflow_error(function, message, std::numeric_limits<T>::infinity());
 }
@@ -225,7 +228,7 @@
 inline T raise_underflow_error(
            const char* function,
            const char* message,
- const ::boost::math::policy::underflow_error< ::boost::math::policy::throw_on_error>&)
+ const ::boost::math::policies::underflow_error< ::boost::math::policies::throw_on_error>&)
 {
    raise_error<std::underflow_error, T>(function, message ? message : "numeric underflow");
    // we never get here:
@@ -236,30 +239,30 @@
 inline T raise_underflow_error(
            const char* ,
            const char* ,
- const ::boost::math::policy::underflow_error< ::boost::math::policy::ignore_error>&)
+ const ::boost::math::policies::underflow_error< ::boost::math::policies::ignore_error>&)
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
- return 0;
+ return T(0);
 }
 
 template <class T>
 inline T raise_underflow_error(
- const char* ,
- const char* ,
- const ::boost::math::policy::underflow_error< ::boost::math::policy::errno_on_error>&)
+ const char* /* function */,
+ const char* /* message */,
+ const ::boost::math::policies::underflow_error< ::boost::math::policies::errno_on_error>&)
 {
    errno = ERANGE;
    // This may or may not do the right thing, but the user asked for the error
    // to be silent so here we go anyway:
- return 0;
+ return T(0);
 }
 
 template <class T>
 inline T raise_underflow_error(
            const char* function,
            const char* message,
- const ::boost::math::policy::underflow_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::underflow_error< ::boost::math::policies::user_error>&)
 {
    return user_underflow_error(function, message, T(0));
 }
@@ -268,20 +271,20 @@
 inline T raise_denorm_error(
            const char* function,
            const char* message,
- const T& val,
- const ::boost::math::policy::denorm_error< ::boost::math::policy::throw_on_error>&)
+ const T& /* val */,
+ const ::boost::math::policies::denorm_error< ::boost::math::policies::throw_on_error>&)
 {
    raise_error<std::underflow_error, T>(function, message ? message : "denormalised result");
    // we never get here:
- return 0;
+ return T(0);
 }
 
 template <class T>
 inline T raise_denorm_error(
            const char* ,
            const char* ,
- const T& val,
- const ::boost::math::policy::denorm_error< ::boost::math::policy::ignore_error>&)
+ const T& val,
+ const ::boost::math::policies::denorm_error< ::boost::math::policies::ignore_error>&)
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
@@ -292,8 +295,8 @@
 inline T raise_denorm_error(
            const char* ,
            const char* ,
- const T& val,
- const ::boost::math::policy::denorm_error< ::boost::math::policy::errno_on_error>&)
+ const T& /* val */,
+ const ::boost::math::policies::denorm_error< ::boost::math::policies::errno_on_error>&)
 {
    errno = ERANGE;
    // This may or may not do the right thing, but the user asked for the error
@@ -306,7 +309,7 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::denorm_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::denorm_error< ::boost::math::policies::user_error>&)
 {
    return user_denorm_error(function, message, val);
 }
@@ -316,11 +319,11 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::evaluation_error< ::boost::math::policy::throw_on_error>&)
+ const ::boost::math::policies::evaluation_error< ::boost::math::policies::throw_on_error>&)
 {
    raise_error<boost::math::evaluation_error, T>(function, message, val);
    // we never get here:
- return 0;
+ return T(0);
 }
 
 template <class T>
@@ -328,7 +331,7 @@
            const char* ,
            const char* ,
            const T& val,
- const ::boost::math::policy::evaluation_error< ::boost::math::policy::ignore_error>&)
+ const ::boost::math::policies::evaluation_error< ::boost::math::policies::ignore_error>&)
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
@@ -340,7 +343,7 @@
            const char* ,
            const char* ,
            const T& val,
- const ::boost::math::policy::evaluation_error< ::boost::math::policy::errno_on_error>&)
+ const ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>&)
 {
    errno = EDOM;
    // This may or may not do the right thing, but the user asked for the error
@@ -353,7 +356,7 @@
            const char* function,
            const char* message,
            const T& val,
- const ::boost::math::policy::evaluation_error< ::boost::math::policy::user_error>&)
+ const ::boost::math::policies::evaluation_error< ::boost::math::policies::user_error>&)
 {
    return user_evaluation_error(function, message, val);
 }
@@ -418,7 +421,8 @@
 //
 // checked_narrowing_cast:
 //
-namespace detail{
+namespace detail
+{
 
 template <class R, class T, class Policy>
 inline bool check_overflow(T val, R* result, const char* function, const Policy& pol)
@@ -453,14 +457,15 @@
    return false;
 }
 
+// Default instantiations with ignore_error policy.
 template <class R, class T>
-inline bool check_overflow(T /*val*/, R* /*result*/, const char* /*function*/, const overflow_error<ignore_error>&){ return false; }
+inline bool check_overflow(T /* val */, R* /* result */, const char* /* function */, const overflow_error<ignore_error>&){ return false; }
 template <class R, class T>
-inline bool check_underflow(T /*val*/, R* /*result*/, const char* /*function*/, const underflow_error<ignore_error>&){ return false; }
+inline bool check_underflow(T /* val */, R* /* result */, const char* /* function */, const underflow_error<ignore_error>&){ return false; }
 template <class R, class T>
-inline bool check_denorm(T /*val*/, R* /*result*/, const char* /*function*/, const denorm_error<ignore_error>&){ return false; }
+inline bool check_denorm(T /* val */, R* /* result*/, const char* /* function */, const denorm_error<ignore_error>&){ return false; }
 
-}
+} // namespace detail
 
 template <class R, class Policy, class T>
 inline R checked_narrowing_cast(T val, const char* function)
@@ -491,7 +496,7 @@
          "Series evaluation exceeded %1% iterations, giving up now.", max_iter, pol);
 }
 
-} //namespace policy
+} //namespace policies
 
 }} // namespaces boost/math
 

Modified: sandbox/math_toolkit/boost/math/policy/policy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policy/policy.hpp (original)
+++ sandbox/math_toolkit/boost/math/policy/policy.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -22,7 +22,7 @@
 #include <boost/math/tools/config.hpp>
 #include <limits>
 
-namespace boost{ namespace math{ namespace policy{
+namespace boost{ namespace math{ namespace policies{
 
 //
 // Define macros for our default policies, if they're not defined already:
@@ -210,7 +210,7 @@
 public:
 #ifdef __BORLANDC__
    typedef typename mpl::if_c<
- (Digits2::value > ::boost::math::policy::detail::precision<Digits10,Digits2>::digits2_type::value),
+ (Digits2::value > ::boost::math::policies::detail::precision<Digits10,Digits2>::digits2_type::value),
       Digits2, digits2_type>::type type;
 #else
    typedef typename mpl::if_c<
@@ -261,12 +261,12 @@
 
 template <class T> struct is_valid_policy
 : public mpl::bool_<
- ::boost::math::policy::detail::is_valid_policy_imp<T>::value>
+ ::boost::math::policies::detail::is_valid_policy_imp<T>::value>
 {};
 
 template <class T> struct is_default_policy
 : public mpl::bool_<
- ::boost::math::policy::detail::is_default_policy_imp<T>::value>
+ ::boost::math::policies::detail::is_default_policy_imp<T>::value>
 {
    template <class U>
    struct apply
@@ -345,17 +345,17 @@
    //
    // Validate all our arguments:
    //
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A1>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A2>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A3>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A4>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A5>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A6>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A7>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A8>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A9>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A10>::value);
- BOOST_STATIC_ASSERT(::boost::math::policy::detail::is_valid_policy<A11>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A1>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A2>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A3>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A4>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A5>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A6>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A7>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A8>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A9>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A10>::value);
+ BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A11>::value);
    //
    // Typelist of the arguments:
    //
@@ -642,8 +642,8 @@
          ((::std::numeric_limits<Real>::digits <= precision_type::value)
          || (Policy::precision_type::value <= 0)),
 #else
- ((::std::numeric_limits<Real>::digits <= ::boost::math::policy::precision<Real, Policy>::precision_type::value)
- || (::boost::math::policy::precision<Real, Policy>::precision_type::value <= 0)),
+ ((::std::numeric_limits<Real>::digits <= ::boost::math::policies::precision<Real, Policy>::precision_type::value)
+ || (::boost::math::policies::precision<Real, Policy>::precision_type::value <= 0)),
 #endif
          // Default case, full precision for RealType:
          digits2< ::std::numeric_limits<Real>::digits>,
@@ -690,9 +690,10 @@
 }
 
 template <class P>
-struct is_policy : public mpl::bool_< ::boost::math::policy::detail::is_policy_imp<P>::value> {};
+struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {};
 
 }}} // namespaces
 
 #endif // BOOST_MATH_POLICY_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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -52,7 +52,7 @@
             
             if(x < one)
             {
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
                   "boost::math::acosh<%1%>(%1%)",
                   "acosh requires x >= 1, but got x = %1%.", x, pol);
             }
@@ -100,7 +100,7 @@
         {
            typedef typename tools::promote_args<T>::type result_type;
            return detail::acosh_imp(
- static_cast<result_type>(x), policy::policy<>());
+ static_cast<result_type>(x), policies::policy<>());
         }
 
     }
@@ -109,3 +109,4 @@
 #endif /* BOOST_ACOSH_HPP */
 
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -57,23 +57,23 @@
             
             if (x < -one)
             {
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
                   function,
                   "atanh requires x >= -1, but got x = %1%.", x, pol);
             }
             else if (x < -one + tools::epsilon<T>())
             {
                // -Infinity:
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
             }
             else if (x > one - tools::epsilon<T>())
             {
                // Infinity:
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
             }
             else if (x > +one)
             {
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
                   function,
                   "atanh requires x <= 1, but got x = %1%.", x, pol);
             }
@@ -111,7 +111,7 @@
         {
            typedef typename tools::promote_args<T>::type result_type;
            return detail::atanh_imp(
- static_cast<result_type>(x), policy::policy<>());
+ static_cast<result_type>(x), policies::policy<>());
         }
 
     }
@@ -119,3 +119,4 @@
 
 #endif /* BOOST_ATANH_HPP */
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -86,8 +86,8 @@
 {
    bessel_j_small_z_series_term<T, Policy> s(v, x);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- T result = boost::math::tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter);
- policy::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
+ policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
    return result;
 }
 
@@ -97,8 +97,8 @@
    using namespace std; // ADL of std names
    sph_bessel_j_small_z_series_term<T, Policy> s(v, x);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- T result = boost::math::tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter);
- policy::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
+ policies::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
    return result * sqrt(constants::pi<T>() / 4);
 }
 
@@ -118,13 +118,13 @@
          return r;
       }
       else
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
             function,
             "Got x = %1%, but we need x >= 0", x, pol);
    }
    if(x == 0)
       return (v == 0) ? 1 : (v > 0) ? 0 :
- policy::raise_domain_error<T>(
+ policies::raise_domain_error<T>(
             function,
             "Got v = %1%, but require v >= 0 or a negative integer: the result would be complex.", v, pol);
    
@@ -175,7 +175,7 @@
 {
    using namespace std; // ADL of std names
    if(x < 0)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          "boost::math::sph_bessel_j<%1%>(%1%,%1%)",
          "Got x = %1%, but function requires x > 0.", x, pol);
    //
@@ -217,7 +217,7 @@
          return r;
       }
       else
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          "boost::math::cyl_bessel_i<%1%>(%1%,%1%)",
             "Got x = %1%, but we need x >= 0", x, pol);
    }
@@ -231,7 +231,7 @@
       T e = exp(x / 2);
       return e * (e / sqrt(2 * x * constants::pi<T>()));
    }
- if(policy::digits<T, Policy>() <= 64)
+ if(policies::digits<T, Policy>() <= 64)
    {
       if(v == 0)
       {
@@ -248,20 +248,20 @@
 }
 
 template <class T, class Policy>
-inline T cyl_bessel_k_imp(T v, T x, const bessel_no_int_tag& t, const Policy& pol)
+inline T cyl_bessel_k_imp(T v, T x, const bessel_no_int_tag& /* t */, const Policy& pol)
 {
    static const char* function = "boost::math::cyl_bessel_k<%1%>(%1%,%1%)";
    using namespace std;
    if(x < 0)
    {
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function,
          "Got x = %1%, but we need x > 0", x, pol);
    }
    if(x == 0)
    {
- return (v == 0) ? policy::raise_overflow_error<T>(function, 0, pol)
- : policy::raise_domain_error<T>(
+ return (v == 0) ? policies::raise_overflow_error<T>(function, 0, pol)
+ : policies::raise_domain_error<T>(
          function,
          "Got x = %1%, but we need x > 0", x, pol);
    }
@@ -294,8 +294,8 @@
    if(x <= 0)
    {
       return (v == 0) && (x == 0) ?
- policy::raise_overflow_error<T>(function, 0, pol)
- : policy::raise_domain_error<T>(
+ policies::raise_overflow_error<T>(function, 0, pol)
+ : policies::raise_domain_error<T>(
                function,
                "Got x = %1%, but result is complex for x <= 0", x, pol);
    }
@@ -307,7 +307,7 @@
    // is -INF:
    //
    if(!(boost::math::isfinite)(y))
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
    return y;
 }
 
@@ -357,18 +357,18 @@
    // evaluate the function's definition directly:
    //
    if(x < 0)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function,
          "Got x = %1%, but function requires x > 0.", x, pol);
 
    if(x < 2 * tools::min_value<T>())
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
 
    T result = cyl_neumann_imp(T(v)+0.5f, x, bessel_no_int_tag(), pol);
    T tx = sqrt(constants::pi<T>() / (2 * x));
 
    if((tx > 1) && (tools::max_value<T>() / tx < result))
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
 
    return result * tx;
 }
@@ -381,14 +381,14 @@
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type;
    typedef typename detail::bessel_traits<T1, T2, Policy>::optimisation_tag tag_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_j_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_bessel_j<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_j_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_bessel_j<%1%>(%1%,%1%)");
 }
 
 template <class T1, class T2>
-inline typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_j(T1 v, T2 x)
+inline typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x)
 {
- return cyl_bessel_j(v, x, policy::policy<>());
+ return cyl_bessel_j(v, x, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -396,14 +396,14 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T, T, Policy>::result_type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::sph_bessel_j_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::sph_bessel<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::sph_bessel_j_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::sph_bessel<%1%>(%1%,%1%)");
 }
 
 template <class T>
-inline typename detail::bessel_traits<T, T, policy::policy<> >::result_type sph_bessel(unsigned v, T x)
+inline typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x)
 {
- return sph_bessel(v, x, policy::policy<>());
+ return sph_bessel(v, x, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -411,14 +411,14 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_i_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::cyl_bessel_i<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_i_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::cyl_bessel_i<%1%>(%1%,%1%)");
 }
 
 template <class T1, class T2>
-inline typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_i(T1 v, T2 x)
+inline typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x)
 {
- return cyl_bessel_i(v, x, policy::policy<>());
+ return cyl_bessel_i(v, x, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -427,14 +427,14 @@
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type;
    typedef typename detail::bessel_traits<T1, T2, Policy>::optimisation_tag tag_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_k_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_bessel_k<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::cyl_bessel_k_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_bessel_k<%1%>(%1%,%1%)");
 }
 
 template <class T1, class T2>
-inline typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_k(T1 v, T2 x)
+inline typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x)
 {
- return cyl_bessel_k(v, x, policy::policy<>());
+ return cyl_bessel_k(v, x, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -443,14 +443,14 @@
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type;
    typedef typename detail::bessel_traits<T1, T2, Policy>::optimisation_tag tag_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::cyl_neumann_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_neumann<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::cyl_neumann_imp<value_type>(v, static_cast<value_type>(x), tag_type(), pol), "boost::math::cyl_neumann<%1%>(%1%,%1%)");
 }
 
 template <class T1, class T2>
-inline typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_neumann(T1 v, T2 x)
+inline typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x)
 {
- return cyl_neumann(v, x, policy::policy<>());
+ return cyl_neumann(v, x, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -458,14 +458,14 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename detail::bessel_traits<T, T, Policy>::result_type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::sph_neumann_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::sph_neumann<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::sph_neumann_imp<value_type>(v, static_cast<value_type>(x), pol), "boost::math::sph_neumann<%1%>(%1%,%1%)");
 }
 
 template <class T>
-inline typename detail::bessel_traits<T, T, policy::policy<> >::result_type sph_neumann(unsigned v, T x)
+inline typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x)
 {
- return sph_neumann(v, x, policy::policy<>());
+ return sph_neumann(v, x, policies::policy<>());
 }
 
 } // namespace math

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,9 +30,9 @@
    using namespace std; // for ADL of std names
 
    if(a <= 0)
- policy::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- policy::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol);
+ policies::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol);
 
    T result;
 
@@ -114,9 +114,9 @@
    using namespace std;
 
    if(a <= 0)
- policy::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- policy::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol);
+ policies::raise_domain_error<T>("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol);
 
    T result;
 
@@ -156,11 +156,11 @@
 
    // calculate the fraction parts:
    T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policy::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
    T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policy::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
    T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policy::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
 
    // and the exponent part:
    result = exp(lc - la - lb) * pow(la/lc, a) * pow(lb/lc, b);
@@ -373,11 +373,11 @@
    T lc = a + b + 5;
    // gamma function partials:
    T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policy::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
    T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policy::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
    T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policy::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
    // gamma function powers combined with incomplete beta powers:
 
    T b1 = (x * lc) / la;
@@ -477,8 +477,8 @@
       return s0; // Safeguard: series can't cope with denorms.
    ibeta_series_t<T> s(a, b, x, result);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- result = boost::math::tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter, s0);
- policy::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol);
+ result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, s0);
+ policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol);
    return result;
 }
 //
@@ -507,11 +507,11 @@
 
       // calculate the gamma parts:
       T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policy::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
       T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policy::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
       T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policy::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
 
       // and their combined power-terms:
       T b1 = (x * lc) / la;
@@ -557,8 +557,8 @@
       return s0; // Safeguard: series can't cope with denorms.
    ibeta_series_t<T> s(a, b, x, result);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- result = boost::math::tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter, s0);
- policy::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol);
+ result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, s0);
+ policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol);
    return result;
 }
 
@@ -609,7 +609,7 @@
       return result;
 
    ibeta_fraction2_t<T> f(a, b, x);
- T fract = boost::math::tools::continued_fraction_b(f, boost::math::policy::digits<T, Policy>());
+ T fract = boost::math::tools::continued_fraction_b(f, boost::math::policies::digits<T, Policy>());
    return result / fract;
 }
 //
@@ -859,11 +859,11 @@
    }
 
    if(a <= 0)
- policy::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- policy::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
+ policies::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
    if((x < 0) || (x > 1))
- policy::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
+ policies::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
 
    if(x == 0)
    {
@@ -1140,23 +1140,23 @@
    // start with the usual error checks:
    //
    if(a <= 0)
- policy::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- policy::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
+ policies::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
    if((x < 0) || (x > 1))
- policy::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
+ policies::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
    //
    // Now the corner cases:
    //
    if(x == 0)
    {
       return (a > 1) ? 0 :
- (a == 1) ? 1 / boost::math::beta(a, b, pol) : policy::raise_overflow_error<T>(function, 0, pol);
+ (a == 1) ? 1 / boost::math::beta(a, b, pol) : policies::raise_overflow_error<T>(function, 0, pol);
    }
    else if(x == 1)
    {
       return (b > 1) ? 0 :
- (b == 1) ? 1 / boost::math::beta(a, b, pol) : policy::raise_overflow_error<T>(function, 0, pol);
+ (b == 1) ? 1 / boost::math::beta(a, b, pol) : policies::raise_overflow_error<T>(function, 0, pol);
    }
    //
    // Now the regular cases:
@@ -1171,7 +1171,7 @@
    if((tools::max_value<T>() * y < f1))
    {
       // overflow:
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
    }
 
    f1 /= y;
@@ -1187,22 +1187,22 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::beta_imp(static_cast<value_type>(a), static_cast<value_type>(b), evaluation_type(), forwarding_policy()), "boost::math::beta<%1%>(%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::beta_imp(static_cast<value_type>(a), static_cast<value_type>(b), evaluation_type(), forwarding_policy()), "boost::math::beta<%1%>(%1%,%1%)");
 }
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    beta(RT1 a, RT2 b, RT3 x, const mpl::false_*)
 {
- return boost::math::beta(a, b, x, policy::policy<>());
+ return boost::math::beta(a, b, x, policies::policy<>());
 }
 } // namespace detail
 
@@ -1215,7 +1215,7 @@
 inline typename tools::promote_args<RT1, RT2, A>::type
    beta(RT1 a, RT2 b, A arg)
 {
- typedef typename policy::is_policy<A>::type tag;
+ typedef typename policies::is_policy<A>::type tag;
    return boost::math::detail::beta(a, b, arg, static_cast<tag*>(0));
 }
 
@@ -1223,7 +1223,7 @@
 inline typename tools::promote_args<RT1, RT2>::type
    beta(RT1 a, RT2 b)
 {
- return boost::math::beta(a, b, policy::policy<>());
+ return boost::math::beta(a, b, policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -1232,16 +1232,16 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), false, false), "boost::math::beta<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), false, false), "boost::math::beta<%1%>(%1%,%1%,%1%)");
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -1250,22 +1250,22 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), true, false), "boost::math::betac<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), true, false), "boost::math::betac<%1%>(%1%,%1%,%1%)");
 }
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    betac(RT1 a, RT2 b, RT3 x)
 {
- return boost::math::betac(a, b, x, policy::policy<>());
+ return boost::math::betac(a, b, x, policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -1274,21 +1274,21 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), false, true), "boost::math::ibeta<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), false, true), "boost::math::ibeta<%1%>(%1%,%1%,%1%)");
 }
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    ibeta(RT1 a, RT2 b, RT3 x)
 {
- return boost::math::ibeta(a, b, x, policy::policy<>());
+ return boost::math::ibeta(a, b, x, policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -1297,21 +1297,21 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), true, true), "boost::math::ibetac<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy(), true, true), "boost::math::ibetac<%1%>(%1%,%1%,%1%)");
 }
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    ibetac(RT1 a, RT2 b, RT3 x)
 {
- return boost::math::ibetac(a, b, x, policy::policy<>());
+ return boost::math::ibetac(a, b, x, policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -1320,21 +1320,21 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<RT1, RT2, RT3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy()), "boost::math::ibeta_derivative<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::ibeta_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(b), static_cast<value_type>(x), forwarding_policy()), "boost::math::ibeta_derivative<%1%>(%1%,%1%,%1%)");
 }
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    ibeta_derivative(RT1 a, RT2 b, RT3 x)
 {
- return boost::math::ibeta_derivative(a, b, x, policy::policy<>());
+ return boost::math::ibeta_derivative(a, b, x, policies::policy<>());
 }
 
 } // namespace math
@@ -1347,3 +1347,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/binomial.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/binomial.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/binomial.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -18,7 +18,7 @@
    using namespace std;
    static const char* function = "boost::math::binomial_coefficient<%1%>(unsigned, unsigned)";
    if(k > n)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function,
          "The binomial coefficient is undefined for k > n, but got k = %1%.",
          k, pol);
@@ -43,7 +43,7 @@
       else
          result = (n - k) * beta(static_cast<T>(k+1), static_cast<T>(n-k), pol);
       if(result == 0)
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
       result = 1 / result;
    }
    // convert to nearest integer:
@@ -55,15 +55,15 @@
 // we'll promote to double:
 //
 template <>
-inline float binomial_coefficient<float, policy::policy<> >(unsigned n, unsigned k, const policy::policy<>& pol)
+inline float binomial_coefficient<float, policies::policy<> >(unsigned n, unsigned k, const policies::policy<>& pol)
 {
- return policy::checked_narrowing_cast<float, policy::policy<> >(binomial_coefficient<double>(n, k, pol), "boost::math::binomial_coefficient<%1%>(unsigned,unsigned)");
+ return policies::checked_narrowing_cast<float, policies::policy<> >(binomial_coefficient<double>(n, k, pol), "boost::math::binomial_coefficient<%1%>(unsigned,unsigned)");
 }
 
 template <class T>
 inline T binomial_coefficient(unsigned n, unsigned k)
 {
- return binomial_coefficient<T>(n, k, policy::policy<>());
+ return binomial_coefficient<T>(n, k, policies::policy<>());
 }
 
 } // namespace math
@@ -72,3 +72,4 @@
 
 #endif // BOOST_MATH_SF_BINOMIAL_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -44,7 +44,7 @@
    T min = static_cast<T>(ldexp(0.5, exp/3));
    T max = static_cast<T>(ldexp(2.0, exp/3));
    T guess = static_cast<T>(ldexp(1.0, exp/3));
- int digits = (policy::digits<T, Policy>()) / 2;
+ int digits = (policies::digits<T, Policy>()) / 2;
    return sign * tools::halley_iterate(detail::cbrt_functor<T>(z), guess, min, max, digits);
 }
 
@@ -60,7 +60,7 @@
 template <class T>
 inline typename tools::promote_args<T>::type cbrt(T z)
 {
- return cbrt(z, policy::policy<>());
+ return cbrt(z, policies::policy<>());
 }
 
 } // namespace math
@@ -69,3 +69,4 @@
 #endif // BOOST_MATH_SF_CBRT_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_ik.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_ik.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_ik.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -76,7 +76,7 @@
            break;
         }
     }
- policy::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
+ policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
 
     *K = sum;
     *K1 = 2 * sum1 / x;
@@ -119,7 +119,7 @@
            break;
         }
     }
- policy::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
+ policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
 
     *fv = f;
 
@@ -177,7 +177,7 @@
            break;
         }
     }
- policy::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
+ policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%)", k, pol);
 
     *Kv = sqrt(pi<T>() / (2 * x)) * exp(-x) / S;
     *Kv1 = *Kv * (0.5f + v + x + (v * v - 0.25f) * f) / x;
@@ -219,7 +219,7 @@
 
     if (x < 0)
     {
- *I = *K = policy::raise_domain_error<T>(function,
+ *I = *K = policies::raise_domain_error<T>(function,
             "Got x = %1% but real argument x must be non-negative, complex number result not supported.", x, pol);
         return 1;
     }
@@ -228,7 +228,7 @@
        Iv = (v == 0) ? static_cast<T>(1) : static_cast<T>(0);
        if(kind & need_k)
        {
- Kv = policy::raise_overflow_error<T>(function, 0, pol);
+ Kv = policies::raise_overflow_error<T>(function, 0, pol);
        }
        else
        {
@@ -240,7 +240,7 @@
            T z = (u + n % 2);
            Iv = sin_pi(z, pol) == 0 ?
                Iv :
- policy::raise_overflow_error<T>(function, 0, pol); // reflection formula
+ policies::raise_overflow_error<T>(function, 0, pol); // reflection formula
        }
 
        *I = Iv;

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -88,7 +88,7 @@
            break;
         }
     }
- policy::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k, pol);
+ policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k, pol);
     *Y = -sum;
     *Y1 = -2 * sum1 / x;
 
@@ -129,7 +129,7 @@
         if (abs(delta - 1.0L) < tolerance)
         { break; }
     }
- policy::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k / 100, pol);
+ policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k / 100, pol);
     *fv = -f;
     *sign = s; // sign of denominator
 
@@ -183,7 +183,7 @@
         f *= delta;
         if (abs(delta - one) < tolerance) { break; }
     }
- policy::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k, pol);
+ policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%)", k, pol);
     *p = real(f);
     *q = imag(f);
 
@@ -224,7 +224,7 @@
 
     if (x == 0)
     {
- *J = *Y = policy::raise_overflow_error<T>(
+ *J = *Y = policies::raise_overflow_error<T>(
           function, 0, pol);
        return 1;
     }

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy_asym.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy_asym.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_jy_asym.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -181,7 +181,7 @@
 template <class T, class Policy>
 struct bessel_asymptotic_tag
 {
- typedef typename policy::precision<T, Policy>::type precision_type;
+ typedef typename policies::precision<T, Policy>::type precision_type;
    typedef typename mpl::if_<
       mpl::or_<
          mpl::equal_to<precision_type, mpl::int_<0> >,
@@ -289,7 +289,7 @@
    s = e * (e * s / sqrt(2 * x * constants::pi<T>()));
 
    return (boost::math::isfinite)(s) ?
- s : policy::raise_overflow_error<T>("boost::math::asymptotic_bessel_i_large_x<%1%>(%1%,%1%)", 0, pol);
+ s : policies::raise_overflow_error<T>("boost::math::asymptotic_bessel_i_large_x<%1%>(%1%,%1%)", 0, pol);
 }
 
 }}} // namespaces

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k0.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -79,12 +79,12 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got x = %1%, but argument x must be non-negative, complex number result not supported", x, pol);
     }
     if (x == 0)
     {
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
     }
     if (x <= 1) // x in (0, 1]
     {

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_k1.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -81,12 +81,12 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got x = %1%, but argument x must be non-negative, complex number result not supported.", x, pol);
     }
     if (x == 0)
     {
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
     }
     if (x <= 1) // x in (0, 1]
     {

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_kn.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_kn.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_kn.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -26,12 +26,12 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got x = %1%, but argument x must be non-negative, complex number result not supported.", x, pol);
     }
     if (x == 0)
     {
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
     }
 
     if (n == 0)

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y0.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y0.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y0.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -127,12 +127,12 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got x = %1% but x must be non-negative, complex result not supported.", x, pol);
     }
     if (x == 0)
     {
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
     }
     if (x <= 3) // x in (0, 3]
     {

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_y1.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -112,7 +112,7 @@
 
     if (x <= 0)
     {
- return policy::raise_domain_error<T>("bost::math::bessel_y1<%1%>(%1%,%1%)",
+ return policies::raise_domain_error<T>("bost::math::bessel_y1<%1%>(%1%,%1%)",
             "Got x == %1%, but x must be > 0, complex result not supported.", x, pol);
     }
     if (x <= 4) // x in (0, 4]

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/bessel_yn.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/bessel_yn.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/bessel_yn.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -26,11 +26,11 @@
 
     if ((x == 0) && (n == 0))
     {
- return -policy::raise_overflow_error<T>(function, 0, pol);
+ return -policies::raise_overflow_error<T>(function, 0, pol);
     }
     if (x <= 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got x = %1%, but x must be > 0, complex result not supported.", x, pol);
     }
 

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -298,15 +298,15 @@
    // If T has more bit's than 64 in it's mantissa then we need to iterate,
    // otherwise we can just return the result:
    //
- if(policy::digits<T, Policy>() > 64)
+ if(policies::digits<T, Policy>() > 64)
    {
       if(p <= 0.5)
       {
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policy::digits<T, Policy>() * 2) / 3);
+ result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3);
       }
       else
       {
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policy::digits<T, Policy>() * 2) / 3);
+ result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3);
       }
    }
    else
@@ -327,11 +327,11 @@
    //
    static const char* function = "boost::math::erfc_inv<%1%>(%1%, %1%)";
    if((z < 0) || (z > 2))
- policy::raise_domain_error<result_type>(function, "Argument outside range [0,2] in inverse erfc function (got p=%1%).", z, pol);
+ policies::raise_domain_error<result_type>(function, "Argument outside range [0,2] in inverse erfc function (got p=%1%).", z, pol);
    if(z == 0)
- return policy::raise_overflow_error<result_type>(function, 0, pol);
+ return policies::raise_overflow_error<result_type>(function, 0, pol);
    if(z == 2)
- return -policy::raise_overflow_error<result_type>(function, 0, pol);
+ return -policies::raise_overflow_error<result_type>(function, 0, pol);
    //
    // Normalise the input, so it's in the range [0,1], we will
    // negate the result if z is outside that range. This is a simple
@@ -354,7 +354,7 @@
    // A bit of meta-programming to figure out which implementation
    // to use, based on the number of bits in the mantissa of T:
    //
- typedef typename policy::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
    typedef typename mpl::if_<
       mpl::or_<mpl::less_equal<precision_type, mpl::int_<0> >, mpl::greater<precision_type, mpl::int_<64> > >,
       mpl::int_<0>,
@@ -364,18 +364,18 @@
    // Likewise use internal promotion, so we evaluate at a higher
    // precision internally if it's appropriate:
    //
- typedef typename policy::evaluation<result_type, Policy>::type eval_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type eval_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    //
    // And get the result, negating where required:
    //
- return s * policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ return s * policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::erf_inv_imp(static_cast<eval_type>(p), static_cast<eval_type>(q), forwarding_policy(), static_cast<tag_type const*>(0)), function);
 }
 
@@ -388,11 +388,11 @@
    //
    static const char* function = "boost::math::erf_inv<%1%>(%1%, %1%)";
    if((z < -1) || (z > 1))
- policy::raise_domain_error<result_type>(function, "Argument outside range [-1, 1] in inverse erf function (got p=%1%).", z, pol);
+ policies::raise_domain_error<result_type>(function, "Argument outside range [-1, 1] in inverse erf function (got p=%1%).", z, pol);
    if(z == 1)
- return policy::raise_overflow_error<result_type>(function, 0, pol);
+ return policies::raise_overflow_error<result_type>(function, 0, pol);
    if(z == -1)
- return -policy::raise_overflow_error<result_type>(function, 0, pol);
+ return -policies::raise_overflow_error<result_type>(function, 0, pol);
    if(z == 0)
       return 0;
    //
@@ -417,7 +417,7 @@
    // A bit of meta-programming to figure out which implementation
    // to use, based on the number of bits in the mantissa of T:
    //
- typedef typename policy::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
    typedef typename mpl::if_<
       mpl::or_<mpl::less_equal<precision_type, mpl::int_<0> >, mpl::greater<precision_type, mpl::int_<64> > >,
       mpl::int_<0>,
@@ -427,35 +427,35 @@
    // Likewise use internal promotion, so we evaluate at a higher
    // precision internally if it's appropriate:
    //
- typedef typename policy::evaluation<result_type, Policy>::type eval_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type eval_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
    //
    // Likewise use internal promotion, so we evaluate at a higher
    // precision internally if it's appropriate:
    //
- typedef typename policy::evaluation<result_type, Policy>::type eval_type;
+ typedef typename policies::evaluation<result_type, Policy>::type eval_type;
    //
    // And get the result, negating where required:
    //
- return s * policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ return s * policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::erf_inv_imp(static_cast<eval_type>(p), static_cast<eval_type>(q), forwarding_policy(), static_cast<tag_type const*>(0)), function);
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type erfc_inv(T z)
 {
- return erfc_inv(z, policy::policy<>());
+ return erfc_inv(z, policies::policy<>());
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type erf_inv(T z)
 {
- return erf_inv(z, policy::policy<>());
+ return erf_inv(z, policies::policy<>());
 }
 
 } // namespace math

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/gamma_inva.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/gamma_inva.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/gamma_inva.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -85,7 +85,7 @@
    //
    // Tolerance: full precision.
    //
- tools::eps_tolerance<T> tol(policy::digits<T, Policy>());
+ tools::eps_tolerance<T> tol(policies::digits<T, Policy>());
    //
    // Now figure out a starting guess for what a may be,
    // we'll start out with a value that'll put p or q
@@ -140,7 +140,7 @@
    //
    std::pair<T, T> r = bracket_and_solve_root(f, guess, factor, false, tol, max_iter, pol);
    if(max_iter >= 200)
- policy::raise_evaluation_error<T>("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol);
+ policies::raise_evaluation_error<T>("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol);
    return (r.first + r.second) / 2;
 }
 
@@ -161,13 +161,13 @@
 template <class T>
 inline T gamma_p_inva(T x, T p)
 {
- return detail::gamma_inva_imp(x, p, 1 - p, policy::policy<>());
+ return detail::gamma_inva_imp(x, p, 1 - p, policies::policy<>());
 }
 
 template <class T>
 inline T gamma_q_inva(T x, T q)
 {
- return detail::gamma_inva_imp(x, 1 - q, q, policy::policy<>());
+ return detail::gamma_inva_imp(x, 1 - q, q, policies::policy<>());
 }
 
 } // namespace math
@@ -175,3 +175,4 @@
 
 #endif // BOOST_MATH_SP_DETAIL_GAMMA_INVA
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inv_ab.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inv_ab.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inv_ab.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -90,7 +90,7 @@
    //
    // Tolerance: full precision.
    //
- tools::eps_tolerance<T> tol(policy::digits<T, Policy>());
+ tools::eps_tolerance<T> tol(policies::digits<T, Policy>());
    //
    // Now figure out a starting guess for what a may be,
    // we'll start out with a value that'll put p or q
@@ -149,7 +149,7 @@
    boost::uintmax_t max_iter = 200;
    std::pair<T, T> r = bracket_and_solve_root(f, guess, factor, swap_ab ? true : false, tol, max_iter, pol);
    if(max_iter >= 200)
- policy::raise_evaluation_error<T>("boost::math::ibeta_invab_imp<%1%>(%1%,%1%,%1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol);
+ policies::raise_evaluation_error<T>("boost::math::ibeta_invab_imp<%1%>(%1%,%1%,%1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol);
    return (r.first + r.second) / 2;
 }
 
@@ -182,25 +182,25 @@
 template <class T>
 inline T ibeta_inva(T b, T x, T p)
 {
- return detail::ibeta_inv_ab_imp(b, x, p, 1 - p, false, policy::policy<>());
+ return detail::ibeta_inv_ab_imp(b, x, p, 1 - p, false, policies::policy<>());
 }
 
 template <class T>
 inline T ibetac_inva(T b, T x, T q)
 {
- return detail::ibeta_inv_ab_imp(b, x, 1 - q, q, false, policy::policy<>());
+ return detail::ibeta_inv_ab_imp(b, x, 1 - q, q, false, policies::policy<>());
 }
 
 template <class T>
 inline T ibeta_invb(T b, T x, T p)
 {
- return detail::ibeta_inv_ab_imp(b, x, p, 1 - p, true, policy::policy<>());
+ return detail::ibeta_inv_ab_imp(b, x, p, 1 - p, true, policies::policy<>());
 }
 
 template <class T>
 inline T ibetac_invb(T b, T x, T q)
 {
- return detail::ibeta_inv_ab_imp(b, x, 1 - q, q, true, policy::policy<>());
+ return detail::ibeta_inv_ab_imp(b, x, 1 - q, q, true, policies::policy<>());
 }
 
 } // namespace math
@@ -208,3 +208,4 @@
 
 #endif // BOOST_MATH_SP_DETAIL_BETA_INV_AB
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -296,7 +296,7 @@
    // And iterate:
    //
    x = tools::newton_raphson_iterate(
- temme_root_finder<T>(-lu, alpha), x, lower, upper, policy::digits<T, Policy>() / 2);
+ temme_root_finder<T>(-lu, alpha), x, lower, upper, policies::digits<T, Policy>() / 2);
 
    return x;
 }
@@ -399,7 +399,7 @@
    T upper = eta < mu ? 1 : cross;
    T x = (lower + upper) / 2;
    x = tools::newton_raphson_iterate(
- temme_root_finder<T>(u, mu), x, lower, upper, policy::digits<T, Policy>() / 2);
+ temme_root_finder<T>(u, mu), x, lower, upper, policies::digits<T, Policy>() / 2);
 #ifdef BOOST_INSTRUMENT
    std::cout << "Estimating x with Temme method 3: " << x << std::endl;
 #endif
@@ -772,7 +772,7 @@
    //
    // Figure out how many digits to iterate towards:
    //
- int digits = boost::math::policy::digits<T, Policy>() / 2;
+ int digits = boost::math::policies::digits<T, Policy>() / 2;
    if((x < 1e-50) && ((a < 1) || (b < 1)))
    {
       //
@@ -818,20 +818,20 @@
    static const char* function = "boost::math::ibeta_inv<%1%>(%1%,%1%,%1%)";
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2, T3, T4>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    if(a <= 0)
- return policy::raise_domain_error<result_type>(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol);
+ return policies::raise_domain_error<result_type>(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- return policy::raise_domain_error<result_type>(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol);
+ return policies::raise_domain_error<result_type>(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol);
    if((p < 0) || (p > 1))
- return policy::raise_domain_error<result_type>(function, "Argument p outside the range [0,1] in the incomplete beta function inverse (got p=%1%).", p, pol);
+ return policies::raise_domain_error<result_type>(function, "Argument p outside the range [0,1] in the incomplete beta function inverse (got p=%1%).", p, pol);
 
    value_type rx, ry;
 
@@ -842,22 +842,22 @@
          static_cast<value_type>(1 - p),
          forwarding_policy(), &ry);
 
- if(py) *py = policy::checked_narrowing_cast<T4, forwarding_policy>(ry, function);
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(rx, function);
+ if(py) *py = policies::checked_narrowing_cast<T4, forwarding_policy>(ry, function);
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(rx, function);
 }
 
 template <class T1, class T2, class T3, class T4>
 inline typename tools::promote_args<T1, T2, T3, T4>::type
    ibeta_inv(T1 a, T2 b, T3 p, T4* py)
 {
- return ibeta_inv(a, b, p, py, policy::policy<>());
+ return ibeta_inv(a, b, p, py, policies::policy<>());
 }
 
 template <class T1, class T2, class T3>
 inline typename tools::promote_args<T1, T2, T3>::type
    ibeta_inv(T1 a, T2 b, T3 p)
 {
- return ibeta_inv(a, b, p, static_cast<T1*>(0), policy::policy<>());
+ return ibeta_inv(a, b, p, static_cast<T1*>(0), policies::policy<>());
 }
 
 template <class T1, class T2, class T3, class Policy>
@@ -874,20 +874,20 @@
    static const char* function = "boost::math::ibetac_inv<%1%>(%1%,%1%,%1%)";
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2, T3, T4>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    if(a <= 0)
- policy::raise_domain_error<result_type>(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<result_type>(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol);
    if(b <= 0)
- policy::raise_domain_error<result_type>(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol);
+ policies::raise_domain_error<result_type>(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol);
    if((q < 0) || (q > 1))
- policy::raise_domain_error<result_type>(function, "Argument q outside the range [0,1] in the incomplete beta function inverse (got q=%1%).", q, pol);
+ policies::raise_domain_error<result_type>(function, "Argument q outside the range [0,1] in the incomplete beta function inverse (got q=%1%).", q, pol);
 
    value_type rx, ry;
 
@@ -898,22 +898,22 @@
          static_cast<value_type>(q),
          forwarding_policy(), &ry);
 
- if(py) *py = policy::checked_narrowing_cast<T4, forwarding_policy>(ry, function);
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(rx, function);
+ if(py) *py = policies::checked_narrowing_cast<T4, forwarding_policy>(ry, function);
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(rx, function);
 }
 
 template <class T1, class T2, class T3, class T4>
 inline typename tools::promote_args<T1, T2, T3, T4>::type
    ibetac_inv(T1 a, T2 b, T3 q, T4* py)
 {
- return ibetac_inv(a, b, q, py, policy::policy<>());
+ return ibetac_inv(a, b, q, py, policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3>
 inline typename tools::promote_args<RT1, RT2, RT3>::type
    ibetac_inv(RT1 a, RT2 b, RT3 q)
 {
- return ibetac_inv(a, b, q, static_cast<RT1*>(0), policy::policy<>());
+ return ibetac_inv(a, b, q, static_cast<RT1*>(0), policies::policy<>());
 }
 
 template <class RT1, class RT2, class RT3, class Policy>
@@ -929,3 +929,4 @@
 #endif // BOOST_MATH_SPECIAL_FUNCTIONS_IGAMMA_INVERSE_HPP
 
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -10,6 +10,7 @@
 #include <boost/math/special_functions/sign.hpp>
 #include <boost/math/tools/roots.hpp>
 #include <boost/math/policy/error_handling.hpp>
+#include <boost/tr1/tuple.hpp>
 
 namespace boost{ namespace math{
 
@@ -292,14 +293,14 @@
       // Calculate P(x) - p and the first two derivates, or if the invert
       // flag is set, then Q(x) - q and it's derivatives.
       //
- typedef typename policy::evaluation<T, Policy>::type value_type;
+ typedef typename policies::evaluation<T, Policy>::type value_type;
       typedef typename lanczos::lanczos<T, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
          Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
       using namespace std; // For ADL of std functions.
 
@@ -345,9 +346,9 @@
    static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)";
 
    if(a <= 0)
- policy::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
+ 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))
- policy::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol);
+ policies::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol);
    if(p == 1)
       return tools::max_value<T>();
    if(p == 0)
@@ -362,9 +363,9 @@
    // large convergence is slow, so we'll bump it up to full
    // precision to prevent premature termination of the root-finding routine.
    //
- unsigned digits = (policy::digits<T, Policy>() * 2) / 3;
+ unsigned digits = (policies::digits<T, Policy>() * 2) / 3;
    if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon<T>())))
- digits = policy::digits<T, Policy>() - 2;
+ digits = policies::digits<T, Policy>() - 2;
    //
    // Go ahead and iterate:
    //
@@ -375,7 +376,7 @@
       tools::max_value<T>(),
       digits);
    if(guess == lower)
- guess = policy::raise_underflow_error<T>(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol);
+ 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;
 }
 
@@ -387,9 +388,9 @@
    static const char* function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)";
 
    if(a <= 0)
- policy::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
    if((q < 0) || (q > 1))
- policy::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol);
+ policies::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol);
    if(q == 0)
       return tools::max_value<T>();
    if(q == 1)
@@ -404,9 +405,9 @@
    // large convergence is slow, so we'll bump it up to full
    // precision to prevent premature termination of the root-finding routine.
    //
- unsigned digits = (policy::digits<T, Policy>() * 2) / 3;
+ unsigned digits = (policies::digits<T, Policy>() * 2) / 3;
    if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon<T>())))
- digits = policy::digits<T, Policy>();
+ digits = policies::digits<T, Policy>();
    //
    // Go ahead and iterate:
    //
@@ -417,7 +418,7 @@
       tools::max_value<T>(),
       digits);
    if(guess == lower)
- guess = policy::raise_underflow_error<T>(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol);
+ 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;
 }
 
@@ -447,14 +448,14 @@
 inline typename tools::promote_args<T1, T2>::type
    gamma_p_inv(T1 a, T2 p)
 {
- return gamma_p_inv(a, p, policy::policy<>());
+ return gamma_p_inv(a, p, policies::policy<>());
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    gamma_q_inv(T1 a, T2 p)
 {
- return gamma_q_inv(a, p, policy::policy<>());
+ return gamma_q_inv(a, p, policies::policy<>());
 }
 
 } // namespace math
@@ -462,3 +463,4 @@
 
 #endif // BOOST_MATH_SPECIAL_FUNCTIONS_IGAMMA_INVERSE_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/igamma_large.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/igamma_large.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/igamma_large.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,12 +47,11 @@
 
 namespace boost{ namespace math{ namespace detail{
 
-//
 // This version will never be called (at runtime), it's a stub used
 // when T is unsuitable to be passed to these routines:
 //
 template <class T, class Policy>
-inline T igamma_temme_large(T, T, const Policy& pol, mpl::int_<0> const *)
+inline T igamma_temme_large(T, T, const Policy& /* pol */, mpl::int_<0> const *)
 {
    // stub function, should never actually be called
    BOOST_ASSERT(0);

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -198,7 +198,7 @@
       // we have integer degrees of freedom, try for the special
       // cases first:
       //
- T tolerance = ldexp(1.0f, (2 * policy::digits<T, Policy>()) / 3);
+ T tolerance = ldexp(1.0f, (2 * policies::digits<T, Policy>()) / 3);
 
       switch(boost::math::tools::real_cast<int>(df))
       {
@@ -402,7 +402,7 @@
    T t, x, y;
    x = ibeta_inv(df / 2, T(0.5), 2 * probability, &y, pol);
    if(df * y > tools::max_value<T>() * x)
- t = policy::raise_overflow_error<T>("boost::math::students_t_quantile<%1%>(%1%,%1%)", 0, pol);
+ t = policies::raise_overflow_error<T>("boost::math::students_t_quantile<%1%>(%1%,%1%)", 0, pol);
    else
       t = sqrt(df * y / x);
    //
@@ -487,22 +487,23 @@
 template <class T, class Policy>
 inline T fast_students_t_quantile(T df, T p, const Policy& pol)
 {
- typedef typename policy::evaluation<T, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<T, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    typedef mpl::bool_<
       (std::numeric_limits<T>::digits <= 53)
        &&
       (std::numeric_limits<T>::is_specialized)> tag_type;
- return policy::checked_narrowing_cast<T, forwarding_policy>(fast_students_t_quantile_imp(static_cast<value_type>(df), static_cast<value_type>(p), pol, static_cast<tag_type*>(0)), "boost::math::students_t_quantile<%1%>(%1%,%1%,%1%)");
+ return policies::checked_narrowing_cast<T, forwarding_policy>(fast_students_t_quantile_imp(static_cast<value_type>(df), static_cast<value_type>(p), pol, static_cast<tag_type*>(0)), "boost::math::students_t_quantile<%1%>(%1%,%1%,%1%)");
 }
 
 }}} // namespaces
 
 #endif // BOOST_MATH_SF_DETAIL_INV_T_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/digamma.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/digamma.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/digamma.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -367,7 +367,7 @@
       //
       if(remainder == 0)
       {
- return policy::raise_pole_error<T>("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol);
+ return policies::raise_pole_error<T>("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol);
       }
       result = constants::pi<T>() / tan(constants::pi<T>() * remainder);
    }
@@ -409,8 +409,8 @@
    digamma(T x, const Policy& pol)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::precision<T, Policy>::type precision_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<T, Policy>::type precision_type;
    typedef typename mpl::if_<
       mpl::or_<
          mpl::less_equal<precision_type, mpl::int_<0> >,
@@ -428,7 +428,7 @@
>::type
>::type tag_type;
 
- return policy::checked_narrowing_cast<result_type, Policy>(detail::digamma_imp(
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::digamma_imp(
       static_cast<value_type>(x),
       static_cast<const tag_type*>(0), pol), "boost::math::digamma<%1%>(%1%)");
 }
@@ -437,7 +437,7 @@
 inline typename tools::promote_args<T>::type
    digamma(T x)
 {
- return digamma(x, policy::policy<>());
+ return digamma(x, policies::policy<>());
 }
 
 } // namespace math

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -40,7 +40,7 @@
 
     if (abs(k) > 1)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got k = %1%, function requires |k| <= 1", k, pol);
     }
 
@@ -57,7 +57,7 @@
     if(phi >= tools::max_value<T>())
     {
        // Need to handle infinity as a special case:
- result = policy::raise_overflow_error<T>(function, 0, pol);
+ result = policies::raise_overflow_error<T>(function, 0, pol);
        BOOST_MATH_INSTRUMENT_CODE(result);
     }
     else if(phi > 1 / tools::epsilon<T>())
@@ -112,12 +112,12 @@
 
     if (abs(k) > 1)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got k = %1%, function requires |k| <= 1", k, pol);
     }
     if (abs(k) == 1)
     {
- return policy::raise_overflow_error<T>(function, 0, pol);
+ return policies::raise_overflow_error<T>(function, 0, pol);
     }
 
     T x = 0;
@@ -132,14 +132,14 @@
 inline typename tools::promote_args<T>::type ellint_1(T k, const Policy& pol, const mpl::true_&)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::ellint_k_imp(static_cast<value_type>(k), pol), "boost::math::ellint_1<%1%>(%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::ellint_k_imp(static_cast<value_type>(k), pol), "boost::math::ellint_1<%1%>(%1%)");
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const mpl::false_&)
 {
- return boost::math::ellint_1(k, phi, policy::policy<>());
+ return boost::math::ellint_1(k, phi, policies::policy<>());
 }
 
 }
@@ -148,7 +148,7 @@
 template <typename T>
 inline typename tools::promote_args<T>::type ellint_1(T k)
 {
- return ellint_1(k, policy::policy<>());
+ return ellint_1(k, policies::policy<>());
 }
 
 // Elliptic integral (Legendre form) of the first kind
@@ -156,14 +156,14 @@
 inline typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::ellint_f_imp(static_cast<value_type>(phi), static_cast<value_type>(k), pol), "boost::math::ellint_1<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::ellint_f_imp(static_cast<value_type>(phi), static_cast<value_type>(k), pol), "boost::math::ellint_1<%1%>(%1%,%1%)");
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi)
 {
- typedef typename policy::is_policy<T2>::type tag_type;
+ typedef typename policies::is_policy<T2>::type tag_type;
    return detail::ellint_1(k, phi, tag_type());
 }
 

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -52,7 +52,7 @@
     if(phi >= tools::max_value<T>())
     {
        // Need to handle infinity as a special case:
- result = policy::raise_overflow_error<T>("boost::math::ellint_e<%1%>(%1%,%1%)", 0, pol);
+ result = policies::raise_overflow_error<T>("boost::math::ellint_e<%1%>(%1%,%1%)", 0, pol);
     }
     else if(phi > 1 / tools::epsilon<T>())
     {
@@ -100,7 +100,7 @@
 
     if (abs(k) > 1)
     {
- return policy::raise_domain_error<T>("boost::math::ellint_e<%1%>(%1%)",
+ return policies::raise_domain_error<T>("boost::math::ellint_e<%1%>(%1%)",
             "Got k = %1%, function requires |k| <= 1", k, pol);
     }
     if (abs(k) == 1)
@@ -121,15 +121,15 @@
 inline typename tools::promote_args<T>::type ellint_2(T k, const Policy& pol, const mpl::true_&)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::ellint_e_imp(static_cast<value_type>(k), pol), "boost::math::ellint_2<%1%>(%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::ellint_e_imp(static_cast<value_type>(k), pol), "boost::math::ellint_2<%1%>(%1%)");
 }
 
 // Elliptic integral (Legendre form) of the second kind
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const mpl::false_&)
 {
- return boost::math::ellint_2(k, phi, policy::policy<>());
+ return boost::math::ellint_2(k, phi, policies::policy<>());
 }
 
 } // detail
@@ -138,14 +138,14 @@
 template <typename T>
 inline typename tools::promote_args<T>::type ellint_2(T k)
 {
- return ellint_2(k, policy::policy<>());
+ return ellint_2(k, policies::policy<>());
 }
 
 // Elliptic integral (Legendre form) of the second kind
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi)
 {
- typedef typename policy::is_policy<T2>::type tag_type;
+ typedef typename policies::is_policy<T2>::type tag_type;
    return detail::ellint_2(k, phi, tag_type());
 }
 
@@ -153,8 +153,8 @@
 inline typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::ellint_e_imp(static_cast<value_type>(phi), static_cast<value_type>(k), pol), "boost::math::ellint_2<%1%>(%1%,%1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::ellint_e_imp(static_cast<value_type>(phi), static_cast<value_type>(k), pol), "boost::math::ellint_2<%1%>(%1%,%1%)");
 }
 
 }} // namespaces

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -50,7 +50,7 @@
 
     if (abs(k) > 1)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got k = %1%, function requires |k| <= 1", k, pol);
     }
 
@@ -59,7 +59,7 @@
     if(v > 1 / (sphi * sphi))
     {
         // Complex result is a domain error:
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got v = %1%, but result is complex for v > 1 / sin^2(phi)", v, pol);
     }
 
@@ -169,7 +169,7 @@
     if(fabs(phi) > 1 / tools::epsilon<T>())
     {
        if(v > 1)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
             function,
             "Got v = %1%, but this is only supported for 0 <= phi <= pi/2", v, pol);
        //
@@ -196,7 +196,7 @@
           // The region with v > 1 and phi outside [0, pi/2] is
           // currently unsupported:
           //
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
             function,
             "Got v = %1%, but this is only supported for 0 <= phi <= pi/2", v, pol);
        }
@@ -234,13 +234,13 @@
 
     if (abs(k) >= 1)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got k = %1%, function requires |k| <= 1", k, pol);
     }
     if(vc <= 0)
     {
        // Result is complex:
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Got v = %1%, function requires v < 1", v, pol);
     }
 
@@ -276,15 +276,15 @@
 template <class T1, class T2, class T3>
 inline typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const mpl::false_&)
 {
- return boost::math::ellint_3(k, v, phi, policy::policy<>());
+ return boost::math::ellint_3(k, v, phi, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v, const Policy& pol, const mpl::true_&)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_pi_imp(
          static_cast<value_type>(v),
          static_cast<value_type>(k),
@@ -298,8 +298,8 @@
 inline typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2, T3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_pi_imp(
          static_cast<value_type>(v),
          static_cast<value_type>(phi),
@@ -311,14 +311,14 @@
 template <class T1, class T2, class T3>
 inline typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi)
 {
- typedef typename policy::is_policy<T3>::type tag_type;
+ typedef typename policies::is_policy<T3>::type tag_type;
    return detail::ellint_3(k, v, phi, tag_type());
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v)
 {
- return ellint_3(k, v, policy::policy<>());
+ return ellint_3(k, v, policies::policy<>());
 }
 
 }} // namespaces

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_rc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_rc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_rc.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -36,12 +36,12 @@
 
     if(x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument x must be non-negative but got %1%", x, pol);
     }
     if(y == 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument y must not be zero but got %1%", y, pol);
     }
 
@@ -74,7 +74,7 @@
         y = (y + lambda) / 4;
     }
     // Check to see if we gave up too soon:
- policy::check_series_iterations(function, k, pol);
+ policies::check_series_iterations(function, k, pol);
 
     // Taylor series expansion to the 5th order
     value = (1 + S * S * (T(3) / 10 + S * (T(1) / 7 + S * (T(3) / 8 + S * T(9) / 22)))) / sqrt(u);
@@ -89,8 +89,8 @@
    ellint_rc(T1 x, T2 y, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_rc_imp(
          static_cast<value_type>(x),
          static_cast<value_type>(y), pol), "boost::math::ellint_rc<%1%>(%1%,%1%)");
@@ -100,7 +100,7 @@
 inline typename tools::promote_args<T1, T2>::type
    ellint_rc(T1 x, T2 y)
 {
- return ellint_rc(x, y, policy::policy<>());
+ return ellint_rc(x, y, policies::policy<>());
 }
 
 }} // namespaces

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_rd.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_rd.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_rd.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -35,22 +35,22 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument x must be >= 0, but got %1%", x, pol);
     }
     if (y < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument y must be >= 0, but got %1%", y, pol);
     }
     if (z <= 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument z must be > 0, but got %1%", z, pol);
     }
     if (x + y == 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "At most one argument can be zero, but got, x + y = %1%", x+y, pol);
     }
 
@@ -79,7 +79,7 @@
         z = (z + lambda) / 4;
     }
     // Check to see if we gave up too soon:
- policy::check_series_iterations(function, k, pol);
+ policies::check_series_iterations(function, k, pol);
 
     // Taylor series expansion to the 5th order
     EA = X * Y;
@@ -101,8 +101,8 @@
    ellint_rd(T1 x, T2 y, T3 z, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2, T3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_rd_imp(
          static_cast<value_type>(x),
          static_cast<value_type>(y),
@@ -113,7 +113,7 @@
 inline typename tools::promote_args<T1, T2, T3>::type
    ellint_rd(T1 x, T2 y, T3 z)
 {
- return ellint_rd(x, y, z, policy::policy<>());
+ return ellint_rd(x, y, z, policies::policy<>());
 }
 
 }} // namespaces

Modified: sandbox/math_toolkit/boost/math/special_functions/ellint_rf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/ellint_rf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/ellint_rf.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -36,14 +36,14 @@
 
     if (x < 0 || y < 0 || z < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "domain error, all arguments must be non-negative, "
             "only sensible result is %1%.",
             std::numeric_limits<T>::quiet_NaN(), pol);
     }
     if (x + y == 0 || y + z == 0 || z + x == 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "domain error, at most one argument can be zero, "
             "only sensible result is %1%.",
             std::numeric_limits<T>::quiet_NaN(), pol);
@@ -52,7 +52,7 @@
     // Carlson scales error as the 6th power of tolerance,
     // but this seems not to work for types larger than
     // 80-bit reals, this heuristic seems to work OK:
- if(policy::digits<T, Policy>() > 64)
+ if(policies::digits<T, Policy>() > 64)
     {
       tolerance = pow(tools::epsilon<T>(), T(1)/4.25f);
       BOOST_MATH_INSTRUMENT_CODE(tolerance);
@@ -84,7 +84,7 @@
         z = (z + lambda) / 4;
     }
     // Check to see if we gave up too soon:
- policy::check_series_iterations(function, k, pol);
+ policies::check_series_iterations(function, k, pol);
     BOOST_MATH_INSTRUMENT_CODE(k);
 
     // Taylor series expansion to the 5th order
@@ -103,8 +103,8 @@
    ellint_rf(T1 x, T2 y, T3 z, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2, T3>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_rf_imp(
          static_cast<value_type>(x),
          static_cast<value_type>(y),
@@ -115,7 +115,7 @@
 inline typename tools::promote_args<T1, T2, T3>::type
    ellint_rf(T1 x, T2 y, T3 z)
 {
- return ellint_rf(x, y, z, policy::policy<>());
+ return ellint_rf(x, y, z, policies::policy<>());
 }
 
 }} // namespaces

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -38,27 +38,27 @@
 
     if (x < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument x must be non-negative, but got x = %1%", x, pol);
     }
     if(y < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument y must be non-negative, but got y = %1%", y, pol);
     }
     if(z < 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument z must be non-negative, but got z = %1%", z, pol);
     }
     if(p == 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "Argument p must not be zero, but got p = %1%", p, pol);
     }
     if (x + y == 0 || y + z == 0 || z + x == 0)
     {
- return policy::raise_domain_error<T>(function,
+ return policies::raise_domain_error<T>(function,
             "At most one argument can be zero, "
             "only possible result is %1%.", std::numeric_limits<T>::quiet_NaN(), pol);
     }
@@ -125,7 +125,7 @@
         p = (p + lambda) / 4;
     }
     // Check to see if we gave up too soon:
- policy::check_series_iterations(function, k, pol);
+ policies::check_series_iterations(function, k, pol);
 
     // Taylor series expansion to the 5th order
     EA = X * Y + Y * Z + Z * X;
@@ -148,8 +148,8 @@
    ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2, T3, T4>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(
       detail::ellint_rj_imp(
          static_cast<value_type>(x),
          static_cast<value_type>(y),
@@ -162,7 +162,7 @@
 inline typename tools::promote_args<T1, T2, T3, T4>::type
    ellint_rj(T1 x, T2 y, T3 z, T4 p)
 {
- return ellint_rj(x, y, z, p, policy::policy<>());
+ return ellint_rj(x, y, z, p, policies::policy<>());
 }
 
 }} // namespaces

Modified: sandbox/math_toolkit/boost/math/special_functions/erf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/erf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/erf.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -79,7 +79,7 @@
 template <class T, class Policy>
 inline T erf_asymptotic_limit()
 {
- typedef typename policy::precision<T, Policy>::type precision_type;
+ typedef typename policies::precision<T, Policy>::type precision_type;
    typedef typename mpl::if_<
       mpl::less_equal<precision_type, mpl::int_<24> >,
       typename mpl::if_<
@@ -127,8 +127,8 @@
    {
       detail::erf_asympt_series_t<T> s(z);
       boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- result = boost::math::tools::sum_series(s, policy::digits<T, Policy>(), max_iter, 1);
- policy::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol);
+ result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter, 1);
+ policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol);
    }
    else
    {
@@ -154,7 +154,7 @@
          invert = !invert;
          result = z * exp(-x);
          result /= sqrt(boost::math::constants::pi<T>());
- result *= upper_gamma_fraction(T(0.5f), x, policy::digits<T, Policy>());
+ result *= upper_gamma_fraction(T(0.5f), x, policies::digits<T, Policy>());
       }
    }
    if(invert)
@@ -737,17 +737,17 @@
 } // namespace detail
 
 template <class T, class Policy>
-inline typename tools::promote_args<T>::type erf(T z, const Policy& pol)
+inline typename tools::promote_args<T>::type erf(T z, const Policy& /* pol */)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::precision<result_type, Policy>::type precision_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    typedef typename mpl::if_<
       mpl::less_equal<precision_type, mpl::int_<0> >,
@@ -767,7 +767,7 @@
>::type
>::type tag_type;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
       static_cast<value_type>(z),
       false,
       forwarding_policy(),
@@ -778,14 +778,14 @@
 inline typename tools::promote_args<T>::type erfc(T z, const Policy& /* pol */)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::precision<result_type, Policy>::type precision_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    typedef typename mpl::if_<
       mpl::less_equal<precision_type, mpl::int_<0> >,
@@ -805,7 +805,7 @@
>::type
>::type tag_type;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
       static_cast<value_type>(z),
       true,
       forwarding_policy(),
@@ -815,13 +815,13 @@
 template <class T>
 inline typename tools::promote_args<T>::type erf(T z)
 {
- return boost::math::erf(z, policy::policy<>());
+ return boost::math::erf(z, policies::policy<>());
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type erfc(T z)
 {
- return boost::math::erfc(z, policy::policy<>());
+ return boost::math::erfc(z, policies::policy<>());
 }
 
 } // namespace math
@@ -832,3 +832,4 @@
 #endif // BOOST_MATH_SPECIAL_ERF_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/expm1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/expm1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/expm1.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -78,12 +78,12 @@
    detail::expm1_series<T> s(x);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- T result = tools::sum_series(s, policy::digits<T, Policy>(), max_iter);
+ T result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter);
 #else
    T zero = 0;
- T result = tools::sum_series(s, policy::digits<T, Policy>(), max_iter, zero);
+ T result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter, zero);
 #endif
- policy::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol);
+ policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol);
    return result;
 }
 
@@ -189,14 +189,14 @@
 inline typename tools::promote_args<T>::type expm1(T x, const Policy& /* pol */)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::precision<result_type, Policy>::type precision_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
    typedef typename mpl::if_c<
       ::std::numeric_limits<result_type>::is_specialized == 0,
@@ -216,7 +216,7 @@
>::type
>::type tag_type;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::expm1_imp(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::expm1_imp(
       static_cast<value_type>(x),
       tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)");
 }
@@ -230,18 +230,18 @@
 
 #ifdef BOOST_HAS_EXPM1
 # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
-inline float expm1(float x, const policy::policy<>&){ return ::expm1f(x); }
-inline long double expm1(long double x, const policy::policy<>&){ return ::expm1l(x); }
+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
-inline float expm1(float x, const policy::policy<>&){ return ::expm1(x); }
+inline float expm1(float x, const policies::policy<>&){ return ::expm1(x); }
 #endif
-inline double expm1(double x, const policy::policy<>&){ return ::expm1(x); }
+inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); }
 #endif
 
 template <class T>
 inline typename tools::promote_args<T>::type expm1(T x)
 {
- return expm1(x, policy::policy<>());
+ return expm1(x, policies::policy<>());
 }
 
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
@@ -264,3 +264,4 @@
 
 #endif // BOOST_MATH_HYPOT_INCLUDED
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/factorials.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/factorials.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/factorials.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -39,7 +39,7 @@
 template <class T>
 inline T factorial(unsigned i)
 {
- return factorial<T>(i, policy::policy<>());
+ return factorial<T>(i, policies::policy<>());
 }
 /*
 // Can't have these in a policy enabled world?
@@ -90,13 +90,13 @@
    //
    // If we fall through to here then the result is infinite:
    //
- return policy::raise_overflow_error<T>("boost::math::double_factorial<%1%>(unsigned)", 0, pol);
+ return policies::raise_overflow_error<T>("boost::math::double_factorial<%1%>(unsigned)", 0, pol);
 }
 
 template <class T>
 inline T double_factorial(unsigned i)
 {
- return double_factorial<T>(i, policy::policy<>());
+ return double_factorial<T>(i, policies::policy<>());
 }
 
 namespace detail{
@@ -188,7 +188,7 @@
 {
    typedef typename tools::promote_args<RT>::type result_type;
    return detail::falling_factorial_imp(
- static_cast<result_type>(x), n, policy::policy<>());
+ static_cast<result_type>(x), n, policies::policy<>());
 }
 
 template <class RT, class Policy>
@@ -206,7 +206,7 @@
 {
    typedef typename tools::promote_args<RT>::type result_type;
    return detail::rising_factorial_imp(
- static_cast<result_type>(x), n, policy::policy<>());
+ static_cast<result_type>(x), n, policies::policy<>());
 }
 
 template <class RT, class Policy>

Modified: sandbox/math_toolkit/boost/math/special_functions/gamma.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/gamma.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/gamma.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -58,6 +58,7 @@
 // Several variables made comments,
 // but some difficulty as whether referenced on not may depend on macro values.
 // So to be safe, 4100 warnings suppressed.
+// TODO - revisit this?
 #endif
 
 namespace boost{ namespace math{
@@ -138,17 +139,17 @@
    static const char* function = "boost::math::tgamma<%1%>(%1%)";
 
    if((z <= 0) && (floor(z) == z))
- return policy::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
    if(z <= -20)
    {
       result = gamma_imp(-z, pol, l) * sinpx(z);
       if((fabs(result) < 1) && (tools::max_value<T>() * fabs(result) < boost::math::constants::pi<T>()))
- return policy::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
       result = -boost::math::constants::pi<T>() / result;
       if(result == 0)
- return policy::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
       if(boost::math::fpclassify(result) == FP_SUBNORMAL)
- return policy::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
+ return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
       return result;
    }
 
@@ -170,11 +171,11 @@
          // we're going to overflow unless this is done with care:
          T zgh = (z + static_cast<T>(L::g()) - boost::math::constants::half<T>());
          if(log(zgh) * z / 2 > tools::log_max_value<T>())
- return policy::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
          T hp = pow(zgh, (z / 2) - T(0.25));
          result *= hp / exp(zgh);
          if(tools::max_value<T>() / hp < result)
- return policy::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
          result *= hp;
       }
       else
@@ -210,7 +211,7 @@
    {
       // reflection formula:
       if(floor(z) == z)
- return policy::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
 
       T t = sinpx(z);
       z = -z;
@@ -226,7 +227,7 @@
    }
    else if(z < 15)
    {
- typedef typename policy::precision<T, Policy>::type precision_type;
+ typedef typename policies::precision<T, Policy>::type precision_type;
       typedef typename mpl::if_<
          mpl::less_equal<precision_type, mpl::int_<64> >,
          mpl::int_<64>,
@@ -317,14 +318,14 @@
    // to get the normalised value.
    lower_incomplete_gamma_series<T> s(a, z);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
- int bits = policy::digits<T, Policy>();
+ int bits = policies::digits<T, Policy>();
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    T zero = 0;
    T result = boost::math::tools::sum_series(s, bits, max_iter, zero);
 #else
    T result = boost::math::tools::sum_series(s, bits, max_iter);
 #endif
- policy::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
+ policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
    return result;
 }
 
@@ -338,17 +339,17 @@
    static const char* function = "boost::math::tgamma<%1%>(%1%)";
    using namespace std;
    if((z <= 0) && (floor(z) == z))
- return policy::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
    if(z <= -20)
    {
       T result = gamma_imp(-z, pol, l) * sinpx(z);
       if((fabs(result) < 1) && (tools::max_value<T>() * fabs(result) < boost::math::constants::pi<T>()))
- return policy::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
       result = -boost::math::constants::pi<T>() / result;
       if(result == 0)
- return policy::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
       if(boost::math::fpclassify(result) == FP_SUBNORMAL)
- return policy::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
+ return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
       return result;
    }
    //
@@ -373,10 +374,10 @@
       BOOST_MATH_INSTRUMENT_CODE(prefix);
       T sum = detail::lower_gamma_series(z, z, pol) / z;
       BOOST_MATH_INSTRUMENT_CODE(sum);
- sum += detail::upper_gamma_fraction(z, z, ::boost::math::policy::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::digits<T, Policy>());
       BOOST_MATH_INSTRUMENT_CODE(sum);
       if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
- return policy::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
       BOOST_MATH_INSTRUMENT_CODE((sum * prefix));
       return sum * prefix;
    }
@@ -394,7 +395,7 @@
    if(z <= 0)
    {
       if(floor(z) == z)
- return policy::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
       T t = detail::sinpx(z);
       z = -z;
       if(t < 0)
@@ -412,7 +413,7 @@
       T limit = (std::max)(z+1, T(10));
       T prefix = z * log(limit) - limit;
       T sum = detail::lower_gamma_series(z, limit, pol) / z;
- sum += detail::upper_gamma_fraction(z, limit, ::boost::math::policy::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, limit, ::boost::math::policies::digits<T, Policy>());
       result = log(sum) + prefix;
    }
    if(sign)
@@ -428,7 +429,7 @@
 {
    using namespace std;
 
- typedef typename policy::precision<T,Policy>::type precision_type;
+ typedef typename policies::precision<T,Policy>::type precision_type;
 
    typedef typename mpl::if_<
       mpl::or_<
@@ -501,8 +502,8 @@
    //
    BOOST_MATH_INSTRUMENT_CODE((dz > -0.5));
    BOOST_MATH_INSTRUMENT_CODE((dz < 2));
- BOOST_MATH_INSTRUMENT_CODE((ldexp(1.0, boost::math::policy::digits<T, Policy>()) * fabs(result) < 1e34));
- if((dz > -0.5) && (dz < 2) && (ldexp(1.0, boost::math::policy::digits<T, Policy>()) * fabs(result) < 1e34))
+ BOOST_MATH_INSTRUMENT_CODE((ldexp(1.0, boost::math::policies::digits<T, Policy>()) * fabs(result) < 1e34));
+ if((dz > -0.5) && (dz < 2) && (ldexp(1.0, boost::math::policies::digits<T, Policy>()) * fabs(result) < 1e34))
    {
       result = tgammap1m1_imp(dz, pol, boost::math::lanczos::lanczos24m113());
       BOOST_MATH_INSTRUMENT_CODE(result);
@@ -580,7 +581,7 @@
    // rather than before it...
    //
    if(boost::math::fpclassify(prefix) == FP_INFINITE)
- policy::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol);
+ policies::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol);
 
    return prefix;
 }
@@ -677,7 +678,7 @@
 
    T limit = (std::max)(T(10), a);
    T sum = detail::lower_gamma_series(a, limit, pol) / a;
- sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policy::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::digits<T, Policy>());
 
    if(a < 10)
    {
@@ -731,11 +732,11 @@
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    T zero = 0;
- result -= pow(x, a) * tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter, zero);
+ result -= pow(x, a) * tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, zero);
 #else
- result -= pow(x, a) * tools::sum_series(s, boost::math::policy::digits<T, Policy>(), max_iter);
+ result -= pow(x, a) * tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
 #endif
- policy::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
+ policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
    return result;
 }
 //
@@ -807,9 +808,9 @@
 {
    static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)";
    if(a <= 0)
- policy::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
    if(x < 0)
- policy::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
+ policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
 
    using namespace std;
 
@@ -905,7 +906,7 @@
       if(normalised && std::numeric_limits<T>::is_specialized && (a > 20))
       {
          T sigma = fabs((x-a)/a);
- if((a > 200) && (policy::digits<T, Policy>() <= 113))
+ if((a > 200) && (policies::digits<T, Policy>() <= 113))
          {
             //
             // This limit is chosen so that we use Temme's expansion
@@ -918,7 +919,7 @@
             if(20 / a > sigma * sigma)
                use_temme = true;
          }
- else if(policy::digits<T, Policy>() <= 64)
+ else if(policies::digits<T, Policy>() <= 64)
          {
             // Note in this zone we can't use Temme's expansion for
             // types longer than an 80-bit real:
@@ -937,7 +938,7 @@
          // these expansions, in that case we'll be calling
          // an empty function.
          //
- typedef typename policy::precision<T, Policy>::type precision_type;
+ typedef typename policies::precision<T, Policy>::type precision_type;
 
          typedef typename mpl::if_<
             mpl::or_<mpl::equal_to<precision_type, mpl::int_<0> >,
@@ -981,7 +982,7 @@
             // Compute Q:
             invert = !invert;
             if(result != 0)
- result *= upper_gamma_fraction(a, x, policy::digits<T, Policy>());
+ result *= upper_gamma_fraction(a, x, policies::digits<T, Policy>());
          }
       }
    }
@@ -1060,12 +1061,12 @@
    }
    prefix *= pow(constants::e<T>() / zd, delta);
    T sum = detail::lower_gamma_series(z, z, pol) / z;
- sum += detail::upper_gamma_fraction(z, z, ::boost::math::policy::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::digits<T, Policy>());
    T sumd = detail::lower_gamma_series(zd, zd, pol) / zd;
- sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policy::digits<T, Policy>());
+ sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::digits<T, Policy>());
    sum /= sumd;
    if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
- return policy::raise_overflow_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol);
+ return policies::raise_overflow_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol);
    return sum * prefix;
 }
 
@@ -1075,9 +1076,9 @@
    using namespace std;
 
    if(z <= 0)
- policy::raise_domain_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", z, pol);
+ policies::raise_domain_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", z, pol);
    if(z+delta <= 0)
- policy::raise_domain_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", z+delta, pol);
+ policies::raise_domain_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", z+delta, pol);
 
    if(floor(delta) == delta)
    {
@@ -1133,16 +1134,16 @@
    // Usual error checks first:
    //
    if(a <= 0)
- policy::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
+ policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
    if(x < 0)
- policy::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
+ policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
    //
    // Now special cases:
    //
    if(x == 0)
    {
       return (a > 1) ? 0 :
- (a == 1) ? 1 : policy::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
+ (a == 1) ? 1 : policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
    }
    //
    // Normal case:
@@ -1152,7 +1153,7 @@
    if((x < 1) && (tools::max_value<T>() * x < f1))
    {
       // overflow:
- return policy::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
+ return policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
    }
 
    f1 /= x;
@@ -1166,15 +1167,15 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)");
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)");
 }
 
 template <class T1, class T2, class Policy>
@@ -1183,15 +1184,15 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::gamma_incomplete_imp(static_cast<value_type>(a),
       static_cast<value_type>(z), false, true,
       forwarding_policy(), static_cast<value_type*>(0)), "boost::math::tgamma<%1%>(%1%, %1%)");
@@ -1201,7 +1202,7 @@
 inline typename tools::promote_args<T1, T2>::type
    tgamma(T1 a, T2 z, const mpl::false_ tag)
 {
- return tgamma(a, z, policy::policy<>(), tag);
+ return tgamma(a, z, policies::policy<>(), tag);
 }
 
 } // namespace detail
@@ -1210,7 +1211,7 @@
 inline typename tools::promote_args<T>::type
    tgamma(T z)
 {
- return tgamma(z, policy::policy<>());
+ return tgamma(z, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -1219,22 +1220,22 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::lgamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)");
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::lgamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    lgamma(T z, int* sign)
 {
- return lgamma(z, sign, policy::policy<>());
+ return lgamma(z, sign, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -1248,7 +1249,7 @@
 inline typename tools::promote_args<T>::type
    lgamma(T x)
 {
- return ::boost::math::lgamma(x, 0, policy::policy<>());
+ return ::boost::math::lgamma(x, 0, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -1257,23 +1258,23 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<typename remove_cv<result_type>::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)");
+ return policies::checked_narrowing_cast<typename remove_cv<result_type>::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    tgamma1pm1(T z)
 {
- return tgamma1pm1(z, policy::policy<>());
+ return tgamma1pm1(z, policies::policy<>());
 }
 
 //
@@ -1287,7 +1288,7 @@
    // Type T2 could be a policy object, or a value, select the
    // right overload based on T2:
    //
- typedef typename policy::is_policy<T2>::type maybe_policy;
+ typedef typename policies::is_policy<T2>::type maybe_policy;
    return detail::tgamma(a, z, maybe_policy());
 }
 template <class T1, class T2, class Policy>
@@ -1305,16 +1306,16 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::gamma_incomplete_imp(static_cast<value_type>(a),
       static_cast<value_type>(z), false, false,
       forwarding_policy(), static_cast<value_type*>(0)), "tgamma_lower<%1%>(%1%, %1%)");
@@ -1323,7 +1324,7 @@
 inline typename tools::promote_args<T1, T2>::type
    tgamma_lower(T1 a, T2 z)
 {
- return tgamma_lower(a, z, policy::policy<>());
+ return tgamma_lower(a, z, policies::policy<>());
 }
 //
 // Regularised upper incomplete gamma:
@@ -1334,16 +1335,16 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::gamma_incomplete_imp(static_cast<value_type>(a),
       static_cast<value_type>(z), true, true,
       forwarding_policy(), static_cast<value_type*>(0)), "gamma_q<%1%>(%1%, %1%)");
@@ -1352,7 +1353,7 @@
 inline typename tools::promote_args<T1, T2>::type
    gamma_q(T1 a, T2 z)
 {
- return gamma_q(a, z, policy::policy<>());
+ return gamma_q(a, z, policies::policy<>());
 }
 //
 // Regularised lower incomplete gamma:
@@ -1363,16 +1364,16 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policy::normalise<
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
       detail::gamma_incomplete_imp(static_cast<value_type>(a),
       static_cast<value_type>(z), true, false,
       forwarding_policy(), static_cast<value_type*>(0)), "gamma_p<%1%>(%1%, %1%)");
@@ -1381,7 +1382,7 @@
 inline typename tools::promote_args<T1, T2>::type
    gamma_p(T1 a, T2 z)
 {
- return gamma_p(a, z, policy::policy<>());
+ return gamma_p(a, z, policies::policy<>());
 }
 
 // ratios of gamma functions:
@@ -1391,42 +1392,42 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(z), static_cast<value_type>(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(z), static_cast<value_type>(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
 }
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    tgamma_delta_ratio(T1 z, T2 delta)
 {
- return tgamma_delta_ratio(z, delta, policy::policy<>());
+ return tgamma_delta_ratio(z, delta, policies::policy<>());
 }
 template <class T1, class T2, class Policy>
 inline typename tools::promote_args<T1, T2>::type
    tgamma_ratio(T1 a, T2 b, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(a), static_cast<value_type>(b) - static_cast<value_type>(a), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(a), static_cast<value_type>(b) - static_cast<value_type>(a), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
 }
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    tgamma_ratio(T1 a, T2 b)
 {
- return tgamma_ratio(a, b, policy::policy<>());
+ return tgamma_ratio(a, b, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -1435,21 +1436,21 @@
 {
    BOOST_FPU_EXCEPTION_GUARD
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- typedef typename policy::normalise<
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
       Policy,
- policy::promote_float<false>,
- policy::promote_double<false>,
- policy::discrete_quantile<>,
- policy::assert_undefined<> >::type forwarding_policy;
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
 
- return policy::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_p_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)");
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_p_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)");
 }
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    gamma_p_derivative(T1 a, T2 x)
 {
- return gamma_p_derivative(a, x, policy::policy<>());
+ return gamma_p_derivative(a, x, policies::policy<>());
 }
 
 } // namespace math
@@ -1466,3 +1467,4 @@
 #endif // BOOST_MATH_SF_GAMMA_HPP
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/hermite.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/hermite.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/hermite.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -52,15 +52,15 @@
    hermite(unsigned n, T x, const Policy&)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::hermite_imp(n, static_cast<value_type>(x)), "boost::math::hermite<%1%>(unsigned, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::hermite_imp(n, static_cast<value_type>(x)), "boost::math::hermite<%1%>(unsigned, %1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    hermite(unsigned n, T x)
 {
- return boost::math::hermite(n, x, policy::policy<>());
+ return boost::math::hermite(n, x, policies::policy<>());
 }
 
 } // namespace math
@@ -68,3 +68,4 @@
 
 #endif // BOOST_MATH_SPECIAL_HERMITE_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/hypot.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/hypot.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/hypot.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -38,7 +38,7 @@
    if(std::numeric_limits<T>::has_infinity
       && ((x == std::numeric_limits<T>::infinity())
       || (y == std::numeric_limits<T>::infinity())))
- return policy::raise_overflow_error<T>("boost::math::hypot<%1%>(%1%,%1%)", 0, pol);
+ return policies::raise_overflow_error<T>("boost::math::hypot<%1%>(%1%,%1%)", 0, pol);
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
@@ -61,7 +61,7 @@
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
    return detail::hypot_imp(
- static_cast<result_type>(x), static_cast<result_type>(y), policy::policy<>());
+ static_cast<result_type>(x), static_cast<result_type>(y), policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -78,3 +78,4 @@
 
 #endif // BOOST_MATH_HYPOT_INCLUDED
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/laguerre.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/laguerre.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/laguerre.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -51,15 +51,15 @@
 laguerre(unsigned n, T x, const Policy&, const mpl::true_&)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::laguerre_imp(n, static_cast<value_type>(x)), "boost::math::laguerre<%1%>(unsigned, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::laguerre_imp(n, static_cast<value_type>(x)), "boost::math::laguerre<%1%>(unsigned, %1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    laguerre(unsigned n, unsigned m, T x, const mpl::false_&)
 {
- return boost::math::laguerre(n, m, x, policy::policy<>());
+ return boost::math::laguerre(n, m, x, policies::policy<>());
 }
 
 } // namespace detail
@@ -68,7 +68,7 @@
 inline typename tools::promote_args<T>::type
    laguerre(unsigned n, T x)
 {
- return laguerre(n, x, policy::policy<>());
+ return laguerre(n, x, policies::policy<>());
 }
 
 // Recurrence for associated polynomials:
@@ -114,15 +114,15 @@
    laguerre(unsigned n, unsigned m, T x, const Policy& pol)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::laguerre_imp(n, m, static_cast<value_type>(x), pol), "boost::math::laguerre<%1%>(unsigned, unsigned, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::laguerre_imp(n, m, static_cast<value_type>(x), pol), "boost::math::laguerre<%1%>(unsigned, unsigned, %1%)");
 }
 
 template <class T1, class T2>
 inline typename laguerre_result<T1, T2>::type
    laguerre(unsigned n, T1 m, T2 x)
 {
- typedef typename policy::is_policy<T2>::type tag_type;
+ typedef typename policies::is_policy<T2>::type tag_type;
    return detail::laguerre(n, m, x, tag_type());
 }
 
@@ -131,3 +131,4 @@
 
 #endif // BOOST_MATH_SPECIAL_LAGUERRE_HPP
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1209,11 +1209,11 @@
 {
    typedef typename mpl::if_<
       typename mpl::less_equal<
- typename policy::precision<Real, Policy>::type,
+ typename policies::precision<Real, Policy>::type,
          mpl::int_<0>
>::type,
       mpl::int_<INT_MAX - 2>,
- typename policy::precision<Real, Policy>::type
+ typename policies::precision<Real, Policy>::type
>::type target_precision;
 
    typedef typename mpl::deref<typename mpl::find_if<
@@ -1228,3 +1228,4 @@
 #endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/legendre.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/legendre.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/legendre.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -32,7 +32,7 @@
    static const char* function = "boost::math::legrendre_p<%1%>(unsigned, %1%)";
    // Error handling:
    if((x < -1) || (x > 1))
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function,
          "The Legendre Polynomial is defined for"
          " -1 <= x <= 1, but got x = %1%.", x, pol);
@@ -71,18 +71,18 @@
    legendre_p(int l, T x, const Policy& pol)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    static const char* function = "boost::math::legendre_p<%1%>(unsigned, %1%)";
    if(l < 0)
- return policy::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(-l-1, static_cast<value_type>(x), pol, false), function);
- return policy::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(l, static_cast<value_type>(x), pol, false), function);
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(-l-1, static_cast<value_type>(x), pol, false), function);
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(l, static_cast<value_type>(x), pol, false), function);
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    legendre_p(int l, T x)
 {
- return boost::math::legendre_p(l, x, policy::policy<>());
+ return boost::math::legendre_p(l, x, policies::policy<>());
 }
 
 template <class T, class Policy>
@@ -90,15 +90,15 @@
    legendre_q(unsigned l, T x, const Policy& pol)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(l, static_cast<value_type>(x), pol, true), "boost::math::legendre_q<%1%>(unsigned, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::legendre_imp(l, static_cast<value_type>(x), pol, true), "boost::math::legendre_q<%1%>(unsigned, %1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    legendre_q(unsigned l, T x)
 {
- return boost::math::legendre_q(l, x, policy::policy<>());
+ return boost::math::legendre_q(l, x, policies::policy<>());
 }
 
 // Recurrence for associated polynomials:
@@ -117,7 +117,7 @@
 {
    // Error handling:
    if((x < -1) || (x > 1))
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
       "boost::math::legendre_p<%1%>(int, int, %1%)",
          "The associated Legendre Polynomial is defined for"
          " -1 <= x <= 1, but got x = %1%.", x, pol);
@@ -170,15 +170,15 @@
    legendre_p(int l, int m, T x, const Policy& pol)
 {
    typedef typename tools::promote_args<T>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::legendre_p_imp(l, m, static_cast<value_type>(x), pol), "bost::math::legendre_p<%1%>(int, int, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::legendre_p_imp(l, m, static_cast<value_type>(x), pol), "bost::math::legendre_p<%1%>(int, int, %1%)");
 }
 
 template <class T>
 inline typename tools::promote_args<T>::type
    legendre_p(int l, int m, T x)
 {
- return boost::math::legendre_p(l, m, x, policy::policy<>());
+ return boost::math::legendre_p(l, m, x, policies::policy<>());
 }
 
 } // namespace math
@@ -186,3 +186,4 @@
 
 #endif // BOOST_MATH_SPECIAL_LEGENDRE_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/log1p.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/log1p.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/log1p.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -77,10 +77,10 @@
    static const char* function = "boost::math::log1p<%1%>(%1%)";
 
    if(x < -1)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<T>(
+ return -policies::raise_overflow_error<T>(
          function, 0, pol);
 
    result_type a = abs(result_type(x));
@@ -93,12 +93,12 @@
    detail::log1p_series<result_type> s(x);
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- result_type result = tools::sum_series(s, policy::digits<result_type, Policy>(), max_iter);
+ result_type result = tools::sum_series(s, policies::digits<result_type, Policy>(), max_iter);
 #else
    result_type zero = 0;
- result_type result = tools::sum_series(s, policy::digits<result_type, Policy>(), max_iter, zero);
+ result_type result = tools::sum_series(s, policies::digits<result_type, Policy>(), max_iter, zero);
 #endif
- policy::check_series_iterations(function, max_iter, pol);
+ policies::check_series_iterations(function, max_iter, pol);
    return result;
 }
 
@@ -133,10 +133,10 @@
 inline float log1p(float x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<float>(
+ return policies::raise_domain_error<float>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<float>(
+ return -policies::raise_overflow_error<float>(
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1pf(x);
 }
@@ -144,10 +144,10 @@
 inline long double log1p(long double x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<long double>(
+ return policies::raise_domain_error<long double>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<long double>(
+ return -policies::raise_overflow_error<long double>(
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1pl(x);
 }
@@ -156,10 +156,10 @@
 inline float log1p(float x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<float>(
+ return policies::raise_domain_error<float>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<float>(
+ return -policies::raise_overflow_error<float>(
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1p(x);
 }
@@ -168,10 +168,10 @@
 inline double log1p(double x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<double>(
+ return policies::raise_domain_error<double>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<double>(
+ return -policies::raise_overflow_error<double>(
          "log1p<%1%>(%1%)", 0, pol);
    return ::log1p(x);
 }
@@ -185,10 +185,10 @@
 inline double log1p(double x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<double>(
+ return policies::raise_domain_error<double>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<double>(
+ return -policies::raise_overflow_error<double>(
          "log1p<%1%>(%1%)", 0, pol);
    double u = 1+x;
    if(u == 1.0)
@@ -205,10 +205,10 @@
 inline long double log1p(long double x, const Policy& pol)
 {
    if(x < -1)
- return policy::raise_domain_error<long double>(
+ return policies::raise_domain_error<long double>(
          "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<long double>(
+ return -policies::raise_overflow_error<long double>(
          "log1p<%1%>(%1%)", 0, pol);
    long double u = 1+x;
    if(u == 1.0)
@@ -221,7 +221,7 @@
 template <class T>
 inline typename tools::promote_args<T>::type log1p(T x)
 {
- return boost::math::log1p(x, policy::policy<>());
+ return boost::math::log1p(x, policies::policy<>());
 }
 //
 // Compute log(1+x)-x:
@@ -235,10 +235,10 @@
    static const char* function = "boost::math::log1pmx<%1%>(%1%)";
 
    if(x < -1)
- return policy::raise_domain_error<T>(
+ return policies::raise_domain_error<T>(
          function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol);
    if(x == -1)
- return -policy::raise_overflow_error<T>(
+ return -policies::raise_overflow_error<T>(
          function, 0, pol);
 
    result_type a = abs(result_type(x));
@@ -253,18 +253,18 @@
    boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    T zero = 0;
- T result = boost::math::tools::sum_series(s, policy::digits<T, Policy>(), max_iter, zero);
+ T result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter, zero);
 #else
- T result = boost::math::tools::sum_series(s, policy::digits<T, Policy>(), max_iter);
+ T result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter);
 #endif
- policy::check_series_iterations(function, max_iter, pol);
+ policies::check_series_iterations(function, max_iter, pol);
    return result;
 }
 
 template <class T>
 inline T log1pmx(T x)
 {
- return log1pmx(x, policy::policy<>());
+ return log1pmx(x, policies::policy<>());
 }
 
 } // namespace math
@@ -272,3 +272,4 @@
 
 #endif // BOOST_MATH_LOG1P_INCLUDED
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -214,7 +214,7 @@
    struct laguerre_result
    {
       typedef typename mpl::if_<
- policy::is_policy<T2>,
+ policies::is_policy<T2>,
          typename tools::promote_args<T1>::type,
          typename tools::promote_args<T2>::type
>::type type;
@@ -545,7 +545,7 @@
             T1, T2
>::type result_type;
 
- typedef typename policy::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
 
          typedef typename mpl::if_<
             mpl::or_<
@@ -566,37 +566,37 @@
    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
 
    template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
 
    template <class T, class Policy>
    typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
 
    template <class T>
- typename detail::bessel_traits<T, T, policy::policy<> >::result_type sph_bessel(unsigned v, T x);
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
 
    template <class T1, class T2, class Policy>
    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
 
    template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
 
    template <class T1, class T2, class Policy>
    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
 
    template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
 
    template <class T1, class T2, class Policy>
    typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
 
    template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policy::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
 
    template <class T, class Policy>
    typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
 
    template <class T>
- typename detail::bessel_traits<T, T, policy::policy<> >::result_type sph_neumann(unsigned v, T x);
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
 
    template <class T, class Policy>
    T sin_pi(T x, const Policy&);

Modified: sandbox/math_toolkit/boost/math/special_functions/powm1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/powm1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/powm1.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -35,7 +35,7 @@
    powm1(const T1 a, const T2 z)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- return detail::powm1_imp(static_cast<result_type>(a), static_cast<result_type>(z), policy::policy<>());
+ return detail::powm1_imp(static_cast<result_type>(a), static_cast<result_type>(z), policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -53,3 +53,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/spherical_harmonic.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/spherical_harmonic.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/spherical_harmonic.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -137,7 +137,7 @@
    if(i_sign)
       i = -i;
    static const char* function = "boost::math::spherical_harmonic<%1%>(int, int, %1%, %1%)";
- return std::complex<T>(policy::checked_narrowing_cast<T, Policy>(r, function), policy::checked_narrowing_cast<T, Policy>(i, function));
+ return std::complex<T>(policies::checked_narrowing_cast<T, Policy>(r, function), policies::checked_narrowing_cast<T, Policy>(i, function));
 }
 
 } // namespace detail
@@ -147,7 +147,7 @@
    spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
    return detail::spherical_harmonic<result_type, value_type>(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol);
 }
 
@@ -155,7 +155,7 @@
 inline std::complex<typename tools::promote_args<T1, T2>::type>
    spherical_harmonic(unsigned n, int m, T1 theta, T2 phi)
 {
- return boost::math::spherical_harmonic(n, m, theta, phi, policy::policy<>());
+ return boost::math::spherical_harmonic(n, m, theta, phi, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -163,15 +163,15 @@
    spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_r(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "bost::math::spherical_harmonic_r<%1%>(unsigned, int, %1%, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_r(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "bost::math::spherical_harmonic_r<%1%>(unsigned, int, %1%, %1%)");
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi)
 {
- return boost::math::spherical_harmonic_r(n, m, theta, phi, policy::policy<>());
+ return boost::math::spherical_harmonic_r(n, m, theta, phi, policies::policy<>());
 }
 
 template <class T1, class T2, class Policy>
@@ -179,15 +179,15 @@
    spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol)
 {
    typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policy::evaluation<result_type, Policy>::type value_type;
- return policy::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_i(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "boost::math::spherical_harmonic_i<%1%>(unsigned, int, %1%, %1%)");
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ return policies::checked_narrowing_cast<result_type, Policy>(detail::spherical_harmonic_i(n, m, static_cast<value_type>(theta), static_cast<value_type>(phi), pol), "boost::math::spherical_harmonic_i<%1%>(unsigned, int, %1%, %1%)");
 }
 
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type
    spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi)
 {
- return boost::math::spherical_harmonic_i(n, m, theta, phi, policy::policy<>());
+ return boost::math::spherical_harmonic_i(n, m, theta, phi, policies::policy<>());
 }
 
 } // namespace math
@@ -195,3 +195,4 @@
 
 #endif // BOOST_MATH_SPECIAL_SPHERICAL_HARMONIC_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/special_functions/sqrt1pm1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sqrt1pm1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sqrt1pm1.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -30,7 +30,7 @@
 template <class T>
 inline typename tools::promote_args<T>::type sqrt1pm1(const T& val)
 {
- return sqrt1pm1(val, policy::policy<>());
+ return sqrt1pm1(val, policies::policy<>());
 }
 
 } // namespace math
@@ -40,3 +40,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/boost/math/tools/minima.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/minima.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/minima.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -19,7 +19,7 @@
 std::pair<T, T> brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter)
 {
    using namespace std;
- bits = (std::min)(policy::digits<T, policy::policy<> >() / 2, bits);
+ bits = (std::min)(policies::digits<T, policies::policy<> >() / 2, bits);
    T tolerance = static_cast<T>(ldexp(1.0, 1-bits));
    T x; // minima so far
    T w; // second best point
@@ -144,3 +144,4 @@
 #endif
 
 
+

Modified: sandbox/math_toolkit/boost/math/tools/ntl.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/ntl.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/ntl.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -62,16 +62,16 @@
 
 namespace boost{ namespace math{
    
-namespace policy{
+namespace policies{
 
 template<>
-inline int digits<NTL::RR, boost::math::policy::policy<> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(NTL::RR))
+inline int digits<NTL::RR, boost::math::policies::policy<> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(NTL::RR))
 {
    return NTL::RR::precision();
 }
 
 template<>
-inline int digits<NTL::RR, boost::math::policy::policy<boost::math::policy::detail::forwarding_arg1, boost::math::policy::detail::forwarding_arg2> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(NTL::RR))
+inline int digits<NTL::RR, boost::math::policies::policy<boost::math::policies::detail::forwarding_arg1, boost::math::policies::detail::forwarding_arg2> >(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(NTL::RR))
 {
    return NTL::RR::precision();
 }
@@ -185,7 +185,7 @@
 template <>
 inline NTL::RR epsilon<NTL::RR>(BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(NTL::RR))
 {
- return ldexp(NTL::RR(1), 1-boost::math::policy::digits<NTL::RR, boost::math::policy::policy<> >());
+ return ldexp(NTL::RR(1), 1-boost::math::policies::digits<NTL::RR, boost::math::policies::policy<> >());
 }
 
 } // namespace tools
@@ -304,7 +304,7 @@
          NTL::RR(std::asin(boost::math::tools::real_cast<double>(z))),
          NTL::RR(-boost::math::constants::pi<NTL::RR>()/2),
          NTL::RR(boost::math::constants::pi<NTL::RR>()/2),
- boost::math::policy::digits<NTL::RR, boost::math::policy::policy<> >());
+ boost::math::policies::digits<NTL::RR, boost::math::policies::policy<> >());
    }
 
    struct acos_root
@@ -330,7 +330,7 @@
          NTL::RR(std::acos(boost::math::tools::real_cast<double>(z))),
          NTL::RR(-boost::math::constants::pi<NTL::RR>()/2),
          NTL::RR(boost::math::constants::pi<NTL::RR>()/2),
- boost::math::policy::digits<NTL::RR, boost::math::policy::policy<> >());
+ boost::math::policies::digits<NTL::RR, boost::math::policies::policy<> >());
    }
 
    struct atan_root
@@ -357,7 +357,7 @@
          NTL::RR(std::atan(boost::math::tools::real_cast<double>(z))),
          -boost::math::constants::pi<NTL::RR>()/2,
          boost::math::constants::pi<NTL::RR>()/2,
- boost::math::policy::digits<NTL::RR, boost::math::policy::policy<> >());
+ boost::math::policies::digits<NTL::RR, boost::math::policies::policy<> >());
    }
 
    inline NTL::RR sinh(NTL::RR z)
@@ -385,3 +385,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/boost/math/tools/precision.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/precision.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/precision.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -153,7 +153,7 @@
 inline T epsilon(const mpl::false_& BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
 {
    using namespace std; // for ADL of std names
- static const T eps = ldexp(static_cast<T>(1), 1-policy::digits<T, policy::policy<> >());
+ static const T eps = ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
    return eps;
 }
 

Modified: sandbox/math_toolkit/boost/math/tools/remez.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/remez.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/remez.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -311,12 +311,12 @@
    if(bits == 0)
    {
       // don't bother about more than float precision:
- m_precision = (std::min)(24, (boost::math::policy::digits<T, boost::math::policy::policy<> >() / 2) - 2);
+ m_precision = (std::min)(24, (boost::math::policies::digits<T, boost::math::policies::policy<> >() / 2) - 2);
    }
    else
    {
       // can't be more accurate than half the bits of T:
- m_precision = (std::min)(bits, (boost::math::policy::digits<T, boost::math::policy::policy<> >() / 2) - 2);
+ m_precision = (std::min)(bits, (boost::math::policies::digits<T, boost::math::policies::policy<> >() / 2) - 2);
    }
    m_max_change_history[0] = m_max_change_history[1] = 1;
    init_chebyshev();
@@ -372,12 +372,12 @@
    if(bits == 0)
    {
       // don't bother about more than float precision:
- m_precision = (std::min)(24, (boost::math::policy::digits<T, boost::math::policy::policy<> >() / 2) - 2);
+ m_precision = (std::min)(24, (boost::math::policies::digits<T, boost::math::policies::policy<> >() / 2) - 2);
    }
    else
    {
       // can't be more accurate than half the bits of T:
- m_precision = (std::min)(bits, (boost::math::policy::digits<T, boost::math::policy::policy<> >() / 2) - 2);
+ m_precision = (std::min)(bits, (boost::math::policies::digits<T, boost::math::policies::policy<> >() / 2) - 2);
    }
    m_max_change_history[0] = m_max_change_history[1] = 1;
    // do one iteration whatever:
@@ -659,3 +659,4 @@
 
 #endif // BOOST_MATH_TOOLS_REMEZ_HPP
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -99,12 +99,12 @@
    static const char* function = "boost::math::tools::bisect<%1%>";
    if(min >= max)
    {
- policy::raise_evaluation_error(function,
+ policies::raise_evaluation_error(function,
          "Arguments in wrong order in boost::math::tools::bisect (first arg=%1%)", min, pol);
    }
    if(fmin * fmax >= 0)
    {
- policy::raise_evaluation_error(function,
+ policies::raise_evaluation_error(function,
          "No change of sign in boost::math::tools::bisect, either there is no root to find, or there are multiple roots in the interval (f(min) = %1%).", fmin, pol);
    }
 
@@ -160,14 +160,14 @@
 template <class F, class T, class Tol>
 inline std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter)
 {
- return bisect(f, min, max, tol, max_iter, policy::policy<>());
+ return bisect(f, min, max, tol, max_iter, policies::policy<>());
 }
 
 template <class F, class T, class Tol>
 inline std::pair<T, T> bisect(F f, T min, T max, Tol tol)
 {
    boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return bisect(f, min, max, tol, m, policy::policy<>());
+ return bisect(f, min, max, tol, m, policies::policy<>());
 }
 
 template <class F, class T>
@@ -512,3 +512,4 @@
 
 #endif // BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
 
+

Modified: sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/toms748_solve.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -283,7 +283,7 @@
    a = ax;
    b = bx;
    if(a >= b)
- policy::raise_domain_error(
+ policies::raise_domain_error(
          function,
          "Parameters a and b out of order: a=%1%", a, pol);
    fa = fax;
@@ -300,7 +300,7 @@
    }
 
    if(boost::math::sign(fa) * boost::math::sign(fb) > 0)
- policy::raise_domain_error(
+ policies::raise_domain_error(
          function,
          "Parameters a and b do not bracket the root: a=%1%", a, pol);
    // dummy value for fd, e and fe:
@@ -441,7 +441,7 @@
 template <class F, class T, class Tol>
 inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter)
 {
- return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policy::policy<>());
+ return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>());
 }
 
 template <class F, class T, class Tol, class Policy>
@@ -456,7 +456,7 @@
 template <class F, class T, class Tol>
 inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter)
 {
- return toms748_solve(f, ax, bx, tol, max_iter, policy::policy<>());
+ return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>());
 }
 
 template <class F, class T, class Tol, class Policy>
@@ -485,7 +485,7 @@
       while(sign(fb) == sign(fa))
       {
          if(count == 0)
- policy::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol);
+ policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol);
          a = b;
          fa = fb;
          b *= factor;
@@ -510,7 +510,7 @@
             return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0));
          }
          if(count == 0)
- policy::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol);
+ policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol);
          b = a;
          fb = fa;
          a /= factor;
@@ -530,7 +530,7 @@
 template <class F, class T, class Tol>
 inline std::pair<T, T> bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter)
 {
- return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policy::policy<>());
+ return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>());
 }
 
 } // namespace tools

Modified: sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj
==============================================================================
--- sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj (original)
+++ sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -17,7 +17,7 @@
     <TargetZone>LocalIntranet</TargetZone>
     <SignManifests>true</SignManifests>
     <PublishUrl>\\hetp7\H%24\Distex\</PublishUrl>
- <Install>false</Install>
+ <Install>true</Install>
     <InstallFrom>Unc</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
     <UpdateMode>Foreground</UpdateMode>
@@ -147,4 +147,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj.user
==============================================================================
--- sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj.user (original)
+++ sandbox/math_toolkit/libs/math/dot_net_example/distribution_explorer/distribution_explorer.csproj.user 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -9,9 +9,9 @@
     </UpdateUrlHistory>
     <BootstrapperUrlHistory>
     </BootstrapperUrlHistory>
- <ApplicationRevision>3</ApplicationRevision>
+ <ApplicationRevision>4</ApplicationRevision>
     <FallbackCulture>en-US</FallbackCulture>
     <VerifyUploadedFiles>false</VerifyUploadedFiles>
     <EnableSecurityDebugging>false</EnableSecurityDebugging>
   </PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>

Modified: sandbox/math_toolkit/libs/math/example/C_error_policy_example.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/C_error_policy_example.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/C_error_policy_example.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -14,17 +14,17 @@
 #include <boost/math/special_functions/gamma.hpp>
 using boost::math::tgamma;
 
-using boost::math::policy::policy;
+using boost::math::policies::policy;
 // Possible errors
-using boost::math::policy::overflow_error;
-using boost::math::policy::underflow_error;
-using boost::math::policy::domain_error;
-using boost::math::policy::pole_error;
-using boost::math::policy::denorm_error;
-using boost::math::policy::evaluation_error;
+using boost::math::policies::overflow_error;
+using boost::math::policies::underflow_error;
+using boost::math::policies::domain_error;
+using boost::math::policies::pole_error;
+using boost::math::policies::denorm_error;
+using boost::math::policies::evaluation_error;
 
-using boost::math::policy::errno_on_error;
-//using boost::math::policy::ignore_error;
+using boost::math::policies::errno_on_error;
+//using boost::math::policies::ignore_error;
 
 //using namespace boost::math::policies;
 //using namespace boost::math;

Modified: sandbox/math_toolkit/libs/math/example/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/example/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/example/Jamfile.v2 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -10,6 +10,7 @@
 project
     : requirements
       <toolset>gcc:<cxxflags>-Wno-missing-braces
+ <toolset>msvc:<cxxflags>-W4
       <include>../../..
     ;
 
@@ -25,7 +26,7 @@
 run neg_binomial_sample_sizes.cpp ;
 run f_test.cpp ;
 run distribution_construction.cpp ;
-run error_handling_examples.cpp ;
+run error_handling_example.cpp ;
 run error_policy_example.cpp ;
 run error_policies_example.cpp ;
 
@@ -38,3 +39,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/example/Neg_binomial_confidence_limits.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/Neg_binomial_confidence_limits.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/Neg_binomial_confidence_limits.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,21 +1,16 @@
 // Copyright John Maddock 2006
-// Copyright Paul A. Bristow 2006
+// Copyright Paul A. Bristow 2007
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifdef _MSC_VER
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-#endif
+#include <boost/math/distributions/negative_binomial.hpp>
 
 #include <iostream>
 using std::cout;
 using std::endl;
 #include <iomanip>
-#include <boost/math/distributions/negative_binomial.hpp>
 
 void confidence_limits_on_frequency(unsigned trials, unsigned successes)
 {
@@ -57,8 +52,8 @@
       // Confidence value:
       cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]);
       // calculate bounds:
- double l = negative_binomial::estimate_lower_bound_on_p(trials, successes, alpha[i]/2);
- double u = negative_binomial::estimate_upper_bound_on_p(trials, successes, alpha[i]/2);
+ double l = negative_binomial::find_lower_bound_on_p(trials, successes, alpha[i]/2);
+ double u = negative_binomial::find_upper_bound_on_p(trials, successes, alpha[i]/2);
       // Print Limits:
       cout << fixed << setprecision(5) << setw(15) << right << l;
       cout << fixed << setprecision(5) << setw(15) << right << u << endl;
@@ -93,14 +88,14 @@
 Confidence Lower Upper
  Value (%) Limit Limit
 ___________________________________________
- 50.000 0.08701 0.18675
- 75.000 0.06229 0.23163
- 90.000 0.04217 0.28262
- 95.000 0.03207 0.31698
- 99.000 0.01764 0.38713
- 99.900 0.00786 0.47093
- 99.990 0.00358 0.54084
- 99.999 0.00165 0.60020
+ 50.000 0.04812 0.13554
+ 75.000 0.03078 0.17727
+ 90.000 0.01807 0.22637
+ 95.000 0.01235 0.26028
+ 99.000 0.00530 0.33111
+ 99.900 0.00164 0.41802
+ 99.990 0.00051 0.49202
+ 99.999 0.00016 0.55574
 ___________________________________________
 2-Sided Confidence Limits For Success Ratio
 ___________________________________________
@@ -112,14 +107,14 @@
 Confidence Lower Upper
  Value (%) Limit Limit
 ___________________________________________
- 50.000 0.08929 0.11824
- 75.000 0.08023 0.12959
- 90.000 0.07144 0.14199
- 95.000 0.06618 0.15021
- 99.000 0.05664 0.16698
- 99.900 0.04676 0.18756
- 99.990 0.03944 0.20571
- 99.999 0.03371 0.22226
+ 50.000 0.08462 0.11350
+ 75.000 0.07580 0.12469
+ 90.000 0.06726 0.13695
+ 95.000 0.06216 0.14508
+ 99.000 0.05293 0.16170
+ 99.900 0.04343 0.18212
+ 99.990 0.03641 0.20017
+ 99.999 0.03095 0.21664
 ___________________________________________
 2-Sided Confidence Limits For Success Ratio
 ___________________________________________
@@ -131,14 +126,14 @@
 Confidence Lower Upper
  Value (%) Limit Limit
 ___________________________________________
- 50.000 0.09585 0.10491
- 75.000 0.09277 0.10822
- 90.000 0.08963 0.11172
- 95.000 0.08767 0.11399
- 99.000 0.08390 0.11850
- 99.900 0.07966 0.12385
- 99.990 0.07621 0.12845
- 99.999 0.07325 0.13256
-
+ 50.000 0.09536 0.10445
+ 75.000 0.09228 0.10776
+ 90.000 0.08916 0.11125
+ 95.000 0.08720 0.11352
+ 99.000 0.08344 0.11802
+ 99.900 0.07921 0.12336
+ 99.990 0.07577 0.12795
+ 99.999 0.07282 0.13206
 */
 
+

Modified: sandbox/math_toolkit/libs/math/example/distribution_construction.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/distribution_construction.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/distribution_construction.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,20 +1,12 @@
 // distribution_construction.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-#endif
-
 // Examples of using constructing distributions, mainly negative_binomial.
 // The structure of distributions is rather different from some other
 // statistical libraries, in less object oriented language like FOTRTRAN and C,
@@ -37,7 +29,7 @@
 
 int main()
 {
- cout << "Examples of constructing Distributions (Negative_binomial).";
+ cout << "Examples of constructing Distributions (negative_binomial).";
   #if defined(__FILE__) && defined(__TIMESTAMP__)
           cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER << "\n";
   #endif
@@ -127,8 +119,7 @@
 
 Output is:
 
-Examples of constructing Distributions (Negative_binomial). ..\..\..\..\..\..\boost-sandbox\libs\math_functions\example\distribution_construction.cpp Wed Nov 22 14:31:51 2006 140050727
-
+Examples of constructing Distributions (Negative_binomial). ..\..\..\..\..\..\Boost-sandbox\
 
 */
 
@@ -136,3 +127,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/example/error_policies_example.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/error_policies_example.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/error_policies_example.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,4 @@
-// example_policy_normal.cpp
+// error_policies_example.cpp
 
 // Copyright Paul A. Bristow 2007.
 // Copyright John Maddock 2007.
@@ -17,8 +17,8 @@
 
 // using namespace boost::math;
 //.\error_policy_normal.cpp(30) : error C2872: 'policy' : ambiguous symbol
-// could be 'I:\Boost-sandbox\math_toolkit\boost/math/policy/policy.hpp(392) : boost::math::policy::policy'
-// or 'boost::math::policy'
+// could be 'I:\Boost-sandbox\math_toolkit\boost/math/policy/policy.hpp(392) : boost::math::policies::policy'
+// or 'boost::math::policies'
 
   // So can't use this using namespace command.
 // Suppose we want a statistical distribution to return infinities,
@@ -29,16 +29,16 @@
         using std::cout;
         using std::endl;
 
-using boost::math::policy::policy;
+using boost::math::policies::policy;
 // Possible errors
-using boost::math::policy::overflow_error;
-using boost::math::policy::underflow_error;
-using boost::math::policy::domain_error;
-using boost::math::policy::pole_error;
-using boost::math::policy::denorm_error;
-using boost::math::policy::evaluation_error;
+using boost::math::policies::overflow_error;
+using boost::math::policies::underflow_error;
+using boost::math::policies::domain_error;
+using boost::math::policies::pole_error;
+using boost::math::policies::denorm_error;
+using boost::math::policies::evaluation_error;
 
-using boost::math::policy::ignore_error;
+using boost::math::policies::ignore_error;
 
 // Define a custom policy to ignore just overflow:
 typedef policy<
@@ -94,4 +94,4 @@
 quantile(my_normal2(), 0.); = -2.32635
 quantile(my_normal2(), 0.); = -1.#INF
 
-*/
\ No newline at end of file
+*/

Modified: sandbox/math_toolkit/libs/math/example/error_policy_example.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/error_policy_example.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/error_policy_example.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -29,9 +29,9 @@
 #include <stdexcept>
         using std::exception;
 
-using boost::math::policy::policy;
-using boost::math::policy::domain_error;
-using boost::math::policy::ignore_error;
+using boost::math::policies::policy;
+using boost::math::policies::domain_error;
+using boost::math::policies::ignore_error;
 
 // Define a (bad?) policy to ignore domain errors ('bad' arguments):
 typedef policy<

Modified: sandbox/math_toolkit/libs/math/example/neg_binomial_sample_sizes.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/neg_binomial_sample_sizes.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/neg_binomial_sample_sizes.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,15 +1,16 @@
-// Copyright Paul A. Bristow 2006
+// Copyright Paul A. Bristow 2007
 // Copyright John Maddock 2006
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifdef _MSC_VER
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-#endif
+#include <boost/math/distributions/negative_binomial.hpp>
+using boost::math::negative_binomial;
+ // RealType find_number_of_trials(
+ // RealType k, // number of failures, k >= 0.
+ // RealType p, // success fraction 0 <= p <= 1.
+ // RealType probability) // probability threshold 0 <= p <= 0.
 
 #include <iostream>
 using std::cout;
@@ -18,16 +19,9 @@
 using std::right;
 #include <iomanip>
 using std::setprecision;
-using std::setw;
+using std::setw;
 
-#include <boost/math/distributions/negative_binomial.hpp>
-using boost::math::negative_binomial;
- // RealType estimate_number_of_trials(
- // RealType k, // number of failures, k >= 0.
- // RealType p, // success fraction 0 <= p <= 1.
- // RealType probability) // probability threshold 0 <= p <= 0.
-
-void estimate_number_of_trials(double failures, double p)
+void find_number_of_trials(double failures, double p)
 {
    // trials = number of trials
    // failures = number of failures before achieving required success(es).
@@ -51,40 +45,35 @@
   for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i)
    { // Confidence values %:
       cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]) << " "
- // estimate_minimum_number_of_trials
- << setw(6) << right << (int)ceil(negative_binomial::estimate_minimum_number_of_trials(failures, p, alpha[i])) << endl;
+ // find_minimum_number_of_trials
+ << setw(6) << right << (int)ceil(negative_binomial::find_minimum_number_of_trials(failures, p, alpha[i])) << endl;
    }
    cout << endl;
-} // void estimate_number_of_trials(double fails, double p)
+} // void find_number_of_trials(double fails, double p)
 
 
 int main()
 {
- estimate_number_of_trials(5, 0.5);
- estimate_number_of_trials(50, 0.5);
- estimate_number_of_trials(500, 0.5);
- estimate_number_of_trials(50, 0.1);
- estimate_number_of_trials(500, 0.1);
- estimate_number_of_trials(5, 0.9);
- estimate_number_of_trials(10-5, 0.4); // See Evans example in Wikipedia.
+ find_number_of_trials(5, 0.5);
+ find_number_of_trials(50, 0.5);
+ find_number_of_trials(500, 0.5);
+ find_number_of_trials(50, 0.1);
+ find_number_of_trials(500, 0.1);
+ find_number_of_trials(5, 0.9);
+ find_number_of_trials(10-5, 0.4); // See Evans example in Wikipedia.
     return 0;
 } // int main()
 
 
 /*
 
------- Build started: Project: neg_binomial_sample_sizes, Configuration: Debug Win32 ------
-Compiling...
-neg_binomial_sample_sizes.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\neg_binomial_sample_sizes.exe"
+Output is:
 
+Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\neg_binomial_sample_sizes.exe"
 Target number of failures = 5, Success fraction = 50%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 11
     75.000 14
@@ -94,14 +83,10 @@
     99.900 27
     99.990 31
     99.999 36
-
-
 Target number of failures = 50.000, Success fraction = 50.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 101
     75.000 109
@@ -111,14 +96,10 @@
     99.900 137
     99.990 146
     99.999 154
-
-
 Target number of failures = 500.000, Success fraction = 50.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 1001
     75.000 1023
@@ -128,14 +109,10 @@
     99.900 1104
     99.990 1126
     99.999 1146
-
-
 Target number of failures = 50.000, Success fraction = 10.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 56
     75.000 58
@@ -145,14 +122,10 @@
     99.900 66
     99.990 68
     99.999 71
-
-
 Target number of failures = 500.000, Success fraction = 10.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 556
     75.000 562
@@ -162,14 +135,10 @@
     99.900 583
     99.990 588
     99.999 594
-
-
 Target number of failures = 5.000, Success fraction = 90.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 57
     75.000 73
@@ -179,14 +148,10 @@
     99.900 159
     99.990 189
     99.999 217
-
-
 Target number of failures = 5.000, Success fraction = 40.000%
-
-
 ____________________________
 Confidence Min Number
- Value (%) Of Trials
+ Value (%) Of Trials
 ____________________________
     50.000 10
     75.000 11
@@ -197,10 +162,5 @@
     99.990 25
     99.999 28
 
-Build Time 0:03
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\neg_binomial_sample_sizes\Debug\BuildLog.htm"
-neg_binomial_sample_sizes - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
 
 */

Modified: sandbox/math_toolkit/libs/math/example/negative_binomial_construction_examples.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/negative_binomial_construction_examples.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/negative_binomial_construction_examples.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,20 +1,12 @@
 // negative_binomial_example2.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-#endif
-
 // Example 2 of using constructing distributions, mainly negative_binomial.
 
 #include <boost/math/distributions/negative_binomial.hpp> // for negative_binomial_distribution
@@ -98,6 +90,7 @@
 
 Output is:
 
+math_toolkit\libs\math\example\negative_binomial_construction_examples.cpp Wed Aug 1 13:59:34 2007 140050727
 
 
 */
@@ -106,3 +99,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/example/negative_binomial_example1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/negative_binomial_example1.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/negative_binomial_example1.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,25 +1,12 @@
 // negative_binomial_example1.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-//#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-// If this is enabled then quantile(nb, 1) will throw thus:
-// Message from thrown exception was:
-// Error in function double __cdecl boost::math::quantile<double>(const class boost::math::negative_binomial_distribution<double> &,const double &): Probability argument is 1, which implies infinite failures !
-
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-#endif
-
 // Example 1 of using negative_binomial distribution.
 
 // http://en.wikipedia.org/wiki/Negative_binomial_distribution
@@ -85,8 +72,6 @@
 #include <iomanip>
         using std::setprecision;
 
-#include <cassert>
-
 int main()
 {
         cout << "Example 1 using the Negative Binomial Distribution.";
@@ -211,68 +196,40 @@
 
 Output is:
 
-Example 1 using the Negative Binomial Distribution. ..\..\..\..\..\..\boost-san
-dbox\libs\math_functions\example\negative_binomial_example1.cpp Wed Nov 22 18:33
-:26 2006 140050727
-
-Selling candy bars - an example of using the negative binomial distribution.
+Example 1 using the Negative Binomial Distribution. ..\..\..\..\..\..\Boost-sandbox\math_toolkit\libs\math\example\negative_binomial_example1.cpp Wed Aug 1 14:12:58 2007 140050727
+Selling candy bars - an example of using the negative binomial distribution.
 An example by Dr. Diane Evans,
 Professor of Mathematics at Rose-Hulman Institute of Technology,
 see http://en.wikipedia.org/wiki/Negative_binomial_distribution
-
 Pat has a sales per house success rate of 0.4.
 Therefore he would, on average, sell 40 bars after trying 100 houses.
 With a success rate of 0.4, he might expect, on average,
- to need to visit about 12 houses in order to sell all 5 candy bars.
+ to need to visit about 12 houses in order to sell all 5 candy bars.
 Probability that Pat finishes on the 5th house is f(5) = 0.10033
 Probability that Pat finishes on the 6th house is 0.03072
 Probability that Pat finishes on the 7th house is 0.055296
 Probability that Pat finishes on the 8th house is 0.077414
-Probability that Pat finishes on or before the 8th house is sum
+Probability that Pat finishes on or before the 8th house is sum
 pdf(sales_quota) + pdf(6) + pdf(7) + pdf(8) = 0.17367
-
 Probability of selling his quota of 5 candy bars
 on or before the 8th house is 0.17367
-
 Probability that Pat finishes exactly on the 10th house is 0.10033
-
 Probability of selling his quota of 5 candy bars
 on or before the 10th house is 0.3669
 Probability that Pat finishes on the 11th house is 0.10033
-
 Probability of selling his quota of 5 candy bars
 on or before the 11th house is 0.46723
 Probability that Pat finishes on the 12th house is 0.094596
-
 Probability of selling his quota of 5 candy bars
 on or before the 12th house is 0.56182
-
 Probability of selling his quota of 5 candy bars
 on or before the 31th house is 0.99897
-
 Probability of failing to sell his quota of 5 candy bars
 even after visiting all 30 houses is 0.0010314
 Probability of meeting sales quota on or before 8th house is 0.17367
 If the confidence of meeting sales quota is 0.17367, then the finishing house is 8
-If the confidence of meeting sales quota is 1, then the finishing house is 1.#INF
-If the confidence of meeting sales quota is 0, then the finishing house is 5
-If the confidence of meeting sales quota is 0.99849, then the finishing house is 30
-If confidence of meeting quota is zero (we assume all houses are successful sale
-s), then finishing house is 5
-If confidence of meeting quota is 0, then finishing house is 5
-If confidence of meeting quota is 0.001, then finishing house is 5
-If confidence of meeting quota is 0.01, then finishing house is 5
-If confidence of meeting quota is 0.05, then finishing house is 7
-If confidence of meeting quota is 0.1, then finishing house is 8
-If confidence of meeting quota is 0.5, then finishing house is 12
-If confidence of meeting quota is 0.9, then finishing house is 18
-If confidence of meeting quota is 0.95, then finishing house is 21
-If confidence of meeting quota is 0.99, then finishing house is 25
-If confidence of meeting quota is 0.999, then finishing house is 32
-If confidence of meeting quota is 1, then finishing house is 1.#INF
-If we demand a confidence of meeting sales quota of unity, then we can never be
-certain of selling 5 bars, so the finishing house is infinite!
-Press any key to continue . . .
+Message from thrown exception was:
+ Error in function boost::math::quantile(const negative_binomial_distribution<double>&, double): Probability argument is 1, which implies infinite failures !
 
 */
 
@@ -280,3 +237,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/example/negative_binomial_example2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/negative_binomial_example2.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/negative_binomial_example2.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,6 @@
 // negative_binomial_example2.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -10,13 +10,6 @@
 // Simple examples demonstrating use of the Negative Binomial Distribution.
 // (See other examples for practical applications).
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-#endif
-
 #include <boost/math/distributions/negative_binomial.hpp>
   using boost::math::negative_binomial_distribution;
   using boost::math::negative_binomial; // typedef
@@ -40,12 +33,7 @@
 
 int main()
 {
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
- cout << "negative_binomial distribution - simples example 2" << endl;
+ cout << "negative_binomial distribution - simple example 2" << endl;
 
   // Construct distribution: 8 successes (r), 0.25 success fraction = 25% or 1 in 4 successes.
   // negative_binomial_distribution<double> my8dist(8, 0.25);
@@ -107,15 +95,9 @@
 
 /*
 
-Output is
+Output is:
 
------- Build started: Project: negative_binomial_example2, Configuration: Debug Win32 ------
-Compiling...
-negative_binomial_example2.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\negative_binomial_example2.exe"
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
-negative_binomial distribution - simples example 2
+negative_binomial distribution - simple example 2
 mean(my8dist) = 24
 my8dist.successes() = 8
 my8dist.success_fraction() = 0.25
@@ -124,76 +106,72 @@
 cdf(my8dist, 8.) = 0.027129956288263202
 cdf(complement(my8dist, 8.)) = 0.9728700437117368
 cdf + complement = 1
-Sum pdfs = 0.40025683281803698 , cdf = 0.40025683281803687, difference = 0.5 in epsilon units.
+Sum pdfs = 0.40025683281803692 , cdf = 0.40025683281803687, difference = 0.25 in epsilon units.
  k pdf cdf
- 0, 1.5258789062499998e-005 , 1.5258789062499998e-005
- 1, 9.1552734374999959e-005 , 0.00010681152343750000
+ 0, 1.5258789062500000e-005 , 1.5258789062500003e-005
+ 1, 9.1552734375000000e-005 , 0.00010681152343750000
   2, 0.00030899047851562522 , 0.00041580200195312500
- 3, 0.00077247619628906239 , 0.0011882781982421875
- 4, 0.0015932321548461931 , 0.0027815103530883789
- 5, 0.0028678178787231463 , 0.0056493282318115234
+ 3, 0.00077247619628906272 , 0.0011882781982421875
+ 4, 0.0015932321548461918 , 0.0027815103530883789
+ 5, 0.0028678178787231476 , 0.0056493282318115234
   6, 0.0046602040529251142 , 0.010309532284736633
   7, 0.0069903060793876605 , 0.017299838364124298
- 8, 0.0098301179241388984 , 0.027129956288263202
- 9, 0.013106823898851870 , 0.040236780187115073
- 10, 0.016711200471036133 , 0.056947980658151209
- 11, 0.020509200578089803 , 0.077457181236241013
- 12, 0.024354675686481628 , 0.10181185692272265
+ 8, 0.0098301179241389001 , 0.027129956288263202
+ 9, 0.013106823898851871 , 0.040236780187115073
+ 10, 0.016711200471036140 , 0.056947980658151209
+ 11, 0.020509200578089786 , 0.077457181236241013
+ 12, 0.024354675686481652 , 0.10181185692272265
  13, 0.028101548869017230 , 0.12991340579173993
  14, 0.031614242477644432 , 0.16152764826938440
  15, 0.034775666725408917 , 0.19630331499479325
- 16, 0.037492515688331465 , 0.23379583068312471
- 17, 0.039697957787645122 , 0.27349378847076977
- 18, 0.041352039362130291 , 0.31484582783290005
- 19, 0.042440250924291587 , 0.35728607875719176
- 20, 0.042970754060845266 , 0.40025683281803687
- 21, 0.042970754060845245 , 0.44322758687888220
- 22, 0.042482450037426567 , 0.48571003691630876
- 23, 0.041558918514873776 , 0.52726895543118257
+ 16, 0.037492515688331451 , 0.23379583068312471
+ 17, 0.039697957787645101 , 0.27349378847076977
+ 18, 0.041352039362130305 , 0.31484582783290005
+ 19, 0.042440250924291580 , 0.35728607875719176
+ 20, 0.042970754060845245 , 0.40025683281803687
+ 21, 0.042970754060845225 , 0.44322758687888220
+ 22, 0.042482450037426581 , 0.48571003691630876
+ 23, 0.041558918514873783 , 0.52726895543118257
  24, 0.040260202311284021 , 0.56752915774246648
- 25, 0.038649794218832613 , 0.60617895196129912
- 26, 0.036791631035234945 , 0.64297058299653398
- 27, 0.034747651533277434 , 0.67771823452981139
+ 25, 0.038649794218832620 , 0.60617895196129912
+ 26, 0.036791631035234917 , 0.64297058299653398
+ 27, 0.034747651533277427 , 0.67771823452981139
  28, 0.032575923312447595 , 0.71029415784225891
  29, 0.030329307911589130 , 0.74062346575384819
  30, 0.028054609818219924 , 0.76867807557206813
  31, 0.025792141284492545 , 0.79447021685656061
- 32, 0.023575629142856457 , 0.81804584599941710
+ 32, 0.023575629142856460 , 0.81804584599941710
  33, 0.021432390129869489 , 0.83947823612928651
- 34, 0.019383705779220179 , 0.85886194190850684
- 35, 0.017445335201298224 , 0.87630727710980494
+ 34, 0.019383705779220189 , 0.85886194190850684
+ 35, 0.017445335201298231 , 0.87630727710980494
  36, 0.015628112784496322 , 0.89193538989430121
  37, 0.013938587078064250 , 0.90587397697236549
- 38, 0.012379666154859706 , 0.91825364312722524
+ 38, 0.012379666154859701 , 0.91825364312722524
  39, 0.010951243136991251 , 0.92920488626421649
  40, 0.0096507830144735539 , 0.93885566927869002
  41, 0.0084738582566109364 , 0.94732952753530097
- 42, 0.0074146259745345557 , 0.95474415350983555
+ 42, 0.0074146259745345548 , 0.95474415350983555
  43, 0.0064662435824429246 , 0.96121039709227851
  44, 0.0056212231142827853 , 0.96683162020656122
  45, 0.0048717266990450708 , 0.97170334690560634
- 46, 0.0042098073105878604 , 0.97591315421619418
+ 46, 0.0042098073105878630 , 0.97591315421619418
  47, 0.0036275999165703964 , 0.97954075413276465
  48, 0.0031174686783026818 , 0.98265822281106729
- 49, 0.0026721160099737293 , 0.98533033882104104
+ 49, 0.0026721160099737302 , 0.98533033882104104
  50, 0.0022846591885275322 , 0.98761499800956853
  51, 0.0019486798960970148 , 0.98956367790566557
- 52, 0.0016582516423517925 , 0.99122192954801736
+ 52, 0.0016582516423517923 , 0.99122192954801736
  53, 0.0014079495076571762 , 0.99262987905567457
  54, 0.0011928461106539983 , 0.99382272516632852
  55, 0.0010084971662802015 , 0.99483122233260868
  56, 0.00085091948404891532 , 0.99568214181665760
- 57, 0.00071656377604119553 , 0.99639870559269883
+ 57, 0.00071656377604119542 , 0.99639870559269883
  58, 0.00060228420831048650 , 0.99700098980100937
  59, 0.00050530624256557675 , 0.99750629604357488
- 60, 0.00042319397814867180 , 0.99792949002172360
+ 60, 0.00042319397814867202 , 0.99792949002172360
  61, 0.00035381791615708398 , 0.99828330793788067
  62, 0.00029532382517950324 , 0.99857863176306016
  63, 0.00024610318764958566 , 0.99882473495070978
-Build Time 0:03
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\neative_binomial_example2\Debug\BuildLog.htm"
-negative_binomial_example2 - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
 
 */

Modified: sandbox/math_toolkit/libs/math/example/negative_binomial_example3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/negative_binomial_example3.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/negative_binomial_example3.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,20 +1,12 @@
 // negative_binomial_example3.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-#endif
-
 // Example 3 of using constructing distributions, mainly negative_binomial.
 
 #include <boost/math/distributions/negative_binomial.hpp> // for negative_binomial_distribution
@@ -34,6 +26,7 @@
   #endif
         cout << endl;
 
+ // TODO!
 
          return 0;
 } // int main()
@@ -50,3 +43,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/test/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/test/Jamfile.v2 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -13,6 +13,14 @@
       <toolset>darwin:<cxxflags>-Wno-missing-braces
       <toolset>acc:<cxxflags>+W2068,2461,2236,4070
       <toolset>intel:<cxxflags>-Qwd264,239
+ <toolset>msvc:<cxxflags>/EHa
+ <toolset>msvc:<cxxflags>/wd4996
+ <toolset>msvc:<cxxflags>/W4
+ <toolset>msvc:<cxxflags>/wd4512
+ <toolset>msvc:<cxxflags>/wd4610
+ <toolset>msvc:<cxxflags>/wd4510
+ <toolset>msvc:<cxxflags>/wd4127
+ <toolset>msvc:<cxxflags>/wd4701
       <include>../../..
       <source>/boost/regex//boost_regex
       <link>shared:<define>BOOST_REGEX_DYN_LINK=1
@@ -173,3 +181,4 @@
 compile compile_test/tools_toms748_solve_inc_test.cpp ;
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/compile_test/instantiate.hpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -16,7 +16,7 @@
 #include <boost/math/special_functions.hpp>
 #include <boost/math/concepts/distributions.hpp>
 
-typedef boost::math::policy::policy<> test_policy;
+typedef boost::math::policies::policy<> test_policy;
 
 namespace test{
 

Modified: sandbox/math_toolkit/libs/math/test/std_real_concept_check.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/std_real_concept_check.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/std_real_concept_check.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -3,6 +3,8 @@
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
+
 #include <boost/math/concepts/std_real_concept.hpp>
 #include <boost/math/concepts/distributions.hpp>
 
@@ -194,3 +196,4 @@
    instantiate(boost::math::concepts::std_real_concept(0));
 }
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // test_bernoulli.cpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -10,13 +10,8 @@
 
 // Basic sanity test for Bernoulli Cumulative Distribution Function.
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-#endif
+// Default domain error policy is
+// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
 
 #include <boost/math/distributions/bernoulli.hpp> // for bernoulli_distribution
 using boost::math::bernoulli_distribution;
@@ -242,11 +237,6 @@
  //
 
   // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
   // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float.
@@ -261,20 +251,17 @@
 
 /*
 
-
 Output is:
 
-test_bernoulli.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_bernouilli.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 Tolerance for type float is 1.19e-005 (or 0.00119%).
 Tolerance for type double is 2.22e-014 (or 2.22e-012%).
 Tolerance for type long double is 2.22e-014 (or 2.22e-012%).
 Tolerance for type class boost::math::concepts::real_concept is 2.22e-014 (or 2.22e-012%).
 *** No errors detected
 
+No warnings MSVC level 4 31 Jul 2007
 
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -257,3 +257,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -46,7 +46,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double|real_concept";
    }
@@ -491,3 +491,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -255,3 +255,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double|real_concept";
    }
@@ -415,3 +415,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_beta.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,6 @@
-// (C) Copyright John Maddock 2006.
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007
+
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -227,3 +229,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // test_beta_dist.cpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -14,7 +14,6 @@
 // Appreas to be a 64-bit calculator showing 17 decimal digit (last is noisy).
 // Similar to mathCAD?
 
-
 // http://www.nuhertz.com/statmat/distributions.html#Beta
 // Pretty graphs and explanations for most distributions.
 
@@ -27,12 +26,8 @@
 // Beta Buster also calculates alpha and beta from mode & percentile estimates.
 // This is NOT (yet) implemented.
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
 #endif
 
 #include <boost/math/distributions/beta.hpp> // for beta_distribution
@@ -462,17 +457,12 @@
 
 int test_main(int, char* [])
 {
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
    // Check that can generate beta distribution using one convenience methods:
    beta_distribution<> mybeta11(1., 1.); // Using default RealType double.
    // but that
    // boost::math::beta mybeta1(1., 1.); // Using typedef fails.
    // error C2039: 'beta' : is not a member of 'boost::math'
-
+
    // Basic sanity-check spot values.
 
    // Some simple checks using double only.
@@ -485,7 +475,6 @@
    beta_distribution<> mybetaH2(0.5, 2.); //
    beta_distribution<> mybetaH3(0.5, 3.); //
 
-
    // Check a few values using double.
    BOOST_CHECK_EQUAL(pdf(mybeta11, 1), 1); // is uniform unity over 0 to 1,
    BOOST_CHECK_EQUAL(pdf(mybeta11, 0), 1); // including zero and unity.
@@ -548,7 +537,6 @@
    cout << "numeric_limits<real_concept>::digits10 " << numeric_limits<real_concept>::digits10 << endl;
    cout << "numeric_limits<real_concept>::epsilon " << numeric_limits<real_concept>::epsilon() << endl;
 
-
    // (Parameter value, arbitrarily zero, only communicates the floating point type).
    test_spots(0.0F); // Test float.
    test_spots(0.0); // Test double.
@@ -565,13 +553,8 @@
 
 Output is:
 
------- Build started: Project: test_beta_dist, Configuration: Debug Win32 ------
-Compiling...
-test_beta_dist.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_beta_dist.exe"
+-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_beta_dist.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 numeric_limits<real_concept>::is_specialized 0
 numeric_limits<real_concept>::digits 0
 numeric_limits<real_concept>::digits10 0
@@ -589,12 +572,7 @@
 std::numeric_limits::epsilon = 0
 epsilon = 2.22045e-016, Tolerance = 2.22045e-011%.
 *** No errors detected
-Build Time 0:07
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_beta_dist\Debug\BuildLog.htm"
-test_beta_dist - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
-
 */
 
 
+

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 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,7 +1,7 @@
 // test_binomial.cpp
 
 // Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -10,13 +10,10 @@
 
 // Basic sanity test for Binomial Cumulative Distribution Function.
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
 #define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
 
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
 #endif
 
 #include <boost/math/distributions/binomial.hpp> // for binomial_distribution
@@ -624,8 +621,8 @@
 
   for(unsigned i = 0; i < binomial_quantile_data.size(); ++i)
   {
- using namespace boost::math::policy;
- typedef policy<discrete_quantile<boost::math::policy::real> > P1;
+ using namespace boost::math::policies;
+ typedef policy<discrete_quantile<boost::math::policies::real> > P1;
      typedef policy<discrete_quantile<integer_below> > P2;
      typedef policy<discrete_quantile<integer_above> > P3;
      typedef policy<discrete_quantile<integer_outside> > P4;
@@ -688,7 +685,6 @@
 
 int test_main(int, char* [])
 {
-
         // Check that can generate binomial distribution using one convenience methods:
         binomial_distribution<> mybn2(1., 0.5); // Using default RealType double.
   // but that
@@ -696,11 +692,6 @@
   // error C2039: 'binomial' : is not a member of 'boost::math'
 
   // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
   // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float.
@@ -722,72 +713,14 @@
 
 /*
 
-
 Output is:
 
------- Build started: Project: test_binomial, Configuration: Debug Win32 ------
-Compiling...
-test_binomial.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_binomial.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 Tolerance = 0.0119209%.
-mean(my8dist) = 2
-my8dist.trials() = 8
-my8dist.success_fraction() = 0.25
-0 0.100113 0.100113 0.100113 0
-1 0.266968 0.367081 0.367081 0
-2 0.311462 0.678543 0.678543 0
-3 0.207642 0.886185 0.886185 0
-4 0.0865173 0.972702 0.972702 0
-5 0.0230713 0.995773 0.995773 0
-6 0.00384521 0.999619 0.999619 0
-7 0.000366211 0.999985 0.999985 0
-8 1.52588e-005 1 1 0
 Tolerance = 2.22045e-011%.
-mean(my8dist) = 2
-my8dist.trials() = 8
-my8dist.success_fraction() = 0.25
-0 0.100113 0.100113 0.100113 0
-1 0.266968 0.367081 0.367081 0
-2 0.311462 0.678543 0.678543 0
-3 0.207642 0.886185 0.886185 0
-4 0.0865173 0.972702 0.972702 0
-5 0.0230713 0.995773 0.995773 0
-6 0.00384521 0.999619 0.999619 0
-7 0.000366211 0.999985 0.999985 0
-8 1.52588e-005 1 1 0
 Tolerance = 2.22045e-011%.
-mean(my8dist) = 2
-my8dist.trials() = 8
-my8dist.success_fraction() = 0.25
-0 0.100113 0.100113 0.100113 0
-1 0.266968 0.367081 0.367081 0
-2 0.311462 0.678543 0.678543 0
-3 0.207642 0.886185 0.886185 0
-4 0.0865173 0.972702 0.972702 0
-5 0.0230713 0.995773 0.995773 0
-6 0.00384521 0.999619 0.999619 0
-7 0.000366211 0.999985 0.999985 0
-8 1.52588e-005 1 1 0
 Tolerance = 2.22045e-011%.
-mean(my8dist) = 2
-my8dist.trials() = 8
-my8dist.success_fraction() = 0.25
-0 0.100113 0.100113 0.100113 0
-1 0.266968 0.367081 0.367081 0
-2 0.311462 0.678543 0.678543 0
-3 0.207642 0.886185 0.886185 0
-4 0.0865173 0.972702 0.972702 0
-5 0.0230713 0.995773 0.995773 0
-6 0.00384521 0.999619 0.999619 0
-7 0.000366211 0.999985 0.999985 0
-8 1.52588e-005 1 1 -6.66134e-016
 *** No errors detected
-Build Time 0:08
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_binomial\Debug\BuildLog.htm"
-test_binomial - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
 */

Modified: sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -43,7 +43,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -191,3 +191,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_carlson.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_carlson.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_carlson.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,11 +1,10 @@
-// Copyright (c) 2006 John Maddock
+// Copyright 2006 John Maddock
+// Copyright Paul A. Bristow 2007.
+
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
 #include <boost/math/concepts/real_concept.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
 #include <boost/test/floating_point_comparison.hpp>
@@ -53,7 +52,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -67,7 +66,7 @@
    //
    // real long doubles:
    //
- if(boost::math::policy::digits<long double, boost::math::policy::policy<> >() > 53)
+ if(boost::math::policies::digits<long double, boost::math::policies::policy<> >() > 53)
    {
       add_expected_result(
          ".*", // compiler

Modified: sandbox/math_toolkit/libs/math/test/test_cauchy.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_cauchy.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_cauchy.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,26 +1,23 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-// test_cauchy.cpp
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
+// test_cauchy.cpp Test Cauchy distribution
 
 #ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
 # pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
+// Seems an entirely spurious warning - formal parameter T IS used - get error if /* T */
 //# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
 // Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
 #endif
 
+// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
+// To compile even if Cauchy mean is used.
+
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/math/distributions/cauchy.hpp>
          using boost::math::cauchy_distribution;
@@ -649,26 +646,29 @@
        median(dist),
        static_cast<RealType>(0));
    //
- // Things that are errors:
- //
- BOOST_CHECK_THROW(
- mean(dist),
- std::domain_error);
- BOOST_CHECK_THROW(
- variance(dist),
- std::domain_error);
- BOOST_CHECK_THROW(
- standard_deviation(dist),
- std::domain_error);
- BOOST_CHECK_THROW(
- kurtosis(dist),
- std::domain_error);
- BOOST_CHECK_THROW(
- kurtosis_excess(dist),
- std::domain_error);
- BOOST_CHECK_THROW(
- skewness(dist),
- std::domain_error);
+ // Things that now don't compile (BOOST-STATIC_ASSERT_FAILURE) by default.
+ // #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
+ // To compile even if Cauchy mean is used.
+ // See policy reference, mathematically undefined function policies
+ //
+ //BOOST_CHECK_THROW(
+ // mean(dist),
+ // std::domain_error);
+ //BOOST_CHECK_THROW(
+ // variance(dist),
+ // std::domain_error);
+ //BOOST_CHECK_THROW(
+ // standard_deviation(dist),
+ // std::domain_error);
+ //BOOST_CHECK_THROW(
+ // kurtosis(dist),
+ // std::domain_error);
+ //BOOST_CHECK_THROW(
+ // kurtosis_excess(dist),
+ // std::domain_error);
+ //BOOST_CHECK_THROW(
+ // skewness(dist),
+ // std::domain_error);
    BOOST_CHECK_THROW(
        quantile(dist, RealType(0.0)),
        std::overflow_error);
@@ -715,10 +715,6 @@
 /*
 Output:
 
------- Build started: Project: test_cauchy, Configuration: Debug Win32 ------
-Compiling...
-test_cauchy.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_cauchy.exe"
 Running 1 test case...
 Tolerance for type float is 0.000596046 %
@@ -726,10 +722,7 @@
 Tolerance for type long double is 1.11022e-012 %
 Tolerance for type class boost::math::concepts::real_concept is 1.11022e-012 %
 *** No errors detected
-Build Time 0:05
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_cauchy\Debug\BuildLog.htm"
-test_cauchy - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,24 +1,13 @@
 // test_chi_squared.cpp
 
 // Copyright Paul A. Bristow 2006.
-// Copyright John Maddock 2006.
+// Copyright John Maddock 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-//# pragma warning(disable: 4244) // conversion from 'const double' to 'float'.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 using ::boost::math::concepts::real_concept;
 
@@ -539,11 +528,6 @@
   chi_squared mychisqr2(8);
 
   // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
   // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float.
@@ -556,25 +540,18 @@
 } // int test_main(int, char* [])
 
 /*
------- Rebuild All started: Project: test_chi_squared, Configuration: Debug Win32 ------
-Deleting intermediate and output files for project 'test_chi_squared', configuration 'Debug|Win32'
-Compiling...
-test_chi_squared.cpp
-Linking...
+
+Output:
+
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_chi_squared.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 Tolerance = 0.1%.
 Tolerance = 0.1%.
 Tolerance = 0.1%.
 Tolerance = 0.1%.
 *** No errors detected
-Build Time 0:09
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_chi_squared\Debug\BuildLog.htm"
-test_chi_squared - 0 error(s), 0 warning(s)
-========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
-
 
 */
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_constants.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_constants.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_constants.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,4 @@
-// Copyright Paul Bristow 2006.
+// Copyright Paul Bristow 2007.
 // Copyright John Maddock 2006.
 
 // Use, modification and distribution are subject to the
@@ -8,15 +8,6 @@
 
 // test_constants.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-//#define BOOST_MATH_THROW_ON_UNDERFLOW_ERROR
-// Ignore underflow to zero.
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
@@ -25,9 +16,9 @@
 #include <boost/math/tools/test.hpp>
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks for constants.
+ // Basic sanity checks for constants.
 
         RealType tolerance = static_cast<RealType>(2e-15); // double
         //cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
@@ -82,13 +73,11 @@
 
 Output:
 
-test_constants.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_constants.exe"
 Running 1 test case...
 *** No errors detected
 
-
 */
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,5 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -7,19 +8,6 @@
 
 // test_dist_overloads.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/math/distributions/normal.hpp>
          using boost::math::normal_distribution;
@@ -33,13 +21,13 @@
         using std::setprecision;
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
    // Basic sanity checks,
    // 2 eps as a percentage:
    RealType tolerance = boost::math::tools::epsilon<RealType>() * 2 * 100;
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    for(int i = -4; i <= 4; ++i)
    {
@@ -98,3 +86,16 @@
    return 0;
 } // int test_main(int, char* [])
 
+/*
+
+Output:
+
+Running 1 test case...
+Tolerance for type float is 2.38419e-005 %
+Tolerance for type double is 4.44089e-014 %
+Tolerance for type long double is 4.44089e-014 %
+Tolerance for type class boost::math::concepts::real_concept is 4.44089e-014 %
+*** No errors detected
+
+*/
+

Modified: sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -46,7 +46,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }

Modified: sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -45,7 +45,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }

Modified: sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,12 +1,11 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// Copyright (c) 2006 John Maddock
+// Copyright 2006 Xiaogang Zhang
+// Copyright 2006 John Maddock
+// Copyright Paul A. Bristow 2007.
+
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
 #include <boost/math/concepts/real_concept.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
 #include <boost/test/floating_point_comparison.hpp>
@@ -48,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }

Modified: sandbox/math_toolkit/libs/math/test/test_erf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_erf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_erf.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -19,14 +19,6 @@
 #include "test_erf_hooks.hpp"
 #include "handle_test_result.hpp"
 
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant
-# pragma warning(disable: 4512) // assignment operator could not be generated
-// but these persist in lambda to produce massive warning output at level 4.
-#endif
-
-// Note needs regex library to link.
-//
 //
 // DESCRIPTION:
 // ~~~~~~~~~~~~
@@ -332,3 +324,145 @@
 #endif
    return 0;
 }
+
+/*
+
+Output:
+
+test_erf.cpp
+Compiling manifest to resources...
+Linking...
+Embedding manifest...
+Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_erf.exe"
+Running 1 test case...
+Testing basic sanity checks for type float
+Testing basic sanity checks for type double
+Testing basic sanity checks for type long double
+Testing basic sanity checks for type real_concept
+Tests run with Microsoft Visual C++ version 8.0, Dinkumware standard library version 405, Win32
+Testing Erf Function: Small Values with type float
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<float> Max = 0 RMS Mean=0
+boost::math::erfc<float> Max = 0 RMS Mean=0
+Testing Erf Function: Medium Values with type float
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<float> Max = 0 RMS Mean=0
+boost::math::erfc<float> Max = 0 RMS Mean=0
+Testing Erf Function: Large Values with type float
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<float> Max = 0 RMS Mean=0
+boost::math::erfc<float> Max = 0 RMS Mean=0
+Testing Inverse Erf Function with type float
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf_inv<float> Max = 0 RMS Mean=0
+Testing Inverse Erfc Function with type float
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erfc_inv<float> Max = 0 RMS Mean=0
+Testing Erf Function: Small Values with type double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<double> Max = 0 RMS Mean=0
+boost::math::erfc<double> Max = 0.7857 RMS Mean=0.06415
+ worst case at row: 149
+ { 0.3343, 0.3636, 0.6364 }
+Testing Erf Function: Medium Values with type double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<double> Max = 0.9219 RMS Mean=0.1016
+ worst case at row: 273
+ { 0.5252, 0.5424, 0.4576 }
+boost::math::erfc<double> Max = 1.08 RMS Mean=0.3224
+ worst case at row: 287
+ { 0.8461, 0.7685, 0.2315 }
+Testing Erf Function: Large Values with type double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<double> Max = 0 RMS Mean=0
+boost::math::erfc<double> Max = 1.048 RMS Mean=0.2032
+ worst case at row: 50
+ { 20.96, 1, 4.182e-193 }
+Testing Inverse Erf Function with type double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf_inv<double> Max = 1.124 RMS Mean=0.5082
+ worst case at row: 98
+ { 0.9881, 1.779 }
+Testing Inverse Erfc Function with type double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erfc_inv<double> Max = 1.124 RMS Mean=0.5006
+ worst case at row: 98
+ { 1.988, -1.779 }
+Testing Erf Function: Small Values with type long double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<long double> Max = 0 RMS Mean=0
+boost::math::erfc<long double> Max = 0.7857 RMS Mean=0.06415
+ worst case at row: 149
+ { 0.3343, 0.3636, 0.6364 }
+Testing Erf Function: Medium Values with type long double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<long double> Max = 0.9219 RMS Mean=0.1016
+ worst case at row: 273
+ { 0.5252, 0.5424, 0.4576 }
+boost::math::erfc<long double> Max = 1.08 RMS Mean=0.3224
+ worst case at row: 287
+ { 0.8461, 0.7685, 0.2315 }
+Testing Erf Function: Large Values with type long double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<long double> Max = 0 RMS Mean=0
+boost::math::erfc<long double> Max = 1.048 RMS Mean=0.2032
+ worst case at row: 50
+ { 20.96, 1, 4.182e-193 }
+Testing Inverse Erf Function with type long double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf_inv<long double> Max = 1.124 RMS Mean=0.5082
+ worst case at row: 98
+ { 0.9881, 1.779 }
+Testing Inverse Erfc Function with type long double
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erfc_inv<long double> Max = 1.124 RMS Mean=0.5006
+ worst case at row: 98
+ { 1.988, -1.779 }
+Testing Erf Function: Small Values with type real_concept
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<real_concept> Max = 1.271 RMS Mean=0.5381
+ worst case at row: 144
+ { 0.0109, 0.0123, 0.9877 }
+boost::math::erfc<real_concept> Max = 0.7857 RMS Mean=0.07777
+ worst case at row: 149
+ { 0.3343, 0.3636, 0.6364 }
+Testing Erf Function: Medium Values with type real_concept
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<real_concept> Max = 22.5 RMS Mean=4.224
+ worst case at row: 233
+ { -0.7852, -0.7332, 1.733 }
+Peak error greater than expected value of 20
+i:/boost-sandbox/math_toolkit/libs/math/test/handle_test_result.hpp(146): error in "test_main_caller( argc, argv )": check bounds.first >= max_error_found failed
+boost::math::erfc<real_concept> Max = 97.77 RMS Mean=8.373
+ worst case at row: 289
+ { 0.9849, 0.8363, 0.1637 }
+Peak error greater than expected value of 20
+i:/boost-sandbox/math_toolkit/libs/math/test/handle_test_result.hpp(146): error in "test_main_caller( argc, argv )": check bounds.first >= max_error_found failed
+Mean error greater than expected value of 6
+i:/boost-sandbox/math_toolkit/libs/math/test/handle_test_result.hpp(151): error in "test_main_caller( argc, argv )": check bounds.second >= mean_error_found failed
+Testing Erf Function: Large Values with type real_concept
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf<real_concept> Max = 0 RMS Mean=0
+boost::math::erfc<real_concept> Max = 1.395 RMS Mean=0.2908
+ worst case at row: 11
+ { 10.99, 1, 1.87e-054 }
+Testing Inverse Erf Function with type real_concept
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erf_inv<real_concept> Max = 1.124 RMS Mean=0.5082
+ worst case at row: 98
+ { 0.9881, 1.779 }
+Testing Inverse Erfc Function with type real_concept
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+boost::math::erfc_inv<real_concept> Max = 1.124 RMS Mean=0.5006
+ worst case at row: 98
+ { 1.988, -1.779 }
+Test suite "Test Program" failed with:
+ 181 assertions out of 184 passed
+ 3 assertions out of 184 failed
+ 1 test case out of 1 failed
+ Test case "test_main_caller( argc, argv )" failed with:
+ 181 assertions out of 184 passed
+ 3 assertions out of 184 failed
+Build Time 0:15
+
+*/

Modified: sandbox/math_toolkit/libs/math/test/test_error_handling.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_error_handling.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_error_handling.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,18 +1,21 @@
-
-// Copyright Paul A. Bristow 2006.
-// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2006-7.
+// Copyright John Maddock 2006-7.
 
 // 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 some custom error handlers:
+// Test error handling mechanism produces the expected error messages.
+// for example Error in function boost::math::test_function<float>(float, float, float): Domain Error evaluating function at 0
+
+// Define some custom dummy error handlers that do nothing but throw,
+// in order to check that they are otherwise undefined.
+// The user MUST define them before they can be used.
 //
 struct user_defined_error{};
 
-namespace boost{ namespace math{ namespace policy{
+namespace boost{ namespace math{ namespace policies{
 
 template <class T>
 T user_domain_error(const char* , const char* , const T& )
@@ -52,7 +55,6 @@
 
 }}} // namespaces
 
-
 #include <boost/math/policy/policy.hpp>
 #include <boost/math/policy/error_handling.hpp>
 #include <boost/math/concepts/real_concept.hpp>
@@ -60,7 +62,7 @@
 //
 // Define some policies:
 //
-using namespace boost::math::policy;
+using namespace boost::math::policies;
 policy<
    domain_error<throw_on_error>,
    pole_error<throw_on_error>,
@@ -95,27 +97,30 @@
    const char* msg1 = "Error while handling value %1%";
    const char* msg2 = "Error message goes here...";
 
- TEST_EXCEPTION(boost::math::policy::raise_domain_error(func, msg1, T(0.0), throw_policy), std::domain_error);
- TEST_EXCEPTION(boost::math::policy::raise_domain_error(func, 0, T(0.0), throw_policy), std::domain_error);
- TEST_EXCEPTION(boost::math::policy::raise_pole_error(func, msg1, T(0.0), throw_policy), std::domain_error);
- TEST_EXCEPTION(boost::math::policy::raise_pole_error(func, 0, T(0.0), throw_policy), std::domain_error);
- TEST_EXCEPTION(boost::math::policy::raise_overflow_error<T>(func, msg2, throw_policy), std::overflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_overflow_error<T>(func, 0, throw_policy), std::overflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_underflow_error<T>(func, msg2, throw_policy), std::underflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_underflow_error<T>(func, 0, throw_policy), std::underflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_denorm_error<T>(func, msg2, T(0), throw_policy), std::underflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_denorm_error<T>(func, 0, T(0), throw_policy), std::underflow_error);
- TEST_EXCEPTION(boost::math::policy::raise_evaluation_error(func, msg1, T(1.25), throw_policy), boost::math::evaluation_error);
- TEST_EXCEPTION(boost::math::policy::raise_evaluation_error(func, 0, T(1.25), throw_policy), boost::math::evaluation_error);
+ // Check that exception is thrown, catch and show the message, for example:
+ // Error in function boost::math::test_function<float>(float, float, float): Error while handling value 0
+
+ TEST_EXCEPTION(boost::math::policies::raise_domain_error(func, msg1, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policies::raise_domain_error(func, 0, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policies::raise_pole_error(func, msg1, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policies::raise_pole_error(func, 0, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policies::raise_overflow_error<T>(func, msg2, throw_policy), std::overflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_overflow_error<T>(func, 0, throw_policy), std::overflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_underflow_error<T>(func, msg2, throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_underflow_error<T>(func, 0, throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_denorm_error<T>(func, msg2, T(0), throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_denorm_error<T>(func, 0, T(0), throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, msg1, T(1.25), throw_policy), boost::math::evaluation_error);
+ TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, 0, T(1.25), throw_policy), boost::math::evaluation_error);
    //
    // Now try user error handlers: these should all throw user_error():
- //
- BOOST_CHECK_THROW(boost::math::policy::raise_domain_error(func, msg1, T(0.0), user_policy), user_defined_error);
- BOOST_CHECK_THROW(boost::math::policy::raise_pole_error(func, msg1, T(0.0), user_policy), user_defined_error);
- BOOST_CHECK_THROW(boost::math::policy::raise_overflow_error<T>(func, msg2, user_policy), user_defined_error);
- BOOST_CHECK_THROW(boost::math::policy::raise_underflow_error<T>(func, msg2, user_policy), user_defined_error);
- BOOST_CHECK_THROW(boost::math::policy::raise_denorm_error<T>(func, msg2, T(0), user_policy), user_defined_error);
- BOOST_CHECK_THROW(boost::math::policy::raise_evaluation_error(func, msg1, T(0.0), user_policy), user_defined_error);
+ // - because by design these are undefined and must be defined by the user ;-)
+ BOOST_CHECK_THROW(boost::math::policies::raise_domain_error(func, msg1, T(0.0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policies::raise_pole_error(func, msg1, T(0.0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policies::raise_overflow_error<T>(func, msg2, user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policies::raise_underflow_error<T>(func, msg2, user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policies::raise_denorm_error<T>(func, msg2, T(0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), user_policy), user_defined_error);
 
 }
 
@@ -126,8 +131,63 @@
         test_error(0.0F); // Test float.
         test_error(0.0); // Test double.
         test_error(0.0L); // Test long double.
- test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts.
+ test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts.
         return 0;
 } // int test_main(int, char* [])
 
+/*
+
+Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_error_handling.exe"
+Running 1 test case...
+Error in function boost::math::test_function<float>(float, float, float): Error while handling value 0
+Error in function boost::math::test_function<float>(float, float, float): Domain Error evaluating function at 0
+Error in function boost::math::test_function<float>(float, float, float): Error while handling value 0
+Error in function boost::math::test_function<float>(float, float, float): Evaluation of function at pole 0
+Error in function boost::math::test_function<float>(float, float, float): Error message goes here...
+Error in function boost::math::test_function<float>(float, float, float): Overflow Error
+Error in function boost::math::test_function<float>(float, float, float): Error message goes here...
+Error in function boost::math::test_function<float>(float, float, float): Underflow Error
+Error in function boost::math::test_function<float>(float, float, float): Error message goes here...
+Error in function boost::math::test_function<float>(float, float, float): Denorm Error
+Error in function boost::math::test_function<float>(float, float, float): Error while handling value 1.25
+Error in function boost::math::test_function<float>(float, float, float): Internal Evaluation Error, best value so far was 1.25
+Error in function boost::math::test_function<double>(double, double, double): Error while handling value 0
+Error in function boost::math::test_function<double>(double, double, double): Domain Error evaluating function at 0
+Error in function boost::math::test_function<double>(double, double, double): Error while handling value 0
+Error in function boost::math::test_function<double>(double, double, double): Evaluation of function at pole 0
+Error in function boost::math::test_function<double>(double, double, double): Error message goes here...
+Error in function boost::math::test_function<double>(double, double, double): Overflow Error
+Error in function boost::math::test_function<double>(double, double, double): Error message goes here...
+Error in function boost::math::test_function<double>(double, double, double): Underflow Error
+Error in function boost::math::test_function<double>(double, double, double): Error message goes here...
+Error in function boost::math::test_function<double>(double, double, double): Denorm Error
+Error in function boost::math::test_function<double>(double, double, double): Error while handling value 1.25
+Error in function boost::math::test_function<double>(double, double, double): Internal Evaluation Error, best value so far was 1.25
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error while handling value 0
+Error in function boost::math::test_function<long double>(long double, long double, long double): Domain Error evaluating function at 0
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error while handling value 0
+Error in function boost::math::test_function<long double>(long double, long double, long double): Evaluation of function at pole 0
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error message goes here...
+Error in function boost::math::test_function<long double>(long double, long double, long double): Overflow Error
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error message goes here...
+Error in function boost::math::test_function<long double>(long double, long double, long double): Underflow Error
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error message goes here...
+Error in function boost::math::test_function<long double>(long double, long double, long double): Denorm Error
+Error in function boost::math::test_function<long double>(long double, long double, long double): Error while handling value 1.25
+Error in function boost::math::test_function<long double>(long double, long double, long double): Internal Evaluation Error, best value so far was 1.25
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error while handling value 0
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Domain Error evaluating function at 0
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error while handling value 0
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Evaluation of function at pole 0
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error message goes here...
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Overflow Error
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error message goes here...
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Underflow Error
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error message goes here...
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Denorm Error
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Error while handling value 1.25
+Error in function boost::math::test_function<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept, class boost::math::concepts::real_concept, class boost::math::concepts::real_concept): Internal Evaluation Error, best value so far was 1.25
+*** No errors detected
+
+*/
 

Modified: sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,24 +1,12 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-// test_students_t.cpp
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
-#endif
+// test_exponential_dist.cpp
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/math/distributions/exponential.hpp>
@@ -77,9 +65,14 @@
    RealType tolerance = (std::max)(
       static_cast<RealType>(boost::math::tools::epsilon<double>()),
       boost::math::tools::epsilon<RealType>());
- tolerance *= 50 * 100;
-
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ tolerance *= 50 * 100;
+ // # pragma warning(disable: 4100) // unreferenced formal parameter.
+ // prevent his spurious warning.
+ if (T != 0)
+ {
+ cout << "Expect parameter T == 0!" << endl;
+ }
+ cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
 
    test_spot(
       static_cast<RealType>(0.5), // lambda
@@ -288,22 +281,11 @@
 
 Output is:
 
------- Build started: Project: test_exponential_dist, Configuration: Debug Win32 ------
-Compiling...
-test_exponential_dist.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_exponential_dist.exe"
 Running 1 test case...
 Tolerance for type float is 0.000596046 %
 Tolerance for type double is 1.11022e-012 %
 Tolerance for type long double is 1.11022e-012 %
 Tolerance for type class boost::math::concepts::real_concept is 1.11022e-012 %
-Build Time 0:05
-Build log was saved at "file://c:\data\boost\sandbox\boost-sandbox\libs\math_functions\IDE\math_toolkit\test_distribution\Debug\BuildLog.htm"
-test_distribution - 0 error(s), 1 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
-
-
+*** No errors detected
 
 */

Modified: sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -7,19 +7,6 @@
 
 // test_extreme_value.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/math/distributions/extreme_value.hpp>
          using boost::math::extreme_value_distribution;
@@ -68,17 +55,17 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
    // Basic sanity checks.
- // 50eps as a persentage, up to a maximum of double precision
+ // 50eps as a percentage, up to a maximum of double precision
    // (that's the limit of our test data).
    RealType tolerance = (std::max)(
       static_cast<RealType>(boost::math::tools::epsilon<double>()),
       boost::math::tools::epsilon<RealType>());
    tolerance *= 50 * 100;
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    // Results calculated by punching numbers into a calculator,
    // and using the formula at http://mathworld.wolfram.com/ExtremeValueDistribution.html
@@ -201,7 +188,6 @@
         boost::math::extreme_value mycev1(1.); // Using typedef
         extreme_value_distribution<> myev2(1.); // Using default RealType double.
 
-
          // Basic sanity-check spot values.
         // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
@@ -225,23 +211,12 @@
 
 Output is:
 
------- Rebuild All started: Project: test_extreme_value, Configuration: Debug Win32 ------
-Deleting intermediate and output files for project 'test_extreme_value', configuration 'Debug|Win32'
-Compiling...
-test_extreme_value.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_extreme_value.exe"
-Running 1 test case...
+-Running 1 test case...
 Tolerance for type float is 0.000596046 %
 Tolerance for type double is 1.11022e-012 %
 Tolerance for type long double is 1.11022e-012 %
 Tolerance for type class boost::math::concepts::real_concept is 1.11022e-012 %
 *** No errors detected
-Build Time 0:05
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_extreme_value\Debug\BuildLog.htm"
-test_extreme_value - 0 error(s), 0 warning(s)
-========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
-
-
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_factorials.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_factorials.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_factorials.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -5,13 +5,10 @@
 
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
 # pragma warning(disable: 4245) // int/unsigned int conversion
 #endif
-//
+
 // Return infinities not exceptions:
-//
 #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
 
 #include <boost/math/concepts/real_concept.hpp>
@@ -210,7 +207,7 @@
       ::boost::math::falling_factorial(static_cast<T>(30.75), 30),
       static_cast<T>(naive_falling_factorial(30.75L, 30)),
       tolerance * 3);
- if(boost::math::policy::digits<T, boost::math::policy::policy<> >() > 50)
+ if(boost::math::policies::digits<T, boost::math::policies::policy<> >() > 50)
    {
       BOOST_CHECK_CLOSE(
          ::boost::math::falling_factorial(static_cast<T>(-30.75L), 30),
@@ -328,24 +325,16 @@
 
 Output is:
 
------- Build started: Project: test_factorials, Configuration: Debug Win32 ------
-Compiling...
-test_factorials.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_factorials.exe"
 Running 1 test case...
-*** No errors detected
-Build Time 0:05
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_factorials\Debug\BuildLog.htm"
-test_factorials - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
+Types double and long double have the same number of floating-point significand bits (53) on this platform.
 max factorial for float 34
 max factorial for double 170
 max factorial for long double 170
-
+max factorial for real_concept 100
+*** No errors detected
 
 */
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,23 +1,13 @@
-// test_chi_squared.cpp
+// test_fisher_squared.cpp
 
 // Copyright Paul A. Bristow 2006.
-// Copyright John Maddock 2006.
+// Copyright John Maddock 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 using ::boost::math::concepts::real_concept;
 
@@ -520,11 +510,6 @@
 
 
   // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
   // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float.
@@ -542,14 +527,8 @@
 
 Output is:
 
------- Build started: Project: test_fisher, Configuration: Debug Win32 ------
-Compiling...
-test_fisher_f.cpp
-Linking...
-Embedding manifest...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_fisher.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 Tolerance = 0.2%.
 Tolerance = 5.96046e-005%.
 Tolerance = 5.96046e-005%.
@@ -563,12 +542,8 @@
 Tolerance = 1.11022e-013%.
 Tolerance = 1.11022e-013%.
 *** No errors detected
-Build Time 0:12
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_fisher\Debug\BuildLog.htm"
-test_fisher - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
 
 */
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -54,7 +54,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -457,3 +457,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,5 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -14,22 +15,6 @@
 // From MathWorld--A Wolfram Web Resource.
 // http://mathworld.wolfram.com/GammaDistribution.html
 
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
- // #define _SCL_SECURE_NO_DEPRECATE = 1 // avoid C4996 warning.
-# endif
-//# pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
@@ -101,16 +86,16 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks
+ // Basic sanity checks
    //
         // 15 decimal places expressed as a persentage.
    // The first tests use values generated by MathCAD,
    // and should be accurate to around double precision.
    //
    RealType tolerance = (std::max)(5e-14f, boost::math::tools::real_cast<float>(std::numeric_limits<RealType>::epsilon() * 20)) * 100;
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    check_gamma(
       static_cast<RealType>(0.5),
@@ -144,7 +129,7 @@
    // To be fair the incomplete gamma is tricky to get right in this area...
    //
         tolerance = 1e-5f * 100; // 5 decimal places as a persentage
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    check_gamma(
       static_cast<RealType>(2),
@@ -254,6 +239,7 @@
 
 Output:
 
+Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_gamma_dist.exe"
 Running 1 test case...
 Tolerance for type float is 0.000238419 %
 Tolerance for type float is 0.001 %
@@ -265,6 +251,6 @@
 Tolerance for type class boost::math::concepts::real_concept is 0.001 %
 *** No errors detected
 
-
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_hermite.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_hermite.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_hermite.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -190,3 +190,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -52,7 +52,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -512,3 +512,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -61,7 +61,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -164,8 +164,8 @@
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
- value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policy::digits<value_type, boost::math::policy::policy<> >()/2)) * 100;
- if(boost::math::policy::digits<value_type, boost::math::policy::policy<> >() < 50)
+ value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policies::digits<value_type, boost::math::policies::policy<> >()/2)) * 100;
+ if(boost::math::policies::digits<value_type, boost::math::policies::policy<> >() < 50)
       precision = 1; // 1% or two decimal digits, all we can hope for when the input is truncated
 
    for(unsigned i = 0; i < data.size(); ++i)
@@ -324,3 +324,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -54,7 +54,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -115,8 +115,8 @@
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
- value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policy::digits<value_type, boost::math::policy::policy<> >()/2)) * 100;
- if(boost::math::policy::digits<value_type, boost::math::policy::policy<> >() < 50)
+ value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policies::digits<value_type, boost::math::policies::policy<> >()/2)) * 100;
+ if(boost::math::policies::digits<value_type, boost::math::policies::policy<> >() < 50)
       precision = 1; // 1% or two decimal digits, all we can hope for when the input is truncated
 
    for(unsigned i = 0; i < data.size(); ++i)
@@ -284,3 +284,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_igamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -54,7 +54,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -420,3 +420,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -55,7 +55,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -204,8 +204,8 @@
    // and also demonstrates that you can't in general round-trip these functions.
    // It is however a useful sanity check.
    //
- value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policy::digits<value_type, boost::math::policy::policy<> >()/2)) * 100;
- if(boost::math::policy::digits<value_type, boost::math::policy::policy<> >() < 50)
+ value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policies::digits<value_type, boost::math::policies::policy<> >()/2)) * 100;
+ if(boost::math::policies::digits<value_type, boost::math::policies::policy<> >() < 50)
       precision = 1; // 1% or two decimal digits, all we can hope for when the input is truncated to float
 
    for(unsigned i = 0; i < data.size(); ++i)
@@ -393,3 +393,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -51,7 +51,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -130,8 +130,8 @@
    // and also demonstrates that you can't in general round-trip these functions.
    // It is however a useful sanity check.
    //
- value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policy::digits<value_type, boost::math::policy::policy<> >()/2)) * 100;
- if(boost::math::policy::digits<value_type, boost::math::policy::policy<> >() < 50)
+ value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policies::digits<value_type, boost::math::policies::policy<> >()/2)) * 100;
+ if(boost::math::policies::digits<value_type, boost::math::policies::policy<> >() < 50)
       precision = 1; // 1% or two decimal digits, all we can hope for when the input is truncated to float
 
    for(unsigned i = 0; i < data.size(); ++i)
@@ -268,3 +268,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_laguerre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_laguerre.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_laguerre.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -282,3 +282,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_legendre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_legendre.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_legendre.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -47,7 +47,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -405,3 +405,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_lognormal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_lognormal.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_lognormal.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,5 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -7,20 +8,6 @@
 
 // test_lognormal.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-# endif
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
@@ -35,6 +22,7 @@
         using std::setprecision;
 #include <limits>
   using std::numeric_limits;
+#include <cassert>
 
 template <class RealType>
 void check_lognormal(RealType loc, RealType scale, RealType x, RealType p, RealType q, RealType tol)
@@ -68,16 +56,16 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks
+
+ // Basic sanity checks.
         RealType tolerance = 5e-3 * 100;
         // Some tests only pass at 1e-4 because values generated by
    // http://faculty.vassar.edu/lowry/VassarStats.html
- // give only 5 or 6 *fixed* places, so small values have fewer
- // digits.
+ // give only 5 or 6 *fixed* places, so small values have fewer digits.
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    using std::exp;
 
@@ -156,7 +144,7 @@
    // Tests for PDF
    //
    tolerance = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
    BOOST_CHECK_CLOSE(
       pdf(lognormal_distribution<RealType>(), static_cast<RealType>(1)),
       static_cast<RealType>(0.3989422804014326779399460599343818684759L), // 1/sqrt(2*pi)
@@ -188,7 +176,7 @@
    tolerance = (std::max)(
       boost::math::tools::epsilon<RealType>(),
       static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
    lognormal_distribution<RealType> dist(8, 3);
    RealType x = static_cast<RealType>(0.125);
    using namespace std; // ADL of std names.
@@ -281,7 +269,6 @@
   BOOST_CHECK_EQUAL(support(myf2).first, 0); // support 0 to + infinity.
   BOOST_CHECK_EQUAL(support(myf2).second, (std::numeric_limits<double>::max)());
 
-
          // Basic sanity-check spot values.
         // (Parameter value, arbitrarily zero, only communicates the floating point type).
   test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
@@ -302,29 +289,20 @@
 } // int test_main(int, char* [])
 
 /*
-
------- Rebuild All started: Project: test_lognormal, Configuration: Debug Win32 ------
-Deleting intermediate and output files for project 'test_lognormal', configuration 'Debug|Win32'
-Compiling...
-test_lognormal.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_lognormal.exe"
 Running 1 test case...
 Tolerance for type float is 0.5 %
 Tolerance for type float is 5.96046e-005 %
 Tolerance for type float is 5.96046e-005 %
-../../../../../../boost-sandbox/libs/math_functions/test/test_lognormal.cpp(222): error in "test_main_caller( argc, argv )": difference between mode(dist){24154952} and static_cast<RealType>(0.36787944117144232159552377016146L){0.36787945} exceeds 5.96046e-005%
-../../../../../../boost-sandbox/libs/math_functions/test/test_lognormal.cpp(226): error in "test_main_caller( argc, argv )": difference between skewness(dist){729506.375} and static_cast<RealType>(729551.38304660255658441529235697L){729551.375} exceeds 5.96046e-005%
-../../../../../../boost-sandbox/libs/math_functions/test/test_lognormal.cpp(239): error in "test_main_caller( argc, argv )": check pdf(dist, 0) == 0 failed
-unknown location(0): fatal error in "test_main_caller( argc, argv )": std::overflow_error: Error in function float __cdecl boost::math::erfc_inv<float>(float): Overflow
-..\..\..\..\..\..\boost-sandbox\libs\math_functions\test\test_lognormal.cpp(242): last checkpoint
-*** 4 failures detected in test suite "Test Program"
-Project : error PRJ0019: A tool returned an error code from "Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_lognormal.exe""
-Build Time 0:06
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_lognormal\Debug\BuildLog.htm"
-test_lognormal - 5 error(s), 0 warning(s)
-========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
-
-
+Tolerance for type double is 0.5 %
+Tolerance for type double is 1.11022e-013 %
+Tolerance for type double is 1.11022e-013 %
+Tolerance for type long double is 0.5 %
+Tolerance for type long double is 1.11022e-013 %
+Tolerance for type long double is 1.11022e-013 %
+Tolerance for type class boost::math::concepts::real_concept is 0.5 %
+Tolerance for type class boost::math::concepts::real_concept is 1.11022e-013 %
+Tolerance for type class boost::math::concepts::real_concept is 1.11022e-013 %
+*** No errors detected
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,6 @@
 // test_negative_binomial.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
 // Copyright John Maddock 2006.
 
 // Use, modification and distribution are subject to the
@@ -10,20 +10,13 @@
 
 // Tests for Negative Binomial Distribution.
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-// Note BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined - see below.
-// Note that there defines must be placed BEFORE #includes.
-// Nor are these defined - several tests underflow by design.
-//#define BOOST_MATH_THROW_ON_UNDERFLOW_ERROR
-//#define BOOST_MATH_THROW_ON_DENORM_ERROR
+// Note that these defines must be placed BEFORE #includes.
 #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+// because several tests overflow & underflow by design.
 #define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
 
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
 #endif
 
 #include <boost/math/distributions/negative_binomial.hpp> // for negative_binomial_distribution
@@ -102,14 +95,14 @@
     }
     // estimate success ratio:
     BOOST_CHECK_CLOSE(
- negative_binomial_distribution<RealType>::estimate_lower_bound_on_p(
+ negative_binomial_distribution<RealType>::find_lower_bound_on_p(
       N+k, N, P),
       p, tol);
     // Note we bump up the sample size here, purely for the sake of the test,
     // internally the function has to adjust the sample size so that we get
     // the right upper bound, our test undoes this, so we can verify the result.
     BOOST_CHECK_CLOSE(
- negative_binomial_distribution<RealType>::estimate_upper_bound_on_p(
+ negative_binomial_distribution<RealType>::find_upper_bound_on_p(
       N+k+1, N, Q),
       p, tol);
 
@@ -121,14 +114,14 @@
        // the naive estimate of p = successes / (sample size)
        //
       BOOST_CHECK(
- negative_binomial_distribution<RealType>::estimate_lower_bound_on_p(
+ negative_binomial_distribution<RealType>::find_lower_bound_on_p(
         N+k, N, Q)
         <=
- negative_binomial_distribution<RealType>::estimate_upper_bound_on_p(
+ negative_binomial_distribution<RealType>::find_upper_bound_on_p(
         N+k, N, Q)
         );
       BOOST_CHECK(
- negative_binomial_distribution<RealType>::estimate_lower_bound_on_p(
+ negative_binomial_distribution<RealType>::find_lower_bound_on_p(
         N+k, N, Q)
         <=
         N / (N+k)
@@ -136,7 +129,7 @@
       BOOST_CHECK(
         N / (N+k)
         <=
- negative_binomial_distribution<RealType>::estimate_upper_bound_on_p(
+ negative_binomial_distribution<RealType>::find_upper_bound_on_p(
         N+k, N, Q)
         );
     }
@@ -144,14 +137,14 @@
     {
        // As above but when P is small.
       BOOST_CHECK(
- negative_binomial_distribution<RealType>::estimate_lower_bound_on_p(
+ negative_binomial_distribution<RealType>::find_lower_bound_on_p(
         N+k, N, P)
         <=
- negative_binomial_distribution<RealType>::estimate_upper_bound_on_p(
+ negative_binomial_distribution<RealType>::find_upper_bound_on_p(
         N+k, N, P)
         );
       BOOST_CHECK(
- negative_binomial_distribution<RealType>::estimate_lower_bound_on_p(
+ negative_binomial_distribution<RealType>::find_lower_bound_on_p(
         N+k, N, P)
         <=
         N / (N+k)
@@ -159,18 +152,18 @@
       BOOST_CHECK(
         N / (N+k)
         <=
- negative_binomial_distribution<RealType>::estimate_upper_bound_on_p(
+ negative_binomial_distribution<RealType>::find_upper_bound_on_p(
         N+k, N, P)
         );
     }
 
     // Estimate sample size:
     BOOST_CHECK_CLOSE(
- negative_binomial_distribution<RealType>::estimate_minimum_number_of_trials(
+ negative_binomial_distribution<RealType>::find_minimum_number_of_trials(
       k, p, P),
       N+k, tol);
     BOOST_CHECK_CLOSE(
- negative_binomial_distribution<RealType>::estimate_maximum_number_of_trials(
+ negative_binomial_distribution<RealType>::find_maximum_number_of_trials(
          k, p, Q),
       N+k, tol);
 
@@ -599,10 +592,10 @@
   { // BOOST_CHECK tests for infinity using std::numeric_limits<>::infinity()
     // Note that infinity is not implemented for real_concept, so these tests
     // are only done for types, like built-in float, double.. that have infinity.
- // Note that these assume that BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined.
- // #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR would give a throw here.
- // #define BOOST_MATH_THROW_ON_DOMAIN_ERROR IS defined, so the throw path
- // of error handling is tested below with BOOST_CHECK_THROW tests.
+ // Note that these assume that BOOST_MATH_OVERFLOW_ERROR_POLICY is NOT throw_on_error.
+ // #define BOOST_MATH_THROW_ON_OVERFLOW_POLICY == throw_on_error would throw here.
+ // #define BOOST_MAT_DOMAIN_ERROR_POLICY IS defined throw_on_error,
+ // so the throw path of error handling is tested below with BOOST_CHECK_THROW tests.
 
     BOOST_CHECK(
     quantile( // At P == 1 so k failures should be infinite.
@@ -726,8 +719,8 @@
 
   for(unsigned i = 0; i < negative_binomial_quantile_data.size(); ++i)
   {
- using namespace boost::math::policy;
- typedef policy<discrete_quantile<boost::math::policy::real> > P1;
+ using namespace boost::math::policies;
+ typedef policy<discrete_quantile<boost::math::policies::real> > P1;
      typedef policy<discrete_quantile<integer_below> > P2;
      typedef policy<discrete_quantile<integer_above> > P3;
      typedef policy<discrete_quantile<integer_outside> > P4;
@@ -797,22 +790,7 @@
         negative_binomial_distribution<> myf2(2., 0.5); // Using default RealType double.
 
   // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
-#ifdef BOOST_MATH_THROW_ON_OVERFLOW_ERROR
- cout << "BOOST_MATH_THROW_ON_OVERFLOW_ERROR" << " is defined to throw on overflow error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_OVERFLOW_ERROR" << " is NOT defined, so NO throw on overflow error." << endl;
-#endif
-#ifdef BOOST_MATH_THROW_ON_UNDERFLOW_ERROR
- cout << "BOOST_MATH_THROW_ON_UNDERFLOW_ERROR" << " is defined to throw on underflow error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_UNDERFLOW_ERROR" << " is NOT defined, so NO throw on underflow error." << endl;
-#endif
   // Test some simple double only examples.
   negative_binomial_distribution<double> my8dist(8., 0.25);
   // 8 successes (r), 0.25 success fraction = 35% or 1 in 4 successes.
@@ -842,14 +820,8 @@
 
 /*
 
-Compiling...
-test_negative_binomial.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_negative_binomial.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
-BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined, so NO throw on overflow error.
-BOOST_MATH_THROW_ON_UNDERFLOW_ERROR is NOT defined, so NO throw on underflow error.
 Tolerance = 0.0119209%.
 Tolerance 5 eps = 5.96046e-007%.
 Tolerance = 2.22045e-011%.

Modified: sandbox/math_toolkit/libs/math/test/test_normal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_normal.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_normal.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,5 +1,5 @@
-// Copyright Paul A. Bristow 2006.
-// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
+// Copyright John Maddock 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -15,22 +15,6 @@
 // From MathWorld--A Wolfram Web Resource.
 // http://mathworld.wolfram.com/NormalDistribution.html
 
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
- // #define _SCL_SECURE_NO_DEPRECATE = 1 // avoid C4996 warning.
-# endif
-//# pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data.
-#endif
-
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
@@ -88,16 +72,17 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks
+ // Basic sanity checks
         RealType tolerance = static_cast<RealType>(std::pow(10., -(4-2))); // 1e-4 (as %)
         // Some tests only pass at 1e-4 because values generated by
    // http://faculty.vassar.edu/lowry/VassarStats.html
    // give only 5 or 6 *fixed* places, so small values have fewer
    // digits.
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    check_normal(
       static_cast<RealType>(5),
@@ -294,10 +279,6 @@
 
 Output:
 
------- Build started: Project: test_normal, Configuration: Debug Win32 ------
-Compiling...
-test_normal.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_normal.exe"
 Running 1 test case...
 Tolerance for type float is 0.01 %
@@ -305,10 +286,7 @@
 Tolerance for type long double is 0.01 %
 Tolerance for type class boost::math::concepts::real_concept is 0.01 %
 *** No errors detected
-Build Time 0:05
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_normal\Debug\BuildLog.htm"
-test_normal - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_pareto.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_pareto.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_pareto.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -14,20 +14,9 @@
 // From MathWorld--A Wolfram Web Resource.
 // http://mathworld.wolfram.com/paretoDistribution.html
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW
-
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
 # pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
- // #define _SCL_SECURE_NO_DEPRECATE = 1 // avoid C4996 warning.
-# endif
-//# pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data.
 #endif
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
@@ -77,13 +66,13 @@
   } // check_pareto
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic sanity checks
+ // Basic sanity checks.
         //RealType tolerance = static_cast<RealType>(std::pow(10., -(4))); // 1e-4 (as fraction, NOT %)
         //cout << "tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
   // Not used so far: use epsilon tolerances.
-
+
   RealType tol5eps = boost::math::tools::epsilon<RealType>() * 5;
   RealType tol10eps = boost::math::tools::epsilon<RealType>() * 10;
   RealType tol100eps = boost::math::tools::epsilon<RealType>() * 100;
@@ -340,3 +329,4 @@
 
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_poisson.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_poisson.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_poisson.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,7 @@
 // test_poisson.cpp
 
-// Copyright Paul A. Bristow 2006.
+// Copyright Paul A. Bristow 2007.
+// Copyright John Maddock 2006.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -9,18 +10,10 @@
 
 // Basic sanity test for Poisson Cumulative Distribution Function.
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
 #define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
 
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
 #endif
 
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
@@ -425,7 +418,7 @@
 
   for(unsigned i = 0; i < poisson_quantile_data.size(); ++i)
   {
- using namespace boost::math::policy;
+ using namespace boost::math::policies;
      typedef policy<discrete_quantile<real> > P1;
      typedef policy<discrete_quantile<integer_below> > P2;
      typedef policy<discrete_quantile<integer_above> > P3;
@@ -497,13 +490,8 @@
         poisson_distribution<> myp2(2); // Using default RealType double.
 
         // Basic sanity-check spot values.
-#ifdef BOOST_MATH_THROW_ON_DOMAIN_ERROR
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is defined to throw on domain error." << endl;
-#else
- cout << "BOOST_MATH_THROW_ON_DOMAIN_ERROR" << " is NOT defined, so NO throw on domain error." << endl;
-#endif
 
-// Some plain double examples & tests:
+ // Some plain double examples & tests:
   cout.precision(17); // double max_digits10
   cout.setf(ios::showpoint);
   
@@ -513,11 +501,10 @@
   cout << "cdf(mypoisson, 2.) == " << cdf(mypoisson, 2.) << endl;
   cout << "pdf(mypoisson, 2.) == " << pdf(mypoisson, 2.) << endl;
   
- //poisson mydudpoisson(0.);
- // throws (if BOOST_MATH_THROW_ON_DOMAIN_ERROR defined to enable).
+ // poisson mydudpoisson(0.);
+ // throws (if BOOST_MATH_DOMAIN_ERROR_POLICY == throw_on_error).
 
-#define BOOST_MATH_THROW_ON_LOGIC_ERROR
-
+
   BOOST_CHECK_THROW(poisson mydudpoisson(-1), std::domain_error);// Mean must be > 0.
   BOOST_CHECK_THROW(poisson mydudpoisson(-1), std::logic_error);// Mean must be > 0.
   // Passes the check because logic_error is a parent????
@@ -609,92 +596,12 @@
 
 Output:
 
------- Build started: Project: test_poisson, Configuration: Debug Win32 ------
-Compiling...
-test_poisson.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_poisson.exe"
 Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
 mean(mypoisson, 4.) == 4.0000000000000000
 mean(mypoisson, 0.) == 4.0000000000000000
 cdf(mypoisson, 2.) == 0.23810330555354431
 pdf(mypoisson, 2.) == 0.14652511110987343
 *** No errors detected
-Build Time 0:06
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_poisson\Debug\BuildLog.htm"
-test_poisson - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
-
------- Build started: Project: test_poisson, Configuration: Debug Win32 ------
-Compiling...
-test_poisson.cpp
-Linking...
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_poisson.exe"
-Running 1 test case...
-BOOST_MATH_THROW_ON_DOMAIN_ERROR is defined to throw on domain error.
-Mean = 4
-k pdf sum cdf diff
-0 0.018315638888734179 0.018315638888734179 0.018315638888734179 0.018315638888734179
-1 0.073262555554936715 0.091578194443670893 0.091578194443670893 0.091578194443670893 0
-2 0.14652511110987343 0.23810330555354431 0.23810330555354431 0.23810330555354431 0
-3 0.19536681481316456 0.43347012036670884 0.43347012036670884 0.43347012036670884 0
-4 0.19536681481316456 0.62883693517987338 0.62883693517987338 0.62883693517987338 0
-5 0.15629345185053165 0.78513038703040505 0.78513038703040505 0.78513038703040516 1.1102230246251565e-016
-6 0.10419563456702111 0.88932602159742613 0.88932602159742613 0.88932602159742624 1.1102230246251565e-016
-7 0.059540362609726345 0.94886638420715252 0.94886638420715252 0.94886638420715264 1.1102230246251565e-016
-8 0.029770181304863173 0.97863656551201572 0.97863656551201572 0.97863656551201583 1.1102230246251565e-016
-9 0.013231191691050298 0.99186775720306597 0.99186775720306597 0.99186775720306608 1.1102230246251565e-016
-10 0.0052924766764201195 0.99716023387948605 0.99716023387948605 0.99716023387948627 2.2204460492503131e-016
-11 0.0019245369732436798 0.99908477085272973 0.99908477085272973 0.99908477085272995 2.2204460492503131e-016
-12 0.00064151232441456 0.99972628317714429 0.99972628317714429 0.99972628317714451 2.2204460492503131e-016
-13 0.00019738840751217228 0.99992367158465645 0.99992367158465645 0.99992367158465667 2.2204460492503131e-016
-14 5.6396687860620656e-005 0.99998006827251706 0.99998006827251706 0.99998006827251729 2.2204460492503131e-016
-15 1.5039116762832175e-005 0.99999510738927988 0.99999510738927988 0.9999951073892801 2.2204460492503131e-016
-16 3.7597791907080438e-006 0.99999886716847064 0.99999886716847064 0.99999886716847086 2.2204460492503131e-016
-17 8.8465392722542207e-007 0.99999975182239786 0.99999975182239786 0.99999975182239809 2.2204460492503131e-016
-18 1.9658976160564933e-007 0.99999994841215945 0.99999994841215945 0.99999994841215967 2.2204460492503131e-016
-19 4.1387318232768281e-008 0.99999998979947768 0.99999998979947768 0.99999998979947791 2.2204460492503131e-016
-20 8.2774636465536562e-009 0.99999999807694129 0.99999999807694151 0.99999999807694151 2.2204460492503131e-016
-21 1.5766597422006965e-009 0.99999999965360098 0.99999999965360131 0.99999999965360131 3.3306690738754696e-016
-22 2.8666540767285388e-010 0.99999999994026634 0.99999999994026667 0.99999999994026667 3.3306690738754696e-016
-23 4.9854853508322414e-011 0.99999999999012124 0.99999999999012157 0.99999999999012157 3.3306690738754696e-016
-24 8.3091422513870696e-012 0.99999999999843037 0.9999999999984307 0.9999999999984307 3.3306690738754696e-016
-25 1.3294627602219311e-012 0.99999999999975986 0.99999999999976019 0.99999999999976019 3.3306690738754696e-016
-26 2.0453273234183554e-013 0.99999999999996436 0.99999999999996469 0.99999999999996469 3.3306690738754696e-016
-27 3.0301145532123785e-014 0.99999999999999467 0.999999999999995 0.999999999999995 3.3306690738754696e-016
-28 4.3287350760176837e-015 0.999999999999999 0.99999999999999933 0.99999999999999933 3.3306690738754696e-016
-29 5.9706690703692191e-016 0.99999999999999956 0.99999999999999989 0.99999999999999989 3.3306690738754696e-016
-30 7.9608920938256257e-017 0.99999999999999967 1 1 3.3306690738754696e-016
-31 1.0272118830742743e-017 0.99999999999999967 1 1 3.3306690738754696e-016
-32 1.2840148538428429e-018 0.99999999999999967 1 1 3.3306690738754696e-016
-33 1.5563816410216277e-019 0.99999999999999967 1 1 3.3306690738754696e-016
-34 1.8310372247313267e-020 0.99999999999999967 1 1 3.3306690738754696e-016
-35 2.092613971121516e-021 0.99999999999999967 1 1 3.3306690738754696e-016
-36 2.3251266345794622e-022 0.99999999999999967 1 1 3.3306690738754696e-016
-37 2.5136504157615809e-023 0.99999999999999967 1 1 3.3306690738754696e-016
-38 2.645947806064822e-024 0.99999999999999967 1 1 3.3306690738754696e-016
-39 2.7137926216049458e-025 0.99999999999999967 1 1 3.3306690738754696e-016
-40 2.713792621604946e-026 0.99999999999999967 1 1 3.3306690738754696e-016
-41 2.6476025576633616e-027 0.99999999999999967 1 1 3.3306690738754696e-016
-42 2.5215262453936778e-028 0.99999999999999967 1 1 3.3306690738754696e-016
-43 2.3456058096685376e-029 0.99999999999999967 1 1 3.3306690738754696e-016
-44 2.1323689178804887e-030 0.99999999999999967 1 1 3.3306690738754696e-016
-45 1.89543903811599e-031 0.99999999999999967 1 1 3.3306690738754696e-016
-46 1.6482078592312956e-032 0.99999999999999967 1 1 3.3306690738754696e-016
-47 1.4027300929628047e-033 0.99999999999999967 1 1 3.3306690738754696e-016
-48 1.1689417441356707e-034 0.99999999999999967 1 1 3.3306690738754696e-016
-49 9.5423815847809852e-036 0.99999999999999967 1 1 3.3306690738754696e-016
-50 7.633905267824789e-037 0.99999999999999967 1 1 3.3306690738754696e-016
-0.006737946999085467
-0.040427681994512805
-0.85712346049854715
-*** No errors detected
-Build Time 0:06
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_poisson\Debug\BuildLog.htm"
-test_poisson - 0 error(s), 0 warning(s)
-========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
 
 */

Modified: sandbox/math_toolkit/libs/math/test/test_policy.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -24,7 +24,7 @@
 
 int test_main(int, char* [])
 {
- using namespace boost::math::policy;
+ using namespace boost::math::policies;
    using namespace boost;
    BOOST_CHECK(is_domain_error<domain_error<ignore_error> >::value);
    BOOST_CHECK(0 == is_domain_error<pole_error<ignore_error> >::value);
@@ -227,3 +227,4 @@
 } // int test_main(int, char* [])
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -19,7 +19,7 @@
 
 namespace test{
 
- typedef boost::math::policy::policy<> policy;
+ typedef boost::math::policies::policy<> policy;
 
    BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(policy);
 
@@ -126,3 +126,4 @@
 
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -7,17 +7,9 @@
 
 // test_rayleigh.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
 # pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
 #endif
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
@@ -314,21 +306,14 @@
 
 Output is:
 
------- Build started: Project: test_rayleigh_dist, Configuration: Debug Win32 ------
-Compiling...
-test_rayleigh.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_rayleigh.exe"
 Running 1 test case...
-Tolerance for type float is 5.96046e-006 %
-Tolerance for type double is 1.11022e-014 %
-Tolerance for type long double is 1.11022e-014 %
-Tolerance for type class boost::math::concepts::real_concept is 1.11022e-014 %
+Tolerance for type float is 0.000119209 %
+Tolerance for type double is 2.22045e-013 %
+Tolerance for type long double is 2.22045e-013 %
+Tolerance for type class boost::math::concepts::real_concept is 2.22045e-013 %
 *** No errors detected
 
-
-
-
-
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_roots.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_roots.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_roots.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -94,7 +94,7 @@
 
 double inverse_ibeta_bisect(double a, double b, double z)
 {
- typedef boost::math::policy::policy<> pol;
+ typedef boost::math::policies::policy<> pol;
    bool invert = false;
    int bits = std::numeric_limits<double>::digits;
 
@@ -152,7 +152,7 @@
 
    double min = 0;
    double max = 1;
- return boost::math::tools::newton_raphson_iterate(ibeta_roots_2<double, boost::math::policy::policy<> >(a, b, z, invert), guess, min, max, precision);
+ return boost::math::tools::newton_raphson_iterate(ibeta_roots_2<double, boost::math::policies::policy<> >(a, b, z, invert), guess, min, max, precision);
 }
 
 double inverse_ibeta_halley(double a, double b, double z)
@@ -183,7 +183,7 @@
 
    double min = 0;
    double max = 1;
- return boost::math::tools::halley_iterate(ibeta_roots_3<double, boost::math::policy::policy<> >(a, b, z, invert), guess, min, max, precision);
+ return boost::math::tools::halley_iterate(ibeta_roots_3<double, boost::math::policies::policy<> >(a, b, z, invert), guess, min, max, precision);
 }
 
 double inverse_ibeta_schroeder(double a, double b, double z)
@@ -214,7 +214,7 @@
 
    double min = 0;
    double max = 1;
- return boost::math::tools::schroeder_iterate(ibeta_roots_3<double, boost::math::policy::policy<> >(a, b, z, invert), guess, min, max, precision);
+ return boost::math::tools::schroeder_iterate(ibeta_roots_3<double, boost::math::policies::policy<> >(a, b, z, invert), guess, min, max, precision);
 }
 
 
@@ -225,8 +225,8 @@
    typedef typename T::value_type row_type;
    typedef typename row_type::value_type value_type;
 
- value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policy::digits<value_type, boost::math::policy::policy<> >()/2)) * 100;
- if(boost::math::policy::digits<value_type, boost::math::policy::policy<> >() < 50)
+ value_type precision = static_cast<value_type>(ldexp(1.0, 1-boost::math::policies::digits<value_type, boost::math::policies::policy<> >()/2)) * 100;
+ if(boost::math::policies::digits<value_type, boost::math::policies::policy<> >() < 50)
       precision = 1; // 1% or two decimal digits, all we can hope for when the input is truncated
 
    for(unsigned i = 0; i < data.size(); ++i)
@@ -295,3 +295,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -46,7 +46,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -325,3 +325,4 @@
 }
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_students_t.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_students_t.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_students_t.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -14,19 +14,6 @@
 // Basic sanity test for Student's t probability (quantile) (0. < p < 1).
 // and Student's t probability Quantile (0. < p < 1).
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-//# pragma warning(disable: 4535) // calling _set_se_translator() requires /EHa (in Boost.test)
-// Enable C++ Exceptions Yes With SEH Exceptions (/EHa) prevents warning 4535.
-#endif
-
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
 #include <boost/test/floating_point_comparison.hpp>
 
@@ -64,7 +51,7 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
   // Basic sanity checks
         RealType tolerance = static_cast<RealType>(std::pow(10., -(6-2))); // 1e-6 (as %)
@@ -75,7 +62,7 @@
         // http://faculty.vassar.edu/lowry/tsamp.html
         // df = 5, +/-t = 2.0, 1-tailed = 0.050970, 2-tailed = 0.101939
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
         // http://en.wikipedia.org/wiki/Student%27s_t_distribution#Table_of_selected_values
   // Using tabulated value of t = 3.182 for 0.975, 3 df, one-sided.
@@ -393,6 +380,7 @@
   using namespace boost::math;
   students_t myst1(2); // Using typedef
         students_t_distribution<> myst2(2); // Using default RealType double.
+ //students_t_distribution<double> myst3(2); // Using explicit RealType double.
 
          // Basic sanity-check spot values.
         // (Parameter value, arbitrarily zero, only communicates the floating point type).
@@ -415,11 +403,6 @@
 
 /*
 
------- Rebuild All started: Project: test_students_t, Configuration: Debug Win32 ------
-Deleting intermediate and output files for project 'test_students_t', configuration 'Debug|Win32'
-Compiling...
-test_students_t.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_students_t.exe"
 Running 1 test case...
 Tolerance for type float is 0.0001 %
@@ -427,10 +410,7 @@
 Tolerance for type long double is 0.0001 %
 Tolerance for type class boost::math::concepts::real_concept is 0.0001 %
 *** No errors detected
-Build Time 0:14
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_students_t\Debug\BuildLog.htm"
-test_students_t - 0 error(s), 0 warning(s)
-========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
 
 */
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -48,7 +48,7 @@
    //
    const char* largest_type;
 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- if(boost::math::policy::digits<double, boost::math::policy::policy<> >() == boost::math::policy::digits<long double, boost::math::policy::policy<> >())
+ if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
    {
       largest_type = "(long\\s+)?double";
    }
@@ -221,3 +221,4 @@
    return 0;
 }
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_triangular.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_triangular.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_triangular.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,4 @@
-// Copyright Paul Bristow 2006.
+// Copyright Paul Bristow 2007.
 // Copyright John Maddock 2006.
 
 // Use, modification and distribution are subject to the
@@ -8,22 +8,9 @@
 
 // test_triangular.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-//#define BOOST_MATH_THROW_ON_UNDERFLOW_ERROR
-// Ignore underflow to zero.
-
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-# pragma warning(disable: 4305) // 'initializing' : truncation from 'long double' to 'float'
-# endif
+# pragma warning(disable: 4305) // truncation from 'long double' to 'float'
 #endif
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
@@ -79,7 +66,7 @@
 } // void check_triangular
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
   // Basic sanity checks:
   //
@@ -91,7 +78,7 @@
   RealType tolerance = boost::math::tools::epsilon<RealType>() * 5; // 5 eps as a fraction.
   RealType tol5eps = boost::math::tools::epsilon<RealType>() * 5; // 5 eps as a fraction.
 
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
   
   using namespace std; // for ADL of std::exp;
 
@@ -227,9 +214,9 @@
   { // BOOST_CHECK tests for infinity using std::numeric_limits<>::infinity()
     // Note that infinity is not implemented for real_concept, so these tests
     // are only done for types, like built-in float, double.. that have infinity.
- // Note that these assume that BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined.
- // #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR would give a throw here.
- // #define BOOST_MATH_THROW_ON_DOMAIN_ERROR IS defined, so the throw path
+ // Note that these assume that BOOST_MATH_OVERFLOW_ERROR_POLICY is NOT throw_on_error.
+ // #define BOOST_MATH_OVERFLOW_ERROR_POLICY == throw_on_error would give a throw here.
+ // #define BOOST_MATH_DOMAIN_ERROR_POLICY == throw_on_error IS defined, so the throw path
     // of error handling is tested below with BOOST_CHECK_THROW tests.
 
     BOOST_CHECK_THROW( // x == infinity NOT OK.
@@ -440,7 +427,7 @@
   tolerance = (std::max)(
     boost::math::tools::epsilon<RealType>(),
     static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5; // 5 eps as a fraction.
- cout << "Tolerance (as fraction) for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ cout << "Tolerance (as fraction) for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
   triangular_distribution<RealType> distu01(0, 1);
   RealType x = static_cast<RealType>(0.5);
   using namespace std; // ADL of std names.
@@ -481,9 +468,9 @@
   { // BOOST_CHECK tests for infinity using std::numeric_limits<>::infinity()
     // Note that infinity is not implemented for real_concept, so these tests
     // are only done for types, like built-in float, double.. that have infinity.
- // Note that these assume that BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined.
- // #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR would give a throw here.
- // #define BOOST_MATH_THROW_ON_DOMAIN_ERROR IS defined, so the throw path
+ // Note that these assume that BOOST_MATH_OVERFLOW_ERROR_POLICY is NOT throw_on_error.
+ // #define BOOST_MATH_OVERFLOW_ERROR_POLICY == throw_on_error would give a throw here.
+ // #define BOOST_MATH_DOMAIN_ERROR_POLICY == throw_on_error IS defined, so the throw path
     // of error handling is tested below with BOOST_CHECK_THROW tests.
 
     BOOST_CHECK_EQUAL(pdf(distu01, std::numeric_limits<RealType>::infinity()), 0);
@@ -685,22 +672,13 @@
 
 Output:
 
-Compiling...
-test_triangular.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_triangular.exe"
 Running 1 test case...
-0
 Distribution 0
-0
 Distribution 1
-1
 Distribution 2
-0.35355339059327373
 Distribution 3
-0.5
 Distribution 4
--0.13397459621556151
 Tolerance for type float is 5.96046e-007.
 Tolerance for type double is 1.11022e-015.
 Tolerance for type long double is 1.11022e-015.
@@ -709,7 +687,7 @@
 
 
 
-
 */
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_uniform.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_uniform.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_uniform.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,4 +1,4 @@
-// Copyright Paul Bristow 2006.
+// Copyright Paul Bristow 2007.
 // Copyright John Maddock 2006.
 
 // Use, modification and distribution are subject to the
@@ -8,21 +8,9 @@
 
 // test_uniform.cpp
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-//#define BOOST_MATH_THROW_ON_UNDERFLOW_ERROR
-// Ignore underflow to zero.
-
 #ifdef _MSC_VER
 # pragma warning(disable: 4127) // conditional expression is constant.
 # pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-# endif
 #endif
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
@@ -72,9 +60,9 @@
 } // void check_uniform
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks
+ // Basic sanity checks
    //
    // These test values were generated for the normal distribution
    // using the online calculator at
@@ -83,7 +71,7 @@
    // Tolerance is just over 5 decimal digits expressed as a fraction:
    // that's the limit of the test data.
         RealType tolerance = 2e-5f;
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
 
    using std::exp;
 
@@ -110,10 +98,10 @@
     { // BOOST_CHECK tests for infinity using std::numeric_limits<>::infinity()
       // Note that infinity is not implemented for real_concept, so these tests
       // are only done for types, like built-in float, double.. that have infinity.
- // Note that these assume that BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined.
- // #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR would give a throw here.
- // #define BOOST_MATH_THROW_ON_DOMAIN_ERROR IS defined, so the throw path
- // of error handling is tested below with BOOST_CHECK_THROW tests.
+ // Note that these assume that BOOST_MATH_OVERFLOW_ERROR_POLICY is NOT throw_on_error.
+ // #define BOOST_MATH_OVERFLOW_ERROR_POLICY == throw_on_error would give a throw here.
+ // #define BOOST_MATH_DOMAIN_ERROR_POLICY == throw_on_error IS defined, so the throw path
+ // of error handling is tested below with BOOST_CHECK_THROW tests.
 
      BOOST_CHECK_THROW( // x == infinity should NOT be OK.
        pdf(uniform_distribution<RealType>(0, 1), static_cast<RealType>(std::numeric_limits<RealType>::infinity())),
@@ -295,7 +283,7 @@
    tolerance = (std::max)(
       boost::math::tools::epsilon<RealType>(),
       static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5; // 5 eps as a fraction.
- cout << "Tolerance (as fraction) for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ cout << "Tolerance (as fraction) for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
    uniform_distribution<RealType> distu01(0, 1);
    RealType x = static_cast<RealType>(0.5);
    using namespace std; // ADL of std names.
@@ -336,10 +324,11 @@
   { // BOOST_CHECK tests for infinity using std::numeric_limits<>::infinity()
     // Note that infinity is not implemented for real_concept, so these tests
     // are only done for types, like built-in float, double, long double, that have infinity.
- // Note that these assume that BOOST_MATH_THROW_ON_OVERFLOW_ERROR is NOT defined.
- // #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR would give a throw here.
- // #define BOOST_MATH_THROW_ON_DOMAIN_ERROR IS defined, so the throw path
+ // Note that these assume that BOOST_MATH_OVERFLOW_ERROR_POLICY is NOT throw_on_error.
+ // #define BOOST_MATH_OVERFLOW_ERROR_POLICY == throw_on_error would give a throw here.
+ // #define BOOST_MATH_DOMAIN_ERROR_POLICY == throw_on_error IS defined, so the throw path
     // of error handling is tested below with BOOST_CHECK_THROW tests.
+
     BOOST_CHECK_THROW(pdf(distu01, std::numeric_limits<RealType>::infinity()), std::domain_error);
     BOOST_CHECK_THROW(pdf(distu01, -std::numeric_limits<RealType>::infinity()), std::domain_error);
    } // test for infinity using std::numeric_limits<>::infinity()
@@ -443,9 +432,6 @@
 
 Output:
 
-Compiling...
-test_uniform.cpp
-Linking...
 Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_uniform.exe"
 Running 1 test case...
 Tolerance for type float is 2e-005.
@@ -457,9 +443,8 @@
 Tolerance for type class boost::math::concepts::real_concept is 2e-005.
 Tolerance (as fraction) for type class boost::math::concepts::real_concept is 1.11022e-015.
 *** No errors detected
-Build Time 0:06
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_uniform\Debug\BuildLog.htm"
 
 */
 
 
+

Modified: sandbox/math_toolkit/libs/math/test/test_weibull.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_weibull.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_weibull.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,25 +1,12 @@
 // Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-// test_lognormal.cpp
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
-#ifdef _MSC_VER
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-# pragma warning(disable: 4512) // assignment operator could not be generated.
-# pragma warning(disable: 4510) // default constructor could not be generated.
-# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required.
-# if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0)
-# pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated.
-# endif
-#endif
+// test_weibull.cpp
 
 #include <boost/math/concepts/real_concept.hpp> // for real_concept
 #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
@@ -68,9 +55,9 @@
 }
 
 template <class RealType>
-void test_spots(RealType T)
+void test_spots(RealType)
 {
- // Basic santity checks
+ // Basic sanity checks
    //
    // These test values were generated for the normal distribution
    // using the online calculator at
@@ -79,7 +66,7 @@
    // Tolerance is just over 5 decimal digits expressed as a persentage:
    // that's the limit of the test data.
         RealType tolerance = 2e-5f * 100;
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
 
    using std::exp;
 
@@ -264,7 +251,7 @@
    tolerance = (std::max)(
       boost::math::tools::epsilon<RealType>(),
       static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
    weibull_distribution<RealType> dist(2, 3);
    RealType x = static_cast<RealType>(0.125);
    using namespace std; // ADL of std names.
@@ -368,5 +355,24 @@
    return 0;
 } // int test_main(int, char* [])
 
+/*
+
+Output:
+
+Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_weibull.exe"
+Running 1 test case...
+Tolerance for type float is 0.002 %
+Tolerance for type float is 5.96046e-005 %
+Tolerance for type double is 0.002 %
+Tolerance for type double is 1.11022e-013 %
+Tolerance for type long double is 0.002 %
+Tolerance for type long double is 1.11022e-013 %
+Tolerance for type class boost::math::concepts::real_concept is 0.002 %
+Tolerance for type class boost::math::concepts::real_concept is 1.11022e-013 %
+*** No errors detected
+
+*/
+
+
 
 

Modified: sandbox/math_toolkit/libs/math/tools/carlson_ellint_data.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/tools/carlson_ellint_data.cpp (original)
+++ sandbox/math_toolkit/libs/math/tools/carlson_ellint_data.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,8 @@
-
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
+// Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/math/tools/ntl.hpp>
 #include <boost/math/tools/dual_precision.hpp>
@@ -146,3 +148,4 @@
    return 0;
 }
 
+

Modified: sandbox/math_toolkit/libs/math/tools/ellint_pi2_data.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/tools/ellint_pi2_data.cpp (original)
+++ sandbox/math_toolkit/libs/math/tools/ellint_pi2_data.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,8 @@
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
-
+// Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
 #include <boost/math/tools/ntl.hpp>
 #include <boost/math/tools/dual_precision.hpp>
 #include <boost/math/tools/test_data.hpp>
@@ -59,3 +61,4 @@
    return 0;
 }
 
+

Modified: sandbox/math_toolkit/libs/math/tools/ellint_pi3_data.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/tools/ellint_pi3_data.cpp (original)
+++ sandbox/math_toolkit/libs/math/tools/ellint_pi3_data.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -1,6 +1,10 @@
+// Copyright John Maddock 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
-#define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
 
 #include <boost/math/tools/ntl.hpp>
 #include <boost/math/tools/dual_precision.hpp>
@@ -72,3 +76,4 @@
    return 0;
 }
 
+

Modified: sandbox/math_toolkit/libs/math/tools/ibeta_data.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/tools/ibeta_data.cpp (original)
+++ sandbox/math_toolkit/libs/math/tools/ibeta_data.cpp 2007-08-03 06:13:47 EDT (Fri, 03 Aug 2007)
@@ -87,7 +87,7 @@
 T get_ibeta_fraction1(T a, T b, T x)
 {
    ibeta_fraction1_t<T> f(a, b, x);
- T fract = boost::math::tools::continued_fraction_a(f, boost::math::policy::digits<T, boost::math::policy<> >());
+ T fract = boost::math::tools::continued_fraction_a(f, boost::math::policies::digits<T, boost::math::policies<> >());
    T denom = (a * (fract + 1));
    T num = pow(x, a) * pow(1 - x, b);
    if(num == 0)
@@ -307,3 +307,4 @@
    return 0;
 }
 
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk