jj1bdx/sfmt-erlang — pull request #3 by okeuday (2012-03-12 06:50:05+00:00)
Title: big-integers implementation of Wichmann-Hill 2006 algorithm

The original commit message in my branch is:
"Fix floating-point precision problems within the Wichmann-Hill 2006 algorithm by using big-integers based on the 64bit implementation. Fix seed generation to not be concerned about negative values that malicious people might put in the process dictionary, since that is just user error (they get the errors they deserve, the random module doesn't bother to check). Use space indentation, since a tab is not always 8 spaces."

The changes reflect the discussion that was on the mailing list related to the UUID implementation. The changes will make the result differ from implementations that use a floating-point fractional approach. However, using the floating point approach for 124 bits of uniform randomness is much harder than just using big-integers. The result is the algorithm produces the same uniformity present with the largest range of values: [0...21267638781707063560975648195455661513) (which is the result after the first remainder). I wanted to submit this as a code-change, since I don't think it needs a paper... it is just adjusting the formula to use big-integers. Either way, I do hope for a pseudo-random implementation like this one that seeks wider acceptance (i.e., proof of its validity through others observations). Please tell me if you think parts, or all, of my changes are a problem.

Thanks,
Michael