2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-27 19:12:08 +00:00

Minor fixes for expression-template types.

[SVN r74572]
This commit is contained in:
John Maddock
2011-09-26 11:01:03 +00:00
parent a74236ad41
commit 8f22d5ebe5
3 changed files with 7 additions and 2 deletions

View File

@@ -403,6 +403,11 @@ struct max_factorial
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

View File

@@ -197,7 +197,7 @@ T digamma_imp_1_2(T x, const mpl::int_<0>*)
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;

View File

@@ -36,7 +36,7 @@ inline T spherical_harmonic_prefix(unsigned n, unsigned m, T theta, const Policy
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>());