digitalmars.D.announce - Mersienne Twister
- Derek Parnell (15/15) Apr 13 2006 I did a port of the Mersienne Twister (C-language edition) by Takuji
- James Dunne (11/33) Apr 13 2006 Did you get this from Torus Trooper? If not then that's highly
- Derek Parnell (7/24) Apr 13 2006 I got it from Makoto's RNG site ...
- Victor Nakoryakov (7/29) Apr 13 2006 Hey... I've already implement it in 'helix' on dsource. It is in svn.
- Derek Parnell (7/24) Apr 13 2006 Knock yourself out ;-) I haven't bothered tuning it, just made it more ...
- Wang Zhen (3/26) Apr 28 2006 Attached is my D port of MT19937. I sent it to Walter last April as a
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
Apr 13 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 mtDid 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
Apr 13 2006
On Fri, 14 Apr 2006 00:38:42 +1000, James Dunne <james.jdunne gmail.com> wrote:Derek Parnell wrote:I got it from Makoto's RNG site ... http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html -- Derek Parnell Melbourne, AustraliaI 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 mtDid you get this from Torus Trooper? If not then that's highly coincidental.
Apr 13 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 mtHey... I've already implement it in 'helix' on dsource. It is in svn. I'll test your implementation on weekend to see which is faster :) -- Victor (aka nail) Nakoryakov nail-mail<at>mail<dot>ru Krasnoznamensk, Moscow, Russia
Apr 13 2006
On Fri, 14 Apr 2006 01:43:04 +1000, Victor Nakoryakov <nail-mail mail.ru> wrote:Derek Parnell wrote:Knock yourself out ;-) I haven't bothered tuning it, just made it more D-like. -- Derek Parnell Melbourne, AustraliaI 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 mtHey... I've already implement it in 'helix' on dsource. It is in svn. I'll test your implementation on weekend to see which is faster :)
Apr 13 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, AustraliaAttached is my D port of MT19937. I sent it to Walter last April as a proposed replacement for std.random.
Apr 28 2006