pub struct Vanilla<T>(_);
Expand description
A plain reducer that just use normal Rem operators. It will keep the integer
in range [0, modulus) after each operation.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Create a reducer for a modulus m
Transform a normal integer into reduced form
Transform a reduced form back to normal integer
Get the modulus in original integer type
Test if the residue() == 0
Calculate (lhs + rhs) mod m in reduced form
Calculate (lhs - rhs) mod m in reduced form
Calculate -monty mod m in reduced form
Calculate target^-1 mod m in reduced form,
it may return None when there is no modular inverse. Read more
Calculate base ^ exp mod m in reduced form
Calculate (lhs * rhs) mod m in reduced form
Calculate target^2 mod m in reduced form
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.