mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Standalone tests (#606)
* Add missing distribution compile tests * Add cstdfloat compile tests * Rename and finish differentiation * Add interpolators compile tests and fixes * Reorganize/add quadrature compile tests * Add missing sf tests and fixes for failures * Add tools incl tests and fixes * Add compile tests to jamfile plus collected fixes * Collected fixes for CI failures * Fix fftw config * Remove lexical cast from arcsine dist [ci skip] * Improve cstdfloat tests [ci skip] * Improve differentiation tests [ci skip] * Improve distribution testing [ci skip] * Updates to interpolator tests [ci skip] * Improve quadrature tests [ci skip] * Improve sf tests [ci skip] * Improve tools tests * Collected CI fixes * Fix for MSVC 14.2 array allocation error [windows] * MSVC 14.2 workarounds [windows] * Fix float128 and interpolators tests * Add standalone testing on clang [standalone] * Fixes for type mismatches on MSVC [windows] * Fix for MSVC 14.0 fail from missing header [windows] * Change barycentric rational namespace [ci skip] * Fix standalone clang warnings * Change namespace in barycentric examples
This commit is contained in:
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
@@ -296,7 +296,7 @@ jobs:
|
||||
- name: Test
|
||||
run: ..\..\..\b2 --hash %ARGS% define=CI_SUPPRESS_KNOWN_ISSUES ${{ matrix.suite }}
|
||||
working-directory: ../boost-root/libs/math/test
|
||||
standalone:
|
||||
standalone-gcc:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -324,7 +324,7 @@ jobs:
|
||||
if: steps.retry1.outcome=='failure'
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Install packages
|
||||
run: sudo apt install g++-10
|
||||
run: sudo apt install g++-10 libgmp-dev libmpfr-dev libfftw3-dev
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
@@ -339,3 +339,46 @@ jobs:
|
||||
- name: Run Compile Tests
|
||||
run: make -j$((`nproc`+1))
|
||||
working-directory: ../boost-root/libs/math
|
||||
standalone-clang:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: mstachniuk/ci-skip@v1
|
||||
with:
|
||||
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
|
||||
commit-filter-separator: ';'
|
||||
fail-fast: true
|
||||
- name: Add repository
|
||||
continue-on-error: true
|
||||
id: addrepo
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Retry Add Repo
|
||||
continue-on-error: true
|
||||
id: retry1
|
||||
if: steps.addrepo.outcome=='failure'
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Retry Add Repo 2
|
||||
continue-on-error: true
|
||||
id: retry2
|
||||
if: steps.retry1.outcome=='failure'
|
||||
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
- name: Install packages
|
||||
run: sudo apt install clang-10 libgmp-dev libmpfr-dev libfftw3-dev
|
||||
- name: Checkout main boost
|
||||
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
||||
- name: Update tools/boostdep
|
||||
run: git submodule update --init tools/boostdep
|
||||
working-directory: ../boost-root
|
||||
- name: Copy files
|
||||
run: cp -r $GITHUB_WORKSPACE/* libs/math
|
||||
working-directory: ../boost-root
|
||||
- name: Run CMake
|
||||
run: cmake -DBUILD_TESTING=1 -DCMAKE_CXX_COMPILER=clang++-10 .
|
||||
working-directory: ../boost-root/libs/math
|
||||
- name: Run Compile Tests
|
||||
run: make -j$((`nproc`+1))
|
||||
working-directory: ../boost-root/libs/math
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
``
|
||||
#include <boost/math/interpolators/barycentric_rational.hpp>
|
||||
|
||||
namespace boost{ namespace math{
|
||||
namespace boost{ namespace math{ namespace interpolators{
|
||||
template<class Real>
|
||||
class barycentric_rational
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace boost{ namespace math{
|
||||
std::vector<Real>&& return_y();
|
||||
};
|
||||
|
||||
}}
|
||||
}}}
|
||||
``
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ The call is trivial:
|
||||
std::vector<double> x(500);
|
||||
std::vector<double> y(500);
|
||||
// populate x, y, then:
|
||||
boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y));
|
||||
boost::math::interpolators::barycentric_rational<double> interpolant(std::move(x), std::move(y));
|
||||
|
||||
This implicitly calls the constructor with approximation order 3, and hence the accuracy is [bigo](/h/[super 4]).
|
||||
In general, if you require an approximation order /d/, then the error is [bigo](/h/[super /d/+1]).
|
||||
A call to the constructor with an explicit approximation order is demonstrated below
|
||||
|
||||
boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y), 5);
|
||||
boost::math::interpolators::barycentric_rational<double> interpolant(std::move(x), std::move(y), 5);
|
||||
|
||||
To evaluate the interpolant, simply use
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ int main()
|
||||
//->
|
||||
|
||||
// Now we want to interpolate this potential at any r:
|
||||
boost::math::barycentric_rational<double> b(r.data(), mrV.data(), r.size());
|
||||
boost::math::interpolators::barycentric_rational<double> b(r.data(), mrV.data(), r.size());
|
||||
|
||||
for (size_t i = 1; i < 8; ++i)
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ int main()
|
||||
// start by creating 2 ranges for the x and y values:
|
||||
auto x_range = boost::adaptors::keys(r);
|
||||
auto y_range = boost::adaptors::values(r);
|
||||
boost::math::barycentric_rational<double> b(x_range.begin(), x_range.end(), y_range.begin());
|
||||
boost::math::interpolators::barycentric_rational<double> b(x_range.begin(), x_range.end(), y_range.begin());
|
||||
//
|
||||
// We'll use a lambda expression to provide the functor to our root finder, since we want
|
||||
// the abscissa value that yields 3, not zero. We pass the functor b by value to the
|
||||
|
||||
@@ -879,7 +879,9 @@ namespace std
|
||||
using boost::math::cstdfloat::detail::fabs;
|
||||
|
||||
#if !(defined(_GLIBCXX_USE_FLOAT128) && defined(__GNUC__) && (__GNUC__ >= 7))
|
||||
#if defined(__clang__) && !(!defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)) // workaround for clang using libstdc++
|
||||
using boost::math::cstdfloat::detail::abs;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using boost::math::cstdfloat::detail::floor;
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
#ifndef BOOST_MATH_DIFFERENTIATION_LANCZOS_SMOOTHING_HPP
|
||||
#define BOOST_MATH_DIFFERENTIATION_LANCZOS_SMOOTHING_HPP
|
||||
#include <cmath> // for std::abs
|
||||
#include <cstddef>
|
||||
#include <limits> // to nan initialize
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
namespace boost::math::differentiation {
|
||||
|
||||
@@ -85,15 +85,14 @@ namespace boost
|
||||
{ // Check x_min < x_max
|
||||
if (x_min >= x_max)
|
||||
{
|
||||
std::string msg = "x_max argument is %1%, but must be > x_min = " + lexical_cast<std::string>(x_min) + "!";
|
||||
std::string msg = "x_max argument is %1%, but must be > x_min";
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
msg.c_str(), x_max, pol);
|
||||
// "x_max argument is %1%, but must be > x_min !", x_max, pol);
|
||||
// "x_max argument is %1%, but must be > x_min %2!", x_max, x_min, pol); would be better.
|
||||
// But would require replication of all helpers functions in /policies/error_handling.hpp for two values,
|
||||
// as well as two value versions of raise_error, raise_domain_error and do_format ...
|
||||
// so use slightly hacky lexical_cast to string instead.
|
||||
// "x_max argument is %1%, but must be > x_min !", x_max, pol);
|
||||
// "x_max argument is %1%, but must be > x_min %2!", x_max, x_min, pol); would be better.
|
||||
// But would require replication of all helpers functions in /policies/error_handling.hpp for two values,
|
||||
// as well as two value versions of raise_error, raise_domain_error and do_format
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace boost { namespace math{
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <memory>
|
||||
#include <boost/math/interpolators/detail/barycentric_rational_detail.hpp>
|
||||
|
||||
namespace boost{ namespace math{
|
||||
namespace boost{ namespace math{ namespace interpolators{
|
||||
|
||||
template<class Real>
|
||||
class barycentric_rational
|
||||
@@ -95,5 +95,5 @@ Real barycentric_rational<Real>::prime(Real x) const
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
}}}
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <stdexcept>
|
||||
#include <limits>
|
||||
|
||||
namespace std_workaround {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
namespace boost{ namespace math{ namespace interpolators { namespace detail{
|
||||
|
||||
template<class Real>
|
||||
class barycentric_rational_imp
|
||||
@@ -210,5 +210,5 @@ Real barycentric_rational_imp<Real>::prime(Real x) const
|
||||
|
||||
return numerator/denominator;
|
||||
}
|
||||
}}}
|
||||
}}}}
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#ifndef BOOST_MATH_INTERPOLATORS_DETAIL_CARDINAL_TRIGONOMETRIC_HPP
|
||||
#define BOOST_MATH_INTERPOLATORS_DETAIL_CARDINAL_TRIGONOMETRIC_HPP
|
||||
#include <cstddef>
|
||||
#include <cmath>
|
||||
#include <stdexcept>
|
||||
#include <fftw3.h>
|
||||
|
||||
@@ -22,6 +22,7 @@ template<class RandomAccessContainer>
|
||||
class cubic_hermite_detail {
|
||||
public:
|
||||
using Real = typename RandomAccessContainer::value_type;
|
||||
using Size = typename RandomAccessContainer::size_type;
|
||||
|
||||
cubic_hermite_detail(RandomAccessContainer && x, RandomAccessContainer && y, RandomAccessContainer dydx)
|
||||
: x_{std::move(x)}, y_{std::move(y)}, dydx_{std::move(dydx)}
|
||||
@@ -148,7 +149,7 @@ public:
|
||||
return os;
|
||||
}
|
||||
|
||||
auto size() const
|
||||
Size size() const
|
||||
{
|
||||
return x_.size();
|
||||
}
|
||||
@@ -172,6 +173,7 @@ template<class RandomAccessContainer>
|
||||
class cardinal_cubic_hermite_detail {
|
||||
public:
|
||||
using Real = typename RandomAccessContainer::value_type;
|
||||
using Size = typename RandomAccessContainer::size_type;
|
||||
|
||||
cardinal_cubic_hermite_detail(RandomAccessContainer && y, RandomAccessContainer dydx, Real x0, Real dx)
|
||||
: y_{std::move(y)}, dy_{std::move(dydx)}, x0_{x0}, inv_dx_{1/dx}
|
||||
@@ -271,7 +273,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
auto size() const
|
||||
Size size() const
|
||||
{
|
||||
return y_.size();
|
||||
}
|
||||
@@ -301,6 +303,7 @@ class cardinal_cubic_hermite_detail_aos {
|
||||
public:
|
||||
using Point = typename RandomAccessContainer::value_type;
|
||||
using Real = typename Point::value_type;
|
||||
using Size = typename RandomAccessContainer::size_type;
|
||||
|
||||
cardinal_cubic_hermite_detail_aos(RandomAccessContainer && dat, Real x0, Real dx)
|
||||
: dat_{std::move(dat)}, x0_{x0}, inv_dx_{1/dx}
|
||||
@@ -405,7 +408,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
auto size() const
|
||||
Size size() const
|
||||
{
|
||||
return dat_.size();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
#ifndef BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP
|
||||
#define BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <utility> // for std::move
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
namespace boost{ namespace math{ namespace interpolators{ namespace detail{
|
||||
|
||||
template <class TimeContainer, class SpaceContainer>
|
||||
class vector_barycentric_rational_imp
|
||||
@@ -189,5 +191,5 @@ void vector_barycentric_rational_imp<TimeContainer, SpaceContainer>::eval_with_p
|
||||
return;
|
||||
}
|
||||
|
||||
}}}
|
||||
}}}}
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_MATH_INTERPOLATORS_WHITAKKER_SHANNON_DETAIL_HPP
|
||||
#define BOOST_MATH_INTERPOLATORS_WHITAKKER_SHANNON_DETAIL_HPP
|
||||
#include <cmath>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/math/special_functions/sin_pi.hpp>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <memory>
|
||||
#include <boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp>
|
||||
|
||||
namespace boost{ namespace math{
|
||||
namespace boost{ namespace math{ namespace interpolators{
|
||||
|
||||
template<class TimeContainer, class SpaceContainer>
|
||||
class vector_barycentric_rational
|
||||
@@ -78,5 +78,5 @@ void vector_barycentric_rational<TimeContainer, SpaceContainer>::operator()(type
|
||||
return;
|
||||
}
|
||||
|
||||
}}
|
||||
}}}
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
#include <boost/math/special_functions/legendre.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
@@ -80,7 +81,7 @@ class gauss_detail<T, 7, 0>
|
||||
public:
|
||||
static std::array<T, 4> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
0.000000000e+00f,
|
||||
4.058451514e-01f,
|
||||
7.415311856e-01f,
|
||||
@@ -90,7 +91,7 @@ public:
|
||||
}
|
||||
static std::array<T, 4> const & weights()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
4.179591837e-01f,
|
||||
3.818300505e-01f,
|
||||
2.797053915e-01f,
|
||||
@@ -106,7 +107,7 @@ class gauss_detail<T, 7, 1>
|
||||
public:
|
||||
static std::array<T, 4> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
0.00000000000000000e+00,
|
||||
4.05845151377397167e-01,
|
||||
7.41531185599394440e-01,
|
||||
@@ -116,7 +117,7 @@ public:
|
||||
}
|
||||
static std::array<T, 4> const & weights()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
4.17959183673469388e-01,
|
||||
3.81830050505118945e-01,
|
||||
2.79705391489276668e-01,
|
||||
@@ -132,7 +133,7 @@ class gauss_detail<T, 7, 2>
|
||||
public:
|
||||
static std::array<T, 4> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
4.05845151377397166906606412076961463e-01L,
|
||||
7.41531185599394439863864773280788407e-01L,
|
||||
@@ -142,7 +143,7 @@ public:
|
||||
}
|
||||
static std::array<T, 4> const & weights()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
4.17959183673469387755102040816326531e-01L,
|
||||
3.81830050505118944950369775488975134e-01L,
|
||||
2.79705391489276667901467771423779582e-01L,
|
||||
@@ -158,7 +159,7 @@ class gauss_detail<T, 7, 3>
|
||||
public:
|
||||
static std::array<T, 4> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
4.05845151377397166906606412076961463e-01Q,
|
||||
7.41531185599394439863864773280788407e-01Q,
|
||||
@@ -168,7 +169,7 @@ public:
|
||||
}
|
||||
static std::array<T, 4> const & weights()
|
||||
{
|
||||
static const std::array<T, 4> data = {
|
||||
static constexpr std::array<T, 4> data = {
|
||||
4.17959183673469387755102040816326531e-01Q,
|
||||
3.81830050505118944950369775488975134e-01Q,
|
||||
2.79705391489276667901467771423779582e-01Q,
|
||||
@@ -210,7 +211,7 @@ class gauss_detail<T, 10, 0>
|
||||
public:
|
||||
static std::array<T, 5> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
1.488743390e-01f,
|
||||
4.333953941e-01f,
|
||||
6.794095683e-01f,
|
||||
@@ -221,7 +222,7 @@ public:
|
||||
}
|
||||
static std::array<T, 5> const & weights()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
2.955242247e-01f,
|
||||
2.692667193e-01f,
|
||||
2.190863625e-01f,
|
||||
@@ -238,7 +239,7 @@ class gauss_detail<T, 10, 1>
|
||||
public:
|
||||
static std::array<T, 5> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
1.48874338981631211e-01,
|
||||
4.33395394129247191e-01,
|
||||
6.79409568299024406e-01,
|
||||
@@ -249,7 +250,7 @@ public:
|
||||
}
|
||||
static std::array<T, 5> const & weights()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
2.95524224714752870e-01,
|
||||
2.69266719309996355e-01,
|
||||
2.19086362515982044e-01,
|
||||
@@ -266,7 +267,7 @@ class gauss_detail<T, 10, 2>
|
||||
public:
|
||||
static std::array<T, 5> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
1.48874338981631210884826001129719985e-01L,
|
||||
4.33395394129247190799265943165784162e-01L,
|
||||
6.79409568299024406234327365114873576e-01L,
|
||||
@@ -277,7 +278,7 @@ public:
|
||||
}
|
||||
static std::array<T, 5> const & weights()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
2.95524224714752870173892994651338329e-01L,
|
||||
2.69266719309996355091226921569469353e-01L,
|
||||
2.19086362515982043995534934228163192e-01L,
|
||||
@@ -294,7 +295,7 @@ class gauss_detail<T, 10, 3>
|
||||
public:
|
||||
static std::array<T, 5> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
1.48874338981631210884826001129719985e-01Q,
|
||||
4.33395394129247190799265943165784162e-01Q,
|
||||
6.79409568299024406234327365114873576e-01Q,
|
||||
@@ -305,7 +306,7 @@ public:
|
||||
}
|
||||
static std::array<T, 5> const & weights()
|
||||
{
|
||||
static const std::array<T, 5> data = {
|
||||
static constexpr std::array<T, 5> data = {
|
||||
2.95524224714752870173892994651338329e-01Q,
|
||||
2.69266719309996355091226921569469353e-01Q,
|
||||
2.19086362515982043995534934228163192e-01Q,
|
||||
@@ -350,7 +351,7 @@ class gauss_detail<T, 15, 0>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.000000000e+00f,
|
||||
2.011940940e-01f,
|
||||
3.941513471e-01f,
|
||||
@@ -364,7 +365,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.025782419e-01f,
|
||||
1.984314853e-01f,
|
||||
1.861610000e-01f,
|
||||
@@ -384,7 +385,7 @@ class gauss_detail<T, 15, 1>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000e+00,
|
||||
2.01194093997434522e-01,
|
||||
3.94151347077563370e-01,
|
||||
@@ -398,7 +399,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.02578241925561273e-01,
|
||||
1.98431485327111576e-01,
|
||||
1.86161000015562211e-01,
|
||||
@@ -418,7 +419,7 @@ class gauss_detail<T, 15, 2>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
2.01194093997434522300628303394596208e-01L,
|
||||
3.94151347077563369897207370981045468e-01L,
|
||||
@@ -432,7 +433,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.02578241925561272880620199967519315e-01L,
|
||||
1.98431485327111576456118326443839325e-01L,
|
||||
1.86161000015562211026800561866422825e-01L,
|
||||
@@ -452,7 +453,7 @@ class gauss_detail<T, 15, 3>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
2.01194093997434522300628303394596208e-01Q,
|
||||
3.94151347077563369897207370981045468e-01Q,
|
||||
@@ -466,7 +467,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.02578241925561272880620199967519315e-01Q,
|
||||
1.98431485327111576456118326443839325e-01Q,
|
||||
1.86161000015562211026800561866422825e-01Q,
|
||||
@@ -520,7 +521,7 @@ class gauss_detail<T, 20, 0>
|
||||
public:
|
||||
static std::array<T, 10> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
7.652652113e-02f,
|
||||
2.277858511e-01f,
|
||||
3.737060887e-01f,
|
||||
@@ -536,7 +537,7 @@ public:
|
||||
}
|
||||
static std::array<T, 10> const & weights()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
1.527533871e-01f,
|
||||
1.491729865e-01f,
|
||||
1.420961093e-01f,
|
||||
@@ -558,7 +559,7 @@ class gauss_detail<T, 20, 1>
|
||||
public:
|
||||
static std::array<T, 10> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
7.65265211334973338e-02,
|
||||
2.27785851141645078e-01,
|
||||
3.73706088715419561e-01,
|
||||
@@ -574,7 +575,7 @@ public:
|
||||
}
|
||||
static std::array<T, 10> const & weights()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
1.52753387130725851e-01,
|
||||
1.49172986472603747e-01,
|
||||
1.42096109318382051e-01,
|
||||
@@ -596,7 +597,7 @@ class gauss_detail<T, 20, 2>
|
||||
public:
|
||||
static std::array<T, 10> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
7.65265211334973337546404093988382110e-02L,
|
||||
2.27785851141645078080496195368574625e-01L,
|
||||
3.73706088715419560672548177024927237e-01L,
|
||||
@@ -612,7 +613,7 @@ public:
|
||||
}
|
||||
static std::array<T, 10> const & weights()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
1.52753387130725850698084331955097593e-01L,
|
||||
1.49172986472603746787828737001969437e-01L,
|
||||
1.42096109318382051329298325067164933e-01L,
|
||||
@@ -634,7 +635,7 @@ class gauss_detail<T, 20, 3>
|
||||
public:
|
||||
static std::array<T, 10> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
7.65265211334973337546404093988382110e-02Q,
|
||||
2.27785851141645078080496195368574625e-01Q,
|
||||
3.73706088715419560672548177024927237e-01Q,
|
||||
@@ -650,7 +651,7 @@ public:
|
||||
}
|
||||
static std::array<T, 10> const & weights()
|
||||
{
|
||||
static const std::array<T, 10> data = {
|
||||
static constexpr std::array<T, 10> data = {
|
||||
1.52753387130725850698084331955097593e-01Q,
|
||||
1.49172986472603746787828737001969437e-01Q,
|
||||
1.42096109318382051329298325067164933e-01Q,
|
||||
@@ -710,7 +711,7 @@ class gauss_detail<T, 25, 0>
|
||||
public:
|
||||
static std::array<T, 13> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
0.000000000e+00f,
|
||||
1.228646926e-01f,
|
||||
2.438668837e-01f,
|
||||
@@ -729,7 +730,7 @@ public:
|
||||
}
|
||||
static std::array<T, 13> const & weights()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
1.231760537e-01f,
|
||||
1.222424430e-01f,
|
||||
1.194557635e-01f,
|
||||
@@ -754,7 +755,7 @@ class gauss_detail<T, 25, 1>
|
||||
public:
|
||||
static std::array<T, 13> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
0.00000000000000000e+00,
|
||||
1.22864692610710396e-01,
|
||||
2.43866883720988432e-01,
|
||||
@@ -773,7 +774,7 @@ public:
|
||||
}
|
||||
static std::array<T, 13> const & weights()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
1.23176053726715451e-01,
|
||||
1.22242442990310042e-01,
|
||||
1.19455763535784772e-01,
|
||||
@@ -798,7 +799,7 @@ class gauss_detail<T, 25, 2>
|
||||
public:
|
||||
static std::array<T, 13> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
1.22864692610710396387359818808036806e-01L,
|
||||
2.43866883720988432045190362797451586e-01L,
|
||||
@@ -817,7 +818,7 @@ public:
|
||||
}
|
||||
static std::array<T, 13> const & weights()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
1.23176053726715451203902873079050142e-01L,
|
||||
1.22242442990310041688959518945851506e-01L,
|
||||
1.19455763535784772228178126512901047e-01L,
|
||||
@@ -842,7 +843,7 @@ class gauss_detail<T, 25, 3>
|
||||
public:
|
||||
static std::array<T, 13> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
1.22864692610710396387359818808036806e-01Q,
|
||||
2.43866883720988432045190362797451586e-01Q,
|
||||
@@ -861,7 +862,7 @@ public:
|
||||
}
|
||||
static std::array<T, 13> const & weights()
|
||||
{
|
||||
static const std::array<T, 13> data = {
|
||||
static constexpr std::array<T, 13> data = {
|
||||
1.23176053726715451203902873079050142e-01Q,
|
||||
1.22242442990310041688959518945851506e-01Q,
|
||||
1.19455763535784772228178126512901047e-01Q,
|
||||
@@ -930,7 +931,7 @@ class gauss_detail<T, 30, 0>
|
||||
public:
|
||||
static std::array<T, 15> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
5.147184256e-02f,
|
||||
1.538699136e-01f,
|
||||
2.546369262e-01f,
|
||||
@@ -951,7 +952,7 @@ public:
|
||||
}
|
||||
static std::array<T, 15> const & weights()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
1.028526529e-01f,
|
||||
1.017623897e-01f,
|
||||
9.959342059e-02f,
|
||||
@@ -978,7 +979,7 @@ class gauss_detail<T, 30, 1>
|
||||
public:
|
||||
static std::array<T, 15> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
5.14718425553176958e-02,
|
||||
1.53869913608583547e-01,
|
||||
2.54636926167889846e-01,
|
||||
@@ -999,7 +1000,7 @@ public:
|
||||
}
|
||||
static std::array<T, 15> const & weights()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
1.02852652893558840e-01,
|
||||
1.01762389748405505e-01,
|
||||
9.95934205867952671e-02,
|
||||
@@ -1026,7 +1027,7 @@ class gauss_detail<T, 30, 2>
|
||||
public:
|
||||
static std::array<T, 15> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
5.14718425553176958330252131667225737e-02L,
|
||||
1.53869913608583546963794672743255920e-01L,
|
||||
2.54636926167889846439805129817805108e-01L,
|
||||
@@ -1047,7 +1048,7 @@ public:
|
||||
}
|
||||
static std::array<T, 15> const & weights()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
1.02852652893558840341285636705415044e-01L,
|
||||
1.01762389748405504596428952168554045e-01L,
|
||||
9.95934205867952670627802821035694765e-02L,
|
||||
@@ -1074,7 +1075,7 @@ class gauss_detail<T, 30, 3>
|
||||
public:
|
||||
static std::array<T, 15> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
5.14718425553176958330252131667225737e-02Q,
|
||||
1.53869913608583546963794672743255920e-01Q,
|
||||
2.54636926167889846439805129817805108e-01Q,
|
||||
@@ -1095,7 +1096,7 @@ public:
|
||||
}
|
||||
static std::array<T, 15> const & weights()
|
||||
{
|
||||
static const std::array<T, 15> data = {
|
||||
static constexpr std::array<T, 15> data = {
|
||||
1.02852652893558840341285636705415044e-01Q,
|
||||
1.01762389748405504596428952168554045e-01Q,
|
||||
9.95934205867952670627802821035694765e-02Q,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright John Maddock 2017.
|
||||
// Copyright Nick Thompson 2017.
|
||||
// Copyright Nick Thompson 2017.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -13,7 +13,9 @@
|
||||
#pragma warning(disable: 4127)
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <boost/math/special_functions/legendre.hpp>
|
||||
#include <boost/math/special_functions/legendre_stieltjes.hpp>
|
||||
#include <boost/math/quadrature/gauss.hpp>
|
||||
@@ -86,7 +88,7 @@ class gauss_kronrod_detail<T, 15, 0>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.000000000e+00f,
|
||||
2.077849550e-01f,
|
||||
4.058451514e-01f,
|
||||
@@ -100,7 +102,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.094821411e-01f,
|
||||
2.044329401e-01f,
|
||||
1.903505781e-01f,
|
||||
@@ -120,7 +122,7 @@ class gauss_kronrod_detail<T, 15, 1>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000e+00,
|
||||
2.07784955007898468e-01,
|
||||
4.05845151377397167e-01,
|
||||
@@ -134,7 +136,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.09482141084727828e-01,
|
||||
2.04432940075298892e-01,
|
||||
1.90350578064785410e-01,
|
||||
@@ -154,7 +156,7 @@ class gauss_kronrod_detail<T, 15, 2>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
2.07784955007898467600689403773244913e-01L,
|
||||
4.05845151377397166906606412076961463e-01L,
|
||||
@@ -168,7 +170,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.09482141084727828012999174891714264e-01L,
|
||||
2.04432940075298892414161999234649085e-01L,
|
||||
1.90350578064785409913256402421013683e-01L,
|
||||
@@ -189,7 +191,7 @@ class gauss_kronrod_detail<T, 15, 3>
|
||||
public:
|
||||
static std::array<T, 8> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
2.07784955007898467600689403773244913e-01Q,
|
||||
4.05845151377397166906606412076961463e-01Q,
|
||||
@@ -203,7 +205,7 @@ public:
|
||||
}
|
||||
static std::array<T, 8> const & weights()
|
||||
{
|
||||
static const std::array<T, 8> data = {
|
||||
static constexpr std::array<T, 8> data = {
|
||||
2.09482141084727828012999174891714264e-01Q,
|
||||
2.04432940075298892414161999234649085e-01Q,
|
||||
1.90350578064785409913256402421013683e-01Q,
|
||||
@@ -258,7 +260,7 @@ class gauss_kronrod_detail<T, 21, 0>
|
||||
public:
|
||||
static std::array<T, 11> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
0.000000000e+00f,
|
||||
1.488743390e-01f,
|
||||
2.943928627e-01f,
|
||||
@@ -275,7 +277,7 @@ public:
|
||||
}
|
||||
static std::array<T, 11> const & weights()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
1.494455540e-01f,
|
||||
1.477391049e-01f,
|
||||
1.427759386e-01f,
|
||||
@@ -298,7 +300,7 @@ class gauss_kronrod_detail<T, 21, 1>
|
||||
public:
|
||||
static std::array<T, 11> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
0.00000000000000000e+00,
|
||||
1.48874338981631211e-01,
|
||||
2.94392862701460198e-01,
|
||||
@@ -315,7 +317,7 @@ public:
|
||||
}
|
||||
static std::array<T, 11> const & weights()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
1.49445554002916906e-01,
|
||||
1.47739104901338491e-01,
|
||||
1.42775938577060081e-01,
|
||||
@@ -338,7 +340,7 @@ class gauss_kronrod_detail<T, 21, 2>
|
||||
public:
|
||||
static std::array<T, 11> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
1.48874338981631210884826001129719985e-01L,
|
||||
2.94392862701460198131126603103865566e-01L,
|
||||
@@ -355,7 +357,7 @@ public:
|
||||
}
|
||||
static std::array<T, 11> const & weights()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
1.49445554002916905664936468389821204e-01L,
|
||||
1.47739104901338491374841515972068046e-01L,
|
||||
1.42775938577060080797094273138717061e-01L,
|
||||
@@ -379,7 +381,7 @@ class gauss_kronrod_detail<T, 21, 3>
|
||||
public:
|
||||
static std::array<T, 11> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
1.48874338981631210884826001129719985e-01Q,
|
||||
2.94392862701460198131126603103865566e-01Q,
|
||||
@@ -396,7 +398,7 @@ public:
|
||||
}
|
||||
static std::array<T, 11> const & weights()
|
||||
{
|
||||
static const std::array<T, 11> data = {
|
||||
static constexpr std::array<T, 11> data = {
|
||||
1.49445554002916905664936468389821204e-01Q,
|
||||
1.47739104901338491374841515972068046e-01Q,
|
||||
1.42775938577060080797094273138717061e-01Q,
|
||||
@@ -460,7 +462,7 @@ class gauss_kronrod_detail<T, 31, 0>
|
||||
public:
|
||||
static std::array<T, 16> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
0.000000000e+00f,
|
||||
1.011420669e-01f,
|
||||
2.011940940e-01f,
|
||||
@@ -482,7 +484,7 @@ public:
|
||||
}
|
||||
static std::array<T, 16> const & weights()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
1.013300070e-01f,
|
||||
1.007698455e-01f,
|
||||
9.917359872e-02f,
|
||||
@@ -510,7 +512,7 @@ class gauss_kronrod_detail<T, 31, 1>
|
||||
public:
|
||||
static std::array<T, 16> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
0.00000000000000000e+00,
|
||||
1.01142066918717499e-01,
|
||||
2.01194093997434522e-01,
|
||||
@@ -532,7 +534,7 @@ public:
|
||||
}
|
||||
static std::array<T, 16> const & weights()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
1.01330007014791549e-01,
|
||||
1.00769845523875595e-01,
|
||||
9.91735987217919593e-02,
|
||||
@@ -560,7 +562,7 @@ class gauss_kronrod_detail<T, 31, 2>
|
||||
public:
|
||||
static std::array<T, 16> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
1.01142066918717499027074231447392339e-01L,
|
||||
2.01194093997434522300628303394596208e-01L,
|
||||
@@ -582,7 +584,7 @@ public:
|
||||
}
|
||||
static std::array<T, 16> const & weights()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
1.01330007014791549017374792767492547e-01L,
|
||||
1.00769845523875595044946662617569722e-01L,
|
||||
9.91735987217919593323931734846031311e-02L,
|
||||
@@ -611,7 +613,7 @@ class gauss_kronrod_detail<T, 31, 3>
|
||||
public:
|
||||
static std::array<T, 16> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
1.01142066918717499027074231447392339e-01Q,
|
||||
2.01194093997434522300628303394596208e-01Q,
|
||||
@@ -633,7 +635,7 @@ public:
|
||||
}
|
||||
static std::array<T, 16> const & weights()
|
||||
{
|
||||
static const std::array<T, 16> data = {
|
||||
static constexpr std::array<T, 16> data = {
|
||||
1.01330007014791549017374792767492547e-01Q,
|
||||
1.00769845523875595044946662617569722e-01Q,
|
||||
9.91735987217919593323931734846031311e-02Q,
|
||||
@@ -712,7 +714,7 @@ class gauss_kronrod_detail<T, 41, 0>
|
||||
public:
|
||||
static std::array<T, 21> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
0.000000000e+00f,
|
||||
7.652652113e-02f,
|
||||
1.526054652e-01f,
|
||||
@@ -739,7 +741,7 @@ public:
|
||||
}
|
||||
static std::array<T, 21> const & weights()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
7.660071192e-02f,
|
||||
7.637786767e-02f,
|
||||
7.570449768e-02f,
|
||||
@@ -772,7 +774,7 @@ class gauss_kronrod_detail<T, 41, 1>
|
||||
public:
|
||||
static std::array<T, 21> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
0.00000000000000000e+00,
|
||||
7.65265211334973338e-02,
|
||||
1.52605465240922676e-01,
|
||||
@@ -799,7 +801,7 @@ public:
|
||||
}
|
||||
static std::array<T, 21> const & weights()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
7.66007119179996564e-02,
|
||||
7.63778676720807367e-02,
|
||||
7.57044976845566747e-02,
|
||||
@@ -832,7 +834,7 @@ class gauss_kronrod_detail<T, 41, 2>
|
||||
public:
|
||||
static std::array<T, 21> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
7.65265211334973337546404093988382110e-02L,
|
||||
1.52605465240922675505220241022677528e-01L,
|
||||
@@ -859,7 +861,7 @@ public:
|
||||
}
|
||||
static std::array<T, 21> const & weights()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
7.66007119179996564450499015301017408e-02L,
|
||||
7.63778676720807367055028350380610018e-02L,
|
||||
7.57044976845566746595427753766165583e-02L,
|
||||
@@ -893,18 +895,13 @@ class gauss_kronrod_detail<T, 41, 3>
|
||||
public:
|
||||
static std::array<T, 21> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
7.65265211334973337546404093988382110e-02Q,
|
||||
1.52605465240922675505220241022677528e-01Q,
|
||||
2.27785851141645078080496195368574625e-01Q,
|
||||
3.01627868114913004320555356858592261e-01Q,
|
||||
3.73706088715419560672548177024927237e-01Q,
|
||||
4.43593175238725103199992213492640108e-01Q,
|
||||
5.10867001950827098004364050955250998e-01Q,
|
||||
5.75140446819710315342946036586425133e-01Q,
|
||||
6.36053680726515025452836696226285937e-01Q,
|
||||
6.93237656334751384805490711845931533e-01Q,
|
||||
3.73706088715419560672548177024927237e-01Q,array
|
||||
7.46331906460150792614305070355641590e-01Q,
|
||||
7.95041428837551198350638833272787943e-01Q,
|
||||
8.39116971822218823394529061701520685e-01Q,
|
||||
@@ -920,7 +917,7 @@ public:
|
||||
}
|
||||
static std::array<T, 21> const & weights()
|
||||
{
|
||||
static const std::array<T, 21> data = {
|
||||
static constexpr std::array<T, 21> data = {
|
||||
7.66007119179996564450499015301017408e-02Q,
|
||||
7.63778676720807367055028350380610018e-02Q,
|
||||
7.57044976845566746595427753766165583e-02Q,
|
||||
@@ -1014,7 +1011,7 @@ class gauss_kronrod_detail<T, 51, 0>
|
||||
public:
|
||||
static std::array<T, 26> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
0.000000000e+00f,
|
||||
6.154448301e-02f,
|
||||
1.228646926e-01f,
|
||||
@@ -1046,7 +1043,7 @@ public:
|
||||
}
|
||||
static std::array<T, 26> const & weights()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
6.158081807e-02f,
|
||||
6.147118987e-02f,
|
||||
6.112850972e-02f,
|
||||
@@ -1084,7 +1081,7 @@ class gauss_kronrod_detail<T, 51, 1>
|
||||
public:
|
||||
static std::array<T, 26> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
0.00000000000000000e+00,
|
||||
6.15444830056850789e-02,
|
||||
1.22864692610710396e-01,
|
||||
@@ -1116,7 +1113,7 @@ public:
|
||||
}
|
||||
static std::array<T, 26> const & weights()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
6.15808180678329351e-02,
|
||||
6.14711898714253167e-02,
|
||||
6.11285097170530483e-02,
|
||||
@@ -1154,7 +1151,7 @@ class gauss_kronrod_detail<T, 51, 2>
|
||||
public:
|
||||
static std::array<T, 26> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
6.15444830056850788865463923667966313e-02L,
|
||||
1.22864692610710396387359818808036806e-01L,
|
||||
@@ -1186,7 +1183,7 @@ public:
|
||||
}
|
||||
static std::array<T, 26> const & weights()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
6.15808180678329350787598242400645532e-02L,
|
||||
6.14711898714253166615441319652641776e-02L,
|
||||
6.11285097170530483058590304162927119e-02L,
|
||||
@@ -1225,7 +1222,7 @@ class gauss_kronrod_detail<T, 51, 3>
|
||||
public:
|
||||
static std::array<T, 26> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
6.15444830056850788865463923667966313e-02Q,
|
||||
1.22864692610710396387359818808036806e-01Q,
|
||||
@@ -1257,7 +1254,7 @@ public:
|
||||
}
|
||||
static std::array<T, 26> const & weights()
|
||||
{
|
||||
static const std::array<T, 26> data = {
|
||||
static constexpr std::array<T, 26> data = {
|
||||
6.15808180678329350787598242400645532e-02Q,
|
||||
6.14711898714253166615441319652641776e-02Q,
|
||||
6.11285097170530483058590304162927119e-02Q,
|
||||
@@ -1366,7 +1363,7 @@ class gauss_kronrod_detail<T, 61, 0>
|
||||
public:
|
||||
static std::array<T, 31> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
0.000000000e+00f,
|
||||
5.147184256e-02f,
|
||||
1.028069380e-01f,
|
||||
@@ -1403,7 +1400,7 @@ public:
|
||||
}
|
||||
static std::array<T, 31> const & weights()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
5.149472943e-02f,
|
||||
5.142612854e-02f,
|
||||
5.122154785e-02f,
|
||||
@@ -1446,7 +1443,7 @@ class gauss_kronrod_detail<T, 61, 1>
|
||||
public:
|
||||
static std::array<T, 31> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
0.00000000000000000e+00,
|
||||
5.14718425553176958e-02,
|
||||
1.02806937966737030e-01,
|
||||
@@ -1483,7 +1480,7 @@ public:
|
||||
}
|
||||
static std::array<T, 31> const & weights()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
5.14947294294515676e-02,
|
||||
5.14261285374590259e-02,
|
||||
5.12215478492587722e-02,
|
||||
@@ -1526,7 +1523,7 @@ class gauss_kronrod_detail<T, 61, 2>
|
||||
public:
|
||||
static std::array<T, 31> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
0.00000000000000000000000000000000000e+00L,
|
||||
5.14718425553176958330252131667225737e-02L,
|
||||
1.02806937966737030147096751318000592e-01L,
|
||||
@@ -1563,7 +1560,7 @@ public:
|
||||
}
|
||||
static std::array<T, 31> const & weights()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
5.14947294294515675583404336470993075e-02L,
|
||||
5.14261285374590259338628792157812598e-02L,
|
||||
5.12215478492587721706562826049442083e-02L,
|
||||
@@ -1607,7 +1604,7 @@ class gauss_kronrod_detail<T, 61, 3>
|
||||
public:
|
||||
static std::array<T, 31> const & abscissa()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
0.00000000000000000000000000000000000e+00Q,
|
||||
5.14718425553176958330252131667225737e-02Q,
|
||||
1.02806937966737030147096751318000592e-01Q,
|
||||
@@ -1644,7 +1641,7 @@ public:
|
||||
}
|
||||
static std::array<T, 31> const & weights()
|
||||
{
|
||||
static const std::array<T, 31> data = {
|
||||
static constexpr std::array<T, 31> data = {
|
||||
5.14947294294515675583404336470993075e-02Q,
|
||||
5.14261285374590259338628792157812598e-02Q,
|
||||
5.12215478492587721706562826049442083e-02Q,
|
||||
|
||||
@@ -362,20 +362,20 @@ public:
|
||||
//
|
||||
// Get the counter and see if we need to calculate more constants:
|
||||
//
|
||||
if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
if((static_cast<std::size_t>(m_counter.load(std::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_mutex);
|
||||
|
||||
if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
if((static_cast<std::size_t>(m_counter.load(std::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
{
|
||||
if(static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>())
|
||||
if(static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>())
|
||||
{
|
||||
bn.clear();
|
||||
tn.clear();
|
||||
m_intermediates.clear();
|
||||
m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release);
|
||||
m_counter.store(0, std::memory_order_release);
|
||||
m_current_precision = boost::math::tools::digits<T>();
|
||||
}
|
||||
if(start + n >= bn.size())
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
|
||||
tangent_numbers_series(new_size);
|
||||
}
|
||||
m_counter.store(static_cast<atomic_integer_type>(bn.size()), BOOST_MATH_ATOMIC_NS::memory_order_release);
|
||||
m_counter.store(static_cast<atomic_integer_type>(bn.size()), std::memory_order_release);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,20 +441,20 @@ public:
|
||||
//
|
||||
// Get the counter and see if we need to calculate more constants:
|
||||
//
|
||||
if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
if((static_cast<std::size_t>(m_counter.load(std::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_mutex);
|
||||
|
||||
if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
if((static_cast<std::size_t>(m_counter.load(std::memory_order_consume)) < start + n)
|
||||
|| (static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>()))
|
||||
{
|
||||
if(static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>())
|
||||
if(static_cast<int>(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits<T>())
|
||||
{
|
||||
bn.clear();
|
||||
tn.clear();
|
||||
m_intermediates.clear();
|
||||
m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release);
|
||||
m_counter.store(0, std::memory_order_release);
|
||||
m_current_precision = boost::math::tools::digits<T>();
|
||||
}
|
||||
if(start + n >= bn.size())
|
||||
@@ -462,7 +462,7 @@ public:
|
||||
std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
|
||||
tangent_numbers_series(new_size);
|
||||
}
|
||||
m_counter.store(static_cast<atomic_integer_type>(bn.size()), BOOST_MATH_ATOMIC_NS::memory_order_release);
|
||||
m_counter.store(static_cast<atomic_integer_type>(bn.size()), std::memory_order_release);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,8 +137,8 @@ inline bool is_nan_helper(__float128 f, const std::false_type&) { return ::isnan
|
||||
inline bool is_nan_helper(__float128 f, const std::true_type&) { return std::isnan(static_cast<double>(f)); }
|
||||
inline bool is_nan_helper(__float128 f, const std::false_type&) { return std::isnan(static_cast<double>(f)); }
|
||||
#else
|
||||
inline bool is_nan_helper(__float128 f, const std::true_type&) { return ::isnan(static_cast<double>(f)); }
|
||||
inline bool is_nan_helper(__float128 f, const std::false_type&) { return ::isnan(static_cast<double>(f)); }
|
||||
inline bool is_nan_helper(__float128 f, const std::true_type&) { return boost::math::isnan(static_cast<double>(f)); }
|
||||
inline bool is_nan_helper(__float128 f, const std::false_type&) { return boost::math::isnan(static_cast<double>(f)); }
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef BOOST_MATH_SPECIAL_GEGENBAUER_HPP
|
||||
#define BOOST_MATH_SPECIAL_GEGENBAUER_HPP
|
||||
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef BOOST_MATH_SPECIAL_FUNCTIONS_RSQRT_HPP
|
||||
#define BOOST_MATH_SPECIAL_FUNCTIONS_RSQRT_HPP
|
||||
#include <cmath>
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
|
||||
namespace boost::math {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <boost/math/tools/cxx03_warn.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#define BOOST_MATH_ATOMIC_NS std
|
||||
|
||||
namespace boost {
|
||||
namespace math {
|
||||
namespace detail {
|
||||
@@ -37,7 +37,8 @@ namespace boost {
|
||||
#else
|
||||
# define BOOST_MATH_NO_ATOMIC_INT
|
||||
#endif
|
||||
}
|
||||
}}
|
||||
} // Namespace detail
|
||||
} // Namespace math
|
||||
} // Namespace boost
|
||||
|
||||
#endif // BOOST_MATH_ATOMIC_DETAIL_HPP
|
||||
|
||||
@@ -6,12 +6,16 @@
|
||||
#ifndef BOOST_MATH_TOOLS_CENTERED_CONTINUED_FRACTION_HPP
|
||||
#define BOOST_MATH_TOOLS_CENTERED_CONTINUED_FRACTION_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
#include <iomanip>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <array>
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/core/demangle.hpp>
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
#define BOOST_MATH_TOOLS_COHEN_ACCELERATION_HPP
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
// Algorithm 1 of https://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf
|
||||
// Convergence Acceleration of Alternating Series: Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier
|
||||
template<class G>
|
||||
auto cohen_acceleration(G& generator, int64_t n = -1)
|
||||
auto cohen_acceleration(G& generator, std::int64_t n = -1)
|
||||
{
|
||||
using Real = decltype(generator());
|
||||
// This test doesn't pass for float128, sad!
|
||||
@@ -28,7 +29,7 @@ auto cohen_acceleration(G& generator, int64_t n = -1)
|
||||
// relative error grows as 2*5.828^-n; take 5.828^-n < eps/4 => -nln(5.828) < ln(eps/4) => n > ln(4/eps)/ln(5.828).
|
||||
// Is there a way to do it rapidly with std::log2? (Yes, of course; but for primitive types it's computed at compile-time anyway.)
|
||||
n_ = ceil(log(4/std::numeric_limits<Real>::epsilon())*0.5672963285532555);
|
||||
n = static_cast<int64_t>(n_);
|
||||
n = static_cast<std::int64_t>(n_);
|
||||
}
|
||||
// d can get huge and overflow if you pick n too large:
|
||||
Real d = pow(3 + sqrt(Real(8)), n);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef BOOST_MATH_TOOLS_CONDITION_NUMBERS_HPP
|
||||
#define BOOST_MATH_TOOLS_CONDITION_NUMBERS_HPP
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <boost/math/differentiation/finite_difference.hpp>
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
#ifndef BOOST_MATH_TOOLS_ENGEL_EXPANSION_HPP
|
||||
#define BOOST_MATH_TOOLS_ENGEL_EXPANSION_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
#include <iomanip>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -56,15 +57,15 @@ public:
|
||||
computed += term;
|
||||
}
|
||||
|
||||
for (size_t i = 1; i < a_.size(); ++i)
|
||||
for (size_t j = 1; j < a_.size(); ++j)
|
||||
{
|
||||
// Sanity check: This should only happen when wraparound occurs:
|
||||
if (a_[i] < a_[i-1])
|
||||
if (a_[j] < a_[j-1])
|
||||
{
|
||||
throw std::domain_error("The digits of an Engel expansion must form a non-decreasing sequence; consider increasing the wide of the integer type.");
|
||||
}
|
||||
// Watch out for saturating behavior:
|
||||
if (a_[i] == (std::numeric_limits<Z>::max)())
|
||||
if (a_[j] == (std::numeric_limits<Z>::max)())
|
||||
{
|
||||
throw std::domain_error("The integer type Z does not have enough width to hold the terms of the Engel expansion; please widen the type.");
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Expands to "This header is deprecated; use expr instead."
|
||||
#define BOOST_MATH_HEADER_DEPRECATED(expr) #prama message("This header is deprecated; use " expr " instead.")
|
||||
#define BOOST_MATH_HEADER_DEPRECATED(expr) __pragma("This header is deprecated; use " expr " instead.")
|
||||
#else // GNU, Clang, Intel, IBM, etc.
|
||||
// Expands to "This header is deprecated; use expr instead."
|
||||
#define BOOST_MATH_HEADER_DEPRECATED(expr) #warning "This header is deprecated; use " expr " instead."
|
||||
#define BOOST_MATH_HEADER_DEPRECATED(expr) _Pragma("This header is deprecated; use " expr " instead.")
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MATH_TOOLS_HEADER_DEPRECATED
|
||||
|
||||
@@ -29,17 +29,17 @@ public:
|
||||
throw std::domain_error("Cannot convert non-finites into a Luroth representation.");
|
||||
}
|
||||
d_.reserve(50);
|
||||
Real dn = floor(x);
|
||||
d_.push_back(static_cast<Z>(dn));
|
||||
if (dn == x)
|
||||
Real dn1 = floor(x);
|
||||
d_.push_back(static_cast<Z>(dn1));
|
||||
if (dn1 == x)
|
||||
{
|
||||
d_.shrink_to_fit();
|
||||
return;
|
||||
}
|
||||
// This attempts to follow the notation of:
|
||||
// "Khinchine's constant for Luroth Representation", by Sophia Kalpazidou.
|
||||
x = x - dn;
|
||||
Real computed = dn;
|
||||
x = x - dn1;
|
||||
Real computed = dn1;
|
||||
Real prod = 1;
|
||||
// Let the error bound grow by 1 ULP/iteration.
|
||||
// I haven't done the error analysis to show that this is an expected rate of error growth,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define BOOST_MATH_TOOLS_NORMS_HPP
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <complex>
|
||||
#include <cmath>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/tools/complex.hpp>
|
||||
|
||||
@@ -56,4 +56,4 @@ std::vector<T> generate_random_vector(std::size_t size, std::size_t seed)
|
||||
return v;
|
||||
}
|
||||
|
||||
}} // Namesapces
|
||||
}} // Namespaces
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <boost/math/tools/tuple.hpp>
|
||||
#include <boost/math/tools/fraction.hpp>
|
||||
#include <boost/math/tools/cxx03_warn.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace math {
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
#ifndef BOOST_MATH_TOOLS_SIMPLE_CONTINUED_FRACTION_HPP
|
||||
#define BOOST_MATH_TOOLS_SIMPLE_CONTINUED_FRACTION_HPP
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
#include <iomanip>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/core/demangle.hpp>
|
||||
|
||||
@@ -834,6 +834,9 @@ test-suite distribution_tests :
|
||||
[ run compile_test/dist_uniform_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/dist_weibull_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/distribution_concept_check.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/dist_arcsine_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/dist_inv_gaussian_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
|
||||
[ run test_legacy_nonfinite.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run test_basic_nonfinite.cpp ../../test/build//boost_unit_test_framework ]
|
||||
@@ -977,8 +980,15 @@ test-suite misc :
|
||||
[ run test_root_iterations.cpp pch ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_tuple ] ]
|
||||
[ run test_root_finding_concepts.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run test_toms748_solve.cpp pch ../../test/build//boost_unit_test_framework ]
|
||||
[ run compile_test/cubic_spline_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/barycentric_rational_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/interpolators_cubic_spline_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/interpolators_barycentric_rational_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_cubic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_makima_incl_test.cpp compile_test_main : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_pchip_incl_test.cpp compile_test_main : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_quintic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_septic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_vector_barycentric_rational_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_whittaker_shannon_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/compl_abs_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/compl_acos_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/compl_acosh_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
@@ -1039,6 +1049,12 @@ test-suite misc :
|
||||
[ run compile_test/sf_trunc_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_ulp_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_zeta_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/sf_chebyshev_incl_test.cpp ../config//fftw3 : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/sf_chebyshev_transform_incl_test.cpp ../config//fftw3 : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : <build>no ] ]
|
||||
[ run compile_test/sf_fibonacci_incl_test.cpp compile_test_main : : : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_gegenbauer_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_lambert_w_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/sf_nonfinite_num_facets_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/std_real_concept_check.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/std_real_concept_check.cpp : <define>EMULATE32 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] : std_real_concept_check_32 ]
|
||||
[ compile compile_test/std_real_concept_check.cpp : <define>EMULATE64 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] : std_real_concept_check_64 ]
|
||||
@@ -1050,6 +1066,11 @@ test-suite misc :
|
||||
[ run compile_test/cstdfloat_concept_check_2.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/cstdfloat_concept_check_3.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/cstdfloat_concept_check_4.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cstdfloat_cmath_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cstdfloat_complex_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cstdfloat_iostream_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cstdfloat_limits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cstdfloat_types_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run test_cstdfloat.cpp ../../test/build//boost_unit_test_framework : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_airy_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sf_hankel_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
@@ -1057,7 +1078,7 @@ test-suite misc :
|
||||
[ run compile_test/sf_owens_t_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/dist_skew_norm_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/constants_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/trapezoidal_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/quad_trapezoidal_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/test_traits.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_config_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_fraction_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
@@ -1074,10 +1095,36 @@ test-suite misc :
|
||||
[ compile compile_test/tools_test_data_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_test_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_toms748_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/cubic_spline_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/barycentric_rational_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_agm_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_assert_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_atomic_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_big_constant_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_centered_continued_fraction_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_cohen_acceleration_incl_test.cpp : [ requires cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_complex_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_condition_numbers_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_convert_from_string_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_cxx03_warn_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_engel_expansion_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_header_deprecated_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_is_detected_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_lexical_cast_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_luroth_expansion_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_mp_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_norms_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_polynomial_gcd_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_promotion_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_random_vector_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_simple_continued_fraction_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_test_value_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_throw_exception_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_traits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_ulps_plot_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tools_workaround_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_cubic_spline_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/interpolators_barycentric_rational_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/sf_legendre_stieltjes_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_defaulted_functions cxx11_lambdas ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/trapezoidal_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_trapezoidal_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run octonion_test.cpp
|
||||
../../test/build//boost_unit_test_framework ]
|
||||
[ run quaternion_constexpr_test.cpp ]
|
||||
@@ -1105,8 +1152,8 @@ test-suite interpolators :
|
||||
[ run agm_test.cpp : : : <toolset>msvc:<cxxflags>/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] ]
|
||||
[ run rsqrt_test.cpp : : : <toolset>msvc:<cxxflags>/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] ]
|
||||
[ run cohen_acceleration_test.cpp : : : <toolset>msvc:<cxxflags>/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] ]
|
||||
[ compile compile_test/daubechies_filters_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
|
||||
[ compile compile_test/daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
|
||||
[ compile compile_test/filters_daubechies_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
|
||||
[ compile compile_test/sf_daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
|
||||
[ run whittaker_shannon_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ]
|
||||
[ run cardinal_quadratic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ]
|
||||
[ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] ]
|
||||
@@ -1118,8 +1165,8 @@ test-suite interpolators :
|
||||
[ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : <define>TEST=1 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_1 ]
|
||||
[ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : <define>TEST=2 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_2 ]
|
||||
[ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : <define>TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ]
|
||||
[ run compile_test/catmull_rom_incl_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
|
||||
[ run compile_test/catmull_rom_concept_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
|
||||
[ run compile_test/interpolators_catmull_rom_incl_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
|
||||
[ run compile_test/interpolators_catmull_rom_concept_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ]
|
||||
[ run test_standalone_asserts.cpp ]
|
||||
;
|
||||
|
||||
@@ -1215,12 +1262,16 @@ test-suite quadrature :
|
||||
: : : release <define>TEST10 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ]
|
||||
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] : exp_sinh_quadrature_test_10 ]
|
||||
|
||||
[ run compile_test/exp_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/sinh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/tanh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/exp_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/sinh_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/tanh_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/quad_exp_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/quad_sinh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run compile_test/quad_tanh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_gauss_incl_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_gauss_kronrod_incl_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_ooura_fourier_integrals_incl_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_wavelet_transforms_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_exp_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_sinh_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ compile compile_test/quad_tanh_sinh_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
|
||||
[ run gauss_quadrature_test.cpp : : : <define>TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ]
|
||||
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release : gauss_quadrature_test_1 ]
|
||||
@@ -1337,7 +1388,7 @@ test-suite quadrature :
|
||||
<toolset>msvc:<cxxflags>/bigobj <define>TEST=23 [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ]
|
||||
<target-os>linux:<linkflags>"-pthread" : naive_monte_carlo_test_23
|
||||
]
|
||||
[ compile compile_test/naive_monte_carlo_incl_test.cpp ../../atomic/build//boost_atomic :
|
||||
[ compile compile_test/quad_naive_monte_carlo_incl_test.cpp ../../atomic/build//boost_atomic :
|
||||
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ]
|
||||
<target-os>linux:<linkflags>"-pthread" [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ]
|
||||
]
|
||||
@@ -1349,8 +1400,8 @@ test-suite quadrature :
|
||||
|
||||
test-suite autodiff :
|
||||
[ run test_numerical_differentiation.cpp ../../test/build//boost_unit_test_framework : : : <toolset>msvc:<cxxflags>/bigobj [ requires cxx11_auto_declarations cxx11_constexpr ] ]
|
||||
[ run compile_test/numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ]
|
||||
[ compile compile_test/numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ]
|
||||
[ run compile_test/diff_numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ]
|
||||
[ compile compile_test/diff_numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ]
|
||||
[ run test_autodiff_1.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ run test_autodiff_2.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ run test_autodiff_3.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
@@ -1359,7 +1410,9 @@ test-suite autodiff :
|
||||
[ run test_autodiff_6.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ run test_autodiff_7.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ run test_autodiff_8.cpp ../../test/build//boost_unit_test_framework : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ compile compile_test/autodiff_incl_test.cpp : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ compile compile_test/diff_autodiff_incl_test.cpp : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ compile compile_test/diff_finite_difference_incl_test.cpp : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
[ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj <debug-symbols>off <toolset>msvc:<cxxflags>/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_inline_namespaces ] ]
|
||||
;
|
||||
|
||||
#
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/bessel.hpp>
|
||||
// Basic sanity check that header <boost/math/constants/constants.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
92
test/compile_test/cstdfloat_cmath_incl_test.cpp
Normal file
92
test/compile_test/cstdfloat_cmath_incl_test.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/cstdfloat/cstdfloat_cmath.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
#ifdef BOOST_FLOAT128_C
|
||||
boost::float128_t f128 = 0;
|
||||
|
||||
check_result<boost::float128_t>(ldexp(f128, 0));
|
||||
check_result<boost::float128_t>(frexp(f128, 0));
|
||||
check_result<boost::float128_t>(std::fabs(f128));
|
||||
check_result<boost::float128_t>(std::abs(f128));
|
||||
check_result<boost::float128_t>(floor(f128));
|
||||
check_result<boost::float128_t>(ceil(f128));
|
||||
check_result<boost::float128_t>(sqrt(f128));
|
||||
check_result<boost::float128_t>(trunc(f128));
|
||||
check_result<boost::float128_t>(exp(f128));
|
||||
check_result<boost::float128_t>(expm1(f128));
|
||||
check_result<boost::float128_t>(pow(f128, 0));
|
||||
check_result<boost::float128_t>(log(f128));
|
||||
check_result<boost::float128_t>(log10(f128));
|
||||
check_result<boost::float128_t>(sin(f128));
|
||||
check_result<boost::float128_t>(cos(f128));
|
||||
check_result<boost::float128_t>(tan(f128));
|
||||
check_result<boost::float128_t>(asin(f128));
|
||||
check_result<boost::float128_t>(acos(f128));
|
||||
check_result<boost::float128_t>(atan(f128));
|
||||
check_result<boost::float128_t>(sinh(f128));
|
||||
check_result<boost::float128_t>(cosh(f128));
|
||||
check_result<boost::float128_t>(tanh(f128));
|
||||
check_result<boost::float128_t>(asinh(f128));
|
||||
check_result<boost::float128_t>(acosh(f128));
|
||||
check_result<boost::float128_t>(atanh(f128));
|
||||
check_result<boost::float128_t>(fmod(f128, f128));
|
||||
check_result<boost::float128_t>(atan2(f128, f128));
|
||||
check_result<boost::float128_t>(lgamma(f128));
|
||||
check_result<boost::float128_t>(tgamma(f128));
|
||||
check_result<boost::float128_t>(remainder(f128, f128));
|
||||
check_result<boost::float128_t>(remquo(f128, f128, 0));
|
||||
check_result<boost::float128_t>(fma(f128, f128, f128));
|
||||
check_result<boost::float128_t>(fmax(f128, f128));
|
||||
check_result<boost::float128_t>(fmin(f128, f128));
|
||||
check_result<boost::float128_t>(fdim(f128, f128));
|
||||
check_result<boost::float128_t>(nanq(0));
|
||||
check_result<boost::float128_t>(exp2(f128));
|
||||
check_result<boost::float128_t>(log2(f128));
|
||||
check_result<boost::float128_t>(log1p(f128));
|
||||
check_result<boost::float128_t>(cbrt(f128));
|
||||
check_result<boost::float128_t>(hypot(f128, f128));
|
||||
check_result<boost::float128_t>(erf(f128));
|
||||
check_result<boost::float128_t>(erfc(f128));
|
||||
check_result<boost::float128_t>(llround(f128));
|
||||
check_result<boost::float128_t>(lround(f128));
|
||||
check_result<boost::float128_t>(round(f128));
|
||||
check_result<boost::float128_t>(nearbyint(f128));
|
||||
check_result<boost::float128_t>(llrint(f128));
|
||||
check_result<boost::float128_t>(lrint(f128));
|
||||
check_result<boost::float128_t>(rint(f128));
|
||||
check_result<boost::float128_t>(modf(f128, nullptr));
|
||||
check_result<boost::float128_t>(scalbln(f128, 0));
|
||||
check_result<boost::float128_t>(scalbn(f128, 0));
|
||||
check_result<boost::float128_t>(ilogb(f128));
|
||||
check_result<boost::float128_t>(logb(f128));
|
||||
check_result<boost::float128_t>(nextafter(f128, f128));
|
||||
check_result<boost::float128_t>(nexttoward(f128, f128));
|
||||
check_result<boost::float128_t>(copysign(f128, f128));
|
||||
check_result<boost::float128_t>(std::signbit(f128));
|
||||
check_result<boost::float128_t>(std::fpclassify(f128));
|
||||
check_result<boost::float128_t>(std::isfinite(f128));
|
||||
check_result<boost::float128_t>(std::isinf(f128));
|
||||
check_result<boost::float128_t>(std::isnan(f128));
|
||||
check_result<boost::float128_t>(std::isnormal(f128));
|
||||
check_result<boost::float128_t>(std::isgreater(f128, f128));
|
||||
check_result<boost::float128_t>(std::isgreaterequal(f128, f128));
|
||||
check_result<boost::float128_t>(std::isless(f128, f128));
|
||||
check_result<boost::float128_t>(std::islessequal(f128, f128));
|
||||
check_result<boost::float128_t>(std::islessgreater(f128, f128));
|
||||
check_result<boost::float128_t>(std::isunordered(f128, f128));
|
||||
#endif // boost::float128_t
|
||||
}
|
||||
47
test/compile_test/cstdfloat_complex_incl_test.cpp
Normal file
47
test/compile_test/cstdfloat_complex_incl_test.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/cstdfloat/cstdfloat_complex.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
#ifdef BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE
|
||||
complex<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE> test(0);
|
||||
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(real(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(imag(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(abs(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(norm(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(conj(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(proj(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(polar(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(sqrt(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(sin(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(cos(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(tan(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(asin(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(acos(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(atan(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(exp(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(log(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(log10(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(pow(test, 0));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(sinh(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(cosh(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(tanh(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(asinh(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(acosh(test));
|
||||
check_result<BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE>(atanh(test));
|
||||
|
||||
#endif // BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE
|
||||
}
|
||||
9
test/compile_test/cstdfloat_iostream_incl_test.cpp
Normal file
9
test/compile_test/cstdfloat_iostream_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/cstdfloat/cstdfloat_iostream.hpp>
|
||||
51
test/compile_test/cstdfloat_limits_incl_test.cpp
Normal file
51
test/compile_test/cstdfloat_limits_incl_test.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/cstdfloat/cstdfloat_limits.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
#ifdef BOOST_FLOAT128_C
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_specialized);
|
||||
check_result<boost::float128_t>((std::numeric_limits<boost::float128_t>::min)());
|
||||
check_result<boost::float128_t>((std::numeric_limits<boost::float128_t>::max)());
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::lowest());
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::digits);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::digits10);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::max_digits10);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_signed);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_integer);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_exact);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::radix);
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::epsilon());
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::min_exponent);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::min_exponent10);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::max_exponent);
|
||||
check_result<int>(std::numeric_limits<boost::float128_t>::max_exponent10);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::has_infinity);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::has_quiet_NaN);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::has_signaling_NaN);
|
||||
check_result<std::float_denorm_style>(std::numeric_limits<boost::float128_t>::has_denorm);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::has_denorm_loss);
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::infinity());
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::quiet_NaN());
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::signaling_NaN());
|
||||
check_result<boost::float128_t>(std::numeric_limits<boost::float128_t>::denorm_min());
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_iec559);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_bounded);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::is_modulo);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::traps);
|
||||
check_result<bool>(std::numeric_limits<boost::float128_t>::tinyness_before);
|
||||
check_result<std::float_round_style>(std::numeric_limits<boost::float128_t>::round_style);
|
||||
#endif
|
||||
}
|
||||
9
test/compile_test/cstdfloat_types_incl_test.cpp
Normal file
9
test/compile_test/cstdfloat_types_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/cstdfloat/cstdfloat_types.hpp>
|
||||
29
test/compile_test/diff_finite_difference_incl_test.cpp
Normal file
29
test/compile_test/diff_finite_difference_incl_test.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
#include <boost/math/differentiation/finite_difference.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::differentiation::finite_difference_derivative([](float x){return x;}, f));
|
||||
check_result<double>(boost::math::differentiation::finite_difference_derivative([](double x){return x;}, d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::differentiation::finite_difference_derivative([](long double x){return x;}, static_cast<long double>(0)));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::differentiation::complex_step_derivative([](std::complex<float> x){return x;}, f));
|
||||
check_result<double>(boost::math::differentiation::complex_step_derivative([](std::complex<double> x){return x;}, d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::differentiation::complex_step_derivative([](std::complex<long double> x){return x;},
|
||||
static_cast<long double>(0)));
|
||||
#endif
|
||||
}
|
||||
30
test/compile_test/diff_lanczos_smoothing_incl_test.cpp
Normal file
30
test/compile_test/diff_lanczos_smoothing_incl_test.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
#include <boost/math/differentiation/lanczos_smoothing.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
float f_temp;
|
||||
boost::math::differentiation::discrete_lanczos_derivative f_lanczos(f_temp);
|
||||
check_result<float>(f_lanczos.get_spacing());
|
||||
|
||||
double d_temp;
|
||||
boost::math::differentiation::discrete_lanczos_derivative d_lanczos(d_temp);
|
||||
check_result<double>(d_lanczos.get_spacing());
|
||||
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
long double ld_temp;
|
||||
boost::math::differentiation::discrete_lanczos_derivative ld_lanczos(ld_temp);
|
||||
check_result<long double>(ld_lanczos.get_spacing());
|
||||
#endif
|
||||
}
|
||||
25
test/compile_test/dist_arcsine_incl_test.cpp
Normal file
25
test/compile_test/dist_arcsine_incl_test.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/distributions/arcsine.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/distributions/arcsine.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
TEST_DIST_FUNC(arcsine)
|
||||
}
|
||||
|
||||
template class boost::math::arcsine_distribution<float, boost::math::policies::policy<> >;
|
||||
template class boost::math::arcsine_distribution<double, boost::math::policies::policy<> >;
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
template class boost::math::arcsine_distribution<long double, boost::math::policies::policy<> >;
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/distributions/empirical_cumulative_distribution_function.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
boost::math::empirical_cumulative_distribution_function<float[]> f_test(float[]);
|
||||
boost::math::empirical_cumulative_distribution_function<double[]> d_test(double[]);
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
boost::math::empirical_cumulative_distribution_function<long double[]> d_test(long double[]);
|
||||
#endif
|
||||
}
|
||||
25
test/compile_test/dist_geometric_incl_test.cpp
Normal file
25
test/compile_test/dist_geometric_incl_test.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/distributions/geometric.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/distributions/geometric.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
TEST_DIST_FUNC(geometric)
|
||||
}
|
||||
|
||||
template class boost::math::geometric_distribution<float, boost::math::policies::policy<> >;
|
||||
template class boost::math::geometric_distribution<double, boost::math::policies::policy<> >;
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
template class boost::math::geometric_distribution<long double, boost::math::policies::policy<> >;
|
||||
#endif
|
||||
25
test/compile_test/dist_inv_gaussian_incl_test.cpp
Normal file
25
test/compile_test/dist_inv_gaussian_incl_test.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/distributions/inverse_gaussian.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/distributions/inverse_gaussian.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
TEST_DIST_FUNC(inverse_gaussian)
|
||||
}
|
||||
|
||||
template class boost::math::inverse_gaussian_distribution<float, boost::math::policies::policy<> >;
|
||||
template class boost::math::inverse_gaussian_distribution<double, boost::math::policies::policy<> >;
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
template class boost::math::inverse_gaussian_distribution<long double, boost::math::policies::policy<> >;
|
||||
#endif
|
||||
@@ -13,7 +13,7 @@ void compile_and_link_test()
|
||||
{
|
||||
boost::math::concepts::std_real_concept x[] = { 1, 2, 3 };
|
||||
boost::math::concepts::std_real_concept y[] = { 13, 15, 17 };
|
||||
boost::math::barycentric_rational<boost::math::concepts::std_real_concept> s(x, y, 3, 3);
|
||||
boost::math::interpolators::barycentric_rational<boost::math::concepts::std_real_concept> s(x, y, 3, 3);
|
||||
s(1.0);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ void compile_and_link_test()
|
||||
{
|
||||
double data[] = { 1, 2, 3 };
|
||||
double y[] = { 34, 56, 67 };
|
||||
boost::math::barycentric_rational<double> s(data, y, 3, 2);
|
||||
boost::math::interpolators::barycentric_rational<double> s(data, y, 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
25
test/compile_test/interpolators_cardinal_trig_incl_test.cpp
Normal file
25
test/compile_test/interpolators_cardinal_trig_incl_test.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/cardinal_trigonometric.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data = { 1, 2, 3 };
|
||||
boost::math::interpolators::cardinal_trigonometric<std::vector<double>> s(data, 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
26
test/compile_test/interpolators_cubic_hermite_incl_test.cpp
Normal file
26
test/compile_test/interpolators_cubic_hermite_incl_test.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/cubic_hermite.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data = { 1, 2, 3 };
|
||||
std::vector<double> data_dx = {1, 2, 3};
|
||||
boost::math::interpolators::cardinal_cubic_hermite<std::vector<double>> s(std::move(data), std::move(data_dx), 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
26
test/compile_test/interpolators_makima_incl_test.cpp
Normal file
26
test/compile_test/interpolators_makima_incl_test.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/makima.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data_x = { 1, 2, 3 };
|
||||
std::vector<double> data_y = {1, 2, 3};
|
||||
boost::math::interpolators::makima<std::vector<double>> s(std::move(data_x), std::move(data_y), 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
26
test/compile_test/interpolators_pchip_incl_test.cpp
Normal file
26
test/compile_test/interpolators_pchip_incl_test.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/pchip.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data_x = { 1, 2, 3 };
|
||||
std::vector<double> data_y = {1, 2, 3};
|
||||
boost::math::interpolators::pchip<std::vector<double>> s(std::move(data_x), std::move(data_y), 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/quintic_hermite.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data = { 1, 2, 3 };
|
||||
std::vector<double> data_1st_deriv = {1, 2, 3};
|
||||
std::vector<double> data_2nd_deriv = {1, 2, 3};
|
||||
boost::math::interpolators::cardinal_quintic_hermite<std::vector<double>> s(std::move(data), std::move(data_1st_deriv),
|
||||
std::move(data_2nd_deriv), 1.0, 1.0);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
29
test/compile_test/interpolators_septic_hermite_incl_test.cpp
Normal file
29
test/compile_test/interpolators_septic_hermite_incl_test.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/septic_hermite.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data = { 1, 2, 3 };
|
||||
std::vector<double> data_1st_deriv = {1, 2, 3};
|
||||
std::vector<double> data_2nd_deriv = {1, 2, 3};
|
||||
std::vector<double> data_3rd_deriv = {1, 2, 3};
|
||||
boost::math::interpolators::cardinal_septic_hermite<std::vector<double>> s(std::move(data), std::move(data_1st_deriv),
|
||||
std::move(data_2nd_deriv), std::move(data_3rd_deriv), 1.0, 1.0);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/vector_barycentric_rational.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> time = { 1, 2, 3 };
|
||||
std::vector<std::vector<double>> space = {{1}, {2}, {3}};
|
||||
boost::math::interpolators::vector_barycentric_rational<decltype(time), decltype(space)> s(std::move(time), std::move(space));
|
||||
|
||||
check_result<std::vector<double>>(s(1.0));
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// A sanity check that this file
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/interpolators/whittaker_shannon.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
//
|
||||
// This test includes <vector> becasue many of the interpolators are not compatible with pointers/c-style arrays
|
||||
//
|
||||
#include <vector>
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
std::vector<double> data_y = {1, 2, 3};
|
||||
boost::math::interpolators::whittaker_shannon<std::vector<double>> s(std::move(data_y), 3, 2);
|
||||
check_result<double>(s(1.0));
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/gamma.hpp>
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/exp_sinh.hpp>
|
||||
21
test/compile_test/quad_gauss_incl_test.cpp
Normal file
21
test/compile_test/quad_gauss_incl_test.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/gauss.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
boost::math::quadrature::gauss<double, 1> integrator;
|
||||
check_result<double>(integrator.integrate(f));
|
||||
}
|
||||
21
test/compile_test/quad_gauss_kronrod_incl_test.cpp
Normal file
21
test/compile_test/quad_gauss_kronrod_incl_test.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/gauss_kronrod.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
boost::math::quadrature::gauss<double, 1> integrator;
|
||||
check_result<double>(integrator.integrate(f));
|
||||
}
|
||||
25
test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp
Normal file
25
test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/ooura_fourier_integrals.hpp>
|
||||
#ifndef _MSC_VER
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
boost::math::quadrature::ooura_fourier_sin<double> sin_integrator;
|
||||
boost::math::quadrature::ooura_fourier_cos<double> cos_integrator;
|
||||
check_result<double>(sin_integrator.integrate(f, 1.0));
|
||||
check_result<double>(cos_integrator.integrate(f, 1.0));
|
||||
}
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/gamma.hpp>
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/sinh_sinh.hpp>
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return 1/(1+x*x); };
|
||||
auto f = [](double x) { return x; };
|
||||
boost::math::quadrature::sinh_sinh<double> integrator;
|
||||
check_result<double>(integrator.integrate(f));
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/gamma.hpp>
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/tanh_sinh.hpp>
|
||||
@@ -16,8 +16,6 @@
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
double a = 0;
|
||||
double b = 1;
|
||||
boost::math::quadrature::tanh_sinh<double> integrator;
|
||||
check_result<double>(integrator.integrate(f, a, b));
|
||||
check_result<double>(integrator.integrate(f));
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/gamma.hpp>
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/trapezoidal.hpp>
|
||||
22
test/compile_test/quad_wavelet_transforms_incl_test.cpp
Normal file
22
test/compile_test/quad_wavelet_transforms_incl_test.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/quadrature/wavelet_transforms.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
auto psi = boost::math::daubechies_wavelet<double, 1>();
|
||||
auto Wf = boost::math::quadrature::daubechies_wavelet_transform(f, psi);
|
||||
check_result<double>(Wf(0.0, 0.0));
|
||||
}
|
||||
22
test/compile_test/sf_chebyshev_incl_test.cpp
Normal file
22
test/compile_test/sf_chebyshev_incl_test.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/chebyshev.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/chebyshev.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
double x {2.0};
|
||||
check_result<double>(boost::math::chebyshev_t(0, x));
|
||||
check_result<double>(boost::math::chebyshev_u(0, x));
|
||||
check_result<double>(boost::math::chebyshev_t_prime(0, x));
|
||||
}
|
||||
21
test/compile_test/sf_chebyshev_transform_incl_test.cpp
Normal file
21
test/compile_test/sf_chebyshev_transform_incl_test.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright Matt Borland 2021
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/chebyshev_transform.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/chebyshev_transform.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f = [](double x) { return x; };
|
||||
boost::math::chebyshev_transform<double> test(f, 0.0, 1.0);
|
||||
check_result<double>(test(1.0));
|
||||
}
|
||||
29
test/compile_test/sf_fibonacci_incl_test.cpp
Normal file
29
test/compile_test/sf_fibonacci_incl_test.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/fibonacci.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/fibonacci.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::fibonacci<float>(f));
|
||||
check_result<double>(boost::math::fibonacci<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::fibonacci<long double>(l));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::unchecked_fibonacci<float>(f));
|
||||
check_result<double>(boost::math::unchecked_fibonacci<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::unchecked_fibonacci<long double>(l));
|
||||
#endif
|
||||
}
|
||||
35
test/compile_test/sf_gegenbauer_incl_test.cpp
Normal file
35
test/compile_test/sf_gegenbauer_incl_test.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/gegenbauer.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/gegenbauer.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::gegenbauer<float>(1, f, f));
|
||||
check_result<double>(boost::math::gegenbauer<double>(1, d, d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::gegenbauer<long double>(1, l, l));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::gegenbauer_derivative<float>(1, f, f, 1));
|
||||
check_result<double>(boost::math::gegenbauer_derivative<double>(1, d, d, 1));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::gegenbauer_derivative<long double>(1, l, l, 1));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::gegenbauer_prime<float>(1, f, f));
|
||||
check_result<double>(boost::math::gegenbauer_prime<double>(1, d, d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::gegenbauer_prime<long double>(1, l, l));
|
||||
#endif
|
||||
}
|
||||
41
test/compile_test/sf_lambert_w_incl_test.cpp
Normal file
41
test/compile_test/sf_lambert_w_incl_test.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/lambert_w.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/lambert_w.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::lambert_w0<float>(f));
|
||||
check_result<double>(boost::math::lambert_w0<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::lambert_w0<long double>(l));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::lambert_w0_prime<float>(f));
|
||||
check_result<double>(boost::math::lambert_w0_prime<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::lambert_w0_prime<long double>(l));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::lambert_wm1<float>(f));
|
||||
check_result<double>(boost::math::lambert_wm1<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::lambert_wm1<long double>(l));
|
||||
#endif
|
||||
|
||||
check_result<float>(boost::math::lambert_wm1_prime<float>(f));
|
||||
check_result<double>(boost::math::lambert_wm1_prime<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::lambert_wm1_prime<long double>(l));
|
||||
#endif
|
||||
}
|
||||
9
test/compile_test/sf_nonfinite_num_facets_incl_test.cpp
Normal file
9
test/compile_test/sf_nonfinite_num_facets_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/nonfinite_num_facets.hpp>
|
||||
23
test/compile_test/sf_rsqrt_incl_test.cpp
Normal file
23
test/compile_test/sf_rsqrt_incl_test.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/rsqrt.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/rsqrt.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<int>(boost::math::rsqrt<float>(f));
|
||||
check_result<int>(boost::math::rsqrt<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<int>(boost::math::rsqrt<long double>(l));
|
||||
#endif
|
||||
}
|
||||
23
test/compile_test/sf_trigamma_incl_test.cpp
Normal file
23
test/compile_test/sf_trigamma_incl_test.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header <boost/math/special_functions/trigamma.hpp>
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/special_functions/trigamma.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::trigamma<float>(f));
|
||||
check_result<double>(boost::math::trigamma<double>(d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::trigamma<long double>(l));
|
||||
#endif
|
||||
}
|
||||
23
test/compile_test/tools_agm_incl_test.cpp
Normal file
23
test/compile_test/tools_agm_incl_test.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/agm.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
check_result<float>(boost::math::tools::agm<float>(f, f));
|
||||
check_result<double>(boost::math::tools::agm<double>(d, d));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::tools::agm<long double>(l, l));
|
||||
#endif
|
||||
}
|
||||
9
test/compile_test/tools_assert_incl_test.cpp
Normal file
9
test/compile_test/tools_assert_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
9
test/compile_test/tools_atomic_incl_test.cpp
Normal file
9
test/compile_test/tools_atomic_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/atomic.hpp>
|
||||
11
test/compile_test/tools_big_constant_incl_test.cpp
Normal file
11
test/compile_test/tools_big_constant_incl_test.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/math/tools/big_constant.hpp>
|
||||
#endif
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright Matt Borland 2021
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/centered_continued_fraction.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
boost::math::tools::centered_continued_fraction f_test(f);
|
||||
check_result<float>(f_test.khinchin_geometric_mean());
|
||||
|
||||
boost::math::tools::centered_continued_fraction test(0.0);
|
||||
check_result<double>(test.khinchin_geometric_mean());
|
||||
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
boost::math::tools::centered_continued_fraction ld_test(static_cast<long double>(0));
|
||||
check_result<long double>(ld_test.khinchin_geometric_mean());
|
||||
#endif
|
||||
}
|
||||
43
test/compile_test/tools_cohen_acceleration_incl_test.cpp
Normal file
43
test/compile_test/tools_cohen_acceleration_incl_test.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/cohen_acceleration.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
template<typename Real>
|
||||
class G {
|
||||
public:
|
||||
G(){
|
||||
k_ = 0;
|
||||
}
|
||||
|
||||
Real operator()() {
|
||||
k_ += 1;
|
||||
return 1/(k_*k_);
|
||||
}
|
||||
|
||||
private:
|
||||
Real k_;
|
||||
};
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
auto f_g = G<float>();
|
||||
check_result<float>(boost::math::tools::cohen_acceleration(f_g));
|
||||
|
||||
auto d_g = G<double>();
|
||||
check_result<double>(boost::math::tools::cohen_acceleration(d_g));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
auto ld_g = G<long double>();
|
||||
check_result<long double>(boost::math::tools::cohen_acceleration(ld_g));
|
||||
#endif
|
||||
}
|
||||
9
test/compile_test/tools_complex_incl_test.cpp
Normal file
9
test/compile_test/tools_complex_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/complex.hpp>
|
||||
28
test/compile_test/tools_condition_numbers_incl_test.cpp
Normal file
28
test/compile_test/tools_condition_numbers_incl_test.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/condition_numbers.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
boost::math::tools::summation_condition_number f_test(f);
|
||||
check_result<float>(f_test());
|
||||
|
||||
boost::math::tools::summation_condition_number test(0.0);
|
||||
check_result<double>(test());
|
||||
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
boost::math::tools::summation_condition_number ld_test(static_cast<long double>(0));
|
||||
check_result<long double>(ld_test());
|
||||
#endif
|
||||
}
|
||||
28
test/compile_test/tools_convert_from_string_incl_test.cpp
Normal file
28
test/compile_test/tools_convert_from_string_incl_test.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/math/tools/convert_from_string.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
const char* val_c_str = "0.0";
|
||||
|
||||
check_result<float>(boost::math::tools::convert_from_string<float>(val_c_str));
|
||||
check_result<double>(boost::math::tools::convert_from_string<double>(val_c_str));
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
check_result<long double>(boost::math::tools::convert_from_string<long double>(val_c_str));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
9
test/compile_test/tools_cxx03_warn_incl_test.cpp
Normal file
9
test/compile_test/tools_cxx03_warn_incl_test.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/cxx03_warn.hpp>
|
||||
28
test/compile_test/tools_engel_expansion_incl_test.cpp
Normal file
28
test/compile_test/tools_engel_expansion_incl_test.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Basic sanity check that header
|
||||
// #includes all the files that it needs to.
|
||||
//
|
||||
#include <boost/math/tools/engel_expansion.hpp>
|
||||
//
|
||||
// Note this header includes no other headers, this is
|
||||
// important if this test is to be meaningful:
|
||||
//
|
||||
#include "test_compile_result.hpp"
|
||||
|
||||
void compile_and_link_test()
|
||||
{
|
||||
boost::math::tools::engel_expansion<float> f_test(1.0f);
|
||||
check_result<int64_t>(f_test.digits().front());
|
||||
|
||||
boost::math::tools::engel_expansion<double> d_test(1.0);
|
||||
check_result<int64_t>(d_test.digits().front());
|
||||
|
||||
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
boost::math::tools::engel_expansion<long double> ld_test(1.0l);
|
||||
check_result<int64_t>(ld_test.digits().front());
|
||||
#endif
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user