Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-08-22 08:33:35


Author: johnmaddock
Date: 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
New Revision: 48293
URL: http://svn.boost.org/trac/boost/changeset/48293

Log:
Merge changes from Trunk.
Added:
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/constants.qbk
      - copied unchanged from r48292, /trunk/libs/math/doc/sf_and_dist/constants.qbk
Text files modified:
   sandbox/math_toolkit/boost/math/bindings/rr.hpp | 2
   sandbox/math_toolkit/boost/math/concepts/real_concept.hpp | 4
   sandbox/math_toolkit/boost/math/concepts/std_real_concept.hpp | 2
   sandbox/math_toolkit/boost/math/distributions/cauchy.hpp | 2
   sandbox/math_toolkit/boost/math/distributions/exponential.hpp | 2
   sandbox/math_toolkit/boost/math/distributions/extreme_value.hpp | 2
   sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp | 2
   sandbox/math_toolkit/boost/math/distributions/rayleigh.hpp | 2
   sandbox/math_toolkit/boost/math/policies/error_handling.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/acosh.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/asinh.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/atanh.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/beta.hpp | 6
   sandbox/math_toolkit/boost/math/special_functions/cos_pi.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp | 8
   sandbox/math_toolkit/boost/math/special_functions/detail/unchecked_factorial.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/expm1.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/factorials.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp | 14
   sandbox/math_toolkit/boost/math/special_functions/gamma.hpp | 5
   sandbox/math_toolkit/boost/math/special_functions/hypot.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/log1p.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/next.hpp | 6
   sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/sinc.hpp | 2
   sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp | 2
   sandbox/math_toolkit/boost/math/tools/config.hpp | 4
   sandbox/math_toolkit/boost/math/tools/fraction.hpp | 2
   sandbox/math_toolkit/boost/math/tools/minima.hpp | 2
   sandbox/math_toolkit/boost/math/tools/rational.hpp | 122 ++++
   sandbox/math_toolkit/boost/math/tools/roots.hpp | 2
   sandbox/math_toolkit/boost/math/tools/series.hpp | 2
   sandbox/math_toolkit/boost/math/tools/stats.hpp | 2
   sandbox/math_toolkit/boost/math/tr1.hpp | 1104 ++++++++++++++++++++--------------------
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk | 1
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk | 2
   sandbox/math_toolkit/libs/math/src/tr1/acosh.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/acoshf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/acoshl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/asinh.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/asinhf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/asinhl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerre.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerref.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerrel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_legendre.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_legendref.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/assoc_legendrel.cpp | 4
   sandbox/math_toolkit/libs/math/src/tr1/atanh.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/atanhf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/atanhl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/beta.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/betaf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/betal.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/c_policy.hpp | 2
   sandbox/math_toolkit/libs/math/src/tr1/cbrt.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cbrtf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cbrtl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/copysign.cpp | 10
   sandbox/math_toolkit/libs/math/src/tr1/copysignf.cpp | 10
   sandbox/math_toolkit/libs/math/src/tr1/copysignl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_i.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_if.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_il.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_j.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_k.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_neumann.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_1.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_1f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_1l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_2.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_2f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_2l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_3.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_3f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/ellint_3l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erfc.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erfcf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erfcl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erff.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/erfl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expint.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expintf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expintl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expm1.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expm1f.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/expm1l.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/fmax.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/fmaxf.cpp | 8
   sandbox/math_toolkit/libs/math/src/tr1/fmaxl.cpp | 4
   sandbox/math_toolkit/libs/math/src/tr1/fmin.cpp | 4
   sandbox/math_toolkit/libs/math/src/tr1/fminf.cpp | 8
   sandbox/math_toolkit/libs/math/src/tr1/fminl.cpp | 4
   sandbox/math_toolkit/libs/math/src/tr1/fpclassify.cpp | 28
   sandbox/math_toolkit/libs/math/src/tr1/fpclassifyf.cpp | 28
   sandbox/math_toolkit/libs/math/src/tr1/fpclassifyl.cpp | 28
   sandbox/math_toolkit/libs/math/src/tr1/hermite.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/hermitef.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/hermitel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/hypot.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/hypotf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/hypotl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/laguerre.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/laguerref.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/laguerrel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/legendre.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/legendref.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/legendrel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lgamma.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lgammaf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lgammal.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/llround.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/llroundf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/llroundl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/log1p.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/log1pf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/log1pl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lround.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lroundf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/lroundl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nextafter.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nextafterf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nextafterl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nexttoward.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nexttowardf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/nexttowardl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/riemann_zeta.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/riemann_zetaf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/riemann_zetal.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/round.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/roundf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/roundl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_bessel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_besself.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_bessell.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_legendre.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_legendref.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_legendrel.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_neumann.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_neumannf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/sph_neumannl.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/tgamma.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/tgammaf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/tgammal.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/trunc.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/truncf.cpp | 6
   sandbox/math_toolkit/libs/math/src/tr1/truncl.cpp | 6
   sandbox/math_toolkit/libs/math/test/test_error_handling.cpp | 8
   sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp | 4
   sandbox/math_toolkit/libs/math/test/test_next.cpp | 11
   sandbox/math_toolkit/libs/math/test/test_tr1.cpp | 6
   167 files changed, 1165 insertions(+), 1018 deletions(-)

Modified: sandbox/math_toolkit/boost/math/bindings/rr.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/bindings/rr.hpp (original)
+++ sandbox/math_toolkit/boost/math/bindings/rr.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -14,7 +14,7 @@
 
 #include <ostream>
 #include <istream>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <NTL/RR.h>
 
 #ifndef BOOST_MATH_NTL_RR_HPP

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -32,7 +32,7 @@
 #endif
 #include <ostream>
 #include <istream>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <math.h> // fmodl
 
 #ifndef BOOST_MATH_REAL_CONCEPT_HPP
@@ -299,7 +299,7 @@
    is >> v;
    a = v;
    return is;
-#elif defined(__SGI_STL_PORT)
+#elif defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__)
    std::string s;
    real_concept_base_type d;
    is >> s;

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -24,7 +24,7 @@
 
 #include <ostream>
 #include <istream>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <math.h> // fmodl
 
 #ifndef BOOST_MATH_STD_REAL_CONCEPT_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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -17,7 +17,7 @@
 #include <boost/math/constants/constants.hpp>
 #include <boost/math/distributions/complement.hpp>
 #include <boost/math/distributions/detail/common_error_handling.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 #include <utility>
 

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -12,7 +12,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include <boost/math/distributions/complement.hpp>
 #include <boost/math/distributions/detail/common_error_handling.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 #ifdef BOOST_MSVC
 # pragma warning(push)

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -12,7 +12,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include <boost/math/distributions/complement.hpp>
 #include <boost/math/distributions/detail/common_error_handling.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 //
 // This is the maximum extreme value distribution, see

Modified: sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -113,7 +113,7 @@
             // *before* the largest term so that backwards iteration
             // is strictly converging.
             //
- for(int i = k - 1; i >= 0; --i)
+ for(i = k - 1; i >= 0; --i)
             {
                T term = poisb * gamb;
                sum += term;

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -12,7 +12,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include <boost/math/distributions/complement.hpp>
 #include <boost/math/distributions/detail/common_error_handling.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 #ifdef BOOST_MSVC
 # pragma warning(push)

Modified: sandbox/math_toolkit/boost/math/policies/error_handling.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policies/error_handling.hpp (original)
+++ sandbox/math_toolkit/boost/math/policies/error_handling.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -12,7 +12,7 @@
 #include <iomanip>
 #include <string>
 #include <cerrno>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <stdexcept>
 #include <boost/math/tools/config.hpp>
 #include <boost/math/policies/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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -15,7 +15,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/config.hpp>
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/policies/error_handling.hpp>

Modified: sandbox/math_toolkit/boost/math/special_functions/asinh.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/asinh.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/asinh.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -16,7 +16,7 @@
 #endif
 
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/config.hpp>
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/special_functions/math_fwd.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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -16,7 +16,7 @@
 #endif
 
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/config.hpp>
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/policies/error_handling.hpp>

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -20,7 +20,7 @@
 #include <boost/math/special_functions/trunc.hpp>
 #include <boost/math/tools/roots.hpp>
 #include <boost/static_assert.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 namespace boost{ namespace math{
 
@@ -308,8 +308,8 @@
       // general case:
       T b1 = (x * cgh) / agh;
       T b2 = (y * cgh) / bgh;
- T l1 = a * log(b1);
- T l2 = b * log(b2);
+ l1 = a * log(b1);
+ l2 = b * log(b2);
       if((l1 >= tools::log_max_value<T>())
          || (l1 <= tools::log_min_value<T>())
          || (l2 >= tools::log_max_value<T>())

Modified: sandbox/math_toolkit/boost/math/special_functions/cos_pi.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/cos_pi.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/cos_pi.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/math/tools/config.hpp>
 #include <boost/math/special_functions/trunc.hpp>
 #include <boost/math/tools/promotion.hpp>

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -234,10 +234,10 @@
       workspace[0] = s * s;
       workspace[1] = s * c;
       workspace[2] = (1 - 2 * workspace[0]) / 3;
- static const BOOST_MATH_INT_TABLE_TYPE(T, int) co3[] = { 1, -13, 13 };
- workspace[3] = tools::evaluate_polynomial(co3, workspace[0], 3) / (36 * s * c);
- static const BOOST_MATH_INT_TABLE_TYPE(T, int) co4[] = { 1, 21, -69, 46 };
- workspace[4] = tools::evaluate_polynomial(co4, workspace[0], 4) / (270 * workspace[0] * c * c);
+ static const BOOST_MATH_INT_TABLE_TYPE(T, int) co12[] = { 1, -13, 13 };
+ workspace[3] = tools::evaluate_polynomial(co12, workspace[0], 3) / (36 * s * c);
+ static const BOOST_MATH_INT_TABLE_TYPE(T, int) co13[] = { 1, 21, -69, 46 };
+ workspace[4] = tools::evaluate_polynomial(co13, workspace[0], 4) / (270 * workspace[0] * c * c);
       x = tools::evaluate_polynomial(workspace, eta, 5);
 #ifdef BOOST_INSTRUMENT
       std::cout << "Estimating x with Temme method 2 (small eta): " << x << std::endl;

Modified: sandbox/math_toolkit/boost/math/special_functions/detail/unchecked_factorial.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/unchecked_factorial.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/unchecked_factorial.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -19,7 +19,7 @@
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
 
 namespace boost { namespace math

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <math.h> // platform's ::expm1
 #include <boost/limits.hpp>
 #include <boost/math/tools/config.hpp>

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -22,7 +22,7 @@
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 
 namespace boost { namespace math
 {

Modified: sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/fpclassify.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -11,7 +11,7 @@
 #endif
 
 #include <math.h>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/limits.hpp>
 #include <boost/math/tools/real_cast.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
@@ -38,8 +38,15 @@
 #define BOOST_HAS_FPCLASSIFY
 
 #ifndef fpclassify
-# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_USE_C99_MATH) && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
-# define BOOST_FPCLASSIFY_PREFIX ::std::
+# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+ && defined(_GLIBCXX_USE_C99_MATH) \
+ && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
+ && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
+# ifdef _STLP_VENDOR_CSTD
+# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD::
+# else
+# define BOOST_FPCLASSIFY_PREFIX ::std::
+# endif
 # else
 # undef BOOST_HAS_FPCLASSIFY
 # define BOOST_FPCLASSIFY_PREFIX
@@ -243,3 +250,4 @@
 
 
 
+

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -45,7 +45,7 @@
 #include <boost/mpl/greater.hpp>
 #include <boost/mpl/equal_to.hpp>
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <algorithm>
 
 #ifdef BOOST_MATH_INSTRUMENT
@@ -253,10 +253,9 @@
    {
       // regular evaluation:
       T zgh = static_cast<T>(z + L::g() - boost::math::constants::half<T>());
- T l = L::lanczos_sum_expG_scaled(z);
       result = log(zgh) - 1;
       result *= z - 0.5f;
- result += log(l);
+ result += log(L::lanczos_sum_expG_scaled(z));
    }
 
    if(sign)

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -14,7 +14,7 @@
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/policies/error_handling.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <algorithm> // for swap
 
 #ifdef BOOST_NO_STDC_NAMESPACE

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <math.h> // platform's ::log1p
 #include <boost/limits.hpp>
 #include <boost/math/tools/config.hpp>

Modified: sandbox/math_toolkit/boost/math/special_functions/next.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/next.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/next.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -37,7 +37,11 @@
 template <class T>
 inline T get_smallest_value()
 {
- return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::has_denorm>());
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)
+ return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == 1)>());
+#else
+ return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present)>());
+#endif
 }
 
 }

