Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77851 - in sandbox/big_number/libs/multiprecision: doc doc/html doc/html/boost_multiprecision doc/html/boost_multiprecision/indexes doc/html/boost_multiprecision/map doc/html/boost_multiprecision/tut doc/html/boost_multiprecision/tut/floats doc/html/boost_multiprecision/tut/floats/fp_eg example example/generic_numerics_examples/generic_numerics_src
From: john_at_[hidden]
Date: 2012-04-09 12:58:32


Author: johnmaddock
Date: 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
New Revision: 77851
URL: http://svn.boost.org/trac/boost/changeset/77851

Log:
Integrate Chris's FP examples into the docs.
Added:
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/GI.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/aos.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/jel.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/nd.html (contents, props changed)
   sandbox/big_number/libs/multiprecision/doc/html4_symbols.qbk (contents, props changed)
Text files modified:
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html | 8
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html | 12
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html | 16
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html | 51 ++--
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html | 3
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut.html | 13 +
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html | 13 +
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html | 6
   sandbox/big_number/libs/multiprecision/doc/html/index.html | 15 +
   sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk | 44 ++++
   sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp | 373 +++++++++++++++++++++++++++++++++++++++
   sandbox/big_number/libs/multiprecision/example/generic_numerics_examples/generic_numerics_src/generic_integral.cpp | 75 ++++---
   13 files changed, 536 insertions(+), 99 deletions(-)

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -13,10 +13,10 @@
 <div class="spirit-nav">
 <a accesskey="p" href="../indexes.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s02.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id1095875">
+<div class="section id1089327">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1095875"></a>Function Index</h3></div></div></div>
-<p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_1">B</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_4">E</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_7">I</a> <a class="link" href="s01.html#idx_id_8">L</a> <a class="link" href="s01.html#idx_id_9">M</a> <a class="link" href="s01.html#idx_id_11">P</a> <a class="link" href="s01.html#idx_id_12">R</a> <a class="link" href="s01.html#idx_id_13">S</a> <a class="link" href="s01.html#idx_id_14">T</a> <a class="link" href="s01.html#idx_id_16">Z</a></p>
+<a name="id1089327"></a>Function Index</h3></div></div></div>
+<p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_1">B</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_4">E</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_7">I</a> <a class="link" href="s01.html#idx_id_8">L</a> <a class="link" href="s01.html#idx_id_9">M</a> <a class="link" href="s01.html#idx_id_11">P</a> <a class="link" href="s01.html#idx_id_12">R</a> <a class="link" href="s01.html#idx_id_13">S</a> <a class="link" href="s01.html#idx_id_14">T</a> <a class="link" href="s01.html#idx_id_15">Z</a></p>
 <div class="variablelist"><dl>
 <dt>
 <a name="idx_id_0"></a><span class="term">A</span>
@@ -207,7 +207,7 @@
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_16"></a><span class="term">Z</span>
+<a name="idx_id_15"></a><span class="term">Z</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">zero</span></p>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -13,13 +13,13 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s01.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id1097052">
+<div class="section id1090260">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1097052"></a>Class Index</h3></div></div></div>
-<p><a class="link" href="s02.html#idx_id_26">M</a> <a class="link" href="s02.html#idx_id_31">T</a></p>
+<a name="id1090260"></a>Class Index</h3></div></div></div>
+<p><a class="link" href="s02.html#idx_id_25">M</a> <a class="link" href="s02.html#idx_id_30">T</a></p>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_26"></a><span class="term">M</span>
+<a name="idx_id_25"></a><span class="term">M</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">mp_number</span></p>
@@ -29,11 +29,11 @@
 </ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_31"></a><span class="term">T</span>
+<a name="idx_id_30"></a><span class="term">T</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">type</span></p>
-<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/jel.html" title="Worked Example: defining a mathematical function."><span class="index-entry-level-1">Worked Example: defining a mathematical function.</span></a></p></li></ul></div>
+<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/fp_eg/jel.html" title="Defining a Lambda Function."><span class="index-entry-level-1">Defining a Lambda Function.</span></a></p></li></ul></div>
 </li></ul></div></dd>
 </dl></div>
 </div>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -13,13 +13,13 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s02.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
-<div class="section id1097139">
+<div class="section id1090347">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1097139"></a>Typedef Index</h3></div></div></div>
-<p><a class="link" href="s03.html#idx_id_36">C</a> <a class="link" href="s03.html#idx_id_41">I</a> <a class="link" href="s03.html#idx_id_42">L</a> <a class="link" href="s03.html#idx_id_43">M</a> <a class="link" href="s03.html#idx_id_48">T</a></p>
+<a name="id1090347"></a>Typedef Index</h3></div></div></div>
+<p><a class="link" href="s03.html#idx_id_34">C</a> <a class="link" href="s03.html#idx_id_39">I</a> <a class="link" href="s03.html#idx_id_40">L</a> <a class="link" href="s03.html#idx_id_41">M</a> <a class="link" href="s03.html#idx_id_46">T</a></p>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_36"></a><span class="term">C</span>
+<a name="idx_id_34"></a><span class="term">C</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -47,21 +47,21 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_41"></a><span class="term">I</span>
+<a name="idx_id_39"></a><span class="term">I</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">int_type</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/primetest.html" title="Primality Testing"><span class="index-entry-level-1">Primality Testing</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_42"></a><span class="term">L</span>
+<a name="idx_id_40"></a><span class="term">L</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">limb_type</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/ints/cpp_int.html" title="cpp_int"><span class="index-entry-level-1">cpp_int</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_43"></a><span class="term">M</span>
+<a name="idx_id_41"></a><span class="term">M</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -161,7 +161,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_48"></a><span class="term">T</span>
+<a name="idx_id_46"></a><span class="term">T</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/rational/tommath_rational.html" title="tommath_rational"><span class="index-entry-level-0">tommath_rational</span></a></p></li>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -12,20 +12,20 @@
 <div class="spirit-nav">
 <a accesskey="p" href="s03.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
 </div>
-<div class="section id1097830">
+<div class="section id1091126">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1097830"></a>Index</h3></div></div></div>
-<p><a class="link" href="s04.html#idx_id_51">A</a> <a class="link" href="s04.html#idx_id_52">B</a> <a class="link" href="s04.html#idx_id_53">C</a> <a class="link" href="s04.html#idx_id_54">D</a> <a class="link" href="s04.html#idx_id_55">E</a> <a class="link" href="s04.html#idx_id_56">F</a> <a class="link" href="s04.html#idx_id_57">G</a> <a class="link" href="s04.html#idx_id_58">I</a> <a class="link" href="s04.html#idx_id_59">L</a> <a class="link" href="s04.html#idx_id_60">M</a> <a class="link" href="s04.html#idx_id_61">O</a> <a class="link" href="s04.html#idx_id_62">P</a> <a class="link" href="s04.html#idx_id_63">R</a> <a class="link" href="s04.html#idx_id_64">S</a> <a class="link" href="s04.html#idx_id_65">T</a> <a class="link" href="s04.html#idx_id_66">W</a> <a class="link" href="s04.html#idx_id_67">Z</a></p>
+<a name="id1091126"></a>Index</h3></div></div></div>
+<p><a class="link" href="s04.html#idx_id_48">A</a> <a class="link" href="s04.html#idx_id_49">B</a> <a class="link" href="s04.html#idx_id_50">C</a> <a class="link" href="s04.html#idx_id_51">D</a> <a class="link" href="s04.html#idx_id_52">E</a> <a class="link" href="s04.html#idx_id_53">F</a> <a class="link" href="s04.html#idx_id_54">G</a> <a class="link" href="s04.html#idx_id_55">I</a> <a class="link" href="s04.html#idx_id_56">L</a> <a class="link" href="s04.html#idx_id_57">M</a> <a class="link" href="s04.html#idx_id_58">O</a> <a class="link" href="s04.html#idx_id_59">P</a> <a class="link" href="s04.html#idx_id_60">R</a> <a class="link" href="s04.html#idx_id_61">S</a> <a class="link" href="s04.html#idx_id_62">T</a> <a class="link" href="s04.html#idx_id_63">Z</a></p>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_51"></a><span class="term">A</span>
+<a name="idx_id_48"></a><span class="term">A</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">abs</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_52"></a><span class="term">B</span>
+<a name="idx_id_49"></a><span class="term">B</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -50,7 +50,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_53"></a><span class="term">C</span>
+<a name="idx_id_50"></a><span class="term">C</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -106,7 +106,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_54"></a><span class="term">D</span>
+<a name="idx_id_51"></a><span class="term">D</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -123,26 +123,30 @@
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li>
 <li class="listitem" style="list-style-type: none">
+<p><span class="index-entry-level-0">Defining a Lambda Function.</span></p>
+<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/fp_eg/jel.html" title="Defining a Lambda Function."><span class="index-entry-level-1">type</span></a></p></li></ul></div>
+</li>
+<li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">divide_qr</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_55"></a><span class="term">E</span>
+<a name="idx_id_52"></a><span class="term">E</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">eval_get_sign</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/backendconc.html#boost_multiprecision.ref.backendconc.optional_requirements_on_the_backend_type" title="Table&#160;1.5.&#160;Optional Requirements on the Backend Type"><span class="index-entry-level-1">Optional Requirements on the Backend Type</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_56"></a><span class="term">F</span>
+<a name="idx_id_53"></a><span class="term">F</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">fpclassify</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_57"></a><span class="term">G</span>
+<a name="idx_id_54"></a><span class="term">G</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -175,7 +179,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_58"></a><span class="term">I</span>
+<a name="idx_id_55"></a><span class="term">I</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -223,7 +227,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_59"></a><span class="term">L</span>
+<a name="idx_id_56"></a><span class="term">L</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -252,7 +256,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_60"></a><span class="term">M</span>
+<a name="idx_id_57"></a><span class="term">M</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -410,14 +414,14 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_61"></a><span class="term">O</span>
+<a name="idx_id_58"></a><span class="term">O</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">Optional Requirements on the Backend Type</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/backendconc.html#boost_multiprecision.ref.backendconc.optional_requirements_on_the_backend_type" title="Table&#160;1.5.&#160;Optional Requirements on the Backend Type"><span class="index-entry-level-1">eval_get_sign</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_62"></a><span class="term">P</span>
+<a name="idx_id_59"></a><span class="term">P</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -437,14 +441,14 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_63"></a><span class="term">R</span>
+<a name="idx_id_60"></a><span class="term">R</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">round</span></p>
 <div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></p></li></ul></div>
 </li></ul></div></dd>
 <dt>
