[MLton] MLton.Random documentation
Mike Thomas
mike.thomas@brisbane.paradigmgeo.com
Wed, 21 Jan 2004 17:06:37 +1000
Hi all.
I got the shirt thanks Stephen - fits well and has been to work once
already!
Work progresses on the OpenGL binding.
The documentation for MLton.Random doesn't tell the casual Windows based
user very much if they don't know what /dev/random and /dev/urandom might
be. In particular, I wanted to know the range of the random numbers
returned by the various generators.
After looking in the compiler library source I found MLton.random.real()
[0.0, 1.0], but it doesn't seem to be known to the compiler:
$ make
mlton -link-opt -L/lib/w32api -link-opt -lglut32 -link-opt -lglu32 -link-opt
-lo
pengl32 spin_cube.cm Gl_c.c Glut_c.c
Error: spin_cube.sml 115.15: undefined variable MLton.Random.real
Error: spin_cube.sml 115.37: undefined variable MLton.Random.real
Error: spin_cube.sml 115.59: undefined variable MLton.Random.real
Error: spin_cube.sml 115.81: undefined variable MLton.Random.real
compilation aborted: elaborate reported errors
make: *** [spin_cube] Error 1
Apparently the Mersenne twister RNG is fast, numerically attractive and
should be compatible with your licence.
Cheers
Mike Thomas.