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
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Johnson, SH: AUTHOR

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)

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Integer Random Number Generator

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)

1