summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-05-06 17:44:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-05-06 17:44:27 (GMT)
commitd76ada0ab59634e3333f9eb5a92d0e850f60d7bf (patch)
tree5eaae441173fad2ec19ba67d6589f28ecd740991 /3rdParty/Boost/src/boost/functional/hash/detail
parent6f49e5abee37d37b351d68c01374232eccdac458 (diff)
downloadswift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.zip
swift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.tar.bz2
Updated Boost to 1.43.0.
Diffstat (limited to '3rdParty/Boost/src/boost/functional/hash/detail')
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp8
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)