Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49282 - in trunk/libs/math: doc/sf_and_dist/html/math_toolkit/toolkit/internals1 minimax test
From: john_at_[hidden]
Date: 2008-10-11 11:46:54


Author: johnmaddock
Date: 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
New Revision: 49282
URL: http://svn.boost.org/trac/boost/changeset/49282

Log:
Fix inspection report issues.
Added:
   trunk/libs/math/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html (contents, props changed)
Text files modified:
   trunk/libs/math/minimax/f.cpp | 2 +-
   trunk/libs/math/test/acosh_data.ipp | 7 +++++++
   trunk/libs/math/test/asinh_data.ipp | 7 +++++++
   trunk/libs/math/test/atanh_data.ipp | 7 +++++++
   4 files changed, 22 insertions(+), 1 deletions(-)

Added: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html
==============================================================================
--- (empty file)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
@@ -0,0 +1,383 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Numeric Constants</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
+<link rel="start" href="../../../index.html" title="Math Toolkit">
+<link rel="up" href="../internals1.html" title="Reused Utilities">
+<link rel="prev" href="../internals1.html" title="Reused Utilities">
+<link rel="next" href="series_evaluation.html" title="Series Evaluation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../internals1.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../internals1.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="series_evaluation.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="math_toolkit.toolkit.internals1.constants"></a><a href="constants.html" title="Numeric Constants"> Numeric
+ Constants</a>
+</h4></div></div></div>
+<a name="math_toolkit.toolkit.internals1.constants.synopsis"></a><h5>
+<a name="id771787"></a>
+ Synopsis
+ </h5>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">constants</span><span class="special">/</span><span class="identifier">constants</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </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">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">T</span> <span class="identifier">pi</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">root_pi</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">root_half_pi</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">root_two_pi</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">root_ln_four</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">e</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">half</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">euler</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">root_two</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">ln_two</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">ln_ln_two</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">third</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">twothirds</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">pi_minus_three</span><span class="special">();</span>
+<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="identifier">T</span> <span class="identifier">four_minus_pi</span><span class="special">();</span>
+
+<span class="special">}}}</span> <span class="comment">// namespaces
+</span></pre>
+<a name="math_toolkit.toolkit.internals1.constants.description"></a><h5>
+<a name="id772650"></a>
+ Description
+ </h5>
+<p>
+ The header <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> contains some numeric constants that
+ we have found useful in the development of this library. New constants
+ are added on an ad-hock basis based on need.
+ </p>
+<p>
+ Usage is like this:
+ </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">&gt;</span>
+<span class="identifier">T</span> <span class="identifier">circumference</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">r</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="number">2</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">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;()</span> <span class="special">*</span> <span class="identifier">r</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ All the constants are accurate to at least the 34 decimal digits required
+ for 128-bit long doubles, and most are accurate to 100 digits or more when
+ used with a suitable arbitrary precision type.
+ </p>
+<p>
+ The following table summarises the constants we have at present:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Constant
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+<th>
+ <p>
+ Value
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ pi
+ </p>
+ </td>
+<td>
+ <p>
+ &#960;
+ </p>
+ </td>
+<td>
+ <p>
+ 3.1415926535897932384...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ root_pi
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;&#960;
+ </p>
+ </td>
+<td>
+ <p>
+ 1.772453850905516027...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ root_half_pi
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;(&#960;/2)
+ </p>
+ </td>
+<td>
+ <p>
+ 1.253314137315500251...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ root_two_pi
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;(2*&#960;)
+ </p>
+ </td>
+<td>
+ <p>
+ 2.506628274631000502...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ root_ln_four
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;(ln(4))
+ </p>
+ </td>
+<td>
+ <p>
+ 1.17741002251547469...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ e
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>e</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ 2.71828182845904523536...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ half
+ </p>
+ </td>
+<td>
+ <p>
+ 0.5
+ </p>
+ </td>
+<td>
+ <p>
+ 0.5
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ euler
+ </p>
+ </td>
+<td>
+ <p>
+ Euler's constant
+ </p>
+ </td>
+<td>
+ <p>
+ 0.577215664901532860606
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ root_two
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;2
+ </p>
+ </td>
+<td>
+ <p>
+ 1.4142135623730950488...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ln_two
+ </p>
+ </td>
+<td>
+ <p>
+ ln(2)
+ </p>
+ </td>
+<td>
+ <p>
+ 0.6931471805599453094...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ln_ln_two
+ </p>
+ </td>
+<td>
+ <p>
+ ln(ln(2))
+ </p>
+ </td>
+<td>
+ <p>
+ -0.3665129205816643...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ third
+ </p>
+ </td>
+<td>
+ <p>
+ 1/3
+ </p>
+ </td>
+<td>
+ <p>
+ 0.333333333333333333...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ twothirds
+ </p>
+ </td>
+<td>
+ <p>
+ 2/3
+ </p>
+ </td>
+<td>
+ <p>
+ 0.666666666666666666...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ pi_minus_three
+ </p>
+ </td>
+<td>
+ <p>
+ &#960;-3
+ </p>
+ </td>
+<td>
+ <p>
+ 0.14159265358979323846...
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ four_minus_pi
+ </p>
+ </td>
+<td>
+ <p>
+ 4-&#960;
+ </p>
+ </td>
+<td>
+ <p>
+ 0.85840734641020676153735...
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2006 , 2007, 2008 John Maddock, Paul A. Bristow, Hubert
+ Holin, Xiaogang Zhang and Bruno Lalande<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="../internals1.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../internals1.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="series_evaluation.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: trunk/libs/math/minimax/f.cpp
==============================================================================
--- trunk/libs/math/minimax/f.cpp (original)
+++ trunk/libs/math/minimax/f.cpp 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
@@ -312,7 +312,7 @@
       }
    case 28:
       {
- // log1p over [-0.5,0.5]
+ // log1p over [-0.5,0.5]
          boost::math::ntl::RR y = x;
          if(fabs(y) < 1e-100)
             y = (y == 0) ? 1e-100 : boost::math::sign(y) * 1e-100;

Modified: trunk/libs/math/test/acosh_data.ipp
==============================================================================
--- trunk/libs/math/test/acosh_data.ipp (original)
+++ trunk/libs/math/test/acosh_data.ipp 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to 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)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 261> acosh_data = {{
       { SC_(1.000001430511474609375), SC_(0.001691455665129294448190238354291760044433) },

Modified: trunk/libs/math/test/asinh_data.ipp
==============================================================================
--- trunk/libs/math/test/asinh_data.ipp (original)
+++ trunk/libs/math/test/asinh_data.ipp 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to 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)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 281> asinh_data = {{
       { SC_(-497.181640625), SC_(-6.902103625349694816896128061929344488774) },

Modified: trunk/libs/math/test/atanh_data.ipp
==============================================================================
--- trunk/libs/math/test/atanh_data.ipp (original)
+++ trunk/libs/math/test/atanh_data.ipp 2008-10-11 11:46:53 EDT (Sat, 11 Oct 2008)
@@ -1,3 +1,10 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to 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)
+
 #define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
    static const boost::array<boost::array<T, 2>, 260> atanh_data = {{
       { SC_(-0.9999983310699462890625), SC_(-6.998237084679026894944012639589359039154) },


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