Modified: sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sin_pi.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/math/tools/config.hpp>
 #include <boost/math/special_functions/trunc.hpp>
 #include <boost/math/tools/promotion.hpp>

Modified: sandbox/math_toolkit/boost/math/special_functions/sinc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sinc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sinc.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -19,7 +19,7 @@
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/policies/policy.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/limits.hpp>
 #include <string>
 #include <stdexcept>

Modified: sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sinhc.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -18,7 +18,7 @@
 #include <boost/math/tools/config.hpp>
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/limits.hpp>
 #include <string>
 #include <stdexcept>

Modified: sandbox/math_toolkit/boost/math/tools/config.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/config.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/config.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -14,7 +14,7 @@
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 #include <algorithm> // for min and max
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <climits>
 #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
 # include <math.h>
@@ -60,7 +60,7 @@
 # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
    // Better safe than sorry, our tests don't support hardware exceptions:
 # define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
 #endif

Modified: sandbox/math_toolkit/boost/math/tools/fraction.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/fraction.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/fraction.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/mpl/if.hpp>

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -12,7 +12,7 @@
 #endif
 
 #include <utility>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/math/tools/precision.hpp>
 #include <boost/math/policies/policy.hpp>
 #include <boost/cstdint.hpp>

Modified: sandbox/math_toolkit/boost/math/tools/rational.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/rational.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/rational.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -40,6 +40,128 @@
 # include BOOST_HEADER()
 # undef BOOST_HEADER
 #endif
