diff --git a/doc/sf_and_dist/Jamfile.v2 b/doc/sf_and_dist/Jamfile.v2 index 881b4e692..bd0e9d578 100644 --- a/doc/sf_and_dist/Jamfile.v2 +++ b/doc/sf_and_dist/Jamfile.v2 @@ -4,30 +4,12 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) using quickbook ; +using auto-index ; +import modules ; path-constant images_location : html ; path-constant here : . ; -import modules ; - -if --enable-index in [ modules.peek : ARGV ] -{ - ECHO "Building the Math docs with automatic index generation enabled." ; - using auto-index ; - project : requirements - on pdf:off - html:on - $(here)/index.idx - $(here)/../../../.. - on - enable_index - pdf:index.on.type=1 ; -} -else -{ - ECHO "Building the Math docs with automatic index generation disabled. Try building with --enable-index." ; -} - xml math : math.qbk ; boostbook standalone : @@ -86,6 +68,13 @@ boostbook standalone pdf:img.src.path=$(images_location)/ pdf:draft.mode="no" pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/math/doc/sf_and_dist/html + on pdf:off + html:on + $(here)/index.idx + $(here)/../../../.. + on + enable_index + pdf:index.on.type=1 ; install pdf-install : standalone : . PDF math.pdf ; @@ -94,3 +83,6 @@ install pdf-install : standalone : . PDF math.pdf + + + diff --git a/doc/sf_and_dist/bessel_ik.qbk b/doc/sf_and_dist/bessel_ik.qbk index aad74dd44..97c0ad009 100644 --- a/doc/sf_and_dist/bessel_ik.qbk +++ b/doc/sf_and_dist/bessel_ik.qbk @@ -119,6 +119,10 @@ using rational the approximations above. These rational approximations are accurate to around 19 digits, and are therefore only used when T has no more than 64 binary digits of precision. +When /x/ is small compared to /v/, I[sub v]x[space] is best computed directly from the series: + +[equation mbessel17] + In the general case, we first normalize [nu][space] to \[[^0, [inf]]) with the help of the reflection formulae: diff --git a/doc/sf_and_dist/bessel_jy.qbk b/doc/sf_and_dist/bessel_jy.qbk index a970e09ea..f1ad7bd23 100644 --- a/doc/sf_and_dist/bessel_jy.qbk +++ b/doc/sf_and_dist/bessel_jy.qbk @@ -181,7 +181,29 @@ J.F. Hart et al, ['Computer Approximations], John Wiley & Sons, New York, 1968. These approximations are accurate to around 19 decimal digits: therefore these methods are not used when type T has more than 64 binary digits. -When /x/ is small, J[sub x][space] is best computed directly from the series: +When /x/ is smaller than machine epsilon then the following approximations for +Y[sub 0](x), Y[sub 1](x), Y[sub 2](x) and Y[sub n](x) can be used +(see: [@http://functions.wolfram.com/03.03.06.0037.01 http://functions.wolfram.com/03.03.06.0037.01], +[@http://functions.wolfram.com/03.03.06.0038.01 http://functions.wolfram.com/03.03.06.0038.01], +[@http://functions.wolfram.com/03.03.06.0039.01 http://functions.wolfram.com/03.03.06.0039.01] +and [@http://functions.wolfram.com/03.03.06.0040.01 http://functions.wolfram.com/03.03.06.0040.01]): + +[equation bessel_y0_small_z] + +[equation bessel_y1_small_z] + +[equation bessel_y2_small_z] + +[equation bessel_yn_small_z] + +When /x/ is small compared to /v/ and /v/ is not an integer, then the following +series approximation can be used for Y[sub v](x), this is also an area where other +approximations are often too slow to converge to be used +(see [@http://functions.wolfram.com/03.03.06.0034.01 http://functions.wolfram.com/03.03.06.0034.01]): + +[equation bessel_yv_small_z] + +When /x/ is small compared to /v/, J[sub v]x[space] is best computed directly from the series: [equation bessel2] diff --git a/doc/sf_and_dist/credits.qbk b/doc/sf_and_dist/credits.qbk index 8e4b753fa..624f18f45 100644 --- a/doc/sf_and_dist/credits.qbk +++ b/doc/sf_and_dist/credits.qbk @@ -31,6 +31,9 @@ Paul A. Bristow expressed the need for better handling of Input & Output of NaN and infinity for the C++ Standard Library] and suggested following the C99 format. +Antony Polukhin improved lexical cast avoiding stringstream so that +it was no longer necessary to use a globale C99 facet to handle nonfinites. + H'''å'''kan Ard'''ö''', Boris Gubenko, John Maddock, Markus Sch'''ö'''pflin diff --git a/doc/sf_and_dist/dist_tutorial.qbk b/doc/sf_and_dist/dist_tutorial.qbk index 2c0b76e18..521eb0d50 100644 --- a/doc/sf_and_dist/dist_tutorial.qbk +++ b/doc/sf_and_dist/dist_tutorial.qbk @@ -438,6 +438,7 @@ Now that you have the basics, the next section looks at some worked examples. [include distributions/normal_example.qbk] [/include distributions/inverse_gamma_example.qbk] [/include distributions/inverse_gaussian_example.qbk] +[include distributions/inverse_chi_squared_eg.qbk] [include distributions/nc_chi_squared_example.qbk] [include distributions/error_handling_example.qbk] [include distributions/find_location_and_scale.qbk] @@ -450,7 +451,7 @@ Now that you have the basics, the next section looks at some worked examples. [endsect] [/ section:stat_tut Statistical Distributions Tutorial] [/ dist_tutorial.qbk - Copyright 2006, 2010 John Maddock and Paul A. Bristow. + Copyright 2006, 2010, 2011 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). diff --git a/doc/sf_and_dist/distributions/inverse_chi_squared_eg.qbk b/doc/sf_and_dist/distributions/inverse_chi_squared_eg.qbk new file mode 100644 index 000000000..fe4479415 --- /dev/null +++ b/doc/sf_and_dist/distributions/inverse_chi_squared_eg.qbk @@ -0,0 +1,32 @@ + +[section:inverse_chi_squared_eg Inverse Chi-Squared Distribution Bayes Example] + +[import ../../../example/inverse_chi_squared_bayes_eg.cpp] +[inverse_chi_squared_bayes_eg_1] +[inverse_chi_squared_bayes_eg_output_1] +[inverse_chi_squared_bayes_eg_2] +[inverse_chi_squared_bayes_eg_output_2] +[inverse_chi_squared_bayes_eg_3] +[inverse_chi_squared_bayes_eg_output_3] +[inverse_chi_squared_bayes_eg_4] +[inverse_chi_squared_bayes_eg_output_4] + +[inverse_chi_squared_bayes_eg_5] + +A full sample output is: +[inverse_chi_squared_bayes_eg_output] + +(See also the reference documentation for the __inverse_chi_squared_distrib.) + +See the full source C++ of this example at +[@../../../example/inverse_chi_squared_bayes_eg.cpp] + +[endsect] [/section:inverse_chi_squared_eg Inverse Chi-Squared Distribution Bayes Example] + +[/ + Copyright 2011 Paul A. Bristow and Thomas Mang. + 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). +] + diff --git a/doc/sf_and_dist/distributions/nc_chi_squared_example.qbk b/doc/sf_and_dist/distributions/nc_chi_squared_example.qbk index 7d958cf75..a91a91929 100644 --- a/doc/sf_and_dist/distributions/nc_chi_squared_example.qbk +++ b/doc/sf_and_dist/distributions/nc_chi_squared_example.qbk @@ -2,19 +2,19 @@ (See also the reference documentation for the __non_central_chi_squared_distrib.) -[section:nccs_power_eg Tables of the power function of the [chi][super 2] test.] +[section:nccs_power_eg Tables of the power function of the chi[super 2] test.] +[/chi super 2 failed to show the chi in pdf why??? (OK in html) so use words.] [import ../../../example/nc_chi_sq_example.cpp] [nccs_eg] -[endsect] [/nccs_power_eg Tables of the power function of the [chi][super 2] test.] +[endsect] [/nccs_power_eg Tables of the power function of the chi-squared [chi][super 2] test.] [endsect] [/section:nccs_eg Non Central Chi Squared Example] [/ - Copyright 2006 John Maddock and Paul A. Bristow. + Copyright 2006, 2011 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). ] - diff --git a/doc/sf_and_dist/equations/bessel_y0_small_z.mml b/doc/sf_and_dist/equations/bessel_y0_small_z.mml new file mode 100644 index 000000000..95668e425 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y0_small_z.mml @@ -0,0 +1,52 @@ + +]> + +bessel_y0_small_z + + + + + + + Y + 0 + + + + z + + + + = + + + 2 + π + + + + log + + + + z + 2 + + + + + + γ + + + + ; + + z + < + ε + + + + diff --git a/doc/sf_and_dist/equations/bessel_y0_small_z.png b/doc/sf_and_dist/equations/bessel_y0_small_z.png new file mode 100644 index 000000000..0d369754d Binary files /dev/null and b/doc/sf_and_dist/equations/bessel_y0_small_z.png differ diff --git a/doc/sf_and_dist/equations/bessel_y0_small_z.svg b/doc/sf_and_dist/equations/bessel_y0_small_z.svg new file mode 100644 index 000000000..2a53acc19 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y0_small_z.svg @@ -0,0 +1,2 @@ + +Y0(z)=2π(log(z2)+γ);z<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/bessel_y1_small_z.mml b/doc/sf_and_dist/equations/bessel_y1_small_z.mml new file mode 100644 index 000000000..36fb43788 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y1_small_z.mml @@ -0,0 +1,70 @@ + +]> + +bessel_y1_small_z + + + + + + + Y + 1 + + + + z + + + + = + + + z + π + + log + + + + z + 2 + + + + + + 2 + + π + z + + + + + z + + 2 + π + + + + + 1 + + 2 + γ + + + + ; + + z + < + ε + + + + diff --git a/doc/sf_and_dist/equations/bessel_y1_small_z.png b/doc/sf_and_dist/equations/bessel_y1_small_z.png new file mode 100644 index 000000000..27003a017 Binary files /dev/null and b/doc/sf_and_dist/equations/bessel_y1_small_z.png differ diff --git a/doc/sf_and_dist/equations/bessel_y1_small_z.svg b/doc/sf_and_dist/equations/bessel_y1_small_z.svg new file mode 100644 index 000000000..ef74f41c4 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y1_small_z.svg @@ -0,0 +1,2 @@ + +Y1(z)=zπlog(z2)2πzz2π(12γ);z<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/bessel_y2_small_z.mml b/doc/sf_and_dist/equations/bessel_y2_small_z.mml new file mode 100644 index 000000000..6e1fae149 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y2_small_z.mml @@ -0,0 +1,81 @@ + +]> + +bessel_y2_small_z + + + + + + + Y + 2 + + + = + + + + + z + 2 + + + 8 + π + + + + + + 3 + 2 + + + 2 + γ + + + + + 4 + + π + + z + 2 + + + + + + + + z + 2 + + + 4 + π + + + log + + + + z + 2 + + + + + ; + + z + < + ε + + + + diff --git a/doc/sf_and_dist/equations/bessel_y2_small_z.png b/doc/sf_and_dist/equations/bessel_y2_small_z.png new file mode 100644 index 000000000..c14d6b2a5 Binary files /dev/null and b/doc/sf_and_dist/equations/bessel_y2_small_z.png differ diff --git a/doc/sf_and_dist/equations/bessel_y2_small_z.svg b/doc/sf_and_dist/equations/bessel_y2_small_z.svg new file mode 100644 index 000000000..3252d3db1 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_y2_small_z.svg @@ -0,0 +1,2 @@ + +Y2=z28π(322γ)4πz2+z24πlog(z2);z<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/bessel_yn_small_z.mml b/doc/sf_and_dist/equations/bessel_yn_small_z.mml new file mode 100644 index 000000000..6d9aeea77 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_yn_small_z.mml @@ -0,0 +1,64 @@ + +]> + +bessel_yn_small_z + + + + + + + Y + n + + + + z + + + + = + + + + + n + + 1 + + + + ! + π + + + + + + z + 2 + + + + + + n + + + + ; + z + < + ε + + + + n + > + 2 + + + + diff --git a/doc/sf_and_dist/equations/bessel_yn_small_z.png b/doc/sf_and_dist/equations/bessel_yn_small_z.png new file mode 100644 index 000000000..f07b74e87 Binary files /dev/null and b/doc/sf_and_dist/equations/bessel_yn_small_z.png differ diff --git a/doc/sf_and_dist/equations/bessel_yn_small_z.svg b/doc/sf_and_dist/equations/bessel_yn_small_z.svg new file mode 100644 index 000000000..4a8b2a285 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_yn_small_z.svg @@ -0,0 +1,2 @@ + +Yn(z)=(n1)!π(z2)n;z<εn>2 \ No newline at end of file diff --git a/doc/sf_and_dist/equations/bessel_yv_small_z.mml b/doc/sf_and_dist/equations/bessel_yv_small_z.mml new file mode 100644 index 000000000..8ac38b129 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_yv_small_z.mml @@ -0,0 +1,171 @@ + +]> + +bessel_yv_small_z + + + + + + + Y + v + + + + z + + + + = + + + + + Γ + + + v + + + + π + + + + + k + = + 0 + + + + + + + + + + 1 + + + k + + + + + + z + 2 + + + + + 2 + k + + v + + + + + + + + 1 + + v + + + k + + k + ! + + + + + + + + Γ + + + + v + + + cos + + + v + π + + + + π + + + + + k + = + 0 + + + + + + + + + + 1 + + + k + + + + + + z + 2 + + + + + 2 + k + + + v + + + + + + + + v + + + 1 + + + k + + k + ! + + + + ; + + v + + + + + + diff --git a/doc/sf_and_dist/equations/bessel_yv_small_z.png b/doc/sf_and_dist/equations/bessel_yv_small_z.png new file mode 100644 index 000000000..3e17e3975 Binary files /dev/null and b/doc/sf_and_dist/equations/bessel_yv_small_z.png differ diff --git a/doc/sf_and_dist/equations/bessel_yv_small_z.svg b/doc/sf_and_dist/equations/bessel_yv_small_z.svg new file mode 100644 index 000000000..cba561244 --- /dev/null +++ b/doc/sf_and_dist/equations/bessel_yv_small_z.svg @@ -0,0 +1,2 @@ + +Yv(z)=Γ(v)πk=0(1)k(z2)2kv(1v)kk!Γ(v)cos(vπ)πk=0(1)k(z2)2k+v(v+1)kk!;v \ No newline at end of file diff --git a/doc/sf_and_dist/equations/mbessel17.mml b/doc/sf_and_dist/equations/mbessel17.mml new file mode 100644 index 000000000..641de0438 --- /dev/null +++ b/doc/sf_and_dist/equations/mbessel17.mml @@ -0,0 +1,69 @@ + +]> + +mbessel17 + + + + + + + I + v + + + + x + + + + = + + + + + k + = + 0 + + + + + 1 + + Γ + + + k + + + v + + + 1 + + + k + ! + + + + + + + x + 2 + + + + + 2 + k + + + v + + + + + + diff --git a/doc/sf_and_dist/equations/mbessel17.png b/doc/sf_and_dist/equations/mbessel17.png new file mode 100644 index 000000000..36f7e605c Binary files /dev/null and b/doc/sf_and_dist/equations/mbessel17.png differ diff --git a/doc/sf_and_dist/equations/mbessel17.svg b/doc/sf_and_dist/equations/mbessel17.svg new file mode 100644 index 000000000..d4bf98976 --- /dev/null +++ b/doc/sf_and_dist/equations/mbessel17.svg @@ -0,0 +1,2 @@ + +Iv(x)=k=01Γ(k+v+1)k!(x2)2k+v diff --git a/doc/sf_and_dist/fp_facets.qbk b/doc/sf_and_dist/fp_facets.qbk index 9792c943b..0f285712c 100644 --- a/doc/sf_and_dist/fp_facets.qbk +++ b/doc/sf_and_dist/fp_facets.qbk @@ -80,6 +80,12 @@ Or you can create a new locale in one step and, for example, use it to imbue an input and output stringstream. ] +[tip To just change an input or output stream, you can concisely write +`cout.imbue (std::locale(std::locale(), new boost::math::nonfinite_num_put));` +or +`cin.imbue (std::locale(std::locale(), new boost::math::nonfinite_num_get));` +] + [nonfinite_facets_sstream_2] [h4 C++0X standard for output of infinity and NaN] @@ -373,14 +379,18 @@ Same as `trap_infinity`, but positive and negative NaN are trapped instead. [h5 Use with lexical_cast] -Without using a new locale that contains the nonfinite facets, `lexical_cast` is not portable -(and often fails) if nonfinite values are found. +[note From Boost 1.48, lexical_cast no longer uses stringstreams internally, +and is now able to handle infinities and NaNs natively on most platforms.] + +Without using a new locale that contains the nonfinite facets, +previous versions of `lexical_cast` using stringstream were not portable +(and often failed) if nonfinite values are found. [nonfinite_facets_sstream_1] Although other examples imbue individual streams with the new locale, for the streams constructed inside lexical_cast, -it is necesary to assign to a global locale. +it was necesary to assign to a global locale. locale::global(new_locale); @@ -392,6 +402,10 @@ it is necesary to assign to a global locale. string s = boost::lexical_cast(numeric_limits::infinity()); assert(s == "inf"); +[warning If you use stringstream inside your functions, +you may still need to use a global locale to handle nonfinites correctly. +Or you need to imbue your stringstream with suitable get and put facets.] + [warning You should be aware that the C++ specification does not explicitly require that input from decimal digits strings converts with rounding to the nearest representable floating-point binary value. diff --git a/doc/sf_and_dist/html/index.html b/doc/sf_and_dist/html/index.html index 92217d718..c21acde39 100644 --- a/doc/sf_and_dist/html/index.html +++ b/doc/sf_and_dist/html/index.html @@ -53,7 +53,7 @@ Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani and Thijs van den Berg

- +

Last revised: May 16, 2011 at 16:53:57 GMT

Last revised: July 16, 2011 at 10:40:56 GMT


diff --git a/doc/sf_and_dist/html/index/s12.html b/doc/sf_and_dist/html/index/s12.html index 055f2c909..35703b934 100644 --- a/doc/sf_and_dist/html/index/s12.html +++ b/doc/sf_and_dist/html/index/s12.html @@ -24,1105 +24,2223 @@

-Function Index

-

A B C E F H I L N R S T

+Function Index
+

A B C D E F G H I K L M N P Q R S T U V W Z

A
-
-
accuracy
-
- - - -

Additional Implementation Notes

Frequently Asked Questions FAQ

log1p

-
acosh
-
- - - - -

acosh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
acoshf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
acoshl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinh
-
- - - - -

asinh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinhf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinhl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
assoc_laguerre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_laguerref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_laguerrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
atanh
-
- - - - -

atanh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
atanhf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
atanhl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
B
-
+
C
-
-
cbrt
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

cbrt

Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder

-
cbrtf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
cbrtl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
changesign
-

Sign Manipulation Functions

-
comp_ellint_1
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
comp_ellint_1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
comp_ellint_1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
conf_hyperg
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
conf_hypergf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
conf_hypergl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
copysign
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Sign Manipulation Functions

-
copysignf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
copysignl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
cyl_bessel_i
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Modified Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
cyl_bessel_if
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_il
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_j
-
- - - - -

Bessel Functions of the First and Second Kinds

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_jf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_jl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_k
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Modified Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
cyl_bessel_kf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_kl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumann
-
- - - - -

Bessel Functions of the First and Second Kinds

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumannf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumannl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
+
-E +D
-
-
ellint_1
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the First Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_2
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the Second Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_2f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_2l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_3
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the Third Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_3f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_3l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
erf
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Error Functions

-
erfc
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Error Functions

Normal (Gaussian) Distribution

-
erfcf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erfcl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erff
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erfl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
exp2
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
exp2f
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
exp2l
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
expint
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Exponential Integral Ei

Exponential Integral En

TR1 C Functions Quick Reference

-
expintf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
expintl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
expm1
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

expm1

-
expm1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
expm1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
-F +E
-
+
-H +F
-
+
-I +G
-
+
-L +H
-
-
laguerre
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Laguerre (and Associated) Polynomials

TR1 C Functions Quick Reference

-
laguerref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
laguerrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
lgamma
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Log Gamma

Setting Polices at Namespace Scope

-
lgammaf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
lgammal
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
llrint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llrintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llrintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llround
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Rounding Functions

-
llroundf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
llroundl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
log1p
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

log1p

Series Evaluation

-
log1pf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
log1pl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
log2
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Compile Time Power of a Runtime Base

-
log2f
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
log2l
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logb
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logbf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logbl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lrint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lrintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lrintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lround
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Rounding Functions

-
lroundf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
lroundl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
-N +I
-
+
-R +K
-
+
-S +L
-
-
scalbln
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalblnf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalblnl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbn
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbnf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbnl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
sign
-

Sign Manipulation Functions

-
signbit
-

Sign Manipulation Functions

-
sph_bessel
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Spherical Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
sph_besself
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_bessell
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_neumann
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Spherical Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
sph_neumannf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_neumannl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
+
-T +M
-
+
+
+N +
+
+
+P +
+
+
+Q +
+
+
+R +
+
+
+S +
+
+
+T +
+
+
+U +
+
+
+V +
+
+
+W +
+
+
+Z +
+
diff --git a/doc/sf_and_dist/html/index/s13.html b/doc/sf_and_dist/html/index/s13.html index 9daf02622..f4988cade 100644 --- a/doc/sf_and_dist/html/index/s13.html +++ b/doc/sf_and_dist/html/index/s13.html @@ -24,186 +24,201 @@

-Class Index

-

B C D E F G H I L M N P R S T U W

+Class Index
+

B C D E F G H I L M N P R S T U W

-B +B
-
-
bernoulli_distribution
-

Bernoulli Distribution

-
beta_distribution
-

Beta Distribution

-
binomial_distribution
-

Binomial Distribution

- +
-C +C
-
-
cauchy_distribution
-

Cauchy-Lorentz Distribution

-
chi_squared_distribution
-

Chi Squared Distribution

-
+
-D +D
-
-
default_policy
-

Policy Class Reference

-
+
-E +E
-
+
-F +F
-
-
fisher_f_distribution
-

F Distribution

-
+
-G +G
-
-
gamma_distribution
-

Gamma (and Erlang) Distribution

-
geometric_distribution
-

Geometric Distribution

-
+
-H +H
-
-
hypergeometric_distribution
-

Hypergeometric Distribution

-
+
-I +I
-
-
inverse_chi_squared_distribution
-

Inverse Chi Squared Distribution

-
inverse_gamma_distribution
-

Inverse Gamma Distribution

-
inverse_gaussian_distribution
-

Inverse Gaussian (or Inverse Normal) Distribution

-
+
-L +L
-
-
laplace_distribution
-

Laplace Distribution

-
log1p_series
-

Series Evaluation

-
logistic_distribution
-

Logistic Distribution

-
lognormal_distribution
-

Log Normal Distribution

-
+
-M +M
-
-
max_factorial
-

Factorial

-
+
-N +N
-
-
negative_binomial_distribution
-

Negative Binomial Distribution

-
nonfinite_num_get
-

Facets for Floating-Point Infinities and NaNs

-
nonfinite_num_put
-

Facets for Floating-Point Infinities and NaNs

-
non_central_beta_distribution
-

Noncentral Beta Distribution

-
non_central_chi_squared_distribution
-

Noncentral Chi-Squared Distribution

-
non_central_f_distribution
-

Noncentral F Distribution

-
non_central_t_distribution
-

Noncentral T Distribution

-
normalise
-

Policy Class Reference

-
normal_distribution
-

Normal (Gaussian) Distribution

-
+
-P +P
-
+
-R +R
-
-
rayleigh_distribution
-

Rayleigh Distribution

-
+
-S +S
-
-
students_t_distribution
-

Students t Distribution

-
+
-T +T
-
+
-U +U
-
-
uniform_distribution
-

Uniform Distribution

-
upper_incomplete_gamma_fract
-

Graphing, Profiling, and Generating Test Data for Special Functions

-
+
-W +W
-
-
weibull_distribution
-

Weibull Distribution

-
+
diff --git a/doc/sf_and_dist/html/index/s14.html b/doc/sf_and_dist/html/index/s14.html index 0a5fe575a..70684cd2e 100644 --- a/doc/sf_and_dist/html/index/s14.html +++ b/doc/sf_and_dist/html/index/s14.html @@ -24,287 +24,365 @@

-Typedef Index

-

A B C D E F G H I L N O P R S T U V W

+Typedef Index
+

A B C D E F G H I L N O P R S T U V W

-A +A
-
-
assert_undefined_type
-

Policy Class Reference

- +
-B +B
-
+
-C +C
-
+
-D +D
-
+
-E +E
-
-
evaluation_error_type
-

Policy Class Reference

-
exponential
-

Exponential Distribution

-
extreme_value
-

Extreme Value Distribution

-
+
-F +F
-
+
-G +G
-
+
-H +H
-
-
hypergeometric
-

Hypergeometric Distribution

-
+
-I +I
-
-
indeterminate_result_error_type
-

Policy Class Reference

-
inverse_chi_squared
-

Inverse Chi Squared Distribution

-
inverse_gaussian
-

Inverse Gaussian (or Inverse Normal) Distribution

-
+
-L +L
-
+
-N +N
-
+
-O +O
-
-
overflow_error_type
-

Policy Class Reference

-
+
-P +P
-
+
-R +R
-
-
rayleigh
-

Rayleigh Distribution

-
rounding_error_type
-

Policy Class Reference

-
+
-S +S
-
-
students_t
-
- - -

Namespaces

Students t Distribution

-
+
-T +T
-
-
triangular
-

Triangular Distribution

-
+
-U +U
-
-
underflow_error_type
-

Policy Class Reference

-
uniform
-

Uniform Distribution

-
+
-V +V
-
+
-W +W
-
+
diff --git a/doc/sf_and_dist/html/index/s15.html b/doc/sf_and_dist/html/index/s15.html index 93e9b9c88..a08ed4772 100644 --- a/doc/sf_and_dist/html/index/s15.html +++ b/doc/sf_and_dist/html/index/s15.html @@ -24,161 +24,251 @@

-Macro Index

-

B F

+Macro Index
+

B F

-B +B
-
-
BOOST_DEFINE_MATH_CONSTANT
-

Additional Implementation Notes

-
BOOST_FPU_EXCEPTION_GUARD
-

Configuration Macros

-
BOOST_HAS_LOG1P
-

log1p

-
BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC
-

Configuration Macros

-
BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC
-

Configuration Macros

-
BOOST_MATH_ASSERT_UNDEFINED_POLICY
-
- - - -

Changing the Policy Defaults

Mathematically Undefined Function Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
-

Configuration Macros

-
BOOST_MATH_CONTROL_FP
-

Configuration Macros

-
BOOST_MATH_DECLARE_DISTRIBUTIONS
-
- - -

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS
-
- - - -

Calling User Defined Error Handlers

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
BOOST_MATH_DENORM_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DIGITS10_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DISCRETE_QUANTILE_POLICY
-
- - - - -

Binomial Quiz Example

Geometric Distribution Examples

Negative Binomial Sales Quota Example.

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DOMAIN_ERROR_POLICY
-
- - - - -

Additional Implementation Notes

Changing the Policy Defaults

Error Handling Example

Using Macros to Change the Policy Defaults

-
BOOST_MATH_EVALUATION_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE
-

Configuration Macros

-
BOOST_MATH_EXPLICIT_TEMPLATE_TYPE
-

Configuration Macros

-
BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_INSTRUMENT_CODE
-

Configuration Macros

-
BOOST_MATH_INSTRUMENT_FPU
-

Configuration Macros

-
BOOST_MATH_INSTRUMENT_VARIABLE
-

Configuration Macros

-
BOOST_MATH_INT_TABLE_TYPE
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_INT_VALUE_SUFFIX
-

Configuration Macros

-
BOOST_MATH_MAX_POLY_ORDER
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_MAX_ROOT_ITERATION_POLICY
-
- - -

Iteration Limits Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_MAX_SERIES_ITERATION_POLICY
-
- - -

Iteration Limits Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
-

Configuration Macros

-
BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-
- - -

Compilers

Configuration Macros

-
BOOST_MATH_NO_REAL_CONCEPT_TESTS
-

Configuration Macros

-
BOOST_MATH_OVERFLOW_ERROR_POLICY
-
- - - - - - -

Changing the Policy Defaults

Compile Time Power of a Runtime Base

Error Handling Example

Geometric Distribution Examples

Negative Binomial Sales Quota Example.

Using Macros to Change the Policy Defaults

-
BOOST_MATH_POLE_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_POLY_METHOD
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_PROMOTE_DOUBLE_POLICY
-
- - -

Performance Tuning Macros

Using Macros to Change the Policy Defaults

-
BOOST_MATH_PROMOTE_FLOAT_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_RATIONAL_METHOD
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_ROUNDING_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_SMALL_CONSTANT
-

Configuration Macros

-
BOOST_MATH_STD_USING
-

Configuration Macros

-
BOOST_MATH_UNDERFLOW_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_USE_C99
-

Configuration Macros

- +
-F +F
-
+
diff --git a/doc/sf_and_dist/html/index/s16.html b/doc/sf_and_dist/html/index/s16.html index dde0572d0..b6118ef6a 100644 --- a/doc/sf_and_dist/html/index/s16.html +++ b/doc/sf_and_dist/html/index/s16.html @@ -23,2552 +23,4461 @@

-Index

-

A B C D E F G H I K L M N O P R S T U V W

+Index
+

A B C D E F G H I K L M N O P Q R S T U V W Z

-A +A
-
-
accuracy
-
- - - -

Additional Implementation Notes

Frequently Asked Questions FAQ

log1p

-
acosh
-
- - - - -

acosh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
acoshf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
acoshl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinh
-
- - - - -

asinh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinhf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
asinhl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
assert_undefined_type
-

Policy Class Reference

-
assoc_laguerre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_laguerref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_laguerrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
assoc_legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
atanh
-
- - - - -

atanh

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
atanhf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
atanhl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

- +
-B +B
-
-
bernoulli
-

Bernoulli Distribution

-
Bernoulli Distribution
-
- - - - -

bernoulli

bernoulli_distribution

policy_type

value_type

-
bernoulli_distribution
-

Bernoulli Distribution

-
Bessel Functions of the First and Second Kinds
-
- - -

cyl_bessel_j

cyl_neumann

-
Beta
-
- - -

beta

Lanczos approximation

-
beta
-
- - - - - - - - - -

Beta

Beta Distribution

Binomial Coefficients

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Incomplete Beta Functions

Noncentral Beta Distribution

The Incomplete Beta Function Inverses

TR1 C Functions Quick Reference

-
Beta Distribution
-
- - - - -

beta

beta_distribution

policy_type

value_type

-
betaf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
betal
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
beta_distribution
-

Beta Distribution

-
binomial
-

Binomial Distribution

-
Binomial Coefficients
-

beta

-
Binomial Distribution
-
- - - - -

binomial

binomial_distribution

policy_type

value_type

-
binomial_distribution
-

Binomial Distribution

-
BOOST_DEFINE_MATH_CONSTANT
-

Additional Implementation Notes

-
BOOST_FPU_EXCEPTION_GUARD
-

Configuration Macros

-
BOOST_HAS_LOG1P
-

log1p

-
BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC
-

Configuration Macros

-
BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC
-

Configuration Macros

-
BOOST_MATH_ASSERT_UNDEFINED_POLICY
-
- - - -

Changing the Policy Defaults

Mathematically Undefined Function Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
-

Configuration Macros

-
BOOST_MATH_CONTROL_FP
-

Configuration Macros

-
BOOST_MATH_DECLARE_DISTRIBUTIONS
-
- - -

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS
-
- - - -

Calling User Defined Error Handlers

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
BOOST_MATH_DENORM_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DIGITS10_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DISCRETE_QUANTILE_POLICY
-
- - - - -

Binomial Quiz Example

Geometric Distribution Examples

Negative Binomial Sales Quota Example.

Using Macros to Change the Policy Defaults

-
BOOST_MATH_DOMAIN_ERROR_POLICY
-
- - - - -

Additional Implementation Notes

Changing the Policy Defaults

Error Handling Example

Using Macros to Change the Policy Defaults

-
BOOST_MATH_EVALUATION_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE
-

Configuration Macros

-
BOOST_MATH_EXPLICIT_TEMPLATE_TYPE
-

Configuration Macros

-
BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_INSTRUMENT_CODE
-

Configuration Macros

-
BOOST_MATH_INSTRUMENT_FPU
-

Configuration Macros

-
BOOST_MATH_INSTRUMENT_VARIABLE
-

Configuration Macros

-
BOOST_MATH_INT_TABLE_TYPE
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_INT_VALUE_SUFFIX
-

Configuration Macros

-
BOOST_MATH_MAX_POLY_ORDER
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_MAX_ROOT_ITERATION_POLICY
-
- - -

Iteration Limits Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_MAX_SERIES_ITERATION_POLICY
-
- - -

Iteration Limits Policies

Using Macros to Change the Policy Defaults

-
BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
-

Configuration Macros

-
BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-
- - -

Compilers

Configuration Macros

-
BOOST_MATH_NO_REAL_CONCEPT_TESTS
-

Configuration Macros

-
BOOST_MATH_OVERFLOW_ERROR_POLICY
-
- - - - - - -

Changing the Policy Defaults

Compile Time Power of a Runtime Base

Error Handling Example

Geometric Distribution Examples

Negative Binomial Sales Quota Example.

Using Macros to Change the Policy Defaults

-
BOOST_MATH_POLE_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_POLY_METHOD
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_PROMOTE_DOUBLE_POLICY
-
- - -

Performance Tuning Macros

Using Macros to Change the Policy Defaults

-
BOOST_MATH_PROMOTE_FLOAT_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_RATIONAL_METHOD
-
- - -

Configuration Macros

Performance Tuning Macros

-
BOOST_MATH_ROUNDING_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_SMALL_CONSTANT
-

Configuration Macros

-
BOOST_MATH_STD_USING
-

Configuration Macros

-
BOOST_MATH_UNDERFLOW_ERROR_POLICY
-

Using Macros to Change the Policy Defaults

-
BOOST_MATH_USE_C99
-

Configuration Macros

-
+
-C +C
-
-
C99 and C++ TR1 C-style Functions
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

acosh

acoshf

acoshl

asinh

asinhf

asinhl

assoc_laguerre

assoc_laguerref

assoc_laguerrel

assoc_legendre

assoc_legendref

assoc_legendrel

atanh

atanhf

atanhl

beta

betaf

betal

cbrt

cbrtf

cbrtl

comp_ellint_1

comp_ellint_1f

comp_ellint_1l

conf_hyperg

conf_hypergf

conf_hypergl

copysign

copysignf

copysignl

cyl_bessel_i

cyl_bessel_if

cyl_bessel_il

cyl_bessel_j

cyl_bessel_jf

cyl_bessel_jl

cyl_bessel_k

cyl_bessel_kf

cyl_bessel_kl

cyl_neumann

cyl_neumannf

cyl_neumannl

double_t

ellint_1

ellint_1f

ellint_1l

ellint_2

ellint_2f

ellint_2l

ellint_3

ellint_3f

ellint_3l

erf

erfc

erfcf

erfcl

erff

erfl

exp2

exp2f

exp2l

expint

expintf

expintl

expm1

expm1f

expm1l

fdim

fdimf

fdiml

float_t

fma

fmaf

fmal

fmax

fmaxf

fmaxl

fmin

fminf

fminl

hermite

hermitef

hermitel

hyperg

hypergf

hypergl

hypot

hypotf

hypotl

ilogb

ilogbf

ilogbl

laguerre

laguerref

laguerrel

legendre

legendref

legendrel

lgamma

lgammaf

lgammal

llrint

llrintf

llrintl

llround

llroundf

llroundl

log1p

log1pf

log1pl

log2

log2f

log2l

logb

logbf

logbl

lrint

lrintf

lrintl

lround

lroundf

lroundl

nan

nanf

nanl

nearbyint

nearbyintf

nearbyintl

nextafter

nextafterf

nextafterl

nexttoward

nexttowardf

nexttowardl

remainder

remainderf

remainderl

remquo

remquof

remquol

riemann_zeta

riemann_zetaf

riemann_zetal

rint

rintf

rintl

round

roundf

roundl

scalbln

scalblnf

scalblnl

scalbn

scalbnf

scalbnl

sph_bessel

sph_besself

sph_bessell

sph_legendre

sph_legendref

sph_legendrel

sph_neumann

sph_neumannf

sph_neumannl

tgamma

tgammaf

tgammal

trunc

truncf

truncl

-
C99 and TR1 C Functions Overview
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

acosh

acoshf

acoshl

asinh

asinhf

asinhl

assoc_laguerre

assoc_laguerref

assoc_laguerrel

assoc_legendre

assoc_legendref

assoc_legendrel

atanh

atanhf

atanhl

beta

betaf

betal

cbrt

cbrtf

cbrtl

comp_ellint_1

comp_ellint_1f

comp_ellint_1l

conf_hyperg

conf_hypergf

conf_hypergl

copysign

copysignf

copysignl

cyl_bessel_i

cyl_bessel_if

cyl_bessel_il

cyl_bessel_j

cyl_bessel_jf

cyl_bessel_jl

cyl_bessel_k

cyl_bessel_kf

cyl_bessel_kl

cyl_neumann

cyl_neumannf

cyl_neumannl

double_t

ellint_1

ellint_1f

ellint_1l

ellint_2

ellint_2f

ellint_2l

ellint_3

ellint_3f

ellint_3l

erf

erfc

erfcf

erfcl

erff

erfl

exp2

exp2f

exp2l

expint

expintf

expintl

expm1

expm1f

expm1l

fdim

fdimf

fdiml

float_t

fma

fmaf

fmal

fmax

fmaxf

fmaxl

fmin

fminf

fminl

hermite

hermitef

hermitel

hyperg

hypergf

hypergl

hypot

hypotf

hypotl

ilogb

ilogbf

ilogbl

laguerre

laguerref

laguerrel

legendre

legendref

legendrel

lgamma

lgammaf

lgammal

llrint

llrintf

llrintl

llround

llroundf

llroundl

log1p

log1pf

log1pl

log2

log2f

log2l

logb

logbf

logbl

lrint

lrintf

lrintl

lround

lroundf

lroundl

nan

nanf

nanl

nearbyint

nearbyintf

nearbyintl

nextafter

nextafterf

nextafterl

nexttoward

nexttowardf

nexttowardl

remainder

remainderf

remainderl

remquo

remquof

remquol

riemann_zeta

riemann_zetaf

riemann_zetal

rint

rintf

rintl

round

roundf

roundl

scalbln

scalblnf

scalblnl

scalbn

scalbnf

scalbnl

sph_bessel

sph_besself

sph_bessell

sph_legendre

sph_legendref

sph_legendrel

sph_neumann

sph_neumannf

sph_neumannl

tgamma

tgammaf

tgammal

trunc

truncf

truncl

-
C99 C Functions
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

acosh

acoshf

acoshl

asinh

asinhf

asinhl

atanh

atanhf

atanhl

cbrt

cbrtf

cbrtl

copysign

copysignf

copysignl

double_t

erf

erfc

erfcf

erfcl

erff

erfl

expm1

expm1f

expm1l

float_t

fmax

fmaxf

fmaxl

fmin

fminf

fminl

hypot

hypotf

hypotl

lgamma

lgammaf

lgammal

llround

llroundf

llroundl

log1p

log1pf

log1pl

lround

lroundf

lroundl

nextafter

nextafterf

nextafterl

nexttoward

nexttowardf

nexttowardl

round

roundf

roundl

tgamma

tgammaf

tgammal

trunc

truncf

truncl

-
Calling User Defined Error Handlers
-
- - - -

BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS

promote_args

tgamma

-
cauchy
-
- - - - - -

Cauchy-Lorentz Distribution

Find Location (Mean) Example

Find mean and standard deviation example

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
Cauchy-Lorentz Distribution
-
- - - - -

cauchy

cauchy_distribution

policy_type

value_type

-
cauchy_distribution
-

Cauchy-Lorentz Distribution

-
cbrt
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

cbrt

Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder

-
cbrtf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
cbrtl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
changesign
-

Sign Manipulation Functions

-
Changing the Policy Defaults
-
- - - -

BOOST_MATH_ASSERT_UNDEFINED_POLICY

BOOST_MATH_DOMAIN_ERROR_POLICY

BOOST_MATH_OVERFLOW_ERROR_POLICY

-
Changing the Policy on an Ad Hoc Basis for the Special Functions
-

tgamma

-
Chi Squared Distribution
-
- - - - -

chi_squared

chi_squared_distribution

policy_type

value_type

-
chi_squared
-

Chi Squared Distribution

-
chi_squared_distribution
-

Chi Squared Distribution

-
Compile Time Power of a Runtime Base
-
- - -

BOOST_MATH_OVERFLOW_ERROR_POLICY

log2

-
Compilers
-

BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS

-
comp_ellint_1
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
comp_ellint_1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
comp_ellint_1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
Conceptual Requirements for Real Number Types
-
- - - -

Lanczos approximation

round

trunc

-
Configuration Macros
-
- - - - - - - - - - - - - - - - - - - - - -

BOOST_FPU_EXCEPTION_GUARD

BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC

BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC

BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS

BOOST_MATH_CONTROL_FP

BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE

BOOST_MATH_EXPLICIT_TEMPLATE_TYPE

BOOST_MATH_INSTRUMENT_CODE

BOOST_MATH_INSTRUMENT_FPU

BOOST_MATH_INSTRUMENT_VARIABLE

BOOST_MATH_INT_TABLE_TYPE

BOOST_MATH_INT_VALUE_SUFFIX

BOOST_MATH_MAX_POLY_ORDER

BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS

BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS

BOOST_MATH_NO_REAL_CONCEPT_TESTS

BOOST_MATH_POLY_METHOD

BOOST_MATH_RATIONAL_METHOD

BOOST_MATH_SMALL_CONSTANT

BOOST_MATH_STD_USING

BOOST_MATH_USE_C99

-
conf_hyperg
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
conf_hypergf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
conf_hypergl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
copysign
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Sign Manipulation Functions

-
copysignf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
copysignl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
cyl_bessel_i
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Modified Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
cyl_bessel_if
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_il
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_j
-
- - - - -

Bessel Functions of the First and Second Kinds

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_jf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_jl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_k
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Modified Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
cyl_bessel_kf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_bessel_kl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumann
-
- - - - -

Bessel Functions of the First and Second Kinds

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumannf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
cyl_neumannl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
+
-D +D
-
+
-E +E
-
-
ellint_1
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the First Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_2
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the Second Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_2f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_2l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_3
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Elliptic Integrals of the Third Kind - Legendre Form

TR1 C Functions Quick Reference

-
ellint_3f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
ellint_3l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
Elliptic Integrals of the First Kind - Legendre Form
-

ellint_1

-
Elliptic Integrals of the Second Kind - Legendre Form
-

ellint_2

-
Elliptic Integrals of the Third Kind - Legendre Form
-

ellint_3

-
eps_tolerance
-

Root Finding Without Derivatives: Bisection, Bracket and TOMS748

-
equal_ceil
-

Root Finding Without Derivatives: Bisection, Bracket and TOMS748

-
equal_floor
-

Root Finding Without Derivatives: Bisection, Bracket and TOMS748

-
equal_nearest_integer
-

Root Finding Without Derivatives: Bisection, Bracket and TOMS748

-
erf
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Error Functions

-
erfc
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Error Functions

Normal (Gaussian) Distribution

-
erfcf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erfcl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erff
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
erfl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
Error Functions
-
- - -

erf

erfc

-
evaluation_error_type
-

Policy Class Reference

-
Examples
-
- - - - - - -

BOOST_MATH_DISCRETE_QUANTILE_POLICY

BOOST_MATH_DOMAIN_ERROR_POLICY

BOOST_MATH_OVERFLOW_ERROR_POLICY

cauchy

negative_binomial

normal

-
exp2
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
exp2f
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
exp2l
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
expint
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Exponential Integral Ei

Exponential Integral En

TR1 C Functions Quick Reference

-
expintf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
expintl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
expm1
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

expm1

-
expm1f
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
expm1l
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
exponential
-

Exponential Distribution

-
Exponential Distribution
-
- - - - -

exponential

exponential_distribution

policy_type

value_type

-
Exponential Integral Ei
-

expint

-
Exponential Integral En
-

expint

-
exponential_distribution
-

Exponential Distribution

-
Extreme Value Distribution
-
- - - -

extreme_value

extreme_value_distribution

value_type

-
extreme_value
-

Extreme Value Distribution

-
extreme_value_distribution
-

Extreme Value Distribution

-
+
-F +F
-
-
F Distribution
-
- - - -

fisher_f

fisher_f_distribution

value_type

-
Facets for Floating-Point Infinities and NaNs
-
- - -

nonfinite_num_get

nonfinite_num_put

-
Factorial
-

max_factorial

-
fdim
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
fdimf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
fdiml
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
Finding the Next Representable Value in a Specific Direction (nextafter)
-

nextafter

-
fisher_f
-
- - -

F Distribution

Setting Policies for Distributions on an Ad Hoc Basis

-
fisher_f_distribution
-

F Distribution

-
Floating-Point Classification: Infinities and NaNs
-
- - - - - - - - - - -

fpclassify

FP_INFINITE

FP_NAN

FP_NORMAL

FP_SUBNORMAL

FP_ZERO

isfinite

isinf

isnan

isnormal

-
float_t
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fma
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
fmaf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
fmal
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
fmax
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fmaxf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fmaxl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fmin
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fminf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fminl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
fpclassify
-

Floating-Point Classification: Infinities and NaNs

-
FP_INFINITE
-

Floating-Point Classification: Infinities and NaNs

-
FP_NAN
-

Floating-Point Classification: Infinities and NaNs

-
FP_NORMAL
-

Floating-Point Classification: Infinities and NaNs

-
FP_SUBNORMAL
-

Floating-Point Classification: Infinities and NaNs

-
FP_ZERO
-

Floating-Point Classification: Infinities and NaNs

-
Frequently Asked Questions FAQ
-

accuracy

-
+
-G +G
-
-
Gamma
-
- - -

Lanczos approximation

tgamma

-
gamma
-
- - - -

Gamma (and Erlang) Distribution

Inverse Gamma Distribution

Setting Policies at Namespace or Translation Unit Scope

-
Gamma (and Erlang) Distribution
-
- - - - -

gamma

gamma_distribution

policy_type

value_type

-
gamma_distribution
-

Gamma (and Erlang) Distribution

-
geometric
-

Geometric Distribution

-
Geometric Distribution
-
- - - - -

geometric

geometric_distribution

policy_type

value_type

-
geometric_distribution
-

Geometric Distribution

-
Graphing, Profiling, and Generating Test Data for Special Functions
-
- - - -

test_data

upper_incomplete_gamma_fract

value_type

-
+
-H +H
-
+
-I +I
-
-
ilogb
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
ilogbf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
ilogbl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
Implementation Notes
-
- - - - -

accuracy

BOOST_DEFINE_MATH_CONSTANT

BOOST_MATH_DOMAIN_ERROR_POLICY

triangular_distribution

-
Incomplete Beta Function Inverses
-

beta

-
Incomplete Beta Functions
-

beta

-
Incomplete Gamma Functions
-
- - -

Lanczos approximation

tgamma

-
indeterminate_result_error_type
-

Policy Class Reference

-
Introduction
-

nan

-
Inverse Chi Squared Distribution
-
- - - - -

inverse_chi_squared

inverse_chi_squared_distribution

policy_type

value_type

-
Inverse Gamma Distribution
-
- - - - -

gamma

inverse_gamma_distribution

policy_type

value_type

-
Inverse Gaussian (or Inverse Normal) Distribution
-
- - - - -

inverse_gaussian

inverse_gaussian_distribution

policy_type

value_type

-
inverse_chi_squared
-

Inverse Chi Squared Distribution

-
inverse_chi_squared_distribution
-

Inverse Chi Squared Distribution

-
inverse_gamma_distribution
-

Inverse Gamma Distribution

-
inverse_gaussian
-

Inverse Gaussian (or Inverse Normal) Distribution

-
inverse_gaussian_distribution
-

Inverse Gaussian (or Inverse Normal) Distribution

-
isfinite
-

Floating-Point Classification: Infinities and NaNs

-
isinf
-

Floating-Point Classification: Infinities and NaNs

-
isnan
-

Floating-Point Classification: Infinities and NaNs

-
isnormal
-

Floating-Point Classification: Infinities and NaNs

-
Iteration Limits Policies
-
- - -

BOOST_MATH_MAX_ROOT_ITERATION_POLICY

BOOST_MATH_MAX_SERIES_ITERATION_POLICY

-
+
-K +K
-
-
Known Issues, and TODO List
-

Lanczos approximation

-
+
-L +L
-
-
laguerre
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Laguerre (and Associated) Polynomials

TR1 C Functions Quick Reference

-
Laguerre (and Associated) Polynomials
-

laguerre

-
laguerref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
laguerrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
Lanczos approximation
-
- - - - - - - - - - - - - - - - -

Beta

Conceptual Requirements for Real Number Types

Digamma

Gamma

History and What's New

Hypergeometric Distribution

Incomplete Gamma Functions

Known Issues, and TODO List

Lanczos approximation

Log Gamma

Negative Binomial Distribution

Performance Tuning Macros

References

The Lanczos Approximation

Using With MPFR / GMP - a High-Precision Floating-Point Library

Using With NTL - a High-Precision Floating-Point Library

-
laplace
-

Laplace Distribution

-
Laplace Distribution
-
- - - - -

laplace

laplace_distribution

policy_type

value_type

-
laplace_distribution
-

Laplace Distribution

-
legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
lgamma
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Log Gamma

Setting Polices at Namespace Scope

-
lgammaf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
lgammal
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
llrint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llrintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llrintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
llround
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Rounding Functions

-
llroundf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
llroundl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
Log Gamma
-
- - - -

Lanczos approximation

lgamma

tgamma

-
Log Normal Distribution
-
- - - - -

lognormal

lognormal_distribution

policy_type

value_type

-
log1p
-
- - - - - - - -

accuracy

BOOST_HAS_LOG1P

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

log1p

Series Evaluation

-
log1pf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
log1pl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
log1p_series
-

Series Evaluation

-
log2
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Compile Time Power of a Runtime Base

-
log2f
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
log2l
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logb
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logbf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logbl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
logistic
-

Logistic Distribution

-
Logistic Distribution
-
- - - - -

logistic

logistic_distribution

policy_type

value_type

-
logistic_distribution
-

Logistic Distribution

-
lognormal
-

Log Normal Distribution

-
lognormal_distribution
-

Log Normal Distribution

-
lrint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lrintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lrintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
lround
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Rounding Functions

-
lroundf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
lroundl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
-M +M
-
-
Mathematically Undefined Function Policies
-

BOOST_MATH_ASSERT_UNDEFINED_POLICY

-
max_factorial
-

Factorial

-
Modified Bessel Functions of the First and Second Kinds
-
- - -

cyl_bessel_i

cyl_bessel_k

-
+
-N +N
-
-
Namespaces
-

students_t

-
nan
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Introduction

Reference

-
nanf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
nanl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
nearbyint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
nearbyintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
nearbyintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
Negative Binomial Distribution
-
- - - - - -

Lanczos approximation

negative_binomial

negative_binomial_distribution

policy_type

value_type

-
negative_binomial
-
- - -

Distribution Construction Example

Negative Binomial Distribution

-
negative_binomial_distribution
-

Negative Binomial Distribution

-
nextafter
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Finding the Next Representable Value in a Specific Direction (nextafter)

-
nextafterf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
nextafterl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
nexttoward
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
nexttowardf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
nexttowardl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
Noncentral Beta Distribution
-
- - - - - -

beta

non_central_beta

non_central_beta_distribution

policy_type

value_type

-
Noncentral Chi-Squared Distribution
-
- - - - -

non_central_chi_squared

non_central_chi_squared_distribution

policy_type

value_type

-
Noncentral F Distribution
-
- - - - -

non_central_f

non_central_f_distribution

policy_type

value_type

-
Noncentral T Distribution
-
- - - - -

non_central_t

non_central_t_distribution

policy_type

value_type

-
nonfinite_num_get
-

Facets for Floating-Point Infinities and NaNs

-
nonfinite_num_put
-

Facets for Floating-Point Infinities and NaNs

-
non_central_beta
-

Noncentral Beta Distribution

-
non_central_beta_distribution
-

Noncentral Beta Distribution

-
non_central_chi_squared
-

Noncentral Chi-Squared Distribution

-
non_central_chi_squared_distribution
-

Noncentral Chi-Squared Distribution

-
non_central_f
-

Noncentral F Distribution

-
non_central_f_distribution
-

Noncentral F Distribution

-
non_central_t
-

Noncentral T Distribution

-
non_central_t_distribution
-

Noncentral T Distribution

-
normal
-
- - - -

Geometric Distribution Examples

Normal (Gaussian) Distribution

Setting Policies at Namespace or Translation Unit Scope

-
Normal (Gaussian) Distribution
-
- - - - - -

erfc

normal

normal_distribution

policy_type

value_type

-
normalise
-

Policy Class Reference

-
normal_distribution
-

Normal (Gaussian) Distribution

-
+
-O +O
-
-
overflow_error_type
-

Policy Class Reference

-
+
-P +P
-
-
pareto
-

Pareto Distribution

-
Pareto Distribution
-
- - - -

pareto

pareto_distribution

value_type

-
pareto_distribution
-

Pareto Distribution

-
Performance Tuning Macros
-
- - - - - - -

BOOST_MATH_INT_TABLE_TYPE

BOOST_MATH_MAX_POLY_ORDER

BOOST_MATH_POLY_METHOD

BOOST_MATH_PROMOTE_DOUBLE_POLICY

BOOST_MATH_RATIONAL_METHOD

Lanczos approximation

-
poisson
-

Poisson Distribution

-
Poisson Distribution
-
- - - - -

poisson

poisson_distribution

policy_type

value_type

-
poisson_distribution
-

Poisson Distribution

-
pole_error_type
-

Policy Class Reference

-
Policy Class Reference
-
- - - - - - - - - - - - - - - -

assert_undefined_type

default_policy

denorm_error_type

discrete_quantile_type

domain_error_type

evaluation_error_type

indeterminate_result_error_type

normalise

overflow_error_type

pole_error_type

precision_type

promote_double_type

promote_float_type

rounding_error_type

underflow_error_type

-
policy_type
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -

Bernoulli Distribution

Beta Distribution

Binomial Distribution

Cauchy-Lorentz Distribution

Chi Squared Distribution

Exponential Distribution

Gamma (and Erlang) Distribution

Geometric Distribution

Hypergeometric Distribution

Inverse Chi Squared Distribution

Inverse Gamma Distribution

Inverse Gaussian (or Inverse Normal) Distribution

Laplace Distribution

Log Normal Distribution

Logistic Distribution

Negative Binomial Distribution

Noncentral Beta Distribution

Noncentral Chi-Squared Distribution

Noncentral F Distribution

Noncentral T Distribution

Normal (Gaussian) Distribution

Poisson Distribution

Rayleigh Distribution

Students t Distribution

Triangular Distribution

Weibull Distribution

-
Polynomials
-

value_type

-
precision_type
-

Policy Class Reference

-
promote_args
-
- - -

Calling User Defined Error Handlers

Setting Policies at Namespace or Translation Unit Scope

-
promote_double_type
-

Policy Class Reference

-
promote_float_type
-

Policy Class Reference

-
+
-R +Q
-
-
rayleigh
-

Rayleigh Distribution

-
Rayleigh Distribution
-
- - - - -

policy_type

rayleigh

rayleigh_distribution

value_type

-
rayleigh_distribution
-

Rayleigh Distribution

-
Reference
-

nan

-
References
-

Lanczos approximation

-
remainder
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
remainderf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
remainderl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
remquo
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
remquof
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
remquol
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
riemann_zeta
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
riemann_zetaf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
riemann_zetal
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
rint
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
rintf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
rintl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder
-

cbrt

-
Root Finding Without Derivatives: Bisection, Bracket and TOMS748
-
- - - - -

eps_tolerance

equal_ceil

equal_floor

equal_nearest_integer

-
round
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Conceptual Requirements for Real Number Types

Rounding Functions

-
roundf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
Rounding Functions
-
- - - -

llround

lround

round

-
rounding_error_type
-

Policy Class Reference

-
roundl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
-S +R
-
-
scalbln
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalblnf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalblnl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbn
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbnf
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
scalbnl
-
- - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

-
Series Evaluation
-
- - -

log1p

log1p_series

-
Setting Polices at Namespace Scope
-
- - - - - -

BOOST_MATH_DECLARE_DISTRIBUTIONS

BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS

cauchy

lgamma

tgamma

-
Setting Policies at Namespace or Translation Unit Scope
-
- - - - - - - -

BOOST_MATH_DECLARE_DISTRIBUTIONS

BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS

cauchy

gamma

normal

promote_args

tgamma

-
Setting Policies for Distributions on an Ad Hoc Basis
-

fisher_f

-
sign
-

Sign Manipulation Functions

-
Sign Manipulation Functions
-
- - - - -

changesign

copysign

sign

signbit

-
signbit
-

Sign Manipulation Functions

-
Spherical Bessel Functions of the First and Second Kinds
-
- - -

sph_bessel

sph_neumann

-
sph_bessel
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Spherical Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
sph_besself
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_bessell
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendre
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendref
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_legendrel
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_neumann
-
- - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

Spherical Bessel Functions of the First and Second Kinds

TR1 C Functions Quick Reference

-
sph_neumannf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
sph_neumannl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

TR1 C Functions Quick Reference

-
Students t Distribution
-
- - - - -

policy_type

students_t

students_t_distribution

value_type

-
students_t
-
- - -

Namespaces

Students t Distribution

-
students_t_distribution
-

Students t Distribution

-
+
-T +S
-
-
test_data
-

Graphing, Profiling, and Generating Test Data for Special Functions

-
tgamma
-
- - - - - - - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Calling User Defined Error Handlers

Changing the Policy on an Ad Hoc Basis for the Special Functions

Gamma

Incomplete Gamma Functions

Log Gamma

Setting Polices at Namespace Scope

Setting Policies at Namespace or Translation Unit Scope

-
tgammaf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
tgammal
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
TR1 C Functions Quick Reference
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

assoc_laguerre

assoc_laguerref

assoc_laguerrel

assoc_legendre

assoc_legendref

assoc_legendrel

beta

betaf

betal

comp_ellint_1

comp_ellint_1f

comp_ellint_1l

conf_hyperg

conf_hypergf

conf_hypergl

cyl_bessel_i

cyl_bessel_if

cyl_bessel_il

cyl_bessel_j

cyl_bessel_jf

cyl_bessel_jl

cyl_bessel_k

cyl_bessel_kf

cyl_bessel_kl

cyl_neumann

cyl_neumannf

cyl_neumannl

ellint_1

ellint_1f

ellint_1l

ellint_2

ellint_2f

ellint_2l

ellint_3

ellint_3f

ellint_3l

expint

expintf

expintl

hermite

hermitef

hermitel

hyperg

hypergf

hypergl

laguerre

laguerref

laguerrel

legendre

legendref

legendrel

riemann_zeta

riemann_zetaf

riemann_zetal

sph_bessel

sph_besself

sph_bessell

sph_legendre

sph_legendref

sph_legendrel

sph_neumann

sph_neumannf

sph_neumannl

-
triangular
-

Triangular Distribution

-
Triangular Distribution
-
- - - - -

policy_type

triangular

triangular_distribution

value_type

-
triangular_distribution
-
- - -

Additional Implementation Notes

Triangular Distribution

-
trunc
-
- - - - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

Conceptual Requirements for Real Number Types

Truncation Functions

-
Truncation Functions
-

trunc

-
truncf
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
truncl
-
- - - -

C99 and C++ TR1 C-style Functions

C99 and TR1 C Functions Overview

C99 C Functions

-
+
-U +T
-
+
-V +U
-
+
-W +V
-
-
weibull
-

Weibull Distribution

-
Weibull Distribution
-
- - - - -

policy_type

value_type

weibull

weibull_distribution

-
weibull_distribution
-

Weibull Distribution

-
+
+
+W +
+
+
+Z +
+
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html index 9503ca873..19c674afe 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html @@ -33,7 +33,7 @@ and reflect more the general implementation philosophy used.

- + Implemention philosophy
@@ -85,7 +85,7 @@ These could still provide sufficient accuracy for some speed-critical applications.

- + Accuracy and Representation of Test Values
@@ -130,7 +130,7 @@ binary value).

- + Tolerance of Tests
@@ -156,7 +156,7 @@ first that the suffix L is present, and then that the tolerance is big enough.

- + Handling Unsuitable Arguments
@@ -224,7 +224,7 @@

- + Handling of Functions that are Not Mathematically defined
@@ -258,7 +258,7 @@

- + Median of distributions
@@ -293,7 +293,7 @@ Basic Statistics. give more detail, in particular for discrete distributions.

- + Handling of Floating-Point Infinity
@@ -337,7 +337,7 @@ handling policies.

- + Scale, Shape and Location
@@ -364,7 +364,7 @@ functions, they can be added if required.

- + Notes on Implementation of Specific Functions & Distributions
@@ -376,7 +376,7 @@ lower = -1, mode = 0 and upper = 1 would be more suitable.
- + Rational Approximations Used
@@ -419,7 +419,7 @@ to the "true" minimax solution.

- + Representation of Mathematical Constants
@@ -480,7 +480,7 @@ double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function
- + Thread safety
@@ -505,7 +505,7 @@ the right thing here at some point.

- + Sources of Test Data
@@ -546,7 +546,7 @@ the underlying special function is known to be difficult to implement.

- + Creating and Managing the Equations
@@ -731,7 +731,7 @@ done HTML: this needs further investigation.

- + Producing Graphs
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html index d29f2e20b..546ca6a28 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html @@ -27,7 +27,7 @@ The Lanczos Approximation
- + Motivation

@@ -99,7 +99,7 @@ functions divided by large powers into single (simpler) expressions.

- + The Approximation
@@ -161,7 +161,7 @@

- + Computing the Coefficients
@@ -205,7 +205,7 @@ multiplied by F as the last step.

- + Choosing the Right Parameters
@@ -535,7 +535,7 @@ is exact, and so isn't used for the gamma function.

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html index b74723671..03027ba6b 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html @@ -27,7 +27,7 @@ References
- + General references
@@ -98,7 +98,7 @@ Library (version 2), Walter E. Brown

- + Calculators

@@ -120,7 +120,7 @@ Binomial Probability Distribution Calculator.

- + Other Libraries

diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html index e2e2caaf7..5b0f742a5 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html @@ -78,7 +78,7 @@ of binary digits. You have been warned!

- + The Impossibility of Zero Error
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html index 50b38fb3a..2f180a04a 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html @@ -94,7 +94,7 @@ are located!

- + The Remez Method
@@ -174,7 +174,7 @@
- + Remez Step 1
@@ -205,7 +205,7 @@ to 5.6x10-4.

- + Remez Step 2
@@ -234,7 +234,7 @@ In our example we perform multi-point exchange.

- + Iteration

@@ -250,7 +250,7 @@ remez-4

- + Rational Approximations
@@ -299,7 +299,7 @@ number of terms overall.

- + Practical Considerations
@@ -407,7 +407,7 @@ desired minimax solution (5x10-4).

- + Remez Method Checklist
@@ -461,7 +461,7 @@
- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist.html b/doc/sf_and_dist/html/math_toolkit/dist.html index a97c7ccd1..ab5eb8ba6 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist.html @@ -38,7 +38,7 @@ are Objects

Generic operations common to all distributions are non-member functions
-
Complements +
Complements are supported too - and when to use them
Parameters can be calculated
@@ -106,10 +106,12 @@ Distribution Examples
Some Miscellaneous Examples of the Normal (Gaussian) Distribution
+
Inverse + Chi-Squared Distribution Bayes Example
Non Central Chi Squared Example
Tables - of the power function of the χ2 test.
+ of the power function of the chi2 test.
Error Handling Example
Find Location diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html index f1b07b2fc..66d061229 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html @@ -28,7 +28,7 @@ Algorithms
- + Finding the Location and Scale for Normal and similar distributions
@@ -50,7 +50,7 @@
using boost::math::complement; // Will be needed by users who want to use complements.
- + find_location function
@@ -80,7 +80,7 @@ }} // namespaces
- + find_scale function
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html index 15ac17e7d..7cd3d4c49 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html @@ -87,7 +87,7 @@

- + Member Functions
@@ -103,7 +103,7 @@ Returns the success_fraction parameter of this distribution.

- + Non-member Accessors
@@ -128,7 +128,7 @@ exception and make an error message available.

- + Accuracy

@@ -136,7 +136,7 @@ and so should have errors within an epsilon or two.

- + Implementation

@@ -327,7 +327,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html index 3485abed7..be7e501d3 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html @@ -132,12 +132,12 @@ whose apex is away from the centre (where x = half).

    - + Member Functions
    - + Constructor
    beta_distribution(RealType alpha, RealType beta);
    @@ -164,7 +164,7 @@
                 yellow in the graph above).
               

    - + Parameter Accessors
    @@ -188,7 +188,7 @@ assert(mybeta.beta() == 5.); // mybeta.beta() returns 5
    - + Parameter Estimators
    @@ -241,7 +241,7 @@ Returns the value of β   that gives: cdf(beta_distribution<RealType>(alpha, beta), x) == probability.

    - + Non-member Accessor Functions
    @@ -263,7 +263,7 @@ Mathworld.

    - + Applications

    @@ -276,7 +276,7 @@ statistical inference.

    - + Related distributions
    @@ -303,7 +303,7 @@ Distribution with its p parameter set to x.

    - + Accuracy

    @@ -315,7 +315,7 @@ please refer to these functions for information on accuracy.

    - + Implementation

    @@ -594,7 +594,7 @@

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html index 1973c364c..126139994 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html @@ -161,12 +161,12 @@

- + Member Functions
- + Construct
binomial_distribution(RealType n, RealType p);
@@ -183,7 +183,7 @@
             otherwise calls domain_error.
           

- + Accessors
RealType success_fraction() const;
@@ -199,7 +199,7 @@
             was constructed.
           

- + Lower Bound on the Success Fraction
@@ -305,7 +305,7 @@ limits illustrated in the case of the binomial. Biometrika 26 404-413.

- + Upper Bound on the Success Fraction
@@ -383,7 +383,7 @@
- + Estimating the Number of Trials Required for a Certain Number of Successes
@@ -425,7 +425,7 @@ of seeing 10 events that occur with frequency one half.

- + Estimating the Maximum Number of Trials to Ensure no more than a Certain Number of Successes @@ -473,7 +473,7 @@ Worked Example.

- + Non-member Accessors
@@ -622,7 +622,7 @@
- + Examples

@@ -630,7 +630,7 @@ examples are available illustrating the use of the binomial distribution.

- + Accuracy

@@ -640,7 +640,7 @@ please refer to these functions for information on accuracy.

- + Implementation

@@ -884,7 +884,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html index 010654627..e4990a1f0 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -114,7 +114,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -148,7 +148,7 @@ The domain of the random variable is [-[max_value], +[min_value]].

    - + Accuracy

    @@ -157,7 +157,7 @@ have very low error rates.

    - + Implementation

    @@ -273,7 +273,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html index 25e1a6c27..c8a221fe1 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html @@ -87,7 +87,7 @@ independent, normally distributed random

    - + Member Functions
    @@ -170,7 +170,7 @@ independent, normally distributed random NIST Engineering Statistics Handbook, Section 7.2.3.2.

    - + Non-member Accessors
    @@ -196,7 +196,7 @@ independent, normally distributed random The domain of the random variable is [0, +∞].

    - + Examples

    @@ -204,7 +204,7 @@ independent, normally distributed random are available illustrating the use of the Chi Squared Distribution.

    - + Accuracy

    @@ -212,7 +212,7 @@ independent, normally distributed random gamma functions: please refer to the accuracy data for those functions.

    - + Implementation

    @@ -379,7 +379,7 @@ independent, normally distributed random

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html index 085abbf90..4b4f17712 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html @@ -71,7 +71,7 @@

    - + Member Functions
    @@ -91,7 +91,7 @@ Accessor function returns the lambda parameter of the distribution.

    - + Non-member Accessors
    @@ -111,7 +111,7 @@ The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -122,7 +122,7 @@ should have very low error rates.

    - + Implementation

    @@ -283,7 +283,7 @@

- + references
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html index 4612ad54c..8d3186d10 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html @@ -100,7 +100,7 @@

    - + Member Functions
    @@ -125,7 +125,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -145,7 +145,7 @@ The domain of the random parameter is [-∞, +∞].

    - + Accuracy

    @@ -154,7 +154,7 @@ very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html index 17de4917e..e730c6d17 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html @@ -80,7 +80,7 @@

    - + Member Functions
    @@ -106,7 +106,7 @@ Returns the denominator degrees of freedom parameter of the distribution.

    - + Non-member Accessors
    @@ -126,7 +126,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -134,7 +134,7 @@ are available illustrating the use of the F Distribution.

    - + Accuracy

    @@ -143,7 +143,7 @@ refer to those functions for accuracy data.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html index 559e95cbc..de1ae5980 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html @@ -137,7 +137,7 @@ than a dedicated Erlang Distribution.

    - + Member Functions
    @@ -162,7 +162,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -182,7 +182,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -194,7 +194,7 @@ refer to the accuracy data for those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html index 89fff8778..1090a4337 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html @@ -146,7 +146,7 @@

    - + Related Distributions
    @@ -206,12 +206,12 @@
- + Member Functions
- + Constructor
geometric_distribution(RealType p);
@@ -226,7 +226,7 @@
             1.
           

- + Accessors
RealType success_fraction() const; // successes / trials (0 <= p <= 1)
@@ -253,7 +253,7 @@
             Binomial Distribution for more discussion.
           

- + Lower Bound on success_fraction Parameter p
@@ -308,7 +308,7 @@ vol. 48, no3, 605-621.

- + Upper Bound on success_fraction Parameter p
@@ -363,7 +363,7 @@ vol. 48, no3, 605-621.

- + Estimating Number of Trials to Ensure at Least a Certain Number of Failures
@@ -415,7 +415,7 @@ probability of observing k failures or fewer.

- + Estimating Number of Trials to Ensure a Maximum Number of Failures or Less
@@ -463,7 +463,7 @@ probability of observing more than k failures.

- + Non-member Accessors
@@ -611,7 +611,7 @@
- + Accuracy

@@ -622,7 +622,7 @@ for example to 10 decimal digits (from 16).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/hypergeometric_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/hypergeometric_dist.html index 0a586f7ab..c61abc2e4 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/hypergeometric_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/hypergeometric_dist.html @@ -102,7 +102,7 @@

- + Member Functions
@@ -131,7 +131,7 @@ from the population N.

- + Non-member Accessors
@@ -185,7 +185,7 @@
- + Accuracy

@@ -211,7 +211,7 @@ meaningless for N >= 1015.

- + Testing

@@ -223,7 +223,7 @@ this implementation and NTL::RR.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_chi_squared_dist.html index dd15e5f6a..c1d81c88b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_chi_squared_dist.html @@ -198,7 +198,7 @@

- + Member Functions
@@ -225,7 +225,7 @@ Returns the scale ξ parameter of this distribution.

- + Non-member Accessors
@@ -255,7 +255,7 @@

- + Accuracy

@@ -271,7 +271,7 @@ iteration is involved, as for the estimation of degrees of freedom.

- + Implementation

@@ -452,7 +452,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gamma_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gamma_dist.html index abaa38cf1..3ba29e37f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gamma_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gamma_dist.html @@ -130,7 +130,7 @@

    - + Member Functions
    @@ -154,7 +154,7 @@ Returns the β scale parameter of this inverse gamma distribution.

    - + Non-member Accessors
    @@ -184,7 +184,7 @@

- + Accuracy

@@ -198,7 +198,7 @@ >14 decimal digits accuracy for 64-bit double.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html index e8fcb2c8c..414504f3d 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html @@ -146,7 +146,7 @@ the __wald_distrib (where mean μ is unity) is also provided.

- + Member Functions
@@ -171,7 +171,7 @@ Returns the scale λ parameter of this distribution.

- + Non-member Accessors
@@ -201,7 +201,7 @@

- + Accuracy

@@ -212,7 +212,7 @@ to a few epsilon, >14 decimal digits accuracy for 64-bit double.

- + Implementation

@@ -390,7 +390,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/laplace_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/laplace_dist.html index c064fba5e..eb21847d8 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/laplace_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/laplace_dist.html @@ -81,7 +81,7 @@

    - + Member Functions
    @@ -113,7 +113,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -133,7 +133,7 @@ The domain of the random variable is [-∞,+∞].

    - + Accuracy

    @@ -141,7 +141,7 @@ log and exp functions and as such should have very small errors.

    - + Implementation

    @@ -329,7 +329,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/logistic_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/logistic_dist.html index e5f34f7b0..b204d2aba 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/logistic_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/logistic_dist.html @@ -72,7 +72,7 @@

    - + Member Functions
    @@ -98,7 +98,7 @@ Returns the scale of this distribution.

    - + Non-member Accessors
    @@ -128,7 +128,7 @@ as special cases if RealType and +overflow_error respectively.

    - + Accuracy

    @@ -140,7 +140,7 @@ as special cases if RealType error can be guarenteed.

    - + Implementation
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html index c29a89d40..adc910c56 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -121,7 +121,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -141,7 +141,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -150,7 +150,7 @@ function, and as such should have very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html index 7fd4c5e6c..92a083164 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html @@ -96,7 +96,7 @@ is a central χ2 random variable with

    - + Member Functions
    @@ -128,7 +128,7 @@ is a central χ2 random variable with was constructed.

    - + Non-member Accessors
    @@ -156,7 +156,7 @@ is a central χ2 random variable with The domain of the random variable is [0, 1].

    - + Accuracy

    @@ -299,7 +299,7 @@ is a central χ2 random variable with functions are broadly similar.

    - + Tests

    @@ -311,7 +311,7 @@ is a central χ2 random variable with tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html index dbc6a232a..315b40af1 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html @@ -110,7 +110,7 @@

    - + Member Functions
    @@ -183,7 +183,7 @@ == q.

    - + Non-member Accessors
    @@ -203,7 +203,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -211,7 +211,7 @@ example for the noncentral chi-squared distribution.

    - + Accuracy

    @@ -359,7 +359,7 @@ produce an accuracy greater than the square root of the machine epsilon.

    - + Tests

    @@ -373,7 +373,7 @@ to at least 50 decimal digits - and is the used for our accuracy tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html index 681c6faa0..f1130daee 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html @@ -95,7 +95,7 @@ random variable with v1

    - + Member Functions
    @@ -127,7 +127,7 @@ random variable with v1 which this object was constructed.

    - + Non-member Accessors
    @@ -147,7 +147,7 @@ random variable with v1 The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -155,7 +155,7 @@ random variable with v1 Beta Distribution: refer to that distribution for accuracy data.

    - + Tests

    @@ -164,7 +164,7 @@ random variable with v1 Math library statistical package and its pbeta and dbeta functions.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html index 11a801743..28b890256 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html @@ -85,7 +85,7 @@

    - + Member Functions
    @@ -111,7 +111,7 @@ which this object was constructed.

    - + Non-member Accessors
    @@ -131,7 +131,7 @@ The domain of the random variable is [-∞, +∞].

    - + Accuracy

    @@ -255,7 +255,7 @@ epsilon.

    - + Tests

    @@ -270,7 +270,7 @@ least 50 decimal places.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html index 446ac4291..05b91eaed 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html @@ -123,7 +123,7 @@

    - + Related Distributions
    @@ -195,12 +195,12 @@
    - + Member Functions
    - + Construct
    negative_binomial_distribution(RealType r, RealType p);
    @@ -216,7 +216,7 @@
                 <= 1.
               

    - + Accessors
    RealType success_fraction() const; // successes / trials (0 <= p <= 1)
    @@ -237,7 +237,7 @@
                 Distribution for more discussion.
               

    - + Lower Bound on Parameter p
    @@ -298,7 +298,7 @@ vol. 48, no3, 605-621.

    - + Upper Bound on Parameter p
    @@ -358,7 +358,7 @@ vol. 48, no3, 605-621.

    - + Estimating Number of Trials to Ensure at Least a Certain Number of Failures
    @@ -409,7 +409,7 @@ probability of observing k failures or fewer.

    - + Estimating Number of Trials to Ensure a Maximum Number of Failures or Less
    @@ -457,7 +457,7 @@ probability of observing more than k failures.

    - + Non-member Accessors
    @@ -606,7 +606,7 @@

- + Accuracy

@@ -616,7 +616,7 @@ please refer to these functions for information on accuracy.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html index 9dd7fbd9d..c48804071 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html @@ -79,7 +79,7 @@

- + Member Functions
@@ -109,7 +109,7 @@ be used generically).

- + Non-member Accessors
@@ -131,7 +131,7 @@ and complement cdf -∞ = 1 and +∞ = 0, if RealType permits.

- + Accuracy

@@ -139,7 +139,7 @@ function, and as such should have very low error rates.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html index b45d1e139..7389542a6 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html @@ -86,12 +86,12 @@

- + Related distributions
- + Member Functions
@@ -117,7 +117,7 @@ Returns the shape parameter of this distribution.

- + Non-member Accessors
@@ -137,7 +137,7 @@ The supported domain of the random variable is [scale, ∞].

- + Accuracy

@@ -150,7 +150,7 @@ zero) see also why complements?.

- + Implementation

@@ -318,7 +318,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html index 85c6bfeef..6be378085 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html @@ -116,7 +116,7 @@
- + Member Functions
@@ -131,7 +131,7 @@ Returns the mean of this distribution.

- + Non-member Accessors
@@ -151,7 +151,7 @@ The domain of the random variable is [0, ∞].

- + Accuracy

@@ -165,7 +165,7 @@ using an iterative method with a lower tolerance to avoid excessive computation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html index 7a2633c7f..652812e7b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html @@ -86,7 +86,7 @@

- + Related distributions
@@ -102,7 +102,7 @@ distribution.

- + Member Functions
@@ -121,7 +121,7 @@ Returns the sigma parameter of this distribution.

- + Non-member Accessors
@@ -141,7 +141,7 @@ The domain of the random variable is [0, max_value].

- + Accuracy

@@ -151,7 +151,7 @@ using NTL RR type with 150-bit accuracy, about 50 decimal digits.

- + Implementation

@@ -320,7 +320,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html index f8ed15f76..c3c34d642 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html @@ -97,7 +97,7 @@

    - + Member Functions
    @@ -174,7 +174,7 @@ Engineering Statistics Handbook.

    - + Non-member Accessors
    @@ -194,7 +194,7 @@ The domain of the random variable is [-∞, +∞].

    - + Examples

    @@ -202,7 +202,7 @@ are available illustrating the use of the Student's t distribution.

    - + Accuracy

    @@ -211,7 +211,7 @@ inverses, refer to accuracy data on those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html index 3a5386d1f..59905649b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html @@ -128,7 +128,7 @@

    - + Member Functions
    @@ -163,7 +163,7 @@ (default+1).

    - + Non-member Accessors
    @@ -184,7 +184,7 @@ range is lower <= x <= upper.

    - + Accuracy

    @@ -193,7 +193,7 @@ with arguments nearing the extremes of zero and unity.

    - + Implementation

    @@ -378,7 +378,7 @@ Calculate and plot probability distributions

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html index cb56cd703..ae855070b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html @@ -117,7 +117,7 @@

      - + Member Functions
      @@ -144,7 +144,7 @@ Returns the upper parameter of this distribution.

      - + Non-member Accessors
      @@ -165,7 +165,7 @@ range is only lower <= x <= upper.

      - + Accuracy

      @@ -173,7 +173,7 @@ and so should have errors within an epsilon or two.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull_dist.html index 27813ce4a..229d312a4 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull_dist.html @@ -100,7 +100,7 @@

      - + Related distributions
      @@ -114,7 +114,7 @@ Distributions, Theory and Applications Samuel Kotz & Saralees Nadarajah.

      - + Member Functions
      @@ -140,7 +140,7 @@ Returns the scale parameter of this distribution.

      - + Non-member Accessors
      @@ -160,7 +160,7 @@ The domain of the random variable is [0, ∞].

      - + Accuracy

      @@ -170,7 +170,7 @@ as such should have very low error rates.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html index c36ba88f6..6a0e54255 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html @@ -37,7 +37,7 @@ the function you want if you already know its name.

      - + Function Index
        @@ -94,7 +94,7 @@
      - + Conceptual Index
        @@ -180,7 +180,7 @@
      - + Cumulative Distribution Function
      template <class RealType, class Policy>
      @@ -203,7 +203,7 @@
                 cdf
               

      - + Complement of the Cumulative Distribution Function
      template <class Distribution, class RealType>
      @@ -243,7 +243,7 @@
                 complement is useful and when it should be used.
               

      - + Hazard Function
      template <class RealType, class Policy>
      @@ -271,7 +271,7 @@
                 

    - + Cumulative Hazard Function
    template <class RealType, class Policy>
    @@ -298,7 +298,7 @@
               

- + mean
template<class RealType, class Policy>
@@ -313,7 +313,7 @@
           distribution).
         

- + median
template<class RealType, class Policy>
@@ -323,7 +323,7 @@
           Returns the median of the distribution dist.
         

- + mode
template<class RealType, Policy>
@@ -337,7 +337,7 @@
           if the distribution does not have a defined mode.
         

- + Probability Density Function
template <class RealType, class Policy>
@@ -365,7 +365,7 @@
           pdf
         

- + Range
template<class RealType, class Policy>
@@ -375,7 +375,7 @@
           Returns the valid range of the random variable over distribution dist.
         

- + Quantile
template <class RealType, class Policy>
@@ -405,7 +405,7 @@
           quantile
         

- + Quantile from the complement of the probability.

@@ -450,7 +450,7 @@ survival_inv

- + Standard Deviation
template <class RealType, class Policy>
@@ -464,7 +464,7 @@
           if the distribution does not have a defined standard deviation.
         

- + support
template<class RealType, class Policy>
@@ -481,7 +481,7 @@
           where the pdf is zero, and the cdf zero or unity.
         

- + Variance
template <class RealType, class Policy>
@@ -495,7 +495,7 @@
           if the distribution does not have a defined variance.
         

- + Skewness
template <class RealType, class Policy>
@@ -509,7 +509,7 @@
           if the distribution does not have a defined skewness.
         

- + Kurtosis
template <class RealType, class Policy>
@@ -551,7 +551,7 @@
           'Proper' kurtosis can have a value from zero to + infinity.
         

- + Kurtosis excess
template <class RealType, Policy>
@@ -585,7 +585,7 @@
           The kurtosis excess of a normal distribution is zero.
         

- + P and Q

@@ -595,7 +595,7 @@ returned by these functions.

- + Percent Point Function or Percentile

@@ -603,7 +603,7 @@ the Quantile.

- + Inverse CDF Function.

@@ -611,14 +611,14 @@ Quantile.

- + Inverse Survival Function.

The inverse of the survival function, is the same as computing the quantile from the complement of the probability.

- + Probability Mass Function

@@ -631,7 +631,7 @@ applies to continuous distributions.

- + Lower Critical Value.

@@ -640,7 +640,7 @@ the Quantile.

- + Upper Critical Value.

@@ -650,7 +650,7 @@ complement of the probability.

- + Survival Function

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/future.html b/doc/sf_and_dist/html/math_toolkit/dist/future.html index a28dbba1c..3f928cefe 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/future.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/future.html @@ -27,7 +27,7 @@ Extras/Future Directions

- + Adding Additional Location and Scale Parameters
@@ -55,7 +55,7 @@ functions.

- + An "any_distribution" class
@@ -91,7 +91,7 @@ investigation.

- + Higher Level Hypothesis Tests
@@ -111,7 +111,7 @@ expected_mean.

- + Integration With Statistical Accumulators
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut.html index 15dcf4614..c8e38ff36 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut.html @@ -36,7 +36,7 @@ are Objects
Generic operations common to all distributions are non-member functions
-
Complements +
Complements are supported too - and when to use them
Parameters can be calculated
@@ -104,10 +104,12 @@ Distribution Examples
Some Miscellaneous Examples of the Normal (Gaussian) Distribution
+
Inverse + Chi-Squared Distribution Bayes Example
Non Central Chi Squared Example
Tables - of the power function of the χ2 test.
+ of the power function of the chi2 test.
Error Handling Example
Find Location diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html index 0d81ff770..9d7816398 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html @@ -33,7 +33,7 @@ are Objects
Generic operations common to all distributions are non-member functions
-
Complements +
Complements are supported too - and when to use them
Parameters can be calculated
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview/complements.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview/complements.html index 83a3c54e0..57b9e3db6 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview/complements.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview/complements.html @@ -24,10 +24,10 @@
-

+

Often you don't want the value of the CDF, but its complement, which is to say 1-p rather than p. It is tempting to calculate the CDF and subtract it from 1, but if p diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg.html index e50e07281..517e26c4e 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg.html @@ -87,10 +87,12 @@ Distribution Examples

Some Miscellaneous Examples of the Normal (Gaussian) Distribution
+
Inverse + Chi-Squared Distribution Bayes Example
Non Central Chi Squared Example
Tables - of the power function of the χ2 test.
+ of the power function of the chi2 test.
Error Handling Example
Find Location diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html index f01867991..fe87dcbce 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html @@ -379,7 +379,7 @@ Probability of getting between 1 and 8 answers right by guessing is 0.9825 Probability of getting between 4 and 4 answers right by guessing is 0.2252
- + Using Binomial distribution moments
@@ -406,7 +406,7 @@ Mode (the most frequent) is 4 Skewness is 0.2887
- + Quantiles

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html index a02997a1a..61ba9d4cb 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html @@ -139,7 +139,7 @@ _____________________________________________ is between 0.00551 and 0.00729.

- + Confidence intervals as a function of the number of observations
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html index f59dfdc78..fb49e5b62 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html @@ -246,7 +246,7 @@ error C3861: 'mybetad0': identifier not found
negative_binomial_distribution<MyFPType>  mydist6(8, 1); // Integer arguments -> MyFPType.
 
- + Default arguments to distribution constructors.
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/error_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/error_eg.html index e479e4ad4..3bdb095e2 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/error_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/error_eg.html @@ -6,7 +6,7 @@ - + diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html index 10c9ec9f9..d4f3f22e7 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html @@ -138,7 +138,7 @@ Normal distribution with mean = 0, standard deviation 1, has fraction > -2, p Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
- + Controlling Error Handling from find_location
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html index f9409478c..577cedcd5 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html @@ -57,7 +57,7 @@

- + Using find_location and find_scale to meet dispensing and measurement specifications
@@ -193,7 +193,7 @@

- + Using Cauchy-Lorentz instead of normal distribution
@@ -305,7 +305,7 @@ of estimating these intervals.

- + Changing the scale or standard deviation
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html index 4d98f4c52..d180a1bf3 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html @@ -137,7 +137,7 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.97725 Normal distribution with mean = 0 has fraction > -2, p = 0.999
- + Controlling how Errors from find_scale are handled
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/geometric_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/geometric_eg.html index b198d32f6..13477341c 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/geometric_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/geometric_eg.html @@ -94,7 +94,7 @@ error message instead of an abrupt (and silent) program abort.

- + Throwing a dice
@@ -288,7 +288,7 @@ replicated in C++ if desired.

- + Surveying customers to find one with a faulty product
@@ -333,7 +333,7 @@

- + Basket Ball Shooters
@@ -393,7 +393,7 @@ the best shooters, compared to the 0.03 of the mediocre.

- + Estimating failures
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/inverse_chi_squared_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/inverse_chi_squared_eg.html new file mode 100644 index 000000000..fdddd1180 --- /dev/null +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/inverse_chi_squared_eg.html @@ -0,0 +1,380 @@ + + + +Inverse Chi-Squared Distribution Bayes Example + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The scaled-inversed-chi-squared distribution is the conjugate prior distribution + for the variance (σ2) parameter of a normal distribution with known expectation + (μ). As such it has widespread application in Bayesian statistics: +

+

+ In Bayesian + inference, the strength of belief into certain parameter values + is itself described through a distribution. Parameters hence become themselves + modelled and interpreted as random variables. +

+

+ In this worked example, we perform such a Bayesian analysis by using + the scaled-inverse-chi-squared distribution as prior and posterior distribution + for the variance parameter of a normal distribution. +

+

+ For more general information on Bayesian type of analyses, see: +

+
    +
  • + Andrew Gelman, John B. Carlin, Hal E. Stern, Donald B. Rubin, Bayesian + Data Analysis, 2003, ISBN 978-1439840955. +
  • +
  • + Jim Albert, Bayesian Compution with R, Springer, 2009, ISBN 978-0387922973. +
  • +
+

+ (As the scaled-inversed-chi-squared is another parameterization of the + inverse-gamma distribution, this example could also have used the inverse-gamma + distribution). +

+

+ Consider precision machines which produce balls for a high-quality ball + bearing. Ideally each ball should have a diameter of precisely 3000 μm + (3 mm). Assume that machines generally produce balls of that size on + average (mean), but individual balls can vary slightly in either direction + following (approximately) a normal distribution. Depending on various + production conditions (e.g. raw material used for balls, workplace temperature + and humidity, maintenance frequency and quality) some machines produce + balls tighter distributed around the target of 3000 μm, while others produce + balls with a wider distribution. Therefore the variance parameter of + the normal distribution of the ball sizes varies from machine to machine. + An extensive survey by the precision machinery manufacturer, however, + has shown that most machines operate with a variance between 15 and 50, + and near 25 μm2 on average. +

+

+ Using this information, we want to model the variance of the machines. + The variance is strictly positive, and therefore we look for a statistical + distribution with support in the positive domain of the real numbers. + Given the expectation of the normal distribution of the balls is known + (3000 μm), for reasons of conjugacy, it is customary practice in Bayesian + statistics to model the variance to be scaled-inverse-chi-squared distributed. +

+

+ In a first step, we will try to use the survey information to model the + general knowledge about the variance parameter of machines measured by + the manufacturer. This will provide us with a generic prior distribution + that is applicable if nothing more specific is known about a particular + machine. +

+

+ In a second step, we will then combine the prior-distribution information + in a Bayesian analysis with data on a specific single machine to derive + a posterior distribution for that machine. +

+
+ + Step + one: Using the survey information. +
+

+ Using the survey results, we try to find the parameter set of a scaled-inverse-chi-squared + distribution so that the properties of this distribution match the results. + Using the mathematical properties of the scaled-inverse-chi-squared distribution + as guideline, we see that that both the mean and mode of the scaled-inverse-chi-squared + distribution are approximately given by the scale parameter (s) of the + distribution. As the survey machines operated at a variance of 25 μm2 on + average, we hence set the scale parameter (sprior) of our prior distribution + equal to this value. Using some trial-and-error and calls to the global + quantile function, we also find that a value of 20 for the degrees-of-freedom + (νprior) parameter is adequate so that most of the prior distribution + mass is located between 15 and 50 (see figure below). +

+

+ We first construct our prior distribution using these values, and then + list out a few quantiles: +

+

+ +

+
double priorDF = 20.0;
+double priorScale = 25.0; 
+
+inverse_chi_squared prior(priorDF, priorScale);
+// Using an inverse_gamma distribution instead, we could equivalently write
+// inverse_gamma prior(priorDF / 2.0, priorScale * priorDF / 2.0);
+
+cout << "Prior distribution:" << endl << endl;
+cout << "  2.5% quantile: " << quantile(prior, 0.025) << endl;
+cout << "  50% quantile: " << quantile(prior, 0.5) << endl;
+cout << "  97.5% quantile: " << quantile(prior, 0.975) << endl << endl;
+
+
+

+

+

+ This produces this output: +

+
Prior distribution:
+
+2.5% quantile: 14.6
+50% quantile: 25.9
+97.5% quantile: 52.1
+
+

+ Based on this distribution, we can now calculate the probability of having + a machine working with an unusual work precision (variance) at <= + 15 or > 50. For this task, we use calls to the boost::math:: functions cdf + and complement, respectively, + and find a probability of about 0.031 (3.1%) for each case. +

+

+ +

+
cout << "  probability variance <= 15: " << boost::math::cdf(prior, 15.0) << endl;
+cout << "  probability variance <= 25: " << boost::math::cdf(prior, 25.0) << endl;
+cout << "  probability variance > 50: " 
+  << boost::math::cdf(boost::math::complement(prior, 50.0))
+<< endl << endl;
+
+

+

+

+ This produces this output: +

+
probability variance <= 15: 0.031
+probability variance <= 25: 0.458
+probability variance > 50: 0.0318
+
+

+ Therefore, only 3.1% of all precision machines produce balls with a variance + of 15 or less (particularly precise machines), but also only 3.2% of + all machines produce balls with a variance of as high as 50 or more (particularly + imprecise machines). Moreover, slightly more than one-half (1 - 0.458 + = 54.2%) of the machines work at a variance greater than 25. +

+

+ Notice here the distinction between a Bayesian + analysis and a frequentist + analysis: because we model the variance as random variable itself, we + can calculate and straightforwardly interpret probabilities for given + parameter values directly, while such an approach is not possible (and + interpretationally a strict must-not) in the frequentist + world. +

+
+ + Step + 2: Investigate a single machine +
+

+ In the second step, we investigate a single machine, which is suspected + to suffer from a major fault as the produced balls show fairly high size + variability. Based on the prior distribution of generic machinery performance + (derived above) and data on balls produced by the suspect machine, we + calculate the posterior distribution for that machine and use its properties + for guidance regarding continued machine operation or suspension. +

+

+ It can be shown that if the prior distribution was chosen to be scaled-inverse-chi-square + distributed, then the posterior distribution is also scaled-inverse-chi-squared-distributed + (prior and posterior distributions are hence conjugate). For more details + regarding conjugacy and formula to derive the parameters set for the + posterior distribution see Conjugate + prior. +

+

+ Given the prior distribution parameters and sample data (of size n), + the posterior distribution parameters are given by the two expressions: +

+

+    νposterior = νprior + n +

+

+ which gives the posteriorDF below, and +

+

+    sposterior = (νpriorsprior + Σni=1(xi - μ)2) / (νprior + n) +

+

+ which after some rearrangement gives the formula for the posteriorScale + below. +

+

+ Machine-specific data consist of 100 balls which were accurately measured + and show the expected mean of 3000 μm and a sample variance of 55 (calculated + for a sample mean defined to be 3000 exactly). From these data, the prior + parameterization, and noting that the term Σni=1(xi - μ)2 equals the sample + variance multiplied by n - 1, it follows that the posterior distribution + of the variance parameter is scaled-inverse-chi-squared distribution + with degrees-of-freedom (νposterior) = 120 and scale (sposterior) = 49.54. +

+

+ +

+
int ballsSampleSize = 100;
+cout <<"balls sample size: " << ballsSampleSize << endl;
+double ballsSampleVariance = 55.0;
+cout <<"balls sample variance: " << ballsSampleVariance << endl;
+
+double posteriorDF = priorDF + ballsSampleSize;
+cout << "prior degrees-of-freedom: " << priorDF << endl;
+cout << "posterior degrees-of-freedom: " << posteriorDF << endl;
+
+double posteriorScale = 
+  (priorDF * priorScale + (ballsSampleVariance * (ballsSampleSize - 1))) / posteriorDF;
+cout << "prior scale: " << priorScale  << endl;
+cout << "posterior scale: " << posteriorScale << endl;
+

+

+

+ An interesting feature here is that one needs only to know a summary + statistics of the sample to parameterize the posterior distribution: + the 100 individual ball measurements are irrelevant, just knowledge of + the sample variance and number of measurements is sufficient. +

+

+ That produces this output: +

+
balls sample size: 100
+balls sample variance: 55
+prior degrees-of-freedom: 20
+posterior degrees-of-freedom: 120
+prior scale: 25
+posterior scale: 49.5
+
+

+ To compare the generic machinery performance with our suspect machine, + we calculate again the same quantiles and probabilities as above, and + find a distribution clearly shifted to greater values (see figure). +

+

+ +

+

+ +

+
inverse_chi_squared posterior(posteriorDF, posteriorScale);
+
+ cout << "Posterior distribution:" << endl << endl;
+ cout << "  2.5% quantile: " << boost::math::quantile(posterior, 0.025) << endl;
+ cout << "  50% quantile: " << boost::math::quantile(posterior, 0.5) << endl;
+ cout << "  97.5% quantile: " << boost::math::quantile(posterior, 0.975) << endl << endl;
+
+ cout << "  probability variance <= 15: " << boost::math::cdf(posterior, 15.0) << endl;
+ cout << "  probability variance <= 25: " << boost::math::cdf(posterior, 25.0) << endl;
+ cout << "  probability variance > 50: " 
+   << boost::math::cdf(boost::math::complement(posterior, 50.0)) << endl;
+
+
+

+

+

+ This produces this output: +

+
Posterior distribution:
+ 
+   2.5% quantile: 39.1
+   50% quantile: 49.8
+   97.5% quantile: 64.9
+ 
+   probability variance <= 15: 2.97e-031
+   probability variance <= 25: 8.85e-010
+   probability variance > 50: 0.489
+
+

+ Indeed, the probability that the machine works at a low variance (<= + 15) is almost zero, and even the probability of working at average or + better performance is negligibly small (less than one-millionth of a + permille). On the other hand, with an almost near-half probability (49%), + the machine operates in the extreme high variance range of > 50 characteristic + for poorly performing machines. +

+

+ Based on this information the operation of the machine is taken out of + use and serviced. +

+

+ In summary, the Bayesian analysis allowed us to make exact probabilistic + statements about a parameter of interest, and hence provided us results + with straightforward interpretation. +

+

+ A full sample output is: +

+
Inverse_chi_squared_distribution Bayes example: 
+  
+   Prior distribution:
+  
+    2.5% quantile: 14.6
+    50% quantile: 25.9
+    97.5% quantile: 52.1
+  
+    probability variance <= 15: 0.031
+    probability variance <= 25: 0.458
+    probability variance > 50: 0.0318
+  
+  balls sample size: 100
+  balls sample variance: 55
+  prior degrees-of-freedom: 20
+  posterior degrees-of-freedom: 120
+  prior scale: 25
+  posterior scale: 49.5
+  Posterior distribution:
+  
+    2.5% quantile: 39.1
+    50% quantile: 49.8
+    97.5% quantile: 64.9
+  
+    probability variance <= 15: 2.97e-031
+    probability variance <= 25: 8.85e-010
+    probability variance > 50: 0.489
+
+
+

+ (See also the reference documentation for the Inverse + chi squared Distribution.) +

+

+ See the full source C++ of this example at ../../../example/inverse_chi_squared_bayes_eg.cpp +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg.html index 8c96e9345..17e58f151 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg.html @@ -6,8 +6,8 @@ - - + + @@ -20,7 +20,7 @@

-PrevUpHomeNext +PrevUpHomeNext
@@ -28,7 +28,7 @@ Chi Squared Example
+ of the power function of the chi2 test.

(See also the reference documentation for the Noncentral Chi Squared Distribution.) @@ -46,7 +46,7 @@


-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg/nccs_power_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg/nccs_power_eg.html index 407c01680..30c67f0b1 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg/nccs_power_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/nccs_eg/nccs_power_eg.html @@ -1,7 +1,7 @@ -Tables of the power function of the χ2 test. +Tables of the power function of the chi2 test. @@ -24,8 +24,8 @@

This example computes a table of the power of the χ2 diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html index 892118f4f..c219da433 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@


-PrevUpHomeNext +PrevUpHomeNext
@@ -32,7 +32,7 @@ illustrates their use.

- + Traditional Tables
@@ -230,7 +230,7 @@ the two tails is 0.025 + 0.025 = 0.05,

- + Standard deviations either side of the Mean
@@ -280,12 +280,12 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740 estimated the standard deviation from only a few measurements.

- + Some simple examples
- + Life of light bulbs
@@ -351,7 +351,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

- + How many onions?
@@ -396,7 +396,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

- + Packing beef
@@ -565,7 +565,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740 a few measurements.

- + Length of bolts
@@ -610,7 +610,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/sf_and_dist/html/math_toolkit/extern_c/c99.html b/doc/sf_and_dist/html/math_toolkit/extern_c/c99.html index 6072d64d0..52e53fa0c 100644 --- a/doc/sf_and_dist/html/math_toolkit/extern_c/c99.html +++ b/doc/sf_and_dist/html/math_toolkit/extern_c/c99.html @@ -27,7 +27,7 @@ C99 C Functions
- + Supported C99 Functions
@@ -138,7 +138,7 @@ acosh(2); // integer argument is treated as a double, returns double.
- + Quick Reference

diff --git a/doc/sf_and_dist/html/math_toolkit/extern_c/tr1.html b/doc/sf_and_dist/html/math_toolkit/extern_c/tr1.html index ad4d28d23..8d31e05e9 100644 --- a/doc/sf_and_dist/html/math_toolkit/extern_c/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/extern_c/tr1.html @@ -258,7 +258,7 @@

- + Usage Recomendations

@@ -295,7 +295,7 @@ this can be a big win.

- + Supported C99 Functions
@@ -391,7 +391,7 @@ }}}} // namespaces
- + Supported TR1 Functions
@@ -520,7 +520,7 @@ type calculation rules
.

- + Currently Unsupported C99 Functions
@@ -585,7 +585,7 @@ long double scalbnl(long double x, int ex);
- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/extern_c/tr1_ref.html b/doc/sf_and_dist/html/math_toolkit/extern_c/tr1_ref.html index 082d33d05..5cea5b1fd 100644 --- a/doc/sf_and_dist/html/math_toolkit/extern_c/tr1_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/extern_c/tr1_ref.html @@ -28,7 +28,7 @@ Reference
- + Supported TR1 Functions
@@ -163,7 +163,7 @@ expint(2); // integer argument is treated as a double, returns double.
- + Quick Reference
// [5.2.1.1] associated Laguerre polynomials:
@@ -494,7 +494,7 @@
         for the full template (header only) version of this function.
       

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/building.html b/doc/sf_and_dist/html/math_toolkit/main_overview/building.html index 65bbc9128..ed7bad2d1 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/building.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/building.html @@ -28,7 +28,7 @@ a Boost.Math Library, and its Examples and Tests
- + Building a Library (shared, dynamic .dll or static .lib)
@@ -100,7 +100,7 @@ building the sources. Boost.Build will do this automatically when appropriate.

- + Building the Examples
@@ -111,7 +111,7 @@ the Boost headers are in your compilers #include search path.

- + Building the Tests
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html index 630721b58..cc984a3dc 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html @@ -28,7 +28,7 @@ File Structure
- + boost/math
@@ -73,7 +73,7 @@
- + boost/libs
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html index a485221c2..d59eef7ff 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html @@ -27,7 +27,7 @@ Error Handling
- + Quick Reference
@@ -747,7 +747,7 @@ boost::math::policies::overflow_error;.

- + Rationale

@@ -766,7 +766,7 @@

- + Finding More Information
@@ -788,7 +788,7 @@ The various kind of errors are described in more detail below.

- + Domain Errors

@@ -859,7 +859,7 @@ for more details.

- + Evaluation at a pole

@@ -897,7 +897,7 @@ for more details.

- + Numeric Overflow

@@ -921,7 +921,7 @@ doesn't support infinities, the maximum value for the type is returned.

- + Numeric Underflow

@@ -943,7 +943,7 @@ an std::underflow_error C++ exception.

- + Denormalisation Errors

@@ -965,7 +965,7 @@ throws an std::underflow_error C++ exception.

- + Evaluation Errors

@@ -1001,7 +1001,7 @@ for more details.

- + Indeterminate Result Errors

@@ -1029,7 +1029,7 @@ the result of 00 is 1, even though the result is actually mathematically indeterminate.

- + Rounding Errors

@@ -1068,7 +1068,7 @@ for more details.

- + Errors from typecasts

diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html index ffe28cb3b..7d660cc13 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html @@ -27,8 +27,23 @@ History and What's New +

+ + Boost-1.48 +
+
    +
  • + Added new series evaluation methods to the cyclic Bessel I, J, K and + Y functions. Also taken great care to avoid spurious over and underflow + of these functions. Fixes issue #5560 +
  • +
  • + Added an example of using Inverse Chi-Squared distribution for Bayesian + statistics, provided by Thomas Mang. +
  • +
- + Boost-1.47
    @@ -37,7 +52,7 @@ facets.
  • - Addition of nonfinite facetsfrom Johan Rade, with tests, examples of + Addition of nonfinite facets from Johan Rade, with tests, examples of use for C99 format infinity and NaN, and documentation.
  • @@ -45,7 +60,7 @@
- + Boost-1.46.1
  • @@ -53,7 +68,7 @@ #5113.
- + Boost-1.46.0
    @@ -68,7 +83,7 @@
- + Boost-1.45.0
    @@ -85,7 +100,7 @@
- + Boost-1.44.0
    @@ -99,7 +114,7 @@
- + Boost-1.41.0
  • @@ -107,7 +122,7 @@ and its inverse.
- + Boost-1.40.0
    @@ -144,7 +159,7 @@
- + Boost-1.38.0
    @@ -156,14 +171,14 @@
- + Boost-1.37.0
  • Improved accuracy and testing of the inverse hypergeometric functions.
- + Boost-1.36.0
    @@ -196,7 +211,7 @@
- + Boost-1.35.0: Post Review First Official Release
@@ -228,7 +243,7 @@
- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -242,7 +257,7 @@
- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -270,7 +285,7 @@
- + Milestone 2: Released September 10th 2006
@@ -306,7 +321,7 @@
- + Milestone 1: Released March 31st 2006
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html index 50a7380fc..4229158f3 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html @@ -30,7 +30,7 @@ This library is divided into three interconnected parts:

- + Statistical Distributions
@@ -56,7 +56,7 @@ tests.

- + Mathematical Special Functions
@@ -83,7 +83,7 @@ double.

- + Implementation Toolkit
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html index aa624f307..0cdd78567 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html @@ -31,7 +31,7 @@ as handy shortcuts for common navigation tasks.

- + Shortcuts
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html index 5c66f0974..355f4b389 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html @@ -259,7 +259,7 @@

- + Usage Recomendations
@@ -297,7 +297,7 @@ this can be a big win.

- + Supported C99 Functions
@@ -393,7 +393,7 @@ }}}} // namespaces
- + Supported TR1 Functions
@@ -522,7 +522,7 @@ type calculation rules
.

- + Currently Unsupported C99 Functions
@@ -587,7 +587,7 @@ long double scalbnl(long double x, int ex);
- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html index e262f0b1a..ad3747a93 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html @@ -46,7 +46,7 @@

- + Comparison to GSL-1.13 and Cephes
@@ -344,7 +344,7 @@

- +INF [1] + +INF [1]

@@ -423,7 +423,7 @@

-

17.89[2]

+

17.89[2]

(4.248e-005s)

@@ -548,11 +548,11 @@ -

[1] +

[1] Cephes gets stuck in an infinite loop while trying to execute our test cases.

-

[2] +

[2] The performance here is dominated by a few cases where the parameters grow very large: faster asymptotic expansions are available, but are of limited (or even frankly terrible) precision. The @@ -563,7 +563,7 @@

- + Comparison to the R and DCDFLIB Statistical Libraries on Windows
@@ -659,7 +659,7 @@

-

67.66[1]

+

67.66[1]

(3.366e-004s)

@@ -1088,7 +1088,7 @@

-

3.60[2]

+

3.60[2]

(5.987e-007s)

@@ -1317,7 +1317,7 @@

-

43.43[3]

+

43.43[3]

(3.732e-004s)

@@ -1387,7 +1387,7 @@

-

393.90[4]

+

393.90[4]

(2.673e-002s)

@@ -1523,7 +1523,7 @@

-

1.00[5]

+

1.00[5]

(4.411e-004s)

@@ -1809,28 +1809,28 @@ -

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] This result is somewhat misleading: for small values of the parameters there is virtually no difference between the two libraries, but for large values the Boost implementation is much slower, albeit with much improved precision.

-

[3] +

[3] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases

-

[4] +

[4] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[5] +

[5] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result. @@ -1839,7 +1839,7 @@


- + Comparison to the R Statistical Library on Linux
@@ -1934,7 +1934,7 @@

-

30.51[1]

+

30.51[1]

(3.616e-004s)

@@ -2363,7 +2363,7 @@

-

2.20[2]

+

2.20[2]

(3.522e-007s)

@@ -2592,7 +2592,7 @@

-

25.92[3]

+

25.92[3]

(4.407e-004s)

@@ -2662,7 +2662,7 @@

-

144.91[4]

+

144.91[4]

(3.214e-002s)

@@ -2798,7 +2798,7 @@

-

1.00[5]

+

1.00[5]

(5.916e-004s)

@@ -3084,28 +3084,28 @@ -

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] This result is somewhat misleading: for small values of the parameters there is virtually no difference between the two libraries, but for large values the Boost implementation is much slower, albeit with much improved precision.

-

[3] +

[3] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases

-

[4] +

[4] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[5] +

[5] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result. diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html index 8e79f575b..4cad2af75 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html @@ -55,7 +55,7 @@ can take have the following meanings:

- + real

@@ -89,7 +89,7 @@ = 68.1584.

- + integer_round_outwards

@@ -143,7 +143,7 @@ in each tail.

- + integer_round_inwards

@@ -202,7 +202,7 @@ in each tail.

- + integer_round_down

@@ -210,7 +210,7 @@ or a lower quantile.

- + integer_round_up

@@ -218,7 +218,7 @@ a lower quantile.

- + integer_round_nearest

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html index 6329048d1..795e0684c 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html @@ -39,7 +39,7 @@

- + Available Actions When an Error is Raised
@@ -62,7 +62,7 @@ The various enumerated values have the following meanings:

- + throw_on_error

@@ -174,7 +174,7 @@

- + errno_on_error

@@ -289,7 +289,7 @@

- + ignore_error

@@ -402,7 +402,7 @@

- + user_error

@@ -451,7 +451,7 @@ here.

- + Kinds of Error Raised
@@ -691,7 +691,7 @@
- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html index d58b526bf..79b6e7f35 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html @@ -85,7 +85,7 @@

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html index daf615c1c..a75d25964 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html @@ -61,7 +61,7 @@ then you can do so by defining various macros in boost/math/tools/user.hpp.

- + BOOST_MATH_DOMAIN_ERROR_POLICY

@@ -71,7 +71,7 @@ ignore_error or user_error.

- + BOOST_MATH_POLE_ERROR_POLICY

@@ -81,7 +81,7 @@ ignore_error or user_error.

- + BOOST_MATH_OVERFLOW_ERROR_POLICY

@@ -91,7 +91,7 @@ ignore_error or user_error.

- + BOOST_MATH_ROUNDING_ERROR_POLICY

@@ -101,7 +101,7 @@ ignore_error or user_error.

- + BOOST_MATH_EVALUATION_ERROR_POLICY

@@ -111,7 +111,7 @@ ignore_error or user_error.

- + BOOST_MATH_UNDERFLOW_ERROR_POLICY

@@ -121,7 +121,7 @@ ignore_error or user_error.

- + BOOST_MATH_DENORM_ERROR_POLICY

@@ -131,7 +131,7 @@ ignore_error or user_error.

- + BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY

@@ -142,7 +142,7 @@ ignore_error or user_error.

- + BOOST_MATH_DIGITS10_POLICY

@@ -153,7 +153,7 @@ recommended that you change this from the default.

- + BOOST_MATH_PROMOTE_FLOAT_POLICY

@@ -165,7 +165,7 @@ off.

- + BOOST_MATH_PROMOTE_DOUBLE_POLICY

@@ -177,7 +177,7 @@ off.

- + BOOST_MATH_DISCRETE_QUANTILE_POLICY

@@ -188,7 +188,7 @@ Defaults to integer_round_outwards.

- + BOOST_MATH_ASSERT_UNDEFINED_POLICY

@@ -201,7 +201,7 @@ whether or not a particular property is well defined.

- + BOOST_MATH_MAX_SERIES_ITERATION_POLICY

@@ -210,7 +210,7 @@ Defaults to 1000000.

- + BOOST_MATH_MAX_ROOT_ITERATION_POLICY

@@ -219,7 +219,7 @@ Defaults to 200.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html index f37e5ed9a..6c17658a3 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html @@ -177,7 +177,7 @@ base your comparisons on CDF's instead.

- + Other Rounding Policies are Available
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html index 74089b1f3..69ee7dcee 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html @@ -28,7 +28,7 @@ of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_neumann(T1 v, T2 x, const Policy&);
 
- + Description

@@ -105,7 +105,7 @@

- + Testing

@@ -114,7 +114,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -489,7 +489,7 @@ were found.

- + Implementation

@@ -557,8 +557,36 @@ these methods are not used when type T has more than 64 binary digits.

- When x is small, Jx   is best computed directly from - the series: + When x is smaller than machine epsilon then the following + approximations for Y0(x), Y1(x), Y2(x) and Yn(x) can be used (see: http://functions.wolfram.com/03.03.06.0037.01, + http://functions.wolfram.com/03.03.06.0038.01, + http://functions.wolfram.com/03.03.06.0039.01 + and http://functions.wolfram.com/03.03.06.0040.01): +

+

+ +

+

+ +

+

+ +

+

+ +

+

+ When x is small compared to v + and v is not an integer, then the following series + approximation can be used for Yv(x), this is also an area where other approximations + are often too slow to converge to be used (see http://functions.wolfram.com/03.03.06.0034.01): +

+

+ +

+

+ When x is small compared to v, + Jvx   is best computed directly from the series:

diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html index dca8bf811..f82d66c08 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html @@ -28,7 +28,7 @@ Overview

- + Ordinary Bessel Functions
@@ -103,7 +103,7 @@ and is known as either a Bessel

- + Modified Bessel Functions
@@ -167,7 +167,7 @@ respectively:

- + Spherical Bessel Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html index dc9a60d2a..616b9b7ae 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html @@ -28,7 +28,7 @@ Functions of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_bessel_k(T1 v, T2 x, const Policy&);
 
- + Description

@@ -104,7 +104,7 @@

- + Testing

@@ -113,7 +113,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -321,7 +321,7 @@

- + Implementation

@@ -369,6 +369,13 @@ and are therefore only used when T has no more than 64 binary digits of precision.

+

+ When x is small compared to v, + Ivx   is best computed directly from the series: +

+

+ +

In the general case, we first normalize ν   to [0, [inf]) with the help of the reflection formulae: diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html index 7fab8e00b..177338395 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html @@ -28,7 +28,7 @@ Functions of the First and Second Kinds

- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type sph_neumann(unsigned v, T2 x, const Policy&);
 
- + Description

@@ -92,7 +92,7 @@ for small x:

- + Testing

@@ -101,7 +101,7 @@ for small x: implementation (with all the special case handling removed).

- + Accuracy

@@ -111,7 +111,7 @@ for small x: refer to these functions for accuracy data.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html index 0fb5f999c..de8db6318 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html @@ -28,7 +28,7 @@ of the First Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -113,7 +113,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

@@ -225,7 +225,7 @@

- + Testing

@@ -235,7 +235,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html index 8556335ce..f28a1fe1a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html @@ -28,7 +28,7 @@ of the Second Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -113,7 +113,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

@@ -225,7 +225,7 @@

- + Testing

@@ -235,7 +235,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html index 9443957a0..133cd83f8 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html @@ -28,7 +28,7 @@ of the Third Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -119,7 +119,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

@@ -231,7 +231,7 @@

- + Testing

@@ -241,7 +241,7 @@ this implementation.

- + Implementation

@@ -278,7 +278,7 @@ Π(n, φ+mπ, k) = Π(n, φ, k) + 2mΠ(n, k) ; n <= 1

- Π(n, φ+mπ, k) = Π(n, φ, k) ; n > 1 [1] + Π(n, φ+mπ, k) = Π(n, φ, k) ; n > 1 [1]

are used to move φ   to the range [0, π/2]. @@ -298,7 +298,7 @@



-

[1] +

[1] I haven't been able to find a literature reference for this relation, but it appears to be the convention used by Mathematica. Intuitively the first 2 * m * Π(n, k) terms cancel out as the diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html index df29c09fc..f8bb3ec06 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html @@ -28,7 +28,7 @@ Integrals - Carlson Form

- + Synopsis

@@ -100,7 +100,7 @@ }} // namespaces

- + Description

@@ -216,7 +216,7 @@

- + Testing

@@ -239,7 +239,7 @@ to verify their correctness: see the above Carlson paper for details.

- + Accuracy

@@ -393,7 +393,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html index 679dc5920..a61f8298b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html @@ -49,14 +49,14 @@ Elliptic integral.

- + Notation

All variables are real numbers unless otherwise noted.

- + Definition

@@ -245,7 +245,7 @@

- + Duplication Theorem

@@ -256,7 +256,7 @@

- + Carlson's Formulas

@@ -273,7 +273,7 @@

- + Numerical Algorithms
@@ -287,7 +287,7 @@ integrals with satisfactory precisions.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html index d6b10b3c9..96b005205 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html @@ -28,7 +28,7 @@ Ei

- + Synopsis

@@ -58,7 +58,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -78,7 +78,7 @@
           
         

- + Accuracy

@@ -202,7 +202,7 @@ slightly over the range [4,6].

- + Testing

@@ -217,7 +217,7 @@ check.

- + Implementation

@@ -247,7 +247,7 @@ a minimax rational approximation rescaled so that it is evaluated over [-1,1]. Note that while the rational approximation over [0,6] converges rapidly to the minimax solution it is rather ill-conditioned in practice. - Cody and Thacher [2] experienced the same issue and converted the polynomials into + Cody and Thacher [2] experienced the same issue and converted the polynomials into Chebeshev form to ensure stable computation. By experiment we found that the polynomials are just as stable in polynomial as Chebyshev form, provided they are computed over the interval [-1,1]. @@ -277,7 +277,7 @@



-

[2] +

[2] W. J. Cody and H. C. Thacher, Jr., Rational Chebyshev approximations for the exponential integral E1(x), Math. Comp. 22 (1968), 641-649, and W. J. Cody and H. C. Thacher, Jr., Chebyshev approximations for the exponential diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html index d5e95bd57..7360aa24c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html @@ -28,7 +28,7 @@ En

- + Synopsis

@@ -58,7 +58,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -78,7 +78,7 @@
           
         

- + Accuracy

@@ -220,7 +220,7 @@

- + Testing

@@ -235,7 +235,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html index 9b1894226..d5caf54d3 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html @@ -90,7 +90,7 @@

- + Accuracy

@@ -99,14 +99,14 @@ function for larger arguments.

- + Testing

The spot tests for the binomial coefficients use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html index 430453322..1c3c0a88e 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html @@ -106,7 +106,7 @@

- + Accuracy

@@ -114,14 +114,14 @@ so error rates should be no more than a couple of epsilon higher.

- + Testing

The spot tests for the double factorial use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html index 809b8aebf..ee5b92100 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html @@ -27,7 +27,7 @@ Factorial

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
@@ -157,7 +157,7 @@ the size of further tables that depend on the factorials.

- + Accuracy

@@ -166,7 +166,7 @@ will be the same as for tgamma.

- + Testing

@@ -175,7 +175,7 @@ function handle those cases already.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html index 09003cae1..ee35f01ed 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html @@ -71,7 +71,7 @@ the type of the result is T.

- + Accuracy

@@ -79,14 +79,14 @@ function.

- + Testing

The spot tests for the falling factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html index e44054eda..5aa5f6844 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html @@ -75,7 +75,7 @@ the type of the result is T.

- + Accuracy

@@ -83,14 +83,14 @@ function.

- + Testing

The spot tests for the rising factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html index 777ff9015..82fcd019f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html @@ -62,14 +62,14 @@

- + Accuracy

Generally accuracy is to within 1 or 2 epsilon across all supported platforms.

- + Testing

@@ -85,7 +85,7 @@ to at least 50 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html index c9d9822c6..478cb3db3 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html @@ -57,14 +57,14 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

Generally accuracy is to within 1 or 2 epsilon across all supported platforms.

- + Testing

@@ -80,7 +80,7 @@ to at least 50 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html index b64906065..0e2a27be6 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html @@ -71,14 +71,14 @@ denoting

- + Accuracy

Generally accuracy is to within 1 or 2 epsilon across all supported platforms.

- + Testing

@@ -94,7 +94,7 @@ denoting to at least 50 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html index 3143cc57e..796da117c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html @@ -66,7 +66,7 @@

- + Accuracy

@@ -74,7 +74,7 @@ should have approximately 2 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html index 9f4cd83be..05e0b504a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html @@ -32,7 +32,7 @@ computes the compile-time integral power of a run-time base.

- + Synopsis

@@ -49,7 +49,7 @@ }}

- + Rationale and Usage
@@ -91,7 +91,7 @@ Only 3 different products were actually computed.

- + Return Type

@@ -112,7 +112,7 @@

- + Policies

@@ -121,7 +121,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Error Handling
@@ -227,7 +227,7 @@ doubleresult=pow<-5>(base);
- + Acknowledgements

@@ -238,7 +238,7 @@ improving the implementation.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html index ed79aaf0a..0b4fa1d1e 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html @@ -75,7 +75,7 @@

- + Accuracy

@@ -83,7 +83,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html index 367f7c1a3..f30f37b74 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html @@ -53,7 +53,7 @@ in such a representable.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html index 0afff0f73..71c94f606 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html @@ -88,7 +88,7 @@

- + Accuracy

@@ -96,7 +96,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html index c0eefc58e..af42e5dcb 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html @@ -69,14 +69,14 @@

- + Accuracy

Should have approximately 2-3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html index 8467942a5..96180be4b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html @@ -71,7 +71,7 @@

- + Accuracy

@@ -79,7 +79,7 @@ should have approximately 3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html index 43d5c103b..f92b81d3f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html @@ -28,7 +28,7 @@ of the Incomplete Beta Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -71,14 +71,14 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

Almost identical to the incomplete beta function ibeta.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html index 8e2aba032..06a9d6029 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html @@ -27,7 +27,7 @@ Beta

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -81,7 +81,7 @@ type calculation rules when T1 and T2 are different types.

- + Accuracy

@@ -239,7 +239,7 @@ very small.

- + Testing

@@ -248,7 +248,7 @@ at 1000-bit precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html index 593057935..1d6b39b39 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html @@ -28,7 +28,7 @@ Beta Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -158,7 +158,7 @@

- + Accuracy

@@ -865,7 +865,7 @@


- + Testing

@@ -883,7 +883,7 @@ have test data that is fully independent of the code.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html index 6851231e5..0deb3bc2f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html @@ -87,7 +87,7 @@ }} // namespaces

- + Description

@@ -288,7 +288,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Accuracy

@@ -300,7 +300,7 @@ or 1.

- + Testing

@@ -324,7 +324,7 @@

- + Implementation of ibeta_inv and ibetac_inv
@@ -492,7 +492,7 @@ rapidly converges on the true value.

- + Implementation of inverses on the a and b parameters
diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html index 1fce31d5f..c231a8288 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html @@ -27,7 +27,7 @@ Error Functions
- + Synopsis

@@ -63,7 +63,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -100,7 +100,7 @@
           
         

- + Accuracy

@@ -525,7 +525,7 @@

- + Testing

@@ -540,7 +540,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html index ec5d4f253..9b1800bb2 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html @@ -28,7 +28,7 @@ Inverses

- + Synopsis

@@ -64,7 +64,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -98,7 +98,7 @@
           
         

- + Accuracy

@@ -108,7 +108,7 @@ error functions.

- + Testing

@@ -131,7 +131,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html index 254cc7020..e585ac296 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html @@ -27,7 +27,7 @@ Digamma

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -77,7 +77,7 @@ T otherwise.

- + Accuracy

@@ -265,7 +265,7 @@ absolute error will remain very low.

- + Testing

@@ -275,7 +275,7 @@ see below).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html index e434934e3..b4285e1df 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html @@ -28,7 +28,7 @@ of the Incomplete Gamma Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -75,7 +75,7 @@ otherwise the return type is simply T1.

- + Accuracy

@@ -83,7 +83,7 @@ refer to the documentation for that function for more information.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html index 7dcd835d2..851964445 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html @@ -51,7 +51,7 @@ }} // namespaces

- + Description
template <class T1, class T2> 
@@ -107,7 +107,7 @@
           
         

- + Accuracy

@@ -317,7 +317,7 @@

- + Testing

@@ -326,7 +326,7 @@ a deliberately naive calculation of Γ(x)/Γ(y).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html index d58856306..385ac6f6a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html @@ -28,7 +28,7 @@ Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -155,7 +155,7 @@

- + Accuracy

@@ -823,7 +823,7 @@

- + Testing

@@ -839,7 +839,7 @@ fraction (see below) is unstable for small a and z.

- + Implementation

@@ -1008,7 +1008,7 @@ by Temme (see references below).

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html index 2710e61f5..50abe3a11 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html @@ -28,7 +28,7 @@ Gamma Function Inverses
- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -168,7 +168,7 @@ 0.

- + Accuracy

@@ -182,7 +182,7 @@ functions.

- + Testing

@@ -206,7 +206,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html index 4e6381d58..6afd09350 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html @@ -27,7 +27,7 @@ Log Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description

@@ -93,7 +93,7 @@ T otherwise.

- + Accuracy

@@ -344,7 +344,7 @@

- + Testing

@@ -355,7 +355,7 @@ Random tests in key problem areas are also used.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html index c74c873ae..15f88c71d 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html @@ -27,7 +27,7 @@ Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
template <class T>
@@ -119,7 +119,7 @@
           it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.
         

- + Accuracy

@@ -374,7 +374,7 @@

- + Testing

@@ -389,7 +389,7 @@ a lanczos approximation accurate to around 100 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html index 42e0ac8c6..72506e7ec 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html @@ -27,7 +27,7 @@ Hermite Polynomials

- + Synopsis

@@ -51,7 +51,7 @@ }} // namespaces

- + Description

@@ -131,7 +131,7 @@

- + Accuracy

@@ -248,7 +248,7 @@ is very close to a root.

- + Testing

@@ -258,7 +258,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html index 8d6d2ad97..4ef00af27 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -62,7 +62,7 @@ }} // namespaces

- + Description

@@ -205,7 +205,7 @@

- + Accuracy

@@ -422,7 +422,7 @@ is very close to a root.

- + Testing

@@ -432,7 +432,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html index 945034f81..7f14d1a37 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -79,7 +79,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -295,7 +295,7 @@
 
 
 
- + Accuracy

@@ -676,7 +676,7 @@ given here.

- + Testing

@@ -686,7 +686,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html index 96d5e5ed5..ea5d121e6 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html @@ -27,7 +27,7 @@ Spherical Harmonics

- + Synopsis

@@ -60,7 +60,7 @@ }} // namespaces

- + Description

@@ -150,7 +150,7 @@

- + Accuracy

@@ -271,7 +271,7 @@ arbitrarily large when the function is very close to a root.

- + Testing

@@ -281,7 +281,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html index 4ef7f3eee..86f59ad29 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html +++ b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html @@ -27,7 +27,7 @@ Riemann Zeta Function

- + Synopsis

@@ -57,7 +57,7 @@ it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

- + Description
template <class T>
@@ -80,7 +80,7 @@
           
         

- + Accuracy

@@ -229,7 +229,7 @@

- + Testing

@@ -244,7 +244,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/status/history1.html b/doc/sf_and_dist/html/math_toolkit/status/history1.html index 7bef6de00..c1e94e405 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/status/history1.html @@ -26,8 +26,23 @@

+
+ + Boost-1.48 +
+
    +
  • + Added new series evaluation methods to the cyclic Bessel I, J, K and + Y functions. Also taken great care to avoid spurious over and underflow + of these functions. Fixes issue #5560 +
  • +
  • + Added an example of using Inverse Chi-Squared distribution for Bayesian + statistics, provided by Thomas Mang. +
  • +
- + Boost-1.47
    @@ -36,7 +51,7 @@ facets.
  • - Addition of nonfinite facetsfrom Johan Rade, with tests, examples of + Addition of nonfinite facets from Johan Rade, with tests, examples of use for C99 format infinity and NaN, and documentation.
  • @@ -44,7 +59,7 @@
- + Boost-1.46.1
  • @@ -52,7 +67,7 @@ #5113.
- + Boost-1.46.0
    @@ -67,7 +82,7 @@
- + Boost-1.45.0
    @@ -84,7 +99,7 @@
- + Boost-1.44.0
    @@ -98,7 +113,7 @@
- + Boost-1.41.0
  • @@ -106,7 +121,7 @@ and its inverse.
- + Boost-1.40.0
    @@ -143,7 +158,7 @@
- + Boost-1.38.0
    @@ -155,14 +170,14 @@
- + Boost-1.37.0
  • Improved accuracy and testing of the inverse hypergeometric functions.
- + Boost-1.36.0
    @@ -195,7 +210,7 @@
- + Boost-1.35.0: Post Review First Official Release
@@ -227,7 +242,7 @@
- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -241,7 +256,7 @@
- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -269,7 +284,7 @@
- + Milestone 2: Released September 10th 2006
@@ -305,7 +320,7 @@
- + Milestone 1: Released March 31st 2006
diff --git a/doc/sf_and_dist/html/math_toolkit/status/issues.html b/doc/sf_and_dist/html/math_toolkit/status/issues.html index eddfc5f79..f9cf00246 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/issues.html +++ b/doc/sf_and_dist/html/math_toolkit/status/issues.html @@ -40,7 +40,7 @@ with it.

- + tgamma
  • @@ -48,7 +48,7 @@ be optimized any further? (low priority)
- + Incomplete Beta
  • @@ -56,7 +56,7 @@ b (medium priority).
- + Inverse Gamma
  • @@ -64,7 +64,7 @@ is good enough (Medium Priority).
- + Polynomials
  • @@ -74,7 +74,7 @@ not (Low Priority).
- + Elliptic Integrals
    @@ -127,7 +127,7 @@
- + Inverse Hyperbolic Functions
@@ -137,7 +137,7 @@ This is probably only an issue for very high precision types (Low Priority).
- + Statistical distributions
@@ -146,7 +146,7 @@ for very large degrees of freedom?
- + Feature Requests

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html index b802d9b02..595143226 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html @@ -28,7 +28,7 @@ Evaluation

- + Synopsis

@@ -78,7 +78,7 @@ }}} // namespaces

- + Description

@@ -178,7 +178,7 @@ a continued fraction for convergence.

- + Implementation

@@ -188,7 +188,7 @@ Lentz, W.J. 1976, Applied Optics, vol. 15, pp. 668-671.

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html index ab38823bf..4a5f434bb 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html @@ -28,7 +28,7 @@ Constants

- + Synopsis

@@ -59,7 +59,7 @@ }}} // namespaces

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html index d2e323f95..50a18db90 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html @@ -28,7 +28,7 @@ Minima: Brent's algorithm

- + synopsis

@@ -45,7 +45,7 @@ std::pair<T, T> brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter);

- + Description

@@ -90,7 +90,7 @@ the abscissa at the minima and the value of f(x) at the minima.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html index 6df6d86f9..4cf43c920 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html @@ -28,7 +28,7 @@ and Rational Function Evaluation

- + synopsis

@@ -79,7 +79,7 @@ V evaluate_rational(const T* num, const U* denom, V z, unsigned count);

- + Description

@@ -193,7 +193,7 @@ evaluation with compile-time array sizes may offer slightly better performance.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html index 883d4a2b0..a815fc1b6 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html @@ -28,7 +28,7 @@ With Derivatives: Newton-Raphson, Halley & Schroeder

- + Synopsis

@@ -62,7 +62,7 @@ }}} // namespaces

- + Description

@@ -206,7 +206,7 @@

- + Newton Raphson Method
@@ -224,7 +224,7 @@ iteration.

- + Halley's Method
@@ -246,7 +246,7 @@ iteration.

- + Schroeder's Method
@@ -270,7 +270,7 @@ iteration.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html index aad0827f5..aebea04bd 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html @@ -28,7 +28,7 @@ Without Derivatives: Bisection, Bracket and TOMS748

- + Synopsis

@@ -144,7 +144,7 @@ }}} // namespaces

- + Description

@@ -181,7 +181,7 @@ to be used only rarely, but may be useful in some specific circumstances.

- + Bisection
template <class F, class T, class Tol>
@@ -280,7 +280,7 @@
           tol was satisfied.
         

- + Bracket and solve
@@ -388,7 +388,7 @@ was satisfied.

- + Algorithm TOMS 748: Alefeld, Potra and Shi: Enclosing zeros of continuous functions
@@ -554,7 +554,7 @@ as soon as both ends of the interval round to the same nearest integer.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html index 415dcc2d2..e6fb8752f 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html @@ -28,7 +28,7 @@ Evaluation

- + Synopsis

@@ -70,7 +70,7 @@ }}} // namespaces

- + Description

@@ -127,7 +127,7 @@ summation in this way.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/tuples.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/tuples.html index aed7a2ec3..c06f0f2a5 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/tuples.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/tuples.html @@ -27,7 +27,7 @@ Tuples

- + Synopsis

@@ -38,7 +38,7 @@

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html index 86b8665b0..d25580c79 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html @@ -28,7 +28,7 @@ Error and Testing

- + Synopsis

@@ -45,7 +45,7 @@ test_result<see-below> test(const A& a, F1 test_func, F2 expect_func);

- + Description
template <class T>
@@ -157,7 +157,7 @@
           is mainly a debugging/development aid (and a good place for a breakpoint).
         

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html index f897078de..2dd90d464 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html @@ -27,7 +27,7 @@ Polynomials

- + Synopsis

@@ -103,7 +103,7 @@ }}} // namespaces

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html index 70783476f..31d5c4535 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html @@ -46,7 +46,7 @@

- + Synopsis
namespace boost{ namespace math{ namespace tools{
@@ -147,7 +147,7 @@
 }}} // namespaces
 
- + Description

@@ -177,7 +177,7 @@

- + Example 1: Output Data for Graph Plotting
@@ -211,7 +211,7 @@

- + Example 2: Creating Test Data
@@ -376,7 +376,7 @@ used by default as it's rather hard on the compiler when the table is large.

- + Example 3: Profiling a Continued Fraction for Convergence and Accuracy
@@ -482,7 +482,7 @@ of a and z.

- + reference

diff --git a/doc/sf_and_dist/html/math_toolkit/using_udt/archetypes.html b/doc/sf_and_dist/html/math_toolkit/using_udt/archetypes.html index d32535cbe..bd9be85f6 100644 --- a/doc/sf_and_dist/html/math_toolkit/using_udt/archetypes.html +++ b/doc/sf_and_dist/html/math_toolkit/using_udt/archetypes.html @@ -39,7 +39,7 @@

- + Real concept

@@ -84,7 +84,7 @@ declaration.

- + Testing the real concept

@@ -130,7 +130,7 @@ double, also tests real_concept.

- + Distribution Concept

@@ -166,7 +166,7 @@ class for distribution types.

- + Testing the distribution concept

diff --git a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html index 241b7a445..39f6cc636 100644 --- a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html +++ b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html @@ -42,7 +42,7 @@ behaves just like a built in floating point type.

- + Basic Arithmetic Requirements
@@ -1035,7 +1035,7 @@
- + Standard Library Support Requirements
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets.html b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets.html index fe3650621..6007082f8 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets.html @@ -35,7 +35,7 @@
Design Rationale
- + Synopsis
namespace boost{ namespace math
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/examples.html b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/examples.html
index 8f1a438d6..451be4565 100644
--- a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/examples.html
+++ b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/examples.html
@@ -27,7 +27,7 @@
 Examples
 
 
- + Simple example with std::stringstreams
@@ -64,7 +64,7 @@

- + Use with lexical_cast
@@ -149,7 +149,7 @@ s >> input_value;
- + Use with serialization archives
@@ -194,7 +194,7 @@ archives do not check the stream state.

- + Other examples
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/intro.html b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/intro.html index 10ec552e3..a9d2dc23e 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/intro.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/intro.html @@ -27,7 +27,7 @@ Introduction
- + The Problem

@@ -51,7 +51,7 @@ assert(inf == y); // Fails!

- + The Solution

@@ -95,6 +95,16 @@

+
+ + + + + +
[Tip]Tip

+ To just change an input or output stream, you can concisely write cout.imbue (std::locale(std::locale(), + new boost::math::nonfinite_num_put<char>)); or cin.imbue (std::locale(std::locale(), new boost::math::nonfinite_num_get<char>)); +

@@ -119,7 +129,7 @@

- + C++0X standard for output of infinity and NaN
@@ -131,7 +141,7 @@ portable.

- + C99 standard for output of infinity and NaN
@@ -221,7 +231,7 @@ formats.

- + Signaling NaNs
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/reference.html b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/reference.html index 06fa98c59..ed1d75da5 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/reference.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/fp_facets/reference.html @@ -27,7 +27,7 @@ Reference
- + The Facet nonfinite_num_put
@@ -138,7 +138,7 @@ numbers is simply delegated to the normal std::num_put.

- + Facet nonfinite_num_get
@@ -254,7 +254,7 @@ on a platform that lacks NaN, then the fail bit of the stream is set.

- + Flags

@@ -284,7 +284,7 @@ and live in the namespace boost::math.

- + legacy

@@ -392,7 +392,7 @@ library, and also string representations used by other programming languages.

- + signed_zero

@@ -412,7 +412,7 @@ as negative zero, as do most implementations of std::num_get.

- + trap_infinity

@@ -437,7 +437,7 @@ (See Design Rationale below for a discussion of this inconsistency.)

- + trap_nan

diff --git a/doc/sf_and_dist/html/math_toolkit/utils/fpclass.html b/doc/sf_and_dist/html/math_toolkit/utils/fpclass.html index 5b51753cd..961c4e721 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/fpclass.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/fpclass.html @@ -28,7 +28,7 @@ Infinities and NaNs

- + Synopsis
#define FP_ZERO        /* implementation specific value */
@@ -58,7 +58,7 @@
         to use these functions.
       

- + Description

@@ -217,7 +217,7 @@ infinite, NaN, or denormalised).

- + Floating-point format
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_advance.html b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_advance.html index f40ff20a7..a54ffda81 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_advance.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_advance.html @@ -32,7 +32,7 @@ number of ULP.

- + Synopsis

@@ -50,7 +50,7 @@ }} // namespaces

- + Description - float_advance
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_distance.html b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_distance.html index 9c1ec2233..8430491b8 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_distance.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_distance.html @@ -34,7 +34,7 @@ different.

- + Synopsis

@@ -52,7 +52,7 @@ }} // namespaces

- + Description - float_distance
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_next.html b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_next.html index 6992535df..65f1dfc35 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_next.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_next.html @@ -28,7 +28,7 @@ Next Greater Representable Value (float_next)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_next
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_prior.html b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_prior.html index 3131f114f..e93a852dd 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_prior.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/next_float/float_prior.html @@ -28,7 +28,7 @@ the Next Smaller Representable Value (float_prior)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_prior
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/next_float/nextafter.html b/doc/sf_and_dist/html/math_toolkit/utils/next_float/nextafter.html index e05e05b5d..60c495660 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/next_float/nextafter.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/next_float/nextafter.html @@ -28,7 +28,7 @@ Next Representable Value in a Specific Direction (nextafter)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - nextafter
@@ -76,7 +76,7 @@ returns an overflow_error.

- + Examples - nextafter
diff --git a/doc/sf_and_dist/html/math_toolkit/utils/sign_functions.html b/doc/sf_and_dist/html/math_toolkit/utils/sign_functions.html index e292a8bdc..b9bd763d6 100644 --- a/doc/sf_and_dist/html/math_toolkit/utils/sign_functions.html +++ b/doc/sf_and_dist/html/math_toolkit/utils/sign_functions.html @@ -28,7 +28,7 @@ Functions
- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description
template<class T> 
@@ -119,7 +119,7 @@
         may be the only portable way to ensure that the sign bit is changed.
       

- + Sign bits

@@ -140,7 +140,7 @@ it may be necessary to explicitly specialize then for UDT type T.

- + Examples
signbit(3.5) is zero (or false)
@@ -153,7 +153,7 @@
 changesign(-1.8) is 1.8
 
- + Portability

diff --git a/doc/sf_and_dist/index.idx b/doc/sf_and_dist/index.idx index a6c3a37d7..e768a958e 100644 --- a/doc/sf_and_dist/index.idx +++ b/doc/sf_and_dist/index.idx @@ -11,6 +11,7 @@ !exclude a abs acos add asin atan atan2 b begin bracket ceil check clear !exclude cos cosh digits end exp fabs floor fmod frexp g if in log log10 !exclude modf pow real result sin sinh sqrt swap tan tanh s f z +!exclude accuracy # # These next two are spuriously found as function names, take them out # and re-add them as macros: @@ -30,3 +31,4 @@ BOOST_MATH_INSTRUMENT_CODE "" "" macro_name + diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 5587cc5a2..ec6bf36d0 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -498,23 +498,12 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22. [endsect] [/section:status Status and Roadmap] -[? enable_index -''' - - Function Index - - - Class Index - - - Typedef Index - - - Macro Index - - -''' -] +[include ../../../../tools/auto_index/include/auto_index_helpers.qbk] +[named_index function_name Function Index] +[named_index class_name Class Index] +[named_index typedef_name Typedef Index] +[named_index macro_name Macro Index] +[index] [/ math.qbk Copyright 2008, 2010 John Maddock and Paul A. Bristow. @@ -523,3 +512,4 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22. http://www.boost.org/LICENSE_1_0.txt). ] + diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index ce55a773b..fce95766d 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -1,9 +1,22 @@ [template history[] +[h4 Boost-1.48] + +* Added new series evaluation methods to the cyclic Bessel I, J, K and Y functions. +Also taken great care to avoid spurious over and underflow of these functions. +Fixes issue [@https://svn.boost.org/trac/boost/ticket/5560 #5560] + +* Added an example of using Inverse Chi-Squared distribution for Bayesian statistics, +provided by Thomas Mang. + +* Added tests to use improved version of lexical_cast which handles C99 nonfinites without using globale facets. + +* Corrected wrong out-of-bound uniform distribution CDF complement values https://svn.boost.org/trac/boost/ticket/5733 #5733. + [h4 Boost-1.47] * Added changesign function to sign.hpp to facilitate addition of nonfinite facets. -* Addition of nonfinite facetsfrom Johan Rade, with tests, +* Addition of nonfinite facets from Johan Rade, with tests, examples of use for C99 format infinity and NaN, and documentation. * Added tests and documentation of changesign from Johan Rade. diff --git a/example/inverse_chi_squared_bayes_eg.cpp b/example/inverse_chi_squared_bayes_eg.cpp new file mode 100644 index 000000000..6323d0ee5 --- /dev/null +++ b/example/inverse_chi_squared_bayes_eg.cpp @@ -0,0 +1,338 @@ +// inverse_chi_squared_bayes_eg.cpp + +// Copyright Thomas Mang 2011. +// Copyright Paul A. Bristow 2011. + +// 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) + +// This file is written to be included from a Quickbook .qbk document. +// It can still be compiled by the C++ compiler, and run. +// Any output can also be added here as comment or included or pasted in elsewhere. +// Caution: this file contains Quickbook markup as well as code +// and comments: don't change any of the special comment markups! + +#include +// using std::cout; using std::endl; + +//#define define possible error-handling macros here? + +#include "boost/math/distributions.hpp" +// using ::boost::math::inverse_chi_squared; + +int main() +{ + using std::cout; using std::endl; + + using ::boost::math::inverse_chi_squared; + using ::boost::math::inverse_gamma; + using ::boost::math::quantile; + using ::boost::math::cdf; + + cout << "Inverse_chi_squared_distribution Bayes example: " << endl < 50. +For this task, we use calls to the `boost::math::` functions `cdf` and `complement`, +respectively, and find a probability of about 0.031 (3.1%) for each case. +*/ + + cout << " probability variance <= 15: " << boost::math::cdf(prior, 15.0) << endl; + cout << " probability variance <= 25: " << boost::math::cdf(prior, 25.0) << endl; + cout << " probability variance > 50: " + << boost::math::cdf(boost::math::complement(prior, 50.0)) + << endl << endl; + //] [/inverse_chi_squared_bayes_eg_2] + +//[inverse_chi_squared_bayes_eg_output_2 +/*`This produces this output: + + probability variance <= 15: 0.031 + probability variance <= 25: 0.458 + probability variance > 50: 0.0318 + +*/ +//] [/inverse_chi_squared_bayes_eg_output_2] + +//[inverse_chi_squared_bayes_eg_3 +/*`Therefore, only 3.1% of all precision machines produce balls with a variance of 15 or less +(particularly precise machines), +but also only 3.2% of all machines produce balls +with a variance of as high as 50 or more (particularly imprecise machines). Moreover, slightly more than +one-half (1 - 0.458 = 54.2%) of the machines work at a variance greater than 25. + +Notice here the distinction between a +[@http://en.wikipedia.org/wiki/Bayesian_inference Bayesian] analysis and a +[@http://en.wikipedia.org/wiki/Frequentist_inference frequentist] analysis: +because we model the variance as random variable itself, +we can calculate and straightforwardly interpret probabilities for given parameter values directly, +while such an approach is not possible (and interpretationally a strict ['must-not]) in the frequentist +world. + +[h5 Step 2: Investigate a single machine] + +In the second step, we investigate a single machine, +which is suspected to suffer from a major fault +as the produced balls show fairly high size variability. +Based on the prior distribution of generic machinery performance (derived above) +and data on balls produced by the suspect machine, we calculate the posterior distribution for that +machine and use its properties for guidance regarding continued machine operation or suspension. + +It can be shown that if the prior distribution +was chosen to be scaled-inverse-chi-square distributed, +then the posterior distribution is also scaled-inverse-chi-squared-distributed +(prior and posterior distributions are hence conjugate). +For more details regarding conjugacy and formula to derive the parameters set +for the posterior distribution see +[@http://en.wikipedia.org/wiki/Conjugate_prior Conjugate prior]. + + +Given the prior distribution parameters and sample data (of size n), the posterior distribution parameters +are given by the two expressions: + +__spaces [nu][sub posterior] = [nu][sub prior] + n + +which gives the posteriorDF below, and + +__spaces s[sub posterior] = ([nu][sub prior]s[sub prior] + [Sigma][super n][sub i=1](x[sub i] - [mu])[super 2]) / ([nu][sub prior] + n) + +which after some rearrangement gives the formula for the posteriorScale below. + +Machine-specific data consist of 100 balls which were accurately measured +and show the expected mean of 3000 [mu]m and a sample variance of 55 (calculated for a sample mean defined to be 3000 exactly). +From these data, the prior parameterization, and noting that the term +[Sigma][super n][sub i=1](x[sub i] - [mu])[super 2] equals the sample variance multiplied by n - 1, +it follows that the posterior distribution of the variance parameter +is scaled-inverse-chi-squared distribution with degrees-of-freedom ([nu][sub posterior]) = 120 and +scale (s[sub posterior]) = 49.54. +*/ + + int ballsSampleSize = 100; + cout <<"balls sample size: " << ballsSampleSize << endl; + double ballsSampleVariance = 55.0; + cout <<"balls sample variance: " << ballsSampleVariance << endl; + + double posteriorDF = priorDF + ballsSampleSize; + cout << "prior degrees-of-freedom: " << priorDF << endl; + cout << "posterior degrees-of-freedom: " << posteriorDF << endl; + + double posteriorScale = + (priorDF * priorScale + (ballsSampleVariance * (ballsSampleSize - 1))) / posteriorDF; + cout << "prior scale: " << priorScale << endl; + cout << "posterior scale: " << posteriorScale << endl; + +/*`An interesting feature here is that one needs only to know a summary statistics of the sample +to parameterize the posterior distribution: the 100 individual ball measurements are irrelevant, +just knowledge of the sample variance and number of measurements is sufficient. +*/ + +//] [/inverse_chi_squared_bayes_eg_3] + +//[inverse_chi_squared_bayes_eg_output_3 +/*`That produces this output: + + + balls sample size: 100 + balls sample variance: 55 + prior degrees-of-freedom: 20 + posterior degrees-of-freedom: 120 + prior scale: 25 + posterior scale: 49.5 + + */ +//] [/inverse_chi_squared_bayes_eg_output_3] + +//[inverse_chi_squared_bayes_eg_4 +/*`To compare the generic machinery performance with our suspect machine, +we calculate again the same quantiles and probabilities as above, +and find a distribution clearly shifted to greater values (see figure). + +[graph prior_posterior_plot] + +*/ + + inverse_chi_squared posterior(posteriorDF, posteriorScale); + + cout << "Posterior distribution:" << endl << endl; + cout << " 2.5% quantile: " << boost::math::quantile(posterior, 0.025) << endl; + cout << " 50% quantile: " << boost::math::quantile(posterior, 0.5) << endl; + cout << " 97.5% quantile: " << boost::math::quantile(posterior, 0.975) << endl << endl; + + cout << " probability variance <= 15: " << boost::math::cdf(posterior, 15.0) << endl; + cout << " probability variance <= 25: " << boost::math::cdf(posterior, 25.0) << endl; + cout << " probability variance > 50: " + << boost::math::cdf(boost::math::complement(posterior, 50.0)) << endl; + +//] [/inverse_chi_squared_bayes_eg_4] + +//[inverse_chi_squared_bayes_eg_output_4 +/*`This produces this output: + + Posterior distribution: + + 2.5% quantile: 39.1 + 50% quantile: 49.8 + 97.5% quantile: 64.9 + + probability variance <= 15: 2.97e-031 + probability variance <= 25: 8.85e-010 + probability variance > 50: 0.489 + +*/ +//] [/inverse_chi_squared_bayes_eg_output_4] + +//[inverse_chi_squared_bayes_eg_5 +/*`Indeed, the probability that the machine works at a low variance (<= 15) is almost zero, +and even the probability of working at average or better performance is negligibly small +(less than one-millionth of a permille). +On the other hand, with an almost near-half probability (49%), the machine operates in the +extreme high variance range of > 50 characteristic for poorly performing machines. + +Based on this information the operation of the machine is taken out of use and serviced. + +In summary, the Bayesian analysis allowed us to make exact probabilistic statements about a +parameter of interest, and hence provided us results with straightforward interpretation. + +*/ +//] [/inverse_chi_squared_bayes_eg_5] + +} // int main() + +//[inverse_chi_squared_bayes_eg_output +/*` +[pre + Inverse_chi_squared_distribution Bayes example: + + Prior distribution: + + 2.5% quantile: 14.6 + 50% quantile: 25.9 + 97.5% quantile: 52.1 + + probability variance <= 15: 0.031 + probability variance <= 25: 0.458 + probability variance > 50: 0.0318 + + balls sample size: 100 + balls sample variance: 55 + prior degrees-of-freedom: 20 + posterior degrees-of-freedom: 120 + prior scale: 25 + posterior scale: 49.5 + Posterior distribution: + + 2.5% quantile: 39.1 + 50% quantile: 49.8 + 97.5% quantile: 64.9 + + probability variance <= 15: 2.97e-031 + probability variance <= 25: 8.85e-010 + probability variance > 50: 0.489 + +] [/pre] +*/ +//] [/inverse_chi_squared_bayes_eg_output] diff --git a/example/lexical_cast_nonfinite_facets.cpp b/example/lexical_cast_nonfinite_facets.cpp index 71360915d..ecbda89ae 100644 --- a/example/lexical_cast_nonfinite_facets.cpp +++ b/example/lexical_cast_nonfinite_facets.cpp @@ -100,10 +100,11 @@ int main () cout << "-std::numeric_limits::infinity() = " << minus_infinity << endl; cout << "+std::numeric_limits::quiet_NaN () = " << NaN << endl; - // Now try some 'round-tripping', 'reading' "inf" + // Now try some 'round-tripping', 'reading' "inf". double x = boost::lexical_cast("inf"); // and check we get a floating-point infinity. BOOST_ASSERT(x == std::numeric_limits::infinity()); + cout << "boost::lexical_cast(\"inf\") = " << x << endl; // Check we can convert the other way from floating-point infinity, string s = boost::lexical_cast(numeric_limits::infinity()); @@ -121,11 +122,12 @@ int main () /* Output: - finite_num_facet with lexical_cast example. - Using C99_out_locale + Using C99_out_locale +std::numeric_limits::infinity() = inf -std::numeric_limits::infinity() = -inf +std::numeric_limits::quiet_NaN () = nan + boost::lexical_cast("inf") = inf + */ diff --git a/example/nonfinite_facet_simple.cpp b/example/nonfinite_facet_simple.cpp index 9a0a2027f..f6f7e5358 100644 --- a/example/nonfinite_facet_simple.cpp +++ b/example/nonfinite_facet_simple.cpp @@ -84,6 +84,9 @@ int main () // and create a NaN (NotANumber) double NaN = +std::numeric_limits::quiet_NaN (); + double negated_NaN = (boost::math::changesign)(std::numeric_limits::quiet_NaN ()); + + // Output the nonfinite values using the current (default C) locale. // The default representations differ from system to system, // for example, using Microsoft compilers, 1.#INF, -1.#INF, and 1.#QNAN. @@ -91,6 +94,9 @@ int main () cout << "+std::numeric_limits::infinity() = " << plus_infinity << endl; cout << "-std::numeric_limits::infinity() = " << minus_infinity << endl; cout << "+std::numeric_limits::quiet_NaN () = " << NaN << endl; + + // Display negated NaN. + cout << "negated NaN " << negated_NaN << endl; // "-1.IND" // Create a new output locale, and add the nonfinite_num_put facet std::locale C99_out_locale (default_locale, new boost::math::nonfinite_num_put); @@ -106,6 +112,8 @@ int main () cout << "-std::numeric_limits::infinity() = " << minus_infinity << endl; cout << "+std::numeric_limits::quiet_NaN () = " << NaN << endl; + // Display negated NaN. + cout << "negated NaN " << negated_NaN << endl; // -nan // Create a string with the expected C99 representation of plus infinity. std::string inf = "inf"; diff --git a/example/nonfinite_serialization_archives.cpp b/example/nonfinite_serialization_archives.cpp index 0ab158bc9..355108f94 100644 --- a/example/nonfinite_serialization_archives.cpp +++ b/example/nonfinite_serialization_archives.cpp @@ -29,7 +29,6 @@ values in text and xml archives can be handled correctly and portably. #ifdef _MSC_VER -# pragma warning (disable :4224) # pragma warning(disable : 4127) // conditional expression is constant. #endif diff --git a/include/boost/math/bindings/e_float.hpp b/include/boost/math/bindings/e_float.hpp index d3d72e7ce..959bff109 100644 --- a/include/boost/math/bindings/e_float.hpp +++ b/include/boost/math/bindings/e_float.hpp @@ -185,7 +185,7 @@ private: term = floor(f); e -= 30; m_value *= shift; - m_value += ::e_float(static_cast(term)); + m_value += ::e_float(static_cast(term)); f -= term; } m_value *= ::ef::pow2(e); diff --git a/include/boost/math/bindings/mpfr.hpp b/include/boost/math/bindings/mpfr.hpp index 5b773e798..95be0ee2b 100644 --- a/include/boost/math/bindings/mpfr.hpp +++ b/include/boost/math/bindings/mpfr.hpp @@ -65,7 +65,7 @@ inline mpfr_class frexp(const mpfr_class& v, int* expon) return result; } -mpfr_class fmod(const mpfr_class& v1, const mpfr_class& v2) +inline mpfr_class fmod(const mpfr_class& v1, const mpfr_class& v2) { mpfr_class n; if(v1 < 0) @@ -449,7 +449,7 @@ mpfr_class digamma_imp(mpfr_class x, const mpl::int_<0>* , const Policy& pol) // starting guess for Halley iteration: // template -mpfr_class erf_inv_imp(const mpfr_class& p, const mpfr_class& q, const Policy&, const boost::mpl::int_<64>*) +inline mpfr_class erf_inv_imp(const mpfr_class& p, const mpfr_class& q, const Policy&, const boost::mpl::int_<64>*) { BOOST_MATH_STD_USING // for ADL of std names. @@ -705,7 +705,7 @@ mpfr_class erf_inv_imp(const mpfr_class& p, const mpfr_class& q, const Policy&, return result; } -mpfr_class bessel_i0(mpfr_class x) +inline mpfr_class bessel_i0(mpfr_class x) { static const mpfr_class P1[] = { boost::lexical_cast("-2.2335582639474375249e+15"), @@ -780,7 +780,7 @@ mpfr_class bessel_i0(mpfr_class x) return value; } -mpfr_class bessel_i1(mpfr_class x) +inline mpfr_class bessel_i1(mpfr_class x) { static const mpfr_class P1[] = { static_cast("-1.4577180278143463643e+15"), diff --git a/include/boost/math/distributions/non_central_beta.hpp b/include/boost/math/distributions/non_central_beta.hpp index 7ab3421d1..041e1bb36 100644 --- a/include/boost/math/distributions/non_central_beta.hpp +++ b/include/boost/math/distributions/non_central_beta.hpp @@ -664,7 +664,7 @@ namespace boost #else value_type result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); #endif - policies::check_series_iterations(function, max_iter, pol); + policies::check_series_iterations(function, max_iter, pol); return policies::checked_narrowing_cast(result, function); } diff --git a/include/boost/math/distributions/uniform.hpp b/include/boost/math/distributions/uniform.hpp index 5d967a17f..3645b2039 100644 --- a/include/boost/math/distributions/uniform.hpp +++ b/include/boost/math/distributions/uniform.hpp @@ -248,11 +248,11 @@ namespace boost{ namespace math } if (x < lower) { - return 0; + return 1; } if (x > upper) { - return 1; + return 0; } return (upper - x) / (upper - lower); } // RealType cdf(const complemented2_type, RealType>& c) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index 833ae4901..8e1b96d6f 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -627,22 +627,22 @@ inline R checked_narrowing_cast(T val, const char* function) return static_cast(val); } -template +template inline void check_series_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) { if(max_iter >= policies::get_max_series_iterations()) - raise_evaluation_error( + raise_evaluation_error( function, - "Series evaluation exceeded %1% iterations, giving up now.", max_iter, pol); + "Series evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); } -template +template inline void check_root_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) { if(max_iter >= policies::get_max_root_iterations()) - raise_evaluation_error( + raise_evaluation_error( function, - "Root finding evaluation exceeded %1% iterations, giving up now.", max_iter, pol); + "Root finding evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); } } //namespace policies diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp index 1cf37de69..5c68b44a2 100644 --- a/include/boost/math/special_functions/bessel.hpp +++ b/include/boost/math/special_functions/bessel.hpp @@ -29,38 +29,12 @@ #include #include #include +#include namespace boost{ namespace math{ namespace detail{ -template -struct bessel_j_small_z_series_term -{ - typedef T result_type; - - bessel_j_small_z_series_term(T v_, T x) - : N(0), v(v_) - { - BOOST_MATH_STD_USING - mult = x / 2; - term = pow(mult, v) / boost::math::tgamma(v+1, Policy()); - mult *= -mult; - } - T operator()() - { - T r = term; - ++N; - term *= mult / (N * (N + v)); - return r; - } -private: - unsigned N; - T v; - T mult; - T term; -}; - template struct sph_bessel_j_small_z_series_term { @@ -88,21 +62,6 @@ private: T term; }; -template -inline T bessel_j_small_z_series(T v, T x, const Policy& pol) -{ - bessel_j_small_z_series_term s(v, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) - T zero = 0; - T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); -#else - T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); -#endif - policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); - return result; -} - template inline T sph_bessel_j_small_z_series(unsigned v, T x, const Policy& pol) { @@ -115,7 +74,7 @@ inline T sph_bessel_j_small_z_series(unsigned v, T x, const Policy& pol) #else T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); #endif - policies::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); return result * sqrt(constants::pi() / 4); } @@ -206,6 +165,61 @@ inline T sph_bessel_j_imp(unsigned n, T x, const Policy& pol) * cyl_bessel_j_imp(T(T(n)+T(0.5f)), x, bessel_no_int_tag(), pol); } +template +struct cyl_bessel_i_small_z +{ + typedef T result_type; + + cyl_bessel_i_small_z(T v_, T z_) : k(0), v(v_), mult(z_*z_/4) + { + BOOST_MATH_STD_USING + term = 1; + } + + T operator()() + { + T result = term; + ++k; + term *= mult / k; + term /= k + v; + return result; + } +private: + unsigned k; + T v; + T term; + T mult; +}; + +template +inline T bessel_i_small_z_series(T v, T x, const Policy& pol) +{ + BOOST_MATH_STD_USING + T prefix; + if(v < max_factorial::value) + { + prefix = pow(x / 2, v) / boost::math::tgamma(v + 1, pol); + } + else + { + prefix = v * log(x / 2) - boost::math::lgamma(v + 1, pol); + prefix = exp(prefix); + } + if(prefix == 0) + return prefix; + + cyl_bessel_i_small_z s(v, x); + boost::uintmax_t max_iter = policies::get_max_series_iterations(); +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + T zero = 0; + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); +#else + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); +#endif + policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); + return prefix * result; +} + template T cyl_bessel_i_imp(T v, T x, const Policy& pol) { @@ -256,6 +270,8 @@ T cyl_bessel_i_imp(T v, T x, const Policy& pol) return bessel_i1(x); } } + if((x / v < 0.25) && (v > 0)) + return bessel_i_small_z_series(v, x, pol); T I, K; bessel_ik(v, x, &I, &K, need_i, pol); return I; diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index b68834c75..d0599bc6e 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -506,7 +506,7 @@ T ibeta_series(T a, T b, T x, T s0, const L&, bool normalised, T* p_derivative, ibeta_series_t s(a, b, x, result); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); - policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (with lanczos)", max_iter, pol); + policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (with lanczos)", max_iter, pol); return result; } // @@ -585,7 +585,7 @@ T ibeta_series(T a, T b, T x, T s0, const boost::math::lanczos::undefined_lanczo ibeta_series_t s(a, b, x, result); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); - policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (without lanczos)", max_iter, pol); + policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (without lanczos)", max_iter, pol); return result; } diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 489c2b81a..93102c1cb 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -24,13 +24,13 @@ T cos_pi_imp(T x, const Policy& pol) BOOST_MATH_STD_USING // ADL of std names // cos of pi*x: bool invert = false; - if(x < 0.5) + if(fabs(x) < 0.5) return cos(constants::pi() * x); + if(x < 1) { x = -x; } - T rem = floor(x); if(itrunc(rem, pol) & 1) invert = !invert; diff --git a/include/boost/math/special_functions/detail/bessel_ik.hpp b/include/boost/math/special_functions/detail/bessel_ik.hpp index 94b5314d3..c98dd15a2 100644 --- a/include/boost/math/special_functions/detail/bessel_ik.hpp +++ b/include/boost/math/special_functions/detail/bessel_ik.hpp @@ -81,7 +81,7 @@ int temme_ik(T v, T x, T* K, T* K1, const Policy& pol) break; } } - policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in temme_ik", k, pol); + policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in temme_ik", k, pol); *K = sum; *K1 = 2 * sum1 / x; @@ -128,7 +128,7 @@ int CF1_ik(T v, T x, T* fv, const Policy& pol) } } BOOST_MATH_INSTRUMENT_VARIABLE(k); - policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF1_ik", k, pol); + policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF1_ik", k, pol); *fv = f; @@ -193,7 +193,7 @@ int CF2_ik(T v, T x, T* Kv, T* Kv1, const Policy& pol) break; } } - policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF2_ik", k, pol); + policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF2_ik", k, pol); *Kv = sqrt(pi() / (2 * x)) * exp(-x) / S; *Kv1 = *Kv * (0.5f + v + x + (v * v - 0.25f) * f) / x; @@ -219,6 +219,7 @@ int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) T W, current, prev, next; bool reflect = false; unsigned n, k; + int org_kind = kind; BOOST_MATH_INSTRUMENT_VARIABLE(v); BOOST_MATH_INSTRUMENT_VARIABLE(x); BOOST_MATH_INSTRUMENT_VARIABLE(kind); @@ -283,9 +284,17 @@ int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) } prev = Ku; current = Ku1; + T scale = 1; for (k = 1; k <= n; k++) // forward recurrence for K { - next = 2 * (u + k) * current / x + prev; + T fact = 2 * (u + k) / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + prev /= current; + scale /= current; + current = 1; + } + next = fact * current + prev; prev = current; current = next; } @@ -306,10 +315,14 @@ int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) // to get here - probably we're going to overflow: Iv = asymptotic_bessel_i_large_x(v, x, pol); } + else if((x / v < 0.25) && (v > 0)) + { + Iv = bessel_i_small_z_series(v, x, pol); + } else { CF1_ik(v, x, &fv, pol); // continued fraction CF1_ik - Iv = W / (Kv * fv + Kv1); // Wronskian relation + Iv = scale * W / (Kv * fv + Kv1); // Wronskian relation } } else @@ -318,14 +331,22 @@ int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) if (reflect) { T z = (u + n % 2); - *I = Iv + (2 / pi()) * boost::math::sin_pi(z) * Kv; // reflection formula - *K = Kv; + T fact = (2 / pi()) * (boost::math::sin_pi(z) * Kv); + if(fact == 0) + *I = Iv; + else if(tools::max_value() * scale < fact) + *I = (org_kind & need_i) ? T(sign(fact) * sign(scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); + else + *I = Iv + fact / scale; // reflection formula } else { *I = Iv; - *K = Kv; } + if(tools::max_value() * scale < Kv) + *K = (org_kind & need_k) ? T(sign(Kv) * sign(scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); + else + *K = Kv / scale; BOOST_MATH_INSTRUMENT_VARIABLE(*I); BOOST_MATH_INSTRUMENT_VARIABLE(*K); return 0; diff --git a/include/boost/math/special_functions/detail/bessel_jn.hpp b/include/boost/math/special_functions/detail/bessel_jn.hpp index b759f5408..1b1df7771 100644 --- a/include/boost/math/special_functions/detail/bessel_jn.hpp +++ b/include/boost/math/special_functions/detail/bessel_jn.hpp @@ -14,6 +14,7 @@ #include #include #include +#include // Bessel function of the first kind of integer order // J_n(z) is the minimal solution @@ -63,38 +64,58 @@ T bessel_jn(int n, T x, const Policy& pol) return factor * asymptotic_bessel_j_large_x_2(n, x); BOOST_ASSERT(n > 1); + T scale = 1; if (n < abs(x)) // forward recurrence { prev = bessel_j0(x); current = bessel_j1(x); for (int k = 1; k < n; k++) { - value = 2 * k * current / x - prev; + T fact = 2 * k / x; + if((tools::max_value() - fabs(prev)) / fabs(fact) < fabs(current)) + { + scale /= current; + prev /= current; + current = 1; + } + value = fact * current - prev; prev = current; current = value; } } + else if(x < 1) + { + return factor * bessel_j_small_z_series(T(n), x, pol); + } else // backward recurrence { T fn; int s; // fn = J_(n+1) / J_n // |x| <= n, fast convergence for continued fraction CF1 boost::math::detail::CF1_jy(static_cast(n), x, &fn, &s, pol); - // tiny initial value to prevent overflow - T init = sqrt(tools::min_value()); - prev = fn * init; - current = init; + prev = fn; + current = 1; for (int k = n; k > 0; k--) { - next = 2 * k * current / x - prev; + T fact = 2 * k / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + prev /= current; + scale /= current; + current = 1; + } + next = fact * current - prev; prev = current; current = next; } - T ratio = init / current; // scaling ratio - value = bessel_j0(x) * ratio; // normalization + value = bessel_j0(x) / current; // normalization + scale = 1 / scale; } value *= factor; - return value; + if(tools::max_value() * scale < fabs(value)) + return policies::raise_overflow_error("boost::math::bessel_jn<%1%>(%1%,%1%)", 0, pol); + + return value / scale; } }}} // namespaces diff --git a/include/boost/math/special_functions/detail/bessel_jy.hpp b/include/boost/math/special_functions/detail/bessel_jy.hpp index 727631691..ddedbb7e1 100644 --- a/include/boost/math/special_functions/detail/bessel_jy.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy.hpp @@ -130,7 +130,7 @@ int temme_jy(T v, T x, T* Y, T* Y1, const Policy& pol) break; } } - policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in temme_jy", k, pol); + policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in temme_jy", k, pol); *Y = -sum; *Y1 = -2 * sum1 / x; @@ -172,7 +172,7 @@ int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol) if (abs(delta - 1) < tolerance) { break; } } - policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF1_jy", k / 100, pol); + policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF1_jy", k / 100, pol); *fv = -f; *sign = s; // sign of denominator @@ -254,7 +254,7 @@ int CF2_jy(T v, T x, T* p, T* q, const Policy& pol) break; //std::cout << fr << " " << fi << std::endl; } - policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF2_jy", k, pol); + policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF2_jy", k, pol); *p = fr; *q = fi; @@ -278,6 +278,9 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) bool reflect = false; unsigned n, k; int s; + int org_kind = kind; + T cp = 0; + T sp = 0; static const char* function = "boost::math::bessel_jy<%1%>(%1%,%1%)"; @@ -294,6 +297,13 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) n = iround(v, pol); u = v - n; // -1/2 <= u < 1/2 + if(reflect) + { + T z = (u + n % 2); + cp = boost::math::cos_pi(z, pol); + sp = boost::math::sin_pi(z, pol); + } + if (x == 0) { *J = *Y = policies::raise_overflow_error( @@ -303,6 +313,7 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) // x is positive until reflection W = T(2) / (x * pi()); // Wronskian + T Yv_scale = 1; if((x > 8) && (x < 1000) && hankel_PQ(v, x, &p, &q, pol)) { // @@ -318,6 +329,42 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) Yv = chi * (p * sc + q * cc); Jv = chi * (p * cc - q * sc); } + else if((x < 1) && (u != 0) && (log(policies::get_epsilon() / 2) > v * log((x/2) * (x/2) / v))) + { + // Evaluate using series representations. + // This is particularly important for x << v as in this + // area temme_jy may be slow to converge, if it converges at all. + // Requires x is not an integer. + if(kind&need_j) + Jv = bessel_j_small_z_series(v, x, pol); + else + Jv = std::numeric_limits::quiet_NaN(); + if((org_kind&need_y && (!reflect || (cp != 0))) + || (org_kind & need_j && (reflect && (sp != 0)))) + { + // Only calculate if we need it, and if the reflection formula will actually use it: + Yv = bessel_y_small_z_series(v, x, &Yv_scale, pol); + } + else + Yv = std::numeric_limits::quiet_NaN(); + } + else if((u == 0) && (x < policies::get_epsilon())) + { + // Truncated series evaluation for small x and v an integer, + // much quicker in this area than temme_jy below. + if(kind&need_j) + Jv = bessel_j_small_z_series(v, x, pol); + else + Jv = std::numeric_limits::quiet_NaN(); + if((org_kind&need_y && (!reflect || (cp != 0))) + || (org_kind & need_j && (reflect && (sp != 0)))) + { + // Only calculate if we need it, and if the reflection formula will actually use it: + Yv = bessel_yn_small_z(n, x, &Yv_scale, pol); + } + else + Yv = std::numeric_limits::quiet_NaN(); + } else if (x <= 2) // x in (0, 2] { if(temme_jy(u, x, &Yu, &Yu1, pol)) // Temme series @@ -328,21 +375,30 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) } prev = Yu; current = Yu1; + T scale = 1; for (k = 1; k <= n; k++) // forward recurrence for Y { - next = 2 * (u + k) * current / x - prev; + T fact = 2 * (u + k) / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + scale /= current; + prev /= current; + current = 1; + } + next = fact * current - prev; prev = current; current = next; } - Yv = prev; - Yv1 = current; - if(kind&need_j) - { - CF1_jy(v, x, &fv, &s, pol); // continued fraction CF1_jy - Jv = W / (Yv * fv - Yv1); // Wronskian relation - } - else - Jv = std::numeric_limits::quiet_NaN(); // any value will do, we're not using it. + Yv = prev; + Yv1 = current; + if(kind&need_j) + { + CF1_jy(v, x, &fv, &s, pol); // continued fraction CF1_jy + Jv = scale * W / (Yv * fv - Yv1); // Wronskian relation + } + else + Jv = std::numeric_limits::quiet_NaN(); // any value will do, we're not using it. + Yv_scale = scale; } else // x in (2, \infty) { @@ -350,7 +406,7 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) // define tag type that will dispatch to right limits: typedef typename bessel_asymptotic_tag::type tag_type; - T lim; + T lim, ratio; switch(kind) { case need_j: @@ -388,15 +444,49 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) T init = sqrt(tools::min_value()); prev = fv * s * init; current = s * init; - for (k = n; k > 0; k--) // backward recurrence for J + if(v < max_factorial::value) { - next = 2 * (u + k) * current / x - prev; - prev = current; - current = next; + for (k = n; k > 0; k--) // backward recurrence for J + { + next = 2 * (u + k) * current / x - prev; + prev = current; + current = next; + } + ratio = (s * init) / current; // scaling ratio + // can also call CF1_jy() to get fu, not much difference in precision + fu = prev / current; + } + else + { + // + // When v is large we may get overflow in this calculation + // leading to NaN's and other nasty surprises: + // + bool over = false; + for (k = n; k > 0; k--) // backward recurrence for J + { + T t = 2 * (u + k) / x; + if(tools::max_value() / t < current) + { + over = true; + break; + } + next = t * current - prev; + prev = current; + current = next; + } + if(!over) + { + ratio = (s * init) / current; // scaling ratio + // can also call CF1_jy() to get fu, not much difference in precision + fu = prev / current; + } + else + { + ratio = 0; + fu = 1; + } } - T ratio = (s * init) / current; // scaling ratio - // can also call CF1_jy() to get fu, not much difference in precision - fu = prev / current; CF2_jy(u, x, &p, &q, pol); // continued fraction CF2_jy T t = u / x - fu; // t = J'/J gamma = (p - t) / q; @@ -414,7 +504,14 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) current = Yu1; for (k = 1; k <= n; k++) // forward recurrence for Y { - next = 2 * (u + k) * current / x - prev; + T fact = 2 * (u + k) / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + prev /= current; + Yv_scale /= current; + current = 1; + } + next = fact * current - prev; prev = current; current = next; } @@ -426,14 +523,22 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) if (reflect) { - T z = (u + n % 2); - *J = boost::math::cos_pi(z, pol) * Jv - boost::math::sin_pi(z, pol) * Yv; // reflection formula - *Y = boost::math::sin_pi(z, pol) * Jv + boost::math::cos_pi(z, pol) * Yv; + if(tools::max_value() * fabs(Yv_scale) < fabs(sp * Yv)) + *J = org_kind & need_j ? T(-sign(sp) * sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); + else + *J = cp * Jv - (sp == 0 ? T(0) : T((sp * Yv) / Yv_scale)); // reflection formula + if(tools::max_value() * fabs(Yv_scale) < fabs(cp * Yv)) + *Y = org_kind & need_y ? T(-sign(cp) * sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); + else + *Y = sp * Jv + (cp == 0 ? T(0) : T((cp * Yv) / Yv_scale)); } else { *J = Jv; - *Y = Yv; + if(tools::max_value() * fabs(Yv_scale) < fabs(Yv)) + *Y = org_kind & need_y ? T(sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); + else + *Y = Yv / Yv_scale; } return 0; diff --git a/include/boost/math/special_functions/detail/bessel_jy_series.hpp b/include/boost/math/special_functions/detail/bessel_jy_series.hpp new file mode 100644 index 000000000..b926366eb --- /dev/null +++ b/include/boost/math/special_functions/detail/bessel_jy_series.hpp @@ -0,0 +1,261 @@ +// Copyright (c) 2011 John Maddock +// 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_BESSEL_JN_SERIES_HPP +#define BOOST_MATH_BESSEL_JN_SERIES_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +namespace boost { namespace math { namespace detail{ + +template +struct bessel_j_small_z_series_term +{ + typedef T result_type; + + bessel_j_small_z_series_term(T v_, T x) + : N(0), v(v_) + { + BOOST_MATH_STD_USING + mult = x / 2; + mult *= -mult; + term = 1; + } + T operator()() + { + T r = term; + ++N; + term *= mult / (N * (N + v)); + return r; + } +private: + unsigned N; + T v; + T mult; + T term; +}; +// +// Series evaluation for BesselJ(v, z) as z -> 0. +// See http://functions.wolfram.com/Bessel-TypeFunctions/BesselJ/06/01/04/01/01/0003/ +// Converges rapidly for all z << v. +// +template +inline T bessel_j_small_z_series(T v, T x, const Policy& pol) +{ + BOOST_MATH_STD_USING + T prefix; + if(v < max_factorial::value) + { + prefix = pow(x / 2, v) / boost::math::tgamma(v+1, pol); + } + else + { + prefix = v * log(x / 2) - boost::math::lgamma(v+1, pol); + prefix = exp(prefix); + } + if(0 == prefix) + return prefix; + + bessel_j_small_z_series_term s(v, x); + boost::uintmax_t max_iter = policies::get_max_series_iterations(); +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + T zero = 0; + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); +#else + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); +#endif + policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); + return prefix * result; +} + +template +struct bessel_y_small_z_series_term_a +{ + typedef T result_type; + + bessel_y_small_z_series_term_a(T v_, T x) + : N(0), v(v_) + { + BOOST_MATH_STD_USING + mult = x / 2; + mult *= -mult; + term = 1; + } + T operator()() + { + BOOST_MATH_STD_USING + T r = term; + ++N; + term *= mult / (N * (N - v)); + return r; + } +private: + unsigned N; + T v; + T mult; + T term; +}; + +template +struct bessel_y_small_z_series_term_b +{ + typedef T result_type; + + bessel_y_small_z_series_term_b(T v_, T x) + : N(0), v(v_) + { + BOOST_MATH_STD_USING + mult = x / 2; + mult *= -mult; + term = 1; + } + T operator()() + { + T r = term; + ++N; + term *= mult / (N * (N + v)); + return r; + } +private: + unsigned N; + T v; + T mult; + T term; +}; +// +// Series form for BesselY as z -> 0, +// see: http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/06/01/04/01/01/0003/ +// This series is only useful when the second term is small compared to the first +// otherwise we get catestrophic cancellation errors. +// +// Approximating tgamma(v) by v^v, and assuming |tgamma(-z)| < eps we end up requiring: +// eps/2 * v^v(x/2)^-v > (x/2)^v or log(eps/2) > v log((x/2)^2/v) +// +template +inline T bessel_y_small_z_series(T v, T x, T* pscale, const Policy& pol) +{ + BOOST_MATH_STD_USING + static const char* function = "bessel_y_small_z_series<%1%>(%1%,%1%)"; + T prefix; + T gam; + T p = log(x / 2); + T scale = 1; + bool need_logs = (v >= max_factorial::value) || (tools::log_max_value() / v < fabs(p)); + if(!need_logs) + { + gam = boost::math::tgamma(v, pol); + p = pow(x / 2, v); + if(tools::max_value() * p < gam) + { + scale /= gam; + gam = 1; + if(tools::max_value() * p < gam) + { + return -policies::raise_overflow_error(function, 0, pol); + } + } + prefix = -gam / (constants::pi() * p); + } + else + { + gam = boost::math::lgamma(v, pol); + p = v * p; + prefix = gam - log(constants::pi()) - p; + if(tools::log_max_value() < prefix) + { + prefix -= log(tools::max_value() / 4); + scale /= (tools::max_value() / 4); + if(tools::log_max_value() < prefix) + { + return -policies::raise_overflow_error(function, 0, pol); + } + } + prefix = -exp(prefix); + } + bessel_y_small_z_series_term_a s(v, x); + boost::uintmax_t max_iter = policies::get_max_series_iterations(); + *pscale = scale; +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + T zero = 0; + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); +#else + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); +#endif + policies::check_series_iterations("boost::math::bessel_y_small_z_series<%1%>(%1%,%1%)", max_iter, pol); + result *= prefix; + + if(!need_logs) + { + prefix = boost::math::tgamma(-v, pol) * boost::math::cos_pi(v) * p / constants::pi(); + } + else + { + int s; + prefix = boost::math::lgamma(-v, &s, pol) + p; + prefix = exp(prefix) * s / constants::pi(); + } + bessel_y_small_z_series_term_b s2(v, x); + max_iter = policies::get_max_series_iterations(); +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + T b = boost::math::tools::sum_series(s2, boost::math::policies::get_epsilon(), max_iter, zero); +#else + T b = boost::math::tools::sum_series(s2, boost::math::policies::get_epsilon(), max_iter); +#endif + result -= scale * prefix * b; + return result; +} + +template +T bessel_yn_small_z(int n, T z, T* scale, const Policy& pol) +{ + // + // See http://functions.wolfram.com/Bessel-TypeFunctions/BesselY/06/01/04/01/02/ + // + // Note that when called we assume that x < epsilon and n is a positive integer. + // + BOOST_MATH_STD_USING + BOOST_ASSERT(n >= 0); + BOOST_ASSERT((z < policies::get_epsilon())); + + if(n == 0) + { + return (2 / constants::pi()) * (log(z / 2) + constants::euler()); + } + else if(n == 1) + { + return (z / constants::pi()) * log(z / 2) + - 2 / (constants::pi() * z) + - (z / (2 * constants::pi())) * (1 - 2 * constants::euler()); + } + else if(n == 2) + { + return (z * z) / (4 * constants::pi()) * log(z / 2) + - (4 / (constants::pi() * z * z)) + - ((z * z) / (8 * constants::pi())) * (3/2 - 2 * constants::euler()); + } + else + { + T p = pow(z / 2, n); + T result = -((boost::math::factorial(n - 1) / constants::pi())); + if(p * tools::max_value() < result) + { + T div = tools::max_value() / 8; + result /= div; + *scale /= div; + if(p * tools::max_value() < result) + { + return -policies::raise_overflow_error("bessel_yn_small_z<%1%>(%1%,%1%)", 0, pol); + } + } + return result / p; + } +} + +}}} // namespaces + +#endif // BOOST_MATH_BESSEL_JN_SERIES_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_kn.hpp b/include/boost/math/special_functions/detail/bessel_kn.hpp index fdee7d44f..5f0146099 100644 --- a/include/boost/math/special_functions/detail/bessel_kn.hpp +++ b/include/boost/math/special_functions/detail/bessel_kn.hpp @@ -56,14 +56,25 @@ T bessel_kn(int n, T x, const Policy& pol) current = bessel_k1(x, pol); int k = 1; BOOST_ASSERT(k < n); + T scale = 1; do { - value = 2 * k * current / x + prev; + T fact = 2 * k / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + scale /= current; + prev /= current; + current = 1; + } + value = fact * current + prev; prev = current; current = value; ++k; } while(k < n); + if(tools::max_value() * scale < fabs(value)) + return sign(scale) * sign(value) * policies::raise_overflow_error(function, 0, pol); + value /= scale; } return value; } diff --git a/include/boost/math/special_functions/detail/bessel_yn.hpp b/include/boost/math/special_functions/detail/bessel_yn.hpp index e0788f844..667257cc6 100644 --- a/include/boost/math/special_functions/detail/bessel_yn.hpp +++ b/include/boost/math/special_functions/detail/bessel_yn.hpp @@ -12,6 +12,7 @@ #include #include +#include #include // Bessel function of the second kind of integer order @@ -22,6 +23,7 @@ namespace boost { namespace math { namespace detail{ template T bessel_yn(int n, T x, const Policy& pol) { + BOOST_MATH_STD_USING T value, factor, current, prev; using namespace boost::math::tools; @@ -51,7 +53,15 @@ T bessel_yn(int n, T x, const Policy& pol) factor = 1; } - if (n == 0) + if(x < policies::get_epsilon()) + { + T scale = 1; + value = bessel_yn_small_z(n, x, &scale, pol); + if(tools::max_value() * fabs(scale) < fabs(value)) + return boost::math::sign(scale) * boost::math::sign(value) * policies::raise_overflow_error(function, 0, pol); + value /= scale; + } + else if (n == 0) { value = bessel_y0(x, pol); } @@ -67,13 +77,22 @@ T bessel_yn(int n, T x, const Policy& pol) BOOST_ASSERT(k < n); do { - value = 2 * k * current / x - prev; + T fact = 2 * k / x; + if((tools::max_value() - fabs(prev)) / fact < fabs(current)) + { + prev /= current; + factor /= current; + current = 1; + } + value = fact * current - prev; prev = current; current = value; ++k; } while(k < n); - value *= factor; + if(tools::max_value() * factor < value) + return sign(value) * sign(value) * policies::raise_overflow_error(function, 0, pol); + value /= factor; } return value; } diff --git a/include/boost/math/special_functions/detail/erf_inv.hpp b/include/boost/math/special_functions/detail/erf_inv.hpp index 7ab590d7a..de3d631aa 100644 --- a/include/boost/math/special_functions/detail/erf_inv.hpp +++ b/include/boost/math/special_functions/detail/erf_inv.hpp @@ -313,7 +313,7 @@ T erf_inv_imp(const T& p, const T& q, const Policy& pol, const boost::mpl::int_< { result = tools::halley_iterate(detail::erf_roots::type, Policy>(q, -1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); } - policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol); + policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol); } else { diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index d745b664d..ccfa9197d 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -801,7 +801,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) boost::uintmax_t max_iter = policies::get_max_root_iterations(); x = boost::math::tools::halley_iterate( boost::math::detail::ibeta_roots(a, b, (p < q ? p : q), (p < q ? false : true)), x, lower, upper, digits, max_iter); - policies::check_root_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol); + policies::check_root_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol); // // We don't really want these asserts here, but they are useful for sanity // checking that we have the limits right, uncomment if you suspect bugs *only*. diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index e3c9c8a6a..217a0a7ea 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -442,7 +442,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) tools::max_value(), digits, max_iter); - policies::check_root_iterations(function, max_iter, pol); + policies::check_root_iterations(function, max_iter, pol); BOOST_MATH_INSTRUMENT_VARIABLE(guess); if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); @@ -501,7 +501,7 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) tools::max_value(), digits, max_iter); - policies::check_root_iterations(function, max_iter, pol); + policies::check_root_iterations(function, max_iter, pol); if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); return guess; diff --git a/include/boost/math/special_functions/ellint_rc.hpp b/include/boost/math/special_functions/ellint_rc.hpp index c78d4d450..5f6d5c64b 100644 --- a/include/boost/math/special_functions/ellint_rc.hpp +++ b/include/boost/math/special_functions/ellint_rc.hpp @@ -80,7 +80,7 @@ T ellint_rc_imp(T x, T y, const Policy& pol) ++k; }while(k < policies::get_max_series_iterations()); // Check to see if we gave up too soon: - policies::check_series_iterations(function, k, pol); + policies::check_series_iterations(function, k, pol); // Taylor series expansion to the 5th order value = (1 + S * S * (T(3) / 10 + S * (T(1) / 7 + S * (T(3) / 8 + S * T(9) / 22)))) / sqrt(u); diff --git a/include/boost/math/special_functions/ellint_rd.hpp b/include/boost/math/special_functions/ellint_rd.hpp index 639a05ab8..61014d386 100644 --- a/include/boost/math/special_functions/ellint_rd.hpp +++ b/include/boost/math/special_functions/ellint_rd.hpp @@ -87,7 +87,7 @@ T ellint_rd_imp(T x, T y, T z, const Policy& pol) while(k < policies::get_max_series_iterations()); // Check to see if we gave up too soon: - policies::check_series_iterations(function, k, pol); + policies::check_series_iterations(function, k, pol); // Taylor series expansion to the 5th order EA = X * Y; diff --git a/include/boost/math/special_functions/ellint_rf.hpp b/include/boost/math/special_functions/ellint_rf.hpp index 6be76d876..ac5725783 100644 --- a/include/boost/math/special_functions/ellint_rf.hpp +++ b/include/boost/math/special_functions/ellint_rf.hpp @@ -92,7 +92,7 @@ T ellint_rf_imp(T x, T y, T z, const Policy& pol) while(k < policies::get_max_series_iterations()); // Check to see if we gave up too soon: - policies::check_series_iterations(function, k, pol); + policies::check_series_iterations(function, k, pol); BOOST_MATH_INSTRUMENT_VARIABLE(k); // Taylor series expansion to the 5th order diff --git a/include/boost/math/special_functions/ellint_rj.hpp b/include/boost/math/special_functions/ellint_rj.hpp index f0e08fb6b..1ecca753a 100644 --- a/include/boost/math/special_functions/ellint_rj.hpp +++ b/include/boost/math/special_functions/ellint_rj.hpp @@ -134,7 +134,7 @@ T ellint_rj_imp(T x, T y, T z, T p, const Policy& pol) while(k < policies::get_max_series_iterations()); // Check to see if we gave up too soon: - policies::check_series_iterations(function, k, pol); + policies::check_series_iterations(function, k, pol); // Taylor series expansion to the 5th order EA = X * Y + Y * Z + Z * X; diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 5c23f4978..4ed9d4401 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -134,7 +134,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) detail::erf_asympt_series_t s(z); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter, 1); - policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); + policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); } else { diff --git a/include/boost/math/special_functions/expint.hpp b/include/boost/math/special_functions/expint.hpp index ac33d9036..87de39725 100644 --- a/include/boost/math/special_functions/expint.hpp +++ b/include/boost/math/special_functions/expint.hpp @@ -367,7 +367,7 @@ inline T expint_as_fraction(unsigned n, T z, const Policy& pol) f, boost::math::policies::get_epsilon(), max_iter); - policies::check_series_iterations("boost::math::expint_continued_fraction<%1%>(unsigned,%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::expint_continued_fraction<%1%>(unsigned,%1%)", max_iter, pol); BOOST_MATH_INSTRUMENT_VARIABLE(result) BOOST_MATH_INSTRUMENT_VARIABLE(max_iter) result = exp(-z) / result; @@ -423,7 +423,7 @@ inline T expint_as_series(unsigned n, T z, const Policy& pol) expint_series s(k, z, x_k, denom, fact); result = tools::sum_series(s, policies::get_epsilon(), max_iter, result); - policies::check_series_iterations("boost::math::expint_series<%1%>(unsigned,%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::expint_series<%1%>(unsigned,%1%)", max_iter, pol); BOOST_MATH_INSTRUMENT_VARIABLE(result) BOOST_MATH_INSTRUMENT_VARIABLE(max_iter) return result; @@ -496,7 +496,7 @@ T expint_i_as_series(T z, const Policy& pol) expint_i_series s(z); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = tools::sum_series(s, policies::get_epsilon(), max_iter, result); - policies::check_series_iterations("boost::math::expint_i_series<%1%>(%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::expint_i_series<%1%>(%1%)", max_iter, pol); return result; } diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index 04094a0bd..c6e20796a 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -95,7 +95,7 @@ T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol) T zero = 0; T result = tools::sum_series(s, policies::get_epsilon(), max_iter, zero); #endif - policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol); return result; } diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 461adf397..b380bc5a6 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -348,7 +348,7 @@ inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0) boost::uintmax_t max_iter = policies::get_max_series_iterations(); T factor = policies::get_epsilon(); T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); - policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); return result; } @@ -763,7 +763,7 @@ inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool *pderivative = p / (*pgam * exp(x)); T init_value = invert ? *pgam : 0; result = -p * tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, (init_value - result) / p); - policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol); + policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol); if(invert) result = -result; return result; diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 494579183..9153cd262 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -99,7 +99,7 @@ T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&) result_type zero = 0; result_type result = tools::sum_series(s, policies::get_epsilon(), max_iter, zero); #endif - policies::check_series_iterations(function, max_iter, pol); + policies::check_series_iterations(function, max_iter, pol); return result; } @@ -452,7 +452,7 @@ inline typename tools::promote_args::type #else T result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter); #endif - policies::check_series_iterations(function, max_iter, pol); + policies::check_series_iterations(function, max_iter, pol); return result; } diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 8db2a23ac..e23738a6f 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -115,7 +115,7 @@ inline T zeta_series2_imp(T s, const Policy& pol) f, policies::get_epsilon(), max_iter); - policies::check_series_iterations("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol); + policies::check_series_iterations("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol); return result; } diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0ce242550..97048b447 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -29,6 +29,7 @@ project msvc:all msvc:on msvc:/wd4996 + msvc:/wd4511 # copy constructor could not be generated msvc:/wd4512 msvc:/wd4610 msvc:/wd4510 diff --git a/test/test_bessel_i.cpp b/test/test_bessel_i.cpp index 8c3f3cc3e..4ccb2d5ee 100644 --- a/test/test_bessel_i.cpp +++ b/test/test_bessel_i.cpp @@ -67,17 +67,24 @@ void expected_results() add_expected_result( ".*", // compiler ".*", // stdlib - "Mac OS", // platform + "Mac OS", // platform largest_type, // test type(s) ".*", // test data group - ".*", 100, 50); // test function + ".*", 400, 200); // test function + // + // G++ on Linux, results vary a bit by processor type, + // on Itanium results are *much* better than listed here, + // but x86 appears to have much less accurate std::pow + // that throws off the results for tgamma(long double) + // which then impacts on the Bessel functions: + // add_expected_result( ".*", // compiler ".*", // stdlib - "Mac OS", // platform - "real_concept", // test type(s) - ".*", // test data group - ".*", 100, 50); // test function + "linux", // platform + largest_type, // test type(s) + ".*Random.*", // test data group + ".*", 400, 200); // test function add_expected_result( ".*", // compiler @@ -86,13 +93,20 @@ void expected_results() largest_type, // test type(s) ".*", // test data group ".*", 15, 10); // test function + // + // Set error rates a little higher for real_concept - + // now that we use a series approximation for small z + // that relies on tgamma the error rates are a little + // higher only when a Lanczos approximation is not available. + // All other types are unaffected. + // add_expected_result( ".*", // compiler ".*", // stdlib ".*", // platform "real_concept", // test type(s) ".*", // test data group - ".*", 15, 10); // test function + ".*", 500, 200); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. @@ -215,7 +229,7 @@ void test_bessel(T, const char* name) SC_(1), SC_(100), SC_(1.06836939033816248120614576322429526544612284405623226965918e42), SC_(1), SC_(200), SC_(2.03458154933206270342742797713906950389661161681122964159220e85), }; - static const boost::array, 10> in_data = { + static const boost::array, 11> in_data = { SC_(-2), SC_(0), SC_(0), SC_(2), SC_(1)/(1024*1024), SC_(1.13686837721624646204093977095674566928522671779753217215467e-13), SC_(5), SC_(10), SC_(777.188286403259959907293484802339632852674154572666041953297), @@ -226,6 +240,7 @@ void test_bessel(T, const char* name) SC_(1e+02), SC_(9), SC_(2.74306601746058997093587654668959071522869282506446891736820e-93), SC_(1e+02), SC_(80), SC_(4.65194832850610205318128191404145885093970505338730540776711e8), SC_(-100), SC_(-200), SC_(4.35275044972702191438729017441198257508190719030765213981307e74), + SC_(10), SC_(1e-100), SC_(2.69114445546737213403880070546737213403880070546737213403880e-1010), }; static const boost::array, 10> iv_data = { SC_(2.25), SC_(1)/(1024*1024), SC_(2.34379212133481347189068464680335815256364262507955635911656e-15), @@ -239,6 +254,14 @@ void test_bessel(T, const char* name) SC_(144794)/1024, SC_(200), SC_(2.23699739472246928794922868978337381373643889659337595319774e64), SC_(-144794)/1024, SC_(100), SC_(2066.27694672763190927440969155740243346136463461655104698748), }; + static const boost::array, 5> iv_large_data = { + // Bug report https://svn.boost.org/trac/boost/ticket/5560: + SC_(-1), static_cast(ldexp(0.5, -512)), SC_(1.86458518280005168582274132886573345934411788365010172356788e-155), + SC_(1), static_cast(ldexp(0.5, -512)), SC_(1.86458518280005168582274132886573345934411788365010172356788e-155), + SC_(-1.125), static_cast(ldexp(0.5, -512)), SC_(-1.34963720853101363690381585556234820027343435206156667634081e173), + SC_(1.125), static_cast(ldexp(0.5, -512)), SC_(8.02269390325932403421158766283366891170783955777638875887348e-175), + SC_(0.5), static_cast(ldexp(0.5, -683)), SC_(8.90597649117647254543282704099383321071493400182381039079219e-104), + }; #undef SC_ do_test_cyl_bessel_i(i0_data, name, "Bessel I0: Mathworld Data"); @@ -255,6 +278,9 @@ void test_bessel(T, const char* name) do_test_cyl_bessel_i(bessel_i_int_data, name, "Bessel In: Random Data"); #include "bessel_i_data.ipp" do_test_cyl_bessel_i(bessel_i_data, name, "Bessel Iv: Random Data"); + + if(0 != static_cast(ldexp(0.5, -700))) + do_test_cyl_bessel_i(iv_large_data, name, "Bessel Iv: Mathworld Data (large values)"); } int test_main(int, char* []) diff --git a/test/test_bessel_j.cpp b/test/test_bessel_j.cpp index 22bea9040..e41ab61d0 100644 --- a/test/test_bessel_j.cpp +++ b/test/test_bessel_j.cpp @@ -452,7 +452,7 @@ void test_bessel(T, const char* name) SC_(1), SC_(10667654)/(1024*1024), SC_(1.24591331097191900488116495350277530373473085499043086981229e-7), }; - static const boost::array, 15> jn_data = { + static const boost::array, 16> jn_data = { // This first one is a modified test case from https://svn.boost.org/trac/boost/ticket/2733 SC_(-1), SC_(1.25), SC_(-0.510623260319880467069474837274910375352924050139633057168856), SC_(2), SC_(0), SC_(0), @@ -469,6 +469,7 @@ void test_bessel(T, const char* name) SC_(10), SC_(1e+06), SC_(-0.000331079311760448874126495855903574446020957243277028930713243), SC_(1e+02), SC_(8e+01), SC_(4.606553064823477354141298259169874909670e-06), SC_(1e+03), SC_(1e+05), SC_(1.283178112502480365195139312635384057363e-03), + SC_(10), SC_(1e-100), SC_(2.69114445546737213403880070546737213403880070546737213403880e-1010), }; do_test_cyl_bessel_j(j0_data, name, "Bessel J0: Mathworld Data"); do_test_cyl_bessel_j(j0_tricky, name, "Bessel J0: Mathworld Data (Tricky cases)"); @@ -505,7 +506,15 @@ void test_bessel(T, const char* name) SC_(1.5), SC_(8034)/1024, SC_(0.0339477646369710610146236955872928005087352629422508823945264), }; do_test_cyl_bessel_j(jv_data, name, "Bessel J: Mathworld Data"); - + static const boost::array, 4> jv_large_data = { + // Bug report https://svn.boost.org/trac/boost/ticket/5560: + SC_(-0.5), static_cast(std::ldexp(0.5, -683)), SC_(7.14823099969225685526188875418476476336424046896822867989728e102), + SC_(256), SC_(512), SC_(0.00671672065717513246956991122723250578101154313313749938944675), + SC_(-256), SC_(8), SC_(1.46866142030022704638298523775638527553596432641223316232692e-353), + SC_(-2.5), SC_(4), SC_(-0.0145679476685218007666785535204236327832335803441449596297004), + }; + if(jv_large_data[0][1] != 0) + do_test_cyl_bessel_j(jv_data, name, "Bessel J: Mathworld Data (large values)"); #undef SC_ #include "bessel_j_int_data.ipp" diff --git a/test/test_bessel_k.cpp b/test/test_bessel_k.cpp index 493e6a52c..138ae9c37 100644 --- a/test/test_bessel_k.cpp +++ b/test/test_bessel_k.cpp @@ -82,6 +82,13 @@ void expected_results() ".*", // test data group ".*", 4000, 1300); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*large.*", // test data group + ".*", 80, 50); // test function add_expected_result( ".*", // compiler ".*", // stdlib @@ -231,6 +238,14 @@ void test_bessel(T, const char* name) SC_(144793)/1024, SC_(200), SC_(9.11950412043225432171915100042647230802198254567007382956336e-68), SC_(-144793)/1024, SC_(50), SC_(1.30185229717525025165362673848737761549946548375142378172956e42), }; + static const boost::array, 5> kv_large_data = { + // Bug report https://svn.boost.org/trac/boost/ticket/5560: + SC_(-1), static_cast(ldexp(0.5, -512)), SC_(2.68156158598851941991480499964116922549587316411847867554471e154), + SC_(1), static_cast(ldexp(0.5, -512)), SC_(2.68156158598851941991480499964116922549587316411847867554471e154), + SC_(-1.125), static_cast(ldexp(0.5, -512)), SC_(5.53984048006472105611199242328122729730752165907526178753978e173), + SC_(1.125), static_cast(ldexp(0.5, -512)), SC_(5.53984048006472105611199242328122729730752165907526178753978e173), + SC_(0.5), static_cast(ldexp(0.5, -683)), SC_(1.12284149973980088540335945247019177715948513804063794284101e103), + }; #undef SC_ do_test_cyl_bessel_k(k0_data, name, "Bessel K0: Mathworld Data"); @@ -242,6 +257,8 @@ void test_bessel(T, const char* name) do_test_cyl_bessel_k_int(kn_data, name, "Bessel Kn: Mathworld Data (Integer Version)"); do_test_cyl_bessel_k(kv_data, name, "Bessel Kv: Mathworld Data"); + if(0 != static_cast(ldexp(0.5, -512))) + do_test_cyl_bessel_k(kv_large_data, name, "Bessel Kv: Mathworld Data (large values)"); #include "bessel_k_int_data.ipp" do_test_cyl_bessel_k(bessel_k_int_data, name, "Bessel Kn: Random Data"); diff --git a/test/test_bessel_y.cpp b/test/test_bessel_y.cpp index 0d15437eb..d17f8cd55 100644 --- a/test/test_bessel_y.cpp +++ b/test/test_bessel_y.cpp @@ -237,7 +237,7 @@ void expected_results() ".*", // platform largest_type, // test type(s) ".*", // test data group - ".*", 60, 40); // test function + ".*", 80, 40); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. @@ -414,6 +414,16 @@ void test_bessel(T, const char* name) SC_(141.75), SC_(2e+04), SC_(-0.00376577888677186194728129112270988602876597726657372330194186), SC_(-141.75), SC_(1e+02), SC_(-3.81009803444766877495905954105669819951653361036342457919021e9), }; + static const boost::array, 7> yv_large_data = { + // Bug report https://svn.boost.org/trac/boost/ticket/5560: + SC_(0.5), static_cast(std::ldexp(0.5, -683)), SC_(-7.14823099969225685526188875418476476336424046896822867989728e102), + SC_(-0.5), static_cast(std::ldexp(0.5, -683)), SC_(8.90597649117647254543282704099383321071493400182381039079219e-104), + SC_(0.0), static_cast(std::ldexp(1.0, -53)), SC_(-23.4611779112897561252987257324561640034037313549011724328997), + SC_(1.0), static_cast(std::ldexp(1.0, -53)), SC_(-5.73416113922265864550047623401604244038331542638719289100990e15), + SC_(2.0), static_cast(std::ldexp(1.0, -53)), SC_(-1.03297463879542177245046832533417970379386617249046560049244e32), + SC_(3.0), static_cast(std::ldexp(1.0, -53)), SC_(-3.72168335868978735639260528876490232745489151562358712422544e48), + SC_(10.0), static_cast(std::ldexp(1.0, -53)), SC_(-4.15729476804920974669173904282420477878640623992500096231384e167), + }; do_test_cyl_neumann_y(y0_data, name, "Y0: Mathworld Data"); do_test_cyl_neumann_y(y1_data, name, "Y1: Mathworld Data"); @@ -422,6 +432,8 @@ void test_bessel(T, const char* name) do_test_cyl_neumann_y_int(y1_data, name, "Y1: Mathworld Data (Integer Version)"); do_test_cyl_neumann_y_int(yn_data, name, "Yn: Mathworld Data (Integer Version)"); do_test_cyl_neumann_y(yv_data, name, "Yv: Mathworld Data"); + if(yv_large_data[0][1] != 0) + do_test_cyl_neumann_y(yv_large_data, name, "Yv: Mathworld Data (large values)"); #include "bessel_y01_data.ipp" do_test_cyl_neumann_y(bessel_y01_data, name, "Y0 and Y1: Random Data"); diff --git a/test/test_lexical_cast.cpp b/test/test_lexical_cast.cpp index cd71a6879..72eb9854b 100644 --- a/test/test_lexical_cast.cpp +++ b/test/test_lexical_cast.cpp @@ -72,8 +72,8 @@ template void lexical_cast_test_impl() ValType a6 = (changesign)(static_cast(0)); ValType a7 = static_cast(-57); ValType a8 = -std::numeric_limits::infinity(); - ValType a9 = (changesign)(std::numeric_limits::quiet_NaN()); - ValType a10 = (changesign)(std::numeric_limits::signaling_NaN()); + ValType a9 = (changesign)(std::numeric_limits::quiet_NaN()); // -NaN + ValType a10 = (changesign)(std::numeric_limits::signaling_NaN()); // -NaN std::basic_string s1 = S_("0"); std::basic_string s2 = S_("13"); diff --git a/test/test_nc_chi_squared.cpp b/test/test_nc_chi_squared.cpp index 59461a39c..756604ba5 100644 --- a/test/test_nc_chi_squared.cpp +++ b/test/test_nc_chi_squared.cpp @@ -163,7 +163,7 @@ void test_spot( cdf(dist, cs), P, tol); try{ BOOST_CHECK_CLOSE( - pdf(dist, cs), naive_pdf(dist.degrees_of_freedom(), ncp, cs), tol * 50); + pdf(dist, cs), naive_pdf(dist.degrees_of_freedom(), ncp, cs), tol * 150); } catch(const std::overflow_error&) {} diff --git a/test/test_triangular.cpp b/test/test_triangular.cpp index c9e0073ec..835fc80ee 100644 --- a/test/test_triangular.cpp +++ b/test/test_triangular.cpp @@ -74,7 +74,7 @@ void test_spots(RealType) // Basic sanity checks: // // Some test values were generated for the triangular distribution - // using the online calculator at + // using the online calculator at // http://espse.ed.psu.edu/edpsych/faculty/rhale/hale/507Mat/statlets/free/pdist.htm // // Tolerance is just over 5 epsilon expressed as a fraction: @@ -82,7 +82,7 @@ void test_spots(RealType) RealType tol5eps = boost::math::tools::epsilon() * 5; // 5 eps as a fraction. cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << endl; - + using namespace std; // for ADL of std::exp; // Tests on construction @@ -126,91 +126,91 @@ void test_spots(RealType) // Tests for PDF // // triangular_distribution() default is (0, 0, 1), mode == lower. BOOST_CHECK_CLOSE_FRACTION( // x == lower == mode - pdf(triangular_distribution(0, 0, 1), static_cast(0)), - static_cast(2), + pdf(triangular_distribution(0, 0, 1), static_cast(0)), + static_cast(2), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == upper - pdf(triangular_distribution(0, 0, 1), static_cast(1)), - static_cast(0), + pdf(triangular_distribution(0, 0, 1), static_cast(1)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x > upper - pdf(triangular_distribution(0, 0, 1), static_cast(-1)), - static_cast(0), - tolerance); + pdf(triangular_distribution(0, 0, 1), static_cast(-1)), + static_cast(0), + tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < lower - pdf(triangular_distribution(0, 0, 1), static_cast(2)), - static_cast(0), + pdf(triangular_distribution(0, 0, 1), static_cast(2)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < lower - pdf(triangular_distribution(0, 0, 1), static_cast(2)), - static_cast(0), + pdf(triangular_distribution(0, 0, 1), static_cast(2)), + static_cast(0), tolerance); // triangular_distribution() (0, 1, 1) mode == upper BOOST_CHECK_CLOSE_FRACTION( // x == lower - pdf(triangular_distribution(0, 1, 1), static_cast(0)), - static_cast(0), + pdf(triangular_distribution(0, 1, 1), static_cast(0)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == upper - pdf(triangular_distribution(0, 1, 1), static_cast(1)), - static_cast(2), + pdf(triangular_distribution(0, 1, 1), static_cast(1)), + static_cast(2), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x > upper - pdf(triangular_distribution(0, 1, 1), static_cast(-1)), - static_cast(0), - tolerance); + pdf(triangular_distribution(0, 1, 1), static_cast(-1)), + static_cast(0), + tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < lower - pdf(triangular_distribution(0, 1, 1), static_cast(2)), - static_cast(0), + pdf(triangular_distribution(0, 1, 1), static_cast(2)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < middle so Wiki says special case pdf = 2 * x - pdf(triangular_distribution(0, 1, 1), static_cast(0.25)), - static_cast(0.5), + pdf(triangular_distribution(0, 1, 1), static_cast(0.25)), + static_cast(0.5), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < middle so Wiki says special case cdf = x * x - cdf(triangular_distribution(0, 1, 1), static_cast(0.25)), - static_cast(0.25 * 0.25), + cdf(triangular_distribution(0, 1, 1), static_cast(0.25)), + static_cast(0.25 * 0.25), tolerance); // triangular_distribution() (0, 0.5, 1) mode == middle. BOOST_CHECK_CLOSE_FRACTION( // x == lower - pdf(triangular_distribution(0, 0.5, 1), static_cast(0)), - static_cast(0), + pdf(triangular_distribution(0, 0.5, 1), static_cast(0)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == upper - pdf(triangular_distribution(0, 0.5, 1), static_cast(1)), - static_cast(0), + pdf(triangular_distribution(0, 0.5, 1), static_cast(1)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x > upper - pdf(triangular_distribution(0, 0.5, 1), static_cast(-1)), - static_cast(0), - tolerance); + pdf(triangular_distribution(0, 0.5, 1), static_cast(-1)), + static_cast(0), + tolerance); BOOST_CHECK_CLOSE_FRACTION( // x < lower - pdf(triangular_distribution(0, 0.5, 1), static_cast(2)), - static_cast(0), + pdf(triangular_distribution(0, 0.5, 1), static_cast(2)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == mode - pdf(triangular_distribution(0, 0.5, 1), static_cast(0.5)), - static_cast(2), + pdf(triangular_distribution(0, 0.5, 1), static_cast(0.5)), + static_cast(2), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == half mode - pdf(triangular_distribution(0, 0.5, 1), static_cast(0.25)), - static_cast(1), + pdf(triangular_distribution(0, 0.5, 1), static_cast(0.25)), + static_cast(1), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == half mode - pdf(triangular_distribution(0, 0.5, 1), static_cast(0.75)), - static_cast(1), + pdf(triangular_distribution(0, 0.5, 1), static_cast(0.75)), + static_cast(1), tolerance); if(std::numeric_limits::has_infinity) @@ -223,112 +223,112 @@ void test_spots(RealType) // of error handling is tested below with BOOST_CHECK_THROW tests. BOOST_CHECK_THROW( // x == infinity NOT OK. - pdf(triangular_distribution(0, 0, 1), static_cast(std::numeric_limits::infinity())), + pdf(triangular_distribution(0, 0, 1), static_cast(std::numeric_limits::infinity())), std::domain_error); BOOST_CHECK_THROW( // x == minus infinity not OK too. - pdf(triangular_distribution(0, 0, 1), static_cast(-std::numeric_limits::infinity())), + pdf(triangular_distribution(0, 0, 1), static_cast(-std::numeric_limits::infinity())), std::domain_error); } if(std::numeric_limits::has_quiet_NaN) { // BOOST_CHECK tests for NaN using std::numeric_limits<>::has_quiet_NaN() - should throw. BOOST_CHECK_THROW( - pdf(triangular_distribution(0, 0, 1), static_cast(std::numeric_limits::quiet_NaN())), + pdf(triangular_distribution(0, 0, 1), static_cast(std::numeric_limits::quiet_NaN())), std::domain_error); BOOST_CHECK_THROW( - pdf(triangular_distribution(0, 0, 1), static_cast(-std::numeric_limits::quiet_NaN())), + pdf(triangular_distribution(0, 0, 1), static_cast(-std::numeric_limits::quiet_NaN())), std::domain_error); } // test for x = NaN using std::numeric_limits<>::quiet_NaN() // cdf BOOST_CHECK_EQUAL( // x < lower - cdf(triangular_distribution(0, 1, 1), static_cast(-1)), + cdf(triangular_distribution(0, 1, 1), static_cast(-1)), static_cast(0) ); BOOST_CHECK_CLOSE_FRACTION( // x == lower - cdf(triangular_distribution(0, 1, 1), static_cast(0)), - static_cast(0), + cdf(triangular_distribution(0, 1, 1), static_cast(0)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x == upper - cdf(triangular_distribution(0, 1, 1), static_cast(1)), - static_cast(1), + cdf(triangular_distribution(0, 1, 1), static_cast(1)), + static_cast(1), tolerance); BOOST_CHECK_EQUAL( // x > upper - cdf(triangular_distribution(0, 1, 1), static_cast(2)), + cdf(triangular_distribution(0, 1, 1), static_cast(2)), static_cast(1)); BOOST_CHECK_CLOSE_FRACTION( // x == mode - cdf(triangular_distribution(-1, 0, 1), static_cast(0)), - //static_cast((mode - lower) / (upper - lower)), + cdf(triangular_distribution(-1, 0, 1), static_cast(0)), + //static_cast((mode - lower) / (upper - lower)), static_cast(0.5), // (0 --1) / (1 -- 1) = 0.5 tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(0, 1, 1), static_cast(0.9L)), - static_cast(0.81L), + cdf(triangular_distribution(0, 1, 1), static_cast(0.9L)), + static_cast(0.81L), tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(-1, 0, 1), static_cast(-1)), - static_cast(0), + cdf(triangular_distribution(-1, 0, 1), static_cast(-1)), + static_cast(0), tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(-1, 0, 1), static_cast(-0.5L)), - static_cast(0.125L), + cdf(triangular_distribution(-1, 0, 1), static_cast(-0.5L)), + static_cast(0.125L), tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(-1, 0, 1), static_cast(0)), - static_cast(0.5), + cdf(triangular_distribution(-1, 0, 1), static_cast(0)), + static_cast(0.5), tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(-1, 0, 1), static_cast(+0.5L)), - static_cast(0.875L), + cdf(triangular_distribution(-1, 0, 1), static_cast(+0.5L)), + static_cast(0.875L), tolerance); BOOST_CHECK_CLOSE_FRACTION( - cdf(triangular_distribution(-1, 0, 1), static_cast(1)), - static_cast(1), + cdf(triangular_distribution(-1, 0, 1), static_cast(1)), + static_cast(1), tolerance); // cdf complement BOOST_CHECK_EQUAL( // x < lower - cdf(complement(triangular_distribution(0, 0, 1), static_cast(-1))), + cdf(complement(triangular_distribution(0, 0, 1), static_cast(-1))), static_cast(1)); BOOST_CHECK_EQUAL( // x == lower - cdf(complement(triangular_distribution(0, 0, 1), static_cast(0))), + cdf(complement(triangular_distribution(0, 0, 1), static_cast(0))), static_cast(1)); BOOST_CHECK_EQUAL( // x == mode - cdf(complement(triangular_distribution(-1, 0, 1), static_cast(0))), + cdf(complement(triangular_distribution(-1, 0, 1), static_cast(0))), static_cast(0.5)); BOOST_CHECK_EQUAL( // x == mode - cdf(complement(triangular_distribution(0, 0, 1), static_cast(0))), + cdf(complement(triangular_distribution(0, 0, 1), static_cast(0))), static_cast(1)); BOOST_CHECK_EQUAL( // x == mode - cdf(complement(triangular_distribution(0, 1, 1), static_cast(1))), + cdf(complement(triangular_distribution(0, 1, 1), static_cast(1))), static_cast(0)); - BOOST_CHECK_EQUAL( // x > upper - cdf(complement(triangular_distribution(0, 0, 1), static_cast(2))), + BOOST_CHECK_EQUAL( // x > upper + cdf(complement(triangular_distribution(0, 0, 1), static_cast(2))), static_cast(0)); BOOST_CHECK_EQUAL( // x == upper - cdf(complement(triangular_distribution(0, 0, 1), static_cast(1))), + cdf(complement(triangular_distribution(0, 0, 1), static_cast(1))), static_cast(0)); BOOST_CHECK_CLOSE_FRACTION( // x = -0.5 - cdf(complement(triangular_distribution(-1, 0, 1), static_cast(-0.5))), - static_cast(0.875L), + cdf(complement(triangular_distribution(-1, 0, 1), static_cast(-0.5))), + static_cast(0.875L), tolerance); BOOST_CHECK_CLOSE_FRACTION( // x = +0.5 - cdf(complement(triangular_distribution(-1, 0, 1), static_cast(0.5))), - static_cast(0.125), + cdf(complement(triangular_distribution(-1, 0, 1), static_cast(0.5))), + static_cast(0.125), tolerance); - + triangular_distribution triang; // Using typedef == triangular_distribution tristd; triangular_distribution tristd(0, 0.5, 1); // 'Standard' triangular distribution. BOOST_CHECK_CLOSE_FRACTION( // median of Standard triangular is sqrt(mode/2) if c > 1/2 else 1 - sqrt((1-c)/2) - median(tristd), - static_cast(0.5), + median(tristd), + static_cast(0.5), tolerance); triangular_distribution tri011(0, 1, 1); // Using default RealType double. triangular_distribution tri0q1(0, 0.25, 1); // mode is near bottom. @@ -384,7 +384,7 @@ void test_spots(RealType) for (unsigned j = 0; j < sizeof(xs) /sizeof(RealType); j++) { RealType x = xs[j]; - BOOST_CHECK_CLOSE_FRACTION(quantile(*dists[i], x), quantile(complement(*dist, 1 - x)), tol5eps); + BOOST_CHECK_CLOSE_FRACTION(quantile(*dists[i], x), quantile(complement(*dist, 1 - x)), tol5eps); } // for j } // for i @@ -439,7 +439,7 @@ void test_spots(RealType) BOOST_CHECK_CLOSE_FRACTION( variance(tridef), static_cast(0.16666666666666666666666666666666666666666667L), tolerance); // was 0.0833333333333333333333333333333333333333333L - + // std deviation: BOOST_CHECK_CLOSE_FRACTION( standard_deviation(tridef), sqrt(variance(tridef)), tolerance); @@ -485,8 +485,8 @@ void test_spots(RealType) // Define a (bad?) policy to ignore domain errors ('bad' arguments): typedef policy > inf_policy; // domain error returns infinity. - triangular_distribution tridef_inf(-1, 0., 1); - // But can't use BOOST_CHECK_EQUAL(?, quiet_NaN) + triangular_distribution tridef_inf(-1, 0., 1); + // But can't use BOOST_CHECK_EQUAL(?, quiet_NaN) using boost::math::isnan; BOOST_CHECK((isnan)(pdf(tridef_inf, std::numeric_limits::infinity()))); } // test for infinity using std::numeric_limits<>::infinity() @@ -500,7 +500,7 @@ void test_spots(RealType) //BOOST_CHECK_THROW(pdf(tridef, std::numeric_limits::infinity()), std::domain_error); //BOOST_CHECK_THROW(pdf(tridef, std::numeric_limits::quiet_NaN()), std::domain_error); // BOOST_CHECK_THROW(pdf(tridef, boost::math::tools::max_value() * 2), std::domain_error); // Doesn't throw. - BOOST_CHECK_EQUAL(pdf(tridef, boost::math::tools::max_value()), 0); + BOOST_CHECK_EQUAL(pdf(tridef, boost::math::tools::max_value()), 0); } // Special cases: BOOST_CHECK(pdf(tridef, -1) == 0); @@ -544,7 +544,7 @@ int test_main(int, char* []) triangular tristd (0, 0.5, 1); // Using typedef - BOOST_CHECK_EQUAL(tristd.lower(), 0); + BOOST_CHECK_EQUAL(tristd.lower(), 0); BOOST_CHECK_EQUAL(tristd.mode(), 0.5); BOOST_CHECK_EQUAL(tristd.upper(), 1); @@ -642,22 +642,22 @@ int test_main(int, char* []) cout << showpos << setprecision(2) << endl; - //triangular_distribution& dist = trim12; + //triangular_distribution& dist = trim12; for (unsigned i = 0; i < sizeof(xs) /sizeof(double); i++) { double x = xs[i] * (trim12.upper() - trim12.lower()) + trim12.lower(); double dx = cdf(trim12, x); double cx = cdf(complement(trim12, x)); - //cout << fixed << showpos << setprecision(3) + //cout << fixed << showpos << setprecision(3) // << xs[i] << ", " << x << ", " << pdf(trim12, x) << ", " << dx << ", " << cx << ",, " ; BOOST_CHECK_CLOSE_FRACTION(cx, 1 - dx, tol500eps); // cx == 1 - dx // << setprecision(2) << scientific << cr - x << ", " // difference x - quan(cdf) // << setprecision(3) << fixed - // << quantile(trim12, dx) << ", " - // << quantile(complement(trim12, 1 - dx)) << ", " - // << quantile(complement(trim12, cx)) << ", " + // << quantile(trim12, dx) << ", " + // << quantile(complement(trim12, 1 - dx)) << ", " + // << quantile(complement(trim12, cx)) << ", " // << endl; BOOST_CHECK_CLOSE_FRACTION(quantile(trim12, dx), quantile(complement(trim12, 1 - dx)), tol500eps); } diff --git a/test/test_uniform.cpp b/test/test_uniform.cpp index b70cc9a58..aaa7b5ec5 100644 --- a/test/test_uniform.cpp +++ b/test/test_uniform.cpp @@ -167,7 +167,7 @@ void test_spots(RealType) static_cast(0)); BOOST_CHECK_EQUAL( // x > upper cdf(complement(uniform_distribution(0, 1), static_cast(2))), - static_cast(1)); + static_cast(0)); // quantile