[MLton-devel] random numbers
Matthew Fluet
fluet@CS.Cornell.EDU
Tue, 14 May 2002 08:00:43 -0400 (EDT)
> I was inspired by the discussion on usenet about random number generators and
> ended up implementing the Mersenne Twister one discussed there. Stephen, you
> said that `you used one from ... in Numerical recipies), but it isn't in
> MLton, is it?
Yes, it is in the MLton structure as MLton.Random
(src/basis-library/mlton/random.sml).
> Is it really true that there isn't one in the basis library?
Doesn't look like it.
> 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 was recently a discussion on the Haskell mailing list talking about
the proper scaling of randoms; i.e., doing better than just mod'ing; see:
http://haskell.org/pipermail/haskell/2002-May/009571.html
That might be useful.
_______________________________________________________________
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