Statistical Quality of Number Sequences Produced by Pseudorandom Number Generators Built into Contemporary Programming Languages

The article presents the statistical quality of number sequences produced by pseudorandom number generators (PRNGs) built into or available in libraries of contemporary programming languages. Since PRNGs are foundational to many sciences, including cryptography, statistics, and simulation methods, high-quality PRNGs are crucial for reliable results. The study evaluated 143 pseudorandom generators from 17 popular programming languages. A widely recognized suite of 15 statistical tests developed by the National Institute of Standards and Technology (NIST), was used to assess randomness, and the research’s high accuracy was ensured by generating 1000 sequences for each generator, each one million bits long. The tests were performed for two variants: one with a fixed seed equal to 1 and one with a randomly selected seed. Thanks to these studies, the user can become aware of the limitations of the tools used and, if necessary, replace a weak generator with a better one. The results show that 113 of the 143 generators did not fail any test in either scenario, and 66 of them passed all tests without a single borderline result. However, four legacy linear congruential generators available in the GNU Scientific Library and both generators built into Delphi failed most of the tests, while the standard rand() function of C and C++ consistently failed the Discrete Fourier Transform test. Most borderline results were observed for the Non-overlapping Template Matching test.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2026-10-09
DOI
https://doi.org/10.3390/app16209979
Primary Topic
Mathematical Approximation and Integration
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Statistical Quality of Number Sequences Produced by Pseudorandom Number Generators Built into Contemporary Programming Languages

Łukasz Matuszewski, Mieczysław Jessa, Michał Dulek*, Marcel Bieżuński
Applied Sciences
Mathematical Approximation and Integration
article

Statistical Quality of Number Sequences Produced by Pseudorandom Number Generators Built into Contemporary Programming Languages

Łukasz Matuszewski, Mieczysław Jessa, Michał Dulek*, Marcel Bieżuński
article en

Abstract

The article presents the statistical quality of number sequences produced by pseudorandom number generators (PRNGs) built into or available in libraries of contemporary programming languages. Since PRNGs are foundational to many sciences, including cryptography, statistics, and simulation methods, high-quality PRNGs are crucial for reliable results. The study evaluated 143 pseudorandom generators from 17 popular programming languages. A widely recognized suite of 15 statistical tests developed by the National Institute of Standards and Technology (NIST), was used to assess randomness, and the research’s high accuracy was ensured by generating 1000 sequences for each generator, each one million bits long. The tests were performed for two variants: one with a fixed seed equal to 1 and one with a randomly selected seed. Thanks to these studies, the user can become aware of the limitations of the tools used and, if necessary, replace a weak generator with a better one. The results show that 113 of the 143 generators did not fail any test in either scenario, and 66 of them passed all tests without a single borderline result. However, four legacy linear congruential generators available in the GNU Scientific Library and both generators built into Delphi failed most of the tests, while the standard rand() function of C and C++ consistently failed the Discrete Fourier Transform test. Most borderline results were observed for the Non-overlapping Template Matching test.

Applied SciencesVol. 16(20)
Poznań University of Technology (PL)
Openalex Percentile: Top 12%
Mathematical Approximation and Integration
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.