diff --git a/README.md b/README.md index 102f57c25..6442b07d4 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/test/test_constants.cpp b/test/test_constants.cpp index 3eb2fc1fc..284bdaac5 100644 --- a/test/test_constants.cpp +++ b/test/test_constants.cpp @@ -52,17 +52,6 @@ BOOST_STATIC_ASSERT((boost::is_same::type, boost::mpl::int_ >::value)); BOOST_STATIC_ASSERT((boost::math::constants::construction_traits::type::value >= 5)); -#ifndef BOOST_NO_CXX11_CONSTEXPR - -constexpr float fval = boost::math::constants::pi(); -constexpr double dval = boost::math::constants::pi(); -constexpr long double ldval = boost::math::constants::pi(); - -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(), tolerance); //BOOST_CHECK_CLOSE_FRACTION(exp(-0.5L), exp_minus_half(), tolerance); // See above. - BOOST_CHECK_CLOSE_FRACTION(exp(-1.L), exp_minus_one(), tolerance); + BOOST_CHECK_CLOSE_FRACTION(exp(-1.L), exp_minus_one(), tolerance); BOOST_CHECK_CLOSE_FRACTION(pow(e(), pi()), e_pow_pi(), tolerance); // See also above. BOOST_CHECK_CLOSE_FRACTION(sqrt(e()), root_e(), tolerance); BOOST_CHECK_CLOSE_FRACTION(log10(e()), log10_e(), tolerance); @@ -767,9 +756,15 @@ void test_constexpr() constexpr float f1 = boost::math::constants::pi(); constexpr double f2 = boost::math::constants::pi(); constexpr long double f3 = boost::math::constants::pi(); + 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 */ - diff --git a/test/test_lambert_w_integrals_double.cpp b/test/test_lambert_w_integrals_double.cpp index c286d4b94..4d27d5d10 100644 --- a/test/test_lambert_w_integrals_double.cpp +++ b/test/test_lambert_w_integrals_double.cpp @@ -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, overflow_error > no_throw_policy; - /* // Experiment with better diagnostics. typedef float Real; diff --git a/test/test_lambert_w_integrals_float.cpp b/test/test_lambert_w_integrals_float.cpp index c7a80a1f7..58ceb8efa 100644 --- a/test/test_lambert_w_integrals_float.cpp +++ b/test/test_lambert_w_integrals_float.cpp @@ -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, overflow_error > no_throw_policy; - /* // Experiment with better diagnostics. typedef float Real; diff --git a/test/test_lambert_w_integrals_long_double.cpp b/test/test_lambert_w_integrals_long_double.cpp index 180fb330f..2442bc47c 100644 --- a/test/test_lambert_w_integrals_long_double.cpp +++ b/test/test_lambert_w_integrals_long_double.cpp @@ -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, overflow_error > no_throw_policy; - /* // Experiment with better diagnostics. typedef float Real; diff --git a/test/test_lambert_w_integrals_quad.cpp b/test/test_lambert_w_integrals_quad.cpp index 907b43cff..7e7fe08d2 100644 --- a/test/test_lambert_w_integrals_quad.cpp +++ b/test/test_lambert_w_integrals_quad.cpp @@ -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, overflow_error > no_throw_policy; - /* // Experiment with better diagnostics. typedef float Real;