pub type NonZeroInt<const LIMBS: usize> = NonZero<Int<LIMBS>>;Expand description
Non-zero signed integer.
Aliased Type§
pub struct NonZeroInt<const LIMBS: usize>(/* private fields */);Implementations§
Source§impl<const LIMBS: usize> NonZeroInt<LIMBS>
impl<const LIMBS: usize> NonZeroInt<LIMBS>
Sourcepub const fn new_unwrap(n: Int<LIMBS>) -> Self
pub const fn new_unwrap(n: Int<LIMBS>) -> Self
Sourcepub const fn abs_sign(&self) -> (NonZero<Uint<LIMBS>>, Choice)
pub const fn abs_sign(&self) -> (NonZero<Uint<LIMBS>>, Choice)
The sign and magnitude of this NonZeroInt.
Sourcepub const fn abs(&self) -> NonZero<Uint<LIMBS>>
pub const fn abs(&self) -> NonZero<Uint<LIMBS>>
The magnitude of this NonZeroInt.
Trait Implementations§
Source§impl<const LIMBS: usize> Gcd for NonZeroInt<LIMBS>
impl<const LIMBS: usize> Gcd for NonZeroInt<LIMBS>
Source§fn gcd(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
fn gcd(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
Compute the greatest common divisor of
self and rhs.Source§fn gcd_vartime(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
fn gcd_vartime(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
Compute the greatest common divisor of
self and rhs in variable time.Source§impl<const LIMBS: usize> Xgcd for NonZeroInt<LIMBS>
impl<const LIMBS: usize> Xgcd for NonZeroInt<LIMBS>
Source§fn xgcd(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
fn xgcd(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
Compute the extended greatest common divisor of
self and rhs.Source§fn xgcd_vartime(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
fn xgcd_vartime(&self, rhs: &NonZeroInt<LIMBS>) -> Self::Output
Compute the extended greatest common divisor of
self and rhs in variable time.