+
+#if 0
+//
+// This just allows dependency trackers to find the headers
+// used in the above PP-magic.
+//
+#include <boost/math/tools/detail/polynomial_horner1_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_20.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_20.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_20.hpp>
+#include <boost/math/tools/detail/rational_horner1_2.hpp>
+#include <boost/math/tools/detail/rational_horner1_3.hpp>
+#include <boost/math/tools/detail/rational_horner1_4.hpp>
+#include <boost/math/tools/detail/rational_horner1_5.hpp>
+#include <boost/math/tools/detail/rational_horner1_6.hpp>
+#include <boost/math/tools/detail/rational_horner1_7.hpp>
+#include <boost/math/tools/detail/rational_horner1_8.hpp>
+#include <boost/math/tools/detail/rational_horner1_9.hpp>
+#include <boost/math/tools/detail/rational_horner1_10.hpp>
+#include <boost/math/tools/detail/rational_horner1_11.hpp>
+#include <boost/math/tools/detail/rational_horner1_12.hpp>
+#include <boost/math/tools/detail/rational_horner1_13.hpp>
+#include <boost/math/tools/detail/rational_horner1_14.hpp>
+#include <boost/math/tools/detail/rational_horner1_15.hpp>
+#include <boost/math/tools/detail/rational_horner1_16.hpp>
+#include <boost/math/tools/detail/rational_horner1_17.hpp>
+#include <boost/math/tools/detail/rational_horner1_18.hpp>
+#include <boost/math/tools/detail/rational_horner1_19.hpp>
+#include <boost/math/tools/detail/rational_horner1_20.hpp>
+#include <boost/math/tools/detail/rational_horner2_2.hpp>
+#include <boost/math/tools/detail/rational_horner2_3.hpp>
+#include <boost/math/tools/detail/rational_horner2_4.hpp>
+#include <boost/math/tools/detail/rational_horner2_5.hpp>
+#include <boost/math/tools/detail/rational_horner2_6.hpp>
+#include <boost/math/tools/detail/rational_horner2_7.hpp>
+#include <boost/math/tools/detail/rational_horner2_8.hpp>
+#include <boost/math/tools/detail/rational_horner2_9.hpp>
+#include <boost/math/tools/detail/rational_horner2_10.hpp>
+#include <boost/math/tools/detail/rational_horner2_11.hpp>
+#include <boost/math/tools/detail/rational_horner2_12.hpp>
+#include <boost/math/tools/detail/rational_horner2_13.hpp>
+#include <boost/math/tools/detail/rational_horner2_14.hpp>
+#include <boost/math/tools/detail/rational_horner2_15.hpp>
+#include <boost/math/tools/detail/rational_horner2_16.hpp>
+#include <boost/math/tools/detail/rational_horner2_17.hpp>
+#include <boost/math/tools/detail/rational_horner2_18.hpp>
+#include <boost/math/tools/detail/rational_horner2_19.hpp>
+#include <boost/math/tools/detail/rational_horner2_20.hpp>
+#include <boost/math/tools/detail/rational_horner3_2.hpp>
+#include <boost/math/tools/detail/rational_horner3_3.hpp>
+#include <boost/math/tools/detail/rational_horner3_4.hpp>
+#include <boost/math/tools/detail/rational_horner3_5.hpp>
+#include <boost/math/tools/detail/rational_horner3_6.hpp>
+#include <boost/math/tools/detail/rational_horner3_7.hpp>
+#include <boost/math/tools/detail/rational_horner3_8.hpp>
+#include <boost/math/tools/detail/rational_horner3_9.hpp>
+#include <boost/math/tools/detail/rational_horner3_10.hpp>
+#include <boost/math/tools/detail/rational_horner3_11.hpp>
+#include <boost/math/tools/detail/rational_horner3_12.hpp>
+#include <boost/math/tools/detail/rational_horner3_13.hpp>
+#include <boost/math/tools/detail/rational_horner3_14.hpp>
+#include <boost/math/tools/detail/rational_horner3_15.hpp>
+#include <boost/math/tools/detail/rational_horner3_16.hpp>
+#include <boost/math/tools/detail/rational_horner3_17.hpp>
+#include <boost/math/tools/detail/rational_horner3_18.hpp>
+#include <boost/math/tools/detail/rational_horner3_19.hpp>
+#include <boost/math/tools/detail/rational_horner3_20.hpp>
+#endif
+
 namespace boost{ namespace math{ namespace tools{
 
 //

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -11,7 +11,7 @@
 #endif
 
 #include <utility>
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <stdexcept>
 
 #include <boost/tr1/tuple.hpp>

Modified: sandbox/math_toolkit/boost/math/tools/series.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/series.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/series.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/math/tools/config.hpp>
 

Modified: sandbox/math_toolkit/boost/math/tools/stats.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/stats.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/stats.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <cmath>
+#include <boost/config/no_tr1/cmath.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/math/tools/precision.hpp>
 

Modified: sandbox/math_toolkit/boost/math/tr1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tr1.hpp (original)
+++ sandbox/math_toolkit/boost/math/tr1.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -109,259 +109,259 @@
 #endif
 
 // C99 Functions:
-double BOOST_MATH_TR1_DECL acosh(double x);
-float BOOST_MATH_TR1_DECL acoshf(float x);
-long double BOOST_MATH_TR1_DECL acoshl(long double x);
-
-double BOOST_MATH_TR1_DECL asinh(double x);
-float BOOST_MATH_TR1_DECL asinhf(float x);
-long double BOOST_MATH_TR1_DECL asinhl(long double x);
-
-double BOOST_MATH_TR1_DECL atanh(double x);
-float BOOST_MATH_TR1_DECL atanhf(float x);
-long double BOOST_MATH_TR1_DECL atanhl(long double x);
-
-double BOOST_MATH_TR1_DECL cbrt(double x);
-float BOOST_MATH_TR1_DECL cbrtf(float x);
-long double BOOST_MATH_TR1_DECL cbrtl(long double x);
-
-double BOOST_MATH_TR1_DECL copysign(double x, double y);
-float BOOST_MATH_TR1_DECL copysignf(float x, float y);
-long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL erf(double x);
-float BOOST_MATH_TR1_DECL erff(float x);
-long double BOOST_MATH_TR1_DECL erfl(long double x);
-
-double BOOST_MATH_TR1_DECL erfc(double x);
-float BOOST_MATH_TR1_DECL erfcf(float x);
-long double BOOST_MATH_TR1_DECL erfcl(long double x);
-#if 0
-double BOOST_MATH_TR1_DECL exp2(double x);
-float BOOST_MATH_TR1_DECL exp2f(float x);
-long double BOOST_MATH_TR1_DECL exp2l(long double x);
-#endif
-double BOOST_MATH_TR1_DECL boost_expm1(double x);
-float BOOST_MATH_TR1_DECL boost_expm1f(float x);
-long double BOOST_MATH_TR1_DECL boost_expm1l(long double x);
-#if 0
-double BOOST_MATH_TR1_DECL fdim(double x, double y);
-float BOOST_MATH_TR1_DECL fdimf(float x, float y);
-long double BOOST_MATH_TR1_DECL fdiml(long double x, long double y);
-double BOOST_MATH_TR1_DECL fma(double x, double y, double z);
-float BOOST_MATH_TR1_DECL fmaf(float x, float y, float z);
-long double BOOST_MATH_TR1_DECL fmal(long double x, long double y, long double z);
-#endif
-double BOOST_MATH_TR1_DECL fmax(double x, double y);
-float BOOST_MATH_TR1_DECL fmaxf(float x, float y);
-long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL fmin(double x, double y);
-float BOOST_MATH_TR1_DECL fminf(float x, float y);
-long double BOOST_MATH_TR1_DECL fminl(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL hypot(double x, double y);
-float BOOST_MATH_TR1_DECL hypotf(float x, float y);
-long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y);
-#if 0
-int BOOST_MATH_TR1_DECL ilogb(double x);
-int BOOST_MATH_TR1_DECL ilogbf(float x);
-int BOOST_MATH_TR1_DECL ilogbl(long double x);
-#endif
-double BOOST_MATH_TR1_DECL lgamma(double x);
-float BOOST_MATH_TR1_DECL lgammaf(float x);
-long double BOOST_MATH_TR1_DECL lgammal(long double x);
-#if 0
-long long BOOST_MATH_TR1_DECL llrint(double x);
-long long BOOST_MATH_TR1_DECL llrintf(float x);
-long long BOOST_MATH_TR1_DECL llrintl(long double x);
-#endif
-long long BOOST_MATH_TR1_DECL llround(double x);
-long long BOOST_MATH_TR1_DECL llroundf(float x);
-long long BOOST_MATH_TR1_DECL llroundl(long double x);
-
-double BOOST_MATH_TR1_DECL boost_log1p(double x);
-float BOOST_MATH_TR1_DECL boost_log1pf(float x);
-long double BOOST_MATH_TR1_DECL boost_log1pl(long double x);
-#if 0
-double BOOST_MATH_TR1_DECL log2(double x);
-float BOOST_MATH_TR1_DECL log2f(float x);
-long double BOOST_MATH_TR1_DECL log2l(long double x);
-
-double BOOST_MATH_TR1_DECL logb(double x);
-float BOOST_MATH_TR1_DECL logbf(float x);
-long double BOOST_MATH_TR1_DECL logbl(long double x);
-long BOOST_MATH_TR1_DECL lrint(double x);
-long BOOST_MATH_TR1_DECL lrintf(float x);
-long BOOST_MATH_TR1_DECL lrintl(long double x);
-#endif
-long BOOST_MATH_TR1_DECL lround(double x);
-long BOOST_MATH_TR1_DECL lroundf(float x);
-long BOOST_MATH_TR1_DECL lroundl(long double x);
-#if 0
-double BOOST_MATH_TR1_DECL nan(const char *str);
-float BOOST_MATH_TR1_DECL nanf(const char *str);
-long double BOOST_MATH_TR1_DECL nanl(const char *str);
-double BOOST_MATH_TR1_DECL nearbyint(double x);
-float BOOST_MATH_TR1_DECL nearbyintf(float x);
-long double BOOST_MATH_TR1_DECL nearbyintl(long double x);
-#endif
-double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y);
-float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y);
-long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL nexttoward(double x, long double y);
-float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y);
-long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y);
-#if 0
-double BOOST_MATH_TR1_DECL remainder(double x, double y);
-float BOOST_MATH_TR1_DECL remainderf(float x, float y);
-long double BOOST_MATH_TR1_DECL remainderl(long double x, long double y);
-double BOOST_MATH_TR1_DECL remquo(double x, double y, int *pquo);
-float BOOST_MATH_TR1_DECL remquof(float x, float y, int *pquo);
-long double BOOST_MATH_TR1_DECL remquol(long double x, long double y, int *pquo);
-double BOOST_MATH_TR1_DECL rint(double x);
-float BOOST_MATH_TR1_DECL rintf(float x);
-long double BOOST_MATH_TR1_DECL rintl(long double x);
-#endif
-double BOOST_MATH_TR1_DECL round(double x);
-float BOOST_MATH_TR1_DECL roundf(float x);
-long double BOOST_MATH_TR1_DECL roundl(long double x);
-#if 0
-double BOOST_MATH_TR1_DECL scalbln(double x, long ex);
-float BOOST_MATH_TR1_DECL scalblnf(float x, long ex);
-long double BOOST_MATH_TR1_DECL scalblnl(long double x, long ex);
-double BOOST_MATH_TR1_DECL scalbn(double x, int ex);
-float BOOST_MATH_TR1_DECL scalbnf(float x, int ex);
-long double BOOST_MATH_TR1_DECL scalbnl(long double x, int ex);
-#endif
-double BOOST_MATH_TR1_DECL tgamma(double x);
-float BOOST_MATH_TR1_DECL tgammaf(float x);
-long double BOOST_MATH_TR1_DECL tgammal(long double x);
-
-double BOOST_MATH_TR1_DECL trunc(double x);
-float BOOST_MATH_TR1_DECL truncf(float x);
-long double BOOST_MATH_TR1_DECL truncl(long double x);
+double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+
+double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+double BOOST_MATH_TR1_DECL exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+double BOOST_MATH_TR1_DECL fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z);
+float BOOST_MATH_TR1_DECL fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z);
+long double BOOST_MATH_TR1_DECL fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z);
+#endif
+double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+
+double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+
+double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+#if 0
+int BOOST_MATH_TR1_DECL ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+int BOOST_MATH_TR1_DECL ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+int BOOST_MATH_TR1_DECL ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+long long BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long long BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long long BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+double BOOST_MATH_TR1_DECL log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+long BOOST_MATH_TR1_DECL lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long BOOST_MATH_TR1_DECL lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long BOOST_MATH_TR1_DECL lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+double BOOST_MATH_TR1_DECL nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+float BOOST_MATH_TR1_DECL nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+long double BOOST_MATH_TR1_DECL nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+double BOOST_MATH_TR1_DECL nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+
+double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y);
+float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y);
+long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+#if 0
+double BOOST_MATH_TR1_DECL remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo);
+float BOOST_MATH_TR1_DECL remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo);
+long double BOOST_MATH_TR1_DECL remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo);
+double BOOST_MATH_TR1_DECL rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#if 0
+double BOOST_MATH_TR1_DECL scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex);
+float BOOST_MATH_TR1_DECL scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex);
+long double BOOST_MATH_TR1_DECL scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex);
+double BOOST_MATH_TR1_DECL scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex);
+float BOOST_MATH_TR1_DECL scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex);
+long double BOOST_MATH_TR1_DECL scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex);
+#endif
+double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
 
 // [5.2.1.1] associated Laguerre polynomials:
-double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x);
-float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x);
-long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x);
+double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x);
+float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x);
+long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x);
 
 // [5.2.1.2] associated Legendre functions:
-double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x);
-float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x);
-long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x);
+double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x);
+float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x);
+long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x);
 
 // [5.2.1.3] beta function:
-double BOOST_MATH_TR1_DECL beta(double x, double y);
-float BOOST_MATH_TR1_DECL betaf(float x, float y);
-long double BOOST_MATH_TR1_DECL betal(long double x, long double y);
+double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
 
 // [5.2.1.4] (complete) elliptic integral of the first kind:
-double BOOST_MATH_TR1_DECL comp_ellint_1(double k);
-float BOOST_MATH_TR1_DECL comp_ellint_1f(float k);
-long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double k);
+double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k);
+float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k);
+long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k);
 
 // [5.2.1.5] (complete) elliptic integral of the second kind:
-double BOOST_MATH_TR1_DECL comp_ellint_2(double k);
-float BOOST_MATH_TR1_DECL comp_ellint_2f(float k);
-long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double k);
+double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k);
+float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k);
+long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k);
 
 // [5.2.1.6] (complete) elliptic integral of the third kind:
-double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu);
-float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu);
-long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu);
+double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu);
+float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu);
+long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu);
 #if 0
 // [5.2.1.7] confluent hypergeometric functions:
-double BOOST_MATH_TR1_DECL conf_hyperg(double a, double c, double x);
-float BOOST_MATH_TR1_DECL conf_hypergf(float a, float c, float x);
-long double BOOST_MATH_TR1_DECL conf_hypergl(long double a, long double c, long double x);
+double BOOST_MATH_TR1_DECL conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x);
+float BOOST_MATH_TR1_DECL conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x);
+long double BOOST_MATH_TR1_DECL conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x);
 #endif
 // [5.2.1.8] regular modified cylindrical Bessel functions:
-double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
+float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
+long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
 
 // [5.2.1.9] cylindrical Bessel functions (of the first kind):
-double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
+float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
+long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
 
 // [5.2.1.10] irregular modified cylindrical Bessel functions:
-double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
+float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
+long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
 
 // [5.2.1.11] cylindrical Neumann functions;
 // cylindrical Bessel functions (of the second kind):
-double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
+float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
+long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
 
 // [5.2.1.12] (incomplete) elliptic integral of the first kind:
-double BOOST_MATH_TR1_DECL ellint_1(double k, double phi);
-float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi);
-long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi);
+double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi);
+float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi);
+long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi);
 
 // [5.2.1.13] (incomplete) elliptic integral of the second kind:
-double BOOST_MATH_TR1_DECL ellint_2(double k, double phi);
-float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi);
-long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi);
+double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi);
+float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi);
+long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi);
 
 // [5.2.1.14] (incomplete) elliptic integral of the third kind:
-double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi);
-float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi);
-long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi);
+double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi);
+float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi);
+long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi);
 
 // [5.2.1.15] exponential integral:
-double BOOST_MATH_TR1_DECL expint(double x);
-float BOOST_MATH_TR1_DECL expintf(float x);
-long double BOOST_MATH_TR1_DECL expintl(long double x);
+double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
 
 // [5.2.1.16] Hermite polynomials:
-double BOOST_MATH_TR1_DECL hermite(unsigned n, double x);
-float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
+float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
+long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
 
 #if 0
 // [5.2.1.17] hypergeometric functions:
-double BOOST_MATH_TR1_DECL hyperg(double a, double b, double c, double x);
-float BOOST_MATH_TR1_DECL hypergf(float a, float b, float c, float x);
-long double BOOST_MATH_TR1_DECL hypergl(long double a, long double b, long double c,
+double BOOST_MATH_TR1_DECL hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x);
+float BOOST_MATH_TR1_DECL hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x);
+long double BOOST_MATH_TR1_DECL hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c,
 long double x);
 #endif
 
 // [5.2.1.18] Laguerre polynomials:
