mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Fix typos
This commit is contained in:
@@ -388,7 +388,7 @@ There are also various special cases: refer to the code for details. ]]
|
|||||||
|
|
||||||
* [@http://mathworld.wolfram.com/BinomialDistribution.html Weisstein, Eric W. "Binomial Distribution." From MathWorld--A Wolfram Web Resource].
|
* [@http://mathworld.wolfram.com/BinomialDistribution.html Weisstein, Eric W. "Binomial Distribution." From MathWorld--A Wolfram Web Resource].
|
||||||
* [@http://en.wikipedia.org/wiki/Beta_distribution Wikipedia binomial distribution].
|
* [@http://en.wikipedia.org/wiki/Beta_distribution Wikipedia binomial distribution].
|
||||||
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda366i.htm NIST Explorary Data Analysis].
|
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda366i.htm NIST Exploratory Data Analysis].
|
||||||
|
|
||||||
[endsect] [/section:binomial_dist Binomial]
|
[endsect] [/section:binomial_dist Binomial]
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ is used to obtain the result. Whether we're adding
|
|||||||
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm NIST Exploratory Data Analysis]
|
* [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm NIST Exploratory Data Analysis]
|
||||||
* [@http://mathworld.wolfram.com/CauchyDistribution.html Weisstein, Eric W. "Cauchy Distribution." From MathWorld--A Wolfram Web Resource.]
|
* [@http://mathworld.wolfram.com/CauchyDistribution.html Weisstein, Eric W. "Cauchy Distribution." From MathWorld--A Wolfram Web Resource.]
|
||||||
|
|
||||||
[endsect][/section:cauchy_dist Cauchi]
|
[endsect][/section:cauchy_dist Cauchy]
|
||||||
|
|
||||||
[/ cauchy.qbk
|
[/ cauchy.qbk
|
||||||
Copyright 2006, 2007 John Maddock and Paul A. Bristow.
|
Copyright 2006, 2007 John Maddock and Paul A. Bristow.
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ where ['T(h,a)] is Owen's T function, and ['[Phi](x)] is the normal distribution
|
|||||||
[endsect] [/section:skew_normal_dist skew_Normal]
|
[endsect] [/section:skew_normal_dist skew_Normal]
|
||||||
|
|
||||||
[/ skew_normal.qbk
|
[/ skew_normal.qbk
|
||||||
Copyright 2012 Bejamin Sobotta, John Maddock and Paul A. Bristow.
|
Copyright 2012 Benjamin Sobotta, John Maddock and Paul A. Bristow.
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ along with the incomplete gamma and beta functions (four variants
|
|||||||
of each) and all the possible inverses of these, plus digamma,
|
of each) and all the possible inverses of these, plus digamma,
|
||||||
various factorial functions,
|
various factorial functions,
|
||||||
Bessel functions, elliptic integrals, sinus cardinals (along with their
|
Bessel functions, elliptic integrals, sinus cardinals (along with their
|
||||||
hyperbolic variants), inverse hyperbolic functions, Legrendre/Laguerre/Hermite
|
hyperbolic variants), inverse hyperbolic functions, Legendre/Laguerre/Hermite
|
||||||
polynomials and various
|
polynomials and various
|
||||||
special power and logarithmic functions.
|
special power and logarithmic functions.
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ of floating-point values.
|
|||||||
The result of [@boost:/libs/math/include/boost/math/tools/roots.hpp `newton_raphson_iterate`]
|
The result of [@boost:/libs/math/include/boost/math/tools/roots.hpp `newton_raphson_iterate`]
|
||||||
function is a single value.
|
function is a single value.
|
||||||
|
|
||||||
[tip There is a compromise between accuracy and speed when chosing the value of `digits`.
|
[tip There is a compromise between accuracy and speed when choosing the value of `digits`.
|
||||||
It is tempting to simply chose `std::numeric_limits<T>::digits`,
|
It is tempting to simply chose `std::numeric_limits<T>::digits`,
|
||||||
but this may mean some inefficient and unnecessary iterations as the function thrashes around
|
but this may mean some inefficient and unnecessary iterations as the function thrashes around
|
||||||
trying to locate the last bit. In theory, since the precision doubles with each step
|
trying to locate the last bit. In theory, since the precision doubles with each step
|
||||||
@@ -230,7 +230,7 @@ If your differentiation is a little rusty
|
|||||||
then you can get help, for example, from the invaluable
|
then you can get help, for example, from the invaluable
|
||||||
[@http://www.wolframalpha.com/ WolframAlpha site.]
|
[@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]`
|
or the Wolfram Language command: ` D[x ^ 5, x]`
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ in the difficult area where ['a] is close to 1, and greater than 95 decimal plac
|
|||||||
[endsect] [/section:owens_t The owens_t Function]
|
[endsect] [/section:owens_t The owens_t Function]
|
||||||
|
|
||||||
[/
|
[/
|
||||||
Copyright 2012 Bejamin Sobotta, John Maddock and Paul A. Bristow.
|
Copyright 2012 Benjamin Sobotta, John Maddock and Paul A. Bristow.
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ Finally, print two tables of probability for the /exactly/ and /at least/ a numb
|
|||||||
} // for i
|
} // for i
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
|
||||||
// Tabulate the probability of getting between zero heads and 0 upto 10 heads.
|
// Tabulate the probability of getting between zero heads and 0 up to 10 heads.
|
||||||
cout << "Probability of getting upto (<=) heads" << endl;
|
cout << "Probability of getting up to (<=) heads" << endl;
|
||||||
for (int successes = 0; successes <= flips; successes++)
|
for (int successes = 0; successes <= flips; successes++)
|
||||||
{ // Say success means getting a head
|
{ // Say success means getting a head
|
||||||
// (equally success could mean getting a tail).
|
// (equally success could mean getting a tail).
|
||||||
@@ -226,7 +226,7 @@ Probability of getting exactly (==) heads
|
|||||||
9 0.009766 or 1 in 102.4, or 0.9766%
|
9 0.009766 or 1 in 102.4, or 0.9766%
|
||||||
10 0.0009766 or 1 in 1024, or 0.09766%
|
10 0.0009766 or 1 in 1024, or 0.09766%
|
||||||
|
|
||||||
Probability of getting upto (<=) heads
|
Probability of getting up to (<=) heads
|
||||||
0 0.0009766 or 1 in 1024, or 0.09766%
|
0 0.0009766 or 1 in 1024, or 0.09766%
|
||||||
1 0.01074 or 1 in 93.09, or 1.074%
|
1 0.01074 or 1 in 93.09, or 1.074%
|
||||||
2 0.05469 or 1 in 18.29, or 5.469%
|
2 0.05469 or 1 in 18.29, or 5.469%
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ struct root_info
|
|||||||
// = digits * digits_accuracy
|
// = digits * digits_accuracy
|
||||||
// Vector of values (4) for each algorithm, TOMS748, Newton, Halley & Schroder.
|
// Vector of values (4) for each algorithm, TOMS748, Newton, Halley & Schroder.
|
||||||
//std::vector< boost::int_least64_t> times; converted to int.
|
//std::vector< boost::int_least64_t> times; converted to int.
|
||||||
std::vector<int> times; // arbirary units (ticks).
|
std::vector<int> times; // arbitrary units (ticks).
|
||||||
//boost::int_least64_t min_time = std::numeric_limits<boost::int_least64_t>::max(); // Used to normalize times (as int).
|
//boost::int_least64_t min_time = std::numeric_limits<boost::int_least64_t>::max(); // Used to normalize times (as int).
|
||||||
std::vector<double> normed_times;
|
std::vector<double> normed_times;
|
||||||
int min_time = (std::numeric_limits<int>::max)(); // Used to normalize times.
|
int min_time = (std::numeric_limits<int>::max)(); // Used to normalize times.
|
||||||
@@ -223,7 +223,7 @@ T elliptic_root_noderiv(T radius, T arc)
|
|||||||
//[elliptic_1deriv_func
|
//[elliptic_1deriv_func
|
||||||
template <class T = double>
|
template <class T = double>
|
||||||
struct elliptic_root_functor_1deriv
|
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!");
|
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)
|
elliptic_root_functor_1deriv(T const& arc, T const& radius) : m_arc(arc), m_radius(radius)
|
||||||
@@ -581,7 +581,7 @@ int test_root(cpp_bin_float_100 big_radius, cpp_bin_float_100 big_arc, cpp_bin_f
|
|||||||
return 4; // eval_count of how many algorithms used.
|
return 4; // eval_count of how many algorithms used.
|
||||||
} // test_root
|
} // test_root
|
||||||
|
|
||||||
/*! Fill array of times, interations, etc for Nth root for all 4 types,
|
/*! Fill array of times, iterations, etc for Nth root for all 4 types,
|
||||||
and write a table of results in Quickbook format.
|
and write a table of results in Quickbook format.
|
||||||
*/
|
*/
|
||||||
void table_root_info(cpp_bin_float_100 radius, cpp_bin_float_100 arc)
|
void table_root_info(cpp_bin_float_100 radius, cpp_bin_float_100 arc)
|
||||||
|
|||||||
@@ -782,7 +782,7 @@ inline T rising_factorial_ratio(T a, T b, int k)
|
|||||||
// Routine for a > 15, b < 1
|
// Routine for a > 15, b < 1
|
||||||
//
|
//
|
||||||
// Begin by figuring out how large our table of Pn's should be,
|
// Begin by figuring out how large our table of Pn's should be,
|
||||||
// quoted accuracies are "guestimates" based on empirical observation.
|
// quoted accuracies are "guesstimates" based on empirical observation.
|
||||||
// Note that the table size should never exceed the size of our
|
// Note that the table size should never exceed the size of our
|
||||||
// tables of factorials.
|
// tables of factorials.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -993,7 +993,7 @@ T lambert_w0_approx(T z)
|
|||||||
//! float precision polynomials are used for 32-bit (usually float) precision (for speed)
|
//! float precision polynomials are used for 32-bit (usually float) precision (for speed)
|
||||||
//! double precision polynomials are used for 64-bit (usually double) precision.
|
//! double precision polynomials are used for 64-bit (usually double) precision.
|
||||||
//! For higher precisions, a 64-bit double approximation is computed first,
|
//! For higher precisions, a 64-bit double approximation is computed first,
|
||||||
//! and then refined using Halley interations.
|
//! and then refined using Halley iterations.
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline T get_near_singularity_param(T z)
|
inline T get_near_singularity_param(T z)
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ namespace boost
|
|||||||
// that each term decreases in size by a factor of 3. However,
|
// that each term decreases in size by a factor of 3. However,
|
||||||
// that assumption does not apply here, as the underlying T1 series can
|
// that assumption does not apply here, as the underlying T1 series can
|
||||||
// go quite strongly divergent in the early terms, before strongly
|
// go quite strongly divergent in the early terms, before strongly
|
||||||
// converging later. Various "guestimates" have been tried to take account
|
// converging later. Various "guesstimates" have been tried to take account
|
||||||
// of this, but they don't always work.... so instead set "n" to the
|
// of this, but they don't always work.... so instead set "n" to the
|
||||||
// largest value that won't cause overflow later, and abort iteration
|
// largest value that won't cause overflow later, and abort iteration
|
||||||
// when the last accelerated term was small enough...
|
// when the last accelerated term was small enough...
|
||||||
@@ -699,7 +699,7 @@ namespace boost
|
|||||||
// that each term decreases in size by a factor of 3. However,
|
// that each term decreases in size by a factor of 3. However,
|
||||||
// that assumption does not apply here, as the underlying T1 series can
|
// that assumption does not apply here, as the underlying T1 series can
|
||||||
// go quite strongly divergent in the early terms, before strongly
|
// go quite strongly divergent in the early terms, before strongly
|
||||||
// converging later. Various "guestimates" have been tried to take account
|
// converging later. Various "guesstimates" have been tried to take account
|
||||||
// of this, but they don't always work.... so instead set "n" to the
|
// of this, but they don't always work.... so instead set "n" to the
|
||||||
// largest value that won't cause overflow later, and abort iteration
|
// largest value that won't cause overflow later, and abort iteration
|
||||||
// when the last accelerated term was small enough...
|
// when the last accelerated term was small enough...
|
||||||
|
|||||||
@@ -555,8 +555,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(arithmetic_test, T, test_types)
|
|||||||
T t = 5;
|
T t = 5;
|
||||||
T radius = boost::math::constants::root_two<T>();
|
T radius = boost::math::constants::root_two<T>();
|
||||||
T longitude = boost::math::constants::pi<T>() / 4;
|
T longitude = boost::math::constants::pi<T>() / 4;
|
||||||
T lattitude = boost::math::constants::pi<T>() / 3;
|
T latitude = boost::math::constants::pi<T>() / 3;
|
||||||
q1 = ::boost::math::cylindrospherical(t, radius, longitude, lattitude);
|
q1 = ::boost::math::cylindrospherical(t, radius, longitude, latitude);
|
||||||
check_approx_quaternion_result(q1, 5, 0.5, 0.5, boost::lexical_cast<T>("1.224744871391589049098642037352945695983"), 10);
|
check_approx_quaternion_result(q1, 5, 0.5, 0.5, boost::lexical_cast<T>("1.224744871391589049098642037352945695983"), 10);
|
||||||
T r = boost::math::constants::root_two<T>();
|
T r = boost::math::constants::root_two<T>();
|
||||||
T angle = boost::math::constants::pi<T>() / 4;
|
T angle = boost::math::constants::pi<T>() / 4;
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ void test_spots(RealType)
|
|||||||
|
|
||||||
BOOST_CHECK_CLOSE(
|
BOOST_CHECK_CLOSE(
|
||||||
median(dist), static_cast<RealType>(23.007748327502412), // double precision test value
|
median(dist), static_cast<RealType>(23.007748327502412), // double precision test value
|
||||||
(std::max)(tol2, static_cast<RealType>(std::numeric_limits<double>::epsilon() * 2 * 100))); // 2 eps as persent
|
(std::max)(tol2, static_cast<RealType>(std::numeric_limits<double>::epsilon() * 2 * 100))); // 2 eps as percent
|
||||||
|
|
||||||
using std::log;
|
using std::log;
|
||||||
RealType expected_entropy = RealType(8) + log(RealType(3)) + boost::math::lgamma(RealType(8)) - 7*boost::math::digamma(RealType(8));
|
RealType expected_entropy = RealType(8) + log(RealType(3)) + boost::math::lgamma(RealType(8)) - 7*boost::math::digamma(RealType(8));
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ Test 5: test_mmm_moments()
|
|||||||
|
|
||||||
standard_deviation = sqrt(2)*scale
|
standard_deviation = sqrt(2)*scale
|
||||||
skewness == 0
|
skewness == 0
|
||||||
kurtoris == 6
|
kurtosis == 6
|
||||||
excess kurtoris == 3
|
excess kurtosis == 3
|
||||||
|
|
||||||
Test 6: test_complemented()
|
Test 6: test_complemented()
|
||||||
Test the cdf an quantile complemented function.
|
Test the cdf an quantile complemented function.
|
||||||
|
|||||||
@@ -225,11 +225,11 @@ void test_spots(RealType)
|
|||||||
BOOST_CHECK_CLOSE(
|
BOOST_CHECK_CLOSE(
|
||||||
skewness(dist)
|
skewness(dist)
|
||||||
, static_cast<RealType>(729551.38304660255658441529235697L), tolerance);
|
, static_cast<RealType>(729551.38304660255658441529235697L), tolerance);
|
||||||
// kertosis:
|
// kurtosis:
|
||||||
BOOST_CHECK_CLOSE(
|
BOOST_CHECK_CLOSE(
|
||||||
kurtosis(dist)
|
kurtosis(dist)
|
||||||
, static_cast<RealType>(4312295840576303.2363383232038251L), tolerance);
|
, static_cast<RealType>(4312295840576303.2363383232038251L), tolerance);
|
||||||
// kertosis excess:
|
// kurtosis excess:
|
||||||
BOOST_CHECK_CLOSE(
|
BOOST_CHECK_CLOSE(
|
||||||
kurtosis_excess(dist)
|
kurtosis_excess(dist)
|
||||||
, static_cast<RealType>(4312295840576300.2363383232038251L), tolerance);
|
, static_cast<RealType>(4312295840576300.2363383232038251L), tolerance);
|
||||||
|
|||||||
@@ -224,10 +224,10 @@ void test_spots(RealType)
|
|||||||
// skewness:
|
// skewness:
|
||||||
BOOST_CHECK_CLOSE_FRACTION(
|
BOOST_CHECK_CLOSE_FRACTION(
|
||||||
skewness(pareto15), static_cast<RealType>(4.6475800154489004L), tol5eps);
|
skewness(pareto15), static_cast<RealType>(4.6475800154489004L), tol5eps);
|
||||||
// kertosis:
|
// kurtosis:
|
||||||
BOOST_CHECK_CLOSE_FRACTION(
|
BOOST_CHECK_CLOSE_FRACTION(
|
||||||
kurtosis(pareto15), static_cast<RealType>(73.8L), tol5eps);
|
kurtosis(pareto15), static_cast<RealType>(73.8L), tol5eps);
|
||||||
// kertosis excess:
|
// kurtosis excess:
|
||||||
BOOST_CHECK_CLOSE_FRACTION(
|
BOOST_CHECK_CLOSE_FRACTION(
|
||||||
kurtosis_excess(pareto15), static_cast<RealType>(70.8L), tol5eps);
|
kurtosis_excess(pareto15), static_cast<RealType>(70.8L), tol5eps);
|
||||||
// Check difference between kurtosis and excess:
|
// Check difference between kurtosis and excess:
|
||||||
|
|||||||
Reference in New Issue
Block a user