[Issue 4851] Three suggestions for std.random

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Oct 14 05:46:22 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=4851

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bootcamp

--- Comment #8 from Andrei Alexandrescu <andrei at erdani.com> ---
Adding some of my own:

* uniform!int should give a uniform, full-range int. Same of course for all
integral types.

* uniform!bool should give a random bit (economically, i.e. generate a new
64-bit number every 64 calls)

* uniform!double should give a double in the range [0.0, 1.0). Or is [0.0, 1.0]
more appropriate?

* uniform!(int[])(30) should return an array of 30 integers

* uniform!string(30) should return a uniform string of 30... bytes or code
points?

--


More information about the Digitalmars-d-bugs mailing list