-double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x);
-float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
+float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
+long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
 
 // [5.2.1.19] Legendre polynomials:
-double BOOST_MATH_TR1_DECL legendre(unsigned l, double x);
-float BOOST_MATH_TR1_DECL legendref(unsigned l, float x);
-long double BOOST_MATH_TR1_DECL legendrel(unsigned l, long double x);
+double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, double x);
+float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x);
+long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x);
 
 // [5.2.1.20] Riemann zeta function:
-double BOOST_MATH_TR1_DECL riemann_zeta(double);
-float BOOST_MATH_TR1_DECL riemann_zetaf(float);
-long double BOOST_MATH_TR1_DECL riemann_zetal(long double);
+double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double);
+float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float);
+long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double);
 
 // [5.2.1.21] spherical Bessel functions (of the first kind):
-double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x);
-float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
+float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
+long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
 
 // [5.2.1.22] spherical associated Legendre functions:
-double BOOST_MATH_TR1_DECL sph_legendre(unsigned l, unsigned m, double theta);
-float BOOST_MATH_TR1_DECL sph_legendref(unsigned l, unsigned m, float theta);
-long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned l, unsigned m, long double theta);
+double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double theta);
+float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta);
+long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta);
 
 // [5.2.1.23] spherical Neumann functions;
 // spherical Bessel functions (of the second kind):
-double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x);
-float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
+float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
+long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
 
 #ifdef __cplusplus
 
@@ -375,233 +375,233 @@
 // C interfaces:
 //
 // C99 Functions:
