Type Alias dashu_int::Word

source ·
pub type Word = u32;
Expand description

The primitive integer type used to construct the big integers, guaranteed to be a rust built-in unsigned integer type.

The big integers is interally represented as an array of Words, so convert integers from and into Words are efficient.

The size of a Word is usually the same as usize, but it’s not guaranteed. It’s dependent on the target architecture.

Trait Implementations§

source§

impl<'r> Add<&'r IBig> for u32

§

type Output = IBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &IBig) -> IBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r UBig> for u32

§

type Output = UBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &UBig) -> UBig

Performs the + operation. Read more
source§

impl Add<IBig> for u32

§

type Output = IBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: IBig) -> IBig

Performs the + operation. Read more
source§

impl Add<UBig> for u32

§

type Output = UBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: UBig) -> UBig

Performs the + operation. Read more
source§

impl<'r> BitAnd<&'r UBig> for u32

§

type Output = u32

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: &UBig) -> u32

Performs the & operation. Read more
source§

impl BitAnd<UBig> for u32

§

type Output = u32

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: UBig) -> u32

Performs the & operation. Read more
source§

impl<'r> BitOr<&'r UBig> for u32

§

type Output = UBig

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: &UBig) -> UBig

Performs the | operation. Read more
source§

impl BitOr<UBig> for u32

§

type Output = UBig

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: UBig) -> UBig

Performs the | operation. Read more
source§

impl BitTest for u32

source§

fn bit_len(&self) -> usize

Effective bit length of the binary representation. Read more
source§

fn bit(&self, position: usize) -> bool

Returns true if the n-th bit is set in its two’s complement binary representation, n starts from 0.
source§

impl<'r> BitXor<&'r UBig> for u32

§

type Output = UBig

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: &UBig) -> UBig

Performs the ^ operation. Read more
source§

impl BitXor<UBig> for u32

§

type Output = UBig

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: UBig) -> UBig

Performs the ^ operation. Read more
source§

impl CubicRoot for u32

§

type Output = u16

source§

fn cbrt(&self) -> u16

source§

impl CubicRootRem for u32

§

type Output = u16

source§

fn cbrt_rem(&self) -> (u16, u32)

source§

impl DivEuclid<u32> for u32

§

type Output = u32

source§

fn div_euclid(self, rhs: u32) -> u32

source§

impl DivRem<u32> for u32

§

type OutputDiv = u32

§

type OutputRem = u32

source§

fn div_rem(self, rhs: u32) -> (u32, u32)

source§

impl DivRemAssign<u32> for u32

§

type OutputRem = u32

source§

fn div_rem_assign(&mut self, rhs: u32) -> u32

source§

impl DivRemEuclid<u32> for u32

§

type OutputDiv = u32

§

type OutputRem = u32

source§

fn div_rem_euclid(self, rhs: u32) -> (u32, u32)

source§

impl EstimatedLog2 for u32

source§

fn log2_bounds(&self) -> (f32, f32)

Estimate the bounds of the binary logarithm. Read more
source§

fn log2_est(&self) -> f32

Estimate the value of the binary logarithm. It’s calculated as the average of log2_bounds by default.
source§

impl ExtendedGcd<u32> for u32

§

type OutputGcd = u32

§

type OutputCoeff = i32

source§

fn gcd_ext(self, rhs: u32) -> (u32, i32, i32)

Calculate the greatest common divisor between the two operands, returns the common divisor g and the Bézout coefficients respectively. Read more
source§

impl Gcd<u32> for u32

§

type Output = u32

source§

fn gcd(self, rhs: u32) -> <u32 as Gcd<u32>>::Output

Compute the greatest common divisor between the two operands. Read more
source§

impl<'a> IntoRing<'a, ConstDivisor> for u32

§

type RingElement = Reduced<'a>

source§

fn into_ring(self, ring: &'a ConstDivisor) -> Reduced<'a>

source§

impl<'r> Mul<&'r IBig> for u32

§

type Output = IBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &IBig) -> IBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r UBig> for u32

§

type Output = UBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &UBig) -> UBig

Performs the * operation. Read more
source§

impl Mul<IBig> for u32

§

type Output = IBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: IBig) -> IBig

Performs the * operation. Read more
source§

impl Mul<UBig> for u32

§

type Output = UBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: UBig) -> UBig

Performs the * operation. Read more
source§

impl NumOrd<IBig> for u32

source§

fn num_partial_cmp(&self, other: &IBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

fn num_cmp(&self, other: &Other) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

impl NumOrd<UBig> for u32

source§

fn num_partial_cmp(&self, other: &UBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

fn num_cmp(&self, other: &Other) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

impl PowerOfTwo for u32

source§

fn is_power_of_two(&self) -> bool

Test if self is a power of two (2^k)
source§

fn next_power_of_two(self) -> u32

Get the smallest power of two greater than or equal to self.
source§

impl RemEuclid<u32> for u32

§

type Output = u32

source§

fn rem_euclid(self, rhs: u32) -> u32

source§

impl SquareRoot for u32

§

type Output = u16

source§

fn sqrt(&self) -> u16

source§

impl SquareRootRem for u32

§

type Output = u16

source§

fn sqrt_rem(&self) -> (u16, u32)

source§

impl<'r> Sub<&'r IBig> for u32

§

type Output = IBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &IBig) -> IBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r UBig> for u32

§

type Output = UBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &UBig) -> UBig

Performs the - operation. Read more
source§

impl Sub<IBig> for u32

§

type Output = IBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: IBig) -> IBig

Performs the - operation. Read more
source§

impl Sub<UBig> for u32

§

type Output = UBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: UBig) -> UBig

Performs the - operation. Read more
source§

impl TryFrom<&IBig> for u32

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IBig) -> Result<u32, ConversionError>

Performs the conversion.
source§

impl TryFrom<&UBig> for u32

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: &UBig) -> Result<u32, ConversionError>

Performs the conversion.
source§

impl TryFrom<IBig> for u32

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: IBig) -> Result<u32, ConversionError>

Performs the conversion.
source§

impl TryFrom<UBig> for u32

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: UBig) -> Result<u32, ConversionError>

Performs the conversion.