You can see and test my code here: https://jsfiddle.net/b93ev14g/1/
Now my question remaining is what statistical significance my test has.
My test does the following: It generates a given (e.g. 1000) number of pseudo random numbers with the built in algorithmn (e.g. xorshift128+).
- If it finds any broken (floating) number, e.g. 10.5 it knows that the bits used by the algorithm are more than the number of bits the test was run for.
- If it doesn't find any odd number after the given amount of iterations it is likely that the algorithm uses less bits than the test was run with.
So my question are
- how big is the probability that the test will find a floating number (if the algorithm generates any) after n iterations?
- how big is the probability that the test will find a broken number (if the algorithm generates any)?
Do the probabilities depend on the actual number of bits that the prng generates and the number of bits that the test runs for?
How can I calculate the significance that the test has to pass valid if the pseudo random number generated generates statistically uniform distributed numbers with given number of iterations and a given number of bits against which the test is run?