Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83356 - in trunk: boost/math/constants boost/math/policies boost/math/tools libs/math/test
From: john_at_[hidden]
Date: 2013-03-08 06:33:06


Author: johnmaddock
Date: 2013-03-08 06:33:04 EST (Fri, 08 Mar 2013)
New Revision: 83356
URL: http://svn.boost.org/trac/boost/changeset/83356

Log:
Remove dependency on quadmath.h.
Fixes #8265.
Text files modified:
   trunk/boost/math/constants/constants.hpp | 2 +-
   trunk/boost/math/policies/policy.hpp | 2 +-
   trunk/boost/math/tools/config.hpp | 1 -
   trunk/libs/math/test/test_constants.cpp | 4 +++-
   4 files changed, 5 insertions(+), 4 deletions(-)

Modified: trunk/boost/math/constants/constants.hpp
==============================================================================
--- trunk/boost/math/constants/constants.hpp (original)
+++ trunk/boost/math/constants/constants.hpp 2013-03-08 06:33:04 EST (Fri, 08 Mar 2013)
@@ -68,7 +68,7 @@
       typedef typename policies::precision<double, Policy>::type t3;
       typedef typename policies::precision<long double, Policy>::type t4;
 #ifdef BOOST_MATH_USE_FLOAT128
- typedef mpl::int_<FLT128_MANT_DIG> t5;
+ typedef mpl::int_<113> t5;
 #endif
    public:
       typedef typename mpl::if_<

Modified: trunk/boost/math/policies/policy.hpp
==============================================================================
--- trunk/boost/math/policies/policy.hpp (original)
+++ trunk/boost/math/policies/policy.hpp 2013-03-08 06:33:04 EST (Fri, 08 Mar 2013)
@@ -818,7 +818,7 @@
 template <class Policy>
 struct precision<__float128, Policy>
 {
- typedef mpl::int_<FLT128_MANT_DIG> type;
+ typedef mpl::int_<113> type;
 };
 
 #endif

Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp (original)
+++ trunk/boost/math/tools/config.hpp 2013-03-08 06:33:04 EST (Fri, 08 Mar 2013)
@@ -212,7 +212,6 @@
 //
 #ifdef _GLIBCXX_USE_FLOAT128
 # define BOOST_MATH_USE_FLOAT128
-#include <quadmath.h>
 #endif
 
 //

Modified: trunk/libs/math/test/test_constants.cpp
==============================================================================
--- trunk/libs/math/test/test_constants.cpp (original)
+++ trunk/libs/math/test/test_constants.cpp 2013-03-08 06:33:04 EST (Fri, 08 Mar 2013)
@@ -759,12 +759,14 @@
 #ifdef BOOST_MATH_USE_FLOAT128
 void test_float128()
 {
+ static const __float128 eps = 1.92592994438723585305597794258492732e-34Q;
+
    __float128 p = boost::math::constants::pi<__float128>();
    __float128 r = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651Q;
    __float128 err = (p - r) / r;
    if(err < 0)
       err = -err;
- BOOST_CHECK(err < 2 * FLT128_EPSILON);
+ BOOST_CHECK(err < 2 * eps);
 }
 #endif
 


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