Geant4-11
|
Go to the source code of this file.
Functions | |
static void | mod_m (const uint64_t *mul, uint64_t *out) |
static void | mulmod (const uint64_t *in1, uint64_t *inout) |
static void | multiply9x9 (const uint64_t *in1, const uint64_t *in2, uint64_t *out) |
static void | powermod (const uint64_t *base, uint64_t *res, uint64_t n) |
|
static |
Compute a value congruent to mul modulo m less than 2 ** 576
[in] | mul | product from multiply9x9 with 18 numbers of 64 bits each |
[out] | out | result with 9 numbers of 64 bits each |
The result in out is guaranteed to be smaller than the modulus.
Definition at line 143 of file mulmod.h.
References compute_r(), sub_carry(), and sub_overflow().
Referenced by mulmod(), and powermod().
|
static |
Combine multiply9x9 and mod_m with internal temporary storage
[in] | in1 | first factor with 9 numbers of 64 bits each |
[in,out] | inout | second factor and also the output of the same size |
The result in inout is guaranteed to be smaller than the modulus.
Definition at line 219 of file mulmod.h.
References mod_m(), and multiply9x9().
Referenced by CLHEP::RanluxppEngine::advance(), CLHEP::RanluxppEngine::setSeed(), and CLHEP::RanluxppEngine::skip().
|
static |
Multiply two 576 bit numbers, stored as 9 numbers of 64 bits each
[in] | in1 | first factor as 9 numbers of 64 bits each |
[in] | in2 | second factor as 9 numbers of 64 bits each |
[out] | out | result with 18 numbers of 64 bits each |
Definition at line 22 of file mulmod.h.
References add_carry(), and add_overflow().
Referenced by mulmod(), and powermod().
|
static |
Compute base to the n modulo m
[in] | base | with 9 numbers of 64 bits each |
[out] | res | output with 9 numbers of 64 bits each |
[in] | n | exponent |
The arguments base and res may point to the same location.
Definition at line 232 of file mulmod.h.
References fac, mod_m(), multiply9x9(), and CLHEP::detail::n.
Referenced by CLHEP::RanluxppEngine::setSeed(), and CLHEP::RanluxppEngine::skip().