Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ranlux_lcg.h File Reference
#include "helpers.h"
#include <cstdint>
Include dependency graph for ranlux_lcg.h:
This graph shows which files directly or indirectly include this file:

Functions

static void to_lcg (const uint64_t *ranlux, unsigned c, uint64_t *lcg)
 Convert RANLUX numbers to an LCG state.
 
static void to_ranlux (const uint64_t *lcg, uint64_t *ranlux, unsigned &c_out)
 Convert an LCG state to RANLUX numbers.
 

Function Documentation

◆ to_lcg()

static void to_lcg ( const uint64_t *  ranlux,
unsigned  c,
uint64_t *  lcg 
)
static

Convert RANLUX numbers to an LCG state.

Parameters
[in]ranluxthe RANLUX numbers as 576 bits
[out]lcgthe 576 bits of the LCG state, smaller than m
[in]cthe carry bit of the RANLUX state

\( m = 2^{576} - 2^{240} + 1 \)

Definition at line 26 of file ranlux_lcg.h.

◆ to_ranlux()

static void to_ranlux ( const uint64_t *  lcg,
uint64_t *  ranlux,
unsigned &  c_out 
)
static

Convert an LCG state to RANLUX numbers.

Parameters
[in]lcgthe 576 bits of the LCG state, must be smaller than m
[out]ranluxthe RANLUX numbers as 576 bits
[out]c_outthe carry bit of the RANLUX state

\( m = 2^{576} - 2^{240} + 1 \)

Definition at line 58 of file ranlux_lcg.h.