rabin.c
// Mod calculates the remainder of x divided by p.
Mod calculates the remainder of x divided by p.
Mod calculates the remainder of x divided by p .
static uint64_t mod(uint64_t x, uint64_t p) {
    while (deg(x) >= deg(p)) {
        uint64_t shift = deg(x) - deg(p);
        x = x ^ (p << shift);
    }
    return x;
}
static uint64_t mod ( uint64_t x , uint64_t p ) { while ( deg ( x ) >= deg ( p ) ) { uint64_t shift = deg ( x ) - deg ( p ) ; x = x ^ ( p << shift ) ; } return x ; }
Mod calculates the remainder of x divided by p.
Mod calculates the remainder of x divided by p .