mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Minor fixes from review [ci skip]
This commit is contained in:
@@ -366,6 +366,9 @@ Now we just need to write the test driver program, at it's most basic it looks s
|
||||
//
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
test(0.1L, "long double");
|
||||
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
|
||||
test(boost::math::concepts::real_concept(0.1), "real_concept);
|
||||
#endif
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
|
||||
@@ -1402,7 +1402,7 @@ if (f(w) / f'</span><span class="special">(</span><span class="identifier">w</sp
|
||||
</pre>
|
||||
<p>
|
||||
The arrays are as <code class="computeroutput"><span class="keyword">const</span></code> and <code class="computeroutput"><span class="keyword">constexpr</span></code> and <code class="computeroutput"><span class="keyword">static</span></code>
|
||||
as possible (for the compiler version), using static constexpr macro.
|
||||
as possible (for the compiler version), using static constexpr.
|
||||
(See <a href="../../../tools/lambert_w_lookup_table_generator.cpp" target="_top">lambert_w_lookup_table_generator.cpp</a>
|
||||
The precision was chosen to ensure that if used as <code class="computeroutput"><span class="keyword">long</span>
|
||||
<span class="keyword">double</span></code> arrays, then the values output
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
@@ -111,14 +112,9 @@ auto trapezoidal(F f, Real a, Real b, Real tol, std::size_t max_refinements, Rea
|
||||
|
||||
return static_cast<K>(I1);
|
||||
}
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||
// Template argument deduction failure otherwise:
|
||||
template<class F, class Real>
|
||||
auto trapezoidal(F f, Real a, Real b, Real tol = 0, std::size_t max_refinements = 12, Real* error_estimate = 0, Real* L1 = 0)->decltype(std::declval<F>()(std::declval<Real>()))
|
||||
#else
|
||||
|
||||
template<class F, class Real>
|
||||
auto trapezoidal(F f, Real a, Real b, Real tol = boost::math::tools::root_epsilon<Real>(), std::size_t max_refinements = 12, Real* error_estimate = nullptr, Real* L1 = nullptr)->decltype(std::declval<F>()(std::declval<Real>()))
|
||||
#endif
|
||||
{
|
||||
return trapezoidal(f, a, b, tol, max_refinements, error_estimate, L1, boost::math::policies::policy<>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user