It is well-known that the quality of random number generators can often be improved by combining several generators, e.g. by summing or subtracting their results. In this paper we investigate the ratio of two random number generators as an alternative approach: the smaller of two input random numbers is divided by the larger, resulting in a rational number from . We investigate theoretical properties of this approach and show that it yields a good approximation to the ideal uniform distribution. To evaluate the empirical properties we use the well-known test suite . We apply the ratio transformation to moderately bad generators, i.e. those that failed up to 40% of the tests from the test battery of . We show that more than half of them turn into very good generators that pass all tests of and from when the ratio transformation is applied. In particular, generators based on linear operations seem to benefit from the ratio, as this breaks up some of the unwanted regularities in the input sequences. Thus the additional effort to produce a second random number and to calculate the ratio allows to increase the quality of available random number generators.

生成讲解博客的中文版本

生成AI智能校验的中文版本