summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/math')
-rw-r--r--3rdParty/Boost/src/boost/math/common_factor_ct.hpp83
-rw-r--r--3rdParty/Boost/src/boost/math/common_factor_rt.hpp70
-rw-r--r--3rdParty/Boost/src/boost/math/policies/policy.hpp13
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp11
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp21
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp167
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp365
-rw-r--r--3rdParty/Boost/src/boost/math/special_functions/sign.hpp71
-rw-r--r--3rdParty/Boost/src/boost/math/tools/config.hpp107
-rw-r--r--3rdParty/Boost/src/boost/math/tools/promotion.hpp27
-rw-r--r--3rdParty/Boost/src/boost/math/tools/user.hpp8
11 files changed, 621 insertions, 322 deletions
diff --git a/3rdParty/Boost/src/boost/math/common_factor_ct.hpp b/3rdParty/Boost/src/boost/math/common_factor_ct.hpp
index 848c925..bf58b94 100644
--- a/3rdParty/Boost/src/boost/math/common_factor_ct.hpp
+++ b/3rdParty/Boost/src/boost/math/common_factor_ct.hpp
@@ -20,13 +20,12 @@ namespace math
{
// Implementation details --------------------------------------------------//
namespace detail
{
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// Build GCD with Euclid's recursive algorithm
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_gcd_helper_t
{
private:
BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
@@ -51,54 +50,13 @@ namespace detail
// Non-recursive case
template < static_gcd_type Value1 >
struct static_gcd_helper_t< Value1, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
};
-#else
- // Use inner class template workaround from Peter Dimov
- template < static_gcd_type Value1 >
- struct static_gcd_helper2_t
- {
- template < static_gcd_type Value2 >
- struct helper
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value
- = static_gcd_helper2_t<Value2>::BOOST_NESTED_TEMPLATE
- helper<Value1 % Value2>::value );
- };
-
- template < >
- struct helper< 0UL >
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
- };
- };
-
- // Special case
- template < >
- struct static_gcd_helper2_t< 0UL >
- {
- template < static_gcd_type Value2 >
- struct helper
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = Value2 );
- };
- };
-
- // Build the GCD from the above template(s)
- template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_gcd_helper_t
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value
- = static_gcd_helper2_t<Value1>::BOOST_NESTED_TEMPLATE
- helper<Value2>::value );
- };
-#endif
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// Build the LCM from the GCD
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm_helper_t
{
typedef static_gcd_helper_t<Value1, Value2> gcd_type;
@@ -109,53 +67,12 @@ namespace detail
// Special case for zero-GCD values
template < >
struct static_lcm_helper_t< 0UL, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
};
-#else
- // Adapt GCD's inner class template workaround for LCM
- template < static_gcd_type Value1 >
- struct static_lcm_helper2_t
- {
- template < static_gcd_type Value2 >
- struct helper
- {
- typedef static_gcd_helper_t<Value1, Value2> gcd_type;
-
- BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1
- / gcd_type::value * Value2 );
- };
-
- template < >
- struct helper< 0UL >
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
- };
- };
-
- // Special case
- template < >
- struct static_lcm_helper2_t< 0UL >
- {
- template < static_gcd_type Value2 >
- struct helper
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
- };
- };
-
- // Build the LCM from the above template(s)
- template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_lcm_helper_t
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value
- = static_lcm_helper2_t<Value1>::BOOST_NESTED_TEMPLATE
- helper<Value2>::value );
- };
-#endif
} // namespace detail
// Compile-time greatest common divisor evaluator class declaration --------//
diff --git a/3rdParty/Boost/src/boost/math/common_factor_rt.hpp b/3rdParty/Boost/src/boost/math/common_factor_rt.hpp
index 4582a96..10a92eb 100644
--- a/3rdParty/Boost/src/boost/math/common_factor_rt.hpp
+++ b/3rdParty/Boost/src/boost/math/common_factor_rt.hpp
@@ -219,13 +219,12 @@ namespace detail
return ( result < zero ) ? static_cast<IntegerType>(-result) : result;
}
// Function objects to find the best way of computing GCD or LCM
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template < typename T, bool IsSpecialized, bool IsSigned >
struct gcd_optimal_evaluator_helper_t
{
T operator ()( T const &a, T const &b )
{
return gcd_euclidean( a, b );
@@ -237,46 +236,12 @@ namespace detail
{
T operator ()( T const &a, T const &b )
{
return gcd_integer( a, b );
}
};
-#else
- template < bool IsSpecialized, bool IsSigned >
- struct gcd_optimal_evaluator_helper2_t
- {
- template < typename T >
- struct helper
- {
- T operator ()( T const &a, T const &b )
- {
- return gcd_euclidean( a, b );
- }
- };
- };
-
- template < >
- struct gcd_optimal_evaluator_helper2_t< true, true >
- {
- template < typename T >
- struct helper
- {
- T operator ()( T const &a, T const &b )
- {
- return gcd_integer( a, b );
- }
- };
- };
-
- template < typename T, bool IsSpecialized, bool IsSigned >
- struct gcd_optimal_evaluator_helper_t
- : gcd_optimal_evaluator_helper2_t<IsSpecialized, IsSigned>
- ::BOOST_NESTED_TEMPLATE helper<T>
- {
- };
-#endif
template < typename T >
struct gcd_optimal_evaluator
{
T operator ()( T const &a, T const &b )
{
@@ -345,13 +310,12 @@ namespace detail
BOOST_PRIVATE_GCD_SF( __int64, unsigned __int64 );
#endif
#undef BOOST_PRIVATE_GCD_SF
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template < typename T, bool IsSpecialized, bool IsSigned >
struct lcm_optimal_evaluator_helper_t
{
T operator ()( T const &a, T const &b )
{
return lcm_euclidean( a, b );
@@ -363,46 +327,12 @@ namespace detail
{
T operator ()( T const &a, T const &b )
{
return lcm_integer( a, b );
}
};
-#else
- template < bool IsSpecialized, bool IsSigned >
- struct lcm_optimal_evaluator_helper2_t
- {
- template < typename T >
- struct helper
- {
- T operator ()( T const &a, T const &b )
- {
- return lcm_euclidean( a, b );
- }
- };
- };
-
- template < >
- struct lcm_optimal_evaluator_helper2_t< true, true >
- {
- template < typename T >
- struct helper
- {
- T operator ()( T const &a, T const &b )
- {
- return lcm_integer( a, b );
- }
- };
- };
-
- template < typename T, bool IsSpecialized, bool IsSigned >
- struct lcm_optimal_evaluator_helper_t
- : lcm_optimal_evaluator_helper2_t<IsSpecialized, IsSigned>
- ::BOOST_NESTED_TEMPLATE helper<T>
- {
- };
-#endif
template < typename T >
struct lcm_optimal_evaluator
{
T operator ()( T const &a, T const &b )
{
diff --git a/3rdParty/Boost/src/boost/math/policies/policy.hpp b/3rdParty/Boost/src/boost/math/policies/policy.hpp
index 01fe3d0..49068a6 100644
--- a/3rdParty/Boost/src/boost/math/policies/policy.hpp
+++ b/3rdParty/Boost/src/boost/math/policies/policy.hpp
@@ -91,14 +91,13 @@ namespace policies{
#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
#endif
#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY
#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
#endif
-#if !defined(__BORLANDC__) \
- && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
+#if !defined(__BORLANDC__)
#define BOOST_MATH_META_INT(type, name, Default)\
template <type N = Default> struct name : public boost::mpl::int_<N>{};\
namespace detail{\
template <type N>\
char test_is_valid_arg(const name<N>*);\
char test_is_default_arg(const name<Default>*);\
@@ -810,12 +809,22 @@ struct precision
>::type type;
#endif
};
#endif
+#ifdef BOOST_MATH_USE_FLOAT128
+
+template <class Policy>
+struct precision<BOOST_MATH_FLOAT128_TYPE, Policy>
+{
+ typedef mpl::int_<113> type;
+};
+
+#endif
+
namespace detail{
template <class T, class Policy>
inline int digits_imp(mpl::true_ const&)
{
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
diff --git a/3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp b/3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp
index 50c034d..63ebf11 100644
--- a/3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp
+++ b/3rdParty/Boost/src/boost/math/special_functions/detail/fp_traits.hpp
@@ -348,12 +348,19 @@ struct fp_traits_non_native<long double, extended_double_precision>
// The generic_tag definition is used.
// The Itanium supports both
// the Intel extended double precision format (80 bits) and
// the IEEE extended double precision format with 15 exponent bits (128 bits).
+#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106)
+
+//
+// Define nothing here and fall though to generic_tag:
+// We have GCC's "double double" in effect, and any attempt
+// to handle it via bit-fiddling is pretty much doomed to fail...
+//
// long double (>64 bits), PowerPC ---------------------------------------------
#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
|| defined(__ppc) || defined(__ppc__) || defined(__PPC__)
@@ -543,13 +550,15 @@ struct select_native<long double>
#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
&& !defined(__hpux) \
&& !defined(__DECCXX)\
&& !defined(__osf__) \
&& !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
- && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+ && !defined(__FAST_MATH__)\
+ && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\
+ && !defined(BOOST_INTEL)
# define BOOST_MATH_USE_STD_FPCLASSIFY
#endif
template<class T> struct fp_traits
{
typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
diff --git a/3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp b/3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp
index 952259a..8c45a7d 100644
--- a/3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp
+++ b/3rdParty/Boost/src/boost/math/special_functions/detail/round_fwd.hpp
@@ -6,26 +6,27 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
#include <boost/config.hpp>
+#include <boost/math/tools/promotion.hpp>
#ifdef _MSC_VER
#pragma once
#endif
namespace boost
{
namespace math
{
template <class T, class Policy>
- T trunc(const T& v, const Policy& pol);
+ typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol);
template <class T>
- T trunc(const T& v);
+ typename tools::promote_args<T>::type trunc(const T& v);
template <class T, class Policy>
int itrunc(const T& v, const Policy& pol);
template <class T>
int itrunc(const T& v);
template <class T, class Policy>
long ltrunc(const T& v, const Policy& pol);
@@ -35,15 +36,15 @@ namespace boost
template <class T, class Policy>
boost::long_long_type lltrunc(const T& v, const Policy& pol);
template <class T>
boost::long_long_type lltrunc(const T& v);
#endif
template <class T, class Policy>
- T round(const T& v, const Policy& pol);
+ typename tools::promote_args<T>::type round(const T& v, const Policy& pol);
template <class T>
- T round(const T& v);
+ typename tools::promote_args<T>::type round(const T& v);
template <class T, class Policy>
int iround(const T& v, const Policy& pol);
template <class T>
int iround(const T& v);
template <class T, class Policy>
long lround(const T& v, const Policy& pol);
@@ -73,8 +74,20 @@ namespace boost
template <class T>
T modf(const T& v, boost::long_long_type* ipart);
#endif
}
}
+
+#undef BOOST_MATH_STD_USING
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\
+ using boost::math::round;\
+ using boost::math::iround;\
+ using boost::math::lround;\
+ using boost::math::trunc;\
+ using boost::math::itrunc;\
+ using boost::math::ltrunc;\
+ using boost::math::modf;
+
+
#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP
diff --git a/3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp b/3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp
index 6f92d18..40f6e14 100644
--- a/3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp
+++ b/3rdParty/Boost/src/boost/math/special_functions/fpclassify.hpp
@@ -34,32 +34,32 @@ really does exist: otherwise a compiler may reject the code even though
the template is never instantiated.
2. If the platform is not C99 compliant, and the binary format for
a floating point type (float, double or long double) can be determined
at compile time, then the following algorithm is used:
- If all exponent bits, the flag bit (if there is one),
+ If all exponent bits, the flag bit (if there is one),
and all significand bits are 0, then the number is zero.
- If all exponent bits and the flag bit (if there is one) are 0,
+ If all exponent bits and the flag bit (if there is one) are 0,
and at least one significand bit is 1, then the number is subnormal.
- If all exponent bits are 1 and all significand bits are 0,
+ If all exponent bits are 1 and all significand bits are 0,
then the number is infinity.
If all exponent bits are 1 and at least one significand bit is 1,
then the number is a not-a-number.
Otherwise the number is normal.
This algorithm works for the IEEE 754 representation,
and also for several non IEEE 754 formats.
Most formats have the structure
sign bit + exponent bits + significand bits.
-
+
A few have the structure
sign bit + exponent bits + flag bit + significand bits.
The flag bit is 0 for zero and subnormal numbers,
and 1 for normal numbers and NaN.
It is 0 (Motorola 68K) or 1 (Intel) for infinity.
@@ -82,33 +82,43 @@ is used.
#endif
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::abs; using ::fabs; }
#endif
-namespace boost{
+namespace boost{
//
// This must not be located in any namespace under boost::math
// otherwise we can get into an infinite loop if isnan is
// a #define for "isnan" !
//
namespace math_detail{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4800)
+#endif
+
template <class T>
inline bool is_nan_helper(T t, const boost::true_type&)
{
#ifdef isnan
return isnan(t);
#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY)
+ (void)t;
return false;
#else // BOOST_HAS_FPCLASSIFY
return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
#endif
}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
template <class T>
inline bool is_nan_helper(T, const boost::false_type&)
{
return false;
}
@@ -166,22 +176,22 @@ template <class T>
inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
return fpclassify_imp(t, generic_tag<true>());
#endif
- //
+ //
// An unknown type with no numeric_limits support,
// so what are we supposed to do we do here?
//
BOOST_MATH_INSTRUMENT_VARIABLE(t);
return t == 0 ? FP_ZERO : FP_NORMAL;
}
-template<class T>
+template<class T>
int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_MATH_INSTRUMENT_VARIABLE(x);
@@ -204,21 +214,21 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
a &= traits::significand;
if(a == 0) return FP_INFINITE;
return FP_NAN;
}
-template<class T>
+template<class T>
int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_MATH_INSTRUMENT_VARIABLE(x);
BOOST_DEDUCED_TYPENAME traits::bits a;
- traits::get_bits(x,a);
+ traits::get_bits(x,a);
a &= traits::exponent | traits::flag | traits::significand;
if(a <= traits::significand) {
if(x == 0)
return FP_ZERO;
else
@@ -231,199 +241,237 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
traits::set_bits(x,a);
if(x == 0) return FP_INFINITE;
return FP_NAN;
}
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline int fpclassify_imp<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS))
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::fpclassify_imp(t, generic_tag<true>());
}
#endif
} // namespace detail
template <class T>
inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename tools::promote_args<T>::type value_type;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
return detail::fpclassify_imp(static_cast<value_type>(t), method());
#else
return detail::fpclassify_imp(static_cast<value_type>(t), method());
#endif
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template <>
+inline int fpclassify<long double> BOOST_NO_MACRO_EXPAND(long double t)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef long double value_type;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<long double>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
+ return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#else
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#endif
+}
+#endif
+
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, native_tag const&)
{
return (std::isfinite)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, generic_tag<true> const&)
{
return x >= -(std::numeric_limits<T>::max)()
&& x <= (std::numeric_limits<T>::max)();
}
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
return isfinite_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression.
return true;
}
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, ieee_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
a &= traits::exponent;
return a != traits::exponent;
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isfinite_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isfinite_impl(t, generic_tag<true>());
}
#endif
}
-template<class T>
+template<class T>
inline bool (isfinite)(T x)
{ //!< \brief return true if floating-point type t is finite.
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
return detail::isfinite_impl(static_cast<value_type>(x), method());
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isfinite)(long double x)
+{ //!< \brief return true if floating-point type t is finite.
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ //typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
+ return detail::isfinite_impl(static_cast<value_type>(x), method());
+}
+#endif
+
//------------------------------------------------------------------------------
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, native_tag const&)
{
return (std::isnormal)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, generic_tag<true> const&)
{
if(x < 0) x = -x;
return x >= (std::numeric_limits<T>::min)()
&& x <= (std::numeric_limits<T>::max)();
}
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
return isnormal_impl(x, generic_tag<true>());
#endif
return !(x == 0);
}
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, ieee_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
a &= traits::exponent | traits::flag;
return (a != 0) && (a < traits::exponent);
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isnormal_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isnormal_impl(t, generic_tag<true>());
}
#endif
}
-template<class T>
+template<class T>
inline bool (isnormal)(T x)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ //typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
return detail::isnormal_impl(static_cast<value_type>(x), method());
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isnormal)(long double x)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ //typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
+ return detail::isnormal_impl(static_cast<value_type>(x), method());
+}
+#endif
+
//------------------------------------------------------------------------------
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, native_tag const&)
{
return (std::isinf)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, generic_tag<true> const&)
{
(void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
- return std::numeric_limits<T>::has_infinity
+ return std::numeric_limits<T>::has_infinity
&& ( x == std::numeric_limits<T>::infinity()
|| x == -std::numeric_limits<T>::infinity());
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
return isinf_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression.
return false;
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
a &= traits::exponent | traits::significand;
return a == traits::exponent;
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
@@ -433,74 +481,85 @@ namespace detail {
traits::set_bits(x,0);
return x == 0;
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isinf_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isinf_impl(t, generic_tag<true>());
}
#endif
} // namespace detail
-template<class T>
+template<class T>
inline bool (isinf)(T x)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
+ return detail::isinf_impl(static_cast<value_type>(x), method());
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isinf)(long double x)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ //typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
return detail::isinf_impl(static_cast<value_type>(x), method());
}
+#endif
//------------------------------------------------------------------------------
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, native_tag const&)
{
return (std::isnan)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, generic_tag<true> const&)
{
return std::numeric_limits<T>::has_infinity
? !(x <= std::numeric_limits<T>::infinity())
: x != x;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
return isnan_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression
return false;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
a &= traits::exponent | traits::significand;
return a > traits::exponent;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
@@ -513,24 +572,34 @@ namespace detail {
traits::set_bits(x,a);
return x != 0;
}
} // namespace detail
-template<class T> bool (isnan)(T x)
+template<class T>
+inline bool (isnan)(T x)
{ //!< \brief return true if floating-point type t is NaN (Not A Number).
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
return detail::isnan_impl(x, method());
}
#ifdef isnan
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+#elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+template<>
+inline bool (isnan)(long double x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ //typedef boost::is_floating_point<long double>::type fp_tag;
+ return detail::isnan_impl(x, method());
+}
#endif
} // namespace math
} // namespace boost
#endif // BOOST_MATH_FPCLASSIFY_HPP
diff --git a/3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp b/3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp
index 6669e3f..e952dcd 100644
--- a/3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp
+++ b/3rdParty/Boost/src/boost/math/special_functions/math_fwd.hpp
@@ -11,13 +11,13 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
// Omnibus list of forward declarations of math special functions.
// IT = Integer type.
// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
-// AT = Integer or Real type
+// AT = Integer or Real type
#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
#ifdef _MSC_VER
#pragma once
@@ -35,117 +35,117 @@ namespace boost
{
namespace math
{ // Math functions (in roughly alphabetic order).
// Beta functions.
template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type
+ typename tools::promote_args<RT1, RT2>::type
beta(RT1 a, RT2 b); // Beta function (2 arguments).
template <class RT1, class RT2, class A>
- typename tools::promote_args<RT1, RT2, A>::type
+ typename tools::promote_args<RT1, RT2, A>::type
beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
betac(RT1 a, RT2 b, RT3 x);
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibeta_inv(T1 a, T2 b, T3 p, T4* py);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibetac_inv(T1 a, T2 b, T3 q, T4* py);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta
// erf & erfc error functions.
template <class RT> // Error function.
typename tools::promote_args<RT>::type erf(RT z);
template <class RT, class Policy> // Error function.
@@ -165,57 +165,57 @@ namespace boost
typename tools::promote_args<RT>::type erfc_inv(RT z);
template <class RT, class Policy>// Error function complement inverse.
typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
// Polynomials:
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, T x, const Policy& pol);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_q(unsigned l, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_q(unsigned l, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, int m, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, int m, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
laguerre(unsigned n, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
laguerre(unsigned n, unsigned m, T x, const Policy& pol);
template <class T1, class T2>
struct laguerre_result
{
typedef typename mpl::if_<
@@ -223,82 +223,82 @@ namespace boost
typename tools::promote_args<T1>::type,
typename tools::promote_args<T2>::type
>::type type;
};
template <class T1, class T2>
- typename laguerre_result<T1, T2>::type
+ typename laguerre_result<T1, T2>::type
laguerre(unsigned n, T1 m, T2 x);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
hermite(unsigned n, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
hermite(unsigned n, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
template <class T1, class T2>
- std::complex<typename tools::promote_args<T1, T2>::type>
+ std::complex<typename tools::promote_args<T1, T2>::type>
spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- std::complex<typename tools::promote_args<T1, T2>::type>
+ std::complex<typename tools::promote_args<T1, T2>::type>
spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
// Elliptic integrals:
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rf(T1 x, T2 y, T3 z);
template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rd(T1 x, T2 y, T3 z);
template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
ellint_rc(T1 x, T2 y);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
ellint_rc(T1 x, T2 y, const Policy& pol);
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ellint_rj(T1 x, T2 y, T3 z, T4 p);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
template <typename T>
typename tools::promote_args<T>::type ellint_2(T k);
template <class T1, class T2>
@@ -346,13 +346,13 @@ namespace boost
struct max_factorial;
template <class RT>
RT factorial(unsigned int);
template <class RT, class Policy>
RT factorial(unsigned int, const Policy& pol);
template <class RT>
- RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
+ RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
template <class RT>
RT double_factorial(unsigned i);
template <class RT, class Policy>
RT double_factorial(unsigned i, const Policy& pol);
template <class RT>
@@ -462,17 +462,17 @@ namespace boost
template <class T, class Policy>
typename tools::promote_args<T>::type digamma(T x, const Policy&);
// Hypotenuse function sqrt(x ^ 2 + y ^ 2).
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
hypot(T1 x, T2 y);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
hypot(T1 x, T2 y, const Policy&);
// cbrt - cube root.
template <class RT>
typename tools::promote_args<RT>::type cbrt(RT z);
@@ -499,17 +499,17 @@ namespace boost
template <class T, class Policy>
typename tools::promote_args<T>::type expm1(T, const Policy&);
// Power - 1
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
powm1(const T1 a, const T2 z);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
powm1(const T1 a, const T2 z, const Policy&);
// sqrt(1+x) - 1
template <class T>
typename tools::promote_args<T>::type sqrt1pm1(const T& val);
@@ -577,53 +577,115 @@ namespace boost
};
} // detail
// Bessel functions:
template <class T1, class T2, class Policy>
typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol);
template <class T1, class T2>
typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x);
template <class T, class Policy>
typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol);
template <class T>
typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x);
template <class T1, class T2, class Policy>
typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol);
template <class T1, class T2>
typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x);
template <class T1, class T2, class Policy>
typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol);
template <class T1, class T2>
typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x);
template <class T1, class T2, class Policy>
typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol);
template <class T1, class T2>
typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x);
template <class T, class Policy>
typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol);
template <class T>
typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x);
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
template <class T1, class T2>
std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2, class Policy>
std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
template <class T1, class T2>
std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
template <class T1, class T2, class Policy>
@@ -659,12 +721,46 @@ namespace boost
template <class T, class Policy>
typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
template <class T>
typename tools::promote_args<T>::type airy_bi_prime(T x);
+ template <class T>
+ T airy_ai_zero(int m);
+ template <class T, class Policy>
+ T airy_ai_zero(int m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_ai_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_ai_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T>
+ T airy_bi_zero(int m);
+ template <class T, class Policy>
+ T airy_bi_zero(int m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_bi_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_bi_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
template <class T, class Policy>
typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
template <class T>
typename tools::promote_args<T>::type sin_pi(T x);
@@ -686,23 +782,23 @@ namespace boost
template <class T>
bool isnan BOOST_NO_MACRO_EXPAND(T t);
template <class T>
bool isnormal BOOST_NO_MACRO_EXPAND(T t);
- template<class T>
+ template<class T>
int signbit BOOST_NO_MACRO_EXPAND(T x);
template <class T>
int sign BOOST_NO_MACRO_EXPAND(const T& z);
- template <class T>
- T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y);
+ template <class T, class U>
+ typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
template <class T>
- T changesign BOOST_NO_MACRO_EXPAND(const T& z);
+ typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
// Exponential integrals:
namespace detail{
template <class T, class U>
struct expint_result
@@ -734,17 +830,17 @@ namespace boost
typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
template <class T1, class T2>
typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
// Jacobi Functions:
- template <class T, class Policy>
- typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn, const Policy&);
+ template <class T, class U, class V, class Policy>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
- template <class T>
- typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn = 0, T* pdn = 0);
+ template <class T, class U, class V>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
template <class U, class T, class Policy>
typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
template <class U, class T>
typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
@@ -824,28 +920,61 @@ namespace boost
typename tools::promote_args<T>::type pow(T base, const Policy& policy);
template <int N, typename T>
typename tools::promote_args<T>::type pow(T base);
// next:
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type float_next(const T&, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type float_next(const T&);
template <class T, class Policy>
- T nextafter(const T&, const T&, const Policy&);
+ typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
template <class T>
- T nextafter(const T&, const T&);
+ typename tools::promote_args<T>::type float_prior(const T&);
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
template <class T, class Policy>
- T float_next(const T&, const Policy&);
+ typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
template <class T>
- T float_next(const T&);
+ typename tools::promote_args<T>::type float_advance(const T& val, int distance);
+
+ template<class T>
+ T unchecked_bernoulli_b2n(const std::size_t n);
template <class T, class Policy>
- T float_prior(const T&, const Policy&);
+ T bernoulli_b2n(const int i, const Policy &pol);
template <class T>
- T float_prior(const T&);
+ T bernoulli_b2n(const int i);
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator bernoulli_b2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it,
+ const Policy& pol);
+ template <class T, class OutputIterator>
+ OutputIterator bernoulli_b2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it);
template <class T, class Policy>
- T float_distance(const T&, const T&, const Policy&);
+ T tangent_t2n(const int i, const Policy &pol);
template <class T>
- T float_distance(const T&, const T&);
+ T tangent_t2n(const int i);
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator tangent_t2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it,
+ const Policy& pol);
+ template <class T, class OutputIterator>
+ OutputIterator tangent_t2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it);
} // namespace math
} // namespace boost
#ifdef BOOST_HAS_LONG_LONG
#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
@@ -1115,33 +1244,79 @@ namespace boost
inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
\
template <class T1, class T2>\
inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
{ return boost::math::cyl_bessel_j(v, x, Policy()); }\
\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j_prime(T1 v, T2 x)\
+ { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\
+\
template <class T>\
inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
{ return boost::math::sph_bessel(v, x, Policy()); }\
\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel_prime(unsigned v, T x)\
+ { return boost::math::sph_bessel_prime(v, x, Policy()); }\
+\
template <class T1, class T2>\
inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
\
template <class T1, class T2>\
inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
\
template <class T1, class T2>\
inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\
+\
template <class T>\
inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
\
template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
+ sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
+ { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ inline void cyl_bessel_j_zero(T v,\
+ int start_index,\
+ unsigned number_of_zeros,\
+ OutputIterator out_it)\
+ { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
+ { return boost::math::cyl_neumann_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ inline void cyl_neumann_zero(T v,\
+ int start_index,\
+ unsigned number_of_zeros,\
+ OutputIterator out_it)\
+ { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+ template <class T>\
inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
\
template <class T>\
inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
\
using boost::math::fpclassify;\
@@ -1283,12 +1458,40 @@ namespace boost
{ return boost::math::airy_ai_prime(x, Policy()); }\
\
template <class T>\
inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
{ return boost::math::airy_bi_prime(x, Policy()); }\
\
+ template <class T>\
+ inline T airy_ai_zero(int m)\
+ { return boost::math::airy_ai_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
+ template <class T>\
+ inline T airy_bi_zero(int m)\
+ { return boost::math::airy_bi_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
+ template <class T>\
+ T bernoulli_b2n(const int i)\
+ { return boost::math::bernoulli_b2n<T>(i, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
+ { return boost::math::bernoulli_b2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
+ \
+ template <class T>\
+ T tangent_t2n(const int i)\
+ { return boost::math::tangent_t2n<T>(i, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
+ { return boost::math::tangent_t2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
+ \
#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
diff --git a/3rdParty/Boost/src/boost/math/special_functions/sign.hpp b/3rdParty/Boost/src/boost/math/special_functions/sign.hpp
index 6de88b2..f5c562d 100644
--- a/3rdParty/Boost/src/boost/math/special_functions/sign.hpp
+++ b/3rdParty/Boost/src/boost/math/special_functions/sign.hpp
@@ -28,25 +28,46 @@ namespace detail {
inline int signbit_impl(T x, native_tag const&)
{
return (std::signbit)(x);
}
#endif
- template<class T>
+ // Generic versions first, note that these do not handle
+ // signed zero or NaN.
+
+ template<class T>
inline int signbit_impl(T x, generic_tag<true> const&)
{
return x < 0;
}
template<class T>
inline int signbit_impl(T x, generic_tag<false> const&)
{
return x < 0;
}
- template<class T>
+#if defined(__GNUC__) && (LDBL_MANT_DIG == 106)
+ //
+ // Special handling for GCC's "double double" type,
+ // in this case the sign is the same as the sign we
+ // get by casting to double, no overflow/underflow
+ // can occur since the exponents are the same magnitude
+ // for the two types:
+ //
+ inline int signbit_impl(long double x, generic_tag<true> const&)
+ {
+ return boost::math::signbit(static_cast<double>(x));
+ }
+ inline int signbit_impl(long double x, generic_tag<false> const&)
+ {
+ return boost::math::signbit(static_cast<double>(x));
+ }
+#endif
+
+ template<class T>
inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
BOOST_DEDUCED_TYPENAME traits::bits a;
traits::get_bits(x,a);
@@ -62,25 +83,48 @@ namespace detail {
traits::get_bits(x,a);
return a & traits::sign ? 1 : 0;
}
// Changesign
+
+ // Generic versions first, note that these do not handle
+ // signed zero or NaN.
template<class T>
inline T (changesign_impl)(T x, generic_tag<true> const&)
{
return -x;
}
template<class T>
inline T (changesign_impl)(T x, generic_tag<false> const&)
{
return -x;
}
-
+#if defined(__GNUC__) && (LDBL_MANT_DIG == 106)
+ //
+ // Special handling for GCC's "double double" type,
+ // in this case we need to change the sign of both
+ // components of the "double double":
+ //
+ inline long double (changesign_impl)(long double x, generic_tag<true> const&)
+ {
+ double* pd = reinterpret_cast<double*>(&x);
+ pd[0] = boost::math::changesign(pd[0]);
+ pd[1] = boost::math::changesign(pd[1]);
+ return x;
+ }
+ inline long double (changesign_impl)(long double x, generic_tag<false> const&)
+ {
+ double* pd = reinterpret_cast<double*>(&x);
+ pd[0] = boost::math::changesign(pd[0]);
+ pd[1] = boost::math::changesign(pd[1]);
+ return x;
+ }
+#endif
template<class T>
inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
@@ -107,36 +151,41 @@ namespace detail {
} // namespace detail
template<class T> int (signbit)(T x)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- return detail::signbit_impl(x, method());
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type result_type;
+ return detail::signbit_impl(static_cast<result_type>(x), method());
}
template <class T>
inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
{
return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
}
-template<class T> T (changesign)(const T& x)
+template <class T> typename tools::promote_args_permissive<T>::type (changesign)(const T& x)
{ //!< \brief return unchanged binary pattern of x, except for change of sign bit.
typedef typename detail::fp_traits<T>::sign_change_type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type result_type;
- return detail::changesign_impl(x, method());
+ return detail::changesign_impl(static_cast<result_type>(x), method());
}
-template <class T>
-inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y)
+template <class T, class U>
+inline typename tools::promote_args_permissive<T, U>::type
+ copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y)
{
BOOST_MATH_STD_USING
- return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x;
+ typedef typename tools::promote_args_permissive<T, U>::type result_type;
+ return (boost::math::signbit)(static_cast<result_type>(x)) != (boost::math::signbit)(static_cast<result_type>(y))
+ ? (boost::math::changesign)(static_cast<result_type>(x)) : static_cast<result_type>(x);
}
} // namespace math
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/math/tools/config.hpp b/3rdParty/Boost/src/boost/math/tools/config.hpp
index b1fcd13..4ec5768 100644
--- a/3rdParty/Boost/src/boost/math/tools/config.hpp
+++ b/3rdParty/Boost/src/boost/math/tools/config.hpp
@@ -10,22 +10,25 @@
#pragma once
#endif
#include <boost/config.hpp>
#include <boost/cstdint.hpp> // for boost::uintmax_t
#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_integral.hpp>
#include <algorithm> // for min and max
#include <boost/config/no_tr1/cmath.hpp>
#include <climits>
#include <cfloat>
#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# include <math.h>
#endif
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# include <limits>
+#endif
#include <boost/math/tools/user.hpp>
-#include <boost/math/special_functions/detail/round_fwd.hpp>
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
|| (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
&& !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
@@ -96,19 +99,24 @@
#endif
#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
# define BOOST_MATH_USE_C99
#endif
+#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
+# define BOOST_MATH_USE_C99
+#endif
+
#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
|| defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
- || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))
+ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
+ || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
#endif
-#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
# include "boost/type.hpp"
# include "boost/non_type.hpp"
# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
@@ -136,18 +144,18 @@
# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+#endif // __SUNPRO_CC
#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
// Sun's compiler emits a hard error if a constant underflows,
// as does aCC on PA-RISC, while gcc issues a large number of warnings:
-# define BOOST_MATH_SMALL_CONSTANT(x) 0
+# define BOOST_MATH_SMALL_CONSTANT(x) 0.0
#else
# define BOOST_MATH_SMALL_CONSTANT(x) x
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
@@ -200,23 +208,54 @@
#ifndef BOOST_MATH_INT_TABLE_TYPE
# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
#endif
#ifndef BOOST_MATH_INT_VALUE_SUFFIX
# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
#endif
+//
+// Test whether to support __float128:
+//
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
+ && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128)
+//
+// Only enable this when the compiler really is GCC as clang and probably
+// intel too don't support __float128 yet :-(
+//
+#ifndef BOOST_MATH_USE_FLOAT128
+# define BOOST_MATH_USE_FLOAT128
+#endif
+
+# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__)
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+# elif defined(__GNUC__)
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+
+# ifndef BOOST_MATH_FLOAT128_TYPE
+# define BOOST_MATH_FLOAT128_TYPE _Quad
+# endif
+#endif
+//
+// Check for WinCE with no iostream support:
+//
+#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
+# define BOOST_MATH_NO_LEXICAL_CAST
+#endif
//
// Helper macro for controlling the FP behaviour:
//
#ifndef BOOST_MATH_CONTROL_FP
# define BOOST_MATH_CONTROL_FP
#endif
//
// Helper macro for using statements:
//
-#define BOOST_MATH_STD_USING \
+#define BOOST_MATH_STD_USING_CORE \
using std::abs;\
using std::acos;\
using std::cos;\
using std::fmod;\
using std::modf;\
using std::tan;\
@@ -233,21 +272,15 @@
using std::fabs;\
using std::log;\
using std::sinh;\
using std::ceil;\
using std::floor;\
using std::log10;\
- using std::sqrt;\
- using boost::math::round;\
- using boost::math::iround;\
- using boost::math::lround;\
- using boost::math::trunc;\
- using boost::math::itrunc;\
- using boost::math::ltrunc;\
- using boost::math::modf;
+ using std::sqrt;
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
namespace boost{ namespace math{
namespace tools
{
template <class T>
@@ -266,15 +299,41 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
template <class T>
void suppress_unused_variable_warning(const T&)
{
}
+namespace detail{
+
+template <class T>
+struct is_integer_for_rounding
+{
+ static const bool value = boost::is_integral<T>::value
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer)
+#endif
+ ;
+};
+
+}
+
}} // namespace boost namespace math
-#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+#ifdef __GLIBC_PREREQ
+# if __GLIBC_PREREQ(2,14)
+# define BOOST_MATH_HAVE_FIXED_GLIBC
+# endif
+#endif
+
+#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+//
+// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445
+// Basically powl and expl can return garbage when the result is small and certain exception flags are set
+// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011).
+// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4
+//
#include <boost/detail/fenv.hpp>
# ifdef FE_ALL_EXCEPT
namespace boost{ namespace math{
@@ -311,18 +370,26 @@ namespace boost{ namespace math{
#else // All other platforms.
# define BOOST_FPU_EXCEPTION_GUARD
# define BOOST_MATH_INSTRUMENT_FPU
#endif
#ifdef BOOST_MATH_INSTRUMENT
-#define BOOST_MATH_INSTRUMENT_CODE(x) \
- std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
-#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
+# include <iostream>
+# include <iomanip>
+# include <typeinfo>
+
+# define BOOST_MATH_INSTRUMENT_CODE(x) \
+ std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
#else
-#define BOOST_MATH_INSTRUMENT_CODE(x)
-#define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
+# define BOOST_MATH_INSTRUMENT_CODE(x)
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
#endif
#endif // BOOST_MATH_TOOLS_CONFIG_HPP
diff --git a/3rdParty/Boost/src/boost/math/tools/promotion.hpp b/3rdParty/Boost/src/boost/math/tools/promotion.hpp
index 728aaf1..b3ad204 100644
--- a/3rdParty/Boost/src/boost/math/tools/promotion.hpp
+++ b/3rdParty/Boost/src/boost/math/tools/promotion.hpp
@@ -135,16 +135,41 @@ namespace boost
>::type type;
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
//
// Guard against use of long double if it's not supported:
//
- BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value));
+ BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
#endif
};
+ //
+ // This struct is the same as above, but has no static assert on long double usage,
+ // it should be used only on functions that can be implemented for long double
+ // even when std lib support is missing or broken for that type.
+ //
+ template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+ struct promote_args_permissive
+ {
+ typedef typename promote_args_2<
+ typename remove_cv<T1>::type,
+ typename promote_args_2<
+ typename remove_cv<T2>::type,
+ typename promote_args_2<
+ typename remove_cv<T3>::type,
+ typename promote_args_2<
+ typename remove_cv<T4>::type,
+ typename promote_args_2<
+ typename remove_cv<T5>::type, typename remove_cv<T6>::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type type;
+ };
+
} // namespace tools
} // namespace math
} // namespace boost
#endif // BOOST_MATH_PROMOTION_HPP
diff --git a/3rdParty/Boost/src/boost/math/tools/user.hpp b/3rdParty/Boost/src/boost/math/tools/user.hpp
index c1bdaf7..08a7e53 100644
--- a/3rdParty/Boost/src/boost/math/tools/user.hpp
+++ b/3rdParty/Boost/src/boost/math/tools/user.hpp
@@ -88,10 +88,18 @@
//
// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
//
// Maximum root finding steps permitted:
//
// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+//
+// Enable use of __float128 in numeric constants:
+//
+// #define BOOST_MATH_USE_FLOAT128
+//
+// Disable use of __float128 in numeric_constants even if the compiler looks to support it:
+//
+// #define BOOST_MATH_DISABLE_FLOAT128
#endif // BOOST_MATH_TOOLS_USER_HPP