Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-10-09 14:12:07


Author: johnmaddock
Date: 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
New Revision: 39855
URL: http://svn.boost.org/trac/boost/changeset/39855

Log:
More Borland workarounds.
Text files modified:
   trunk/boost/math/distributions/negative_binomial.hpp | 2 +-
   trunk/boost/math/distributions/pareto.hpp | 2 +-
   trunk/boost/math/special_functions/beta.hpp | 8 ++++----
   trunk/boost/math/special_functions/detail/bessel_ik.hpp | 4 ++--
   trunk/boost/math/special_functions/detail/bessel_jy.hpp | 4 ++--
   trunk/boost/math/special_functions/detail/igamma_large.hpp | 8 ++++----
   trunk/boost/math/special_functions/factorials.hpp | 6 +++---
   trunk/boost/math/special_functions/gamma.hpp | 5 +++--
   trunk/boost/math/special_functions/spherical_harmonic.hpp | 2 +-
   9 files changed, 21 insertions(+), 20 deletions(-)

Modified: trunk/boost/math/distributions/negative_binomial.hpp
==============================================================================
--- trunk/boost/math/distributions/negative_binomial.hpp (original)
+++ trunk/boost/math/distributions/negative_binomial.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -527,7 +527,7 @@
           // since the probability of zero failures may be non-zero,
           return 0; // but zero is the best we can do:
        }
- if (-Q <= powm1(dist.success_fraction(), dist.successes(), Policy()))
+ if (-Q <= boost::math::powm1(dist.success_fraction(), dist.successes(), Policy()))
        { // q <= cdf(complement(dist, 0)) == pdf(dist, 0)
           return 0; //
        }

Modified: trunk/boost/math/distributions/pareto.hpp
==============================================================================
--- trunk/boost/math/distributions/pareto.hpp (original)
+++ trunk/boost/math/distributions/pareto.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -212,7 +212,7 @@
       }
 
       // result = RealType(1) - pow((location / x), shape);
- result = -powm1(location/x, shape, Policy()); // should be more accurate.
+ result = -boost::math::powm1(location/x, shape, Policy()); // should be more accurate.
       return result;
     } // cdf
 

Modified: trunk/boost/math/special_functions/beta.hpp
==============================================================================
--- trunk/boost/math/special_functions/beta.hpp (original)
+++ trunk/boost/math/special_functions/beta.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -724,7 +724,7 @@
       return s0;
    if(normalised)
    {
- prefix = h / tgamma_delta_ratio(a, b, pol);
+ prefix = h / boost::math::tgamma_delta_ratio(a, b, pol);
       prefix /= pow(t, b);
    }
    else
@@ -741,7 +741,7 @@
    //
    // Now an initial value for J, see 9.6:
    //
- T j = gamma_q(b, u, pol) / h;
+ T j = boost::math::gamma_q(b, u, pol) / h;
    //
    // Now we can start to pull things together and evaluate the sum in Eq 9:
    //
@@ -777,11 +777,11 @@
       for(unsigned m = 1; m < n; ++m)
       {
          mbn = m * b - n;
- p[n] += mbn * p[n-m] / unchecked_factorial<T>(tmp1);
+ p[n] += mbn * p[n-m] / boost::math::unchecked_factorial<T>(tmp1);
          tmp1 += 2;
       }
       p[n] /= n;
- p[n] += bm1 / unchecked_factorial<T>(tnp1);
+ p[n] += bm1 / boost::math::unchecked_factorial<T>(tnp1);
       //
       // Now we want Jn from Jn-1 using Eq 9.6:
       //

Modified: trunk/boost/math/special_functions/detail/bessel_ik.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/bessel_ik.hpp (original)
+++ trunk/boost/math/special_functions/detail/bessel_ik.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -37,8 +37,8 @@
     BOOST_ASSERT(abs(x) <= 2);
     BOOST_ASSERT(abs(v) <= 0.5f);
 
- T gp = tgamma1pm1(v, pol);
- T gm = tgamma1pm1(-v, pol);
+ T gp = boost::math::tgamma1pm1(v, pol);
+ T gm = boost::math::tgamma1pm1(-v, pol);
 
     a = log(x / 2);
     b = exp(v * a);

Modified: trunk/boost/math/special_functions/detail/bessel_jy.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/bessel_jy.hpp (original)
+++ trunk/boost/math/special_functions/detail/bessel_jy.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -41,8 +41,8 @@
 
     BOOST_ASSERT(fabs(v) <= 0.5f); // precondition for using this routine
 
- T gp = tgamma1pm1(v, pol);
- T gm = tgamma1pm1(-v, pol);
+ T gp = boost::math::tgamma1pm1(v, pol);
+ T gm = boost::math::tgamma1pm1(-v, pol);
     T spv = sin_pi(v, pol);
     T spv2 = sin_pi(v/2, pol);
     T xp = pow(x/2, v);

