mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Disable standalone tests of cstdfloat concept
[standalone]
This commit is contained in:
@@ -14,10 +14,13 @@
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <random>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <boost/math/tools/condition_numbers.hpp>
|
||||
#include <boost/random/uniform_real_distribution.hpp>
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/random/uniform_real_distribution.hpp>
|
||||
#endif
|
||||
|
||||
// Design of this function comes from:
|
||||
// https://blogs.mathworks.com/cleve/2017/01/23/ulps-plots-reveal-math-function-accurary/
|
||||
@@ -496,8 +499,16 @@ ulps_plot<F, PreciseReal, CoarseReal>::ulps_plot(F hi_acc_impl, CoarseReal a, Co
|
||||
std::random_device rd;
|
||||
gen.seed(rd());
|
||||
}
|
||||
|
||||
// Boost's uniform_real_distribution can generate quad and multiprecision random numbers; std's cannot:
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
boost::random::uniform_real_distribution<PreciseReal> dis(static_cast<PreciseReal>(a), static_cast<PreciseReal>(b));
|
||||
#else
|
||||
// Use std::random in standalone mode if it is a type that the standard library can support (float, double, or long double)
|
||||
static_assert(std::numeric_limits<PreciseReal>::digits10 <= std::numeric_limits<long double>::digits10, "Standalone mode does not support types with precision that exceeds long double");
|
||||
std::uniform_real_distribution<PreciseReal> dis(static_cast<PreciseReal>(a), static_cast<PreciseReal>(b));
|
||||
#endif
|
||||
|
||||
precise_abscissas_.resize(samples);
|
||||
coarse_abscissas_.resize(samples);
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
|
||||
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
|
||||
|
||||
#include <boost/cstdfloat.hpp>
|
||||
@@ -21,3 +23,4 @@ int main(int
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
|
||||
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
|
||||
|
||||
#include <boost/cstdfloat.hpp>
|
||||
#include "poison.hpp"
|
||||
#include "instantiate.hpp"
|
||||
|
||||
|
||||
int main(int
|
||||
#ifdef BOOST_FLOAT80_C
|
||||
argc
|
||||
@@ -22,3 +23,4 @@ int main(int
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
|
||||
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
|
||||
|
||||
#include <boost/cstdfloat.hpp>
|
||||
@@ -22,3 +24,4 @@ int main(int
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
|
||||
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
|
||||
|
||||
#include <boost/cstdfloat.hpp>
|
||||
@@ -22,3 +24,4 @@ int main(int
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// we basically need to include every std lib header we use, otherwise
|
||||
// our poisoned macros can break legit std lib code.
|
||||
//
|
||||
#include <boost/config.hpp>
|
||||
#include <valarray>
|
||||
#include <complex>
|
||||
#include <iosfwd>
|
||||
@@ -39,18 +38,10 @@
|
||||
#include <memory>
|
||||
#include <cerrno>
|
||||
#include <functional>
|
||||
#ifndef BOOST_NO_CXX11_HDR_FUTURE
|
||||
#include <future>
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_HDR_THREAD
|
||||
#include <thread>
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_HDR_RANDOM
|
||||
#include <random>
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_HDR_CHRONO
|
||||
#include <chrono>
|
||||
#endif
|
||||
#include <map>
|
||||
|
||||
//
|
||||
@@ -61,7 +52,9 @@
|
||||
//
|
||||
// lexical_cast uses macro unsafe isinf etc, so we have to include this as well:
|
||||
//
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Poison all the function-like macros in C99 so if we accidentally call them
|
||||
|
||||
Reference in New Issue
Block a user