Applied Sciences· 2026Q2
Statistical Quality of Number Sequences Produced by Pseudorandom Number Generators Built into Contemporary Programming Languages
- 0citations
- Q2SCImago
- 2026year
Short summary
113 out of 143 pseudorandom number generators (PRNGs) from 17 popular programming languages passed all 15 NIST statistical tests for randomness, with 66 showing no borderline results.
AI-generated from the title and abstract; the full text is not read.
Key points
- 113 of 143 PRNGs from 17 programming languages passed all 15 NIST statistical tests for randomness.
- 66 PRNGs passed all tests with no borderline results.
- Legacy generators in GNU Scientific Library and Delphi's built-in generators failed most tests.
- C and C++'s standard rand() function consistently failed the Discrete Fourier Transform test.
AI-generated from the title and abstract; the full text is not read.
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.
The authors' abstract, as published at the source. Applied Sciences, 2026 · DOI ↗
Continue with a free account
Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Numerical Analysis
Numerical AnalysisMathematics