Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/math/distributions/extreme_value.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/math/distributions/extreme_value.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/math/distributions/extreme_value.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -108,7 +108,10 @@ return result; if(0 == detail::check_x(function, x, &result, Policy())) return result; - result = exp((a-x)/b) * exp(-exp((a-x)/b)) / b; + RealType e = (a - x) / b; + if(e < tools::log_max_value<RealType>()) + result = exp(e) * exp(-exp(e)) / b; + // else.... result *must* be zero since exp(e) is infinite... return result; } // pdf