Bug 3224 – std.random documentation bugs

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-08-03T23:46:00Z
Last change time
2015-06-09T05:13:45Z
Keywords
spec
Assigned to
andrei
Creator
kiki

Comments

Comment #0 by kiki — 2009-08-03T23:46:09Z
> struct LinearCongruentialEngine(UIntType,UIntType a,UIntType c,UIntType m); >> bool empty; >>> Always true (random generators are infinite ranges). should be "Always false" > alias MinstdRand0; > alias MinstdRand; >> Example: >>> // seed with a constant >>> auto rnd0 = MinstdRand0(1); >>> auto n = rnd0.popFront; // same for each run >>> // Seed with an unpredictable value >>> rnd0.seed(unpredictableSeed); >>> n = rnd0.popFront; // different across runs should call .front, instead of .popFront (twice).