[MLton-devel] random numbers

Stephen Weeks MLton@mlton.org
Tue, 14 May 2002 15:42:46 -0700


> Any way, I'm going to play with it a bit to make sure that it is as  good  as
> the paper
>     http://www.math.keio.ac.jp/~matumoto/emt.html
> seems  to  indicate  that  it is.  Then we can at least replace the MLton one
> with one that gets the seed from /dev/?random and uses this.

I vote for leaving the seed fixed, and including the srand function.
That way, programs are deterministic unless someone explicitly uses
srand() and seed().

> Is it worth it to include real number output?  Is it worth it to have all the
> mantissa  bits  be  random?   It  isn't  hard,  it  just means 2 calls to the
> underlying Word32-producing random number generator.
> 
> Any suggested utilities?  At the moment  the  only  things  exported  in  the
> structure are
> 
>     val init: Word32.word -> unit
>     val random: unit -> Word32.word

There are some other utilities in lib/mlton/basic/random.sml,
including real number output.  I wouldn't mind to see some of those
migrated to MLton.Random.

Please send commit email when you do the checkin.  Thanks.

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel