pub trait EqMod<RHS = Self, M = Self> {
    fn eq_mod(self, other: RHS, m: M) -> bool;
}
Expand description

Determines whether a number is equivalent to another number modulo $m$.

Required Methods

Implementations on Foreign Types

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns whether a number is equivalent to another number modulo a third; that is, whether the difference between the first two is a multiple of the third.

Two numbers are equal to each other modulo 0 iff they are equal.

$f(x, y, m) = (x \equiv y \mod m)$.

$f(x, y, m) = (\exists k \in \Z : x - y = km)$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Implementors