Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75987 - in sandbox/math_constants/libs/math/doc: . html
From: john_at_[hidden]
Date: 2011-12-16 07:17:51


Author: johnmaddock
Date: 2011-12-16 07:17:50 EST (Fri, 16 Dec 2011)
New Revision: 75987
URL: http://svn.boost.org/trac/boost/changeset/75987

Log:
Update docs to match new internals.
Text files modified:
   sandbox/math_constants/libs/math/doc/constants.qbk | 47 ++++++++
   sandbox/math_constants/libs/math/doc/html/index.html | 206 ++++++++++++++++++++++++---------------
   2 files changed, 167 insertions(+), 86 deletions(-)

Modified: sandbox/math_constants/libs/math/doc/constants.qbk
==============================================================================
--- sandbox/math_constants/libs/math/doc/constants.qbk (original)
+++ sandbox/math_constants/libs/math/doc/constants.qbk 2011-12-16 07:17:50 EST (Fri, 16 Dec 2011)
@@ -223,6 +223,30 @@
 [[Any other value ['N]][Sets the compile time precision to ['N] bits.]]
 ]
 
+In addition, for user defined types that need special handling, it's possible to \[partially-\] specialize
+the internal structure used by each constant. For example suppose we're using the C++ wrapper around MPFR
+`mpfr_class`: this has it's own representation of Pi which we may well wish to use in place of the above
+mechanism. We can achieve this by specialising the class template `boost::math::constants::detail::constant_pi`:
+
+ namespace boost{ namespace math{ namespace constants{ namespace detail{
+
+ template<>
+ struct constant_pi<mpfr_class>
+ {
+ template<int N>
+ inline T get(const mpl::int_<N>&)
+ {
+ // The tempate param N is one of the values in the table above,
+ // we can either handle all cases in one as is the case here, or
+ // overload "get" for the different options.
+ mpfr_class result;
+ mpfr_const_pi(result.get_mpfr_t(), GMP_RNDN);
+ return result;
+ }
+ };
+
+ }}}} // namespaces
+
 Finally, since it can be tricky to diagnose what meta-programmed code is doing, there is a
 diagnostic routine that prints information about how this library will handle a specific type,
 it can be used like this:
@@ -367,8 +391,9 @@
 
   namespace boost{ namespace math{ namespace constants{ namespace detail{
 
- template <class Real, int N>
- Real calculate_my_constant((const mpl::int_<N>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+ template <class Real>
+ template <int N>
+ Real constant_my_constant<Real>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
   {
     int required_precision = N ? N : tools::digits<Real>();
     Real result = /* value computed to required_precision bits */ ;
@@ -376,16 +401,30 @@
   }
 
   }}}} // namespaces
+
+Then define a placeholder for the constant itself:
+
+ namespace boost{ namespace math{ namespace constants{
+
+ BOOST_DEFINE_MATH_CONSTANT(my_constant, 0, 0, 0);
+
+ }}}
+
 
 For example, to calculate [pi]/2, add to `boost/math/constants/calculate_constants.hpp`
 
- template <class T, int N>
- inline T calculate_half_pi(const mpl::int_<N>&BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+ template <class T>
+ template<int N>
+ inline T constant_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
   {
      BOOST_MATH_STD_USING
      return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(2);
   }
 
+Then to `boost/math/constants/constants.hpp` add:
+
+ BOOST_DEFINE_MATH_CONSTANT(half_pi, 0, 0, 0); // actual values are temporary, we'll replace them later
+
 [note Previously defined constants like pi and e can be used, but by not simply calling `pi<T>()`;
 specifying the precision via the policy is essential to ensure full accuracy.]
 

Modified: sandbox/math_constants/libs/math/doc/html/index.html
==============================================================================
--- sandbox/math_constants/libs/math/doc/html/index.html (original)
+++ sandbox/math_constants/libs/math/doc/html/index.html 2011-12-16 07:17:50 EST (Fri, 16 Dec 2011)
@@ -3,14 +3,14 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Math Constants</title>
 <link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Math Constants">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
 <hr>
 <div class="spirit-nav"></div>
-<div class="article" lang="en">
+<div class="article">
 <div class="titlepage">
 <div>
 <div><h2 class="title">
@@ -50,7 +50,7 @@
 <dt><span class="section">FAQs</span></dt>
 </dl>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="math_constants.intro"></a><a class="link" href="index.html#math_constants.intro" title="Introduction">Introduction</a>
 </h2></div></div></div>
@@ -62,68 +62,68 @@
       <span><a name="math_constants.intro.why_use_boost_math_mathematical_constants_"></a></span><a class="link" href="index.html#math_constants.intro.why_use_boost_math_mathematical_constants_">Why
       use Boost.Math mathematical constants?</a>
     </h5>
-<div class="itemizedlist"><ul type="disc">
-<li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
           Readable. For the very many jobs just using built-in like <code class="computeroutput"><span class="keyword">double</span></code>, you can just write expressions like
 <pre class="programlisting"><span class="keyword">double</span> <span class="identifier">area</span> <span class="special">=</span> <span class="identifier">pi</span> <span class="special">*</span> <span class="identifier">r</span> <span class="special">*</span> <span class="identifier">r</span><span class="special">;</span></pre>
           (If that's all you want, jump direct to <a class="link" href="index.html#math_constants.tutorial.non_templ" title="Use in non-template code">use
           in non-template code</a>!)
         </li>
-<li>
+<li class="listitem">
           Effortless - avoiding a search of reference sources.
         </li>
-<li>
+<li class="listitem">
           Accurate - ensuring that the values are as accurate as possible for the
           chosen floating-point type (both built-in and multiprecision user-defined
           type (UDT) floating-point like NTL, MPFR/GMP, mp_float).
- <div class="itemizedlist"><ul type="circle">
-<li>
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
                 No loss of accuracy from repeated rounding of intermediate computations.
               </li>
-<li>
+<li class="listitem">
                 Result is computed with higher precision and only rounded once.
               </li>
-<li>
+<li class="listitem">
                 Less risk of inaccurate result from functions pow, trig and log at
                 <a href="http://en.wikipedia.org/wiki/Corner_case" target="_top">corner cases</a>.
               </li>
-<li>
+<li class="listitem">
                 Less risk of <a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html" target="_top">cancellation
                 error</a>.
               </li>
 </ul></div>
         </li>
-<li>
+<li class="listitem">
           Faster - can avoid (re-)calculation at runtime. This can be significant
           if:
- <div class="itemizedlist"><ul type="circle">
-<li>
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
                 Functions pow, trig or log are used.
               </li>
-<li>
+<li class="listitem">
                 Inside an inner loop.
               </li>
-<li>
+<li class="listitem">
                 Using a high-precision UDT.
               </li>
-<li>
+<li class="listitem">
                 Compiler optimizations possible with built-in types, especially
                 <code class="computeroutput"><span class="keyword">double</span></code>, are not available.
               </li>
 </ul></div>
         </li>
-<li>
+<li class="listitem">
           Portable - as possible between different systems using different floating-point
           precisions: see <a class="link" href="index.html#math_constants.tutorial.templ" title="Use in template code">use in template
           code</a>.
         </li>
-<li>
+<li class="listitem">
           Tested - by comparison with other published sources, or separately computed
           at long double precision.
         </li>
 </ul></div>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="math_constants.tutorial"></a><a class="link" href="index.html#math_constants.tutorial" title="Tutorial">Tutorial</a>
 </h2></div></div></div>
@@ -134,7 +134,7 @@
 <dt><span class="section"><a href="index.html#math_constants.tutorial.user_def">Use With User Defined
       Types</a></span></dt>
 </dl></div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="math_constants.tutorial.non_templ"></a><a class="link" href="index.html#math_constants.tutorial.non_templ" title="Use in non-template code">Use in non-template
       code</a>
@@ -176,7 +176,7 @@
         You can see the full list of available constants at <a class="link" href="index.html#math_constants.constants" title="The Mathematical Constants">math_constants.constants</a>.
       </p>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="math_constants.tutorial.templ"></a><a class="link" href="index.html#math_constants.tutorial.templ" title="Use in template code">Use in template code</a>
 </h3></div></div></div>
@@ -300,7 +300,7 @@
 </td></tr>
 </table></div>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="math_constants.tutorial.user_def"></a><a class="link" href="index.html#math_constants.tutorial.user_def" title="Use With User Defined Types">Use With User Defined
       Types</a>
@@ -318,25 +318,25 @@
         than that of the built-in floating pointer types, how the value returned
         is created is as follows:
       </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
             If the precision of the type is known at compile time:
- <div class="itemizedlist"><ul type="circle">
-<li>
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
                   If the precision is less than or equal to that of a <code class="computeroutput"><span class="keyword">float</span></code> and the type is constructable
                   from a <code class="computeroutput"><span class="keyword">float</span></code> then
                   our code returns a <code class="computeroutput"><span class="keyword">float</span></code>
                   literal. If the user-defined type is a literal type then the function
                   call that returns the constant will be a <code class="computeroutput"><span class="identifier">constexp</span></code>.
                 </li>
-<li>
+<li class="listitem">
                   If the precision is less than or equal to that of a <code class="computeroutput"><span class="keyword">double</span></code> and the type is constructable
                   from a <code class="computeroutput"><span class="keyword">double</span></code> then
                   our code returns a <code class="computeroutput"><span class="keyword">double</span></code>
                   literal. If the user-defined type is a literal type then the function
                   call that returns the constant will be a <code class="computeroutput"><span class="identifier">constexp</span></code>.
                 </li>
-<li>
+<li class="listitem">
                   If the precision is less than or equal to that of a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
                   and the type is constructable from a <code class="computeroutput"><span class="keyword">long</span>
                   <span class="keyword">double</span></code> then our code returns
@@ -344,26 +344,26 @@
                   literal. If the user-defined type is a literal type then the function
                   call that returns the constant will be a <code class="computeroutput"><span class="identifier">constexp</span></code>.
                 </li>
-<li>
+<li class="listitem">
                   If the precision is less than 100 decimal digits, then the constant
                   will be constructed (just the once, then cached in a thread-safe
                   manner) from a string representation of the constant.
                 </li>
-<li>
+<li class="listitem">
                   Otherwise the value is computed (just once, then cached in a thread-safe
                   manner).
                 </li>
 </ul></div>
           </li>
-<li>
+<li class="listitem">
             If the precision is unknown at compile time then:
- <div class="itemizedlist"><ul type="circle">
-<li>
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
                   If the runtime precision (obtained from a call to <code class="computeroutput"><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">digits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;()</span></code>)
                   is less than 100 decimal digits, then the constant is constructed
                   "on the fly" from the string representation of the constant.
                 </li>
-<li>
+<li class="listitem">
                   Otherwise the value is constructed "on the fly" by calculating
                   then value of the constant using the current default precision
                   of the type. Note that this can make use of the constants rather
@@ -505,6 +505,32 @@
 </tbody>
 </table></div>
 <p>
+ In addition, for user defined types that need special handling, it's possible
+ to [partially-] specialize the internal structure used by each constant.
+ For example suppose we're using the C++ wrapper around MPFR <code class="computeroutput"><span class="identifier">mpfr_class</span></code>: this has it's own representation
+ of Pi which we may well wish to use in place of the above mechanism. We can
+ achieve this by specialising the class template <code class="computeroutput"><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">detail</span><span class="special">::</span><span class="identifier">constant_pi</span></code>:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">constants</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
+
+<span class="keyword">template</span><span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">constant_pi</span><span class="special">&lt;</span><span class="identifier">mpfr_class</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="identifier">N</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;&amp;)</span>
+ <span class="special">{</span>
+ <span class="comment">// The tempate param N is one of the values in the table above,</span>
+ <span class="comment">// we can either handle all cases in one as is the case here, or</span>
+ <span class="comment">// overload "get" for the different options.</span>
+ <span class="identifier">mpfr_class</span> <span class="identifier">result</span><span class="special">;</span>
+ <span class="identifier">mpfr_const_pi</span><span class="special">(</span><span class="identifier">result</span><span class="special">.</span><span class="identifier">get_mpfr_t</span><span class="special">(),</span> <span class="identifier">GMP_RNDN</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="special">}}}}</span> <span class="comment">// namespaces</span>
+</pre>
+<p>
         Finally, since it can be tricky to diagnose what meta-programmed code is
         doing, there is a diagnostic routine that prints information about how this
         library will handle a specific type, it can be used like this:
@@ -538,7 +564,7 @@
 </pre>
 </div>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="math_constants.constants"></a><a class="link" href="index.html#math_constants.constants" title="The Mathematical Constants">The Mathematical Constants</a>
 </h2></div></div></div>
@@ -1965,7 +1991,7 @@
       </p></td></tr>
 </table></div>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="math_constants.new_const"></a><a class="link" href="index.html#math_constants.new_const" title="Defining New Constants">Defining New Constants</a>
 </h2></div></div></div>
@@ -1986,8 +2012,9 @@
     </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">constants</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">detail</span><span class="special">{</span>
 
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Real</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">N</span><span class="special">&gt;</span>
-<span class="identifier">Real</span> <span class="identifier">calculate_my_constant</span><span class="special">((</span><span class="keyword">const</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;&amp;</span> <span class="identifier">BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC</span><span class="special">(</span><span class="identifier">T</span><span class="special">))</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Real</span><span class="special">&gt;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">int</span> <span class="identifier">N</span><span class="special">&gt;</span>
+<span class="identifier">Real</span> <span class="identifier">constant_my_constant</span><span class="special">&lt;</span><span class="identifier">Real</span><span class="special">&gt;::</span><span class="identifier">compute</span><span class="special">(</span><span class="identifier">BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC</span><span class="special">(</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;))</span>
 <span class="special">{</span>
   <span class="keyword">int</span> <span class="identifier">required_precision</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">tools</span><span class="special">::</span><span class="identifier">digits</span><span class="special">&lt;</span><span class="identifier">Real</span><span class="special">&gt;();</span>
   <span class="identifier">Real</span> <span class="identifier">result</span> <span class="special">=</span> <span class="comment">/* value computed to required_precision bits */</span> <span class="special">;</span>
@@ -1997,15 +2024,30 @@
 <span class="special">}}}}</span> <span class="comment">// namespaces</span>
 </pre>
 <p>
+ Then define a placeholder for the constant itself:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">constants</span><span class="special">{</span>
+
+<span class="identifier">BOOST_DEFINE_MATH_CONSTANT</span><span class="special">(</span><span class="identifier">my_constant</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">);</span>
+
+<span class="special">}}}</span>
+</pre>
+<p>
       For example, to calculate &#960;/2, add to <code class="computeroutput"><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">calculate_constants</span><span class="special">.</span><span class="identifier">hpp</span></code>
     </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">N</span><span class="special">&gt;</span>
