pub trait CeilingDivAssignNegMod<RHS = Self> {
    type ModOutput;

    fn ceiling_div_assign_neg_mod(&mut self, other: RHS) -> Self::ModOutput;
}
Expand description

Divides a number by another number in place, taking the ceiling of the quotient and returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

Required Associated Types

Required Methods

Implementations on Foreign Types

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number in place, returning the remainder of the negative of the first number divided by the second.

The quotient and remainder satisfy $x = qy - r$ and $0 \leq r < y$.

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

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Implementors