pub trait NegMod<RHS = Self> {
    type Output;

    fn neg_mod(self, other: RHS) -> Self::Output;
}
Expand description

Divides the negative of a number by another number, returning the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

Required Associated Types

Required Methods

Implementations on Foreign Types

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides the negative of a number by another number, returning just the remainder.

If the quotient were computed, the quotient and remainder would satisfy $x = qy - r$ and $0 \leq r < y$.

$$ f(x, y) = y\left \lceil \frac{x}{y} \right \rceil - x. $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Implementors