function lgm(n:UInt):Void->Float {
return function() {
n = (n * 0x41A7) % 0x7FFFFFFF;
function lgm(n:UInt):Void->Float {
var a:UInt = 0x41A7; var div:UInt = 0x7FFFFFFF; return function() { n = (n * a) % div; return n / div; }}
Hugh
Just a comment - not saying you are wrong - but I would think the "&" operator would be more normal than the "%" operator here (and then divide by 0x8000000)
Hugh