Abstract

This paper describes an implementation of a Linear Congruential Generator (LCG) based on the binary representation of the normal number α2,3, and of a combined generator based on that LCG. The base LCG with the modulus 333 provides a quality sequence with the period ≈3.7⋅1015, which passes all but two statistical tests from BigCrush test suite. We improved on the original implementation by adapting Barrett’s modular reduction method, which resulted in four-fold increase in efficiency. The combined generator has the period of ≈1023 and passes all tests from BigCrush suite. Program summaryProgram title: BCNRandomCatalogue identifier: AEPG_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEPG_v1_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.htmlNo. of lines in distributed program, including test data, etc.: 1201No. of bytes in distributed program, including test data, etc.: 13715Distribution format: tar.gzProgramming language: C.Computer: IBM PC; MacBook Pro.Operating system: Windows 7, Linux, Unix, OS X.RAM: 512 KBClassification: 4.13.Nature of problem:This is a fast pseudorandom number generator based on normal numbers, with long period and good statistical properties. It passes all 106 BigCrush statistical tests and is faster than C standard library rand generator. Suitable for parallel execution by multiple threads and/or processes because of skip ahead property.Solution method:Linear Congruential Generators with specially chosen parameters are used. A customized fast modular reduction is employed.Running time:Generation rate is 100–200 million numbers per second.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.