2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Consolidate constexp constant tests into single section. Remove unused typedef from Lambert-W integral tests. Update README.md with CI status. [CI SKIP]

This commit is contained in:
Nick Thompson
2018-10-30 13:38:31 -06:00
parent c0e93a9817
commit ea0128205e
6 changed files with 21 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
Boost Math Library
Boost Math Library [![Build Status](https://travis-ci.org/boostorg/math.svg?branch=develop)](https://travis-ci.org/boostorg/math)
==================
This library is divided into several interconnected parts:
@@ -57,7 +57,7 @@ The integration routines are usable for functions returning complex results - an
### Quaternions and Octonions
Quaternion and Octonians as class templates similar to std::complex.
Quaternion and Octonians as class templates similar to std::complex.
The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/math).
@@ -74,18 +74,19 @@ There is no mailing-list specific to Boost Math, although you can use the genera
## Development ##
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
git clone https://github.com/boostorg/boost
cd boost
git submodule update --init
The Boost Math Library is located in `libs/math/`.
The Boost Math Library is located in `libs/math/`.
### Running tests ###
First, make sure you are in `libs/math/test`.
First, make sure you are in `libs/math/test`.
You can either run all the tests listed in `Jamfile.v2` or run a single test:
../../../b2 <- run all tests
../../../b2 static_assert_test <- single test
test$ ../../../b2 <- run all tests
test$ ../../../b2 static_assert_test <- single test
test$ # A more advanced syntax, demoing various options for building the tests:
test$ ../../../b2 -a -j2 -q --reconfigure toolset=clang cxxflags="--std=c++14 -fsanitize=address -fsanitize=undefined" linkflags="-fsanitize=undefined -fsanitize=address"

View File

@@ -52,17 +52,6 @@ BOOST_STATIC_ASSERT((boost::is_same<boost::math::constants::construction_traits<
BOOST_STATIC_ASSERT((boost::is_same<boost::math::constants::construction_traits<boost::math::concepts::real_concept, real_concept_policy_2 >::type, boost::mpl::int_<boost::math::constants::construct_from_string> >::value));
BOOST_STATIC_ASSERT((boost::math::constants::construction_traits<boost::math::concepts::real_concept, real_concept_policy_3>::type::value >= 5));
#ifndef BOOST_NO_CXX11_CONSTEXPR
constexpr float fval = boost::math::constants::pi<float>();
constexpr double dval = boost::math::constants::pi<double>();
constexpr long double ldval = boost::math::constants::pi<long double>();
constexpr float fval2 = boost::math::float_constants::pi;
constexpr double dval2 = boost::math::double_constants::pi;
constexpr long double ldval2 = boost::math::long_double_constants::pi;
#endif
// We need to declare a conceptual type whose precision is unknown at
// compile time, and is so enormous when checked at runtime,
@@ -198,7 +187,7 @@ void test_spots(RealType)
// Euler
BOOST_CHECK_CLOSE_FRACTION(2.71828182845904523536028747135266249775724709369995L, e<RealType>(), tolerance);
//BOOST_CHECK_CLOSE_FRACTION(exp(-0.5L), exp_minus_half<RealType>(), tolerance); // See above.
BOOST_CHECK_CLOSE_FRACTION(exp(-1.L), exp_minus_one<RealType>(), tolerance);
BOOST_CHECK_CLOSE_FRACTION(exp(-1.L), exp_minus_one<RealType>(), tolerance);
BOOST_CHECK_CLOSE_FRACTION(pow(e<RealType>(), pi<RealType>()), e_pow_pi<RealType>(), tolerance); // See also above.
BOOST_CHECK_CLOSE_FRACTION(sqrt(e<RealType>()), root_e<RealType>(), tolerance);
BOOST_CHECK_CLOSE_FRACTION(log10(e<RealType>()), log10_e<RealType>(), tolerance);
@@ -767,9 +756,15 @@ void test_constexpr()
constexpr float f1 = boost::math::constants::pi<float>();
constexpr double f2 = boost::math::constants::pi<double>();
constexpr long double f3 = boost::math::constants::pi<long double>();
constexpr float fval2 = boost::math::float_constants::pi;
constexpr double dval2 = boost::math::double_constants::pi;
constexpr long double ldval2 = boost::math::long_double_constants::pi;
(void)f1;
(void)f2;
(void)f3;
(void) fval2;
(void) dval2;
(voide) ldval2;
#ifdef BOOST_MATH_USE_FLOAT128
constexpr __float128 f4 = boost::math::constants::pi<__float128>();
(void)f4;
@@ -834,4 +829,3 @@ test_constants.cpp
*** No errors detected
*/

View File

@@ -189,12 +189,12 @@ BOOST_AUTO_TEST_CASE( integrals )
using boost::math::policies::ignore_error;
using boost::math::policies::throw_on_error;
/*
typedef policy<
domain_error<throw_on_error>,
overflow_error<ignore_error>
> no_throw_policy;
/*
// Experiment with better diagnostics.
typedef float Real;

View File

@@ -189,12 +189,13 @@ BOOST_AUTO_TEST_CASE( integrals )
using boost::math::policies::ignore_error;
using boost::math::policies::throw_on_error;
/*
typedef policy<
domain_error<throw_on_error>,
overflow_error<ignore_error>
> no_throw_policy;
/*
// Experiment with better diagnostics.
typedef float Real;

View File

@@ -189,12 +189,12 @@ BOOST_AUTO_TEST_CASE( integrals )
using boost::math::policies::ignore_error;
using boost::math::policies::throw_on_error;
/*
typedef policy<
domain_error<throw_on_error>,
overflow_error<ignore_error>
> no_throw_policy;
/*
// Experiment with better diagnostics.
typedef float Real;

View File

@@ -192,12 +192,12 @@ BOOST_AUTO_TEST_CASE( integrals )
using boost::math::policies::ignore_error;
using boost::math::policies::throw_on_error;
/*
typedef policy<
domain_error<throw_on_error>,
overflow_error<ignore_error>
> no_throw_policy;
/*
// Experiment with better diagnostics.
typedef float Real;