Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74890 - in trunk/boost/math: constants special_functions tools
From: john_at_[hidden]
Date: 2011-10-10 07:52:06


Author: johnmaddock
Date: 2011-10-10 07:52:05 EDT (Mon, 10 Oct 2011)
New Revision: 74890
URL: http://svn.boost.org/trac/boost/changeset/74890

Log:
Remove unused constants.
Fix expression for tolerance in eps_tolerance.
Add include guards to prime.hpp.
Fixes #5982.
Fixes #5927.
Fixes #6001.
Text files modified:
   trunk/boost/math/constants/constants.hpp | 5 +----
   trunk/boost/math/special_functions/prime.hpp | 5 +++++
   trunk/boost/math/tools/toms748_solve.hpp | 2 +-
   3 files changed, 7 insertions(+), 5 deletions(-)

Modified: trunk/boost/math/constants/constants.hpp
==============================================================================
--- trunk/boost/math/constants/constants.hpp (original)
+++ trunk/boost/math/constants/constants.hpp 2011-10-10 07:52:05 EDT (Mon, 10 Oct 2011)
@@ -69,12 +69,9 @@
   BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 0.85840734641020676153735661672049711580283060062489417902505540769218359, 0, 0)
   BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 0.79531676737159754434839533505680658072763917332771320544530223438582161, 0, 0)
   BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 0.6065306597126334236037995349911804534419181354871869556828921587350565194137, 484239986476115079894560, 0)
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 0.70710678118654752440084436210484903928483593756084, 0, 0)
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 0.39894228040143267793994605993438186847585863095671, 0, 0)
-
-
   } // namespace constants
 } // namespace math
 } // namespace boost
 
 #endif // BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
+

Modified: trunk/boost/math/special_functions/prime.hpp
==============================================================================
--- trunk/boost/math/special_functions/prime.hpp (original)
+++ trunk/boost/math/special_functions/prime.hpp 2011-10-10 07:52:05 EDT (Mon, 10 Oct 2011)
@@ -5,6 +5,9 @@
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#ifndef BOOST_MATH_SF_PRIME_HPP
+#define BOOST_MATH_SF_PRIME_HPP
+
 #include <boost/array.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/math/policies/error_handling.hpp>
@@ -1212,3 +1215,5 @@
    static const unsigned max_prime = 10000;
 
 }} // namespace boost and math
+
+#endif // BOOST_MATH_SF_PRIME_HPP

Modified: trunk/boost/math/tools/toms748_solve.hpp
==============================================================================
--- trunk/boost/math/tools/toms748_solve.hpp (original)
+++ trunk/boost/math/tools/toms748_solve.hpp 2011-10-10 07:52:05 EDT (Mon, 10 Oct 2011)
@@ -31,7 +31,7 @@
    bool operator()(const T& a, const T& b)
    {
       BOOST_MATH_STD_USING
- return (fabs(a - b) / (std::min)(fabs(a), fabs(b))) <= eps;
+ return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b)));
    }
 private:
    T eps;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk