Implementation of the RANLUX++ generator.
RANLUX++ is an LCG equivalent of RANLUX using 576 bit numbers.
The idea of the generator (such as the initialization method) and the algorithm for the modulo operation are described in A. Sibidanov, A revision of the subtractwithborrow random numbergenerators, Computer Physics Communications*, 221(2017), 299303, preprint https://arxiv.org/pdf/1705.03123.pdf
The code is loosely based on the Assembly implementation by A. Sibidanov available at https://github.com/sibidanov/ranluxpp/.
Compared to the original generator, this implementation contains a fix to ensure that the modulo operation of the LCG always returns the smallest value congruent to the modulus (based on notes by M. Lüscher). Also, the generator converts the LCG state back to RANLUX numbers (implementation based on notes by M. Lüscher). This avoids a bias in the generated numbers because the upper bits of the LCG state, that is smaller than the modulus \( m = 2^{576}  2^{240} + 1 \) (not a power of 2!), have a higher probability of being 0 than 1. And finally, this implementation draws 48 random bits for each generated floating point number (instead of 52 bits as in the original generator) to maintain the theoretical properties from understanding the original transition function of RANLUX as a chaotic dynamical system.
Definition at line 27 of file RanluxppEngine.h.
Public Member Functions  
RanluxppEngine (uint64_t seed=314159265)  
virtual  ~RanluxppEngine () 
uint64_t  IntRndm () 
Generate a random integer value with 48 bits. More...  
double  operator() () 
Generate a doubleprecision random number (nonvirtual method) More...  
double  Rndm () override 
Generate a doubleprecision random number with 48 bits of randomness. More...  
void  SetSeed (uint64_t seed) 
Initialize and seed the state of the generator. More...  
void  Skip (uint64_t n) 
Skip n random numbers without generating them. More...  
Public Member Functions inherited from ROOT::Math::TRandomEngine  
virtual  ~TRandomEngine () 
virtual double  Rndm ()=0 
Static Public Member Functions  
static const char *  Name () 
Get name of the generator. More...  
Private Types  
using  ImplType = RanluxppEngineImpl< 48, p > 
Private Attributes  
std::unique_ptr< ImplType >  fImpl 
#include <Math/RanluxppEngine.h>

private 
Definition at line 30 of file RanluxppEngine.h.
ROOT::Math::RanluxppEngine< p >::RanluxppEngine  (  uint64_t  seed = 314159265  ) 
Definition at line 402 of file RanluxppEngineImpl.cxx.

virtualdefault 
uint64_t ROOT::Math::RanluxppEngine< p >::IntRndm 
Generate a random integer value with 48 bits.
Definition at line 423 of file RanluxppEngineImpl.cxx.

inlinestatic 
Get name of the generator.
Definition at line 50 of file RanluxppEngine.h.
double ROOT::Math::RanluxppEngine< p >::operator() 
Generate a doubleprecision random number (nonvirtual method)
Definition at line 417 of file RanluxppEngineImpl.cxx.

overridevirtual 
Generate a doubleprecision random number with 48 bits of randomness.
Implements ROOT::Math::TRandomEngine.
Definition at line 411 of file RanluxppEngineImpl.cxx.
void ROOT::Math::RanluxppEngine< p >::SetSeed  (  uint64_t  seed  ) 
Initialize and seed the state of the generator.
Definition at line 429 of file RanluxppEngineImpl.cxx.
void ROOT::Math::RanluxppEngine< p >::Skip  (  uint64_t  n  ) 
Skip n
random numbers without generating them.
Definition at line 435 of file RanluxppEngineImpl.cxx.

private 
Definition at line 31 of file RanluxppEngine.h.