Avoid overflow in RNG
authorKevin Boyd <kevin44boyd@gmail.com>
Mon, 6 Jul 2020 01:37:21 +0000 (18:37 -0700)
committerChristian Blau <cblau.mail@gmail.com>
Mon, 6 Jul 2020 11:17:48 +0000 (11:17 +0000)
commitb3a7daa179b7935c3178cfccbe1c9ca4117a405e
tree8c95582e35db9383feddfc069b61bdcff726722d
parent63131440b15a8412ae85444149a3458197beb788
Avoid overflow in RNG

Instead of checking for overflow, get necessary information about
number of bits from type attributes.

This technically wasn't undefined behavior but with strict UBSAN
settings got tagged in tests.
src/gromacs/random/uniformrealdistribution.h