pub trait DivRemLimb: Sized {
    // Required method
    fn div_rem_limb_with_reciprocal(
        &self,
        reciprocal: &Reciprocal
    ) -> (Self, Limb);

    // Provided method
    fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb) { ... }
}
Expand description

Support for optimized division by a single limb.

Required Methods§

source

fn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)

Computes self / rhs, returns the quotient (q) and remainder (r).

Provided Methods§

source

fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb)

Computes self / rhs using a pre-made reciprocal, returns the quotient (q) and remainder (r).

Object Safety§

This trait is not object safe.

Implementors§

source§

impl DivRemLimb for BoxedUint

Available on crate feature alloc only.
source§

impl<const LIMBS: usize> DivRemLimb for Uint<LIMBS>