Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79851 - in trunk/boost/math: special_functions tools
From: john_at_[hidden]
Date: 2012-08-02 11:16:22


Author: johnmaddock
Date: 2012-08-02 11:16:21 EDT (Thu, 02 Aug 2012)
New Revision: 79851
URL: http://svn.boost.org/trac/boost/changeset/79851

Log:
Fixes for multiprecision and expression template enabled types.
Text files modified:
   trunk/boost/math/special_functions/next.hpp | 6 +++---
   trunk/boost/math/tools/big_constant.hpp | 2 +-
   2 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/math/special_functions/next.hpp
==============================================================================
--- trunk/boost/math/special_functions/next.hpp (original)
+++ trunk/boost/math/special_functions/next.hpp 2012-08-02 11:16:21 EDT (Thu, 02 Aug 2012)
@@ -127,7 +127,7 @@
       // would not be a denorm, then shift the input, increment, and shift back.
       // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
       //
- return ldexp(float_next(ldexp(val, 2 * tools::digits<T>()), pol), -2 * tools::digits<T>());
+ return ldexp(float_next(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
    }
 
    if(-0.5f == frexp(val, &expon))
@@ -198,7 +198,7 @@
       // would not be a denorm, then shift the input, increment, and shift back.
       // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
       //
- return ldexp(float_prior(ldexp(val, 2 * tools::digits<T>()), pol), -2 * tools::digits<T>());
+ return ldexp(float_prior(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
    }
 
    T remain = frexp(val, &expon);
@@ -323,7 +323,7 @@
       //
       T a2 = ldexp(a, tools::digits<T>());
       T b2 = ldexp(b, tools::digits<T>());
- mb = -(std::min)(ldexp(upper, tools::digits<T>()), b2);
+ mb = -(std::min)(T(ldexp(upper, tools::digits<T>())), b2);
       x = a2 + mb;
       z = x - a2;
       y = (a2 - (x - z)) + (mb - z);

Modified: trunk/boost/math/tools/big_constant.hpp
==============================================================================
--- trunk/boost/math/tools/big_constant.hpp (original)
+++ trunk/boost/math/tools/big_constant.hpp 2012-08-02 11:16:21 EDT (Thu, 02 Aug 2012)
@@ -53,7 +53,7 @@
 // For constants too huge for any conceivable long double (and which generate compiler errors if we try and declare them as such):
 //
 #define BOOST_MATH_HUGE_CONSTANT(T, D, x)\
- boost::math::tools::make_big_value<T>(0.0L, BOOST_STRINGIZE(x), is_floating_point<T>(), boost::is_convertible<const char*, T>())
+ boost::math::tools::make_big_value<T>(0.0L, BOOST_STRINGIZE(x), mpl::bool_<is_floating_point<T>::value || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::max_exponent <= std::numeric_limits<long double>::max_exponent)>(), boost::is_convertible<const char*, T>())
 
 }}} // namespaces
 


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