[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>expm1</title>
<link rel="stylesheet" href="../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Math Toolkit 2.6.0">
<link rel="home" href="../../index.html" title="Math Toolkit 3.0.0">
<link rel="up" href="../powers.html" title="Basic Functions">
<link rel="prev" href="log1p.html" title="log1p">
<link rel="next" href="cbrt.html" title="cbrt">
@@ -33,8 +33,8 @@
<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>
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">expm1</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</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">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter&#160;18.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">expm1</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter&#160;18.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
<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">class</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">expm1</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
<span class="special">}}</span> <span class="comment">// namespaces</span>
</pre>
@@ -47,17 +47,17 @@
when <span class="emphasis"><em>x</em></span> is an integer type and T otherwise.
</p>
<p>
The final <a class="link" href="../../policy.html" title="Chapter&#160;18.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
The final <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
be used to control the behaviour of the function: how it handles errors,
what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter&#160;18.&#160;Policies: Controlling Precision, Error Handling etc">policy
what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">policy
documentation for more details</a>.
</p>
<p>
For small x, then <code class="computeroutput">e<sup>x</sup></code> is very close to 1, as a result calculating <code class="computeroutput">e<sup>x</sup> - 1</code> results in
catastrophic cancellation errors when x is small. <code class="computeroutput"><span class="identifier">expm1</span></code>
calculates <code class="computeroutput">e<sup>x</sup> - 1</code> using rational approximations (for up to 128-bit long doubles),
otherwise via a series expansion when x is small (giving an accuracy of less
than 2&#603;).
For small <span class="emphasis"><em>x</em></span>, then <code class="computeroutput">e<sup>x</sup></code> is very close to 1, as a result calculating
<code class="computeroutput">e<sup>x</sup> - 1</code> results in catastrophic cancellation errors when <span class="emphasis"><em>x</em></span> is
small. <code class="computeroutput"><span class="identifier">expm1</span></code> calculates <code class="computeroutput">e<sup>x</sup> - 1</code> using
rational approximations (for up to 128-bit long doubles), otherwise via a
series expansion when x is small (giving an accuracy of less than 2ɛ).
</p>
<p>
Finally when BOOST_HAS_EXPM1 is defined then the <code class="computeroutput"><span class="keyword">float</span><span class="special">/</span><span class="keyword">double</span><span class="special">/</span><span class="keyword">long</span> <span class="keyword">double</span></code>
@@ -67,9 +67,10 @@
<p>
The following graph illustrates the behaviour of expm1:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../graphs/expm1.svg" align="middle"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../graphs/expm1.svg" align="middle"></span>
</p></blockquote></div>
<h5>
<a name="math_toolkit.powers.expm1.h0"></a>
<span class="phrase"><a name="math_toolkit.powers.expm1.accuracy"></a></span><a class="link" href="expm1.html#math_toolkit.powers.expm1.accuracy">Accuracy</a>
@@ -79,7 +80,7 @@
should have approximately 1 epsilon accuracy.
</p>
<div class="table">
<a name="math_toolkit.powers.expm1.table_expm1"></a><p class="title"><b>Table&#160;6.79.&#160;Error rates for expm1</b></p>
<a name="math_toolkit.powers.expm1.table_expm1"></a><p class="title"><b>Table 8.82. Error rates for expm1</b></p>
<div class="table-contents"><table class="table" summary="Error rates for expm1">
<colgroup>
<col>
@@ -93,22 +94,22 @@
</th>
<th>
<p>
Microsoft Visual C++ version 12.0<br> Win32<br> double
GNU C++ version 7.1.0<br> linux<br> long double
</p>
</th>
<th>
<p>
GNU C++ version 5.1.0<br> linux<br> double
GNU C++ version 7.1.0<br> linux<br> double
</p>
</th>
<th>
<p>
GNU C++ version 5.1.0<br> linux<br> long double
Sun compiler version 0x5150<br> Sun Solaris<br> long double
</p>
</th>
<th>
<p>
Sun compiler version 0x5130<br> Sun Solaris<br> long double
Microsoft Visual C++ version 14.1<br> Win32<br> double
</p>
</th>
</tr></thead>
@@ -120,30 +121,27 @@
</td>
<td>
<p>
<span class="blue">Max = 0.996&#949; (Mean = 0.283&#949;)</span><br> <br>
(<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 1.31&#949; (Mean = 0.496&#949;))
<span class="blue">Max = 0.99 (Mean = 0.402ε)</span><br> <br>
(<span class="emphasis"><em>&lt;cmath&gt;:</em></span> Max = 0.992ε (Mean = 0.402ε))<br>
(<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 0.992ε (Mean = 0.402ε))
</p>
</td>
<td>
<p>
<span class="blue">Max = 0.793&#949; (Mean = 0.126&#949;)</span><br> <br>
(<span class="emphasis"><em>Rmath 3.0.2:</em></span> Max = 0.793&#949; (Mean = 0.126&#949;))<br>
(<span class="emphasis"><em>Cephes:</em></span> Max = 1.53&#949; (Mean = 0.535&#949;))
<span class="blue">Max = 0.793ε (Mean = 0.126ε)</span><br> <br>
(<span class="emphasis"><em>Rmath 3.2.3:</em></span> Max = 0.793ε (Mean = 0.126ε))
</p>
</td>
<td>
<p>
<span class="blue">Max = 0.992&#949; (Mean = 0.402&#949;)</span><br> <br>
(<span class="emphasis"><em>&lt;tr1/cmath&gt;:</em></span> <span class="red">Max
= 1.26e+19&#949; (Mean = 4.89e+18&#949;) <a class="link" href="../logs_and_tables/logs.html#errors_GNU_C_version_5_1_0_linux_long_double_expm1__tr1_cmath__Random_test_data">And
other failures.</a>)</span><br> (<span class="emphasis"><em>&lt;math.h&gt;:</em></span>
Max = 0.992&#949; (Mean = 0.402&#949;))
<span class="blue">Max = 1.31ε (Mean = 0.428ε)</span><br> <br>
(<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 0.996ε (Mean = 0.426ε))
</p>
</td>
<td>
<p>
<span class="blue">Max = 1.31&#949; (Mean = 0.406&#949;)</span><br> <br>
(<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 0.996&#949; (Mean = 0.426&#949;))
<span class="blue">Max = 1.31ε (Mean = 0.496ε)</span><br> <br>
(<span class="emphasis"><em>&lt;math.h&gt;:</em></span> Max = 1.31ε (Mean = 0.496ε))
</p>
</td>
</tr></tbody>
@@ -160,11 +158,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014, 2017 Nikhar
Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam
Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle Walker
and Xiaogang Zhang<p>
<td align="right"><div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>