pub struct Reciprocal {
    divisor_normalized: Word,
    shift: u32,
    reciprocal: Word,
}Expand description
A pre-calculated reciprocal for division by a single limb.
Fields§
§divisor_normalized: Word§shift: u32§reciprocal: WordImplementations§
Source§impl Reciprocal
 
impl Reciprocal
Sourcepub const fn ct_new(divisor: Limb) -> (Self, CtChoice)
 
pub const fn ct_new(divisor: Limb) -> (Self, CtChoice)
Pre-calculates a reciprocal for a known divisor,
to be used in the single-limb division later.
Returns the reciprocal, and the truthy value if divisor != 0
and the falsy value otherwise.
Note: if the returned flag is falsy, the returned reciprocal object is still self-consistent and can be passed to functions here without causing them to panic, but the results are naturally not to be used.
Trait Implementations§
Source§impl Clone for Reciprocal
 
impl Clone for Reciprocal
Source§fn clone(&self) -> Reciprocal
 
fn clone(&self) -> Reciprocal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl ConditionallySelectable for Reciprocal
 
impl ConditionallySelectable for Reciprocal
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
 
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
 
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
 
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap 
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl Debug for Reciprocal
 
impl Debug for Reciprocal
Source§impl Default for Reciprocal
 
impl Default for Reciprocal
Source§impl PartialEq for Reciprocal
 
impl PartialEq for Reciprocal
impl Copy for Reciprocal
impl Eq for Reciprocal
impl StructuralPartialEq for Reciprocal
Auto Trait Implementations§
impl Freeze for Reciprocal
impl RefUnwindSafe for Reciprocal
impl Send for Reciprocal
impl Sync for Reciprocal
impl Unpin for Reciprocal
impl UnwindSafe for Reciprocal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more