-inline float acosh(float x)
-{ return boost::math::tr1::acoshf(x); }
-inline long double acosh(long double x)
-{ return boost::math::tr1::acoshl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type acosh(T x)
-{ return boost::math::tr1::acosh(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float asinh(float x){ return boost::math::tr1::asinhf(x); }
-inline long double asinh(long double x){ return boost::math::tr1::asinhl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type asinh(T x)
-{ return boost::math::tr1::asinh(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float atanh(float x){ return boost::math::tr1::atanhf(x); }
-inline long double atanh(long double x){ return boost::math::tr1::atanhl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type atanh(T x)
-{ return boost::math::tr1::atanh(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float cbrt(float x)
-{ return boost::math::tr1::cbrtf(x); }
-inline long double cbrt(long double x)
-{ return boost::math::tr1::cbrtl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type cbrt(T x)
-{ return boost::math::tr1::cbrt(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float copysign(float x, float y)
-{ return boost::math::tr1::copysignf(x, y); }
-inline long double copysign(long double x, long double y)
-{ return boost::math::tr1::copysignl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type copysign(T1 x, T2 y)
-{ return boost::math::tr1::copysign(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
-
-inline float erf(float x)
-{ return boost::math::tr1::erff(x); }
-inline long double erf(long double x)
-{ return boost::math::tr1::erfl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type erf(T x)
-{ return boost::math::tr1::erf(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float erfc(float x)
-{ return boost::math::tr1::erfcf(x); }
-inline long double erfc(long double x)
-{ return boost::math::tr1::erfcl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type erfc(T x)
-{ return boost::math::tr1::erfc(static_cast<typename tools::promote_args<T>::type>(x)); }
-#if 0
-double exp2(double x);
-float exp2f(float x);
-long double exp2l(long double x);
-#endif
-inline float expm1f(float x)
-{ return boost::math::tr1::boost_expm1f(x); }
-inline double expm1(double x)
-{ return boost::math::tr1::boost_expm1(x); }
-inline long double expm1l(long double x)
-{ return boost::math::tr1::boost_expm1l(x); }
-inline float expm1(float x)
-{ return boost::math::tr1::expm1f(x); }
-inline long double expm1(long double x)
-{ return boost::math::tr1::expm1l(x); }
-template <class T>
-inline typename tools::promote_args<T>::type expm1(T x)
-{ return boost::math::tr1::expm1(static_cast<typename tools::promote_args<T>::type>(x)); }
-#if 0
-double fdim(double x, double y);
-float fdimf(float x, float y);
-long double fdiml(long double x, long double y);
-double fma(double x, double y, double z);
-float fmaf(float x, float y, float z);
-long double fmal(long double x, long double y, long double z);
-#endif
-inline float fmax(float x, float y)
-{ return boost::math::tr1::fmaxf(x, y); }
-inline long double fmax(long double x, long double y)
-{ return boost::math::tr1::fmaxl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type fmax(T1 x, T2 y)
-{ return boost::math::tr1::fmax(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
-
-inline float fmin(float x, float y)
-{ return boost::math::tr1::fminf(x, y); }
-inline long double fmin(long double x, long double y)
-{ return boost::math::tr1::fminl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type fmin(T1 x, T2 y)
-{ return boost::math::tr1::fmin(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
-
-inline float hypot(float x, float y)
-{ return boost::math::tr1::hypotf(x, y); }
-inline long double hypot(long double x, long double y)
-{ return boost::math::tr1::hypotl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type hypot(T1 x, T2 y)
-{ return boost::math::tr1::hypot(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
-#if 0
-int ilogb(double x);
-int ilogbf(float x);
-int ilogbl(long double x);
-#endif
-inline float lgamma(float x)
-{ return boost::math::tr1::lgammaf(x); }
-inline long double lgamma(long double x)
-{ return boost::math::tr1::lgammal(x); }
-template <class T>
-inline typename tools::promote_args<T>::type lgamma(T x)
-{ return boost::math::tr1::lgamma(static_cast<typename tools::promote_args<T>::type>(x)); }
-#if 0
-long long llrint(double x);
-long long llrintf(float x);
-long long llrintl(long double x);
-#endif
-inline long long llround(float x)
-{ return boost::math::tr1::llroundf(x); }
-inline long long llround(long double x)
-{ return boost::math::tr1::llroundl(x); }
-template <class T>
-inline long long llround(T x)
-{ return llround(static_cast<double>(x)); }
-
-inline float log1pf(float x)
-{ return boost::math::tr1::boost_log1pf(x); }
-inline double log1p(double x)
-{ return boost::math::tr1::boost_log1p(x); }
-inline long double log1pl(long double x)
-{ return boost::math::tr1::boost_log1pl(x); }
-inline float log1p(float x)
-{ return boost::math::tr1::log1pf(x); }
-inline long double log1p(long double x)
-{ return boost::math::tr1::log1pl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type log1p(T x)
-{ return boost::math::tr1::log1p(static_cast<typename tools::promote_args<T>::type>(x)); }
-#if 0
-double log2(double x);
-float log2f(float x);
-long double log2l(long double x);
-
-double logb(double x);
-float logbf(float x);
-long double logbl(long double x);
-long lrint(double x);
-long lrintf(float x);
-long lrintl(long double x);
-#endif
-inline long lround(float x)
-{ return boost::math::tr1::lroundf(x); }
-inline long lround(long double x)
-{ return boost::math::tr1::lroundl(x); }
-template <class T>
-long lround(T x)
-{ return boost::math::tr1::lround(static_cast<double>(x)); }
-#if 0
-double nan(const char *str);
-float nanf(const char *str);
-long double nanl(const char *str);
-double nearbyint(double x);
-float nearbyintf(float x);
-long double nearbyintl(long double x);
-#endif
-inline float nextafterf(float x, float y)
-{ return boost::math::tr1::boost_nextafterf(x, y); }
-inline double nextafter(double x, double y)
-{ return boost::math::tr1::boost_nextafter(x, y); }
-inline long double nextafterl(long double x, long double y)
-{ return boost::math::tr1::boost_nextafterl(x, y); }
-inline float nextafter(float x, float y)
-{ return boost::math::tr1::nextafterf(x, y); }
-inline long double nextafter(long double x, long double y)
-{ return boost::math::tr1::nextafterl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type nextafter(T1 x, T2 y)
-{ return boost::math::tr1::nextafter(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
-
-inline float nexttoward(float x, long double y)
-{ return boost::math::tr1::nexttowardf(x, y); }
-inline long double nexttoward(long double x, long double y)
-{ return boost::math::tr1::nexttowardl(x, y); }
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type nexttoward(T1 x, T2 y)
-{ return boost::math::tr1::nexttoward(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<long double>(y)); }
-#if 0
-double remainder(double x, double y);
-float remainderf(float x, float y);
-long double remainderl(long double x, long double y);
-double remquo(double x, double y, int *pquo);
-float remquof(float x, float y, int *pquo);
-long double remquol(long double x, long double y, int *pquo);
-double rint(double x);
-float rintf(float x);
-long double rintl(long double x);
-#endif
-inline float round(float x)
-{ return boost::math::tr1::roundf(x); }
-inline long double round(long double x)
-{ return boost::math::tr1::roundl(x); }
-template <class T>
-inline typename tools::promote_args<T>::type round(T x)
-{ return boost::math::tr1::round(static_cast<typename tools::promote_args<T>::type>(x)); }
-#if 0
-double scalbln(double x, long ex);
-float scalblnf(float x, long ex);
-long double scalblnl(long double x, long ex);
-double scalbn(double x, int ex);
-float scalbnf(float x, int ex);
-long double scalbnl(long double x, int ex);
-#endif
-inline float tgamma(float x)
-{ return boost::math::tr1::tgammaf(x); }
-inline long double tgamma(long double x)
-{ return boost::math::tr1::tgammal(x); }
-template <class T>
-inline typename tools::promote_args<T>::type tgamma(T x)
-{ return boost::math::tr1::tgamma(static_cast<typename tools::promote_args<T>::type>(x)); }
-
-inline float trunc(float x)
-{ return boost::math::tr1::truncf(x); }
-inline long double trunc(long double x)
-{ return boost::math::tr1::truncl(x); }
+inline float acosh BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double acosh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type acosh BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float asinh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double asinh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type asinh BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float atanh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double atanh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::atanhl(x); }
+template <class T>
+inline typename tools::promote_args<T>::type atanh BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float copysign BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double copysign BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type copysign BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+
+inline float erf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::erff BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double erf BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::erfl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type erf BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::erf BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float erfc BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double erfc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type erfc BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#if 0
+double exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline float expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
+{ return boost::math::tr1::boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline float expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#if 0
+double fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z);
+float fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z);
+long double fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z);
+#endif
+inline float fmax BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double fmax BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type fmax BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::fmax BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+
+inline float fmin BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::fminf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double fmin BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::fminl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type fmin BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::fmin BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+
+inline float hypot BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double hypot BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type hypot BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+#if 0
+int ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+int ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+int ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline float lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#if 0
+long long llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long long llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long long llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return llround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<double>(x)); }
+
+inline float log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
+{ return boost::math::tr1::boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline float log1p BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type log1p BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#if 0
+double log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+
+double logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+long lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+long lround BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::lround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<double>(x)); }
+#if 0
+double nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+float nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+long double nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
+double nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline float nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
+{ return boost::math::tr1::boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline float nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+
+inline float nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y)
+{ return boost::math::tr1::nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
+{ return boost::math::tr1::nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<long double>(y)); }
+#if 0
+double remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
+float remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
+long double remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo);
+float remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo);
+long double remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo);
+double rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
+float rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
+long double rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+#endif
+inline float round BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::roundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double round BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::roundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type round BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::round BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+#if 0
+double scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex);
+float scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex);
+long double scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex);
+double scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex);
+float scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex);
+long double scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex);
+#endif
+inline float tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+template <class T>
+inline typename tools::promote_args<T>::type tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
+
+inline float trunc BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::truncf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double trunc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::truncl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
 template <class T>
-inline typename tools::promote_args<T>::type trunc(T x)
-{ return boost::math::tr1::trunc(static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type trunc BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
 
 # define NO_MACRO_EXPAND /**/
 // C99 macros defined as C++ templates
@@ -644,210 +644,210 @@
 #undef NO_MACRO_EXPAND
    
 // [5.2.1.1] associated Laguerre polynomials:
-inline float assoc_laguerre(unsigned n, unsigned m, float x)
-{ return boost::math::tr1::assoc_laguerref(n, m, x); }
-inline long double assoc_laguerre(unsigned n, unsigned m, long double x)
-{ return boost::math::tr1::assoc_laguerrel(n, m, x); }
+inline float assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x)
+{ return boost::math::tr1::assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); }
+inline long double assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x)
+{ return boost::math::tr1::assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); }
 template <class T>
-inline typename tools::promote_args<T>::type assoc_laguerre(unsigned n, unsigned m, T x)
-{ return boost::math::tr1::assoc_laguerre(n, m, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, T x)
+{ return boost::math::tr1::assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.2] associated Legendre functions:
-inline float assoc_legendre(unsigned l, unsigned m, float x)
-{ return boost::math::tr1::assoc_legendref(l, m, x); }
-inline long double assoc_legendre(unsigned l, unsigned m, long double x)
-{ return boost::math::tr1::assoc_legendrel(l, m, x); }
+inline float assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x)
+{ return boost::math::tr1::assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); }
+inline long double assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x)
+{ return boost::math::tr1::assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); }
 template <class T>
-inline typename tools::promote_args<T>::type assoc_legendre(unsigned l, unsigned m, T x)
-{ return boost::math::tr1::assoc_legendre(l, m, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T x)
+{ return boost::math::tr1::assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.3] beta function:
-inline float beta(float x, float y)
-{ return boost::math::tr1::betaf(x, y); }
-inline long double beta(long double x, long double y)
-{ return boost::math::tr1::betal(x, y); }
+inline float beta BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
+{ return boost::math::tr1::betaf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
+inline long double beta BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
+{ return boost::math::tr1::betal BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type beta(T2 x, T1 y)
-{ return boost::math::tr1::beta(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
+inline typename tools::promote_args<T1, T2>::type beta BOOST_PREVENT_MACRO_SUBSTITUTION(T2 x, T1 y)
+{ return boost::math::tr1::beta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<typename tools::promote_args<T1, T2>::type>(y)); }
 
 // [5.2.1.4] (complete) elliptic integral of the first kind:
-inline float comp_ellint_1(float k)
-{ return boost::math::tr1::comp_ellint_1f(k); }
-inline long double comp_ellint_1(long double k)
-{ return boost::math::tr1::comp_ellint_1l(k); }
+inline float comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k)
+{ return boost::math::tr1::comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k); }
+inline long double comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k)
+{ return boost::math::tr1::comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k); }
 template <class T>
-inline typename tools::promote_args<T>::type comp_ellint_1(T k)
-{ return boost::math::tr1::comp_ellint_1(static_cast<typename tools::promote_args<T>::type>(k)); }
+inline typename tools::promote_args<T>::type comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T k)
+{ return boost::math::tr1::comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(k)); }
 
-// [5.2.1.5] (complete) elliptic integral of the second kind:
+// [5.2.1.5] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the second kind:
 inline float comp_ellint_2(float k)
 { return boost::math::tr1::comp_ellint_2f(k); }
 inline long double comp_ellint_2(long double k)
 { return boost::math::tr1::comp_ellint_2l(k); }
 template <class T>
 inline typename tools::promote_args<T>::type comp_ellint_2(T k)
-{ return boost::math::tr1::comp_ellint_2(static_cast<typename tools::promote_args<T>::type>(k)); }
+{ return boost::math::tr1::comp_ellint_2(static_cast<typename tools::promote_args<T>::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k)); }
 
-// [5.2.1.6] (complete) elliptic integral of the third kind:
+// [5.2.1.6] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the third kind:
 inline float comp_ellint_3(float k, float nu)
 { return boost::math::tr1::comp_ellint_3f(k, nu); }
 inline long double comp_ellint_3(long double k, long double nu)
 { return boost::math::tr1::comp_ellint_3l(k, nu); }
 template <class T1, class T2>
 inline typename tools::promote_args<T1, T2>::type comp_ellint_3(T1 k, T2 nu)
-{ return boost::math::tr1::comp_ellint_3(static_cast<typename tools::promote_args<T1, T2>::type>(k), static_cast<typename tools::promote_args<T1, T2>::type>(nu)); }
+{ return boost::math::tr1::comp_ellint_3(static_cast<typename tools::promote_args<T1, T2>::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k), static_cast<typename tools::promote_args<T1, T2>::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu)); }
 
 #if 0
 // [5.2.1.7] confluent hypergeometric functions:
-double conf_hyperg(double a, double c, double x);
-float conf_hypergf(float a, float c, float x);
-long double conf_hypergl(long double a, long double c, long double x);
+double conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x);
+float conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x);
+long double conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x);
 #endif
 
 // [5.2.1.8] regular modified cylindrical Bessel functions:
-inline float cyl_bessel_i(float nu, float x)
-{ return boost::math::tr1::cyl_bessel_if(nu, x); }
-inline long double cyl_bessel_i(long double nu, long double x)
-{ return boost::math::tr1::cyl_bessel_il(nu, x); }
+inline float cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
+{ return boost::math::tr1::cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
+inline long double cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
+{ return boost::math::tr1::cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type cyl_bessel_i(T1 nu, T2 x)
-{ return boost::math::tr1::cyl_bessel_i(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
+inline typename tools::promote_args<T1, T2>::type cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x)
+{ return boost::math::tr1::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
 
 // [5.2.1.9] cylindrical Bessel functions (of the first kind):
-inline float cyl_bessel_j(float nu, float x)
-{ return boost::math::tr1::cyl_bessel_jf(nu, x); }
-inline long double cyl_bessel_j(long double nu, long double x)
-{ return boost::math::tr1::cyl_bessel_jl(nu, x); }
+inline float cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
+{ return boost::math::tr1::cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
+inline long double cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
+{ return boost::math::tr1::cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type cyl_bessel_j(T1 nu, T2 x)
-{ return boost::math::tr1::cyl_bessel_j(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
+inline typename tools::promote_args<T1, T2>::type cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x)
+{ return boost::math::tr1::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
 
 // [5.2.1.10] irregular modified cylindrical Bessel functions:
-inline float cyl_bessel_k(float nu, float x)
-{ return boost::math::tr1::cyl_bessel_kf(nu, x); }
-inline long double cyl_bessel_k(long double nu, long double x)
-{ return boost::math::tr1::cyl_bessel_kl(nu, x); }
+inline float cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
+{ return boost::math::tr1::cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
+inline long double cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
+{ return boost::math::tr1::cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type cyl_bessel_k(T1 nu, T2 x)
-{ return boost::math::tr1::cyl_bessel_k(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
+inline typename tools::promote_args<T1, T2>::type cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x)
+{ return boost::math::tr1::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
 
 // [5.2.1.11] cylindrical Neumann functions;
 // cylindrical Bessel functions (of the second kind):
-inline float cyl_neumann(float nu, float x)
-{ return boost::math::tr1::cyl_neumannf(nu, x); }
-inline long double cyl_neumann(long double nu, long double x)
-{ return boost::math::tr1::cyl_neumannl(nu, x); }
+inline float cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
+{ return boost::math::tr1::cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
+inline long double cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
+{ return boost::math::tr1::cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type cyl_neumann(T1 nu, T2 x)
-{ return boost::math::tr1::cyl_neumann(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
+inline typename tools::promote_args<T1, T2>::type cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x)
+{ return boost::math::tr1::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(nu), static_cast<typename tools::promote_args<T1, T2>::type>(x)); }
 
 // [5.2.1.12] (incomplete) elliptic integral of the first kind:
-inline float ellint_1(float k, float phi)
-{ return boost::math::tr1::ellint_1f(k, phi); }
-inline long double ellint_1(long double k, long double phi)
-{ return boost::math::tr1::ellint_1l(k, phi); }
+inline float ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi)
+{ return boost::math::tr1::ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); }
+inline long double ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi)
+{ return boost::math::tr1::ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi)
-{ return boost::math::tr1::ellint_1(static_cast<typename tools::promote_args<T1, T2>::type>(k), static_cast<typename tools::promote_args<T1, T2>::type>(phi)); }
+inline typename tools::promote_args<T1, T2>::type ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi)
+{ return boost::math::tr1::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(k), static_cast<typename tools::promote_args<T1, T2>::type>(phi)); }
 
 // [5.2.1.13] (incomplete) elliptic integral of the second kind:
-inline float ellint_2(float k, float phi)
-{ return boost::math::tr1::ellint_2f(k, phi); }
-inline long double ellint_2(long double k, long double phi)
-{ return boost::math::tr1::ellint_2l(k, phi); }
+inline float ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi)
+{ return boost::math::tr1::ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); }
+inline long double ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi)
+{ return boost::math::tr1::ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); }
 template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi)
-{ return boost::math::tr1::ellint_2(static_cast<typename tools::promote_args<T1, T2>::type>(k), static_cast<typename tools::promote_args<T1, T2>::type>(phi)); }
+inline typename tools::promote_args<T1, T2>::type ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi)
+{ return boost::math::tr1::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(k), static_cast<typename tools::promote_args<T1, T2>::type>(phi)); }
 
 // [5.2.1.14] (incomplete) elliptic integral of the third kind:
-inline float ellint_3(float k, float nu, float phi)
-{ return boost::math::tr1::ellint_3f(k, nu, phi); }
-inline long double ellint_3(long double k, long double nu, long double phi)
-{ return boost::math::tr1::ellint_3l(k, nu, phi); }
+inline float ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi)
+{ return boost::math::tr1::ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); }
+inline long double ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi)
+{ return boost::math::tr1::ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); }
 template <class T1, class T2, class T3>
-inline typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 nu, T3 phi)
-{ return boost::math::tr1::ellint_3(static_cast<typename tools::promote_args<T1, T2, T3>::type>(k), static_cast<typename tools::promote_args<T1, T2, T3>::type>(nu), static_cast<typename tools::promote_args<T1, T2, T3>::type>(phi)); }
+inline typename tools::promote_args<T1, T2, T3>::type ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 nu, T3 phi)
+{ return boost::math::tr1::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2, T3>::type>(k), static_cast<typename tools::promote_args<T1, T2, T3>::type>(nu), static_cast<typename tools::promote_args<T1, T2, T3>::type>(phi)); }
 
 // [5.2.1.15] exponential integral:
