Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76337 - in trunk: boost/math/special_functions libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html libs/math/doc/sf_and_dist/html/index libs/math/doc/sf_and_dist/html/math_toolkit/special/zetas
From: john_at_[hidden]
Date: 2012-01-07 11:57:53


Author: johnmaddock
Date: 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
New Revision: 76337
URL: http://svn.boost.org/trac/boost/changeset/76337

Log:
Simplify/improve zeta function still further.
Text files modified:
   trunk/boost/math/special_functions/zeta.hpp | 19 ++++++++-----------
   trunk/libs/math/doc/sf_and_dist/html/index.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/index/s12.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/index/s13.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/index/s14.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/index/s15.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/index/s16.html | 2 +-
   trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html | 9 ---------
   trunk/libs/math/doc/sf_and_dist/zeta.qbk | 6 ------
   9 files changed, 14 insertions(+), 32 deletions(-)

Modified: trunk/boost/math/special_functions/zeta.hpp
==============================================================================
--- trunk/boost/math/special_functions/zeta.hpp (original)
+++ trunk/boost/math/special_functions/zeta.hpp 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -19,6 +19,12 @@
 
 namespace boost{ namespace math{ namespace detail{
 
+#if 0
+//
+// This code is commented out because we have a better more rapidly converging series
+// now. Retained for future reference and in case the new code causes any issues down the line....
+//
+
 template <class T, class Policy>
 struct zeta_series_cache_size
 {
@@ -90,12 +96,6 @@
    return sum * 1 / -boost::math::powm1(T(2), sc);
 }
 
-#if 0
-//
-// This code is commented out because we have a better more rapidly converging series
-// now. Retained for future reference and in case the new code causes any issues down the line....
-//
-
 //
 // Classical p-series:
 //
@@ -158,7 +158,7 @@
       ej_term /= j - n + 1;
       ej_sum += ej_term;
    }
- return -sum / (two_n * (1 - pow(T(2), sc)));
+ return -sum / (two_n * (-powm1(T(2), sc)));
 }
 
 template <class T, class Policy>
@@ -166,10 +166,7 @@
 {
    BOOST_MATH_STD_USING
    T result;
- if(fabs(sc) > 0.01f)
- result = zeta_polynomial_series(s, sc, pol);
- else
- result = detail::zeta_series_imp(s, sc, pol);
+ result = zeta_polynomial_series(s, sc, pol);
 #if 0
    // Old code archived for future reference:
 

Modified: trunk/libs/math/doc/sf_and_dist/html/index.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -513,7 +513,7 @@
   </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 02, 2012 at 11:43:05 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 07, 2012 at 16:42:37 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/math/doc/sf_and_dist/html/index/s12.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index/s12.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index/s12.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1439950"></a>Function Index</h2></div></div></div>
+<a name="id1501367"></a>Function Index</h2></div></div></div>
 <p><a class="link" href="s12.html#idx_id_0">A</a> <a class="link" href="s12.html#idx_id_1">B</a> <a class="link" href="s12.html#idx_id_2">C</a> <a class="link" href="s12.html#idx_id_3">D</a> <a class="link" href="s12.html#idx_id_4">E</a> <a class="link" href="s12.html#idx_id_5">F</a> <a class="link" href="s12.html#idx_id_6">G</a> <a class="link" href="s12.html#idx_id_7">H</a> <a class="link" href="s12.html#idx_id_8">I</a> <a class="link" href="s12.html#idx_id_9">K</a> <a class="link" href="s12.html#idx_id_10">L</a> <a class="link" href="s12.html#idx_id_11">M</a> <a class="link" href="s12.html#idx_id_12">N</a> <a class="link" href="s12.html#idx_id_14">P</a> <a class="link" href="s12.html#idx_id_15">Q</a> <a class="link" href="s12.html#idx_id_16">R</a> <a class="link" href="s12.html#idx_id_17">S</a> <a class="link" href="s12.html#idx_id_18">T</a> <a class="link" href="s12.html#idx_id_19">U</a> <a class="link" href="s12.html#idx_id_20">V</a> <a class="link" href="s12.html#idx_id_21">W</a> <a class="link" href=
"s12.html#idx_id_22">Z</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/math/doc/sf_and_dist/html/index/s13.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index/s13.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index/s13.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1455854"></a>Class Index</h2></div></div></div>
+<a name="id1517264"></a>Class Index</h2></div></div></div>
 <p><a class="link" href="s13.html#idx_id_24">B</a> <a class="link" href="s13.html#idx_id_25">C</a> <a class="link" href="s13.html#idx_id_26">D</a> <a class="link" href="s13.html#idx_id_27">E</a> <a class="link" href="s13.html#idx_id_28">F</a> <a class="link" href="s13.html#idx_id_29">G</a> <a class="link" href="s13.html#idx_id_30">H</a> <a class="link" href="s13.html#idx_id_31">I</a> <a class="link" href="s13.html#idx_id_33">L</a> <a class="link" href="s13.html#idx_id_34">M</a> <a class="link" href="s13.html#idx_id_35">N</a> <a class="link" href="s13.html#idx_id_37">P</a> <a class="link" href="s13.html#idx_id_39">R</a> <a class="link" href="s13.html#idx_id_40">S</a> <a class="link" href="s13.html#idx_id_41">T</a> <a class="link" href="s13.html#idx_id_42">U</a> <a class="link" href="s13.html#idx_id_44">W</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/math/doc/sf_and_dist/html/index/s14.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index/s14.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index/s14.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1456767"></a>Typedef Index</h2></div></div></div>
+<a name="id1518178"></a>Typedef Index</h2></div></div></div>
 <p><a class="link" href="s14.html#idx_id_46">A</a> <a class="link" href="s14.html#idx_id_47">B</a> <a class="link" href="s14.html#idx_id_48">C</a> <a class="link" href="s14.html#idx_id_49">D</a> <a class="link" href="s14.html#idx_id_50">E</a> <a class="link" href="s14.html#idx_id_51">F</a> <a class="link" href="s14.html#idx_id_52">G</a> <a class="link" href="s14.html#idx_id_53">H</a> <a class="link" href="s14.html#idx_id_54">I</a> <a class="link" href="s14.html#idx_id_56">L</a> <a class="link" href="s14.html#idx_id_58">N</a> <a class="link" href="s14.html#idx_id_59">O</a> <a class="link" href="s14.html#idx_id_60">P</a> <a class="link" href="s14.html#idx_id_62">R</a> <a class="link" href="s14.html#idx_id_63">S</a> <a class="link" href="s14.html#idx_id_64">T</a> <a class="link" href="s14.html#idx_id_65">U</a> <a class="link" href="s14.html#idx_id_66">V</a> <a class="link" href="s14.html#idx_id_67">W</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/math/doc/sf_and_dist/html/index/s15.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index/s15.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index/s15.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1459652"></a>Macro Index</h2></div></div></div>
+<a name="id1521062"></a>Macro Index</h2></div></div></div>
 <p><a class="link" href="s15.html#idx_id_70">B</a> <a class="link" href="s15.html#idx_id_74">F</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/math/doc/sf_and_dist/html/index/s16.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/index/s16.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/index/s16.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -23,7 +23,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1461088"></a>Index</h2></div></div></div>
+<a name="id1522498"></a>Index</h2></div></div></div>
 <p><a class="link" href="s16.html#idx_id_92">A</a> <a class="link" href="s16.html#idx_id_93">B</a> <a class="link" href="s16.html#idx_id_94">C</a> <a class="link" href="s16.html#idx_id_95">D</a> <a class="link" href="s16.html#idx_id_96">E</a> <a class="link" href="s16.html#idx_id_97">F</a> <a class="link" href="s16.html#idx_id_98">G</a> <a class="link" href="s16.html#idx_id_99">H</a> <a class="link" href="s16.html#idx_id_100">I</a> <a class="link" href="s16.html#idx_id_101">K</a> <a class="link" href="s16.html#idx_id_102">L</a> <a class="link" href="s16.html#idx_id_103">M</a> <a class="link" href="s16.html#idx_id_104">N</a> <a class="link" href="s16.html#idx_id_105">O</a> <a class="link" href="s16.html#idx_id_106">P</a> <a class="link" href="s16.html#idx_id_107">Q</a> <a class="link" href="s16.html#idx_id_108">R</a> <a class="link" href="s16.html#idx_id_109">S</a> <a class="link" href="s16.html#idx_id_110">T</a> <a class="link" href="s16.html#idx_id_111">U</a> <a class="link" href="s16.html#idx_id_112">V</a
> <a class="link" href="s16.html#idx_id_113">W</a> <a class="link" href="s16.html#idx_id_114">Z</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html (original)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -260,15 +260,6 @@
           <span class="inlinemediaobject"><img src="../../../../equations/zeta6.png"></span>
         </p>
 <p>
- except when the argument is close to 1, where the globally convergent series:
- </p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../equations/zeta2.png"></span>
- </p>
-<p>
- Is used.
- </p>
-<p>
           When the significand (mantissa) size is recognised (currently for 53, 64
           and 113-bit reals, plus single-precision 24-bit handled via promotion to
           double) then a series of rational approximations <a class="link" href="../../backgrounders/implementation.html#math_toolkit.backgrounders.implementation.rational_approximations_used">devised

Modified: trunk/libs/math/doc/sf_and_dist/zeta.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/zeta.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/zeta.qbk 2012-01-07 11:57:51 EST (Sat, 07 Jan 2012)
@@ -87,12 +87,6 @@
 
 [equation zeta6]
 
-except when the argument is close to 1, where the globally convergent series:
-
-[equation zeta2]
-
-Is used.
-
 When the significand (mantissa) size is recognised
 (currently for 53, 64 and 113-bit reals, plus single-precision 24-bit handled via promotion to double)
 then a series of rational approximations [jm_rationals] are used.


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