Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75152 - in trunk/boost/math/special_functions: . detail
From: john_at_[hidden]
Date: 2011-10-28 04:29:57


Author: johnmaddock
Date: 2011-10-28 04:29:55 EDT (Fri, 28 Oct 2011)
New Revision: 75152
URL: http://svn.boost.org/trac/boost/changeset/75152

Log:
Fix Clang build issue.
Text files modified:
   trunk/boost/math/special_functions/bessel.hpp | 55 ----------------------------------------
   trunk/boost/math/special_functions/detail/bessel_ik.hpp | 55 ++++++++++++++++++++++++++++++++++++++++
   2 files changed, 55 insertions(+), 55 deletions(-)

Modified: trunk/boost/math/special_functions/bessel.hpp
==============================================================================
--- trunk/boost/math/special_functions/bessel.hpp (original)
+++ trunk/boost/math/special_functions/bessel.hpp 2011-10-28 04:29:55 EDT (Fri, 28 Oct 2011)
@@ -166,61 +166,6 @@
 }
 
 template <class T, class Policy>
-struct cyl_bessel_i_small_z
-{
- typedef T result_type;
-
- cyl_bessel_i_small_z(T v_, T z_) : k(0), v(v_), mult(z_*z_/4)
- {
- BOOST_MATH_STD_USING
- term = 1;
- }
-
- T operator()()
- {
- T result = term;
- ++k;
- term *= mult / k;
- term /= k + v;
- return result;
- }
-private:
- unsigned k;
- T v;
- T term;
- T mult;
-};
-
-template <class T, class Policy>
-inline T bessel_i_small_z_series(T v, T x, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- T prefix;
- if(v < max_factorial<T>::value)
- {
- prefix = pow(x / 2, v) / boost::math::tgamma(v + 1, pol);
- }
- else
- {
- prefix = v * log(x / 2) - boost::math::lgamma(v + 1, pol);
- prefix = exp(prefix);
- }
- if(prefix == 0)
- return prefix;
-
- cyl_bessel_i_small_z<T, Policy> s(v, x);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- T zero = 0;
- T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, zero);
-#else
- T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
-#endif
- policies::check_series_iterations<T>("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
- return prefix * result;
-}
-
-template <class T, class Policy>
 T cyl_bessel_i_imp(T v, T x, const Policy& pol)
 {
    //

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 2011-10-28 04:29:55 EDT (Fri, 28 Oct 2011)
@@ -23,6 +23,61 @@
 
 namespace detail {
 
+template <class T, class Policy>
+struct cyl_bessel_i_small_z
+{
+ typedef T result_type;
+
+ cyl_bessel_i_small_z(T v_, T z_) : k(0), v(v_), mult(z_*z_/4)
+ {
+ BOOST_MATH_STD_USING
+ term = 1;
+ }
+
+ T operator()()
+ {
+ T result = term;
+ ++k;
+ term *= mult / k;
+ term /= k + v;
+ return result;
+ }
+private:
+ unsigned k;
+ T v;
+ T term;
+ T mult;
+};
+
+template <class T, class Policy>
+inline T bessel_i_small_z_series(T v, T x, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ T prefix;
+ if(v < max_factorial<T>::value)
+ {
+ prefix = pow(x / 2, v) / boost::math::tgamma(v + 1, pol);
+ }
+ else
+ {
+ prefix = v * log(x / 2) - boost::math::lgamma(v + 1, pol);
+ prefix = exp(prefix);
+ }
+ if(prefix == 0)
+ return prefix;
+
+ cyl_bessel_i_small_z<T, Policy> s(v, x);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ T zero = 0;
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, zero);
+#else
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
+#endif
+ policies::check_series_iterations<T>("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
+ return prefix * result;
+}
+
 // Calculate K(v, x) and K(v+1, x) by method analogous to
 // Temme, Journal of Computational Physics, vol 21, 343 (1976)
 template <typename T, typename Policy>


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