-inline float expint(float x)
-{ return boost::math::tr1::expintf(x); }
-inline long double expint(long double x)
-{ return boost::math::tr1::expintl(x); }
+inline float expint BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
+{ return boost::math::tr1::expintf BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
+inline long double expint BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
+{ return boost::math::tr1::expintl BOOST_PREVENT_MACRO_SUBSTITUTION(x); }
 template <class T>
-inline typename tools::promote_args<T>::type expint(T x)
-{ return boost::math::tr1::expint(static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type expint BOOST_PREVENT_MACRO_SUBSTITUTION(T x)
+{ return boost::math::tr1::expint BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.16] Hermite polynomials:
-inline float hermite(unsigned n, float x)
-{ return boost::math::tr1::hermitef(n, x); }
-inline long double hermite(unsigned n, long double x)
-{ return boost::math::tr1::hermitel(n, x); }
+inline float hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
+{ return boost::math::tr1::hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
+inline long double hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
+{ return boost::math::tr1::hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
 template <class T>
-inline typename tools::promote_args<T>::type hermite(unsigned n, T x)
-{ return boost::math::tr1::hermite(n, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x)
+{ return boost::math::tr1::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 #if 0
 // [5.2.1.17] hypergeometric functions:
-double hyperg(double a, double b, double c, double x);
-float hypergf(float a, float b, float c, float x);
-long double hypergl(long double a, long double b, long double c,
+double hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x);
+float hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x);
+long double hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c,
 long double x);
 #endif
 
 // [5.2.1.18] Laguerre polynomials:
-inline float laguerre(unsigned n, float x)
-{ return boost::math::tr1::laguerref(n, x); }
-inline long double laguerre(unsigned n, long double x)
-{ return boost::math::tr1::laguerrel(n, x); }
+inline float laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
+{ return boost::math::tr1::laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
+inline long double laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
+{ return boost::math::tr1::laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
 template <class T>
-inline typename tools::promote_args<T>::type laguerre(unsigned n, T x)
-{ return boost::math::tr1::laguerre(n, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x)
+{ return boost::math::tr1::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.19] Legendre polynomials:
-inline float legendre(unsigned l, float x)
-{ return boost::math::tr1::legendref(l, x); }
-inline long double legendre(unsigned l, long double x)
-{ return boost::math::tr1::legendrel(l, x); }
+inline float legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x)
+{ return boost::math::tr1::legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); }
+inline long double legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x)
+{ return boost::math::tr1::legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); }
 template <class T>
-inline typename tools::promote_args<T>::type legendre(unsigned l, T x)
-{ return boost::math::tr1::legendre(l, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, T x)
+{ return boost::math::tr1::legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.20] Riemann zeta function:
-inline float riemann_zeta(float z)
-{ return boost::math::tr1::riemann_zetaf(z); }
-inline long double riemann_zeta(long double z)
-{ return boost::math::tr1::riemann_zetal(z); }
+inline float riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(float z)
+{ return boost::math::tr1::riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(z); }
+inline long double riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(long double z)
+{ return boost::math::tr1::riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(z); }
 template <class T>
-inline typename tools::promote_args<T>::type riemann_zeta(T z)
-{ return boost::math::tr1::riemann_zeta(static_cast<typename tools::promote_args<T>::type>(z)); }
+inline typename tools::promote_args<T>::type riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(T z)
+{ return boost::math::tr1::riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T>::type>(z)); }
 
 // [5.2.1.21] spherical Bessel functions (of the first kind):
-inline float sph_bessel(unsigned n, float x)
-{ return boost::math::tr1::sph_besself(n, x); }
-inline long double sph_bessel(unsigned n, long double x)
-{ return boost::math::tr1::sph_bessell(n, x); }
+inline float sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
+{ return boost::math::tr1::sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
+inline long double sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
+{ return boost::math::tr1::sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
 template <class T>
-inline typename tools::promote_args<T>::type sph_bessel(unsigned n, T x)
-{ return boost::math::tr1::sph_bessel(n, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x)
+{ return boost::math::tr1::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 // [5.2.1.22] spherical associated Legendre functions:
-inline float sph_legendre(unsigned l, unsigned m, float theta)
-{ return boost::math::tr1::sph_legendref(l, m, theta); }
-inline long double sph_legendre(unsigned l, unsigned m, long double theta)
-{ return boost::math::tr1::sph_legendrel(l, m, theta); }
+inline float sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta)
+{ return boost::math::tr1::sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); }
+inline long double sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta)
+{ return boost::math::tr1::sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); }
 template <class T>
-inline typename tools::promote_args<T>::type sph_legendre(unsigned l, unsigned m, T theta)
-{ return boost::math::tr1::sph_legendre(l, m, static_cast<typename tools::promote_args<T>::type>(theta)); }
+inline typename tools::promote_args<T>::type sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T theta)
+{ return boost::math::tr1::sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast<typename tools::promote_args<T>::type>(theta)); }
 
 // [5.2.1.23] spherical Neumann functions;
 // spherical Bessel functions (of the second kind):
-inline float sph_neumann(unsigned n, float x)
-{ return boost::math::tr1::sph_neumannf(n, x); }
-inline long double sph_neumann(unsigned n, long double x)
-{ return boost::math::tr1::sph_neumannl(n, x); }
+inline float sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
+{ return boost::math::tr1::sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
+inline long double sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
+{ return boost::math::tr1::sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); }
 template <class T>
-inline typename tools::promote_args<T>::type sph_neumann(unsigned n, T x)
-{ return boost::math::tr1::sph_neumann(n, static_cast<typename tools::promote_args<T>::type>(x)); }
+inline typename tools::promote_args<T>::type sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x)
+{ return boost::math::tr1::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast<typename tools::promote_args<T>::type>(x)); }
 
 }}} // namespaces
 

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -420,6 +420,7 @@
 [include internals_overview.qbk]
 
 [section:internals1 Reused Utilities]
+[include constants.qbk]
 [include series.qbk]
 [include fraction.qbk]
 [include rational.qbk]

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -75,7 +75,7 @@
 
 SVN Revisions:
 
