Bug 21385 – std.random.uniform!T(urng) for integer T disregards urng.min and urng.max when producing the result so it may not actually be uniform

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-13T02:47:40Z
Last change time
2024-12-01T16:37:55Z
Assigned to
No Owner
Creator
Nathan S.
Moved to GitHub: phobos#9810 →

Comments

Comment #0 by n8sh.secondary — 2020-11-13T02:47:40Z
std.random.uniform!T(urng) for integer T disregards urng.min and urng.max when producing the result so it may not actually be uniform. This is not a problem for MersenneTwisterEngine or XorshiftEngine but it is a problem for LinearCongruentialEngine and potentially for user-defined generators.
Comment #1 by robert.schadek — 2024-12-01T16:37:55Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9810 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB