pub trait CeilingDivNegMod<RHS = Self> {
    type DivOutput;
    type ModOutput;

    fn ceiling_div_neg_mod(
        self,
        other: RHS
    ) -> (Self::DivOutput, Self::ModOutput); }
Expand description

Divides a number by another number, returning the ceiling of the quotient and 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, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Divides a number by another number, returning the ceiling of the quotient and 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) = \left ( \left \lceil \frac{x}{y} \right \rceil, \space y\left \lceil \frac{x}{y} \right \rceil - x \right ). $$

Worst-case complexity

Constant time and additional memory.

Panics

Panics if other is 0.

Examples

See here.

Implementors