|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82764 - in trunk: boost/math/special_functions libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html/math_toolkit/special libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel libs/math/test
From: john_at_[hidden]
Date: 2013-02-06 20:26:33
Author: johnmaddock
Date: 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
New Revision: 82764
URL: http://svn.boost.org/trac/boost/changeset/82764
Log:
Reordered parameters to Bessel and Airy root finders.
Update to docs with references.
Added:
trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel0.html (contents, props changed)
Text files modified:
trunk/boost/math/special_functions/airy.hpp | 8 ++--
trunk/boost/math/special_functions/bessel.hpp | 8 ++--
trunk/boost/math/special_functions/math_fwd.hpp | 32 +++++++++++-----------
trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk | 56 ++++++++++++++++++++++++++++++++-------
trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel.html | 8 +++--
trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html | 3 ++
trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html | 3 ++
trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html | 3 ++
trunk/libs/math/test/test_bessel_airy_zeros.cpp | 2
9 files changed, 85 insertions(+), 38 deletions(-)
Modified: trunk/boost/math/special_functions/airy.hpp
==============================================================================
--- trunk/boost/math/special_functions/airy.hpp (original)
+++ trunk/boost/math/special_functions/airy.hpp 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -357,8 +357,8 @@
template <class T, class OutputIterator, class Policy>
inline OutputIterator airy_ai_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy& pol)
{
@@ -375,8 +375,8 @@
template <class T, class OutputIterator>
inline OutputIterator airy_ai_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it)
{
return airy_ai_zero<T>(number_of_zeros, start_index, out_it, policies::policy<>());
@@ -405,8 +405,8 @@
template <class T, class OutputIterator, class Policy>
inline OutputIterator airy_bi_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy& pol)
{
@@ -423,8 +423,8 @@
template <class T, class OutputIterator>
inline OutputIterator airy_bi_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it)
{
return airy_bi_zero<T>(number_of_zeros, start_index, out_it, policies::policy<>());
Modified: trunk/boost/math/special_functions/bessel.hpp
==============================================================================
--- trunk/boost/math/special_functions/bessel.hpp (original)
+++ trunk/boost/math/special_functions/bessel.hpp 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -557,8 +557,8 @@
template <class T, class OutputIterator, class Policy>
inline OutputIterator cyl_bessel_j_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy& pol)
{
@@ -573,8 +573,8 @@
template <class T, class OutputIterator>
inline OutputIterator cyl_bessel_j_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it)
{
return cyl_bessel_j_zero(v, number_of_zeros, start_index, out_it, policies::policy<>());
@@ -599,8 +599,8 @@
template <class T, class OutputIterator, class Policy>
inline OutputIterator cyl_neumann_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy& pol)
{
@@ -615,8 +615,8 @@
template <class T, class OutputIterator>
inline OutputIterator cyl_neumann_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it)
{
return cyl_neumann_zero(v, number_of_zeros, start_index, out_it, policies::policy<>());
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-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -622,14 +622,14 @@
template <class T, class OutputIterator>
OutputIterator cyl_bessel_j_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it);
template <class T, class OutputIterator, class Policy>
OutputIterator cyl_bessel_j_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy&);
@@ -641,14 +641,14 @@
template <class T, class OutputIterator>
OutputIterator cyl_neumann_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it);
template <class T, class OutputIterator, class Policy>
OutputIterator cyl_neumann_zero(T v,
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy&);
@@ -707,13 +707,13 @@
template <class OutputIterator>
OutputIterator airy_ai_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it);
template <class OutputIterator, class Policy>
OutputIterator airy_ai_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy&);
@@ -724,13 +724,13 @@
template <class OutputIterator>
OutputIterator airy_bi_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it);
template <class OutputIterator, class Policy>
OutputIterator airy_bi_zero(
- unsigned number_of_zeros,
unsigned start_index,
+ unsigned number_of_zeros,
OutputIterator out_it,
const Policy&);
@@ -1220,10 +1220,10 @@
\
template <class OutputIterator, class T>\
inline void cyl_bessel_j_zero(T v,\
- unsigned number_of_zeros,\
unsigned start_index,\
+ unsigned number_of_zeros,\
OutputIterator out_it)\
- { boost::math::cyl_bessel_j_zero(v, number_of_zeros, start_index, out_it, Policy()); }\
+ { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
\
template <class T>\
inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, unsigned m)\
@@ -1231,10 +1231,10 @@
\
template <class OutputIterator, class T>\
inline void cyl_neumann_zero(T v,\
- unsigned number_of_zeros,\
unsigned start_index,\
+ unsigned number_of_zeros,\
OutputIterator out_it)\
- { boost::math::cyl_neumann_zero(v, number_of_zeros, start_index, out_it, Policy()); }\
+ { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
\
template <class T>\
inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
@@ -1388,15 +1388,15 @@
inline T airy_ai_zero(unsigned m)\
{ return boost::math::airy_ai_zero<T>(m, Policy()); }\
template <class T, class OutputIterator>\
- OutputIterator airy_ai_zero(unsigned number_of_zeros, unsigned start_index, OutputIterator out_it)\
- { return boost::math::airy_ai_zero<T>(number_of_zeros, start_index, out_it, Policy()); }\
+ OutputIterator airy_ai_zero(unsigned start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
\
template <class T>\
inline T airy_bi_zero(unsigned m)\
{ return boost::math::airy_bi_zero<T>(m, Policy()); }\
template <class T, class OutputIterator>\
- OutputIterator airy_bi_zero(unsigned number_of_zeros, unsigned start_index, OutputIterator out_it)\
- { return boost::math::airy_bi_zero<T>(number_of_zeros, start_index, out_it, Policy()); }\
+ OutputIterator airy_bi_zero(unsigned start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
\
Modified: trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -281,20 +281,29 @@
[h4 Synopsis]
+`#include <boost/math/special_functions/bessel.hpp>`
+
Functions for obtaining both a single zero or root of the Bessel function,
and placing multiple zeros into a container like `std::vector` by providing an output iterator.
-The signature of the single value function is:
+The signature of the single value functions are:
template <class T>
- inline typename detail::bessel_traits<T, T, policies::policy<> >::result_type
- cyl_bessel_j_zero(T v, // Floating-point value for Jv.
- unsigned m); // start index.
+ T cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ unsigned m); // index of zero
+ template <class T>
+ T cyl_neumann_zero(T v, // Floating-point value for Jv.
+ unsigned m); // index of zero
and for multiple zeros:
template <class T, class OutputIterator>
- inline OutputIterator cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ OutputIterator cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it); //
+ template <class T, class OutputIterator>
+ OutputIterator cyl_neumann_zero(T v, // Floating-point value for Jv.
unsigned start_index,
unsigned number_of_zeros,
OutputIterator out_it); //
@@ -302,18 +311,44 @@
There are also versions which allows control of the
__policy_section for error handling and precision.
+ template <class T>
+ T cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ unsigned m, // start index.
+ const Policy& pol); // Policy
+ template <class T>
+ T cyl_neumann_zero(T v, // Floating-point value for Jv.
+ unsigned m, // start index.
+ const Policy& pol); // Policy
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy& pol);
template <class T, class OutputIterator, class Policy>
- inline OutputIterator cyl_bessel_j_zero(T v, // Floating-point value for Jv.
+ OutputIterator cyl_neumann_zero(T v, // Floating-point value for Jv.
unsigned start_index,
unsigned number_of_zeros,
OutputIterator out_it,
const Policy& pol);
[h4 Description]
+
The zeros or roots (values of x where the function crosses the y = 0 axis)
-of the Bessel and Neumann functions are computed by two functions.
+of the Bessel and Neumann functions are computed by two functions,
+`cyl_bessel_j_zero` and `cyl_neumann_zero`.
+In each case the index of the zero
+returned is 1-based, which is to say:
+ cyl_bessel_j_zero(v, 1);
+
+returns the first zero of Bessel J, and
+
+ cyl_bessel_j_zero(v, 0);
+
+results in a __domain_error being raised.
[h4 Examples of finding Bessel and Neumann zeros]
@@ -324,17 +359,18 @@
[bessel_zero_example_2]
[bessel_zero_example_iterator_1]
+
[bessel_zero_example_iterator_2]
The full code for this example for Bessel `cyl_bessel_j_zeros` is at
-[../../example/bessel_zeros_example.cpp Bessel, Neumann and Airy zeros].
+[@../../../example/bessel_zeros_example.cpp Bessel, Neumann and Airy zeros].
[h4 Implementation and testing]
The method uses Newton-Raphson method starting with McMahon's approximation.
-TODO needa good reference here
-
+See "Handbook of Mathematical Functions", M. Abramowitz and I. A. Stegan, section 9.5.
+Also: NIST Digital Library of Mathematical Functions, [@http://dlmf.nist.gov/10.21#vi Bessel Function Zeros].
The precision of evaluation of zeros was tested at 50 decimal digits using `cpp_dec_float_50`
and found identical with spot values computed by __WolframAlpha.
Modified: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel.html 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -31,6 +31,8 @@
Overview</a></span></dt>
<dt><span class="section"><a href="bessel/bessel.html">Bessel Functions
of the First and Second Kinds</a></span></dt>
+<dt><span class="section"><a href="bessel/bessel0.html">Finding Zeros
+ of Bessel Functions of the First and Second Kinds</a></span></dt>
<dt><span class="section"><a href="bessel/mbessel.html">Modified Bessel
Functions of the First and Second Kinds</a></span></dt>
<dt><span class="section"><a href="bessel/sph_bessel.html">Spherical Bessel
@@ -39,9 +41,9 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang
- Zhang, Bruno Lalande, Johan Råde, Gautam Sewani, Thijs van den Berg and Benjamin
- Sobotta<p>
+<td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012, 2013 John Maddock, Paul A. Bristow,
+ Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani, Thijs
+ van den Berg, Benjamin Sobotta and Christopher Kormanyos<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -31,6 +31,9 @@
<a name="math_toolkit.special.bessel.bessel.h0"></a>
<span class="phrase"><a name="math_toolkit.special.bessel.bessel.synopsis"></a></span><a class="link" href="bessel.html#math_toolkit.special.bessel.bessel.synopsis">Synopsis</a>
</h5>
+<p>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">bessel</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">></span>
<a class="link" href="../../main_overview/result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">);</span>
Added: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel0.html
==============================================================================
--- (empty file)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel0.html 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -0,0 +1,168 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Finding Zeros of Bessel Functions of the First and Second Kinds</title>
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../../index.html" title="Math Toolkit">
+<link rel="up" href="../bessel.html" title="Bessel Functions">
+<link rel="prev" href="bessel.html" title="Bessel Functions of the First and Second Kinds">
+<link rel="next" href="mbessel.html" title="Modified Bessel Functions of the First and Second Kinds">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bessel.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../bessel.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mbessel.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section math_toolkit_special_bessel_bessel0">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="math_toolkit.special.bessel.bessel0"></a><a class="link" href="bessel0.html" title="Finding Zeros of Bessel Functions of the First and Second Kinds">Finding Zeros
+ of Bessel Functions of the First and Second Kinds</a>
+</h4></div></div></div>
+<h5>
+<a name="math_toolkit.special.bessel.bessel.h5"></a>
+ <span class="phrase"><a name="math_toolkit.special.bessel.bessel.synopsis0"></a></span><a class="link" href="bessel0.html#math_toolkit.special.bessel.bessel.synopsis0">Synopsis</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">bessel</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+<p>
+ Functions for obtaining both a single zero or root of the Bessel function,
+ and placing multiple zeros into a container like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>
+ by providing an output iterator.
+ </p>
+<p>
+ The signature of the single value functions are:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
+<span class="identifier">T</span> <span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">);</span> <span class="comment">// index of zero</span>
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
+<span class="identifier">T</span> <span class="identifier">cyl_neumann_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">);</span> <span class="comment">// index of zero</span>
+</pre>
+<p>
+ and for multiple zeros:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="identifier">OutputIterator</span> <span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">start_index</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">number_of_zeros</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span> <span class="comment">//</span>
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="identifier">OutputIterator</span> <span class="identifier">cyl_neumann_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">start_index</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">number_of_zeros</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span> <span class="comment">//</span>
+</pre>
+<p>
+ There are also versions which allows control of the <a class="link" href="../../policy.html" title="Policies">Policies</a>
+ for error handling and precision.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
+<span class="identifier">T</span> <span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="comment">// start index.</span>
+ <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&</span> <span class="identifier">pol</span><span class="special">);</span> <span class="comment">// Policy</span>
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
+<span class="identifier">T</span> <span class="identifier">cyl_neumann_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="comment">// start index.</span>
+ <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&</span> <span class="identifier">pol</span><span class="special">);</span> <span class="comment">// Policy</span>
+
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Policy</span><span class="special">></span>
+<span class="identifier">OutputIterator</span> <span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">start_index</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">number_of_zeros</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&</span> <span class="identifier">pol</span><span class="special">);</span>
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Policy</span><span class="special">></span>
+<span class="identifier">OutputIterator</span> <span class="identifier">cyl_neumann_zero</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">,</span> <span class="comment">// Floating-point value for Jv.</span>
+ <span class="keyword">unsigned</span> <span class="identifier">start_index</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">number_of_zeros</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&</span> <span class="identifier">pol</span><span class="special">);</span>
+</pre>
+<h5>
+<a name="math_toolkit.special.bessel.bessel.h6"></a>
+ <span class="phrase"><a name="math_toolkit.special.bessel.bessel.description0"></a></span><a class="link" href="bessel0.html#math_toolkit.special.bessel.bessel.description0">Description</a>
+ </h5>
+<p>
+ The zeros or roots (values of x where the function crosses the y = 0 axis)
+ of the Bessel and Neumann functions are computed by two functions, <code class="computeroutput"><span class="identifier">cyl_bessel_j_zero</span></code> and <code class="computeroutput"><span class="identifier">cyl_neumann_zero</span></code>.
+ </p>
+<p>
+ In each case the index of the zero returned is 1-based, which is to say:
+ </p>
+<pre class="programlisting"><span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="number">1</span><span class="special">);</span>
+</pre>
+<p>
+ returns the first zero of Bessel J, and
+ </p>
+<pre class="programlisting"><span class="identifier">cyl_bessel_j_zero</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="number">0</span><span class="special">);</span>
+</pre>
+<p>
+ results in a <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a> being raised.
+ </p>
+<h5>
+<a name="math_toolkit.special.bessel.bessel.h7"></a>
+ <span class="phrase"><a name="math_toolkit.special.bessel.bessel.examples_of_finding_bessel_and_neumann_zeros"></a></span><a class="link" href="bessel0.html#math_toolkit.special.bessel.bessel.examples_of_finding_bessel_and_neumann_zeros">Examples
+ of finding Bessel and Neumann zeros</a>
+ </h5>
+<p>
+ [bessel_zero_example_1]
+ </p>
+<p>
+ [bessel_zero_example_2]
+ </p>
+<p>
+ [bessel_zero_example_iterator_1]
+ </p>
+<p>
+ [bessel_zero_example_iterator_2]
+ </p>
+<p>
+ The full code for this example for Bessel <code class="computeroutput"><span class="identifier">cyl_bessel_j_zeros</span></code>
+ is at <a href="../../../../../../example/bessel_zeros_example.cpp" target="_top">Bessel, Neumann
+ and Airy zeros</a>.
+ </p>
+<h5>
+<a name="math_toolkit.special.bessel.bessel.h8"></a>
+ <span class="phrase"><a name="math_toolkit.special.bessel.bessel.implementation_and_testing"></a></span><a class="link" href="bessel0.html#math_toolkit.special.bessel.bessel.implementation_and_testing">Implementation
+ and testing</a>
+ </h5>
+<p>
+ The method uses Newton-Raphson method starting with McMahon's approximation.
+ See "Handbook of Mathematical Functions", M. Abramowitz and I.
+ A. Stegan, section 9.5. Also: NIST Digital Library of Mathematical Functions,
+ Bessel Function Zeros.
+ </p>
+<p>
+ The precision of evaluation of zeros was tested at 50 decimal digits using
+ <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code> and found
+ identical with spot values computed by <a href="http://www.wolframalpha.com/" target="_top">Wolfram
+ Alpha</a>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012, 2013 John Maddock, Paul A. Bristow,
+ Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani, Thijs
+ van den Berg, Benjamin Sobotta and Christopher Kormanyos<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bessel.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../bessel.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mbessel.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -31,6 +31,9 @@
<a name="math_toolkit.special.bessel.mbessel.h0"></a>
<span class="phrase"><a name="math_toolkit.special.bessel.mbessel.synopsis"></a></span><a class="link" href="mbessel.html#math_toolkit.special.bessel.mbessel.synopsis">Synopsis</a>
</h5>
+<p>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">bessel</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">></span>
<a class="link" href="../../main_overview/result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">cyl_bessel_i</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">);</span>
Modified: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -31,6 +31,9 @@
<a name="math_toolkit.special.bessel.sph_bessel.h0"></a>
<span class="phrase"><a name="math_toolkit.special.bessel.sph_bessel.synopsis"></a></span><a class="link" href="sph_bessel.html#math_toolkit.special.bessel.sph_bessel.synopsis">Synopsis</a>
</h5>
+<p>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">bessel</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">></span>
<a class="link" href="../../main_overview/result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">sph_bessel</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">x</span><span class="special">);</span>
Modified: trunk/libs/math/test/test_bessel_airy_zeros.cpp
==============================================================================
--- trunk/libs/math/test/test_bessel_airy_zeros.cpp (original)
+++ trunk/libs/math/test/test_bessel_airy_zeros.cpp 2013-02-06 13:53:06 EST (Wed, 06 Feb 2013)
@@ -130,7 +130,7 @@
{ // Same test using the multiple zeros version.
std::vector<RealType> zeros;
- cyl_bessel_j_zero(static_cast<RealType>(0.0), 3, 1U, std::back_inserter(zeros) );
+ cyl_bessel_j_zero(static_cast<RealType>(0.0), 1U, 3, std::back_inserter(zeros) );
BOOST_CHECK_CLOSE_FRACTION(zeros[0], static_cast<RealType>(2.4048255576957727686216318793264546431242449091460L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(zeros[1], static_cast<RealType>(5.5200781102863106495966041128130274252218654787829L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(zeros[2], static_cast<RealType>(8.6537279129110122169541987126609466855657952312754L), tolerance);
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