update boost
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#ifndef BOOST_MATH_LOG1P_INCLUDED
|
||||
# include <boost/math/special_functions/log1p.hpp>
|
||||
#endif
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::atan; using ::atan2; }
|
||||
@@ -20,7 +20,7 @@ namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::a
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
std::complex<T> acos(const std::complex<T>& z)
|
||||
[[deprecated("Replaced by C++11")]] std::complex<T> acos(const std::complex<T>& z)
|
||||
{
|
||||
//
|
||||
// This implementation is a transcription of the pseudo-code in:
|
||||
@@ -44,7 +44,7 @@ std::complex<T> acos(const std::complex<T>& z)
|
||||
static const T log_two = boost::math::constants::ln_two<T>();
|
||||
static const T quarter_pi = s_pi / 4;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
@@ -202,7 +202,7 @@ std::complex<T> acos(const std::complex<T>& z)
|
||||
// but we have no way to test that here, so for now just assert
|
||||
// on the assumption:
|
||||
//
|
||||
BOOST_ASSERT(x == 1);
|
||||
BOOST_MATH_ASSERT(x == 1);
|
||||
real = std::sqrt(y);
|
||||
imag = std::sqrt(y);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ std::complex<T> acos(const std::complex<T>& z)
|
||||
imag = (boost::math::changesign)(imag);
|
||||
|
||||
return std::complex<T>(real, imag);
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
inline std::complex<T> acosh(const std::complex<T>& z)
|
||||
[[deprecated("Replaced by C++11")]] inline std::complex<T> acosh(const std::complex<T>& z)
|
||||
{
|
||||
//
|
||||
// We use the relation acosh(z) = +-i acos(z)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef BOOST_MATH_LOG1P_INCLUDED
|
||||
# include <boost/math/special_functions/log1p.hpp>
|
||||
#endif
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::atan; using ::atan2; }
|
||||
@@ -20,7 +20,7 @@ namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::a
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
inline std::complex<T> asin(const std::complex<T>& z)
|
||||
[[deprecated("Replaced by C++11")]] inline std::complex<T> asin(const std::complex<T>& z)
|
||||
{
|
||||
//
|
||||
// This implementation is a transcription of the pseudo-code in:
|
||||
@@ -43,7 +43,7 @@ inline std::complex<T> asin(const std::complex<T>& z)
|
||||
static const T half_pi = s_pi / 2;
|
||||
static const T log_two = boost::math::constants::ln_two<T>();
|
||||
static const T quarter_pi = s_pi / 4;
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
@@ -209,7 +209,7 @@ inline std::complex<T> asin(const std::complex<T>& z)
|
||||
// but we have no way to test that here, so for now just assert
|
||||
// on the assumption:
|
||||
//
|
||||
BOOST_ASSERT(x == 1);
|
||||
BOOST_MATH_ASSERT(x == 1);
|
||||
real = half_pi - std::sqrt(y);
|
||||
imag = std::sqrt(y);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ inline std::complex<T> asin(const std::complex<T>& z)
|
||||
imag = (boost::math::changesign)(imag);
|
||||
|
||||
return std::complex<T>(real, imag);
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
inline std::complex<T> asinh(const std::complex<T>& x)
|
||||
[[deprecated("Replaced by C++11")]] inline std::complex<T> asinh(const std::complex<T>& x)
|
||||
{
|
||||
//
|
||||
// We use asinh(z) = i asin(-i z);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
std::complex<T> atan(const std::complex<T>& x)
|
||||
[[deprecated("Replaced by C++11")]] std::complex<T> atan(const std::complex<T>& x)
|
||||
{
|
||||
//
|
||||
// We're using the C99 definition here; atan(z) = -i atanh(iz):
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BOOST_MATH_LOG1P_INCLUDED
|
||||
# include <boost/math/special_functions/log1p.hpp>
|
||||
#endif
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::atan; using ::atan2; }
|
||||
@@ -21,7 +21,7 @@ namespace std{ using ::sqrt; using ::fabs; using ::acos; using ::asin; using ::a
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
std::complex<T> atanh(const std::complex<T>& z)
|
||||
[[deprecated("Replaced by C++11")]] std::complex<T> atanh(const std::complex<T>& z)
|
||||
{
|
||||
//
|
||||
// References:
|
||||
@@ -47,7 +47,7 @@ std::complex<T> atanh(const std::complex<T>& z)
|
||||
static const T zero = static_cast<T>(0);
|
||||
static const T log_two = boost::math::constants::ln_two<T>();
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
@@ -204,7 +204,7 @@ std::complex<T> atanh(const std::complex<T>& z)
|
||||
imag = (boost::math::changesign)(imag);
|
||||
}
|
||||
return std::complex<T>(real, imag);
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -10,21 +10,14 @@
|
||||
// inverse trig complex functions, it also contains all the includes
|
||||
// that we need to implement all these functions.
|
||||
//
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/config/no_tr1/complex.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <math.h> // isnan where available
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
|
||||
#include <cmath>
|
||||
#include <complex>
|
||||
#include <limits>
|
||||
#include <boost/math/special_functions/sign.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/special_functions/sign.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::sqrt; }
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
template <class T>
|
||||
@@ -56,17 +49,7 @@ inline long double safe_max(long double t)
|
||||
// insufficient internal precision:
|
||||
return std::sqrt((std::numeric_limits<double>::max)()) / t;
|
||||
}
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
// workaround for type deduction bug:
|
||||
inline float safe_max(float t)
|
||||
{
|
||||
return std::sqrt((std::numeric_limits<float>::max)()) / t;
|
||||
}
|
||||
inline double safe_max(double t)
|
||||
{
|
||||
return std::sqrt((std::numeric_limits<double>::max)()) / t;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline T safe_min(T t)
|
||||
{
|
||||
@@ -78,17 +61,6 @@ inline long double safe_min(long double t)
|
||||
// insufficient internal precision:
|
||||
return std::sqrt((std::numeric_limits<double>::min)()) * t;
|
||||
}
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
// type deduction workaround:
|
||||
inline double safe_min(double t)
|
||||
{
|
||||
return std::sqrt((std::numeric_limits<double>::min)()) * t;
|
||||
}
|
||||
inline float safe_min(float t)
|
||||
{
|
||||
return std::sqrt((std::numeric_limits<float>::min)()) * t;
|
||||
}
|
||||
#endif
|
||||
|
||||
} } } // namespaces
|
||||
|
||||
|
||||
Reference in New Issue
Block a user