Definition
Type residual::mod provides the basic modular arithmetic modulo primes of maximal size 2^{26}. Here numbers modulo the prime p are represented by integral doubles in [0,^{ ... }p - 1]. This type cannot be instantiated, so there are only static functions and no constructors. The following functions have the common precondition that p is a prime between 2 and 2^{26}.
#include < LEDA/numbers/residual.h >
Operations
double | residual::reduce_of_positive(double a, double p) | |
returns a modulo p for nonnegative integral 0 < = a < 2^{54} |