Mercurial > hg > vamp-build-and-test
comparison 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 |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
106 return result; | 106 return result; |
107 if(0 == detail::check_finite(function, a, &result, Policy())) | 107 if(0 == detail::check_finite(function, a, &result, Policy())) |
108 return result; | 108 return result; |
109 if(0 == detail::check_x(function, x, &result, Policy())) | 109 if(0 == detail::check_x(function, x, &result, Policy())) |
110 return result; | 110 return result; |
111 result = exp((a-x)/b) * exp(-exp((a-x)/b)) / b; | 111 RealType e = (a - x) / b; |
112 if(e < tools::log_max_value<RealType>()) | |
113 result = exp(e) * exp(-exp(e)) / b; | |
114 // else.... result *must* be zero since exp(e) is infinite... | |
112 return result; | 115 return result; |
113 } // pdf | 116 } // pdf |
114 | 117 |
115 template <class RealType, class Policy> | 118 template <class RealType, class Policy> |
116 inline RealType cdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x) | 119 inline RealType cdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x) |