diff --git a/doc/sf_and_dist/equations/expint_i_1.mml b/doc/sf_and_dist/equations/expint_i_1.mml new file mode 100644 index 000000000..f42d338ca --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_1.mml @@ -0,0 +1,46 @@ + + + E + i + + + x + + + = + + + E + 1 + + + + + x + + + = + + + + + x + + + + + + + e + + + t + + + d + t + + t + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_1.png b/doc/sf_and_dist/equations/expint_i_1.png new file mode 100644 index 000000000..d7c2a69a7 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_i_1.png differ diff --git a/doc/sf_and_dist/equations/expint_i_1.svg b/doc/sf_and_dist/equations/expint_i_1.svg new file mode 100644 index 000000000..821f4e2e2 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_1.svg @@ -0,0 +1,2 @@ + +Ei(x)=E1(x)=xetdtt \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_2.mml b/doc/sf_and_dist/equations/expint_i_2.mml new file mode 100644 index 000000000..87a16f1f2 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_2.mml @@ -0,0 +1,42 @@ + + + Ei + + + z + + + = + log + + + z + + + + + γ + + + + + + k + = + 0 + + + + + + + z + k + + + + k + k + ! + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_2.png b/doc/sf_and_dist/equations/expint_i_2.png new file mode 100644 index 000000000..52d776c27 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_i_2.png differ diff --git a/doc/sf_and_dist/equations/expint_i_2.svg b/doc/sf_and_dist/equations/expint_i_2.svg new file mode 100644 index 000000000..bd5aa4ecc --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_2.svg @@ -0,0 +1,2 @@ + +Ei(z)=log(z)+γ+k=0zkkk! \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_3.mml b/doc/sf_and_dist/equations/expint_i_3.mml new file mode 100644 index 000000000..42fce62bb --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_3.mml @@ -0,0 +1,45 @@ + + + Ei + + + z + + + = + log + + + + z + + z + 0 + + + + + + + + + z + + + z + 0 + + + + R + + + + z + 3 + + + 1 + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_3.png b/doc/sf_and_dist/equations/expint_i_3.png new file mode 100644 index 000000000..3074a9492 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_i_3.png differ diff --git a/doc/sf_and_dist/equations/expint_i_3.svg b/doc/sf_and_dist/equations/expint_i_3.svg new file mode 100644 index 000000000..6a054024e --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_3.svg @@ -0,0 +1,2 @@ + +Ei(z)=log(zz0)+(zz0)R(z31) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_4.mml b/doc/sf_and_dist/equations/expint_i_4.mml new file mode 100644 index 000000000..c2d777b55 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_4.mml @@ -0,0 +1,32 @@ + + + Ei + + + z + + + = + z + + + + + e + z + + z + + + + c + + + R + + + t + + + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_i_4.png b/doc/sf_and_dist/equations/expint_i_4.png new file mode 100644 index 000000000..ae5c58b56 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_i_4.png differ diff --git a/doc/sf_and_dist/equations/expint_i_4.svg b/doc/sf_and_dist/equations/expint_i_4.svg new file mode 100644 index 000000000..a64e89423 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_i_4.svg @@ -0,0 +1,2 @@ + +Ei(z)=z+ezz(c+R(t)) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_1.mml b/doc/sf_and_dist/equations/expint_n_1.mml new file mode 100644 index 000000000..b636c81e6 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_1.mml @@ -0,0 +1,41 @@ + + + + E + n + + + + x + + + = + + + + 1 + + + + + + + e + + + x + t + + + d + t + + + + t + n + + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_1.png b/doc/sf_and_dist/equations/expint_n_1.png new file mode 100644 index 000000000..a757f89d0 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_n_1.png differ diff --git a/doc/sf_and_dist/equations/expint_n_1.svg b/doc/sf_and_dist/equations/expint_n_1.svg new file mode 100644 index 000000000..adcddb490 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_1.svg @@ -0,0 +1,2 @@ + +En(x)=1extdttn \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_2.mml b/doc/sf_and_dist/equations/expint_n_2.mml new file mode 100644 index 000000000..37643d496 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_2.mml @@ -0,0 +1,101 @@ + + + + E + n + + + + x + + + = + + + + + + z + + + + n + + 1 + + + + + + n + + 1 + + + ! + + + + + ψ + + + n + + + + log + + + z + + + + + + + + + k + = + 0, + k + + n + + 1 + + + + + + + + + + 1 + + + k + + + z + k + + + + + + k + + n + + + 1 + + + k + ! + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_2.png b/doc/sf_and_dist/equations/expint_n_2.png new file mode 100644 index 000000000..0776a656f Binary files /dev/null and b/doc/sf_and_dist/equations/expint_n_2.png differ diff --git a/doc/sf_and_dist/equations/expint_n_2.svg b/doc/sf_and_dist/equations/expint_n_2.svg new file mode 100644 index 000000000..50ee895c0 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_2.svg @@ -0,0 +1,2 @@ + +En(x)=(z)n1(n1)!(ψ(n)log(z))k=0,kn1(1)kzk(kn+1)k! \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_3.mml b/doc/sf_and_dist/equations/expint_n_3.mml new file mode 100644 index 000000000..a07a53b5c --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_3.mml @@ -0,0 +1,101 @@ + + + + E + n + + + + x + + + = + + + e + + + x + + + + n + + + x + + + n + + 2 + + + n + + + x + + + + 2 + + + n + + + 1 + + + + + 4 + + + n + + + x + + + + 3 + + + n + + + 2 + + + + + 6 + + + n + + + x + + + + 4 + + + n + + + 3 + + + + + 8 + + + n + + + x + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_3.png b/doc/sf_and_dist/equations/expint_n_3.png new file mode 100644 index 000000000..98c4efb63 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_n_3.png differ diff --git a/doc/sf_and_dist/equations/expint_n_3.svg b/doc/sf_and_dist/equations/expint_n_3.svg new file mode 100644 index 000000000..e293c713b --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_3.svg @@ -0,0 +1,2 @@ + +En(x)=exn+xn2+n+x2(n+1)4+n+x3(n+2)6+n+x4(n+3)8+n+x \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_4.mml b/doc/sf_and_dist/equations/expint_n_4.mml new file mode 100644 index 000000000..54bda19e1 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_4.mml @@ -0,0 +1,31 @@ + + + + E + 1 + + + + x + + + = + x + + + log + + + x + + + + + c + + + R + + + x + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_4.png b/doc/sf_and_dist/equations/expint_n_4.png new file mode 100644 index 000000000..f65927b25 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_n_4.png differ diff --git a/doc/sf_and_dist/equations/expint_n_4.svg b/doc/sf_and_dist/equations/expint_n_4.svg new file mode 100644 index 000000000..c9d74cb54 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_4.svg @@ -0,0 +1,2 @@ + +E1(x)=x+log(x)+c+R(x) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_5.mml b/doc/sf_and_dist/equations/expint_n_5.mml new file mode 100644 index 000000000..a888144ab --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_5.mml @@ -0,0 +1,39 @@ + + + + E + 1 + + + + x + + + = + + + e + + + x + + + x + + + + 1 + + + R + + + + 1 + x + + + + + + + \ No newline at end of file diff --git a/doc/sf_and_dist/equations/expint_n_5.png b/doc/sf_and_dist/equations/expint_n_5.png new file mode 100644 index 000000000..02d488994 Binary files /dev/null and b/doc/sf_and_dist/equations/expint_n_5.png differ diff --git a/doc/sf_and_dist/equations/expint_n_5.svg b/doc/sf_and_dist/equations/expint_n_5.svg new file mode 100644 index 000000000..5ab788944 --- /dev/null +++ b/doc/sf_and_dist/equations/expint_n_5.svg @@ -0,0 +1,2 @@ + +E1(x)=exx(1+R(1x)) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/zeta1.png b/doc/sf_and_dist/equations/zeta1.png index c611d30e6..524311217 100644 Binary files a/doc/sf_and_dist/equations/zeta1.png and b/doc/sf_and_dist/equations/zeta1.png differ diff --git a/doc/sf_and_dist/equations/zeta2.png b/doc/sf_and_dist/equations/zeta2.png index dbb613f2b..b6ce624bc 100644 Binary files a/doc/sf_and_dist/equations/zeta2.png and b/doc/sf_and_dist/equations/zeta2.png differ diff --git a/doc/sf_and_dist/equations/zeta3.png b/doc/sf_and_dist/equations/zeta3.png index 4c6b07f28..ab1648f31 100644 Binary files a/doc/sf_and_dist/equations/zeta3.png and b/doc/sf_and_dist/equations/zeta3.png differ diff --git a/doc/sf_and_dist/equations/zeta4.png b/doc/sf_and_dist/equations/zeta4.png index 89a5d2c0e..26280b144 100644 Binary files a/doc/sf_and_dist/equations/zeta4.png and b/doc/sf_and_dist/equations/zeta4.png differ diff --git a/doc/sf_and_dist/equations/zeta5.png b/doc/sf_and_dist/equations/zeta5.png index 8d3f4376b..8667993f9 100644 Binary files a/doc/sf_and_dist/equations/zeta5.png and b/doc/sf_and_dist/equations/zeta5.png differ diff --git a/doc/sf_and_dist/expint.qbk b/doc/sf_and_dist/expint.qbk new file mode 100644 index 000000000..f71bb32d8 --- /dev/null +++ b/doc/sf_and_dist/expint.qbk @@ -0,0 +1,227 @@ +[section:expint Exponential Integrals] + +[section:expint_n Exponential Integral En] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ + + template + ``__sf_result`` expint(unsigned n, T z); + + template + ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&); + + }} // namespaces + +The return type of these functions is computed using the __arg_pomotion_rules: +the return type is `double` if T is an integer type, and T otherwise. + +[optional_policy] + +[h4 Description] + + template + ``__sf_result`` expint(unsigned n, T z); + + template + ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&); + +Returns the [@http://mathworld.wolfram.com/En-Function.html exponential integral En] +of z: + +[equation expint_n_1] + +[h4 Accuracy] + +The following table shows the peak errors (in units of epsilon) +found on various platforms with various floating point types, +along with comparisons to the __cephes library. +Unless otherwise specified any floating point type that is narrower +than the one shown will have __zero_error. + +[table Errors In the Function expint(n, z) +[[Significand Size] [Platform and Compiler] [En][E1]] +[[53] [Win32, Visual C++ 8] [Peak=7.1 Mean=1.8 + +__cephes Peak=5.1 Mean=1.3 +] +[Peak=0.99 Mean=0.5 + +__cephes Peak=3.1 Mean=1.1]] +[[64] [RedHat Linux IA_EM64, gcc-4.1] [Peak=9.9 Mean=2.1] [Peak=0.97 Mean=0.4]] +[[64] [Redhat Linux IA64, gcc-4.1] [Peak=9.9 Mean=2.1] [Peak=0.97 Mean=0.4]] +[[113] [HPUX IA64, aCC A.06.06] [Peak=23.3 Mean=3.7] [Peak=1.6 Mean=0.5]] +] + +[h4 Testing] + +The tests for these functions come in two parts: +basic sanity checks use spot values calculated using +[@http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=ExpIntegralE Mathworld's online evaluator], +while accuracy checks use high-precision test values calculated at 1000-bit precision with +[@http://shoup.net/ntl/doc/RR.txt NTL::RR] and this implementation. +Note that the generic and type-specific +versions of these functions use differing implementations internally, so this +gives us reasonably independent test data. Using our test data to test other +"known good" implementations also provides an additional sanity check. + +[h4 Implementation] + +The generic version of this function uses the continued fraction: + +[equation expint_n_3] + +for large /x/ and the infinite series: + +[equation expint_n_2] + +for small /x/. + +Where the precision of /x/ is known at compile time and is 113 bits or fewer +in precision, then rational approximations [jm_rationals] are used for the +`n == 1` case. + +For `x < 1` the approximating form is a minimax approximation: + +[equation expint_n_4] + +and for `x > 1` a Chebyshev interpolated approximation of the form: + +[equation expint_n_5] + +is used. + + +[endsect] + +[section:expint_i Exponential Integral Ei] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ + + template + ``__sf_result`` expint(T z); + + template + ``__sf_result`` expint(T z, const ``__Policy``&); + + }} // namespaces + +The return type of these functions is computed using the __arg_pomotion_rules: +the return type is `double` if T is an integer type, and T otherwise. + +[optional_policy] + +[h4 Description] + + template + ``__sf_result`` expint(T z); + + template + ``__sf_result`` expint(T z, const ``__Policy``&); + +Returns the [@http://mathworld.wolfram.com/ExponentialIntegral.html exponential integral] +of z: + +[equation expint_i_1] + +[h4 Accuracy] + +The following table shows the peak errors (in units of epsilon) +found on various platforms with various floating point types, +along with comparisons to the __gsl library. +Unless otherwise specified any floating point type that is narrower +than the one shown will have __zero_error. + +[table Errors In the Function expint(z) +[[Significand Size] [Platform and Compiler] [Error]] +[[53] [Win32, Visual C++ 8] [Peak=2.4 Mean=0.6 + +GSL Peak=8.9 Mean=0.7 +]] +[[64] [RedHat Linux IA_EM64, gcc-4.1] [Peak=5.1 Mean=0.8]] +[[64] [Redhat Linux IA64, gcc-4.1] [Peak=5.0 Mean=0.8] ] +[[113] [HPUX IA64, aCC A.06.06] [Peak=1.9 Mean=0.63]] +] + +[h4 Testing] + +The tests for these functions come in two parts: +basic sanity checks use spot values calculated using +[@http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=ExpIntegralEi Mathworld's online evaluator], +while accuracy checks use high-precision test values calculated at 1000-bit precision with +[@http://shoup.net/ntl/doc/RR.txt NTL::RR] and this implementation. +Note that the generic and type-specific +versions of these functions use differing implementations internally, so this +gives us reasonably independent test data. Using our test data to test other +"known good" implementations also provides an additional sanity check. + +[h4 Implementation] + +For x < 0 this function just calls __expint_n(1, -x): which in turn is implemented +in terms of rational approximations when the type of x has 113 or fewer bits of +precision. + +For x > 0 the generic version is implemented using the infinte series: + +[equation expint_i_2] + +However, when the precision of the argument type is known at compile time +and is 113 bits or less, then rational approximations [jm_rationals] are used. + +For 0 < z < 6 a root-preserving approximation of the form: + +[equation expint_i_3] + +is used, where z[sub 0] is the positive root of the function, and +R(z/3 - 1) is 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 +[footnote W. J. Cody and H. C. Thacher, Jr., +Rational Chebyshev approximations for the exponential integral E[sub 1](x), +Math. Comp. 22 (1968), 641-649, +and W. J. Cody and H. C. Thacher, Jr., Chebyshev approximations for the +exponential integral Ei(x), Math. Comp. 23 (1969), 289-303.] +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\]. + +Over the a series of intervals [a,b] and [b,INF] the rational approximation +takes the form: + +[equation expint_i_4] + +where /c/ is a constant, and R(t) is a minimax solution optimised for low +absolute error compared to /c/. Variable /t/ is `1/z` when the range in infinite +and `2z/(b-a) - (2a/(b-a) + 1)` otherwise: this has the effect of scaling z to the +interval \[-1,1\]. As before rational approximations over arbitrary intervals +were found to be ill-conditioned: Cody and Thacher solved this issue by +converting the polynomials to their J-Fraction equivalent. However, as long +as the interval of evaluation was \[-1,1\] and the number of terms carefully chosen, +it was found that the polynomials /could/ be evaluated to suitable precision: +error rates are typically 2 to 3 epsilon which is comparible to the error +rate that Cody and Thacher achieved using J-Fractions, but marginally more +efficient given that fewer divisions are involved. + +[endsect] +[endsect] + +[/ + Copyright 2006 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] diff --git a/doc/sf_and_dist/implementation.qbk b/doc/sf_and_dist/implementation.qbk index d3e8701c3..6e4183ec8 100644 --- a/doc/sf_and_dist/implementation.qbk +++ b/doc/sf_and_dist/implementation.qbk @@ -445,6 +445,14 @@ and a command such as: [pre java -jar 'C:\download\open\batik-1.7\batik-rasterizer.jar' -dpi 120 *.svg] +Or using Inkscape and a command such as: + +[pre for file in *.svg; do + /cygdrive/c/progra~1/Inkscape/inkscape -d 120 -e $(cygpath -a -w $(basename $file .svg).png) $(cygpath -a -w $file); +done] + +Currently Inkscape seems to generate the better looking png's. + The PDF is generated into \pdf\math.pdf using a command from a shell or command window with current directory \math_toolkit\libs\math\doc\sf_and_dist, typically: diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 50180856a..7fde5857b 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -163,6 +163,15 @@ and use the function's name as the link text] [def __powm1 [link math_toolkit.special.powers.powm1 powm1]] [def __hypot [link math_toolkit.special.powers.hypot hypot]] +[/zeta] +[def __zeta [link math_toolkit.special.zetas.zeta zeta]] + +[/expint] +[def __expint_i [link math_toolkit.special.expint.expint_i zeta]] +[def __expint_n [link math_toolkit.special.expint.expint_n zeta]] + + + [/ distribution non-members] [def __cdf [link math.dist.cdf Cumulative Distribution Function]] [def __pdf [link math.dist.pdf Probability Density Function]] @@ -347,6 +356,8 @@ for these distributions. [include zeta.qbk] [endsect] +[include expint.qbk] + [include powers.qbk] [include sinc.qbk] [include inv_hyper.qbk] diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 5fa16a807..48cce3545 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -10,6 +10,9 @@ #ifndef BOOST_ACOSH_HPP #define BOOST_ACOSH_HPP +#ifdef _MSC_VER +#pragma once +#endif #include #include @@ -110,3 +113,4 @@ namespace boost + diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index 502e514b0..6caa4bbc7 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -10,6 +10,10 @@ #ifndef BOOST_ASINH_HPP #define BOOST_ASINH_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -110,3 +114,4 @@ namespace boost } #endif /* BOOST_ASINH_HPP */ + diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index 35325a3d7..b67297ec3 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -10,6 +10,10 @@ #ifndef BOOST_ATANH_HPP #define BOOST_ATANH_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -120,3 +124,4 @@ namespace boost #endif /* BOOST_ATANH_HPP */ + diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp index 98b32b33c..57ec5fb0e 100644 --- a/include/boost/math/special_functions/bessel.hpp +++ b/include/boost/math/special_functions/bessel.hpp @@ -10,6 +10,10 @@ #ifndef BOOST_MATH_BESSEL_HPP #define BOOST_MATH_BESSEL_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -482,3 +486,4 @@ inline typename detail::bessel_traits >::result_type sp } // namespace boost #endif // BOOST_MATH_BESSEL_HPP + diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 5add7d874..01fa03bfb 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SPECIAL_BETA_HPP #define BOOST_MATH_SPECIAL_BETA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -1348,3 +1352,4 @@ inline typename tools::promote_args::type + diff --git a/include/boost/math/special_functions/binomial.hpp b/include/boost/math/special_functions/binomial.hpp index 74f8da018..d394b0488 100644 --- a/include/boost/math/special_functions/binomial.hpp +++ b/include/boost/math/special_functions/binomial.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SF_BINOMIAL_HPP #define BOOST_MATH_SF_BINOMIAL_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -73,3 +77,4 @@ inline T binomial_coefficient(unsigned n, unsigned k) #endif // BOOST_MATH_SF_BINOMIAL_HPP + diff --git a/include/boost/math/special_functions/cbrt.hpp b/include/boost/math/special_functions/cbrt.hpp index d8c9ad4e6..c43f9b625 100644 --- a/include/boost/math/special_functions/cbrt.hpp +++ b/include/boost/math/special_functions/cbrt.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SF_CBRT_HPP #define BOOST_MATH_SF_CBRT_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -70,3 +74,4 @@ inline typename tools::promote_args::type cbrt(T z) + diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 7196adb90..b79531cb1 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_COS_PI_HPP #define BOOST_MATH_COS_PI_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -51,3 +55,4 @@ inline T cos_pi(T x, const Policy&) } // namespace math } // namespace boost #endif + diff --git a/include/boost/math/special_functions/detail/bessel_i0.hpp b/include/boost/math/special_functions/detail/bessel_i0.hpp index dde226e0f..c8325f093 100644 --- a/include/boost/math/special_functions/detail/bessel_i0.hpp +++ b/include/boost/math/special_functions/detail/bessel_i0.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_I0_HPP #define BOOST_MATH_BESSEL_I0_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -94,3 +98,4 @@ T bessel_i0(T x) }}} // namespaces #endif // BOOST_MATH_BESSEL_I0_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_i1.hpp b/include/boost/math/special_functions/detail/bessel_i1.hpp index 928b47510..9df0e69c4 100644 --- a/include/boost/math/special_functions/detail/bessel_i1.hpp +++ b/include/boost/math/special_functions/detail/bessel_i1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_I1_HPP #define BOOST_MATH_BESSEL_I1_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -97,3 +101,4 @@ T bessel_i1(T x) }}} // namespaces #endif // BOOST_MATH_BESSEL_I1_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_ik.hpp b/include/boost/math/special_functions/detail/bessel_ik.hpp index c20a6641f..dd51cb6b2 100644 --- a/include/boost/math/special_functions/detail/bessel_ik.hpp +++ b/include/boost/math/special_functions/detail/bessel_ik.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_IK_HPP #define BOOST_MATH_BESSEL_IK_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -329,3 +333,4 @@ int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_IK_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_j0.hpp b/include/boost/math/special_functions/detail/bessel_j0.hpp index 9191dccb5..59783f620 100644 --- a/include/boost/math/special_functions/detail/bessel_j0.hpp +++ b/include/boost/math/special_functions/detail/bessel_j0.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_J0_HPP #define BOOST_MATH_BESSEL_J0_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -145,3 +149,4 @@ T bessel_j0(T x) }}} // namespaces #endif // BOOST_MATH_BESSEL_J0_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_j1.hpp b/include/boost/math/special_functions/detail/bessel_j1.hpp index 906f2a8a4..ea98bc227 100644 --- a/include/boost/math/special_functions/detail/bessel_j1.hpp +++ b/include/boost/math/special_functions/detail/bessel_j1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_J1_HPP #define BOOST_MATH_BESSEL_J1_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -150,3 +154,4 @@ T bessel_j1(T x) }}} // namespaces #endif // BOOST_MATH_BESSEL_J1_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_jn.hpp b/include/boost/math/special_functions/detail/bessel_jn.hpp index cf89d28ce..b1f1a0246 100644 --- a/include/boost/math/special_functions/detail/bessel_jn.hpp +++ b/include/boost/math/special_functions/detail/bessel_jn.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_JN_HPP #define BOOST_MATH_BESSEL_JN_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -84,3 +88,4 @@ T bessel_jn(int n, T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_JN_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_jy.hpp b/include/boost/math/special_functions/detail/bessel_jy.hpp index 9ef303ec6..e67f753f4 100644 --- a/include/boost/math/special_functions/detail/bessel_jy.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_JY_HPP #define BOOST_MATH_BESSEL_JY_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -359,3 +363,4 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) }} // namespaces #endif // BOOST_MATH_BESSEL_JY_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_jy_asym.hpp b/include/boost/math/special_functions/detail/bessel_jy_asym.hpp index 478c84306..098cb8b14 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_asym.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_asym.hpp @@ -12,6 +12,10 @@ #ifndef BOOST_MATH_SF_DETAIL_BESSEL_JY_ASYM_HPP #define BOOST_MATH_SF_DETAIL_BESSEL_JY_ASYM_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include namespace boost{ namespace math{ namespace detail{ @@ -295,3 +299,4 @@ T asymptotic_bessel_i_large_x(T v, T x, const Policy& pol) }}} // namespaces #endif + diff --git a/include/boost/math/special_functions/detail/bessel_k0.hpp b/include/boost/math/special_functions/detail/bessel_k0.hpp index a86a055dc..fae03e485 100644 --- a/include/boost/math/special_functions/detail/bessel_k0.hpp +++ b/include/boost/math/special_functions/detail/bessel_k0.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_K0_HPP #define BOOST_MATH_BESSEL_K0_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -114,3 +118,4 @@ T bessel_k0(T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_K0_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_k1.hpp b/include/boost/math/special_functions/detail/bessel_k1.hpp index 198c3eb57..5830a7f8f 100644 --- a/include/boost/math/special_functions/detail/bessel_k1.hpp +++ b/include/boost/math/special_functions/detail/bessel_k1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_K1_HPP #define BOOST_MATH_BESSEL_K1_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -110,3 +114,4 @@ T bessel_k1(T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_K1_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_kn.hpp b/include/boost/math/special_functions/detail/bessel_kn.hpp index 8d30462e8..fdee7d44f 100644 --- a/include/boost/math/special_functions/detail/bessel_kn.hpp +++ b/include/boost/math/special_functions/detail/bessel_kn.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_KN_HPP #define BOOST_MATH_BESSEL_KN_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -67,3 +71,4 @@ T bessel_kn(int n, T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_KN_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_y0.hpp b/include/boost/math/special_functions/detail/bessel_y0.hpp index 4e6db50dc..d2b65b854 100644 --- a/include/boost/math/special_functions/detail/bessel_y0.hpp +++ b/include/boost/math/special_functions/detail/bessel_y0.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_Y0_HPP #define BOOST_MATH_BESSEL_Y0_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -175,3 +179,4 @@ T bessel_y0(T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_Y0_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_y1.hpp b/include/boost/math/special_functions/detail/bessel_y1.hpp index de0bef519..e8372eee4 100644 --- a/include/boost/math/special_functions/detail/bessel_y1.hpp +++ b/include/boost/math/special_functions/detail/bessel_y1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_Y1_HPP #define BOOST_MATH_BESSEL_Y1_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -148,3 +152,4 @@ T bessel_y1(T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_Y1_HPP + diff --git a/include/boost/math/special_functions/detail/bessel_yn.hpp b/include/boost/math/special_functions/detail/bessel_yn.hpp index 3ae9d12c5..e0788f844 100644 --- a/include/boost/math/special_functions/detail/bessel_yn.hpp +++ b/include/boost/math/special_functions/detail/bessel_yn.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_BESSEL_YN_HPP #define BOOST_MATH_BESSEL_YN_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -77,3 +81,4 @@ T bessel_yn(int n, T x, const Policy& pol) }}} // namespaces #endif // BOOST_MATH_BESSEL_YN_HPP + diff --git a/include/boost/math/special_functions/detail/erf_inv.hpp b/include/boost/math/special_functions/detail/erf_inv.hpp index 5d3afe5d8..3b0a175aa 100644 --- a/include/boost/math/special_functions/detail/erf_inv.hpp +++ b/include/boost/math/special_functions/detail/erf_inv.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SF_ERF_INV_HPP #define BOOST_MATH_SF_ERF_INV_HPP +#ifdef _MSC_VER +#pragma once +#endif + namespace boost{ namespace math{ namespace detail{ @@ -462,3 +466,4 @@ inline typename tools::promote_args::type erf_inv(T z) } // namespace boost #endif // BOOST_MATH_SF_ERF_INV_HPP + diff --git a/include/boost/math/special_functions/detail/gamma_inva.hpp b/include/boost/math/special_functions/detail/gamma_inva.hpp index 38f554f0a..db58d64d4 100644 --- a/include/boost/math/special_functions/detail/gamma_inva.hpp +++ b/include/boost/math/special_functions/detail/gamma_inva.hpp @@ -13,6 +13,10 @@ #ifndef BOOST_MATH_SP_DETAIL_GAMMA_INVA #define BOOST_MATH_SP_DETAIL_GAMMA_INVA +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -176,3 +180,4 @@ inline T gamma_q_inva(T x, T q) #endif // BOOST_MATH_SP_DETAIL_GAMMA_INVA + diff --git a/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp b/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp index 1086aff3d..8215a53ef 100644 --- a/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp @@ -13,6 +13,10 @@ #ifndef BOOST_MATH_SP_DETAIL_BETA_INV_AB #define BOOST_MATH_SP_DETAIL_BETA_INV_AB +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -209,3 +213,4 @@ inline T ibetac_invb(T b, T x, T q) #endif // BOOST_MATH_SP_DETAIL_BETA_INV_AB + diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index bf1fe189f..04898db87 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_IBETA_INVERSE_HPP #define BOOST_MATH_SPECIAL_FUNCTIONS_IBETA_INVERSE_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -932,3 +936,4 @@ inline typename tools::promote_args::type + diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index 8fd564faa..ff182bb2d 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -6,11 +6,15 @@ #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_IGAMMA_INVERSE_HPP #define BOOST_MATH_SPECIAL_FUNCTIONS_IGAMMA_INVERSE_HPP +#ifdef _MSC_VER +#pragma once +#endif + +#include #include #include #include #include -#include namespace boost{ namespace math{ @@ -464,3 +468,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_SPECIAL_FUNCTIONS_IGAMMA_INVERSE_HPP + diff --git a/include/boost/math/special_functions/detail/igamma_large.hpp b/include/boost/math/special_functions/detail/igamma_large.hpp index 539489a57..f3de0df03 100644 --- a/include/boost/math/special_functions/detail/igamma_large.hpp +++ b/include/boost/math/special_functions/detail/igamma_large.hpp @@ -45,6 +45,10 @@ #ifndef BOOST_MATH_DETAIL_IGAMMA_LARGE #define BOOST_MATH_DETAIL_IGAMMA_LARGE +#ifdef _MSC_VER +#pragma once +#endif + namespace boost{ namespace math{ namespace detail{ // This version will never be called (at runtime), it's a stub used @@ -762,3 +766,4 @@ T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<113> const *) #endif // BOOST_MATH_DETAIL_IGAMMA_LARGE + diff --git a/include/boost/math/special_functions/detail/lgamma_small.hpp b/include/boost/math/special_functions/detail/lgamma_small.hpp index c112c2784..161bf9fb6 100644 --- a/include/boost/math/special_functions/detail/lgamma_small.hpp +++ b/include/boost/math/special_functions/detail/lgamma_small.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL #define BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL +#ifdef _MSC_VER +#pragma once +#endif + namespace boost{ namespace math{ namespace detail{ // @@ -505,3 +509,4 @@ T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<0>&, const Policy& pol, co }}} // namespaces #endif // BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL + diff --git a/include/boost/math/special_functions/detail/simple_complex.hpp b/include/boost/math/special_functions/detail/simple_complex.hpp index e01cf5efb..5a1568e43 100644 --- a/include/boost/math/special_functions/detail/simple_complex.hpp +++ b/include/boost/math/special_functions/detail/simple_complex.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SF_DETAIL_SIMPLE_COMPLEX_HPP #define BOOST_MATH_SF_DETAIL_SIMPLE_COMPLEX_HPP +#ifdef _MSC_VER +#pragma once +#endif + namespace boost{ namespace math{ namespace detail{ namespace sc{ template @@ -165,3 +169,4 @@ inline T abs(const simple_complex& c) #endif + diff --git a/include/boost/math/special_functions/detail/t_distribution_inv.hpp b/include/boost/math/special_functions/detail/t_distribution_inv.hpp index 2af3cb957..f00b24669 100644 --- a/include/boost/math/special_functions/detail/t_distribution_inv.hpp +++ b/include/boost/math/special_functions/detail/t_distribution_inv.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SF_DETAIL_INV_T_HPP #define BOOST_MATH_SF_DETAIL_INV_T_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include namespace boost{ namespace math{ namespace detail{ @@ -507,3 +511,4 @@ inline T fast_students_t_quantile(T df, T p, const Policy& pol) #endif // BOOST_MATH_SF_DETAIL_INV_T_HPP + diff --git a/include/boost/math/special_functions/detail/unchecked_factorial.hpp b/include/boost/math/special_functions/detail/unchecked_factorial.hpp index 04dcfcb64..6eca089fd 100644 --- a/include/boost/math/special_functions/detail/unchecked_factorial.hpp +++ b/include/boost/math/special_functions/detail/unchecked_factorial.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SP_UC_FACTORIALS_HPP #define BOOST_MATH_SP_UC_FACTORIALS_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #ifdef BOOST_MSVC #pragma warning(push) // Temporary until lexical cast fixed. @@ -395,3 +399,4 @@ struct max_factorial } // namespace boost #endif // BOOST_MATH_SP_UC_FACTORIALS_HPP + diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 12946cec7..a1008d2bb 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SF_DIGAMMA_HPP #define BOOST_MATH_SF_DIGAMMA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -443,3 +447,4 @@ inline typename tools::promote_args::type } // namespace math } // namespace boost #endif + diff --git a/include/boost/math/special_functions/ellint_1.hpp b/include/boost/math/special_functions/ellint_1.hpp index 8b10cf044..9de2f66f6 100644 --- a/include/boost/math/special_functions/ellint_1.hpp +++ b/include/boost/math/special_functions/ellint_1.hpp @@ -14,6 +14,10 @@ #ifndef BOOST_MATH_ELLINT_1_HPP #define BOOST_MATH_ELLINT_1_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -180,3 +184,4 @@ inline typename tools::promote_args::type ellint_1(T1 k, T2 phi) }} // namespaces #endif // BOOST_MATH_ELLINT_1_HPP + diff --git a/include/boost/math/special_functions/ellint_2.hpp b/include/boost/math/special_functions/ellint_2.hpp index 341fd8be3..182157833 100644 --- a/include/boost/math/special_functions/ellint_2.hpp +++ b/include/boost/math/special_functions/ellint_2.hpp @@ -14,6 +14,10 @@ #ifndef BOOST_MATH_ELLINT_2_HPP #define BOOST_MATH_ELLINT_2_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -161,3 +165,4 @@ inline typename tools::promote_args::type ellint_2(T1 k, T2 phi, const P }} // namespaces #endif // BOOST_MATH_ELLINT_2_HPP + diff --git a/include/boost/math/special_functions/ellint_3.hpp b/include/boost/math/special_functions/ellint_3.hpp index ee5aa8359..d60fa822d 100644 --- a/include/boost/math/special_functions/ellint_3.hpp +++ b/include/boost/math/special_functions/ellint_3.hpp @@ -14,6 +14,10 @@ #ifndef BOOST_MATH_ELLINT_3_HPP #define BOOST_MATH_ELLINT_3_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -325,3 +329,4 @@ inline typename tools::promote_args::type ellint_3(T1 k, T2 v) }} // namespaces #endif // BOOST_MATH_ELLINT_3_HPP + diff --git a/include/boost/math/special_functions/ellint_rc.hpp b/include/boost/math/special_functions/ellint_rc.hpp index ace2851b3..c78d4d450 100644 --- a/include/boost/math/special_functions/ellint_rc.hpp +++ b/include/boost/math/special_functions/ellint_rc.hpp @@ -13,6 +13,10 @@ #ifndef BOOST_MATH_ELLINT_RC_HPP #define BOOST_MATH_ELLINT_RC_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -108,3 +112,4 @@ inline typename tools::promote_args::type }} // namespaces #endif // BOOST_MATH_ELLINT_RC_HPP + diff --git a/include/boost/math/special_functions/ellint_rd.hpp b/include/boost/math/special_functions/ellint_rd.hpp index 0a8f946c1..639a05ab8 100644 --- a/include/boost/math/special_functions/ellint_rd.hpp +++ b/include/boost/math/special_functions/ellint_rd.hpp @@ -11,6 +11,10 @@ #ifndef BOOST_MATH_ELLINT_RD_HPP #define BOOST_MATH_ELLINT_RD_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -123,3 +127,4 @@ inline typename tools::promote_args::type }} // namespaces #endif // BOOST_MATH_ELLINT_RD_HPP + diff --git a/include/boost/math/special_functions/ellint_rf.hpp b/include/boost/math/special_functions/ellint_rf.hpp index f573b21c7..6be76d876 100644 --- a/include/boost/math/special_functions/ellint_rf.hpp +++ b/include/boost/math/special_functions/ellint_rf.hpp @@ -12,6 +12,10 @@ #ifndef BOOST_MATH_ELLINT_RF_HPP #define BOOST_MATH_ELLINT_RF_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -125,3 +129,4 @@ inline typename tools::promote_args::type }} // namespaces #endif // BOOST_MATH_ELLINT_RF_HPP + diff --git a/include/boost/math/special_functions/ellint_rj.hpp b/include/boost/math/special_functions/ellint_rj.hpp index 7adc67671..48a0fc61a 100644 --- a/include/boost/math/special_functions/ellint_rj.hpp +++ b/include/boost/math/special_functions/ellint_rj.hpp @@ -13,6 +13,10 @@ #ifndef BOOST_MATH_ELLINT_RJ_HPP #define BOOST_MATH_ELLINT_RJ_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -172,3 +176,4 @@ inline typename tools::promote_args::type }} // namespaces #endif // BOOST_MATH_ELLINT_RJ_HPP + diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 3e1894dec..99c8bfd03 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SPECIAL_ERF_HPP #define BOOST_MATH_SPECIAL_ERF_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -856,3 +860,4 @@ inline typename tools::promote_args::type erfc(T z) + diff --git a/include/boost/math/special_functions/expint.hpp b/include/boost/math/special_functions/expint.hpp index e99543536..71b851185 100644 --- a/include/boost/math/special_functions/expint.hpp +++ b/include/boost/math/special_functions/expint.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_EXPINT_HPP #define BOOST_MATH_EXPINT_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -432,7 +436,7 @@ T expint_imp(unsigned n, T z, const Policy& pol, const Tag& tag) if(z < 0) return policies::raise_domain_error(function, "Function requires z >= 0 but got %1%.", z, pol); if(z == 0) - return n == 1 ? policies::raise_overflow_error(function, 0, pol) : 1 / (n - 1); + return n == 1 ? policies::raise_overflow_error(function, 0, pol) : 1 / (static_cast(n - 1)); T result; @@ -1489,7 +1493,7 @@ inline typename tools::promote_args::type template inline typename detail::expint_result::type - expint(T const& z, U const& u) + expint(T const z, U const u) { typedef typename policies::is_policy::type tag_type; return detail::expint_forwarder(z, u, tag_type()); @@ -1506,3 +1510,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_EXPINT_HPP + diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index cb88a18d1..7f83e559e 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_EXPM1_INCLUDED #define BOOST_MATH_EXPM1_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include // platform's ::expm1 #include @@ -267,3 +271,4 @@ inline long double expm1(long double z) #endif // BOOST_MATH_HYPOT_INCLUDED + diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index 8bb640d1d..5c36f5c4d 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SP_FACTORIALS_HPP #define BOOST_MATH_SP_FACTORIALS_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -222,3 +226,4 @@ inline typename tools::promote_args::type } // namespace boost #endif // BOOST_MATH_SP_FACTORIALS_HPP + diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index 996c8cb0c..135ad729f 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_FPCLASSIFY_HPP #define BOOST_MATH_FPCLASSIFY_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -238,3 +242,4 @@ inline bool isnormal BOOST_NO_MACRO_EXPAND(T t) + diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 11706ad38..cf185cada 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -8,6 +8,10 @@ #ifndef BOOST_MATH_SF_GAMMA_HPP #define BOOST_MATH_SF_GAMMA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #ifdef BOOST_MSVC # pragma warning(push) @@ -1469,3 +1473,4 @@ inline typename tools::promote_args::type + diff --git a/include/boost/math/special_functions/hermite.hpp b/include/boost/math/special_functions/hermite.hpp index 39c297a5b..1221f414d 100644 --- a/include/boost/math/special_functions/hermite.hpp +++ b/include/boost/math/special_functions/hermite.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SPECIAL_HERMITE_HPP #define BOOST_MATH_SPECIAL_HERMITE_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -69,3 +73,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_SPECIAL_HERMITE_HPP + diff --git a/include/boost/math/special_functions/hypot.hpp b/include/boost/math/special_functions/hypot.hpp index ba97b9937..c182ada83 100644 --- a/include/boost/math/special_functions/hypot.hpp +++ b/include/boost/math/special_functions/hypot.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_HYPOT_INCLUDED #define BOOST_MATH_HYPOT_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -79,3 +83,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_HYPOT_INCLUDED + diff --git a/include/boost/math/special_functions/laguerre.hpp b/include/boost/math/special_functions/laguerre.hpp index d41eafaad..070927f26 100644 --- a/include/boost/math/special_functions/laguerre.hpp +++ b/include/boost/math/special_functions/laguerre.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SPECIAL_LAGUERRE_HPP #define BOOST_MATH_SPECIAL_LAGUERRE_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -132,3 +136,4 @@ inline typename laguerre_result::type #endif // BOOST_MATH_SPECIAL_LAGUERRE_HPP + diff --git a/include/boost/math/special_functions/lanczos.hpp b/include/boost/math/special_functions/lanczos.hpp index 2f984f615..730bb0bc0 100644 --- a/include/boost/math/special_functions/lanczos.hpp +++ b/include/boost/math/special_functions/lanczos.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS #define BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -1229,3 +1233,4 @@ struct lanczos + diff --git a/include/boost/math/special_functions/legendre.hpp b/include/boost/math/special_functions/legendre.hpp index 019df1ed1..074383ddb 100644 --- a/include/boost/math/special_functions/legendre.hpp +++ b/include/boost/math/special_functions/legendre.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SPECIAL_LEGENDRE_HPP #define BOOST_MATH_SPECIAL_LEGENDRE_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -187,3 +191,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_SPECIAL_LEGENDRE_HPP + diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index d5d95eec6..0e093a618 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_LOG1P_INCLUDED #define BOOST_MATH_LOG1P_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include // platform's ::log1p #include @@ -275,3 +279,4 @@ inline T log1pmx(T x) #endif // BOOST_MATH_LOG1P_INCLUDED + diff --git a/include/boost/math/special_functions/math_fwd.hpp b/include/boost/math/special_functions/math_fwd.hpp index db7776b7a..9db063e8a 100644 --- a/include/boost/math/special_functions/math_fwd.hpp +++ b/include/boost/math/special_functions/math_fwd.hpp @@ -19,6 +19,10 @@ #ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP #define BOOST_MATH_SPECIAL_MATH_FWD_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include // for argument promotion. #include #include @@ -640,7 +644,7 @@ namespace boost typename tools::promote_args::type expint(unsigned n, T z, const Policy&); template - typename detail::expint_result::type expint(T const& z, U const& u); + typename detail::expint_result::type expint(T const z, U const u); template typename tools::promote_args::type expint(T z); @@ -952,3 +956,4 @@ namespace boost #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP + diff --git a/include/boost/math/special_functions/powm1.hpp b/include/boost/math/special_functions/powm1.hpp index dd1467d42..cb33ae03d 100644 --- a/include/boost/math/special_functions/powm1.hpp +++ b/include/boost/math/special_functions/powm1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_POWM1 #define BOOST_MATH_POWM1 +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -54,3 +58,4 @@ inline typename tools::promote_args::type + diff --git a/include/boost/math/special_functions/sign.hpp b/include/boost/math/special_functions/sign.hpp index dd4cb8618..7ff450422 100644 --- a/include/boost/math/special_functions/sign.hpp +++ b/include/boost/math/special_functions/sign.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_SIGN_HPP #define BOOST_MATH_TOOLS_SIGN_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -36,3 +40,4 @@ inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y) #endif // BOOST_MATH_TOOLS_SIGN_HPP + diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index d4c6296a7..ac79fe0a5 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SIN_PI_HPP #define BOOST_MATH_SIN_PI_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -53,3 +57,4 @@ inline T sin_pi(T x, const Policy&) } // namespace math } // namespace boost #endif + diff --git a/include/boost/math/special_functions/sinc.hpp b/include/boost/math/special_functions/sinc.hpp index 507d45d74..8c1247a6d 100644 --- a/include/boost/math/special_functions/sinc.hpp +++ b/include/boost/math/special_functions/sinc.hpp @@ -11,6 +11,10 @@ #define BOOST_SINC_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -170,3 +174,4 @@ namespace boost } #endif /* BOOST_SINC_HPP */ + diff --git a/include/boost/math/special_functions/sinhc.hpp b/include/boost/math/special_functions/sinhc.hpp index a7f87b9d7..143eb5cf8 100644 --- a/include/boost/math/special_functions/sinhc.hpp +++ b/include/boost/math/special_functions/sinhc.hpp @@ -11,6 +11,10 @@ #define BOOST_SINHC_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -161,3 +165,4 @@ namespace boost } #endif /* BOOST_SINHC_HPP */ + diff --git a/include/boost/math/special_functions/spherical_harmonic.hpp b/include/boost/math/special_functions/spherical_harmonic.hpp index fae32ad97..bd0c7eef0 100644 --- a/include/boost/math/special_functions/spherical_harmonic.hpp +++ b/include/boost/math/special_functions/spherical_harmonic.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_SPECIAL_SPHERICAL_HARMONIC_HPP #define BOOST_MATH_SPECIAL_SPHERICAL_HARMONIC_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -197,3 +201,4 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_SPECIAL_SPHERICAL_HARMONIC_HPP + diff --git a/include/boost/math/special_functions/sqrt1pm1.hpp b/include/boost/math/special_functions/sqrt1pm1.hpp index ea4929e1f..ad0203e72 100644 --- a/include/boost/math/special_functions/sqrt1pm1.hpp +++ b/include/boost/math/special_functions/sqrt1pm1.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_SQRT1PM1 #define BOOST_MATH_SQRT1PM1 +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -41,3 +45,4 @@ inline typename tools::promote_args::type sqrt1pm1(const T& val) + diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index bd795787f..7e2ac109d 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_ZETA_HPP #define BOOST_MATH_ZETA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -896,3 +900,4 @@ inline typename tools::promote_args::type zeta(T s) #endif // BOOST_MATH_ZETA_HPP + diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index ba66507d2..8e033b97c 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_CONFIG_HPP #define BOOST_MATH_TOOLS_CONFIG_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include // for boost::uintmax_t #include #include @@ -245,3 +249,4 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) + diff --git a/include/boost/math/tools/fraction.hpp b/include/boost/math/tools/fraction.hpp index f5b3df5a4..344012d3b 100644 --- a/include/boost/math/tools/fraction.hpp +++ b/include/boost/math/tools/fraction.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_FRACTION_INCLUDED #define BOOST_MATH_TOOLS_FRACTION_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -257,3 +261,4 @@ typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, } // namespace boost #endif // BOOST_MATH_TOOLS_FRACTION_INCLUDED + diff --git a/include/boost/math/tools/minima.hpp b/include/boost/math/tools/minima.hpp index 14ec95795..94c5de3c4 100644 --- a/include/boost/math/tools/minima.hpp +++ b/include/boost/math/tools/minima.hpp @@ -7,6 +7,10 @@ #ifndef BOOST_MATH_TOOLS_MINIMA_HPP #define BOOST_MATH_TOOLS_MINIMA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -145,3 +149,4 @@ inline std::pair brent_find_minima(F f, T min, T max, int digits) + diff --git a/include/boost/math/tools/polynomial.hpp b/include/boost/math/tools/polynomial.hpp index a1c2defdf..6ec66ee37 100644 --- a/include/boost/math/tools/polynomial.hpp +++ b/include/boost/math/tools/polynomial.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_POLYNOMIAL_HPP #define BOOST_MATH_TOOLS_POLYNOMIAL_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -313,3 +317,4 @@ inline std::basic_ostream& operator << (std::basic_ostream #include #include @@ -233,3 +237,4 @@ inline T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) } // namespace boost #endif // BOOST_MATH_TOOLS_PRECISION_INCLUDED + diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index 913574b31..e2e6fd1cc 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -18,6 +18,10 @@ #ifndef BOOST_MATH_PROMOTION_HPP #define BOOST_MATH_PROMOTION_HPP +#ifdef _MSC_VER +#pragma once +#endif + // Boost type traits: #include #include // for boost::is_floating_point; @@ -118,3 +122,4 @@ namespace boost } // namespace boost #endif // BOOST_MATH_PROMOTION_HPP + diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index 81c348af5..59cb5b7e0 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_RATIONAL_HPP #define BOOST_MATH_TOOLS_RATIONAL_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -204,3 +208,4 @@ inline V evaluate_rational(const boost::array& a, const boost::array& + diff --git a/include/boost/math/tools/real_cast.hpp b/include/boost/math/tools/real_cast.hpp index 7334cd460..9b854e301 100644 --- a/include/boost/math/tools/real_cast.hpp +++ b/include/boost/math/tools/real_cast.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP #define BOOST_MATH_TOOLS_REAL_CAST_HPP +#ifdef _MSC_VER +#pragma once +#endif + namespace boost{ namespace math { namespace tools @@ -22,3 +26,4 @@ namespace boost{ namespace math #endif // BOOST_MATH_TOOLS_REAL_CAST_HPP + diff --git a/include/boost/math/tools/remez.hpp b/include/boost/math/tools/remez.hpp index e02183332..afcbe25af 100644 --- a/include/boost/math/tools/remez.hpp +++ b/include/boost/math/tools/remez.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_REMEZ_HPP #define BOOST_MATH_TOOLS_REMEZ_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -660,3 +664,4 @@ polynomial remez_minimax::denominator()const #endif // BOOST_MATH_TOOLS_REMEZ_HPP + diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index b36b051c8..a4be4ae35 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -6,10 +6,15 @@ #ifndef BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP #define BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include +#include #include #include #include @@ -515,3 +520,4 @@ inline T schroeder_iterate(F f, T guess, T min, T max, int digits) #endif // BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP + diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index 94f264de8..f5f659d24 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_SERIES_INCLUDED #define BOOST_MATH_TOOLS_SERIES_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -169,3 +173,4 @@ typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::u } // namespace boost #endif // BOOST_MATH_TOOLS_SERIES_INCLUDED + diff --git a/include/boost/math/tools/solve.hpp b/include/boost/math/tools/solve.hpp index 9683ad561..64b01e521 100644 --- a/include/boost/math/tools/solve.hpp +++ b/include/boost/math/tools/solve.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_SOLVE_HPP #define BOOST_MATH_TOOLS_SOLVE_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include @@ -72,3 +76,4 @@ boost::numeric::ublas::vector solve( #endif // BOOST_MATH_TOOLS_SOLVE_HPP + diff --git a/include/boost/math/tools/stats.hpp b/include/boost/math/tools/stats.hpp index e9e55456f..bbc1c44eb 100644 --- a/include/boost/math/tools/stats.hpp +++ b/include/boost/math/tools/stats.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_STATS_INCLUDED #define BOOST_MATH_TOOLS_STATS_INCLUDED +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -81,3 +85,4 @@ private: } // namespace boost #endif + diff --git a/include/boost/math/tools/test.hpp b/include/boost/math/tools/test.hpp index 3000e0818..2dfd31425 100644 --- a/include/boost/math/tools/test.hpp +++ b/include/boost/math/tools/test.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_TEST_HPP #define BOOST_MATH_TOOLS_TEST_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -240,3 +244,4 @@ test_result::value_type> test(const A& a, F1 t #endif + diff --git a/include/boost/math/tools/test_data.hpp b/include/boost/math/tools/test_data.hpp index f74b65af5..ab9a05761 100644 --- a/include/boost/math/tools/test_data.hpp +++ b/include/boost/math/tools/test_data.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_TEST_DATA_HPP #define BOOST_MATH_TOOLS_TEST_DATA_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #ifdef BOOST_MSVC @@ -753,3 +757,4 @@ std::ostream& write_code(std::ostream& os, #endif // BOOST_MATH_TOOLS_TEST_DATA_HPP + diff --git a/include/boost/math/tools/toms748_solve.hpp b/include/boost/math/tools/toms748_solve.hpp index b52c4ba9f..6b9dc0631 100644 --- a/include/boost/math/tools/toms748_solve.hpp +++ b/include/boost/math/tools/toms748_solve.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_SOLVE_ROOT_HPP #define BOOST_MATH_TOOLS_SOLVE_ROOT_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include #include #include @@ -577,3 +581,4 @@ inline std::pair bracket_and_solve_root(F f, const T& guess, const T& fact #endif // BOOST_MATH_TOOLS_SOLVE_ROOT_HPP + diff --git a/include/boost/math/tools/traits.hpp b/include/boost/math/tools/traits.hpp index 766ea31f0..95cda3acb 100644 --- a/include/boost/math/tools/traits.hpp +++ b/include/boost/math/tools/traits.hpp @@ -21,6 +21,10 @@ as defined above, and has member functions "scale" and "location". #ifndef BOOST_STATS_IS_DISTRIBUTION_HPP #define BOOST_STATS_IS_DISTRIBUTION_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include // should be the last #include #include @@ -104,3 +108,4 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scaled_distribution,T,::boost::math::tools::deta #endif + diff --git a/include/boost/math/tools/user.hpp b/include/boost/math/tools/user.hpp index bcf78b389..c1bdaf7d8 100644 --- a/include/boost/math/tools/user.hpp +++ b/include/boost/math/tools/user.hpp @@ -9,6 +9,10 @@ #ifndef BOOST_MATH_TOOLS_USER_HPP #define BOOST_MATH_TOOLS_USER_HPP +#ifdef _MSC_VER +#pragma once +#endif + // This file can be modified by the user to change the default policies. // See "Changing the Policy Defaults" in documentation. @@ -90,3 +94,4 @@ #endif // BOOST_MATH_TOOLS_USER_HPP + diff --git a/include/boost/math/tools/workaround.hpp b/include/boost/math/tools/workaround.hpp index 4e0035f8e..20106814c 100644 --- a/include/boost/math/tools/workaround.hpp +++ b/include/boost/math/tools/workaround.hpp @@ -6,6 +6,10 @@ #ifndef BOOST_MATH_TOOLS_WORHAROUND_HPP #define BOOST_MATH_TOOLS_WORHAROUND_HPP +#ifdef _MSC_VER +#pragma once +#endif + #include namespace boost{ namespace math{ namespace tools{ @@ -31,3 +35,4 @@ inline long double fmod_workaround(long double a, long double b) }}} // namespaces #endif // BOOST_MATH_TOOLS_WORHAROUND_HPP + diff --git a/test/test_expint.cpp b/test/test_expint.cpp index df8ef413b..84ff649b5 100644 --- a/test/test_expint.cpp +++ b/test/test_expint.cpp @@ -15,6 +15,7 @@ #include "functor.hpp" #include "handle_test_result.hpp" +#include "test_expint_hooks.hpp" // // DESCRIPTION: @@ -72,6 +73,16 @@ void expected_results() "float|double|long double", // test type(s) ".*Ei.*", // test data group ".*", 6, 3); // test function + if(std::numeric_limits::digits > 100) + { + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + ".*Ei.*", // test data group + ".*", 150, 50); // test function + } add_expected_result( ".*", // compiler ".*", // stdlib @@ -85,7 +96,7 @@ void expected_results() ".*", // platform ".*", // test type(s) ".*", // test data group - ".*", 20, 5); // test function + ".*", 25, 5); // test function std::cout << "Tests run with " << BOOST_COMPILER << ", " << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; @@ -98,6 +109,14 @@ T expint_wrapper(T n, T z) boost::math::tools::real_cast(n), z); } +#ifdef TEST_OTHER +template +T other_expint_wrapper(T n, T z) +{ + return other::expint( + boost::math::tools::real_cast(n), z); +} +#endif template void do_test_expint(const T& data, const char* type_name, const char* test_name) { @@ -122,7 +141,20 @@ void do_test_expint(const T& data, const char* type_name, const char* test_name) bind_func(funcp, 0, 1), extract_result(2)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::expint", test_name); - +#ifdef TEST_OTHER + if(boost::is_floating_point::value && other::expint(2u, 2.0)) + { + funcp = other_expint_wrapper; + // + // test expint against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0, 1), + extract_result(2)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "other::expint", test_name); + } +#endif std::cout << std::endl; } @@ -150,6 +182,20 @@ void do_test_expint_Ei(const T& data, const char* type_name, const char* test_na bind_func(funcp, 0), extract_result(1)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::expint", test_name); +#ifdef TEST_OTHER + if(boost::is_floating_point::value && other::expint(2.0)) + { + funcp = other::expint; + // + // test expint against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "other::expint", test_name); + } +#endif } template diff --git a/test/test_expint_hooks.hpp b/test/test_expint_hooks.hpp new file mode 100644 index 000000000..2f9a83cce --- /dev/null +++ b/test/test_expint_hooks.hpp @@ -0,0 +1,63 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP +#define BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP + + +#ifdef TEST_CEPHES +namespace other{ +extern "C" { + double expn(int, double); + float expnf(int, float); + long double expnl(int, long double); +} +inline float expint(unsigned n, float a) +{ return expnf(n, a); } +inline double expint(unsigned n, double a) +{ return expn(n, a); } +inline long double expint(unsigned n, long double a) +{ +#ifdef BOOST_MSVC + return expn(n, (double)a); +#else + return expnl(n, a); +#endif +} +// Ei is not supported: +template +inline T expint(T){ return 0; } +} +#define TEST_OTHER +#endif + +#ifdef TEST_GSL +#include + +namespace other{ +inline float expint(float a) +{ return (float)gsl_sf_expint_Ei(a); } +inline double expint(double a) +{ return gsl_sf_expint_Ei(a); } +inline long double expint(long double a) +{ return gsl_sf_expint_Ei(a); } +// En is not supported: +template +inline T expint(unsigned, T){ return 0; } +} +#define TEST_OTHER +#endif + +#ifdef TEST_OTHER +namespace other{ + boost::math::concepts::real_concept expint(unsigned, boost::math::concepts::real_concept){ return 0; } + boost::math::concepts::real_concept expint(boost::math::concepts::real_concept){ return 0; } +} +#endif + + +#endif + + diff --git a/test/test_zeta.cpp b/test/test_zeta.cpp index 28c9bcf61..6414a3c42 100644 --- a/test/test_zeta.cpp +++ b/test/test_zeta.cpp @@ -15,6 +15,7 @@ #include "functor.hpp" #include "handle_test_result.hpp" +#include "test_zeta_hooks.hpp" // // DESCRIPTION: @@ -115,7 +116,18 @@ void do_test_zeta(const T& data, const char* type_name, const char* test_name) bind_func(funcp, 0), extract_result(1)); handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::zeta", test_name); +#ifdef TEST_OTHER + if(boost::is_floating_point::value) + { + funcp = other::zeta; + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "other::zeta", test_name); + } +#endif std::cout << std::endl; } template diff --git a/test/test_zeta_hooks.hpp b/test/test_zeta_hooks.hpp new file mode 100644 index 000000000..087d87d3e --- /dev/null +++ b/test/test_zeta_hooks.hpp @@ -0,0 +1,56 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP +#define BOOST_MATH_TEST_ZETA_OTHER_HOOKS_HPP + + +#ifdef TEST_CEPHES +namespace other{ +extern "C" { + double zetac(double); + float zetacf(float); + long double zetacl(long double); +} +inline float zeta(float a) +{ return 1 + zetac(a); } +inline double zeta(double a) +{ return 1 + zetac(a); } +inline long double zeta(long double a) +{ +#ifdef BOOST_MSVC + return 1 + zetac((double)a); +#else + return zetacl(a); +#endif +} +} +#define TEST_OTHER +#endif + +#ifdef TEST_GSL +#include + +namespace other{ +inline float zeta(float a) +{ return (float)gsl_sf_zeta(a); } +inline double zeta(double a) +{ return gsl_sf_zeta(a); } +inline long double zeta(long double a) +{ return gsl_sf_zeta(a); } +} +#define TEST_OTHER +#endif + +#ifdef TEST_OTHER +namespace other{ + boost::math::concepts::real_concept zeta(boost::math::concepts::real_concept){ return 0; } +} +#endif + + +#endif + +