Commons RNG – RNG
Apache Commons RNG ™
Last Published: 16 Apr 2026
Version: 1.7
ApacheCon
Apache
Commons
RNG
Overview
Downloads
Issue Tracking
Source Repository (current)
Developers Guide
Release History
Javadoc
User Guide
Contents
Usage
Performance
Quality
Project Documentation
Project Information
About
Summary
Project Modules
Team
Source Code Management
Issue Management
Mailing Lists
Maven Coordinates
Dependency Management
Dependencies
Dependency Convergence
CI Management
Distribution Management
Project Reports
Commons
License
Components
Sandbox
Dormant
General Information
Security
Volunteering
Contributing Patches
Building Components
Commons Parent POM
Commons Build Plugin
Commons Release Plugin
Site Publication
Releasing Components
Wiki
ASF
How the ASF works
Get Involved
Developer Resources
Code of Conduct
Sponsorship
Thanks
Apache Commons RNG: Random Numbers Generators
Commons RNG provides implementations of pseudo-random numbers generators that are
faster; of higher quality; and/or of a longer period than
java.util.Random
and
java.util.SplittableRandom
Casual use is as simple as:
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.rng.simple.RandomSource;

// Instantiate a generator with a factory method.
UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();

// Use it to produce a floating-point value between 0 and 1.
double random = rng.nextDouble();
For more examples and more advanced usage, see the
userguide
Commons RNG is intended to be a repository of pure Java implementations of
random number generators that produce deterministic sequences.
The current design has made no provision for features generally needed for
cryptography applications (e.g. strong unpredictability).
The emphasis is on state-of-the-art generators that pass stringent uniformity
tests such as
TestU01 (BigCrush)
Dieharder
and
PractRand
Weaker algorithms, with known shortcomings, are also provided (for reference or
due to their historical importance) but their use is best avoided in new
applications.
Download Apache Commons RNG
Releases
Download the
latest release
of Apache Commons RNG.
Copyright © 2016-2026
The Apache Software Foundation
Apache Commons, Apache Commons RNG, Apache, the Apache logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.