Fix more typos, via latest version of typochecker tool

This commit is contained in:
Brian Wignall 2019-12-20 10:41:42 -05:00
parent e504da1b44
commit df17d11299
98 changed files with 136 additions and 136 deletions

View File

@ -443,7 +443,7 @@ boost/math/special_functions/lanczos.hpp] or
boost/math/bindings/detail/big_lanczos.hpp]:
in the former case you will need change
`static_cast`'s to `lexical_cast`'s, and the constants to /strings/
(in order to ensure the coefficients aren't truncated to `long doubl`e)
(in order to ensure the coefficients aren't truncated to `long double`)
and then specialise `lanczos_traits` for type T. Otherwise you may have to hack
[@../../tools/lanczos_generator.cpp
libs/math/tools/lanczos_generator.cpp] to find a suitable

View File

@ -105,7 +105,7 @@ the binomial distribution with a single trial should be used, for example:
]
[h4 References]
* [@http://en.wikipedia.org/wiki/Bernoulli_distribution Wikpedia Bernoulli distribution]
* [@http://en.wikipedia.org/wiki/Bernoulli_distribution Wikipedia Bernoulli distribution]
* [@http://mathworld.wolfram.com/BernoulliDistribution.html Weisstein, Eric W. "Bernoulli Distribution." From MathWorld--A Wolfram Web Resource.]
[endsect] [/section:bernoulli_dist bernoulli]

View File

@ -159,7 +159,7 @@ Some 'known good' test values were obtained using __WolframAlpha.
[h4 References]
* [@http://en.wikipedia.org/wiki/Triangular_distribution Wikpedia triangular distribution]
* [@http://en.wikipedia.org/wiki/Triangular_distribution Wikipedia triangular distribution]
* [@http://mathworld.wolfram.com/TriangularDistribution.html Weisstein, Eric W. "Triangular Distribution." From MathWorld--A Wolfram Web Resource.]
* Evans, M.; Hastings, N.; and Peacock, B. "Triangular Distribution." Ch. 40 in Statistical Distributions, 3rd ed. New York: Wiley, pp. 187-188, 2000, ISBN - 0471371246.
* [@http://www.measurement.sk/2002/S1/Wimmer2.pdf Gejza Wimmer, Viktor Witkovsky and Tomas Duby,

View File

@ -116,7 +116,7 @@ b is the /upper/ parameter,
]
[h4 References]
* [@http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29 Wikpedia continuous uniform distribution]
* [@http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29 Wikipedia continuous uniform distribution]
* [@http://mathworld.wolfram.com/UniformDistribution.html Weisstein, Weisstein, Eric W. "Uniform Distribution." From MathWorld--A Wolfram Web Resource.]
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm]

View File

@ -312,7 +312,7 @@ public:
++color_index;
color_index = color_index % (sizeof(colors)/sizeof(colors[0]));
}
} // descrete
} // discrete
plot.write(file);
} // void plot(const std::string& title, const std::string& file)

View File

@ -244,7 +244,7 @@
<span class="keyword">auto</span> <span class="identifier">y_range</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">values</span><span class="special">(</span><span class="identifier">r</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">barycentric_rational</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">b</span><span class="special">(</span><span class="identifier">x_range</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">x_range</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">y_range</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
<span class="comment">//</span>
<span class="comment">// We'll use a lamda expression to provide the functor to our root finder, since we want</span>
<span class="comment">// We'll use a lambda expression to provide the functor to our root finder, since we want</span>
<span class="comment">// the abscissa value that yields 3, not zero. We pass the functor b by value to the</span>
<span class="comment">// lambda expression since barycentric_rational is trivial to copy.</span>
<span class="comment">// Here we're using simple bisection to find the root:</span>

View File

@ -338,7 +338,7 @@
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a href="http://en.wikipedia.org/wiki/Bernoulli_distribution" target="_top">Wikpedia
<a href="http://en.wikipedia.org/wiki/Bernoulli_distribution" target="_top">Wikipedia
Bernoulli distribution</a>
</li>
<li class="listitem">

View File

@ -405,7 +405,7 @@
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a href="http://en.wikipedia.org/wiki/Triangular_distribution" target="_top">Wikpedia
<a href="http://en.wikipedia.org/wiki/Triangular_distribution" target="_top">Wikipedia
triangular distribution</a>
</li>
<li class="listitem">

View File

@ -335,7 +335,7 @@
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a href="http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29" target="_top">Wikpedia
<a href="http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29" target="_top">Wikipedia
continuous uniform distribution</a>
</li>
<li class="listitem">

View File

@ -69,7 +69,7 @@
<p>
You will get a (perhaps perplexing) compiler error, usually indicating
that there is no such function to be found. Instead you need to specify
the return type explicity and write:
the return type explicitly and write:
</p>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">factorial</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">);</span></code>

View File

@ -42,7 +42,7 @@
algorithm is, and the general form of the approximation you want to achieve.
</p>
<p>
Unless you already familar with the Remez method, you should first read the
Unless you already familiar with the Remez method, you should first read the
<a class="link" href="../remez.html" title="The Remez Method">brief background article explaining the
principles behind the Remez algorithm</a>.
</p>

View File

@ -168,7 +168,7 @@
<dl class="variablelist">
<dt><span class="term">get_coefs</span></dt>
<dd><p>
Functor that returns the corefficients of the recurrence relation.
Functor that returns the coefficients of the recurrence relation.
The coefficients should be centered on position <span class="emphasis"><em>second</em></span>.
</p></dd>
<dt><span class="term">number_of_steps</span></dt>
@ -212,7 +212,7 @@
<dl class="variablelist">
<dt><span class="term">get_coefs</span></dt>
<dd><p>
Functor that returns the corefficients of the recurrence relation.
Functor that returns the coefficients of the recurrence relation.
The coefficients should be centered on position <span class="emphasis"><em>second</em></span>.
</p></dd>
<dt><span class="term">number_of_steps</span></dt>

View File

@ -28,7 +28,7 @@
</h2></div></div></div>
<p>
This section contains internal utilities used by the library's implementation
along with tools used in development and testing. These tools have limitied
along with tools used in development and testing. These tools have limited
documentation, but now have quite stable interfaces and may also be useful
outside Boost.Math.
</p>

View File

@ -104,7 +104,7 @@
</p></blockquote></div>
<p>
Otherwise evalution is via the <a href="http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/" target="_top">primary
Otherwise evaluation is via the <a href="http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/" target="_top">primary
definition</a>:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>

View File

@ -50,7 +50,7 @@
SAS Functions for Computing Probabilities</a>.
</p>
<p class="simpara">
You will find the interface more familar, but to be able to select a distribution
You will find the interface more familiar, but to be able to select a distribution
(perhaps using a string) see the Extras/Future Directions section, and
/boost/libs/math/dot_net_example/boost_math.cpp for an example that is
used to create a C# (C sharp) utility (that you might also find useful):

View File

@ -50,7 +50,7 @@
<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">value_type</span><span class="special">;</span>
</pre>
<p>
These provide easy acces to the type the template is built upon.
These provide easy access to the type the template is built upon.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

View File

@ -91,7 +91,7 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
The function is asymetrical, which is to say, given <code class="computeroutput"><span class="identifier">u</span>
The function is asymmetrical, which is to say, given <code class="computeroutput"><span class="identifier">u</span>
<span class="special">=</span> <span class="identifier">ulp</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> if <code class="computeroutput"><span class="identifier">x</span>
<span class="special">&gt;</span> <span class="number">0</span></code>
then <code class="computeroutput"><span class="identifier">x</span> <span class="special">+</span>

View File

@ -34,7 +34,7 @@
1.5.8 - 17/12/2005: Converted documentation to Quickbook Format.
</li>
<li class="listitem">
1.5.7 - 25/02/2003: transitionned to the unit test framework; &lt;boost/config.hpp&gt;
1.5.7 - 25/02/2003: transitioned to the unit test framework; &lt;boost/config.hpp&gt;
now included by the library header (rather than the test files), via &lt;boost/math/quaternion.hpp&gt;.
</li>
<li class="listitem">

View File

@ -73,7 +73,7 @@
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">T</span> <span class="identifier">abs</span><span class="special">(</span><span class="identifier">octonion</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">o</span><span class="special">);</span>
</pre>
<p>
This return the magnitude (Euclidian norm) of the octonion.
This return the magnitude (Euclidean norm) of the octonion.
</p>
<h5>
<a name="math_toolkit.oct_value_ops.h5"></a>
@ -83,9 +83,9 @@
</pre>
<p>
This return the (Cayley) norm of the octonion. The term "norm" might
be confusing, as most people associate it with the Euclidian norm (and quadratic
be confusing, as most people associate it with the Euclidean norm (and quadratic
functionals). For this version of (the mathematical objects known as) octonions,
the Euclidian norm (also known as magnitude) is the square root of the Cayley
the Euclidean norm (also known as magnitude) is the square root of the Cayley
norm.
</p>
</div>

View File

@ -34,7 +34,7 @@
1.5.8 - 17/12/2005: Converted documentation to Quickbook Format.
</li>
<li class="listitem">
1.5.7 - 24/02/2003: transitionned to the unit test framework; &lt;boost/config.hpp&gt;
1.5.7 - 24/02/2003: transitioned to the unit test framework; &lt;boost/config.hpp&gt;
now included by the library header (rather than the test files).
</li>
<li class="listitem">

View File

@ -31,7 +31,7 @@
Improve testing.
</li>
<li class="listitem">
Rewrite input operatore using Spirit (creates a dependency).
Rewrite input operator using Spirit (creates a dependency).
</li>
<li class="listitem">
Put in place an Expression Template mechanism (perhaps borrowing from uBlas).

View File

@ -44,7 +44,7 @@
site.</a>
</p>
<p>
For example, entering the commmand: <code class="computeroutput"><span class="identifier">differentiate</span>
For example, entering the command: <code class="computeroutput"><span class="identifier">differentiate</span>
<span class="identifier">x</span> <span class="special">^</span> <span class="number">5</span></code>
</p>
<p>

View File

@ -308,7 +308,7 @@
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
There is a compromise between accuracy and speed when chosing the value
There is a compromise between accuracy and speed when choosing the value
of <code class="computeroutput"><span class="identifier">digits</span></code>. It is tempting
to simply chose <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digits</span></code>, but this may mean some inefficient
and unnecessary iterations as the function thrashes around trying to locate

View File

@ -122,7 +122,7 @@
</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">double</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">elliptic_root_functor_1deriv</span>
<span class="special">{</span> <span class="comment">// Functor also returning 1st derviative.</span>
<span class="special">{</span> <span class="comment">// Functor also returning 1st derivative.</span>
<span class="identifier">BOOST_STATIC_ASSERT_MSG</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">==</span> <span class="keyword">false</span><span class="special">,</span> <span class="string">"Only floating-point type types can be used!"</span><span class="special">);</span>
<span class="identifier">elliptic_root_functor_1deriv</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">arc</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">radius</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">m_arc</span><span class="special">(</span><span class="identifier">arc</span><span class="special">),</span> <span class="identifier">m_radius</span><span class="special">(</span><span class="identifier">radius</span><span class="special">)</span>

View File

@ -74,7 +74,7 @@
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">T</span> <span class="identifier">abs</span><span class="special">(</span><span class="identifier">quaternion</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">q</span><span class="special">);</span>
</pre>
<p>
This return the magnitude (Euclidian norm) of the quaternion.
This return the magnitude (Euclidean norm) of the quaternion.
</p>
<h5>
<a name="math_toolkit.value_op.h5"></a>
@ -84,9 +84,9 @@
</pre>
<p>
This return the (Cayley) norm of the quaternion. The term "norm"
might be confusing, as most people associate it with the Euclidian norm (and
might be confusing, as most people associate it with the Euclidean norm (and
quadratic functionals). For this version of (the mathematical objects known
as) quaternions, the Euclidian norm (also known as magnitude) is the square
as) quaternions, the Euclidean norm (also known as magnitude) is the square
root of the Cayley norm.
</p>
</div>

View File

@ -12,7 +12,7 @@ is often not an easy task, and one to which many books have been devoted.
To use this tool, you will need to have a reasonable grasp of what the Remez
algorithm is, and the general form of the approximation you want to achieve.
Unless you already familar with the Remez method, you should first read the
Unless you already familiar with the Remez method, you should first read the
[link math_toolkit.remez brief background article explaining the principles behind the Remez algorithm].
The program consists of two parts:

View File

@ -101,7 +101,7 @@ the maximum number of permitted iterations in the associated continued fraction.
Applies a recurrence relation in a stable forward direction, starting with the values F[sub n-1] and F[sub n].
[variablelist
[[get_coefs] [Functor that returns the corefficients of the recurrence relation. The coefficients should be centered on position /second/.]]
[[get_coefs] [Functor that returns the coefficients of the recurrence relation. The coefficients should be centered on position /second/.]]
[[number_of_steps][The number of steps to apply the recurrence relation onwards from /second/.]]
[[first] [The value of F[sub n-1]]]
[[second] [The value of F[sub n]]]
@ -118,7 +118,7 @@ Returns F[sub n + number_of_steps].
Applies a recurrence relation in a stable backward direction, starting with the values F[sub n+1] and F[sub n].
[variablelist
[[get_coefs] [Functor that returns the corefficients of the recurrence relation. The coefficients should be centered on position /second/.]]
[[get_coefs] [Functor that returns the coefficients of the recurrence relation. The coefficients should be centered on position /second/.]]
[[number_of_steps][The number of steps to apply the recurrence relation backwards from /second/.]]
[[first] [The value of F[sub n+1]]]
[[second] [The value of F[sub n]]]

View File

@ -19,7 +19,7 @@ the value of the real part is 1
the value of the unreal part is (0,2,3,4,5,6,7,8)
the value of the sup norm is 8
the value of the l1 norm is 36
the value of the magnitude (euclidian norm) is 14.2829
the value of the magnitude (Euclidean norm) is 14.2829
the value of the (Cayley) norm is 204
the value of the conjugate is (1,-2,-3,-4,-5,-6,-7,-8)
the value of the exponential is (-0.300136,0.379239,0.568858,0.758478,0.948097,1.13772,1.32734,1.51696)

View File

@ -13,7 +13,7 @@ For example, `normal my_norm(0, 1); pdf(my_norm, 2.0);`
# I'm a user of [@http://support.sas.com/rnd/app/da/new/probabilityfunctions.html New SAS Functions for Computing Probabilities].
You will find the interface more familar, but to be able to select a distribution (perhaps using a string)
You will find the interface more familiar, but to be able to select a distribution (perhaps using a string)
see the Extras/Future Directions section,
and /boost/libs/math/dot_net_example/boost_math.cpp for an example that is used to create a C# (C sharp) utility
(that you might also find useful):

View File

@ -31,7 +31,7 @@ the value of the real part is 1
the value of the unreal part is (0,2,3,4)
the value of the sup norm is 4
the value of the l1 norm is 10
the value of the magnitude (euclidian norm) is 5.47723
the value of the magnitude (Euclidean norm) is 5.47723
the value of the (Cayley) norm is 30
the value of the conjugate is (1,-2,-3,-4)
the value of the exponential is (1.69392,-0.78956,-1.18434,-1.57912)

View File

@ -194,7 +194,7 @@ For 0.5 > x > [epsilon] the following rearrangement of the primary definition is
[equation asinh4]
Otherwise evalution is via the
Otherwise evaluation is via the
[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/
primary definition]:

View File

@ -780,7 +780,7 @@ namespace distribution_explorer
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.newToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.newToolStripMenuItem.Text = "&New";
this.newToolStripMenuItem.ToolTipText = "New is not yet implementd. Enter data into dialog boxes.";
this.newToolStripMenuItem.ToolTipText = "New is not yet implemented. Enter data into dialog boxes.";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// openToolStripMenuItem
@ -792,7 +792,7 @@ namespace distribution_explorer
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.openToolStripMenuItem.Text = "&Open";
this.openToolStripMenuItem.ToolTipText = "Open is not yet implementd. Enter data into dialog boxes.";
this.openToolStripMenuItem.ToolTipText = "Open is not yet implemented. Enter data into dialog boxes.";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// toolStripSeparator

View File

@ -472,7 +472,7 @@ namespace distribution_explorer
{
coefficient_of_variation.Text = "Undefined";
}
sw.WriteLine("Cofficient of variation" + separator + coefficient_of_variation.Text);
sw.WriteLine("Coefficient of variation" + separator + coefficient_of_variation.Text);
try
{
kurtosis.Text = dist.kurtosis().ToString();

View File

@ -62,7 +62,7 @@ int main()
//[arcsine_snip_8
using boost::math::arcsine_distribution;
arcsine_distribution<> as(2, 5); // Cconstructs a double arcsine distribution.
arcsine_distribution<> as(2, 5); // Constructs a double arcsine distribution.
BOOST_ASSERT(as.x_min() == 2.); // as.x_min() returns 2.
BOOST_ASSERT(as.x_max() == 5.); // as.x_max() returns 5.
//] [/arcsine_snip_8]

View File

@ -78,7 +78,7 @@ int main()
auto y_range = boost::adaptors::values(r);
boost::math::barycentric_rational<double> b(x_range.begin(), x_range.end(), y_range.begin());
//
// We'll use a lamda expression to provide the functor to our root finder, since we want
// We'll use a lambda expression to provide the functor to our root finder, since we want
// the abscissa value that yields 3, not zero. We pass the functor b by value to the
// lambda expression since barycentric_rational is trivial to copy.
// Here we're using simple bisection to find the root:

View File

@ -25,7 +25,7 @@ void confidence_limits_on_std_deviation(
// For example if we set the confidence limit to
// 0.95, we know that if we repeat the sampling
// 100 times, then we expect that the true standard deviation
// will be between out limits on 95 occations.
// will be between out limits on 95 occasions.
// Note: this is not the same as saying a 95%
// confidence interval means that there is a 95%
// probability that the interval contains the true standard deviation.

View File

@ -19,7 +19,7 @@
//[fft_sines_table_example_1
/*`[h5 Using Boost.Multiprecision to generate a high-precision array of sine coefficents for use with FFT.]
/*`[h5 Using Boost.Multiprecision to generate a high-precision array of sine coefficients for use with FFT.]
The Boost.Multiprecision library can be used for computations requiring precision
exceeding that of standard built-in types such as `float`, `double`

View File

@ -30,7 +30,7 @@ the algorithms to find location (and some std output of course).
#include <boost/math/distributions/find_location.hpp>
using boost::math::find_location; // for mean
#include <boost/math/distributions/find_scale.hpp>
using boost::math::find_scale; // for standard devation
using boost::math::find_scale; // for standard deviation
using boost::math::complement; // Needed if you want to use the complement version.
using boost::math::policies::policy;

View File

@ -77,7 +77,7 @@ rsat reverse saturation current
\param v Voltage V to compute current I(V).
\param vt Thermal voltage, for example 0.0257025 = 25 mV, computed from boltzmann_k * temp / charge_q;
\param rsat Resistance in series with the diode.
\param re Instrinsic emitter resistance (estimated to be 0.3 ohm from the Rs = 0 data)
\param re Intrinsic emitter resistance (estimated to be 0.3 ohm from the Rs = 0 data)
\param isat Reverse saturation current (See equation 2).
\param nu Ideality factor (default = unity).

View File

@ -91,7 +91,7 @@ double i(double isat, double vd, double vt, double nu)
\param v Voltage V to compute current I(V).
\param vt Thermal voltage, for example 0.0257025 = 25 mV, computed from boltzmann_k * temp / charge_q;
\param rsat Resistance in series with the diode.
\param re Instrinsic emitter resistance (estimated to be 0.3 ohm from the Rs = 0 data)
\param re Intrinsic emitter resistance (estimated to be 0.3 ohm from the Rs = 0 data)
\param isat Reverse saturation current (See equation 2).
\param nu Ideality factor (default = unity).

View File

@ -77,7 +77,7 @@ int main ()
// (But these tests are expected to pass using non_finite num_put and num_get facets).
// Use the current 'native' default locale.
std::locale default_locale (std::locale::classic ()); // Note the currrent (default C) locale.
std::locale default_locale (std::locale::classic ()); // Note the current (default C) locale.
// Create plus and minus infinity.
double plus_infinity = +std::numeric_limits<double>::infinity();

View File

@ -75,7 +75,7 @@ int main ()
return 0;
}
std::locale default_locale (std::locale::classic ()); // Note the currrent (default C) locale.
std::locale default_locale (std::locale::classic ()); // Note the current (default C) locale.
// Create plus and minus infinity.
double plus_infinity = +std::numeric_limits<double>::infinity();

View File

@ -32,14 +32,14 @@ int main()
std::streamsize p = 2 + (bits * 30103UL) / 100000UL;
// Approximate number of significant decimal digits for 25 bits.
cout.precision(p);
cout << bits << " binary bits is approoximately equivalent to " << p << " decimal digits " << endl;
cout << bits << " binary bits is approximately equivalent to " << p << " decimal digits " << endl;
cout << "quantile(normal_distribution<double, policy<digits2<25> > >(), 0.05 = "
<< q << endl; // -1.64485
}
/*
Output:
25 binary bits is approoximately equivalent to 9 decimal digits
25 binary bits is approximately equivalent to 9 decimal digits
quantile(normal_distribution<double, policy<digits2<25> > >(), 0.05 = -1.64485363
*/

View File

@ -236,7 +236,7 @@ T cbrt_noderiv(T x)
template <class T>
struct cbrt_functor_deriv
{ // Functor also returning 1st derviative.
{ // Functor also returning 1st derivative.
cbrt_functor_deriv(T const& to_find_root_of) : a(to_find_root_of)
{ // Constructor stores value a to find root of,
// for example: calling cbrt_functor_deriv<T>(x) to use to get cube root of x.

View File

@ -341,7 +341,7 @@ If your differentiation is a little rusty
then you can get help, for example from the invaluable
[@http://www.wolframalpha.com/ WolframAlpha site.]
For example, entering the commmand: `differentiate x ^ 5`
For example, entering the command: `differentiate x ^ 5`
or the Wolfram Language command: ` D[x ^ 5, x]`

View File

@ -66,7 +66,7 @@ then you can get help, for example from the invaluable
http://www.wolframalpha.com/ site
entering the commmand
entering the command
differentiate x^5

View File

@ -185,7 +185,7 @@ boost::uintmax_t elliptic_root_noderiv(T radius, T arc, T guess)
template <class T = double>
struct elliptic_root_functor_1deriv
{ // Functor also returning 1st derviative.
{ // Functor also returning 1st derivative.
BOOST_STATIC_ASSERT_MSG(boost::is_integral<T>::value == false, "Only floating-point type types can be used!");
elliptic_root_functor_1deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius)

View File

@ -34,7 +34,7 @@ void confidence_limits_on_mean(double Sm, double Sd, unsigned Sn)
// For example if we set the confidence limit to
// 0.95, we know that if we repeat the sampling
// 100 times, then we expect that the true mean
// will be between out limits on 95 occations.
// will be between out limits on 95 occasions.
// Note: this is not the same as saying a 95%
// confidence interval means that there is a 95%
// probability that the interval contains the true mean.

View File

@ -32,7 +32,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -19,7 +19,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -428,7 +428,7 @@ namespace boost
// is less accurate, so use acos instead of asin for complement.
result = static_cast<RealType>(2) * acos(sqrt((x - x_min) / (x_max - x_min))) / pi<RealType>();
return result;
} // arcine ccdf
} // arcsine ccdf
template <class RealType, class Policy>
inline RealType quantile(const arcsine_distribution<RealType, Policy>& dist, const RealType& p)

View File

@ -679,7 +679,7 @@ namespace boost
// Metrika (Metrika) ISSN 0026-1335 CODEN MTRKA8
// 1993, vol. 40, no3-4, pp. 185-189 (4 ref.)
// Bounds for median and 50 percetage point of binomial and negative binomial distribution
// Bounds for median and 50 percentage point of binomial and negative binomial distribution
// Metrika, ISSN 0026-1335 (Print) 1435-926X (Online)
// Volume 41, Number 1 / December, 1994, DOI 10.1007/BF01895303
BOOST_MATH_STD_USING // ADL of std functions.

View File

@ -366,7 +366,7 @@ inline RealType kurtosis_excess(const fisher_f_distribution<RealType, Policy>& d
if(df2 <= 8)
{
return policies::raise_domain_error<RealType>(
function, "Second degree of freedom was %1% but must be > 8 in order for the distribution to have a kutosis.", df2, Policy());
function, "Second degree of freedom was %1% but must be > 8 in order for the distribution to have a kurtosis.", df2, Policy());
}
RealType df2_2 = df2 * df2;
RealType df1_2 = df1 * df1;

View File

@ -36,7 +36,7 @@ public:
m_t0 = t0;
if (n < 8) {
throw std::logic_error("The quntic B-spline interpolator requires at least 8 points.");
throw std::logic_error("The quintic B-spline interpolator requires at least 8 points.");
}
using std::isnan;

View File

@ -67,7 +67,7 @@ inline typename tools::promote_args<T>::type cos_pi(T x, const Policy&)
policies::promote_double<false>,
policies::discrete_quantile<>,
policies::assert_undefined<>,
// We want to igore overflows since the result is in [-1,1] and the
// We want to ignore overflows since the result is in [-1,1] and the
// check slows the code down considerably.
policies::overflow_error<policies::ignore_error> >::type forwarding_policy;
return policies::checked_narrowing_cast<result_type, forwarding_policy>(boost::math::detail::cos_pi_imp<value_type>(x, forwarding_policy()), "cos_pi");

View File

@ -20,7 +20,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -26,7 +26,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -20,7 +20,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -20,7 +20,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -132,7 +132,7 @@ private:
// Series form for BesselY' as z -> 0,
// It's derivative of http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/06/01/04/01/01/0003/
// This series is only useful when the second term is small compared to the first
// otherwise we get catestrophic cancellation errors.
// otherwise we get catastrophic cancellation errors.
//
// Approximating tgamma(v) by v^v, and assuming |tgamma(-z)| < eps we end up requiring:
// eps/2 * v^v(x/2)^-v > (x/2)^v or log(eps/2) > v log((x/2)^2/v)

View File

@ -130,7 +130,7 @@ private:
// Series form for BesselY as z -> 0,
// see: http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/06/01/04/01/01/0003/
// This series is only useful when the second term is small compared to the first
// otherwise we get catestrophic cancellation errors.
// otherwise we get catastrophic cancellation errors.
//
// Approximating tgamma(v) by v^v, and assuming |tgamma(-z)| < eps we end up requiring:
// eps/2 * v^v(x/2)^-v > (x/2)^v or log(eps/2) > v log((x/2)^2/v)

View File

@ -23,7 +23,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -23,7 +23,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -24,7 +24,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -338,7 +338,7 @@ struct erf_inv_initializer
static void do_init()
{
// If std::numeric_limits<T>::digits is zero, we must not call
// our inituialization code here as the precision presumably
// our initialization code here as the precision presumably
// varies at runtime, and will not have been set yet.
if(std::numeric_limits<T>::digits)
{

View File

@ -398,7 +398,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol)
if(a <= 0)
return policies::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
if((p < 0) || (p > 1))
return policies::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol);
return policies::raise_domain_error<T>(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol);
if(p == 1)
return policies::raise_overflow_error<T>(function, 0, Policy());
if(p == 0)
@ -458,7 +458,7 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol)
if(a <= 0)
return policies::raise_domain_error<T>(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol);
if((q < 0) || (q > 1))
return policies::raise_domain_error<T>(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol);
return policies::raise_domain_error<T>(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol);
if(q == 0)
return policies::raise_overflow_error<T>(function, 0, Policy());
if(q == 1)

View File

@ -54,7 +54,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -17,7 +17,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -208,7 +208,7 @@ T inverse_students_t(T df, T u, T v, const Policy& pol, bool* pexact = 0)
{
//
// df = number of degrees of freedom.
// u = probablity.
// u = probability.
// v = 1 - u.
// l = lanczos type to use.
//

View File

@ -34,7 +34,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -26,7 +26,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -22,7 +22,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -33,7 +33,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -155,7 +155,7 @@ T rising_factorial_imp(T x, int n, const Policy& pol)
}
//
// We don't optimise this for small n, because
// tgamma_delta_ratio is alreay optimised for that
// tgamma_delta_ratio is already optimised for that
// use case:
//
return 1 / boost::math::tgamma_delta_ratio(x, static_cast<T>(n), pol);
@ -217,7 +217,7 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol)
// Simple case: just the ratio of two
// (positive argument) gamma functions.
// Note that we don't optimise this for small n,
// because tgamma_delta_ratio is alreay optimised
// because tgamma_delta_ratio is already optimised
// for that use case:
//
return boost::math::tgamma_delta_ratio(x + 1, -static_cast<T>(n), pol);

View File

@ -26,7 +26,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -33,7 +33,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -641,7 +641,7 @@ namespace boost
typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible.
typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation.
typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion.
typedef mpl::int_<2> bessel_int_tag; // Definite integer optimisation.
template <class T1, class T2, class Policy>
struct bessel_traits

View File

@ -39,7 +39,7 @@ namespace boost{
// Screen out NaN's first, if either value is a NaN then the distance is "infinite":
if((boost::math::isnan)(a) || (boost::math::isnan)(b))
return max_val;
// Screen out infinites:
// Screen out infinities:
if(fabs(b) > max_val)
{
if(fabs(a) > max_val)
@ -88,7 +88,7 @@ namespace boost{
// Screen out NaN's first, if either value is a NaN then the distance is "infinite":
if((boost::math::isnan)(a) || (boost::math::isnan)(b))
return max_val;
// Screen out infinites:
// Screen out infinities:
if(fabs(b) > max_val)
{
if(fabs(a) > max_val)

View File

@ -63,7 +63,7 @@ inline typename tools::promote_args<T>::type sin_pi(T x, const Policy&)
policies::promote_double<false>,
policies::discrete_quantile<>,
policies::assert_undefined<>,
// We want to igore overflows since the result is in [-1,1] and the
// We want to ignore overflows since the result is in [-1,1] and the
// check slows the code down considerably.
policies::overflow_error<policies::ignore_error> >::type forwarding_policy;
return policies::checked_narrowing_cast<result_type, forwarding_policy>(boost::math::detail::sin_pi_imp<value_type>(x, forwarding_policy()), "sin_pi");

View File

@ -25,7 +25,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -24,7 +24,7 @@
// This is the only way we can avoid
// warning: non-standard suffix on floating constant [-Wpedantic]
// when building with -Wall -pedantic. Neither __extension__
// nor #pragma dianostic ignored work :(
// nor #pragma diagnostic ignored work :(
//
#pragma GCC system_header
#endif

View File

@ -190,7 +190,7 @@ auto l2_norm(ForwardIterator first, ForwardIterator last)
// Higham, Accuracy and Stability of Numerical Algorithms,
// Problem 27.5 presents a different algorithm to deal with overflow.
// The algorithm used here takes 3 passes *if* there is overflow.
// Higham's algorithm is 1 pass, but more requires operations than the no oveflow case.
// Higham's algorithm is 1 pass, but more requires operations than the no overflow case.
// I'm operating under the assumption that overflow is rare since the dynamic range of floating point numbers is huge.
if (!isfinite(result))
{

View File

@ -26,7 +26,7 @@ namespace detail{
//
// The error function: the difference between F(x) and
// the current approximation. This is the function
// for which we must find the extema.
// for which we must find the extrema.
//
template <class T>
struct remez_error_function
@ -80,7 +80,7 @@ private:
};
//
// This function adapts the error function so that it's minima
// are the extema of the error function. We can find the minima
// are the extrema of the error function. We can find the minima
// with standard techniques.
//
template <class T>

View File

@ -4,7 +4,7 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// High precision test data generated with NTL::RR at 1000 bit presision, a few values
// High precision test data generated with NTL::RR at 1000 bit precision, a few values
// (5) are commented out as they are too close to numeric_limits<double>::min(), to expect
// our implementation to cope :-(
//

View File

@ -25,7 +25,7 @@ namespace std{ using ::sqrt; }
// different computation method to those computed at float precision:
// as long as these compute the same values then everything's OK.
//
// Tolerance is 2*epsilon, expressed here as a persentage:
// Tolerance is 2*epsilon, expressed here as a percentage:
//
static const float tolerance = 200 * (std::numeric_limits<float>::epsilon)();
const float boundaries[] = {

View File

@ -440,7 +440,7 @@ void octonion_manual_test()
BOOST_TEST_MESSAGE( "the value of the l1 norm is "
<< l1(o0));
BOOST_TEST_MESSAGE( "the value of the magnitude (euclidian norm) is "
BOOST_TEST_MESSAGE( "the value of the magnitude (Euclidean norm) is "
<< abs(o0));
BOOST_TEST_MESSAGE( "the value of the (Cayley) norm is "

View File

@ -92,7 +92,7 @@ void test_ignore_policy(RealType)
if (std::numeric_limits<RealType>::has_quiet_NaN)
{
// Demonstrate output of PDF with infinity,
// but strin goutput from NaN is platform dependent, so can't use BOOST_CHECK.
// but string output from NaN is platform dependent, so can't use BOOST_CHECK.
if (std::numeric_limits<RealType>::has_infinity)
{
//std::cout << "pdf(ignore_error_arcsine(-1, +1), std::numeric_limits<RealType>::infinity()) = " << pdf(ignore_error_arcsine(-1, +1), std::numeric_limits<RealType>::infinity()) << std::endl;

View File

@ -220,15 +220,15 @@ template <class RealType> // Any floating-point type RealType.
void test_spots(RealType T)
{
// Basic sanity checks, test data is to double precision only
// so set tolerance to 100eps expressed as a persent, or
// 100eps of type double expressed as a persent, whichever
// so set tolerance to 100eps expressed as a percent, or
// 100eps of type double expressed as a percent, whichever
// is the larger.
RealType tolerance = (std::max)
(boost::math::tools::epsilon<RealType>(),
static_cast<RealType>(std::numeric_limits<double>::epsilon()));
tolerance *= 100 * 1000;
RealType tol2 = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a persent
RealType tol2 = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a percent
cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;

View File

@ -366,7 +366,7 @@ void test_spots(T val, const char* type_name)
// Spot values from Numerical Computation of Real or Complex
// Elliptic Integrals, B. C. Carlson: http://arxiv.org/abs/math.CA/9409227
// RF:
T tolerance = (std::max)(T(1e-13f), tools::epsilon<T>() * 5) * 100; // Note 5eps expressed as a persentage!!!
T tolerance = (std::max)(T(1e-13f), tools::epsilon<T>() * 5) * 100; // Note 5eps expressed as a percentage!!!
T eps2 = 5 * tools::epsilon<T>();
BOOST_CHECK_CLOSE(ellint_rf(T(1), T(2), T(0)), T(1.3110287771461), tolerance);
BOOST_CHECK_CLOSE(ellint_rf(T(0.5), T(1), T(0)), T(1.8540746773014), tolerance);

View File

@ -314,7 +314,7 @@ template <class RealType> // Any floating-point type RealType.
void test_spots(RealType T)
{
// Basic sanity checks, test data is to three decimal places only
// so set tolerance to 0.001 expressed as a persentage.
// so set tolerance to 0.001 expressed as a percentage.
RealType tolerance = 0.001f * 100;

View File

@ -190,7 +190,7 @@ template <class RealType> // Any floating-point type RealType.
void test_spots(RealType)
{
// Basic sanity checks, test data is to three decimal places only
// so set tolerance to 0.002 expressed as a persentage. Note that
// so set tolerance to 0.002 expressed as a percentage. Note that
// we can't even get full 3 digit accuracy since the data we're
// using as input has *already been rounded*, leading to even
// greater differences in output. As an accuracy test this is

View File

@ -396,7 +396,7 @@ void quantile_sanity_check(T& data, const char* type_name, const char* test)
// Sanity check degrees-of-freedom finder, don't bother at float
// precision though as there's not enough data in the probability
// values to get back to the correct degrees of freedom or
// non-cenrality parameter:
// non-centrality parameter:
//
#ifndef BOOST_NO_EXCEPTIONS
try{

View File

@ -17,7 +17,7 @@ template <class T, class U>
void do_test_spots1(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -576,7 +576,7 @@ template <class T, class U>
void do_test_spots2(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -895,7 +895,7 @@ template <class T, class U>
void do_test_spots3(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -1214,7 +1214,7 @@ template <class T, class U>
void do_test_spots4(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -1533,7 +1533,7 @@ template <class T, class U>
void do_test_spots5(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -1837,7 +1837,7 @@ template <class T, class U>
void do_test_spots6(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -2126,7 +2126,7 @@ template <class T, class U>
void do_test_spots7(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -2415,7 +2415,7 @@ template <class T, class U>
void do_test_spots8(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -2704,7 +2704,7 @@ template <class T, class U>
void do_test_spots9(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -2993,7 +2993,7 @@ template <class T, class U>
void do_test_spots10(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -3267,7 +3267,7 @@ template <class T, class U>
void do_test_spots11(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -3541,7 +3541,7 @@ template <class T, class U>
void do_test_spots12(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -3814,7 +3814,7 @@ template <class T, class U>
void do_test_spots13(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -4088,7 +4088,7 @@ template <class T, class U>
void do_test_spots14(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -4362,7 +4362,7 @@ template <class T, class U>
void do_test_spots15(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -4636,7 +4636,7 @@ template <class T, class U>
void do_test_spots16(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -4910,7 +4910,7 @@ template <class T, class U>
void do_test_spots17(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;
@ -5184,7 +5184,7 @@ template <class T, class U>
void do_test_spots18(T, U)
{
//
// Tolerance is 4 eps expressed as a persentage:
// Tolerance is 4 eps expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 4 * 100;

View File

@ -29,7 +29,7 @@ void test_polynomial()
#else
double (*f)(double) = boost::math::expm1;
#endif
std::cout << "Testing expm1 approximation, pinned to origin, abolute error, 6 term polynomial\n";
std::cout << "Testing expm1 approximation, pinned to origin, absolute error, 6 term polynomial\n";
boost::math::tools::remez_minimax<double> approx1(f, 6, 0, -1, 1, true, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)
@ -49,7 +49,7 @@ void test_polynomial()
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
f = std::exp;
std::cout << "Testing exp approximation, not pinned to origin, abolute error, 6 term polynomial\n";
std::cout << "Testing exp approximation, not pinned to origin, absolute error, 6 term polynomial\n";
boost::math::tools::remez_minimax<double> approx3(f, 6, 0, -1, 1, false, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)
@ -69,7 +69,7 @@ void test_polynomial()
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
f = std::cos;
std::cout << "Testing cos approximation, not pinned to origin, abolute error, 5 term polynomial\n";
std::cout << "Testing cos approximation, not pinned to origin, absolute error, 5 term polynomial\n";
boost::math::tools::remez_minimax<double> approx5(f, 5, 0, -1, 1, false, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)
@ -88,7 +88,7 @@ void test_polynomial()
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
f = std::sin;
std::cout << "Testing sin approximation, pinned to origin, abolute error, 4 term polynomial\n";
std::cout << "Testing sin approximation, pinned to origin, absolute error, 4 term polynomial\n";
boost::math::tools::remez_minimax<double> approx7(f, 4, 0, 0, 1, true, false);
for(unsigned i = 0; i < 7; ++i)
{
@ -113,7 +113,7 @@ void test_rational()
#else
double (*f)(double) = boost::math::expm1;
#endif
std::cout << "Testing expm1 approximation, pinned to origin, abolute error, 3+3 term rational\n";
std::cout << "Testing expm1 approximation, pinned to origin, absolute error, 3+3 term rational\n";
boost::math::tools::remez_minimax<double> approx1(f, 3, 3, -1, 1, true, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)
@ -137,7 +137,7 @@ void test_rational()
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
#endif
f = std::exp;
std::cout << "Testing exp approximation, not pinned to origin, abolute error, 3+3 term rational\n";
std::cout << "Testing exp approximation, not pinned to origin, absolute error, 3+3 term rational\n";
boost::math::tools::remez_minimax<double> approx3(f, 3, 3, -1, 1, false, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)
@ -157,7 +157,7 @@ void test_rational()
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
f = std::cos;
std::cout << "Testing cos approximation, not pinned to origin, abolute error, 2+2 term rational\n";
std::cout << "Testing cos approximation, not pinned to origin, absolute error, 2+2 term rational\n";
boost::math::tools::remez_minimax<double> approx5(f, 2, 2, 0, 1, false, false);
std::cout << "Interpolation Error: " << approx1.max_error() << std::endl;
for(unsigned i = 0; i < 7; ++i)

View File

@ -37,7 +37,7 @@ private:
// Using 1st derivative only Newton-Raphson
struct cbrt_functor_deriv
{ // Functor also returning 1st derviative.
{ // Functor also returning 1st derivative.
cbrt_functor_deriv(double const& to_find_root_of) : a(to_find_root_of)
{ // Constructor stores value a to find root of,
// for example: calling cbrt_functor_deriv<double>(x) to use to get cube root of x.

View File

@ -265,7 +265,7 @@ void test_spots(RealType)
// Some special tests to exercise the double-precision approximations
// to the quantile:
//
// tolerance is 50 eps expressed as a persent:
// tolerance is 50 eps expressed as a percent:
//
tolerance = boost::math::tools::epsilon<RealType>() * 5000;
BOOST_CHECK_CLOSE(boost::math::quantile(

View File

@ -70,7 +70,7 @@ void test_spots(RealType)
// using the online calculator at
// http://espse.ed.psu.edu/edpsych/faculty/rhale/hale/507Mat/statlets/free/pdist.htm
//
// Tolerance is just over 5 decimal digits expressed as a persentage:
// Tolerance is just over 5 decimal digits expressed as a percentage:
// that's the limit of the test data.
RealType tolerance = 2e-5f * 100;
cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;

View File

@ -50,9 +50,9 @@ int main()
test_type b_start, b_end;
test_type a_mult, b_mult;
std::cout << "Enter range for paramater a: ";
std::cout << "Enter range for parameter a: ";
std::cin >> a_start >> a_end;
std::cout << "Enter range for paramater b: ";
std::cout << "Enter range for parameter b: ";
std::cin >> b_start >> b_end;
std::cout << "Enter multiplier for a parameter: ";
std::cin >> a_mult;