Modified: trunk/boost/math/special_functions/detail/igamma_large.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/igamma_large.hpp (original)
+++ trunk/boost/math/special_functions/detail/igamma_large.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -66,7 +66,7 @@
 {
    BOOST_MATH_STD_USING // ADL of std functions
    T sigma = (x - a) / a;
- T phi = -log1pmx(sigma, pol);
+ T phi = -boost::math::log1pmx(sigma, pol);
    T y = a * phi;
    T z = sqrt(2 * phi);
    if(x < a)
@@ -271,7 +271,7 @@
 {
    BOOST_MATH_STD_USING // ADL of std functions
    T sigma = (x - a) / a;
- T phi = -log1pmx(sigma, pol);
+ T phi = -boost::math::log1pmx(sigma, pol);
    T y = a * phi;
    T z = sqrt(2 * phi);
    if(x < a)
@@ -413,7 +413,7 @@
 {
    BOOST_MATH_STD_USING // ADL of std functions
    T sigma = (x - a) / a;
- T phi = -log1pmx(sigma, pol);
+ T phi = -boost::math::log1pmx(sigma, pol);
    T y = a * phi;
    T z = sqrt(2 * phi);
    if(x < a)
@@ -469,7 +469,7 @@
 {
    BOOST_MATH_STD_USING // ADL of std functions
    T sigma = (x - a) / a;
- T phi = -log1pmx(sigma, pol);
+ T phi = -boost::math::log1pmx(sigma, pol);
    T y = a * phi;
    T z = sqrt(2 * phi);
    if(x < a)

Modified: trunk/boost/math/special_functions/factorials.hpp
==============================================================================
--- trunk/boost/math/special_functions/factorials.hpp (original)
+++ trunk/boost/math/special_functions/factorials.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -133,7 +133,7 @@
    // tgamma_delta_ratio is alreay optimised for that
    // use case:
    //
- return 1 / tgamma_delta_ratio(x, static_cast<T>(n), pol);
+ return 1 / boost::math::tgamma_delta_ratio(x, static_cast<T>(n), pol);
 }
 
 template <class T, class Policy>
@@ -162,7 +162,7 @@
       unsigned n2 = tools::real_cast<unsigned>(floor(xp1));
       if(n2 == xp1)
          return 0;
- T result = tgamma_delta_ratio(xp1, -static_cast<T>(n2), pol);
+ T result = boost::math::tgamma_delta_ratio(xp1, -static_cast<T>(n2), pol);
       x -= n2;
       result *= x;
       ++n2;
@@ -177,7 +177,7 @@
    // because tgamma_delta_ratio is alreay optimised
    // for that use case:
    //
- return tgamma_delta_ratio(x + 1, -static_cast<T>(n), pol);
+ return boost::math::tgamma_delta_ratio(x + 1, -static_cast<T>(n), pol);
 }
 
 } // namespace detail

Modified: trunk/boost/math/special_functions/gamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/gamma.hpp (original)
+++ trunk/boost/math/special_functions/gamma.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -623,7 +623,7 @@
    else if((fabs(d*d*a) <= 100) && (a > 150))
    {
       // special case for large a and a ~ z.
- prefix = a * log1pmx(d, pol) + z * static_cast<T>(0.5 - L::g()) / agh;
+ prefix = a * boost::math::log1pmx(d, pol) + z * static_cast<T>(0.5 - L::g()) / agh;
       prefix = exp(prefix);
    }
    else
@@ -726,7 +726,8 @@
    //
    // Compute the full upper fraction (Q) when a is very small:
    //
- T result = tgamma1pm1(a, pol) - powm1(x, a, pol);
+ T result;
+ result = boost::math::tgamma1pm1(a, pol) - boost::math::powm1(x, a, pol);
    result /= a;
    detail::small_gamma2_series<T> s(a, x);
    boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();

Modified: trunk/boost/math/special_functions/spherical_harmonic.hpp
==============================================================================
--- trunk/boost/math/special_functions/spherical_harmonic.hpp (original)
+++ trunk/boost/math/special_functions/spherical_harmonic.hpp 2007-10-09 14:12:06 EDT (Tue, 09 Oct 2007)
@@ -34,7 +34,7 @@
 
    T leg = detail::legendre_p_imp(n, m, x, pow(fabs(sin_theta), T(m)), pol);
    
- T prefix = tgamma_delta_ratio(static_cast<T>(n - m + 1), static_cast<T>(2 * m), pol);
+ T prefix = boost::math::tgamma_delta_ratio(static_cast<T>(n - m + 1), static_cast<T>(2 * m), pol);
    prefix *= (2 * n + 1) / (4 * constants::pi<T>());
    prefix = sqrt(prefix);
    return prefix * leg;


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