Skip to content
Advertisement

Tag: functional-testing

Custom linear congruential generator in JavaScript

I am trying to create a custom linear congruential generator (LCQ) in JavaScript (the one used in glibc). Its properties as it’s stated on Wikipedia are: m=2^31 , a=1103515245 , c=12345. Now I am getting next seed value with Although the generator seems to work, but when the numbers are tested on canvas: They seem to be horribly biased: http://jsfiddle.net/7VmR9/3/show/

Advertisement