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 @@
+
\ 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)=∫−x∞e−tdtt
\ 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 @@
+
\ 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=0∞zkkk!
\ 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 @@
+
\ 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)+(z−z0)R(z3−1)
\ 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 @@
+
\ 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 @@
+
\ 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)=∫1∞e−xtdttn
\ 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 @@
+
\ 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)n−1(n−1)!(ψ(n)−log(z))−∑k=0,k≠n−1∞(−1)kzk(k−n+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 @@
+
\ 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)=e−xn+x−n2+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_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 @@
+
\ 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 @@
+
\ 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)=e−xx(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