-<a name="idx_id_64"></a><span class="term">S</span>
+<a name="idx_id_61"></a><span class="term">S</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -461,7 +465,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_65"></a><span class="term">T</span>
+<a name="idx_id_62"></a><span class="term">T</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact>
 <li class="listitem" style="list-style-type: none">
@@ -489,18 +493,11 @@
 </li>
 <li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">type</span></p>
-<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/jel.html" title="Worked Example: defining a mathematical function."><span class="index-entry-level-1">Worked Example: defining a mathematical function.</span></a></p></li></ul></div>
+<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/fp_eg/jel.html" title="Defining a Lambda Function."><span class="index-entry-level-1">Defining a Lambda Function.</span></a></p></li></ul></div>
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_66"></a><span class="term">W</span>
-</dt>
-<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
-<p><span class="index-entry-level-0">Worked Example: defining a mathematical function.</span></p>
-<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../tut/floats/jel.html" title="Worked Example: defining a mathematical function."><span class="index-entry-level-1">type</span></a></p></li></ul></div>
-</li></ul></div></dd>
-<dt>
-<a name="idx_id_67"></a><span class="term">Z</span>
+<a name="idx_id_63"></a><span class="term">Z</span>
 </dt>
 <dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
 <p><span class="index-entry-level-0">zero</span></p>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/map/todo.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -83,6 +83,9 @@
 <li class="listitem">
             Should there be a choice of rounding mode (probably MPFR specific)?
           </li>
+<li class="listitem">
+ Document limits on size of cpp_dec_float.
+ </li>
 </ul></div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -29,8 +29,17 @@
 <dt><span class="section">gmp_float</span></dt>
 <dt><span class="section">mpfr_float</span></dt>
 <dt><span class="section">cpp_dec_float</span></dt>
-<dt><span class="section"><a href="tut/floats/jel.html">Worked Example:
- defining a mathematical function.</a></span></dt>
+<dt><span class="section">Examples</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="tut/floats/fp_eg/aos.html">Area of
+ Circle</a></span></dt>
+<dt><span class="section"><a href="tut/floats/fp_eg/jel.html">Defining
+ a Lambda Function.</a></span></dt>
+<dt><span class="section"><a href="tut/floats/fp_eg/nd.html">Calculating
+ a Derivative</a></span></dt>
+<dt><span class="section"><a href="tut/floats/fp_eg/GI.html">Calculating
+ an Integral</a></span></dt>
+</dl></dd>
 </dl></dd>
 <dt><span class="section">Rational Number Types</span></dt>
 <dd><dl>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -21,8 +21,17 @@
 <dt><span class="section">gmp_float</span></dt>
 <dt><span class="section">mpfr_float</span></dt>
 <dt><span class="section">cpp_dec_float</span></dt>
-<dt><span class="section"><a href="floats/jel.html">Worked Example:
- defining a mathematical function.</a></span></dt>
+<dt><span class="section">Examples</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="floats/fp_eg/aos.html">Area of
+ Circle</a></span></dt>
+<dt><span class="section"><a href="floats/fp_eg/jel.html">Defining
+ a Lambda Function.</a></span></dt>
+<dt><span class="section"><a href="floats/fp_eg/nd.html">Calculating
+ a Derivative</a></span></dt>
+<dt><span class="section"><a href="floats/fp_eg/GI.html">Calculating
+ an Integral</a></span></dt>
+</dl></dd>
 </dl></div>
 <p>
         The following back-ends provide floating point arithmetic:

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -7,11 +7,11 @@
 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../floats.html" title="Floating Point Numbers">
 <link rel="prev" href="mpfr_float.html" title="mpfr_float">
-<link rel="next" href="jel.html" title="Worked Example: defining a mathematical function.">
+<link rel="next" href="fp_eg.html" title="Examples">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="mpfr_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="jel.html"><img src="../../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="mpfr_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fp_eg.html"><img src="../../../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_tut_floats_cpp_dec_float">
 <div class="titlepage"><div><div><h4 class="title">
