2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Fixed lots of "inspect" issues: bad hyperlinks, tabs in source and missing licenses.

Tweaked some error levels again.

[SVN r40079]
This commit is contained in:
John Maddock
2007-10-16 09:32:28 +00:00
parent 135081f081
commit 4ba0027365
164 changed files with 1333 additions and 781 deletions

View File

@@ -1,5 +1,6 @@
[article Boost.Math
[quickbook 1.4]
[copyright 2007 Paul A. Bristow, Hubert Holin, John Maddock, Daryle Walker and Xiaogang Zhang]
[license
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -66,7 +67,7 @@ programming problems.
[[[@../octonion/html/index.html Octonions]]
[
Octonions, like [@../../quaternions/html/index.html quaternions], are a relative of complex numbers.
Octonions, like [@../quaternions/html/index.html quaternions], are a relative of complex numbers.
Octonions see some use in theoretical physics.
@@ -160,8 +161,8 @@ quaternions ['[^x]] and ['[^y]] such that __not_equal). A good mnemotechnical wa
things is by using the formula ['[^i*i = j*j = k*k = -1]].
Quaternions (and their kin) are described in far more details in this
other [@../../../quaternion/TQE.pdf document]
(with [@../../../quaternion/TQE_EA.pdf errata and addenda]).
other [@../../quaternion/TQE.pdf document]
(with [@../../quaternion/TQE_EA.pdf errata and addenda]).
Some traditional constructs, such as the exponential, carry over without
too much change into the realms of quaternions, but other, such as taking

View File

@@ -75,5 +75,11 @@ for these distributions.
[endsect]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -189,3 +189,9 @@ f[sub [nu]], the Wronskian yields I[sub [nu]](x) directly.
[endsect]
[/
Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
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).
]

View File

@@ -116,3 +116,9 @@ __sph_neumann.
[endsect]
[/
Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
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).
]

View File

@@ -54,7 +54,7 @@ cyclic for large /x/, but tends to -[infin][space] for small /x/:
[h4 Testing]
There are two sets of test values: spot values calculated using
[@http//:functions.wolfram.com functions.wolfram.com],
[@http://functions.wolfram.com functions.wolfram.com],
and a much larger set of tests computed using
a simplified version of this implementation
(with all the special case handling removed).
@@ -129,7 +129,7 @@ perform much better when the arguments become large, __cephes in particular prod
some remarkably inaccurate results with some of the test data (no significant figures
correct), and even GSL performs badly with some inputs to J[sub v]. Note that
by way of double-checking these results, the worst performing __cephes and GSL cases
were recomputed using [@http//:functions.wolfram.com functions.wolfram.com],
were recomputed using [@http://functions.wolfram.com functions.wolfram.com],
and the result checked against our test data: no errors in the test data were found.
[h4 Implementation]
@@ -253,3 +253,9 @@ without backward recurrence.
[endsect]
[/
Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
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).
]

View File

@@ -79,3 +79,9 @@ main definition as x [rarr] 0.
[endsect]
[/
Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
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).
]

View File

@@ -16,7 +16,7 @@ in NTL.
Finally there is a high precision __lanczos suitable for use with `boost::math::ntl::RR`,
used at 1000-bit precision in
[@../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp].
[@../../../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp].
The approximation has a theoretical precision of > 90 decimal digits,
and an experimental precision of > 100 decimal digits. To use that
approximation, just include that header before any of the special
@@ -116,7 +116,7 @@ synthesised from the others, and so no explicit specialisation is required.
# The function `epsilon` can be synthesised from the others, so no
explicit specialisation is required provided the precision
of RealType does not vary at runtime (see the header
[@../../../../../boost/math/tools/ntl.hpp boost/math/tools/ntl.hpp]
[@../../../../../boost/math/bindings/rr.hpp boost/math/bindings/rr.hpp]
for an example where the precision does vary at runtime).
# The functions `digits`, `max_value` and `min_value`, all get synthesised
automatically from `std::numeric_limits`. However, if `numeric_limits`
@@ -185,7 +185,7 @@ In addition, for efficient and accurate results, a __lanczos is highly desirable
You may be able to adapt an existing approximation from
[@../../../../../boost/math/special_functions/lanczos.hpp
boost/math/special_functions/lanczos.hpp] or
[@../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp]:
[@../../../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp]:
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 double)
@@ -280,7 +280,7 @@ compile if the all the standard library functions used have
been brought into the current scope with a using declaration.
There is a test program
[@../../../teststd_real_concept_check.cpp libs/math/test/std_real_concept_check.cpp]
[@../../../test/std_real_concept_check.cpp libs/math/test/std_real_concept_check.cpp]
that instantiates every template in this library with type
`std_real_concept` to verify it's usage of standard library functions.
@@ -335,7 +335,7 @@ The class template `DistributionConcept` is a
for distribution types.
The test program
[@../../../test/distribution_concept_check.cpp distribution_concept_check.cpp]
[@../../../test/compile_test/distribution_concept_check.cpp distribution_concept_check.cpp]
is responsible for using `DistributionConcept` to verify that all the
distributions in this library conform to the
[link math_toolkit.using_udt.dist_concept Distribution concept].

View File

@@ -15,3 +15,11 @@ You can also find JM at john - at - johnmaddock.co.uk and PAB at
pbristow - at - hetp.u-net.com.
[endsect]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -109,3 +109,10 @@ the binomial distribution with a single trial should be used, for example:
[endsect][/section:bernoulli_dist bernoulli]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -322,3 +322,11 @@ less than 1 in 1000 chance of observing a component failure
[endsect] [/section:binom_size_eg Estimating Sample Sizes for a Binomial Distribution.]
[endsect][/section:binom_eg Binomial Distribution]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -178,7 +178,7 @@ situations where we wish to compare the standard deviation of a new
process to an established one.
The code for this example is contained in
[@../../../chi_square_std_dev_test.cpp chi_square_std_dev_test.cpp], and
[@../../../example/chi_square_std_dev_test.cpp chi_square_std_dev_test.cpp], and
we'll begin by defining the procedure that will print out the test
statistics:
@@ -372,7 +372,7 @@ some acceptable risk of type I failure /alpha/, type II failure
note that the method used works on variance, and not standard deviation
as is usual for the Chi Squared Test.
The code for this example is located in [@../../../chi_square_std_dev_test.cpp
The code for this example is located in [@../../../example/chi_square_std_dev_test.cpp
chi_square_std_dev_test.cpp].
We begin by defining a procedure to print out the sample sizes required
@@ -490,3 +490,11 @@ risk of failing to reject the null-hypothesis is also 0.05
[endsect][/section:chi_sq_size Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation]
[endsect][/section:cs_eg Chi Squared Distribution]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -7,3 +7,11 @@ See [@../../../example/distribution_construction.cpp distribution_construction.c
[distribution_construction2]
[endsect] [/section:dist_construct_eg Distribution Construction Example]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -13,7 +13,7 @@ The data for this case study were collected by Said Jahanmir of the
NIST Ceramics Division in 1996 in connection with a NIST/industry
ceramics consortium for strength optimization of ceramic strength.
The example program is [@../example/f_test.cpp f_test.cpp],
The example program is [@../../../example/f_test.cpp f_test.cpp],
program output has been deliberately made as similar as possible
to the DATAPLOT output in the corresponding
[@http://www.itl.nist.gov/div898/handbook/eda/section3/eda359.htm
@@ -210,3 +210,11 @@ hypothesis must be rejected. We therefore conclude that there is a change
for the better in our standard deviation.
[endsect][/section:f_eg F Distribution]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -30,3 +30,10 @@ for full source code & appended program output.
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -129,3 +129,10 @@ and /q = 1-p/.
[endsect][/section:normal_dist Normal]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -110,3 +110,10 @@ and /q = 1-p/.
[endsect][/section:normal_dist Normal]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -51,3 +51,10 @@ See [@../../../example/binomial_example_nag.cpp binomial_example_nag.cpp] for de
[endsect] [/section:nag_library Comparison with C, R, FORTRAN-style Free Functions]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -182,3 +182,11 @@ Example program showing output of a table of values of cdf and pdf for various k
[endsect] [/section:negative_binomial_example1 Negative Binomial example 2.]
[endsect] [/section:neg_binom_eg Negative Binomial Distribution Examples]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -27,3 +27,10 @@ normal_misc_examples.cpp] illustrates their use.
[endsect] [/section:normal_misc Some Miscellaneous Examples of the Normal Distribution]
[endsect] [/section:normal_example Normal Distribution Examples]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -105,3 +105,10 @@ and its complement /q = 1-p/.
[endsect][/section:pareto pareto]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -110,3 +110,10 @@ In the following table [sigma][space] is the sigma parameter of the distribution
[endsect][/section:Rayleigh Rayleigh]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -773,3 +773,10 @@ in order to obtain a significant result].
[endsect][/section:st_eg Student's t]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -154,9 +154,15 @@ Some 'known good' test values were obtained from
* 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.brighton-webs.co.uk/distributions/triangular.asp Brighton Webs Ltd. BW D-Calc 1.0 Distribution Calculator]
* [@http://www.worldscibooks.com/mathematics/etextbook/5720/5720_chap1.pdf The Triangular Distribution including its history.]
* [@www.measurement.sk/2002/S1/Wimmer2.pdf Gejza Wimmer, Viktor Witkovsky and Tomas Duby,
* [@http://www.measurement.sk/2002/S1/Wimmer2.pdf Gejza Wimmer, Viktor Witkovsky and Tomas Duby,
Measurement Science Review, Volume 2, Section 1, 2002, Proper Rounding Of The Measurement Results Under The Assumption Of Triangular Distribution.]
[endsect][/section:triangular_dist triangular]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -125,3 +125,10 @@ b is the /upper/ parameter,
[endsect][/section:uniform_dist Uniform]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -119,3 +119,9 @@ and /q = 1-p/.
[endsect][/section:weibull Weibull]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -188,7 +188,7 @@ are relative errors in units of epsilon.
[heading Testing]
The tests use a mixture of spot test values calculated using the online
calculator at [@functions.wolfram.com
calculator at [http://@functions.wolfram.com
functions.wolfram.com], and random test data generated using
NTL::RR at 1000-bit precision and this implementation.
@@ -296,7 +296,7 @@ are relative errors in units of epsilon.
[heading Testing]
The tests use a mixture of spot test values calculated using the online
calculator at [@functions.wolfram.com
calculator at [@http://functions.wolfram.com
functions.wolfram.com], and random test data generated using
NTL::RR at 1000-bit precision and this implementation.

View File

@@ -1,6 +1,6 @@
[section:error_handling Error Handling]
[def __format [@../../../libs/format/index.html Boost.Format]]
[def __format [@../../../../format/index.html Boost.Format]]
[heading Quick Reference]
@@ -159,7 +159,7 @@ the error, or set global ::errno, then a NaN will be returned.
This behaviour is chosen to assist compatibility with the behaviour of
['ISO/IEC 9899:1999 Programming languages - C]
and with the
[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 6]:
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 6]:
[:['"Each of the functions declared above shall return a NaN (Not a Number)
if any argument value is a NaN, but it shall not report a domain error.

View File

@@ -124,7 +124,7 @@ for which the mathematical function obtains a non-real value.]
This implementation is believed to follow these proposals and to assist compatibility with
['ISO/IEC 9899:1999 Programming languages - C]
and with the
[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5].
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5].
[link math_toolkit.main_overview.error_handling See also domain_error].
See __policy_ref for details of the error handling policies that should allow

View File

@@ -81,3 +81,10 @@ rapid generation of test data] and/or data for output to an
external graphing application.
[endsect] [/section:intro Introduction]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -361,12 +361,9 @@ __policy_section you want to test set as the default.
[endsect]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -34,7 +34,7 @@ by N.A.J. Hastings, Brian Peacock, Merran Evans, ISBN: 0471371246, Wiley 2000.
[@http://bh0.physics.ubc.ca/People/matt/Doc/ThesesOthers/Phd/pugh.pdf pugh.pdf (application/pdf Object)]
Pugh Msc Thesis on the Lanczzos approximation to the gamma function.
[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2003 N1514, 03-0097, A Proposal to Add Mathematical Special Functions to the C++ Standard Library (version 2), Walter E. Brown]
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003 N1514, 03-0097, A Proposal to Add Mathematical Special Functions to the C++ Standard Library (version 2), Walter E. Brown]
[h4 Calculators* that we found (and used to cross-check - as far as their widely-varying accuracy allowed).]

View File

@@ -368,4 +368,10 @@ Russian Journal of Mathematical Physics, vol.1, No. 3, 1994.
[endsect][/section:remez The Remez Method]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -77,3 +77,9 @@ and with the
[endsect]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -21,3 +21,10 @@ race conditions.
This limitation may be addressed in a future release.
[endsect] [/section:threads Thread Safety]
[/
Copyright 2006 John Maddock and Paul A. Bristow.
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).
]

View File

@@ -39,8 +39,8 @@ typedef policy<
// std
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::endl;
int main()
{

View File

@@ -48,15 +48,15 @@ We'll begin our sample program with the needed includes:
// Boost
#include <boost/math/distributions/students_t.hpp>
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t; // Probability of students_t(df, t).
// std
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::endl;
#include <stdexcept>
using std::exception;
using std::exception;
/*`

View File

@@ -12,8 +12,8 @@
using boost::math::normal_distribution;
#include <boost/math/distributions/students_t.hpp>
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t_distribution;
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t_distribution;
// using namespace boost::math;
//.\error_policy_normal.cpp(30) : error C2872: 'policy' : ambiguous symbol
@@ -26,8 +26,8 @@
// std
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::endl;
using boost::math::policies::policy;
// Possible errors

View File

@@ -23,11 +23,11 @@ using boost::math::students_t; // Probability of students_t(df, t) convenience
// std
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::endl;
#include <stdexcept>
using std::exception;
using std::exception;
using boost::math::policies::policy;
using boost::math::policies::domain_error;
@@ -43,7 +43,7 @@ typedef students_t_distribution<double, my_policy> my_students_t;
int main()
{ // Example of error handling of bad argument(s) to a distribution.
cout << "Example error handling using Student's t function. " << endl;
cout << "Example error handling using Student's t function. " << endl;
double degrees_of_freedom = -1; double t = -1.; // Two 'bad' arguments!
@@ -71,7 +71,7 @@ int main()
"\n""Message from thrown exception was:\n " << e.what() << std::endl;
}
return 0;
return 0;
} // int main()
/*

View File

@@ -90,12 +90,12 @@ void find_number_of_trials(double failures, double p)
int main()
{
find_number_of_trials(5, 0.5);
find_number_of_trials(50, 0.5);
find_number_of_trials(500, 0.5);
find_number_of_trials(50, 0.1);
find_number_of_trials(500, 0.1);
find_number_of_trials(5, 0.9);
find_number_of_trials(5, 0.5);
find_number_of_trials(50, 0.5);
find_number_of_trials(500, 0.5);
find_number_of_trials(50, 0.1);
find_number_of_trials(500, 0.1);
find_number_of_trials(5, 0.9);
return 0;
} // int main()

View File

@@ -426,7 +426,7 @@ Message from thrown exception was:
*/
//] [/ negative_binomial_eg1_2]
}
return 0;
return 0;
} // int main()

View File

@@ -74,7 +74,7 @@ int main()
/*`And all this you can do with a nanoscopic amount of work compared to
the team of *human computers* toiling with Milton Abramovitz and Irene Stegen
at the US National Bureau of Standards (now [@www.nist.gov NIST]).
at the US National Bureau of Standards (now [@http://www.nist.gov NIST]).
Starting in 1938, their "Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables",
was eventually published in 1964, and has been reprinted numerous times since.
(A major replacement is planned at [@http://dlmf.nist.gov Digital Library of Mathematical Functions]).

View File

@@ -43,46 +43,46 @@ double value[values] = {38.9, 37.4, 37.1};
// The Students't distribution function is described at
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
using std::cout; using std::endl;
using std::cout; using std::endl;
#include <iomanip>
using std::setprecision;
using std::setprecision;
#include <cmath>
using std::sqrt;
using std::sqrt;
int main()
{
cout << "Example 1 using Student's t function. " << endl;
cout << "Example 1 using Student's t function. " << endl;
// Example/test using tabulated value
// Example/test using tabulated value
// (deliberately coded as naively as possible).
// Null hypothesis is that there is no difference (greater or less)
// Null hypothesis is that there is no difference (greater or less)
// between measured and standard.
double degrees_of_freedom = values-1; // 3-1 = 2
double degrees_of_freedom = values-1; // 3-1 = 2
cout << "Measurement 1 = " << value[0] << ", measurement 2 = " << value[1] << ", measurement 3 = " << value[2] << endl;
double mean = (value[0] + value[1] + value[2]) / static_cast<double>(values);
double mean = (value[0] + value[1] + value[2]) / static_cast<double>(values);
cout << "Standard = " << standard << ", mean = " << mean << ", (mean - standard) = " << mean - standard << endl;
double sd = sqrt(((value[0] - mean) * (value[0] - mean) + (value[1] - mean) * (value[1] - mean) + (value[2] - mean) * (value[2] - mean))/ static_cast<double>(values-1));
cout << "Standard deviation = " << sd << endl;
if (sd == 0.)
{
cout << "Measured mean is identical to SRM value," << endl;
cout << "so probability of no difference between measured and standard (the 'null hypothesis') is unity." << endl;
return 0;
}
double sd = sqrt(((value[0] - mean) * (value[0] - mean) + (value[1] - mean) * (value[1] - mean) + (value[2] - mean) * (value[2] - mean))/ static_cast<double>(values-1));
cout << "Standard deviation = " << sd << endl;
if (sd == 0.)
{
cout << "Measured mean is identical to SRM value," << endl;
cout << "so probability of no difference between measured and standard (the 'null hypothesis') is unity." << endl;
return 0;
}
double t = (mean - standard) * std::sqrt(static_cast<double>(values)) / sd;
cout << "Student's t = " << t << endl;
cout.precision(2); // Useful accuracy is only a few decimal digits.
cout << "Probability of Student's t is " << cdf(students_t(degrees_of_freedom), std::abs(t)) << endl;
double t = (mean - standard) * std::sqrt(static_cast<double>(values)) / sd;
cout << "Student's t = " << t << endl;
cout.precision(2); // Useful accuracy is only a few decimal digits.
cout << "Probability of Student's t is " << cdf(students_t(degrees_of_freedom), std::abs(t)) << endl;
// 0.91, is 1 tailed.
// So there is insufficient evidence of a difference to meet a 95% (1 in 20) criterion.
// So there is insufficient evidence of a difference to meet a 95% (1 in 20) criterion.
return 0;
return 0;
} // int main()
/*

View File

@@ -30,16 +30,16 @@
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::endl;
#include <iomanip>
using std::setprecision;
using std::setw;
using std::setprecision;
using std::setw;
#include <cmath>
using std::sqrt;
using std::sqrt;
// This example of a one-sided test is from:
//
@@ -58,39 +58,39 @@ double data [values] = {25.06, 25.18, 24.87, 25.51, 25.34, 25.41};
int main()
{
cout << "Example2 using Student's t function. ";
cout << "Example2 using Student's t function. ";
#if defined(__FILE__) && defined(__TIMESTAMP__)
cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER;
cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER;
#endif
cout << endl;
cout << endl;
double sum = 0.;
for (int value = 0; value < values; value++)
{ // Echo data and calculate mean.
sum += data[value];
cout << setw(4) << value << ' ' << setw(14) << data[value] << endl;
}
double mean = sum /static_cast<double>(values);
cout << "Mean = " << mean << endl; // 25.2283
double sum = 0.;
for (int value = 0; value < values; value++)
{ // Echo data and calculate mean.
sum += data[value];
cout << setw(4) << value << ' ' << setw(14) << data[value] << endl;
}
double mean = sum /static_cast<double>(values);
cout << "Mean = " << mean << endl; // 25.2283
double sd = 0.;
for (int value = 0; value < values; value++)
{ // Calculate standard deviation.
sd +=(data[value] - mean) * (data[value] - mean);
}
int degrees_of_freedom = values - 1; // Use the n-1 formula.
sd /= degrees_of_freedom; // == variance.
double sd = 0.;
for (int value = 0; value < values; value++)
{ // Calculate standard deviation.
sd +=(data[value] - mean) * (data[value] - mean);
}
int degrees_of_freedom = values - 1; // Use the n-1 formula.
sd /= degrees_of_freedom; // == variance.
sd= sqrt(sd);
cout << "Standard deviation = " << sd<< endl; // = 0.238279
cout << "Standard deviation = " << sd<< endl; // = 0.238279
double t = (mean - reference) * sqrt(static_cast<double>(values))/ sd; //
cout << "Student's t = " << t << ", with " << degrees_of_freedom << " degrees of freedom." << endl; // = 2.34725
double t = (mean - reference) * sqrt(static_cast<double>(values))/ sd; //
cout << "Student's t = " << t << ", with " << degrees_of_freedom << " degrees of freedom." << endl; // = 2.34725
cout << "Probability of positive bias is " << cdf(students_t(degrees_of_freedom), t) << "."<< endl; // = 0.967108.
// A 1-sided test because only testing for a positive bias.
// If > 0.95 then greater than 1 in 20 conventional (arbitrary) requirement.
cout << "Probability of positive bias is " << cdf(students_t(degrees_of_freedom), t) << "."<< endl; // = 0.967108.
// A 1-sided test because only testing for a positive bias.
// If > 0.95 then greater than 1 in 20 conventional (arbitrary) requirement.
return 0;
return 0;
} // int main()
/*

View File

@@ -30,14 +30,14 @@
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
using boost::math::students_t; // Probability of students_t(df, t).
using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
using std::cout; using std::endl;
using std::cout; using std::endl;
#include <iomanip>
using std::setprecision; using std::setw;
using std::setprecision; using std::setw;
#include <cmath>
using std::sqrt;
using std::sqrt;
// This example of a two-sided test is from:
// B. M. Smith & M. B. Griffiths, Analyst, 1982, 107, 253,
@@ -64,38 +64,38 @@ float diffs[portions];
int main()
{
cout << "Example3 using Student's t function. " << endl;
float mean_diff = 0.f;
cout << "\n""Portion wet_oxidation Direct_extraction difference" << endl;
for (int portion = 0; portion < portions; portion++)
{ // Echo data and differences.
diffs[portion] = data[portion][0] - data[portion][1];
mean_diff += diffs[portion];
cout << setw(4) << portion << ' ' << setw(14) << data[portion][0] << ' ' << setw(18)<< data[portion][1] << ' ' << setw(9) << diffs[portion] << endl;
}
mean_diff /= portions;
cout << "Mean difference = " << mean_diff << endl; // -1.75
cout << "Example3 using Student's t function. " << endl;
float mean_diff = 0.f;
cout << "\n""Portion wet_oxidation Direct_extraction difference" << endl;
for (int portion = 0; portion < portions; portion++)
{ // Echo data and differences.
diffs[portion] = data[portion][0] - data[portion][1];
mean_diff += diffs[portion];
cout << setw(4) << portion << ' ' << setw(14) << data[portion][0] << ' ' << setw(18)<< data[portion][1] << ' ' << setw(9) << diffs[portion] << endl;
}
mean_diff /= portions;
cout << "Mean difference = " << mean_diff << endl; // -1.75
float sd_diffs = 0.f;
for (int portion = 0; portion < portions; portion++)
{ // Calculate standard deviation of differences.
sd_diffs +=(diffs[portion] - mean_diff) * (diffs[portion] - mean_diff);
}
int degrees_of_freedom = portions-1; // Use the n-1 formula.
sd_diffs /= degrees_of_freedom;
sd_diffs = sqrt(sd_diffs);
cout << "Standard deviation of differences = " << sd_diffs << endl; // 4.99166
// Standard deviation of differences = 4.99166
double t = mean_diff * sqrt(static_cast<double>(portions))/ sd_diffs; // -0.70117
cout << "Student's t = " << t << ", if " << degrees_of_freedom << " degrees of freedom." << endl;
// Student's t = -0.70117, if 3 degrees of freedom.
cout << "Probability of the means being different is "
float sd_diffs = 0.f;
for (int portion = 0; portion < portions; portion++)
{ // Calculate standard deviation of differences.
sd_diffs +=(diffs[portion] - mean_diff) * (diffs[portion] - mean_diff);
}
int degrees_of_freedom = portions-1; // Use the n-1 formula.
sd_diffs /= degrees_of_freedom;
sd_diffs = sqrt(sd_diffs);
cout << "Standard deviation of differences = " << sd_diffs << endl; // 4.99166
// Standard deviation of differences = 4.99166
double t = mean_diff * sqrt(static_cast<double>(portions))/ sd_diffs; // -0.70117
cout << "Student's t = " << t << ", if " << degrees_of_freedom << " degrees of freedom." << endl;
// Student's t = -0.70117, if 3 degrees of freedom.
cout << "Probability of the means being different is "
<< 2.F * cdf(students_t(degrees_of_freedom), t) << "."<< endl; // 0.266846 * 2 = 0.533692
// Double the probability because using a 'two-sided test' because
// mean for 'Wet oxidation' could be either
// greater OR LESS THAN for 'Direct extraction'.
// Double the probability because using a 'two-sided test' because
// mean for 'Wet oxidation' could be either
// greater OR LESS THAN for 'Direct extraction'.
return 0;
return 0;
} // int main()
/*

View File

@@ -566,15 +566,15 @@ namespace constants{
template<> inline boost::math::ntl::RR pi<boost::math::ntl::RR>(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(boost::math::ntl::RR))
{
NTL::RR result;
ComputePi(result);
return result;
NTL::RR result;
ComputePi(result);
return result;
}
template<> inline boost::math::ntl::RR e<boost::math::ntl::RR>(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(boost::math::ntl::RR))
{
NTL::RR result;
NTL::RR result;
result = 1;
return exp(result);
return exp(result);
}
} // namespace constants

View File

@@ -231,8 +231,8 @@ namespace boost
}
if (p <= pow(1 - success_fraction, trials))
{ // p <= pdf(dist, 0) == cdf(dist, 0)
return 0; // So the only reasonable result is zero.
} // And root finder would fail otherwise.
return 0; // So the only reasonable result is zero.
} // And root finder would fail otherwise.
// Solve for quantile numerically:
//
@@ -406,9 +406,9 @@ namespace boost
}; // template <class RealType, class Policy> class binomial_distribution
typedef binomial_distribution<> binomial;
// typedef binomial_distribution<double> binomial;
// IS now included since no longer a name clash with function binomial.
//typedef binomial_distribution<double> binomial; // Reserved name of type double.
// typedef binomial_distribution<double> binomial;
// IS now included since no longer a name clash with function binomial.
//typedef binomial_distribution<double> binomial; // Reserved name of type double.
template <class RealType, class Policy>
const std::pair<RealType, RealType> range(const binomial_distribution<RealType, Policy>& dist)
@@ -676,8 +676,8 @@ namespace boost
// 1993, vol. 40, no3-4, pp. 185-189 (4 ref.)
// Bounds for median and 50 percetage 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
// 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.
RealType p = dist.success_fraction();
RealType n = dist.trials();

View File

@@ -85,7 +85,7 @@ RealType cdf_imp(const cauchy_distribution<RealType, Policy>& dist, const RealTy
return 0.5;
}
result = -atan(1 / mx) / constants::pi<RealType>();
return (((x > location) != complement) ? 1 - result : result);
return (((x > location) != complement) ? 1 - result : result);
} // cdf
template <class RealType, class Policy>
@@ -180,14 +180,14 @@ typedef cauchy_distribution<double> cauchy;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const cauchy_distribution<RealType, Policy>&)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const cauchy_distribution<RealType, Policy>& )
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
return std::pair<RealType, RealType>(-tools::max_value<RealType>(), tools::max_value<RealType>()); // - to + infinity.
}

View File

@@ -58,14 +58,14 @@ typedef chi_squared_distribution<double> chi_squared;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const chi_squared_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // 0 to + infinity.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // 0 to + infinity.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const chi_squared_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
return std::pair<RealType, RealType>(0, tools::max_value<RealType>()); // 0 to + infinity.
}

View File

@@ -80,16 +80,16 @@ typedef exponential_distribution<double> exponential;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const exponential_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const exponential_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -75,16 +75,16 @@ typedef extreme_value_distribution<double> extreme_value;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const extreme_value_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const extreme_value_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -57,16 +57,16 @@ typedef fisher_f_distribution<double> fisher_f;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const fisher_f_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const fisher_f_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -102,16 +102,16 @@ private:
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -77,16 +77,16 @@ typedef lognormal_distribution<double> lognormal;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const lognormal_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x is >0 to +infinity.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const lognormal_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -259,16 +259,16 @@ namespace boost
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const negative_binomial_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable k.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const negative_binomial_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable k.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
}
template <class RealType, class Policy>
@@ -458,7 +458,7 @@ namespace boost
}
if (P <= pow(dist.success_fraction(), dist.successes()))
{ // p <= pdf(dist, 0) == cdf(dist, 0)
return 0;
return 0;
}
/*
// Calculate quantile of negative_binomial using the inverse incomplete beta function.

View File

@@ -74,17 +74,17 @@ typedef normal_distribution<double> normal;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const normal_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const normal_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
}
template <class RealType, class Policy>

View File

@@ -233,16 +233,16 @@ namespace boost
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const poisson_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable k.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // Max integer?
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>()); // Max integer?
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const poisson_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable k.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
@@ -480,10 +480,10 @@ namespace boost
BOOST_MATH_STD_USING // ADL of std functions.
// if(p == 0) NOT necessarily zero!
// Not necessarily any special value of k because is unlimited.
if (p <= exp(-dist.mean()))
{ // if p <= cdf for 0 events (== pdf for 0 events), then quantile must be zero.
return 0;
}
if (p <= exp(-dist.mean()))
{ // if p <= cdf for 0 events (== pdf for 0 events), then quantile must be zero.
return 0;
}
return gamma_q_inva(dist.mean(), p, Policy()) - 1;
*/
typedef typename Policy::discrete_quantile_type discrete_type;
@@ -549,9 +549,9 @@ namespace boost
}
/*
if (-q <= boost::math::expm1(-dist.mean()))
{ // if q <= cdf(complement for 0 events, then quantile must be zero.
return 0;
}
{ // if q <= cdf(complement for 0 events, then quantile must be zero.
return 0;
}
return gamma_p_inva(dist.mean(), q, Policy()) -1;
*/
typedef typename Policy::discrete_quantile_type discrete_type;

View File

@@ -80,16 +80,16 @@ typedef rayleigh_distribution<double> rayleigh;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const rayleigh_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(static_cast<RealType>(1), max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(static_cast<RealType>(1), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const rayleigh_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>((1), max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>((1), max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -63,16 +63,16 @@ typedef students_t_distribution<double> students_t;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
@@ -146,7 +146,7 @@ inline RealType cdf(const students_t_distribution<RealType, Policy>& dist, const
RealType z = degrees_of_freedom / (degrees_of_freedom + t2);
probability = ibeta(degrees_of_freedom / 2, static_cast<RealType>(0.5), z, Policy()) / 2;
}
return (t > 0 ? 1 - probability : probability);
return (t > 0 ? 1 - probability : probability);
} // cdf
template <class RealType, class Policy>

View File

@@ -140,16 +140,16 @@ namespace boost{ namespace math
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const uniform_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const uniform_distribution<RealType, Policy>& dist)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(dist.lower(), dist.upper());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(dist.lower(), dist.upper());
}
template <class RealType, class Policy>

View File

@@ -102,16 +102,16 @@ typedef weibull_distribution<double> weibull;
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const weibull_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const weibull_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>

View File

@@ -62,9 +62,9 @@ template <class E, class T>
void raise_error(const char* function, const char* message)
{
if(function == 0)
function = "Unknown function";
function = "Unknown function";
if(message == 0)
message = "Cause unknown";
message = "Cause unknown";
std::string msg("Error in function ");
msg += (boost::format(function) % typeid(T).name()).str();
@@ -79,9 +79,9 @@ template <class E, class T>
void raise_error(const char* function, const char* message, const T& val)
{
if(function == 0)
function = "Unknown function";
function = "Unknown function";
if(message == 0)
message = "Cause unknown";
message = "Cause unknown";
std::string msg("Error in function ");
msg += (boost::format(function) % typeid(T).name()).str();

View File

@@ -14,18 +14,18 @@ namespace boost{ namespace math{
namespace detail
{
template <class T>
struct cbrt_functor
{
cbrt_functor(T const& target) : a(target){}
std::tr1::tuple<T, T, T> operator()(T const& z)
{
T sqr = z * z;
return std::tr1::make_tuple(sqr * z - a, 3 * sqr, 6 * z);
}
private:
T a;
};
template <class T>
struct cbrt_functor
{
cbrt_functor(T const& target) : a(target){}
std::tr1::tuple<T, T, T> operator()(T const& z)
{
T sqr = z * z;
return std::tr1::make_tuple(sqr * z - a, 3 * sqr, 6 * z);
}
private:
T a;
};
template <class T, class Policy>
T cbrt_imp(T z, const Policy&)

View File

@@ -28,8 +28,8 @@
namespace boost
{
namespace math
{ // Math functions (in roughly alphabetic order).
namespace math
{ // Math functions (in roughly alphabetic order).
// Beta functions.
template <class RT1, class RT2>
@@ -621,7 +621,7 @@ namespace boost
template <class T>
bool isnormal BOOST_NO_MACRO_EXPAND(T t);
} // namespace math
} // namespace math
} // namespace boost
#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\

View File

@@ -6,8 +6,7 @@
#ifndef BOOST_MATH_TOOLS_SIGN_HPP
#define BOOST_MATH_TOOLS_SIGN_HPP
#include <cmath>
#include <cstdlib>
#include <boost/math/tools/config.hpp>
namespace boost{ namespace math{
@@ -26,6 +25,7 @@ inline int signbit(const T& z)
template <class T>
inline T copysign(const T& x, const T& y)
{
BOOST_MATH_STD_USING
return fabs(x) * boost::math::sign(y);
}

View File

@@ -176,30 +176,30 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
#ifdef __linux__
#include <fenv.h>
#include <fenv.h>
namespace boost{ namespace math{
namespace detail
{
struct fpu_guard
{
fpu_guard()
{
fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
feclearexcept(FE_ALL_EXCEPT);
}
~fpu_guard()
{
fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
}
private:
fexcept_t m_flags;
};
namespace boost{ namespace math{
namespace detail
{
struct fpu_guard
{
fpu_guard()
{
fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
feclearexcept(FE_ALL_EXCEPT);
}
~fpu_guard()
{
fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
}
private:
fexcept_t m_flags;
};
} // namespace detail
}} // namespaces
} // namespace detail
}} // namespaces
#define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
#define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
#else // All other platforms.
#define BOOST_FPU_EXCEPTION_GUARD
#endif

View File

@@ -17,52 +17,52 @@ namespace boost{ namespace math{ namespace tools{
namespace detail
{
template <class T>
struct is_pair : public boost::false_type{};
template <class T>
struct is_pair : public boost::false_type{};
template <class T, class U>
struct is_pair<std::pair<T,U> > : public boost::true_type{};
template <class T, class U>
struct is_pair<std::pair<T,U> > : public boost::true_type{};
template <class Gen>
struct fraction_traits_simple
{
typedef typename Gen::result_type result_type;
typedef typename Gen::result_type value_type;
template <class Gen>
struct fraction_traits_simple
{
typedef typename Gen::result_type result_type;
typedef typename Gen::result_type value_type;
static result_type a(const value_type& v)
{
return 1;
}
static result_type b(const value_type& v)
{
return v;
}
};
static result_type a(const value_type& v)
{
return 1;
}
static result_type b(const value_type& v)
{
return v;
}
};
template <class Gen>
struct fraction_traits_pair
{
typedef typename Gen::result_type value_type;
typedef typename value_type::first_type result_type;
template <class Gen>
struct fraction_traits_pair
{
typedef typename Gen::result_type value_type;
typedef typename value_type::first_type result_type;
static result_type a(const value_type& v)
{
return v.first;
}
static result_type b(const value_type& v)
{
return v.second;
}
};
static result_type a(const value_type& v)
{
return v.first;
}
static result_type b(const value_type& v)
{
return v.second;
}
};
template <class Gen>
struct fraction_traits
: public boost::mpl::if_c<
is_pair<typename Gen::result_type>::value,
fraction_traits_pair<Gen>,
fraction_traits_simple<Gen> >::type
{
};
template <class Gen>
struct fraction_traits
: public boost::mpl::if_c<
is_pair<typename Gen::result_type>::value,
fraction_traits_pair<Gen>,
fraction_traits_simple<Gen> >::type
{
};
} // namespace detail

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 400> assoc_legendre_p = {
SC_(3.755727291107177734375), SC_(-3), SC_(0.264718532562255859375), SC_(0.018682285998021253444483874168352748715136623066073),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 159> binomial_data = { {
{ SC_(0.15e2), SC_(0.15e2), SC_(0.1e1) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 230> binomial_large_data = { {
{ SC_(0.174e3), SC_(0.4e1), SC_(0.36890001e8) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 5>, 4032> binomial_quantile_data = {{
{ SC_(2), SC_(0.12698681652545928955078125), SC_(0.12698681652545928955078125), SC_(0), SC_(0.28467385230321224203411154382440248724380832183117) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 85> cbrt_data = { {
{ SC_(0.266297021326439287136622624529991298914e-12), SC_(0.1888421455001568264216782004847867296461e-37) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 500> digamma_data = { {
{ SC_(2.818432331085205078125), SC_(0.8484115700906551606307984398000472347785) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 200> digamma_neg_data = { {
{ SC_(-99.7181549072265625), SC_(2.03892909952497242038694056382195623059) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 200> digamma_root_data = { {
{ SC_(1.39999997615814208984375), SC_(-0.06138456903152256550686860248931989075643) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 33> digamma_small_data = { {
{ SC_(0.1690093176520690576580818742513656616211e-8), SC_(-591683355.0172646248558707395909205014789) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 100> ellint_k_data = {
SC_(-0.99042308330535888671875e0), SC_(0.3377711175347896212115917173531827081735908096628e1),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 500> erf_data = { {
{ SC_(-7.954905033111572265625), SC_(-0.9999999999999999999999999999768236114552), SC_(1.999999999999999999999999999976823611455) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 100> erf_inv_data = { {
{ SC_(-0.990433037281036376953125), SC_(-1.832184533179510927322805923563700329767) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 300> erf_large_data = { {
{ SC_(8.2311115264892578125), SC_(0.9999999999999999999999999999997436415644), SC_(0.2563584356432915693836191701249115171878e-30) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 200> erfc_inv_big_data = { {
{ SC_(0.5460825444184401149953083908674803067585e-4312), SC_(99.62016927389407649911084501709563799849) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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>, 100> erfc_inv_data = { {
{ SC_(0.00956696830689907073974609375), SC_(1.832184391051582711731256541599359331735) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2007.
// 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)
#ifndef BOOST_MATH_TEST_FUNCTOR_HPP
#define BOOST_MATH_TEST_FUNCTOR_HPP

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 130> gamma_inv_big_data = { {
{ SC_(464.56927490234375), SC_(0.12698681652545928955078125), SC_(440.0905015614498663381793089656310373835539712118699915057655756381750702144551901256933419148259778), SC_(489.2489328115381710888005650788332818303123263238882523231037266766796974176786885492715539575179927) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 200> gamma_inv_data = { {
{ SC_(9.754039764404296875), SC_(0.12698681652545928955078125), SC_(6.349849983781954486964960115093039567468747967664820851534065876063014180392060424555352423162443804), SC_(13.35954665556050630769710564071384909890705633863167415813992116806093647564994418684947673739937248) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 229> gamma_inv_small_data = { {
{ SC_(0.1730655412757187150418758392333984375e-5), SC_(0.12698681652545928955078125), SC_(0.2239623606222809074122747811596115646210220735131141509259977248899758059576948436798908594057794725e-517862), SC_(0.4348301951174619607003912855228982264838968134589390827069898370149065135278987288014463439625604227e-34079) },

View File

@@ -1,4 +1,7 @@
// (C) Copyright John Maddock 2006-7.
// 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)
#ifndef BOOST_MATH_HANDLE_TEST_RESULT
#define BOOST_MATH_HANDLE_TEST_RESULT

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 420> hermite = {
SC_(0.8e1), SC_(-0.804919189453125e3), SC_(0.45107507538695517471998224862706929168983312035236e26),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 7>, 1000> ibeta_int_data = { {
{ SC_(1), SC_(1), SC_(0.12707412242889404296875), SC_(0.12707412242889404296875), SC_(0.87292587757110595703125), SC_(0.12707412242889404296875), SC_(0.87292587757110595703125) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 5>, 1210> ibeta_inv_data = { {
{ SC_(0.104760829344741068780422210693359375e-4), SC_(39078.1875), SC_(0.913384497165679931640625), SC_(0.2135769916611873809373928693612157637794870746322109915739746618652569766882593624385400901395922558e-3760), SC_(0.6169146818683135737866366973021696361959736535710675458813428774517757535576031054239811928697394346e-101417) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 7>, 1100> ibeta_inva_data = { {
{ SC_(0.101913392427377402782440185546875e-4), SC_(0.3082362115383148193359375), SC_(0.1355634629726409912109375), SC_(0.6498233713152427462579302903941895526823485861809005407005756658138299437345439685916818979079350952e-4), SC_(0.1598220360006443400909761969445329244603859759388130816641624923434214075962489978723834186220509792e-5), SC_(0.1598250823507423266003361933591577902014719110010440833489018043541995851576985396009647692344594598e-5), SC_(0.6499023539055942142435327607856798948132754954188633069136984730655318067141056849740949064680308213e-4) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 6>, 140> igamma_int_data = { {
{ SC_(0.5), SC_(0.004999999888241291046142578125), SC_(1.631267845368323485191815380032984903074365412587098308286220239190324188420710121791871591309590004), SC_(0.9203443263332001265162236927545643793578786527087679769237787431564844748135321134774112708209554194), SC_(0.1411860055371925421063521033081602797231840435352888199275875506625870961703220596656577919527041757), SC_(0.07965567366679987348377630724543562064212134729123202307622125684351552518646788652258872917904458057) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 435> igamma_inva_data = { {
{ SC_(0.11342023313045501708984375), SC_(0.097540400922298431396484375), SC_(1.035869900800721563193351335409353423054156223778352824799732510014114331303190861923913851617789576), SC_(0.05862165929221091309602935851268320728966552926925608108837955463403857541085640683871851098187935567) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 280> laguerre2 = {
SC_(0.5e1), SC_(0.9754039764404296875e2), SC_(-0.56218428868911115998451316426215010600803852349048e8),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 2240> laguerre3 = {
SC_(0.6e1), SC_(0.4e1), SC_(0.9754039764404296875e2), SC_(0.61248773400035441372705568899743424188675775638604e9),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 140> legendre_p = {
SC_(3), SC_(-0.804919183254241943359375), SC_(-0.09637879251279735399302410605920296560178428535437), SC_(-0.84585603807674271376114723023136351467791030262194),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 160> legendre_p_large = {
SC_(29), SC_(-0.74602639675140380859375), SC_(0.050915219643735786802064817454102557266509665552523), SC_(-0.27118035040452065163236941090242943684321195237749),

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 3>, 80> log1p_expm1_data = { {
{ SC_(-0.69330310821533203125e0), SC_(-0.1181895342296499380302723361817935835636e1), SC_(-0.5000779577496508480606742934033661111325e0) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 5>, 792> negative_binomial_quantile_data = {{
{ SC_(4.285762786865234375), SC_(0.12698681652545928955078125), SC_(0.097540400922298431396484375), SC_(11.568381290037563253305975817351444024377036234904), SC_(49.67581419477884086070549390307050513757197652133) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 4>, 619> poisson_quantile_data = {{
{ SC_(2.539736270904541015625), SC_(0.097540400922298431396484375), SC_(0.1236392659323415267286721455855935332272165776019), SC_(4.1794244675777288954971650240102219690023733491107) },

View File

@@ -1,3 +1,8 @@
// (C) Copyright John Maddock 2006-7.
// 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, 6>, 1000> spherical_harmonic = {
SC_(0.2e1), SC_(0), SC_(-0.6223074436187744140625e1), SC_(-0.983176708221435546875e0), SC_(0.62736841735769885881246893757736785347239567286304e0), SC_(0),

Some files were not shown because too many files have changed in this diff Show More