Mersienne Twister
Wang Zhen
nehzgnaw at gmail.com
Fri Apr 28 05:34:15 PDT 2006
Derek Parnell wrote:
>
> I did a port of the Mersienne Twister (C-language edition) by Takuji
> Nishimura and Makoto Matsumoto into D. It is a free function version and
> doesn't use any classes. It also has a template for ranged random numbers.
>
> eg..
> uint v = genrand_range!(uint)(1, 10));
> double f = genrand_range!(double)(-0.5, 0.5))
>
> It can be found at
>
> http://www.users.bigpond.com/ddparnell/mt.d
>
> To get the object file only, compile with
>
> dmd -c mt
>
> to get a stand alone self-test version compile with
>
> dmd -version=main mt
>
> --Derek Parnell
> Melbourne, Australia
Attached is my D port of MT19937. I sent it to Walter last April as a
proposed replacement for std.random.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: random.d
Url: http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20060428/6d480086/attachment.txt
More information about the Digitalmars-d-announce
mailing list