Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84944 - trunk/boost/math/special_functions
From: john_at_[hidden]
Date: 2013-07-03 11:51:51


Author: johnmaddock
Date: 2013-07-03 11:51:50 EDT (Wed, 03 Jul 2013)
New Revision: 84944
URL: http://svn.boost.org/trac/boost/changeset/84944

Log:
Fix for evaluation at float precision.

Text files modified:
   trunk/boost/math/special_functions/gamma.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/math/special_functions/gamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/gamma.hpp Tue Jul 2 20:09:46 2013 (r84943)
+++ trunk/boost/math/special_functions/gamma.hpp 2013-07-03 11:51:50 EDT (Wed, 03 Jul 2013) (r84944)
@@ -249,7 +249,7 @@
>::type tag_type;
       result = lgamma_small_imp<T>(z, T(z - 1), T(z - 2), tag_type(), pol, l);
    }
- else if((z >= 3) && (z < 100))
+ else if((z >= 3) && (z < 100) && (std::numeric_limits<T>::max_exponent >= 1024))
    {
       // taking the log of tgamma reduces the error, no danger of overflow here:
       result = log(gamma_imp(z, pol, l));


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