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§
sourcefn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)
fn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)
Computes self / rhs
, returns the quotient (q) and remainder (r).
Provided Methods§
sourcefn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb)
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§
impl DivRemLimb for BoxedUint
Available on crate feature
alloc
only.