Browse Prior Art Database

Integer Random Number Generator

IP.com Disclosure Number: IPCOM000060473D
Original Publication Date: 1986-Apr-01
Included in the Prior Art Database: 2005-Mar-08

Publishing Venue

IBM

Related People

Authors:
Johnson, SH [+details]

Abstract

The generation of random numbers without using floating-point arithmetic reduces program size by using logical arithmetic for hashing the random number seed. A random number seed hashed according to the following algorithm produces results that have been shown to be "sufficiently random". (Image Omitted) The variables "seed" and "temp" are permanent variables. A random integer can be returned from this function in the standard manner, by returning the modulus of the seed and the argument passed. The following function, written in Computer Innovations' implementation of the 'C' language for the IBM Personal Computer, provides the algorithm (with necessary additions) in a usable format. (Image Omitted)