Modular Reducer (using Barrett's technique)
const BigInt multiply()(auto ref const BigInt x, auto ref const BigInt y);
Multiply mod p
- Parameters
BigInt x |
integer |
BigInt y |
integer |
- Returns
- (x * y) % p
const BigInt square()(auto ref const BigInt x);
Square mod p
- Parameters
- Returns
- (x * x) % p
const BigInt cube()(auto ref const BigInt x);
Cube mod p
- Parameters
- Returns
- (x * x * x) % p