@@ -111,7 +111,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="mpfr_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="jel.html"><img src="../../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="mpfr_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fp_eg.html"><img src="../../../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,44 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Examples</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../floats.html" title="Floating Point Numbers">
+<link rel="prev" href="cpp_dec_float.html" title="cpp_dec_float">
+<link rel="next" href="fp_eg/aos.html" title="Area of Circle">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="cpp_dec_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fp_eg/aos.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_fp_eg">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_multiprecision.tut.floats.fp_eg"></a><a class="link" href="fp_eg.html" title="Examples">Examples</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="fp_eg/aos.html">Area of
+ Circle</a></span></dt>
+<dt><span class="section"><a href="fp_eg/jel.html">Defining
+ a Lambda Function.</a></span></dt>
+<dt><span class="section"><a href="fp_eg/nd.html">Calculating
+ a Derivative</a></span></dt>
+<dt><span class="section"><a href="fp_eg/GI.html">Calculating
+ an Integral</a></span></dt>
+</dl></div>
+</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 &#169; 2002-2012 John Maddock 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="cpp_dec_float.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../floats.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fp_eg/aos.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/GI.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/GI.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,161 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Calculating an Integral</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../fp_eg.html" title="Examples">
+<link rel="prev" href="nd.html" title="Calculating a Derivative">
+<link rel="next" href="../../rational.html" title="Rational Number Types">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="nd.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../rational.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_fp_eg_GI">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_multiprecision.tut.floats.fp_eg.GI"></a><a class="link" href="GI.html" title="Calculating an Integral">Calculating
+ an Integral</a>
+</h5></div></div></div>
+<p>
+ Similar to the generic derivative example, we can calculate integrals
+ in a similar manner:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">function_type</span><span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">value_type</span> <span class="identifier">integral</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">a</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">b</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">tol</span><span class="special">,</span>
+ <span class="identifier">function_type</span> <span class="identifier">func</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">unsigned</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">1U</span><span class="special">;</span>
+
+ <span class="identifier">value_type</span> <span class="identifier">h</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">b</span> <span class="special">-</span> <span class="identifier">a</span><span class="special">);</span>
+ <span class="identifier">value_type</span> <span class="identifier">I</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">func</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">func</span><span class="special">(</span><span class="identifier">b</span><span class="special">))</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">h</span> <span class="special">/</span> <span class="number">2</span><span class="special">);</span>
+
+ <span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">k</span> <span class="special">=</span> <span class="number">0U</span><span class="special">;</span> <span class="identifier">k</span> <span class="special">&lt;</span> <span class="number">8U</span><span class="special">;</span> <span class="identifier">k</span><span class="special">++)</span>
+ <span class="special">{</span>
+ <span class="identifier">h</span> <span class="special">/=</span> <span class="number">2</span><span class="special">;</span>
+
+ <span class="identifier">value_type</span> <span class="identifier">sum</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
+ <span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">1U</span><span class="special">;</span> <span class="identifier">j</span> <span class="special">&lt;=</span> <span class="identifier">n</span><span class="special">;</span> <span class="identifier">j</span><span class="special">++)</span>
+ <span class="special">{</span>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">func</span><span class="special">(</span><span class="identifier">a</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">value_type</span><span class="special">((</span><span class="identifier">j</span> <span class="special">*</span> <span class="number">2</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">h</span><span class="special">));</span>
+ <span class="special">}</span>
+
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">I0</span> <span class="special">=</span> <span class="identifier">I</span><span class="special">;</span>
+ <span class="identifier">I</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">I</span> <span class="special">/</span> <span class="number">2</span><span class="special">)</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">h</span> <span class="special">*</span> <span class="identifier">sum</span><span class="special">);</span>
+
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">ratio</span> <span class="special">=</span> <span class="identifier">I0</span> <span class="special">/</span> <span class="identifier">I</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">delta</span> <span class="special">=</span> <span class="identifier">ratio</span> <span class="special">-</span> <span class="number">1</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">delta_abs</span> <span class="special">=</span> <span class="special">((</span><span class="identifier">delta</span> <span class="special">&lt;</span> <span class="number">0</span><span class="special">)</span> <span class="special">?</span> <span class="special">-</span><span class="identifier">delta</span> <span class="special">:</span> <span class="identifier">delta</span><span class="special">);</span>
+
+ <span class="keyword">if</span><span class="special">((</span><span class="identifier">k</span> <span class="special">&gt;</span> <span class="number">1U</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">(</span><span class="identifier">delta_abs</span> <span class="special">&lt;</span> <span class="identifier">tol</span><span class="special">))</span>
+ <span class="special">{</span>
+ <span class="keyword">break</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">n</span> <span class="special">*=</span> <span class="number">2U</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">return</span> <span class="identifier">I</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The following sample program shows how the function can be called, we
+ begin by defining a function object, which when integrated should yield
+ the Bessel J function:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">cyl_bessel_j_integral_rep</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">cyl_bessel_j_integral_rep</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">N</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">X</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">n</span><span class="special">(</span><span class="identifier">N</span><span class="special">),</span> <span class="identifier">x</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
+
+ <span class="identifier">value_type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="comment">// pi * Jn(x) = Int_0^pi [cos(x * sin(t) - n*t) dt]</span>
+ <span class="keyword">return</span> <span class="identifier">cos</span><span class="special">(</span><span class="identifier">x</span> <span class="special">*</span> <span class="identifier">sin</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span> <span class="special">-</span> <span class="special">(</span><span class="identifier">n</span> <span class="special">*</span> <span class="identifier">t</span><span class="special">));</span>
+ <span class="special">}</span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">x</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+</p>
+<pre class="programlisting"> <span class="comment">/* The function can now be called as follows: */</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">**)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span> <span class="identifier">mp_type</span><span class="special">;</span>
+
+ <span class="keyword">const</span> <span class="keyword">float</span> <span class="identifier">j2_f</span> <span class="special">=</span>
+ <span class="identifier">integral</span><span class="special">(</span><span class="number">0.0F</span><span class="special">,</span>
+ <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;(),</span>
+ <span class="number">0.01F</span><span class="special">,</span>
+ <span class="identifier">cyl_bessel_j_integral_rep</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;(</span><span class="number">2U</span><span class="special">,</span> <span class="number">1.23F</span><span class="special">))</span> <span class="special">/</span> <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;();</span>
+
+ <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">j2_d</span> <span class="special">=</span>
+ <span class="identifier">integral</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span>
+ <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;(),</span>
+ <span class="number">0.0001</span><span class="special">,</span>
+ <span class="identifier">cyl_bessel_j_integral_rep</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;(</span><span class="number">2U</span><span class="special">,</span> <span class="number">1.23</span><span class="special">))</span> <span class="special">/</span> <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;();</span>
+
+ <span class="keyword">const</span> <span class="identifier">mp_type</span> <span class="identifier">j2_mp</span> <span class="special">=</span>
+ <span class="identifier">integral</span><span class="special">(</span><span class="identifier">mp_type</span><span class="special">(</span><span class="number">0</span><span class="special">),</span>
+ <span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">mp_type</span><span class="special">&gt;(),</span>
+ <span class="identifier">mp_type</span><span class="special">(</span><span class="number">1.0E-20</span><span class="special">),</span>
+ <span class="identifier">cyl_bessel_j_integral_rep</span><span class="special">&lt;</span><span class="identifier">mp_type</span><span class="special">&gt;(</span><span class="number">2U</span><span class="special">,</span> <span class="identifier">mp_type</span><span class="special">(</span><span class="number">123</span><span class="special">)</span> <span class="special">/</span> <span class="number">100</span><span class="special">))</span> <span class="special">/</span> <span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">mp_type</span><span class="special">&gt;();</span>
+
+ <span class="comment">// 0.166369</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">j2_f</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 0.166369383786814</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">j2_d</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 0.16636938378681407351267852431513159437103348245333</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">mp_type</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">j2_mp</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">//</span>
+ <span class="comment">// Print true value for comparison:</span>
+ <span class="comment">// 0.166369383786814073512678524315131594371033482453329</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cyl_bessel_j</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="identifier">mp_type</span><span class="special">(</span><span class="number">123</span><span class="special">)</span> <span class="special">/</span> <span class="number">100</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </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 &#169; 2002-2012 John Maddock 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="nd.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../rational.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/aos.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/aos.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,118 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Area of Circle</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../fp_eg.html" title="Examples">
+<link rel="prev" href="../fp_eg.html" title="Examples">
+<link rel="next" href="jel.html" title="Defining a Lambda Function.">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="../fp_eg.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="jel.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_fp_eg_aos">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_multiprecision.tut.floats.fp_eg.aos"></a><a class="link" href="aos.html" title="Area of Circle">Area of
+ Circle</a>
+</h5></div></div></div>
+<p>
+ Generic numeric programming employs templates to use the same code for
+ different floating-point types and functions. Consider the area of a
+ circle a of radius r, given by
+ </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="emphasis"><em>a = &#960; * r<sup>2</sup></em></span>
+ </p></blockquote></div>
+<p>
+ The area of a circle can be computed in generic programming using Boost.Math
+ for the constant &#960; as shown below:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">constants</span><span class="special">/</span><span class="identifier">constants</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">area_of_a_circle</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">r</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;()</span> <span class="special">*</span> <span class="identifier">r</span> <span class="special">*</span> <span class="identifier">r</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ It is possible to use <code class="computeroutput"><span class="identifier">area_of_a_circle</span><span class="special">()</span></code> with built-in floating-point types
+ as well as floating-point types from Boost.Multiprecision. In particular,
+ consider a system with 4-byte single-precision float, 8-byte double-precision
+ double and also the <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code>
+ data type from Boost.Multiprecision with 50 decimal digits of precision.
+ </p>
+<p>
+ We can compute and print the approximate area of a circle with radius
+ 123/100 for <code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code> and <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code>
+ with the program below.
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iomanip</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">cpp_dec_float</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">**)</span>
+<span class="special">{</span>
+ <span class="keyword">const</span> <span class="keyword">float</span> <span class="identifier">r_f</span><span class="special">(</span><span class="keyword">float</span><span class="special">(</span><span class="number">123</span><span class="special">)</span> <span class="special">/</span> <span class="number">100</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="keyword">float</span> <span class="identifier">a_f</span> <span class="special">=</span> <span class="identifier">area_of_a_circle</span><span class="special">(</span><span class="identifier">r_f</span><span class="special">);</span>
+
+ <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">r_d</span><span class="special">(</span><span class="keyword">double</span><span class="special">(</span><span class="number">123</span><span class="special">)</span> <span class="special">/</span> <span class="number">100</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">a_d</span> <span class="special">=</span> <span class="identifier">area_of_a_circle</span><span class="special">(</span><span class="identifier">r_d</span><span class="special">);</span>
+
+ <span class="keyword">const</span> <span class="identifier">cpp_dec_float_50</span> <span class="identifier">r_mp</span><span class="special">(</span><span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">123</span><span class="special">)</span> <span class="special">/</span> <span class="number">100</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="identifier">cpp_dec_float_50</span> <span class="identifier">a_mp</span> <span class="special">=</span> <span class="identifier">area_of_a_circle</span><span class="special">(</span><span class="identifier">r_mp</span><span class="special">);</span>
+
+ <span class="comment">// 4.75292</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">a_f</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 4.752915525616</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">a_d</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 4.7529155256159981904701331745635599135018975843146</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">a_mp</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ In the next example we'll look at calling both standard library and Boost.Math
+ functions from within generic code. We'll also show how to cope with
+ template arguments which are expression-templates rather than number
+ types.
+ </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 &#169; 2002-2012 John Maddock 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="../fp_eg.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="jel.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/jel.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/jel.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,222 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Defining a Lambda Function.</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../fp_eg.html" title="Examples">
+<link rel="prev" href="aos.html" title="Area of Circle">
+<link rel="next" href="nd.html" title="Calculating a Derivative">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="aos.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="nd.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_fp_eg_jel">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_multiprecision.tut.floats.fp_eg.jel"></a><a class="link" href="jel.html" title="Defining a Lambda Function.">Defining
+ a Lambda Function.</a>
+</h5></div></div></div>
+<p>
+ In this example we'll show several implementations of the <a href="http://mathworld.wolfram.com/LambdaFunction.html" target="_top">Jahnke
+ and Emden Lambda function</a>, each implementation a little more
+ sophisticated than the last.
+ </p>
+<p>
+ The Jahnke-Emden Lambda function is defined by the equation:
+ </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="emphasis"><em>JahnkeEmden(v, z) = &#915;(v+1) * J<sub>v</sub>(z) / (z / 2)<sup>v</sup></em></span>
+ </p></blockquote></div>
+<p>
+ If we were to implement this at double precision using Boost.Math's facilities
+ for the Gamma and Bessel function calls it would look like this:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">JEL1</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">z</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tgamma</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">1</span><span class="special">)</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">cyl_bessel_j</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span><span class="special">(</span><span class="identifier">z</span> <span class="special">/</span> <span class="number">2</span><span class="special">,</span>
<span class="identifier">v</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ Calling this function as:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">JEL1</span><span class="special">(</span><span class="number">2.5</span><span class="special">,</span> <span class="number">0.5</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ Yields the output:
+ </p>
+<pre class="programlisting">9.822663964796047e-001</pre>
+<p>
+ Now lets implement the function again, but this time using the multiprecision
+ type <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code>
+ as the argument type:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span>
+ <span class="identifier">JEL2</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span> <span class="identifier">z</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tgamma</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">1</span><span class="special">)</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">cyl_bessel_j</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">pow</span><span class="special">(</span><span class="identifier">z</span> <span class=
"special">/</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The implementation is almost the same as before, but with one key difference
+ - we can no longer call <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>,
+ instead we must call the version inside the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span></code>
+ namespace. In point of fact, we could have omitted the namespace prefix
+ on the call to <code class="computeroutput"><span class="identifier">pow</span></code> since
+ the right overload would have been found via <a href="http://en.wikipedia.org/wiki/Argument-dependent_name_lookup" target="_top">argument
+ dependent lookup</a> in any case.
+ </p>
+<p>
+ Note also that the first argument to <code class="computeroutput"><span class="identifier">pow</span></code>
+ along with the argument to <code class="computeroutput"><span class="identifier">tgamma</span></code>
+ in the above code are actually expression templates. The <code class="computeroutput"><span class="identifier">pow</span></code> and <code class="computeroutput"><span class="identifier">tgamma</span></code>
+ functions will handle these arguments just fine.
+ </p>
+<p>
+ Here's an example of how the function may be called:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">JEL2</span><span class="special">(</span><span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">2.5</span><span class="special">),</span> <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">0.5</span><span class="special">))</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ Which outputs:
+ </p>
+<pre class="programlisting">9.82266396479604757017335009796882833995903762577173e-01</pre>
+<p>
+ Now that we've seen some non-template examples, lets repeat the code
+ again, but this time as a template that can be called either with a builtin
+ type (<code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code> etc), or with a multiprecision
+ type:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Float</span><span class="special">&gt;</span>
+<span class="identifier">Float</span> <span class="identifier">JEL3</span><span class="special">(</span><span class="identifier">Float</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">Float</span> <span class="identifier">z</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tgamma</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">1</span><span class="special">)</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">cyl_bessel_j</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">pow</span><span class="special">(</span><span class="identifier">z</span> <span class="special">/</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ Once again the code is almost the same as before, but the call to <code class="computeroutput"><span class="identifier">pow</span></code> has changed yet again. We need
+ the call to resolve to either <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>
+ (when the argument is a builtin type), or to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">pow</span></code>
+ (when the argument is a multiprecision type). We do that by making the
+ call unqualified so that versions of <code class="computeroutput"><span class="identifier">pow</span></code>
+ defined in the same namespace as type <code class="computeroutput"><span class="identifier">Float</span></code>
+ are found via argument dependent lookup, while the <code class="computeroutput"><span class="keyword">using</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code> directive makes the standard library
+ versions visible for builtin floating point types.
+ </p>
+<p>
+ Let's call the function with both <code class="computeroutput"><span class="keyword">double</span></code>
+ and multiprecision arguments:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">JEL3</span><span class="special">(</span><span class="number">2.5</span><span class="special">,</span> <span class="number">0.5</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">JEL3</span><span class="special">(</span><span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">2.5</span><span class="special">),</span> <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">0.5</span><span class="special">))</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ Which outputs:
+ </p>
+<pre class="programlisting">9.822663964796047e-001
+9.82266396479604757017335009796882833995903762577173e-01
+</pre>
+<p>
+ Unfortunately there is a problem with this version: if we were to call
+ it like this:
+ </p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span> <span class="identifier">v</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="identifier">z</span><span class="special">(</span><span class="number">0.5</span><span class="special">);</span>
+<span class="identifier">JEL3</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">0.5</span><span class="special">,</span> <span class="identifier">z</span><span class="special">);</span>
+</pre>
+<p>
+ Then we would get a long and inscrutable error message from the compiler:
+ the problem here is that the first argument to <code class="computeroutput"><span class="identifier">JEL3</span></code>
+ is not a number type, but an expression template. We could obviously
+ add a typecast to fix the issue:
+ </p>
+<pre class="programlisting"><span class="identifier">JEL</span><span class="special">(</span><span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">0.5</span><span class="special">),</span> <span class="identifier">z</span><span class="special">);</span>
+</pre>
+<p>
+ However, if we want the function JEL to be truely reusable, then a better
+ solution might be preferred. To achieve this we can borrow some code
+ from Boost.Math which calculates the return type of mixed-argument functions,
+ here's how the new code looks now:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Float1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Float2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tools</span><span class="special">::</span><span class="identifier">promote_args</span><span class="special">&lt;</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">JEL4</span><span class="special">(</span><span class="identifier">Float1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">Float2</span> <span class="identifier">z</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tgamma</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">1</span><span class="special">)</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">cyl_bessel_j</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">pow</span><span class="special">(</span><span class="identifier">z</span> <span class="special">/</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ As you can see the two arguments to the function are now separate template
+ types, and the return type is computed using the <code class="computeroutput"><span class="identifier">promote_args</span></code>
+ metafunction from Boost.Math.
+ </p>
+<p>
+ Now we can call:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_100</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">JEL4</span><span class="special">(</span><span class="identifier">cpp_dec_float_100</span><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">+</span> <span class="number">0.5</span><span class="special">,</span> <span class="identifier">cpp_dec_float_100</span><span class="special">(</span><span class="number">0.5</span><span class="special">))</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ And get 100 digits of output:
+ </p>
+<pre class="programlisting">9.8226639647960475701733500979688283399590376257717309069410413822165082248153638454147004236848917775e-01</pre>
+<p>
+ As a bonus, we can now call the function not just with expression templates,
+ but with other mixed types as well: for example <code class="computeroutput"><span class="keyword">float</span></code>
+ and <code class="computeroutput"><span class="keyword">double</span></code> or <code class="computeroutput"><span class="keyword">int</span></code> and <code class="computeroutput"><span class="keyword">double</span></code>,
+ and the correct return type will be computed in each case.
+ </p>
+<p>
+ Note that while in this case we didn't have to change the body of the
+ function, in the general case any function like this which creates local
+ variables internally would have to use <code class="computeroutput"><span class="identifier">promote_args</span></code>
+ to work out what type those variables should be, for example:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Float1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Float2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tools</span><span class="special">::</span><span class="identifier">promote_args</span><span class="special">&lt;</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">JEL5</span><span class="special">(</span><span class="identifier">Float1</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">Float2</span> <span class="identifier">z</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tools</span><span class="special">::</span><span class="identifier">promote_args</span><span class="special">&lt;</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">variable_type</span><span class="special">;</span>
+ <span class="identifier">variable_type</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">pow</span><span class="special">(</span><span class="identifier">z</span> <span class="special">/</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tgamma</span><span class="special">(</span><span class="identifier">v</span> <span class="special">+</span> <span class="number">1</span><span class="special">)</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">cyl_bessel_j</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+</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 &#169; 2002-2012 John Maddock 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="aos.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="nd.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/nd.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/nd.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,202 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Calculating a Derivative</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
+<link rel="up" href="../fp_eg.html" title="Examples">
+<link rel="prev" href="jel.html" title="Defining a Lambda Function.">
+<link rel="next" href="GI.html" title="Calculating an Integral">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="jel.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="GI.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_fp_eg_nd">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_multiprecision.tut.floats.fp_eg.nd"></a><a class="link" href="nd.html" title="Calculating a Derivative">Calculating
+ a Derivative</a>
+</h5></div></div></div>
+<p>
+ In this example we'll add even more power to generic numeric programming
+ using not only different floating-point types but also function objects
+ as template parameters. Consider some well-known central difference rules
+ for numerically computing the first derivative of a function <span class="emphasis"><em>f&#8242;(x)</em></span>
+ with <span class="emphasis"><em>x &#8712; &#8476;</em></span>:
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../floating_point_eg1.png"></span>
+ </p>
+<p>
+ Where the difference terms <span class="emphasis"><em>m<sub>n</sub></em></span> are given by:
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../floating_point_eg2.png"></span>
+ </p>
+<p>
+ and <span class="emphasis"><em>dx</em></span> is the step-size of the derivative.
+ </p>
+<p>
+ The third formula in Equation 1 is a three-point central difference rule.
+ It calculates the first derivative of <span class="emphasis"><em>f&#8242;(x)</em></span> to <span class="emphasis"><em>O(dx<sup>6</sup>)</em></span>,
+ where <span class="emphasis"><em>dx</em></span> is the given step-size. For example, if
+ the step-size is 0.01 this derivative calculation has about 6 decimal
+ digits of precision - just about right for the 7 decimal digits of single-precision
+ float. Let's make a generic template subroutine using this three-point
+ central difference rule. In particular:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">function_type</span><span class="special">&gt;</span>
+ <span class="identifier">value_type</span> <span class="identifier">derivative</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dx</span><span class="special">,</span> <span class="identifier">function_type</span> <span class="identifier">func</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="comment">// Compute d/dx[func(*first)] using a three-point</span>
+ <span class="comment">// central difference rule of O(dx^6).</span>
+
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dx1</span> <span class="special">=</span> <span class="identifier">dx</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dx2</span> <span class="special">=</span> <span class="identifier">dx1</span> <span class="special">*</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dx3</span> <span class="special">=</span> <span class="identifier">dx1</span> <span class="special">*</span> <span class="number">3</span><span class="special">;</span>
+
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">m1</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">dx1</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">-</span> <span class="identifier">dx1</span><span class="special">))</span> <span class="special">/</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">m2</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">dx2</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">-</span> <span class="identifier">dx2</span><span class="special">))</span> <span class="special">/</span> <span class="number">4</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">m3</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">dx3</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">func</span><span class="special">(</span><span class="identifier">x</span> <span class="special">-</span> <span class="identifier">dx3</span><span class="special">))</span> <span class="special">/</span> <span class="number">6</span><span class="special">;</span>
+
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">fifteen_m1</span> <span class="special">=</span> <span class="number">15</span> <span class="special">*</span> <span class="identifier">m1</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">six_m2</span> <span class="special">=</span> <span class="number">6</span> <span class="special">*</span> <span class="identifier">m2</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">ten_dx1</span> <span class="special">=</span> <span class="number">10</span> <span class="special">*</span> <span class="identifier">dx1</span><span class="special">;</span>
+
+ <span class="keyword">return</span> <span class="special">((</span><span class="identifier">fifteen_m1</span> <span class="special">-</span> <span class="identifier">six_m2</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">m3</span><span class="special">)</span> <span class="special">/</span> <span class="identifier">ten_dx1</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">derivative</span><span class="special">()</span></code>
+ template function can be used to compute the first derivative of any
+ function to <span class="emphasis"><em>O(dx<sup>6</sup>)</em></span>. For example, consider the first
+ derivative of <span class="emphasis"><em>sin(x)</em></span> evaluated at <span class="emphasis"><em>x =
+ &#960;/3</em></span>. In other words,
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../floating_point_eg3.png"></span>
+ </p>
+<p>
+ The code below computes the derivative in Equation 3 for float, double
+ and boost's multiple-precision type cpp_dec_float_50.
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iomanip</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">multiprecision</span><span class="special">/</span><span class="identifier">cpp_dec_float</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">constants</span><span class="special">/</span><span class="identifier">constants</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">**)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiprecision</span><span class="special">::</span><span class="identifier">cpp_dec_float_50</span><span class="special">;</span>
+ <span class="comment">//</span>
+ <span class="comment">// We'll pass a function pointer for the function object passed to derivative,</span>
+ <span class="comment">// the typecast is needed to select the correct overload of std::sin:</span>
+ <span class="comment">//</span>
+ <span class="keyword">const</span> <span class="keyword">float</span> <span class="identifier">d_f</span> <span class="special">=</span> <span class="identifier">derivative</span><span class="special">(</span>
+ <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;()</span> <span class="special">/</span> <span class="number">3</span><span class="special">,</span>
+ <span class="number">0.01F</span><span class="special">,</span>
+ <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">(*)(</span><span class="keyword">float</span><span class="special">)&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">sin</span><span class="special">)</span>
+ <span class="special">);</span>
+
+ <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">d_d</span> <span class="special">=</span> <span class="identifier">derivative</span><span class="special">(</span>
+ <span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;()</span> <span class="special">/</span> <span class="number">3</span><span class="special">,</span>
+ <span class="number">0.001</span><span class="special">,</span>
+ <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">(*)(</span><span class="keyword">double</span><span class="special">)&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">sin</span><span class="special">)</span>
+ <span class="special">);</span>
+ <span class="comment">//</span>
+ <span class="comment">// In the cpp_dec_float_50 case, the sin function is multiply overloaded</span>
+ <span class="comment">// to handle expression templates etc. As a result it's hard to take it's</span>
+ <span class="comment">// address without knowing about its implementation details. We'll use a </span>
+ <span class="comment">// C++11 lambda expression to capture the call.</span>
+ <span class="comment">// We also need a typecast on the first argument so we don't accidently pass</span>
+ <span class="comment">// an expression template to a template function:</span>
+ <span class="comment">//</span>
+ <span class="keyword">const</span> <span class="identifier">cpp_dec_float_50</span> <span class="identifier">d_mp</span> <span class="special">=</span> <span class="identifier">derivative</span><span class="special">(</span>
+ <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;()</span> <span class="special">/</span> <span class="number">3</span><span class="special">),</span>
+ <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">1.0E-9</span><span class="special">),</span>
+ <span class="special">[](</span><span class="keyword">const</span> <span class="identifier">cpp_dec_float_50</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">-&gt;</span> <span class="identifier">cpp_dec_float_50</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">sin</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="special">);</span>
+
+ <span class="comment">// 5.000029e-001</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">d_f</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 4.999999999998876e-001</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">d_d</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// 4.99999999999999999999999999999999999999999999999999e-01</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">d_mp</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The expected value of the derivative is 0.5. This central difference
+ rule in this example is ill-conditioned, meaning it suffers from slight
+ loss of precision. With that in mind, the results agree with the expected
+ value of 0.5.
+ </p>
+<p>
+ We can take this a step further and use our derivative function to compute
+ a partial derivative. For example if we take the incomplete gamma function
+ <span class="emphasis"><em>P(a, z)</em></span>, and take the derivative with respect to
+ <span class="emphasis"><em>z</em></span> at <span class="emphasis"><em>(2,2)</em></span> then we can calculate
+ the result as shown below, for good measure we'll compare with the "correct"
+ result obtained from a call to <span class="emphasis"><em>gamma_p_derivative</em></span>,
+ the results agree to approximately 44 digits:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">cpp_dec_float_50</span> <span class="identifier">gd</span> <span class="special">=</span> <span class="identifier">derivative</span><span class="special">(</span>
+ <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">2</span><span class="special">),</span>
+ <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">1.0E-9</span><span class="special">),</span>
+ <span class="special">[](</span><span class="keyword">const</span> <span class="identifier">cpp_dec_float_50</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">-&gt;</span><span class="identifier">cpp_dec_float_50</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">gamma_p</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="identifier">x</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">);</span>
+<span class="comment">// 2.70670566473225383787998989944968806815263091819151e-01</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">cpp_dec_float_50</span><span class="special">&gt;::</span><span class="identifier">digits10</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">gd</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="comment">// 2.70670566473225383787998989944968806815253190143120e-01</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">gamma_p_derivative</span><span class="special">(</span><span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="identifier">cpp_dec_float_50</span><span class="special">(</span><span class="number">2</span><span class="special">))</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </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 &#169; 2002-2012 John Maddock 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="jel.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../fp_eg.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="GI.html"><img src="../../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/rational.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -6,12 +6,12 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Multiprecision">
 <link rel="up" href="../tut.html" title="Tutorial">
-<link rel="prev" href="floats/jel.html" title="Worked Example: defining a mathematical function.">
+<link rel="prev" href="floats/fp_eg/GI.html" title="Calculating an Integral">
 <link rel="next" href="rational/gmp_rational.html" title="gmp_rational">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <div class="spirit-nav">
-<a accesskey="p" href="floats/jel.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational/gmp_rational.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="floats/fp_eg/GI.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational/gmp_rational.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 <div class="section boost_multiprecision_tut_rational">
 <div class="titlepage"><div><div><h3 class="title">
@@ -246,7 +246,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="floats/jel.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational/gmp_rational.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="floats/fp_eg/GI.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tut.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="rational/gmp_rational.html"><img src="../../images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/big_number/libs/multiprecision/doc/html/index.html
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/html/index.html (original)
+++ sandbox/big_number/libs/multiprecision/doc/html/index.html 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -44,8 +44,17 @@
 <dt><span class="section">gmp_float</span></dt>
 <dt><span class="section">mpfr_float</span></dt>
 <dt><span class="section">cpp_dec_float</span></dt>
-<dt><span class="section"><a href="boost_multiprecision/tut/floats/jel.html">Worked Example:
- defining a mathematical function.</a></span></dt>
+<dt><span class="section">Examples</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_multiprecision/tut/floats/fp_eg/aos.html">Area of
+ Circle</a></span></dt>
+<dt><span class="section"><a href="boost_multiprecision/tut/floats/fp_eg/jel.html">Defining
+ a Lambda Function.</a></span></dt>
+<dt><span class="section"><a href="boost_multiprecision/tut/floats/fp_eg/nd.html">Calculating
+ a Derivative</a></span></dt>
+<dt><span class="section"><a href="boost_multiprecision/tut/floats/fp_eg/GI.html">Calculating
+ an Integral</a></span></dt>
+</dl></dd>
 </dl></dd>
 <dt><span class="section">Rational Number Types</span></dt>
 <dd><dl>
@@ -101,7 +110,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 03, 2012 at 18:14:12 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 09, 2012 at 16:55:19 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Added: sandbox/big_number/libs/multiprecision/doc/html4_symbols.qbk
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html4_symbols.qbk 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -0,0 +1,215 @@
+[/ Symbols and Greek letters (about 120) from HTML4.]
+[/ File HTML4_symbols.qbk]
+[/ See http://www.htmlhelp.com/reference/html40/entities/symbols.html]
+[/ See also http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references]
+[/ http://www.alanwood.net/demos/ent4_frame.html]
+[/ http://www.unicode.org/charts/PDF/U2200.pdf and others]
+[/ All (except 2 angle brackets) show OK on Firefox 2.0]
+
+[/ See also Latin-1 aka Western (ISO-8859-1) in latin1_symbols.qbk]
+[/ http://www.htmlhelp.com/reference/html40/entities/latin1.html]
+[/Unicode Latin extended http://www.unicode.org/charts/U0080.pdf]
+
+[/ Also some miscellaneous math charaters added to this list - see the end.]
+[/ For others see also math_symbols.qbk]
+
+[/ To use, enclose the template name in square brackets.]
+
+[template fnof[]'''&#x192;'''] [/ ƒ Latin small f with hook = function = florin]
+[/ Capital Greek start with capital letter, lower case all small.]
+[template Alpha[]'''&#x391;'''] [/ ? Greek capital letter alpha]
+[template Beta[]'''&#x392;'''] [/ ? Greek capital letter beta]
+[template Gamma[]'''&#x393;'''] [/ G Greek capital letter gamma]
+[template Delta[]'''&#x394;'''] [/ ? Greek capital letter delta]
+[template Epsilon[]'''&#x395;'''] [/ ? Greek capital letter epsilon]
+[template Zeta[]'''&#x396;'''] [/ ? Greek capital letter zeta]
+[template Eta[]'''&#x397;'''] [/ ? Greek capital letter eta]
+[template Theta[]'''&#x398;'''] [/ T Greek capital letter theta]
+[template Iota[]'''&#x399;'''] [/ ? Greek capital letter iota]
+[template Kappa[]'''&#x39A;'''] [/ ? Greek capital letter kappa]
+[template Lambda[]'''&#x39B;'''] [/ ? Greek capital letter lambda]
+[template Mu[]'''&#x39C;'''] [/ ? Greek capital letter mu]
+[template Nu[]'''&#x39D;'''] [/ ? Greek capital letter nu]
+[template Xi[]'''&#x39E;'''] [/ ? Greek capital letter xi]
+[template Omicron[]'''&#x39F;'''] [/ ? Greek capital letter omicron]
+[template Pi[]'''&#x3A0;'''] [/ ? Greek capital letter pi]
+[template Rho[]'''&#x3A1;'''] [/ ? Greek capital letter rho]
+[template Sigma[]'''&#x3A3;'''] [/ S Greek capital letter sigma]
+[template Tau[]'''&#x3A4;'''] [/ ? Greek capital letter tau]
+[template Upsilon[]'''&#x3A5;'''] [/ ? Greek capital letter upsilon]
+[template Phi[]'''&#x3A6;'''] [/ F Greek capital letter phi]
+[template Chi[]'''&#x3A7;'''] [/ ? Greek capital letter chi]
+[template Psi[]'''&#x3A8;'''] [/ ? Greek capital letter psi]
+[template Omega[]'''&#x3A9;'''] [/ O Greek capital letter omega]
+[template alpha[]'''&#x3B1;'''] [/ a Greek small letter alpha]
+[template beta[]'''&#x3B2;'''] [/ ß Greek small letter beta]
+[template gamma[]'''&#x3B3;'''] [/ ? Greek small letter gamma]
+[template delta[]'''&#x3B4;'''] [/ d Greek small letter delta]
+[template epsilon[]'''&#x3B5;'''] [/ e Greek small letter epsilon]
+[template zeta[]'''&#x3B6;'''] [/ ? Greek small letter zeta]
+[template eta[]'''&#x3B7;'''] [/ ? Greek small letter eta]
+[template theta[]'''&#x3B8;'''] [/ ? Greek small letter theta]
+[template iota[]'''&#x3B9;'''] [/ ? Greek small letter iota]
+[template kappa[]'''&#x3BA;'''] [/ ? Greek small letter kappa]
+[template lambda[]'''&#x3BB;'''] [/ ? Greek small letter lambda]
+[template mu[]'''&#x3BC;'''] [/ µ Greek small letter mu]
+[template nu[]'''&#x3BD;'''] [/ ? Greek small letter nu]
+[template xi[]'''&#x3BE;'''] [/ ? Greek small letter xi]
+[template omicron[]'''&#x3BF;'''] [/ ? Greek small letter omicron]
+[template pi[]'''&#x3C0;'''] [/ p Greek small letter pi]
+[template rho[]'''&#x3C1;'''] [/ ? Greek small letter rho]
+[template sigmaf[]'''&#x3C2;'''] [/ ? Greek small letter final sigma]
+[template sigma[]'''&#x3C3;'''] [/ s Greek small letter sigma]
+[template tau[]'''&#x3C4;'''] [/ t Greek small letter tau]
+[template upsilon[]'''&#x3C5;'''] [/ ? Greek small letter upsilon]
+[template phi[]'''&#x3C6;'''] [/ f Greek small letter phi]
+[template chi[]'''&#x3C7;'''] [/ ? Greek small letter chi]
+[template psi[]'''&#x3C8;'''] [/ ? Greek small letter psi]
+[template omega[]'''&#x3C9;'''] [/ ? Greek small letter omega]
+[template thetasym[]'''&#x3D1;'''] [/ ? Greek small letter theta symbol]
+[template upsih[]'''&#x3D2;'''] [/ ? Greek upsilon with hook symbol]
+[template piv[]'''&#x3D6;'''] [/ ? Greek pi symbol]
+
+[template bull[]'''&#x2022;'''] [/ • bullet = black small circle]
+[template hellip[]'''&#x2026;'''] [/ … horizontal ellipsis = three dot leader]
+[template prime[]'''&#x2032;'''] [/ ' prime = minutes = feet]
+[template Prime[]'''&#x2033;'''] [/ ? double prime = seconds = inches]
+[template oline[]'''&#x203E;'''] [/ ? overline = spacing overscore]
+[template frasl[]'''&#x2044;'''] [/ / fraction slash]
+[template weierp[]'''&#x2118;'''] [/ P script capital P = power set = Weierstrass p]
+[template image[]'''&#x2111;'''] [/ I blackletter capital I = imaginary part]
+[template real[]'''&#x211C;'''] [/ R blackletter capital R = real part symbol]
+[template trade[]'''&#x2122;'''] [/ ™ trade mark sign]
+[template alefsym[]'''&#x2135;'''] [/ ? alef symbol = first transfinite cardinal]
+[template larr[]'''&#x2190;'''] [/ ? leftwards arrow]
+[template uarr[]'''&#x2191;'''] [/ ? upwards arrow]
+[template rarr[]'''&#x2192;'''] [/ ? rightwards arrow]
+[template darr[]'''&#x2193;'''] [/ ? downwards arrow]
+[template harr[]'''&#x2194;'''] [/ ? left right arrow]
+[template crarr[]'''&#x21B5;'''] [/ ? downwards arrow with corner leftwards = CR]
+[template lArr[]'''&#x21D0;'''] [/ ? leftwards double arrow]
+[template uArr[]'''&#x21D1;'''] [/ ? upwards double arrow]
+[template rArr[]'''&#x21D2;'''] [/ ? rightwards double arrow]
+[template dArr[]'''&#x21D3;'''] [/ ? downwards double arrow]
+[template hArr[]'''&#x21D4;'''] [/ ? left right double arrow]
+[template forall[]'''&#x2200;'''] [/ ? for all]
+[template part[]'''&#x2202;'''] [/ ? partial differential]
+[template exist[]'''&#x2203;'''] [/ ? there exists]
+[template empty[]'''&#x2205;'''] [/ Ø empty set = null set = diameter]
+[template nabla[]'''&#x2207;'''] [/ ? nabla = backward difference]
+[template isin[]'''&#x2208;'''] [/ ? element of]
+[template notin[]'''&#x2209;'''] [/ ? not an element of]
+[template ni[]'''&#x220B;'''] [/ ? contains as member]
+[template prod[]'''&#x220F;'''] [/ ? n-ary product = product sign]
+[template sum[]'''&#x2211;'''] [/ ? n-ary sumation]
+[template minus[]'''&#x2212;'''] [/ - minus sign]
+[template lowast[]'''&#x2217;'''] [/ * asterisk operator]
+[template radic[]'''&#x221A;'''] [/ v square root = radical sign]
+[template prop[]'''&#x221D;'''] [/ ? proportional to]
+[template infin[]'''&#x221E;'''] [/ 8 infinity]
+[template ang[]'''&#x2220;'''] [/ ? angle]
+[template and[]'''&#x2227;'''] [/ ? logical and = wedge]
+[template or[]'''&#x2228;'''] [/ ? logical or = vee]
+[template cap[]'''&#x2229;'''] [/ n intersection = cap]
+[template cup[]'''&#x222A;'''] [/ ? union = cup]
+[template int[]'''&#x222B;'''] [/ ? integral]
+[template there4[]'''&#x2234;'''] [/ ? therefore]
+[template sim[]'''&#x223C;'''] [/ ~ tilde operator = varies with = similar to]
+[template cong[]'''&#x2245;'''] [/ ? approximately equal to]
+[template asymp[]'''&#x2248;'''] [/ ˜ almost equal to = asymptotic to]
+[template ne[]'''&#x2260;'''] [/ ? not equal to]
+[template equiv[]'''&#x2261;'''] [/ = identical to]
+[template le[]'''&#x2264;'''] [/ = less-than or equal to]
+[template ge[]'''&#x2265;'''] [/ = greater-than or equal to]
+[template subset[]'''&#x2282;'''] [/ ? subset of]
+[template superset[]'''&#x2283;'''] [/ ? superset of]
+[template nsubset[]'''&#x2284;'''] [/ ? not a subset of]
+[template sube[]'''&#x2286;'''] [/ ? subset of or equal to]
+[template supe[]'''&#x2287;'''] [/ ? superset of or equal to]
+[template oplus[]'''&#x2295;'''] [/ ? circled plus = direct sum]
+[template otimes[]'''&#x2297;'''] [/ ? circled times = vector product]
+[template perp[]'''&#x22A5;'''] [/ ? up tack = orthogonal to = perpendicular]
+[template sdot[]'''&#x22C5;'''] [/ · dot operator]
+[template lceil[]'''&#x2308;'''] [/ ? left ceiling = APL upstile]
+[template rceil[]'''&#x2309;'''] [/ ? right ceiling]
+[template lfloor[]'''&#x230A;'''] [/ ? left floor = APL downstile]
+[template rfloor[]'''&#x230B;'''] [/ ? right floor]
+[template lang[]'''&#x2329;'''] [/ < left-pointing angle bracket = bra (Firefox shows ?)]
+[template rang[]'''&#x232A;'''] [/ > right-pointing angle bracket = ket (Firefox shows ?)]
+[template loz[]'''&#x25CA;'''] [/ ? lozenge]
+[template spades[]'''&#x2660;'''] [/ ? black spade suit]
+[template clubs[]'''&#x2663;'''] [/ ? black club suit = shamrock]
+[template hearts[]'''&#x2665;'''] [/ ? black heart suit = valentine]
+[template diams[]'''&#x2666;'''] [/ ? black diamond suit]
+[template euro[]'''&#x20AC;'''] [/ ? Euro currency symbol]
+[template lchev[]'''&#x27E8;'''] [/ ? left chevron]
+[template rchev[]'''&#x27E9;'''] [/ right chevron]
+[template rflat[]'''&#x27EE;'''] [/ right flat bracket Misc Math Symbol A]
+[template lflat[]'''&#x27EE;'''] [/ left flat bracket]
+[/ U2000.pdf punctuation]
+[template endash[]'''&#x2013;'''] [/ em width dash]
+[template emdash[]'''&#x2014;'''] [/ en width dash]
+[template hbar[]'''&#x2015;'''] [/ ? horizontal bar - introducing quoted text]
+[template vert2bar[]'''&#x2016;'''] [/ ? double vertical bar]
+[template line2[]'''&#x2016;'''] [/ ? double low line bar]
+[template dagger[]'''&#x2020;'''] [/ ? dagger]
+[template dagger2[]'''&#x2021;'''] [/ ? double dagger]
+[template dot[]'''&#x2024;'''] [/ dot leader]
+[template dot2[]'''&#x2025;'''] [/ ? dots leader]
+[template ellipsis[]'''&#x2026;'''] [/ horizontal ellipsis]
+
+[template dotover[]'''&#x0307;'''] [/ dot over symbol]
+[template recur[]'''&#x200A;&#x0307;'''] [/ math recurring symbol, eg after 0.333]
+[/ Note use of a thin space before digit, so that dot isn't placed directly over the digit.]
+[/ Use:1[recur]]
+
+[/ Other symbols, not in the HTML4 list:]
+[template enquad[] '''&#x2000;'''] [/ en quad space]
+[template emquad[] '''&#x2001;'''] [/ em quad space]
+[template enspace[] '''&#x2002;'''] [/ em half en space]
+[template emspace[] '''&#x2003;'''] [/ em space type size in points]
+[template thickspace[] '''&#x2004;'''] [/ 3 per em space]
+[template midspace[] '''&#x2005;'''] [/ 4 per em space]
+[template sixemspace[] '''&#x2006;'''] [/ 6 em space]
+[template figspace[] '''&#x2007;'''] [/ space = width fixed font digit]
+[template punctspace[] '''&#x2008;'''] [/ space = width punctuation]
+[template thin[] '''&#x2009;'''] [/ thin space ]
+[template hair[] '''&#x200A;'''] [/ hair space]
+[template nbsp[] '''&#x00A0;'''] [/ non-breaking space]
+[template space[] '''&#x00A0;'''] [/ plain non-breaking space]
+
+[template nospace[] '''&#x200B;'''] [/ zero width space]
+[template wordjoin[] '''&#x2060;'''] [/ word joiner - no line break either side]
+[template narrownbsp[] '''&#x202F;'''] [/ narrow non-breaking space]
+[template hyphen[] '''&#x2010;'''] [/ soft hyphen]
+[template nbhyphen[] '''&#x2011;'''] [/ non-breaking hyphen]
+
+[template plusminus[]'''&#x00B1;'''] [/ ? plus or minus sign]
+[template sqrt[]'''&#x221A;'''] [/ ? square root sqrt symbol]
+[/template pow2[]'''&#x2073;'''] [/ 2073 is NOT superscript 2 character]
+[template pow2[]'''&#x00B2;'''] [/ superscript 2 character]
+[template pow3[]'''&#x00B3;'''] [/ superscript 3 character]
+[template pown[]'''&#x207F;'''] [/ superscript n character]
+[template frac12[]'''&#x00BD;'''] [/ fraction half]
+[template frac14[]'''&#x00BC;'''] [/ fraction quarter]
+[template frac34[]'''&#x00BE;'''] [/ fraction three quarter]
+[template sup1[]'''&#xB9;'''] [/ superscript one = superscript digit one ]
+[template sup2[]'''&#xB2;'''] [/ superscript two = superscript digit two = squared ]
+[template cubed[]'''&#xB3;'''] [/ superscript three = superscript digit three = cubed ]
+[template macron[]'''&#xAF;'''] [/ macron = spacing macron = overline = APL overbar ]
+[template deg[]'''&#xB0;'''] [/ degree sign ]
+[template plusmn[]'''&#xB1;'''] [/ plus-minus sign = plus-or-minus sign ]
+[template micro[]'''&#xB5;'''] [/ micro sign ]
+[template cedil[]'''&#xB8;'''] [/ cedilla = spacing cedilla ]
+[template ordm[]'''&#xBA;'''] [/ masculine ordinal indicator ]
+[template ordf[]'''&#xAA;'''] [/ feminine ordinal indicator ]
+[template laquo[]'''&#xAB;'''] [/ left-pointing double angle quotation mark = left pointing guillemet ]
+[template raquo[]'''&#xBB;'''] [/ right-pointing double angle quotation mark = right pointing guillemet ]
+
+[/
+Copyright 2007, 2010 Paul A. Bristow.
+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).
+]
+

Modified: sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk
==============================================================================
--- sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk (original)
+++ sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -18,6 +18,7 @@
     [/last-revision $Date: 2011-07-08 18:51:46 +0100 (Fri, 08 Jul 2011) $]
 ]
 
+[include html4_symbols.qbk]
 [import ../example/gmp_snips.cpp]
 [import ../example/mpfr_snips.cpp]
 [import ../example/cpp_dec_float_snips.cpp]
@@ -34,6 +35,18 @@
 [template mpir[] [@http://mpir.org/ MPIR]]
 [template tommath[] [@http://libtom.org/?page=features&newsitems=5&whatfile=ltm libtommath]]
 
+[template super[x]'''<superscript>'''[x]'''</superscript>''']
+[template sub[x]'''<subscript>'''[x]'''</subscript>''']
+
+[template equation[name] '''<inlinemediaobject>
+<imageobject role="html">
+<imagedata fileref="../'''[name]'''.png"></imagedata>
+</imageobject>
+<imageobject role="print">
+<imagedata fileref="../'''[name]'''.svg"></imagedata>
+</imageobject>
+</inlinemediaobject>''']
+
 
 [section:intro Introduction]
 
@@ -556,14 +569,41 @@
 
 [endsect]
 
-[section:jel Worked Example: defining a mathematical function.]
+[section:fp_eg Examples]
 
 [import ../example/floating_point_examples.cpp]
 
+[section:aos Area of Circle]
+
+[AOS1]
+[AOS2]
+[AOS3]
+
+[endsect]
+
+[section:jel Defining a Lambda Function.]
+
 [JEL]
 
 [endsect]
 
+[section:nd Calculating a Derivative]
+
+[ND1]
+[ND2]
+[ND3]
+
+[endsect]
+
+[section:GI Calculating an Integral]
+
+[GI1]
+[GI2]
+
+[endsect]
+
+[endsect]
+
 [endsect]
 
 [section:rational Rational Number Types]
@@ -1528,8 +1568,6 @@
 
 [section:backendconc Backend Requirements]
 
-[template super[x]'''<superscript>'''[x]'''</superscript>''']
-
 The requirements on the `Backend` template argument to `mp_number` are split up into
 compulsory requirements, and optional requirements that are either to improve performance
 or provide optional features.

Modified: sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp (original)
+++ sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -9,6 +9,48 @@
 #include <iostream>
 #include <iomanip>
 
+//[AOS1
+
+/*`Generic numeric programming employs templates to use the same code for different
+floating-point types and functions. Consider the area of a circle a of radius r, given by
+
+[:['a = [pi] * r[super 2]]]
+
+The area of a circle can be computed in generic programming using Boost.Math
+for the constant [pi] as shown below:
+
+*/
+
+//=#include <boost/math/constants/constants.hpp>
+
+template<typename T>
+inline T area_of_a_circle(T r)
+{
+ using boost::math::constants::pi;
+ return pi<T>() * r * r;
+}
+
+/*`
+It is possible to use `area_of_a_circle()` with built-in floating-point types as
+well as floating-point types from Boost.Multiprecision. In particular, consider a
+system with 4-byte single-precision float, 8-byte double-precision double and also the
+`cpp_dec_float_50` data type from Boost.Multiprecision with 50 decimal digits
+of precision.
+
+We can compute and print the approximate area of a circle with radius 123/100 for
+`float`, `double` and `cpp_dec_float_50` with the program below.
+
+*/
+
+//]
+
+//[AOS3
+
+/*`In the next example we'll look at calling both standard library and Boost.Math functions from within generic code.
+We'll also show how to cope with template arguments which are expression-templates rather than number types.*/
+
+//]
+
 //[JEL
 
 /*`
@@ -18,7 +60,7 @@
 
 The Jahnke-Emden Lambda function is defined by the equation:
 
-JahnkeEmden(v, z) = Gamma(v+1) * J[v](z) / (z / 2)^v
+[:['JahnkeEmden(v, z) = [Gamma](v+1) * J[sub v](z) / (z / 2)[super v]]]
 
 If we were to implement this at double precision using Boost.Math's facilities for the Gamma and Bessel
 function calls it would look like this:
@@ -166,6 +208,136 @@
 
 //]
 
+//[ND1
+
+/*`
+In this example we'll add even more power to generic numeric programming using not only different
+floating-point types but also function objects as template parameters. Consider
+some well-known central difference rules for numerically computing the first derivative
+of a function ['f[prime](x)] with ['x [isin] [real]]:
+
+[equation floating_point_eg1]
+
+Where the difference terms ['m[sub n]] are given by:
+
+[equation floating_point_eg2]
+
+and ['dx] is the step-size of the derivative.
+
+The third formula in Equation 1 is a three-point central difference rule. It calculates
+the first derivative of ['f[prime](x)] to ['O(dx[super 6])], where ['dx] is the given step-size.
+For example, if
+the step-size is 0.01 this derivative calculation has about 6 decimal digits of precision -
+just about right for the 7 decimal digits of single-precision float.
+Let's make a generic template subroutine using this three-point central difference
+rule. In particular:
+*/
+
+template<typename value_type, typename function_type>
+ value_type derivative(const value_type x, const value_type dx, function_type func)
+{
+ // Compute d/dx[func(*first)] using a three-point
+ // central difference rule of O(dx^6).
+
+ const value_type dx1 = dx;
+ const value_type dx2 = dx1 * 2;
+ const value_type dx3 = dx1 * 3;
+
+ const value_type m1 = (func(x + dx1) - func(x - dx1)) / 2;
+ const value_type m2 = (func(x + dx2) - func(x - dx2)) / 4;
+ const value_type m3 = (func(x + dx3) - func(x - dx3)) / 6;
+
+ const value_type fifteen_m1 = 15 * m1;
+ const value_type six_m2 = 6 * m2;
+ const value_type ten_dx1 = 10 * dx1;
+
+ return ((fifteen_m1 - six_m2) + m3) / ten_dx1;
+}
+
+/*`The `derivative()` template function can be used to compute the first derivative
+of any function to ['O(dx[super 6])]. For example, consider the first derivative of ['sin(x)] evaluated
+at ['x = [pi]/3]. In other words,
+
+[equation floating_point_eg3]
+
+The code below computes the derivative in Equation 3 for float, double and boost's
+multiple-precision type cpp_dec_float_50.
+*/
+
+//]
+
+//[GI1
+
+/*`
+Similar to the generic derivative example, we can calculate integrals in a similar manner:
+*/
+
+template<typename value_type, typename function_type>
+inline value_type integral(const value_type a,
+ const value_type b,
+ const value_type tol,
+ function_type func)
+{
+ unsigned n = 1U;
+
+ value_type h = (b - a);
+ value_type I = (func(a) + func(b)) * (h / 2);
+
+ for(unsigned k = 0U; k < 8U; k++)
+ {
+ h /= 2;
+
+ value_type sum(0);
+ for(unsigned j = 1U; j <= n; j++)
+ {
+ sum += func(a + (value_type((j * 2) - 1) * h));
+ }
+
+ const value_type I0 = I;
+ I = (I / 2) + (h * sum);
+
+ const value_type ratio = I0 / I;
+ const value_type delta = ratio - 1;
+ const value_type delta_abs = ((delta < 0) ? -delta : delta);
+
+ if((k > 1U) && (delta_abs < tol))
+ {
+ break;
+ }
+
+ n *= 2U;
+ }
+
+ return I;
+}
+
+/*`
+The following sample program shows how the function can be called, we begin
+by defining a function object, which when integrated should yield the Bessel J
+function:
+*/
+
+template<typename value_type>
+class cyl_bessel_j_integral_rep
+{
+public:
+ cyl_bessel_j_integral_rep(const unsigned N,
+ const value_type& X) : n(N), x(X) { }
+
+ value_type operator()(const value_type& t) const
+ {
+ // pi * Jn(x) = Int_0^pi [cos(x * sin(t) - n*t) dt]
+ return cos(x * sin(t) - (n * t));
+ }
+
+private:
+ const unsigned n;
+ const value_type x;
+};
+
+
+//]
+
 int main()
 {
    using namespace boost::multiprecision;
@@ -179,6 +351,197 @@
    std::cout << JEL3(cpp_dec_float_50(2.5), cpp_dec_float_50(0.5)) << std::endl;
    std::cout << std::scientific << std::setprecision(std::numeric_limits<cpp_dec_float_100>::digits10);
    std::cout << JEL4(cpp_dec_float_100(2) + 0.5, cpp_dec_float_100(0.5)) << std::endl;
+
+ //[AOS2
+
+/*=#include <iostream>
+#include <iomanip>
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+using boost::multiprecision::cpp_dec_float_50;
+
+int main(int, char**)
+{*/
+ const float r_f(float(123) / 100);
+ const float a_f = area_of_a_circle(r_f);
+
+ const double r_d(double(123) / 100);
+ const double a_d = area_of_a_circle(r_d);
+
+ const cpp_dec_float_50 r_mp(cpp_dec_float_50(123) / 100);
+ const cpp_dec_float_50 a_mp = area_of_a_circle(r_mp);
+
+ // 4.75292
+ std::cout
+ << std::setprecision(std::numeric_limits<float>::digits10)
+ << a_f
+ << std::endl;
+
+ // 4.752915525616
+ std::cout
+ << std::setprecision(std::numeric_limits<double>::digits10)
+ << a_d
+ << std::endl;
+
+ // 4.7529155256159981904701331745635599135018975843146
+ std::cout
+ << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10)
+ << a_mp
+ << std::endl;
+/*=}*/
+
+ //]
+
+ //[ND2
+/*=
+#include <iostream>
+#include <iomanip>
+#include <boost/multiprecision/cpp_dec_float.hpp>
+#include <boost/math/constants/constants.hpp>
+
+
+int main(int, char**)
+{*/
+ using boost::math::constants::pi;
+ using boost::multiprecision::cpp_dec_float_50;
+ //
+ // We'll pass a function pointer for the function object passed to derivative,
+ // the typecast is needed to select the correct overload of std::sin:
+ //
+ const float d_f = derivative(
+ pi<float>() / 3,
+ 0.01F,
+ static_cast<float(*)(float)>(std::sin)
+ );
+
+ const double d_d = derivative(
+ pi<double>() / 3,
+ 0.001,
+ static_cast<double(*)(double)>(std::sin)
+ );
+ //
+ // In the cpp_dec_float_50 case, the sin function is multiply overloaded
+ // to handle expression templates etc. As a result it's hard to take it's
+ // address without knowing about its implementation details. We'll use a
+ // C++11 lambda expression to capture the call.
+ // We also need a typecast on the first argument so we don't accidently pass
+ // an expression template to a template function:
+ //
+ const cpp_dec_float_50 d_mp = derivative(
+ cpp_dec_float_50(pi<cpp_dec_float_50>() / 3),
+ cpp_dec_float_50(1.0E-9),
+ [](const cpp_dec_float_50& x) -> cpp_dec_float_50
+ {
+ return sin(x);
+ }
+ );
+
+ // 5.000029e-001
+ std::cout
+ << std::setprecision(std::numeric_limits<float>::digits10)
+ << d_f
+ << std::endl;
+
+ // 4.999999999998876e-001
+ std::cout
+ << std::setprecision(std::numeric_limits<double>::digits10)
+ << d_d
+ << std::endl;
+
+ // 4.99999999999999999999999999999999999999999999999999e-01
+ std::cout
+ << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10)
+ << d_mp
+ << std::endl;
+//=}
+
+ /*`
+ The expected value of the derivative is 0.5. This central difference rule in this
+ example is ill-conditioned, meaning it suffers from slight loss of precision. With that
+ in mind, the results agree with the expected value of 0.5.*/
+
+ //]
+
+ //[ND3
+
+ /*`
+ We can take this a step further and use our derivative function to compute
+ a partial derivative. For example if we take the incomplete gamma function
+ ['P(a, z)], and take the derivative with respect to /z/ at /(2,2)/ then we
+ can calculate the result as shown below, for good measure we'll compare with
+ the "correct" result obtained from a call to ['gamma_p_derivative], the results
+ agree to approximately 44 digits:
+ */
+
+ cpp_dec_float_50 gd = derivative(
+ cpp_dec_float_50(2),
+ cpp_dec_float_50(1.0E-9),
+ [](const cpp_dec_float_50& x) ->cpp_dec_float_50
+ {
+ return boost::math::gamma_p(2, x);
+ }
+ );
+ // 2.70670566473225383787998989944968806815263091819151e-01
+ std::cout
+ << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10)
+ << gd
+ << std::endl;
+ // 2.70670566473225383787998989944968806815253190143120e-01
+ std::cout << boost::math::gamma_p_derivative(cpp_dec_float_50(2), cpp_dec_float_50(2)) << std::endl;
+ //]
+
+ //[GI2
+
+ /* The function can now be called as follows: */
+/*=int main(int, char**)
+{*/
+ using boost::math::constants::pi;
+ typedef boost::multiprecision::cpp_dec_float_50 mp_type;
+
+ const float j2_f =
+ integral(0.0F,
+ pi<float>(),
+ 0.01F,
+ cyl_bessel_j_integral_rep<float>(2U, 1.23F)) / pi<float>();
+
+ const double j2_d =
+ integral(0.0,
+ pi<double>(),
+ 0.0001,
+ cyl_bessel_j_integral_rep<double>(2U, 1.23)) / pi<double>();
+
+ const mp_type j2_mp =
+ integral(mp_type(0),
+ pi<mp_type>(),
+ mp_type(1.0E-20),
+ cyl_bessel_j_integral_rep<mp_type>(2U, mp_type(123) / 100)) / pi<mp_type>();
+
+ // 0.166369
+ std::cout
+ << std::setprecision(std::numeric_limits<float>::digits10)
+ << j2_f
+ << std::endl;
+
+ // 0.166369383786814
+ std::cout
+ << std::setprecision(std::numeric_limits<double>::digits10)
+ << j2_d
+ << std::endl;
+
+ // 0.16636938378681407351267852431513159437103348245333
+ std::cout
+ << std::setprecision(std::numeric_limits<mp_type>::digits10)
+ << j2_mp
+ << std::endl;
+
+ //
+ // Print true value for comparison:
+ // 0.166369383786814073512678524315131594371033482453329
+ std::cout << boost::math::cyl_bessel_j(2, mp_type(123) / 100) << std::endl;
+//=}
+
+ //]
+
    return 0;
 }
 
@@ -191,4 +554,12 @@
 9.822663964796047e-001
 9.82266396479604757017335009796882833995903762577173e-01
 9.8226639647960475701733500979688283399590376257717309069410413822165082248153638454147004236848917775e-01
+4.752916e+000
+4.752915525615998e+000
+4.75291552561599819047013317456355991350189758431460e+00
+5.000029e-001
+4.999999999998876e-001
+4.99999999999999999999999999999999999999999999999999e-01
+2.70670566473225383787998989944968806815263091819151e-01
+2.70670566473225383787998989944968806815253190143120e-01
 */
\ No newline at end of file

Modified: sandbox/big_number/libs/multiprecision/example/generic_numerics_examples/generic_numerics_src/generic_integral.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/example/generic_numerics_examples/generic_numerics_src/generic_integral.cpp (original)
+++ sandbox/big_number/libs/multiprecision/example/generic_numerics_examples/generic_numerics_src/generic_integral.cpp 2012-04-09 12:58:30 EDT (Mon, 09 Apr 2012)
@@ -61,44 +61,45 @@
   const value_type x;
 };
 
-using boost::math::constants::pi;
-typedef boost::multiprecision::cpp_dec_float_50 mp_type;
 
 int main(int, char**)
 {
- const float j2_f =
- integral(0.0F,
- pi<float>(),
- 0.01F,
- cyl_bessel_j_integral_rep<float>(2U, 1.23F)) / pi<float>();
-
- const double j2_d =
- integral(0.0,
- pi<double>(),
- 0.0001,
- cyl_bessel_j_integral_rep<double>(2U, 1.23)) / pi<double>();
-
- const mp_type j2_mp =
- integral(mp_type(0),
- pi<mp_type>(),
- mp_type(1.0E-20),
- cyl_bessel_j_integral_rep<mp_type>(2U, mp_type(123) / 100)) / pi<mp_type>();
-
- // 0.166369
- std::cout
- << std::setprecision(std::numeric_limits<float>::digits10)
- << j2_f
- << std::endl;
-
- // 0.166369383786814
- std::cout
- << std::setprecision(std::numeric_limits<double>::digits10)
- << j2_d
- << std::endl;
-
- // 0.16636938378681407351267852431513159437103348245333
- std::cout
- << std::setprecision(std::numeric_limits<mp_type>::digits10)
- << j2_mp
- << std::endl;
+ using boost::math::constants::pi;
+ typedef boost::multiprecision::cpp_dec_float_50 mp_type;
+
+ const float j2_f =
+ integral(0.0F,
+ pi<float>(),
+ 0.01F,
+ cyl_bessel_j_integral_rep<float>(2U, 1.23F)) / pi<float>();
+
+ const double j2_d =
+ integral(0.0,
+ pi<double>(),
+ 0.0001,
+ cyl_bessel_j_integral_rep<double>(2U, 1.23)) / pi<double>();
+
+ const mp_type j2_mp =
+ integral(mp_type(0),
+ pi<mp_type>(),
+ mp_type(1.0E-20),
+ cyl_bessel_j_integral_rep<mp_type>(2U, mp_type(123) / 100)) / pi<mp_type>();
+
+ // 0.166369
+ std::cout
+ << std::setprecision(std::numeric_limits<float>::digits10)
+ << j2_f
+ << std::endl;
+
+ // 0.166369383786814
+ std::cout
+ << std::setprecision(std::numeric_limits<double>::digits10)
+ << j2_d
+ << std::endl;
+
+ // 0.16636938378681407351267852431513159437103348245333
+ std::cout
+ << std::setprecision(std::numeric_limits<mp_type>::digits10)
+ << j2_mp
+ << std::endl;
 }


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