$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r77746 - in sandbox/big_number/libs/multiprecision: doc doc/html doc/html/boost_multiprecision doc/html/boost_multiprecision/indexes doc/html/boost_multiprecision/tut doc/html/boost_multiprecision/tut/floats example
From: john_at_[hidden]
Date: 2012-04-03 14:20:36
Author: johnmaddock
Date: 2012-04-03 14:20:35 EDT (Tue, 03 Apr 2012)
New Revision: 77746
URL: http://svn.boost.org/trac/boost/changeset/77746
Log:
Add extended floating point example.
Added:
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/jel.html   (contents, props changed)
   sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp   (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              |    15 ++++++++---                             
   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              |    49 ++++++++++++++++++++++++--------------- 
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut.html                      |     2 +                                       
   sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html               |     2 +                                       
   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                                         |     4 ++                                      
   sandbox/big_number/libs/multiprecision/doc/multiprecision.qbk                                      |     8 ++++++                                  
   10 files changed, 74 insertions(+), 42 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-03 14:20:35 EDT (Tue, 03 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 id1061009">
+<div class="section id1095875">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1061009"></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>
+<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>
 <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_15"></a><span class="term">Z</span>
+<a name="idx_id_16"></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-03 14:20:35 EDT (Tue, 03 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 id1062098">
+<div class="section id1097052">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1062098"></a>Class Index</h3></div></div></div>
-<p><a class="link" href="s02.html#idx_id_25">M</a></p>
+<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>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_25"></a><span class="term">M</span>
+<a name="idx_id_26"></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>
@@ -28,6 +28,13 @@
 <li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../ref/mp_number.html" title="mp_number"><span class="index-entry-level-1">mp_number</span></a></strong></span></p></li>
 </ul></div>
 </li></ul></div></dd>
+<dt>
+<a name="idx_id_31"></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>
+</li></ul></div></dd>
 </dl></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/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-03 14:20:35 EDT (Tue, 03 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 id1062150">
+<div class="section id1097139">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1062150"></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>
+<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>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_34"></a><span class="term">C</span>
+<a name="idx_id_36"></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_39"></a><span class="term">I</span>
+<a name="idx_id_41"></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_40"></a><span class="term">L</span>
+<a name="idx_id_42"></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_41"></a><span class="term">M</span>
+<a name="idx_id_43"></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_46"></a><span class="term">T</span>
+<a name="idx_id_48"></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-03 14:20:35 EDT (Tue, 03 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 id1062841">
+<div class="section id1097830">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1062841"></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>
+<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>
 <div class="variablelist"><dl>
 <dt>
-<a name="idx_id_48"></a><span class="term">A</span>
+<a name="idx_id_51"></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_49"></a><span class="term">B</span>
+<a name="idx_id_52"></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_50"></a><span class="term">C</span>
+<a name="idx_id_53"></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_51"></a><span class="term">D</span>
+<a name="idx_id_54"></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">
@@ -128,21 +128,21 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_52"></a><span class="term">E</span>
+<a name="idx_id_55"></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 1.5. 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_53"></a><span class="term">F</span>
+<a name="idx_id_56"></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_54"></a><span class="term">G</span>
+<a name="idx_id_57"></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 +175,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_55"></a><span class="term">I</span>
+<a name="idx_id_58"></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 +223,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_56"></a><span class="term">L</span>
+<a name="idx_id_59"></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 +252,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_57"></a><span class="term">M</span>
+<a name="idx_id_60"></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 +410,14 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_58"></a><span class="term">O</span>
+<a name="idx_id_61"></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 1.5. 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_59"></a><span class="term">P</span>
+<a name="idx_id_62"></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 +437,14 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_60"></a><span class="term">R</span>
+<a name="idx_id_63"></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_61"></a><span class="term">S</span>
+<a name="idx_id_64"></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 +461,7 @@
 </li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_62"></a><span class="term">T</span>
+<a name="idx_id_65"></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">
@@ -487,9 +487,20 @@
 <p><span class="index-entry-level-0">trunc</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>
+<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>
+</li>
 </ul></div></dd>
 <dt>
-<a name="idx_id_63"></a><span class="term">Z</span>
+<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>
 </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/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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -29,6 +29,8 @@
 <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>
 </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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -21,6 +21,8 @@
 <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>
 </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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -7,11 +7,11 @@
 <link rel="home" href="../../../index.html" title="Chapter 1. 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="../rational.html" title="Rational Number Types">
+<link rel="next" href="jel.html" title="Worked Example: defining a mathematical function.">
 </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="../rational.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="jel.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="../rational.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="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/jel.html
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/jel.html	2012-04-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -0,0 +1,222 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Worked Example: defining a mathematical 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 1. 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="../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="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="../rational.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section boost_multiprecision_tut_floats_jel">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_multiprecision.tut.floats.jel"></a><a class="link" href="jel.html" title="Worked Example: defining a mathematical function.">Worked Example:
+        defining a mathematical function.</a>
+</h4></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>
+<p>
+          JahnkeEmden(v, z) = Gamma(v+1) * J[v](z) / (z / 2)^v
+        </p>
+<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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special"><<</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"><</span><span class="keyword">double</span><span class="special">>::</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"><<</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"><<</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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special"><<</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"><</span><span class="identifier">cpp_dec_float_50</span><span class="special">>::</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"><<</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"><<</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"><</span><span class="keyword">class</span> <span class="identifier">Float</span><span class="special">></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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special"><<</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"><</span><span class="keyword">double</span><span class="special">>::</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"><<</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"><<</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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special"><<</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"><</span><span class="identifier">cpp_dec_float_50</span><span class="special">>::</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"><<</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"><<</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"><</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">></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"><</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">>::</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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">scientific</span> <span class="special"><<</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"><</span><span class="identifier">cpp_dec_float_100</span><span class="special">>::</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"><<</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"><<</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"><</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">></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"><</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">>::</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"><</span><span class="identifier">Float1</span><span class="special">,</span> <span class="identifier">Float2</span><span class="special">>::</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 © 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="../rational.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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -6,12 +6,12 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter 1. Boost.Multiprecision">
 <link rel="up" href="../tut.html" title="Tutorial">
-<link rel="prev" href="floats/cpp_dec_float.html" title="cpp_dec_float">
+<link rel="prev" href="floats/jel.html" title="Worked Example: defining a mathematical function.">
 <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/cpp_dec_float.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/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>
 </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/cpp_dec_float.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/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>
 </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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -44,6 +44,8 @@
 <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>
 </dl></dd>
 <dt><span class="section">Rational Number Types</span></dt>
 <dd><dl>
@@ -99,7 +101,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 15:58:48 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 03, 2012 at 18:14:12 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>
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-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -556,6 +556,14 @@
 
 [endsect]
 
+[section:jel Worked Example: defining a mathematical function.]
+
+[import ../example/floating_point_examples.cpp]
+
+[JEL]
+
+[endsect]
+
 [endsect]
 
 [section:rational Rational Number Types]
Added: sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/example/floating_point_examples.cpp	2012-04-03 14:20:35 EDT (Tue, 03 Apr 2012)
@@ -0,0 +1,194 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. 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_
+
+#include <boost/multiprecision/cpp_dec_float.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/bessel.hpp>
+#include <iostream>
+#include <iomanip>
+
+//[JEL
+
+/*`
+In this example we'll show several implementations of the 
+[@http://mathworld.wolfram.com/LambdaFunction.html Jahnke and Emden Lambda function], 
+each implementation a little more sophisticated than the last.
+
+The Jahnke-Emden Lambda function is defined by the equation:
+
+JahnkeEmden(v, z) = Gamma(v+1) * J[v](z) / (z / 2)^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:
+
+*/
+
+double JEL1(double v, double z)
+{
+   return boost::math::tgamma(v + 1) * boost::math::cyl_bessel_j(v, z) / std::pow(z / 2, v);
+}
+
+/*`
+Calling this function as:
+
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<double>::digits10);
+   std::cout << JEL1(2.5, 0.5) << std::endl;
+
+Yields the output:
+
+[pre 9.822663964796047e-001]
+
+Now lets implement the function again, but this time using the multiprecision type
+`cpp_dec_float_50` as the argument type:
+
+*/   
+
+boost::multiprecision::cpp_dec_float_50 
+   JEL2(boost::multiprecision::cpp_dec_float_50 v, boost::multiprecision::cpp_dec_float_50 z)
+{
+   return boost::math::tgamma(v + 1) * boost::math::cyl_bessel_j(v, z) / boost::multiprecision::pow(z / 2, v);
+}
+
+/*`
+The implementation is almost the same as before, but with one key difference - we can no longer call
+`std::pow`, instead we must call the version inside the `boost::multiprecision` namespace.  In point of
+fact, we could have omitted the namespace prefix on the call to `pow` since the right overload would 
+have been found via [@http://en.wikipedia.org/wiki/Argument-dependent_name_lookup 
+argument dependent lookup] in any case.
+
+Note also that the first argument to `pow` along with the argument to `tgamma` in the above code
+are actually expression templates.  The `pow` and `tgamma` functions will handle these arguments
+just fine.
+
+Here's an example of how the function may be called:
+
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10);
+   std::cout << JEL2(cpp_dec_float_50(2.5), cpp_dec_float_50(0.5)) << std::endl;
+
+Which outputs:
+
+[pre 9.82266396479604757017335009796882833995903762577173e-01]
+
+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 (`float`, `double` etc), or with a multiprecision type:
+
+*/
+
+template <class Float>
+Float JEL3(Float v, Float z)
+{
+   using std::pow;
+   return boost::math::tgamma(v + 1) * boost::math::cyl_bessel_j(v, z) / pow(z / 2, v);
+}
+
+/*`
+
+Once again the code is almost the same as before, but the call to `pow` has changed yet again.
+We need the call to resolve to either `std::pow` (when the argument is a builtin type), or
+to `boost::multiprecision::pow` (when the argument is a multiprecision type).  We do that by
+making the call unqualified so that versions of `pow` defined in the same namespace as type
+`Float` are found via argument dependent lookup, while the `using std::pow` directive makes
+the standard library versions visible for builtin floating point types.
+
+Let's call the function with both `double` and multiprecision arguments:
+
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<double>::digits10);
+   std::cout << JEL3(2.5, 0.5) << std::endl;
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10);
+   std::cout << JEL3(cpp_dec_float_50(2.5), cpp_dec_float_50(0.5)) << std::endl;
+
+Which outputs:
+
+[pre
+9.822663964796047e-001
+9.82266396479604757017335009796882833995903762577173e-01
+]
+
+Unfortunately there is a problem with this version: if we were to call it like this:
+
+   boost::multiprecision::cpp_dec_float_50 v(2), z(0.5);
+   JEL3(v + 0.5, z);
+
+Then we would get a long and inscrutable error message from the compiler: the problem here is that the first
+argument to `JEL3` is not a number type, but an expression template.  We could obviously add a typecast to
+fix the issue:
+
+   JEL(cpp_dec_float_50(v + 0.5), z);
+
+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:
+
+*/
+
+template <class Float1, class Float2>
+typename boost::math::tools::promote_args<Float1, Float2>::type 
+   JEL4(Float1 v, Float2 z)
+{
+   using std::pow;
+   return boost::math::tgamma(v + 1) * boost::math::cyl_bessel_j(v, z) / pow(z / 2, v);
+}
+
+/*`
+
+As you can see the two arguments to the function are now separate template types, and
+the return type is computed using the `promote_args` metafunction from Boost.Math.
+
+Now we can call:
+
+   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;
+
+And get 100 digits of output:
+
+[pre 9.8226639647960475701733500979688283399590376257717309069410413822165082248153638454147004236848917775e-01]
+
+As a bonus, we can now call the function not just with expression templates, but with other mixed types as well:
+for example `float` and `double` or `int` and `double`, and the correct return type will be computed in each case.
+
+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 `promote_args`
+to work out what type those variables should be, for example:
+
+   template <class Float1, class Float2>
+   typename boost::math::tools::promote_args<Float1, Float2>::type 
+      JEL5(Float1 v, Float2 z)
+   {
+      using std::pow;
+      typedef typename boost::math::tools::promote_args<Float1, Float2>::type variable_type;
+      variable_type t = pow(z / 2, v);
+      return boost::math::tgamma(v + 1) * boost::math::cyl_bessel_j(v, z) / t;
+   }
+
+*/
+
+//]
+
+int main()
+{
+   using namespace boost::multiprecision;
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<double>::digits10);
+   std::cout << JEL1(2.5, 0.5) << std::endl;
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10);
+   std::cout << JEL2(cpp_dec_float_50(2.5), cpp_dec_float_50(0.5)) << std::endl;
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<double>::digits10);
+   std::cout << JEL3(2.5, 0.5) << std::endl;
+   std::cout << std::scientific << std::setprecision(std::numeric_limits<cpp_dec_float_50>::digits10);
+   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;
+   return 0;
+}
+
+/*
+
+Program output:
+
+9.822663964796047e-001
+9.82266396479604757017335009796882833995903762577173e-01
+9.822663964796047e-001
+9.82266396479604757017335009796882833995903762577173e-01
+9.8226639647960475701733500979688283399590376257717309069410413822165082248153638454147004236848917775e-01
+*/
\ No newline at end of file