diff options
Diffstat (limited to '3rdParty/Boost/src/boost/functional/hash/detail')
-rw-r--r-- | 3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp index f9acee9..fdbf53f 100644 --- a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp @@ -51,17 +51,15 @@ namespace boost limits<T>::min_exponent; } - // The result of frexp is always between 0.5 and 1, so its - // top bit will always be 1. Subtract by 0.5 to remove that. - v -= T(0.5); - v = ldexp(v, limits<std::size_t>::digits + 1); + v = ldexp(v, limits<std::size_t>::digits); std::size_t seed = static_cast<std::size_t>(v); v -= seed; // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; std::size_t const length = (limits<T>::digits * - boost::static_log2<limits<T>::radix>::value - 1) + boost::static_log2<limits<T>::radix>::value + + limits<std::size_t>::digits - 1) / limits<std::size_t>::digits; for(std::size_t i = 0; i != length; ++i) |