This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Show self-similarity issues with Vigna's xoshiro256** | |
* | |
* Originally posted in a NumPy developers discussion by Tyge Løvset | |
* but simplified to only mix 32 outputs. | |
* | |
* Compile, and then test with PractRand by running | |
* | |
* ./xoshiro256-similarity \ | |
* | ./RNG_test stdin64 -te 1 -tlmin 15 -tlmax 50 -tlmaxonly -multithreaded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Seeding Bias Test | |
* | |
* - Runs through all possible seeds and examines the output for | |
* bias. Doing so is only practical for 32-bit (or less) seeds | |
* and 32-bit (or less) output. | |
* | |
* Compilation note: | |
* | |
* - You need to define the following preprocessor symbols to compile this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CHACHA_HPP_INCLUDED | |
#define CHACHA_HPP_INCLUDED 1 | |
/* | |
* A C++ version of ChaCha PRNG (*modified* from Orson Peters original code) | |
* | |
* Changes Copyright (c) 2017-18 Melissa E. O'Neill, licence as below. | |
* | |
* Changes compared to original 2015 version: | |
* - Some formatting fixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ARC4_HPP_INCLUDED | |
#define ARC4_HPP_INCLUDED 1 | |
/* | |
* A C++ port of the OpenBSD Arc4 random number generator | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (C) 1996 David Mazieres <[email protected]> for the OpenBSD project | |
* C++ Port Copyright (c) 2014-18 Melissa E. O'Neill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SPLITMIX_HPP_INCLUDED | |
#define SPLITMIX_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of SplitMix | |
* Original design by Guy L. Steele, Jr., Doug Lea and Christine H. Flood | |
* Described in _Fast splittable pseudorandom number generators_ | |
* http://dx.doi.org/10.1145/2714064.2660195 and implemented in | |
* Java 8 as SplittableRandom | |
* Based on code from the original paper, with revisions based on changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef XOSHIRO_HPP_INCLUDED | |
#define XOSHIRO_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of a family of Xoshiro generators. | |
* | |
* See: | |
* https://arxiv.org/abs/1805.01407 | |
* http://xoshiro.di.unimi.it/xoshiro256plus.c | |
* http://xoshiro.di.unimi.it/xoshiro256starstar.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Xoshiro256** Bad Repeats Demonstration | |
* | |
* gcc -std=c99 -Wall -o xoshiro-bad-repeats xoshiro-bad-repeats.c | |
* ./xoshiro-bad-repeats | less | |
* | |
* In a PRNG the size of Xoshiro256**, we should expect about 10 "5-in-7" | |
* repeats. Xoshiro256** has more than 18 billion billion of them, which | |
* is rather too many. In fact, the number of bad repeats is larger than | |
* the 2**64 range of the generator! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef RND_ADAPTERS_HPP_INCLUDED | |
#define RND_ADAPTERS_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of a set of PRNG adapters. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2018 Melissa E. O'Neill | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef LEHMER_HPP_INCLUDED | |
#define LEHMER_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of fast, 128-bit, Lehmer-style PRNGs | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2018 Melissa E. O'Neill | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SFC_HPP_INCLUDED | |
#define SFC_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of Chris Doty-Humphrey's SFC PRNG(s) | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2018 Melissa E. O'Neill | |
* |
NewerOlder