Geant4-11
|
#include <cstdint>
Go to the source code of this file.
Functions | |
static uint64_t | add_carry (uint64_t a, uint64_t b, unsigned &carry) |
Compute a + b and increment carry if there was an overflow. More... | |
static uint64_t | add_overflow (uint64_t a, uint64_t b, unsigned &overflow) |
Compute a + b and set overflow accordingly. More... | |
static int64_t | compute_r (const uint64_t *upper, uint64_t *r) |
static uint64_t | sub_carry (uint64_t a, uint64_t b, unsigned &carry) |
Compute a - b and increment carry if there was an overflow. More... | |
static uint64_t | sub_overflow (uint64_t a, uint64_t b, unsigned &overflow) |
Compute a - b and set overflow accordingly. More... | |
|
inlinestatic |
Compute a + b
and increment carry
if there was an overflow.
Definition at line 24 of file helpers.h.
References add_overflow().
Referenced by compute_r(), multiply9x9(), and to_ranlux().
|
inlinestatic |
Compute a + b
and set overflow
accordingly.
Definition at line 16 of file helpers.h.
Referenced by add_carry(), compute_r(), multiply9x9(), to_lcg(), and to_ranlux().
|
inlinestatic |
Update r = r - (t1 + t2) + (t3 + t2) * b ** 10
This function also yields cbar = floor(r / m) as its return value (int64_t because the value can be -1). With an initial value of r = t0, this can be used for computing the remainder after division by m (see the function mod_m in mulmod.h). The function to_ranlux passes r = 0 and uses only the return value to obtain the decimal expansion after divison by m.
Definition at line 58 of file helpers.h.
References add_carry(), add_overflow(), sub_carry(), and sub_overflow().
Referenced by mod_m(), and to_ranlux().
|
inlinestatic |
Compute a - b
and increment carry
if there was an overflow.
Definition at line 42 of file helpers.h.
References sub_overflow().
Referenced by compute_r(), mod_m(), and to_lcg().
|
inlinestatic |
Compute a - b
and set overflow
accordingly.
Definition at line 34 of file helpers.h.
Referenced by compute_r(), mod_m(), sub_carry(), and to_lcg().