Mersienne Twister

James Dunne james.jdunne at gmail.com
Thu Apr 13 07:38:42 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
> 

Did you get this from Torus Trooper?  If not then that's highly 
coincidental.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O 
M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e 
h>--->++ r+++ y+++
------END GEEK CODE BLOCK------

James Dunne



More information about the Digitalmars-d-announce mailing list