Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82615 - in trunk/boost/math/special_functions: . detail
From: e_float_at_[hidden]
Date: 2013-01-25 16:51:40


Author: christopher_kormanyos
Date: 2013-01-25 16:51:40 EST (Fri, 25 Jan 2013)
New Revision: 82615
URL: http://svn.boost.org/trac/boost/changeset/82615

Log:
Corrected Bessel zeros when used with a multiprecision type having et_on.
Text files modified:
   trunk/boost/math/special_functions/bessel.hpp | 4 ++--
   trunk/boost/math/special_functions/detail/bessel_jy_zero.hpp | 22 +++++++++++-----------
   trunk/boost/math/special_functions/math_fwd.hpp | 12 ------------
   3 files changed, 13 insertions(+), 25 deletions(-)

Modified: trunk/boost/math/special_functions/bessel.hpp
==============================================================================
--- trunk/boost/math/special_functions/bessel.hpp (original)
+++ trunk/boost/math/special_functions/bessel.hpp 2013-01-25 16:51:40 EST (Fri, 25 Jan 2013)
@@ -376,7 +376,7 @@
 
    // Handle negative order or if the zero'th zero is requested.
    // Return NaN if NaN is available or return 0 if NaN is not available.
- if((v < T(0)) || (m == 0U))
+ if((v < 0) || (m == 0U))
       return (std::numeric_limits<T>::has_quiet_NaN ? std::numeric_limits<T>::quiet_NaN() : T(0));
 
    // Set up the initial guess for the upcoming root-finding.
@@ -419,7 +419,7 @@
 
       while(out_it != end_it)
       {
- *out_it = boost::math::detail::cyl_bessel_j_zero_imp(v, start_index, pol);
+ *out_it = boost::math::detail::cyl_bessel_j_zero_imp<T, Policy>(v, start_index, pol);
          ++start_index;
          ++out_it;
       }

Modified: trunk/boost/math/special_functions/detail/bessel_jy_zero.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/bessel_jy_zero.hpp (original)
+++ trunk/boost/math/special_functions/detail/bessel_jy_zero.hpp 2013-01-25 16:51:40 EST (Fri, 25 Jan 2013)
@@ -33,7 +33,7 @@
     namespace bessel_zero
     {
       template<class T>
- T equation_nist_10_21_19(const T& v, const T& a)
+ T equation_nist_10_21_19(T v, T a)
       {
         // Get the initial estimate of the m'th root of Jv or Yv.
         // This subroutine is used for the order m with m > 1.
@@ -60,9 +60,9 @@
       class equation_as_9_3_39_and_its_derivative
       {
       public:
- equation_as_9_3_39_and_its_derivative(const T& zt) : zeta(zt) { }
+ equation_as_9_3_39_and_its_derivative(T zt) : zeta(zt) { }
 
- boost::math::tuple<T, T> operator()(const T& z) const
+ boost::math::tuple<T, T> operator()(T z) const
         {
           BOOST_MATH_STD_USING // ADL of std names, needed for acos, sqrt.
 
@@ -86,7 +86,7 @@
       };
 
       template<class T>
- static T equation_as_9_5_26(const T& v, const T& ai_bi_root)
+ static T equation_as_9_5_26(T v, T ai_bi_root)
       {
         BOOST_MATH_STD_USING // ADL of std names, needed for pow.
 
@@ -165,7 +165,7 @@
       namespace cyl_bessel_j_zero_detail
       {
         template<class T>
- T equation_nist_10_21_40_a(const T& v)
+ T equation_nist_10_21_40_a(T v)
         {
           BOOST_MATH_STD_USING // ADL of std names, needed for pow.
 
@@ -180,7 +180,7 @@
         }
 
         template<class T>
- T initial_guess(const T& v, unsigned m)
+ T initial_guess(T v, unsigned m)
         {
           // Compute an estimate of the m'th root of cyl_bessel_j.
 
@@ -241,11 +241,11 @@
         class function_object
         {
         public:
- function_object(const T& v,
+ function_object(T v,
                           const Policy& pol) : my_v(v),
                                                my_pol(pol) { }
 
- boost::math::tuple<T, T> operator()(const T& x) const
+ boost::math::tuple<T, T> operator()(T x) const
           {
             // Obtain Jv(x) and Jv'(x).
             const T j_v (boost::math::detail::cyl_bessel_j_imp( my_v, x, boost::math::detail::bessel_no_int_tag(), my_pol));
@@ -265,7 +265,7 @@
       namespace cyl_neumann_zero_detail
       {
         template<class T>
- T equation_nist_10_21_40_b(const T& v)
+ T equation_nist_10_21_40_b(T v)
         {
           BOOST_MATH_STD_USING // ADL of std names, needed for pow.
 
@@ -341,11 +341,11 @@
         class function_object
         {
         public:
- function_object(const T& v,
+ function_object(T v,
                           const Policy& pol) : my_v(v),
                                                my_pol(pol) { }
 
- boost::math::tuple<T, T> operator()(const T& x) const
+ boost::math::tuple<T, T> operator()(T x) const
           {
             // Obtain Yv(x) and Yv'(x).
             const T y_v (boost::math::detail::cyl_neumann_imp( my_v, x, boost::math::detail::bessel_no_int_tag(), my_pol));

Modified: trunk/boost/math/special_functions/math_fwd.hpp
==============================================================================
--- trunk/boost/math/special_functions/math_fwd.hpp (original)
+++ trunk/boost/math/special_functions/math_fwd.hpp 2013-01-25 16:51:40 EST (Fri, 25 Jan 2013)
@@ -623,12 +623,6 @@
    template <class T1, class T2, class Policy>
    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
 
- template <class output_iterator, class T>
- inline void cyl_bessel_j_zero_imp(output_iterator out_it,
- T v,
- std::size_t number_of_zeros,
- unsigned start_index);
-
    template <class T, class Policy>
    typename detail::bessel_traits<T, T, Policy>::result_type cyl_neuman_zero(T v, unsigned m, const Policy& pol);
 
@@ -638,12 +632,6 @@
    template <class T1, class T2, class Policy>
    std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
 
- template <class output_iterator, class T>
- inline void cyl_neuman_zero_imp(output_iterator out_it,
- T v,
- std::size_t number_of_zeros,
- unsigned start_index);
-
    template <class T1, class T2>
    std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
 


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