-Sandbox and trunk last synchonised at revision: 47084.
+Sandbox and trunk last synchonised at revision: 48300.
 
 ]
 [/

Modified: sandbox/math_toolkit/libs/math/src/tr1/acosh.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/acosh.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/acosh.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/acosh.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL acosh(double x)
+extern "C" double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::acosh(x);
+ return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/acoshf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/acoshf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/acoshf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/acosh.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL acoshf(float x)
+extern "C" float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::acosh(x);
+ return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/acoshl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/acoshl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/acoshl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/acosh.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL acoshl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::acosh(x);
+ return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/asinh.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/asinh.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/asinh.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/asinh.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL asinh(double x)
+extern "C" double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::asinh(x);
+ return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/asinhf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/asinhf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/asinhf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/asinh.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL asinhf(float x)
+extern "C" float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::asinh(x);
+ return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/asinhl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/asinhl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/asinhl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/asinh.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL asinhl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::asinh(x);
+ return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerre.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerre.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x)
+extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x)
 {
- return c_policies::laguerre(n, m, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerref.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerref.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerref.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x)
+extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x)
 {
- return c_policies::laguerre(n, m, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerrel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerrel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_laguerrel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x)
 {
- return c_policies::laguerre(n, m, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_legendre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_legendre.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_legendre.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x)
+extern "C" double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x)
 {
- return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x);
+ return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_legendref.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_legendref.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_legendref.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x)
+extern "C" float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x)
 {
- return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x);
+ return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/assoc_legendrel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/assoc_legendrel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/assoc_legendrel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x)
 {
- return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x);
+ return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/atanh.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/atanh.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/atanh.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/atanh.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL atanh(double x)
+extern "C" double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::atanh(x);
+ return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/atanhf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/atanhf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/atanhf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/atanh.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL atanhf(float x)
+extern "C" float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::atanh(x);
+ return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/atanhl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/atanhl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/atanhl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/atanh.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL atanhl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::atanh(x);
+ return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/beta.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/beta.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL beta(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
- return c_policies::beta(x, y);
+ return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/betaf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/betaf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/betaf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/beta.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL betaf(float x, float y)
+extern "C" float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
- return c_policies::beta(x, y);
+ return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/betal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/betal.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/betal.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/beta.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL betal(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
- return c_policies::beta(x, y);
+ return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/c_policy.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/c_policy.hpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/c_policy.hpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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/policies/policy.hpp>

Modified: sandbox/math_toolkit/libs/math/src/tr1/cbrt.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cbrt.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cbrt.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/cbrt.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL cbrt(double x)
+extern "C" double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::cbrt(x);
+ return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cbrtf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cbrtf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cbrtf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/cbrt.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL cbrtf(float x)
+extern "C" float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::cbrt(x);
+ return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cbrtl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cbrtl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cbrtl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/cbrt.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL cbrtl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::cbrt(x);
+ return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1(double x)
+extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::ellint_1(x);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f(float x)
+extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::ellint_1(x);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_1l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::ellint_1(x);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2(double x)
+extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::ellint_2(x);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f(float x)
+extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::ellint_2(x);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_2l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::ellint_2(x);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu)
+extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu)
 {
- return c_policies::ellint_3(k, nu);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu)
+extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu)
 {
- return c_policies::ellint_3(k, nu);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/comp_ellint_3l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu)
+extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu)
 {
- return c_policies::ellint_3(k, nu);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/copysign.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/copysign.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/copysign.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,11 @@
 #include <boost/math/special_functions/sign.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL copysign(double x, double y)
+#if !(defined(__HP_aCC) && (__HP_aCC >= 61400))
+
+extern "C" double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
- return boost::math::copysign(x, y);
+ return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
+
+#endif

Modified: sandbox/math_toolkit/libs/math/src/tr1/copysignf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/copysignf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/copysignf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,11 @@
 #include <boost/math/special_functions/sign.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL copysignf(float x, float y)
+#if !(defined(__HP_aCC) && (__HP_aCC >= 61400))
+
+extern "C" float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
- return boost::math::copysign(x, y);
+ return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
+
+#endif

Modified: sandbox/math_toolkit/libs/math/src/tr1/copysignl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/copysignl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/copysignl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/sign.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
- return boost::math::copysign(x, y);
+ return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_i.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_i.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_i.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x)
+extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x)
 {
- return c_policies::cyl_bessel_i(nu, x);
+ return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_if.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_if.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_if.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x)
+extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
 {
- return c_policies::cyl_bessel_i(nu, x);
+ return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_il.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_il.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_il.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
 {
- return c_policies::cyl_bessel_i(nu, x);
+ return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_j.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_j.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_j.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x)
+extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x)
 {
- return c_policies::cyl_bessel_j(nu, x);
+ return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x)
+extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
 {
- return c_policies::cyl_bessel_j(nu, x);
+ return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_jl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
 {
- return c_policies::cyl_bessel_j(nu, x);
+ return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_k.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_k.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_k.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x)
+extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x)
 {
- return c_policies::cyl_bessel_k(nu, x);
+ return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x)
+extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
 {
- return c_policies::cyl_bessel_k(nu, x);
+ return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_bessel_kl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
 {
- return c_policies::cyl_bessel_k(nu, x);
+ return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_neumann.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_neumann.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_neumann.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x)
+extern "C" double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x)
 {
- return c_policies::cyl_neumann(nu, x);
+ return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x)
+extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x)
 {
- return c_policies::cyl_neumann(nu, x);
+ return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/cyl_neumannl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x)
 {
- return c_policies::cyl_neumann(nu, x);
+ return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_1.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_1.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL ellint_1(double k, double phi)
+extern "C" double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi)
 {
- return c_policies::ellint_1(k, phi);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_1f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_1f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_1f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi)
+extern "C" float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi)
 {
- return c_policies::ellint_1(k, phi);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_1l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_1l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_1l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_1.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi)
+extern "C" long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi)
 {
- return c_policies::ellint_1(k, phi);
+ return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_2.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL ellint_2(double k, double phi)
+extern "C" double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi)
 {
- return c_policies::ellint_2(k, phi);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_2f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_2f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_2f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi)
+extern "C" float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi)
 {
- return c_policies::ellint_2(k, phi);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_2l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_2l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_2l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_2.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi)
+extern "C" long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi)
 {
- return c_policies::ellint_2(k, phi);
+ return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_3.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_3.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi)
+extern "C" double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi)
 {
- return c_policies::ellint_3(k, nu, phi);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_3f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_3f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_3f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi)
+extern "C" float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi)
 {
- return c_policies::ellint_3(k, nu, phi);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/ellint_3l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/ellint_3l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/ellint_3l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/ellint_3.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi)
+extern "C" long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi)
 {
- return c_policies::ellint_3(k, nu, phi);
+ return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL erf(double x)
+extern "C" double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::erf(x);
+ return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erfc.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erfc.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erfc.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL erfc(double x)
+extern "C" double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::erfc(x);
+ return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erfcf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erfcf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erfcf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL erfcf(float x)
+extern "C" float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::erfc(x);
+ return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erfcl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erfcl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erfcl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL erfcl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::erfc(x);
+ return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erff.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erff.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erff.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL erff(float x)
+extern "C" float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::erf(x);
+ return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/erfl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/erfl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/erfl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/erf.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL erfl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::erf(x);
+ return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expint.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expint.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expint.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expint.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL expint(double x)
+extern "C" double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::expint(x);
+ return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expintf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expintf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expintf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expint.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL expintf(float x)
+extern "C" float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::expint(x);
+ return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expintl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expintl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expintl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expint.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL expintl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::expint(x);
+ return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expm1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expm1.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expm1.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL boost_expm1(double x)
+extern "C" double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::expm1(x);
+ return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expm1f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expm1f.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expm1f.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL boost_expm1f(float x)
+extern "C" float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::expm1(x);
+ return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/expm1l.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/expm1l.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/expm1l.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/expm1.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::expm1(x);
+ return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/fmax.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fmax.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fmax.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,11 +8,11 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL fmax(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
    if((boost::math::isnan)(x))
       return y;
    if((boost::math::isnan)(y))
       return x;
- return (std::max)(x, y);
+ return (std::max)(x, y);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/fmaxf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fmaxf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fmaxf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,9 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y)
+#if !(defined(__HP_aCC) && (__HP_aCC >= 61400))
+
+extern "C" float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
    if((boost::math::isnan)(x))
       return y;
@@ -16,3 +18,5 @@
       return x;
    return (std::max)(x, y);
 }
+
+#endif

Modified: sandbox/math_toolkit/libs/math/src/tr1/fmaxl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fmaxl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fmaxl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
    if((boost::math::isnan)(x))
       return y;

Modified: sandbox/math_toolkit/libs/math/src/tr1/fmin.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fmin.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fmin.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL fmin(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
    if((boost::math::isnan)(x))
       return y;

Modified: sandbox/math_toolkit/libs/math/src/tr1/fminf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fminf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fminf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,9 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y)
+#if !(defined(__HP_aCC) && (__HP_aCC >= 61400))
+
+extern "C" float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
    if((boost::math::isnan)(x))
       return y;
@@ -16,3 +18,5 @@
       return x;
    return (std::min)(x, y);
 }
+
+#endif

Modified: sandbox/math_toolkit/libs/math/src/tr1/fminl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fminl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fminl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/fpclassify.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL fminl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
    if((boost::math::isnan)(x))
       return y;

