#include <cstdint>
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. | |
static uint64_t | add_overflow (uint64_t a, uint64_t b, unsigned &overflow) |
Compute a + b and set overflow accordingly. | |
static int64_t | compute_r (const uint64_t *upper, uint64_t *r) |
Update r = r - (t1 + t2) + (t3 + t2) * b ** 10. | |
static uint64_t | sub_carry (uint64_t a, uint64_t b, unsigned &carry) |
Compute a - b and increment carry if there was an overflow. | |
static uint64_t | sub_overflow (uint64_t a, uint64_t b, unsigned &overflow) |
Compute a - b and set overflow accordingly. | |
|
inlinestatic |
|
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 division by m.
|
inlinestatic |