Definition
Type residual::mod provides the basic modular arithmetic modulo primes of maximal size 226. 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 226.
#include < LEDA/numbers/residual.h >
Operations
double | residual::reduce_of_positive(double a, double p) | |
returns a modulo p for nonnegative integral 0 < = a < 254 |