equal
deleted
inserted
replaced
306 } |
306 } |
307 }; |
307 }; |
308 |
308 |
309 |
309 |
310 template <typename Result, typename Word, |
310 template <typename Result, typename Word, |
311 bool one_word = std::numeric_limits<Word>::digits < |
311 bool one_word = (std::numeric_limits<Word>::digits < |
312 std::numeric_limits<Result>::digits> |
312 std::numeric_limits<Result>::digits) > |
313 struct Mapping { |
313 struct Mapping { |
314 static Result map(RandomCore<Word>& rnd, const Result& bound) { |
314 static Result map(RandomCore<Word>& rnd, const Result& bound) { |
315 Word max = Word(bound - 1); |
315 Word max = Word(bound - 1); |
316 Result mask = Masker<Result>::mask(bound - 1); |
316 Result mask = Masker<Result>::mask(bound - 1); |
317 Result num; |
317 Result num; |