mirror of
https://github.com/boostorg/math.git
synced 2026-01-29 07:42:11 +00:00
Corrected Bessel zeros when used with a multiprecision type having et_on.
[SVN r82615]
This commit is contained in:
@@ -376,7 +376,7 @@ inline T cyl_bessel_j_zero_imp(T v, unsigned m, const Policy& pol)
|
||||
|
||||
// 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 @@ inline void cyl_bessel_j_zero_imp(output_iterator out_it,
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -623,12 +623,6 @@ namespace boost
|
||||
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 @@ namespace boost
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user