In a statistics book there is an algorithm of generating pseudo-random numbers with uniform distribution [0,1]. It says:
I. Enter an initial variable X positive integer.
II. Multiply X by variable "a", which should be at least 5 digits long.
III. Divide a*X by value p (positive integer).
IV. Take the fraction part of the division as a first pseudo-random number.
V. Make the number from step IV into integer by a necessary multiplication and use it in step II.
VI. Step II-V are repeated to generate more pseudo-random numbers.