-<span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">calculate_half_pi</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;&amp;</span><span class="identifier">BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC</span><span class="special">(</span><span class="identifier">T</span><span class="special">))</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="identifier">N</span><span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">constant_half_pi</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">compute</span><span class="special">(</span><span class="identifier">BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC</span><span class="special">(</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;))</span>
 <span class="special">{</span>
    <span class="identifier">BOOST_MATH_STD_USING</span>
    <span class="keyword">return</span> <span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special">&lt;</span><span class="identifier">policies</span><span class="special">::</span><span class="identifier">digits2</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;()</span> <span class="special">/</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
+<p>
+ Then to <code class="computeroutput"><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></code> add:
+ </p>
+<pre class="programlisting"><span class="identifier">BOOST_DEFINE_MATH_CONSTANT</span><span class="special">(</span><span class="identifier">half_pi</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">);</span> <span class="comment">// actual values are temporary, we'll replace them later</span>
+</pre>
 <div class="note"><table border="0" summary="Note">
 <tr>
 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
@@ -2065,7 +2107,7 @@
       between them.
     </p>
 </div>
-<div class="section" lang="en">
+<div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="math_constants.FAQ"></a><a class="link" href="index.html#math_constants.FAQ" title="FAQs">FAQs</a>
 </h2></div></div></div>
@@ -2080,20 +2122,20 @@
 <p>
       Some of the criteria we have used are:
     </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
           Used in Boost.Math.
         </li>
-<li>
+<li class="listitem">
           Commonly used.
         </li>
-<li>
+<li class="listitem">
           Expensive to compute.
         </li>
-<li>
+<li class="listitem">
           Requested by users.
         </li>
-<li>
+<li class="listitem">
           No integer values (because so cheap to construct).<br> (You can easily
           define your own if found convenient, for example: <code class="computeroutput"><span class="identifier">FPT</span>
           <span class="identifier">one</span> <span class="special">=</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">FPT</span><span class="special">&gt;(</span><span class="number">42</span><span class="special">);</span></code>).
@@ -2104,57 +2146,57 @@
       <span><a name="math_constants.FAQ.how_are_constants_named_"></a></span><a class="link" href="index.html#math_constants.FAQ.how_are_constants_named_">How
       are constants named?</a>
     </h5>
-<div class="itemizedlist"><ul type="disc">
-<li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
           Not macros, so no upper case.
         </li>
-<li>
+<li class="listitem">
           All lower case (following C++ standard names).
         </li>
-<li>
+<li class="listitem">
           No CamelCase.
         </li>
-<li>
+<li class="listitem">
           Underscore as _ delimiter between words.
         </li>
-<li>
+<li class="listitem">
           Numbers spelt as words rather than decimal digits (except following pow).
         </li>
-<li>
+<li class="listitem">
           Abbreviation words:
- <div class="itemizedlist"><ul type="circle">
-<li>
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
                 root for square root.
               </li>
-<li>
+<li class="listitem">
                 cbrt for cube root.
               </li>
-<li>
+<li class="listitem">
                 pow for pow function using decimal digits like pow23 for n<sup>2/3</sup>.
               </li>
-<li>
+<li class="listitem">
                 div for divided by or operator /.
               </li>
-<li>
+<li class="listitem">
                 minus for operator -, plus for operator +.
               </li>
-<li>
+<li class="listitem">
                 sqr for squared.
               </li>
-<li>
+<li class="listitem">
                 cubed for cubed n<sup>3</sup>.
               </li>
-<li>
+<li class="listitem">
                 words for greek, like &#960;, &#950; and &#915;.
               </li>
-<li>
+<li class="listitem">
                 words like half, third, three_quarters, sixth for fractions. (Digit(s)
                 can get muddled).
               </li>
-<li>
+<li class="listitem">
                 log10 for log<sub>10</sub>
               </li>
-<li>
+<li class="listitem">
                 ln for log<sub>e</sub>
               </li>
 </ul></div>
@@ -2354,34 +2396,34 @@
       <span><a name="math_constants.FAQ.where_can_i_find_other_high_precision_constants_"></a></span><a class="link" href="index.html#math_constants.FAQ.where_can_i_find_other_high_precision_constants_">Where
       can I find other high precision constants?</a>
     </h6>
-<div class="orderedlist"><ol type="1">
-<li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
           Constants with very high precision and good accuracy (&gt;40 decimal digits)
           from Simon Plouffe's web based collection http://pi.lacim.uqam.ca/eng/.
         </li>
-<li>
+<li class="listitem">
           Checks using printed text optically scanned values and converted from:
           D. E. Knuth, Art of Computer Programming, Appendix A, Table 1, Vol 1, ISBN
           0 201 89683 4 (1997)
         </li>
-<li>
+<li class="listitem">
           M. Abrahamovitz &amp; I. E. Stegun, National Bureau of Standards, Handbook
           of Mathematical Functions, a reference source for formulae now superceded
           by
         </li>
-<li>
+<li class="listitem">
           Frank W. Olver, Daniel W. Lozier, Ronald F. Boisvert, Charles W. Clark,
           NIST Handbook of Mathemetical Functions, Cambridge University Press, ISBN
           978-0-521-14063-8, 2010.
         </li>
-<li>
+<li class="listitem">
           John F Hart, Computer Approximations, Kreiger (1978) ISBN 0 88275 642 7.
         </li>
-<li>
+<li class="listitem">
           Some values from Cephes Mathematical Library, Stephen L. Moshier and CALC100
           100 decimal digit Complex Variable Calculator Program, a DOS utility.
         </li>
-<li>
+<li class="listitem">
           Xavier Gourdon, Pascal Sebah, 50 decimal digits constants at <a href="http://numbers.computation.free.fr/Constants/constants.html" target="_top">Number,
           constants and computation</a>.
         </li>
@@ -2394,17 +2436,17 @@
 <p>
       Not here in this Boost.Math collection because physical constants:
     </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
           Are measurements.
         </li>
-<li>
+<li class="listitem">
           Are not truly constant and keeping changing as mensuration technology improves.
         </li>
-<li>
+<li class="listitem">
           Have a instrinsic uncertainty.
         </li>
-<li>
+<li class="listitem">
           Mathematical constants are stored and represented at varying precision,
           but should never be inaccurate.
         </li>
@@ -2415,7 +2457,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: December 07, 2011 at 15:22:16 GMT</small></p></td>
+<td align="left"><p><small>Last revised: December 16, 2011 at 12:13:48 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>


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