Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions random/include/boost/random/threefry4x64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace detail {
inline static UIntType zth(const boost::uint_least64_t (&_output)[4])
{ return _output[0] & 0xFFFF; }
inline static UIntType nth(const boost::uint_least64_t (&_output)[4], std::size_t n)
{ return (_output[n>>2] >> ((n&11)<<4)) & 0xFFFF; }
{ return (_output[n>>2] >> ((n&3)<<4)) & 0xFFFF; }
inline static UIntType w_max()
{ return 0xFFFF; }
};
Expand All @@ -75,7 +75,7 @@ namespace detail {
inline static UIntType zth(const boost::uint_least64_t (&_output)[4])
{ return _output[0] & 0xFF; }
inline static UIntType nth(const boost::uint_least64_t (&_output)[4], std::size_t n)
{ return (_output[n>>3] >> ((n&111)<<3)) & 0xFF; }
{ return (_output[n>>3] >> ((n&7)<<3)) & 0xFF; }
inline static UIntType w_max()
{ return 0xFF; }
};
Expand Down