Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74572 - in trunk/boost/math/special_functions: . detail
From: john_at_[hidden]
Date: 2011-09-26 07:01:04


Author: johnmaddock
Date: 2011-09-26 07:01:03 EDT (Mon, 26 Sep 2011)
New Revision: 74572
URL: http://svn.boost.org/trac/boost/changeset/74572

Log:
Minor fixes for expression-template types.
Text files modified:
   trunk/boost/math/special_functions/detail/unchecked_factorial.hpp | 5 +++++
   trunk/boost/math/special_functions/digamma.hpp | 2 +-
   trunk/boost/math/special_functions/spherical_harmonic.hpp | 2 +-
   3 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/boost/math/special_functions/detail/unchecked_factorial.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/unchecked_factorial.hpp (original)
+++ trunk/boost/math/special_functions/detail/unchecked_factorial.hpp 2011-09-26 07:01:03 EDT (Mon, 26 Sep 2011)
@@ -403,6 +403,11 @@
    BOOST_STATIC_CONSTANT(unsigned, value = 100);
 };
 
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+template <class T>
+const unsigned max_factorial<T>::value;
+#endif
+
 } // namespace math
 } // namespace boost
 

Modified: trunk/boost/math/special_functions/digamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/digamma.hpp (original)
+++ trunk/boost/math/special_functions/digamma.hpp 2011-09-26 07:01:03 EDT (Mon, 26 Sep 2011)
@@ -197,7 +197,7 @@
    g -= root3;
    g -= root4;
    g -= root5;
- T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1);
+ T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1));
    T result = g * Y + g * r;
 
    return result;

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 2011-09-26 07:01:03 EDT (Mon, 26 Sep 2011)
@@ -36,7 +36,7 @@
    T sin_theta = sin(theta);
    T x = cos(theta);
 
- T leg = detail::legendre_p_imp(n, m, x, pow(fabs(sin_theta), T(m)), pol);
+ T leg = detail::legendre_p_imp(n, m, x, static_cast<T>(pow(fabs(sin_theta), T(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>());


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