summaryrefslogtreecommitdiff
path: root/boost/math
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math')
-rw-r--r--boost/math/common_factor_rt.hpp6
-rw-r--r--boost/math/special_functions/gamma.hpp6
-rw-r--r--boost/math/tools/polynomial.hpp2
-rw-r--r--boost/math/tools/tuple.hpp1
-rw-r--r--boost/math/tr1.hpp2
5 files changed, 9 insertions, 8 deletions
diff --git a/boost/math/common_factor_rt.hpp b/boost/math/common_factor_rt.hpp
index 42320b62c2..acde21d2c8 100644
--- a/boost/math/common_factor_rt.hpp
+++ b/boost/math/common_factor_rt.hpp
@@ -259,7 +259,7 @@ namespace detail
//
// The Mixed Binary Euclid Algorithm
// Sidi Mohamed Sedjelmaci
- // Electronic Notes in Discrete Mathematics 35 (2009) 169–176
+ // Electronic Notes in Discrete Mathematics 35 (2009) 169-176
//
template <class T>
T mixed_binary_gcd(T u, T v)
@@ -275,7 +275,7 @@ namespace detail
if(!v)
return u;
- shifts = std::min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
+ shifts = (std::min)(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
while(gcd_traits<T>::less(1, v))
{
@@ -319,7 +319,7 @@ namespace detail
gcd_traits<SteinDomain>::make_odd(m);
}
// m == n
- m <<= std::min(d_m, d_n);
+ m <<= (std::min)(d_m, d_n);
return m;
}
diff --git a/boost/math/special_functions/gamma.hpp b/boost/math/special_functions/gamma.hpp
index a2b30f8551..4161a88395 100644
--- a/boost/math/special_functions/gamma.hpp
+++ b/boost/math/special_functions/gamma.hpp
@@ -239,14 +239,14 @@ T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = 0)
}
else if (z < tools::root_epsilon<T>())
{
- if (0 == z)
- return policies::raise_pole_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
+ if (0 == z)
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
if (fabs(z) < 1 / tools::max_value<T>())
result = -log(fabs(z));
else
result = log(fabs(1 / z - constants::euler<T>()));
if (z < 0)
- sresult = -1;
+ sresult = -1;
}
else if(z < 15)
{
diff --git a/boost/math/tools/polynomial.hpp b/boost/math/tools/polynomial.hpp
index c81a05caa4..464c334d10 100644
--- a/boost/math/tools/polynomial.hpp
+++ b/boost/math/tools/polynomial.hpp
@@ -337,7 +337,7 @@ public:
}
T evaluate(T z)const
{
- return boost::math::tools::evaluate_polynomial(&m_data[0], z, m_data.size());;
+ return m_data.size() > 0 ? boost::math::tools::evaluate_polynomial(&m_data[0], z, m_data.size()) : 0;
}
std::vector<T> chebyshev()const
{
diff --git a/boost/math/tools/tuple.hpp b/boost/math/tools/tuple.hpp
index 5723f81338..81de59fa3a 100644
--- a/boost/math/tools/tuple.hpp
+++ b/boost/math/tools/tuple.hpp
@@ -6,6 +6,7 @@
#ifndef BOOST_MATH_TUPLE_HPP_INCLUDED
# define BOOST_MATH_TUPLE_HPP_INCLUDED
# include <boost/config.hpp>
+# include <boost/detail/workaround.hpp>
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
diff --git a/boost/math/tr1.hpp b/boost/math/tr1.hpp
index eae9216d04..bb5f851463 100644
--- a/boost/math/tr1.hpp
+++ b/boost/math/tr1.hpp
@@ -673,7 +673,7 @@ inline long double nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, lo
{ return boost::math::tr1::nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); }
template <class T1, class T2>
inline typename tools::promote_args<T1, T2>::type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y)
-{ return boost::math::tr1::nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<long double>(y)); }
+{ return static_cast<typename tools::promote_args<T1, T2>::type>(boost::math::tr1::nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<typename tools::promote_args<T1, T2>::type>(x), static_cast<long double>(y))); }
#if 0
double remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
float remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);