Study of the set of initial values of pseudorandom number generators based on floating point arithmetic

DOI: 10.31673/2409-7292.2024.020011

Authors

  • О. Я. Горячий, (Goryachy O. Ya.) Lviv Polytechnic National University, Lviv
  • В. М. Максимович, (Maksymovych V. M.) Lviv Polytechnic National University, Lviv
  • М. М. Шабатура, (Shabatura M. M.) Lviv Polytechnic National University, Lviv

DOI:

https://doi.org/10.31673/2409-7292.2024.020011

Abstract

This article examines the statistical characteristics and repetition period of previously proposed pseudorandom number generators (PRNGs), built on the basis of approximate methods of calculating elementary functions in floating-point arithmetic. The purpose of the work was to evaluate the quality of the generated sequences, determine the permissible ranges of initial values, and select the parameters of the generator with the best characteristics. The use of the identical function, the approximate reciprocal algorithm, and six reciprocal square root algorithms in two generation modes and for five possible combinations of PRNG parameters depending on the choice of initial values were investigated. To test the proposed variants of the generators, sequences of pseudo-random numbers of size 2 GB were formed for a fixed set of their initial values. It is found that the repetition period depends on the selection of the initial value of the generator, the bytesCount parameter and the elementary function. Statistical sequence testing was performed based on the NIST test suite, graphical test, and histogram analysis. The ranges of selection of initial values depending on the parameters of the generator are proposed and three generators with the best characteristics are selected. In particular, more than 82% of generated sequences of the rsqrt2dc_everyBit generator with parameters bytesCount = 1 and offset = 0 (maximum period – 222.12 Mb) pass all NIST tests. It was established that for the selection of the initial values, the set of dimensions of about 2^60 elements is optimal, x0 ϵ [0.5; 10^135). Certain statistical regularities and shortcomings of individual generators have been revealed. In addition, it is demonstrated that the algorithms for the approximation of elementary functions in floating-point arithmetic can be used to construct high-performance PRNGs with good characteristics.

Keywords: pseudorandom sequence, pseudorandom number generators, elementary function, approximation methods, floating point arithmetic, NIST statistical tests, repetition period.

Published

2024-06-24

Issue

Section

Articles