Uniform Random Rational Number Generation

  title={Uniform Random Rational Number Generation},
  author={Thomas Morgenstern},
Classical floating point random numbers fail simple tests when considered as rational numbers. A uniform random number generator based on a linear congruential generator with output in the rational numbers is implemented within the two computer algebra systems Maple 10 and MuPAD Pro 3.1. The empirical tests in Knuth’s suite of tests show no evidence against the hypothesis that the output samples independent and identically uniformly distributed random variables.