Modified: sandbox/math_toolkit/libs/math/src/tr1/fpclassify.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fpclassify.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fpclassify.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -11,36 +11,34 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-#define NO_MACRO_EXPAND /**/
-
-template<> bool BOOST_MATH_TR1_DECL signbit<double> NO_MACRO_EXPAND(double x)
+template<> bool BOOST_MATH_TR1_DECL signbit<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
-template<> int BOOST_MATH_TR1_DECL fpclassify<double> NO_MACRO_EXPAND(double x)
+template<> int BOOST_MATH_TR1_DECL fpclassify<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isfinite<double> NO_MACRO_EXPAND(double x)
+template<> bool BOOST_MATH_TR1_DECL isfinite<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isinf<double> NO_MACRO_EXPAND(double x)
+template<> bool BOOST_MATH_TR1_DECL isinf<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnan<double> NO_MACRO_EXPAND(double x)
+template<> bool BOOST_MATH_TR1_DECL isnan<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnormal<double> NO_MACRO_EXPAND(double x)
+template<> bool BOOST_MATH_TR1_DECL isnormal<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/fpclassifyf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fpclassifyf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fpclassifyf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -11,36 +11,34 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-#define NO_MACRO_EXPAND /**/
-
-template<> bool BOOST_MATH_TR1_DECL signbit<float> NO_MACRO_EXPAND(float x)
+template<> bool BOOST_MATH_TR1_DECL signbit<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
-template<> int BOOST_MATH_TR1_DECL fpclassify<float> NO_MACRO_EXPAND(float x)
+template<> int BOOST_MATH_TR1_DECL fpclassify<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isfinite<float> NO_MACRO_EXPAND(float x)
+template<> bool BOOST_MATH_TR1_DECL isfinite<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isinf<float> NO_MACRO_EXPAND(float x)
+template<> bool BOOST_MATH_TR1_DECL isinf<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnan<float> NO_MACRO_EXPAND(float x)
+template<> bool BOOST_MATH_TR1_DECL isnan<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnormal<float> NO_MACRO_EXPAND(float x)
+template<> bool BOOST_MATH_TR1_DECL isnormal<float> BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/fpclassifyl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/fpclassifyl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/fpclassifyl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -11,36 +11,34 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-#define NO_MACRO_EXPAND /**/
-
-template<> bool BOOST_MATH_TR1_DECL signbit<long double> NO_MACRO_EXPAND(long double x)
+template<> bool BOOST_MATH_TR1_DECL signbit<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
-template<> int BOOST_MATH_TR1_DECL fpclassify<long double> NO_MACRO_EXPAND(long double x)
+template<> int BOOST_MATH_TR1_DECL fpclassify<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isfinite<long double> NO_MACRO_EXPAND(long double x)
+template<> bool BOOST_MATH_TR1_DECL isfinite<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isinf<long double> NO_MACRO_EXPAND(long double x)
+template<> bool BOOST_MATH_TR1_DECL isinf<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnan<long double> NO_MACRO_EXPAND(long double x)
+template<> bool BOOST_MATH_TR1_DECL isnan<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
-template<> bool BOOST_MATH_TR1_DECL isnormal<long double> NO_MACRO_EXPAND(long double x)
+template<> bool BOOST_MATH_TR1_DECL isnormal<long double> BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/hermite.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hermite.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hermite.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/hermite.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL hermite(unsigned n, double x)
+extern "C" double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
 {
- return c_policies::hermite(n, x);
+ return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/hermitef.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hermitef.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hermitef.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/hermite.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x)
+extern "C" float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
 {
- return c_policies::hermite(n, x);
+ return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/hermitel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hermitel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hermitel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/hermite.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
 {
- return c_policies::hermite(n, x);
+ return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/hypot.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hypot.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hypot.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL hypot(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
- return c_policies::hypot(x, y);
+ return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/hypotf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hypotf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hypotf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL hypotf(float x, float y)
+extern "C" float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
- return c_policies::hypot(x, y);
+ return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/hypotl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/hypotl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/hypotl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
- return c_policies::hypot(x, y);
+ return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/laguerre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/laguerre.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/laguerre.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x)
+extern "C" double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
 {
- return c_policies::laguerre(n, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/laguerref.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/laguerref.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/laguerref.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x)
+extern "C" float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
 {
- return c_policies::laguerre(n, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/laguerrel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/laguerrel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/laguerrel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/laguerre.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
 {
- return c_policies::laguerre(n, x);
+ return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/legendre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/legendre.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/legendre.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL legendre(unsigned n, double x)
+extern "C" double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
 {
- return c_policies::legendre_p(n, x);
+ return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/legendref.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/legendref.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/legendref.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL legendref(unsigned n, float x)
+extern "C" float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
 {
- return c_policies::legendre_p(n, x);
+ return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/legendrel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/legendrel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/legendrel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/legendre.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL legendrel(unsigned n, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
 {
- return c_policies::legendre_p(n, x);
+ return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/lgamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lgamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lgamma.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL lgamma(double x)
+extern "C" double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::lgamma(x);
+ return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/lgammaf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lgammaf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lgammaf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL lgammaf(float x)
+extern "C" float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::lgamma(x);
+ return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/lgammal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lgammal.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lgammal.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL lgammal(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::lgamma(x);
+ return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/llround.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/llround.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/llround.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long long BOOST_MATH_TR1_DECL llround(double x)
+extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::llround(x);
+ return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/llroundf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/llroundf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/llroundf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long long BOOST_MATH_TR1_DECL llroundf(float x)
+extern "C" long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::llround(x);
+ return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/llroundl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/llroundl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/llroundl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long long BOOST_MATH_TR1_DECL llroundl(long double x)
+extern "C" long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::llround(x);
+ return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/log1p.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/log1p.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/log1p.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL boost_log1p(double x)
+extern "C" double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::log1p(x);
+ return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/log1pf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/log1pf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/log1pf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL boost_log1pf(float x)
+extern "C" float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::log1p(x);
+ return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/log1pl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/log1pl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/log1pl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::log1p(x);
+ return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/lround.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lround.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lround.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long BOOST_MATH_TR1_DECL lround(double x)
+extern "C" long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::lround(x);
+ return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/lroundf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lroundf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lroundf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long BOOST_MATH_TR1_DECL lroundf(float x)
+extern "C" long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::lround(x);
+ return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/lroundl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/lroundl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/lroundl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long BOOST_MATH_TR1_DECL lroundl(long double x)
+extern "C" long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::lround(x);
+ return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nextafter.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nextafter.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nextafter.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y)
 {
- return c_policies::nextafter(x, y);
+ return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nextafterf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nextafterf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nextafterf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y)
+extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y)
 {
- return c_policies::nextafter(x, y);
+ return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nextafterl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nextafterl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nextafterl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
- return c_policies::nextafter(x, y);
+ return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nexttoward.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nexttoward.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nexttoward.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL nexttoward(double x, long double y)
+extern "C" double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y)
 {
- return (double)c_policies::nextafter((long double)x, y);
+ return (double)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nexttowardf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nexttowardf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nexttowardf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y)
+extern "C" float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y)
 {
- return (float)c_policies::nextafter((long double)x, y);
+ return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/nexttowardl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/nexttowardl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/nexttowardl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y)
 {
- return c_policies::nextafter(x, y);
+ return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/riemann_zeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/riemann_zeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/riemann_zeta.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/zeta.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL riemann_zeta(double x)
+extern "C" double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::zeta(x);
+ return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/riemann_zetaf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/riemann_zetaf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/riemann_zetaf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/zeta.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf(float x)
+extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::zeta(x);
+ return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/riemann_zetal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/riemann_zetal.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/riemann_zetal.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/zeta.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::zeta(x);
+ return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/round.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/round.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/round.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL round(double x)
+extern "C" double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::round(x);
+ return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/roundf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/roundf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/roundf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL roundf(float x)
+extern "C" float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::round(x);
+ return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/roundl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/roundl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/roundl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL roundl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::round(x);
+ return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_bessel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_bessel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_bessel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x)
+extern "C" double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
 {
- return c_policies::sph_bessel(n, x);
+ return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_besself.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_besself.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_besself.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x)
+extern "C" float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
 {
- return c_policies::sph_bessel(n, x);
+ return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_bessell.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_bessell.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_bessell.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
 {
- return c_policies::sph_bessel(n, x);
+ return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_legendre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_legendre.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_legendre.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/spherical_harmonic.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL sph_legendre(unsigned n, unsigned m, double x)
+extern "C" double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x)
 {
- return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0);
+ return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_legendref.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_legendref.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_legendref.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/spherical_harmonic.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL sph_legendref(unsigned n, unsigned m, float x)
+extern "C" float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x)
 {
- return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0f);
+ return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0f);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_legendrel.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_legendrel.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_legendrel.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/spherical_harmonic.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned n, unsigned m, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x)
 {
- return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0L);
+ return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0L);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_neumann.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_neumann.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_neumann.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x)
+extern "C" double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
 {
- return c_policies::sph_neumann(n, x);
+ return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_neumannf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_neumannf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_neumannf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x)
+extern "C" float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x)
 {
- return c_policies::sph_neumann(n, x);
+ return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/sph_neumannl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/sph_neumannl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/sph_neumannl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -8,7 +8,7 @@
 #include <boost/math/special_functions/bessel.hpp>
 #include "c_policy.hpp"
 
-extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x)
+extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x)
 {
- return c_policies::sph_neumann(n, x);
+ return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
 }

Modified: sandbox/math_toolkit/libs/math/src/tr1/tgamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/tgamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/tgamma.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL tgamma(double x)
+extern "C" double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::tgamma(x);
+ return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/tgammaf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/tgammaf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/tgammaf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL tgammaf(float x)
+extern "C" float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::tgamma(x);
+ return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/tgammal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/tgammal.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/tgammal.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL tgammal(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::tgamma(x);
+ return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/trunc.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/trunc.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/trunc.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" double BOOST_MATH_TR1_DECL trunc(double x)
+extern "C" double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
 {
- return c_policies::trunc(x);
+ return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/truncf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/truncf.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/truncf.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" float BOOST_MATH_TR1_DECL truncf(float x)
+extern "C" float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x)
 {
- return c_policies::trunc(x);
+ return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

Modified: sandbox/math_toolkit/libs/math/src/tr1/truncl.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/src/tr1/truncl.cpp (original)
+++ sandbox/math_toolkit/libs/math/src/tr1/truncl.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -1,6 +1,6 @@
 // Copyright John Maddock 2008.
 // Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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_TR1_SOURCE
@@ -10,9 +10,9 @@
 
 namespace boost{ namespace math{ namespace tr1{
 
-extern "C" long double BOOST_MATH_TR1_DECL truncl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x)
 {
- return c_policies::trunc(x);
+ return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x);
 }
 
 }}}

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -143,8 +143,8 @@
    BOOST_CHECK_THROW(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error);
 
    // Test with ignore_error
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
    BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error<T>(func, msg2, ignore_policy), std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>());
    BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error<T>(func, msg2, ignore_policy), T(0));
    BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error<T>(func, msg2, T(1.25), ignore_policy), T(1.25));
@@ -153,10 +153,10 @@
 
    // Test with errno_on_error
    errno = 0;
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
    BOOST_CHECK(errno == EDOM);
    errno = 0;
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
    BOOST_CHECK(errno == EDOM);
    errno = 0;
    BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error<T>(func, msg2, errno_policy), std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>());

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 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -355,9 +355,9 @@
 {
    std::cout << "Running spot checks for type " << type_name << std::endl;
    //
- // basic sanity checks, tolerance is 100 epsilon expressed as a percentage:
+ // basic sanity checks, tolerance is 150 epsilon expressed as a percentage:
    //
- T tolerance = boost::math::tools::epsilon<T>() * 10000;
+ T tolerance = boost::math::tools::epsilon<T>() * 15000;
    if(tolerance < 1e-25f)
       tolerance = 1e-25f; // limit of test data?
    BOOST_CHECK_CLOSE(::boost::math::gamma_q_inv(static_cast<T>(1)/100, static_cast<T>(1.0/128)), static_cast<T>(0.35767144525455121503672919307647515332256996883787L), tolerance);

Modified: sandbox/math_toolkit/libs/math/test/test_next.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_next.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_next.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -39,8 +39,11 @@
 
    BOOST_CHECK_EQUAL(float_distance(float_advance(val, 4), val), -4);
    BOOST_CHECK_EQUAL(float_distance(float_advance(val, -4), val), 4);
- BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), 4), float_next(float_next(val))), -4);
- BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), -4), float_next(float_next(val))), 4);
+ if(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present))
+ {
+ BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), 4), float_next(float_next(val))), -4);
+ BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), -4), float_next(float_next(val))), 4);
+ }
 }
 
 template <class T>
@@ -60,7 +63,7 @@
    test_value(-boost::math::tools::epsilon<T>(), name);
    test_value(boost::math::tools::min_value<T>(), name);
    test_value(-boost::math::tools::min_value<T>(), name);
- if(std::numeric_limits<T>::is_specialized)
+ if(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present))
    {
       test_value(z, name);
       test_value(-z, name);
@@ -69,7 +72,7 @@
    test_value(-one, name);
    test_value(two, name);
    test_value(-two, name);
- if(std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::has_denorm)
+ if(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present))
    {
       test_value(std::numeric_limits<T>::denorm_min(), name);
       test_value(-std::numeric_limits<T>::denorm_min(), name);

Modified: sandbox/math_toolkit/libs/math/test/test_tr1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_tr1.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_tr1.cpp 2008-08-22 08:33:21 EDT (Fri, 22 Aug 2008)
@@ -557,7 +557,7 @@
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(800) / 1024, static_cast<float>(1e-05)), static_cast<float>(9.999999999898274739584436515967055859383969942432E-6), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(100) / 1024, static_cast<float>(1e+05)), static_cast<float>(99761.153306972066658135668386691227343323331995888), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(-0.5), static_cast<float>(1e+10)), static_cast<float>(9.3421545766487137036576748555295222252286528414669e9), eps * 5000);
- BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(400) / 1024, ldexpf(static_cast<float>(1), 66)), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
+ BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(400) / 1024, static_cast<float>(ldexp(static_cast<double>(1), 66))), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
 
    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(1), static_cast<float>(-1)), static_cast<float>(-1.557407724654902230506974807458360173087), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.4), static_cast<float>(0), static_cast<float>(-4)), static_cast<float>(-4.153623371196831087495427530365430979011), eps * 5000);
@@ -1230,7 +1230,7 @@
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
- BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L);
+ BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
 
    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);
@@ -1471,7 +1471,7 @@
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
- BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L);
+ BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
 
    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);


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