devela::all

Trait NumInt

Source
pub trait NumInt: Num {
    type OutI;

Show 114 methods // Provided methods fn int_digital_root(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digital_root(&self) -> Result<Self::Out> { ... } fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out> { ... } fn int_digits(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digits(&self) -> Result<Self::Out> { ... } fn int_digits_sign(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digits_sign(&self) -> Result<Self::Out> { ... } fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out> { ... } fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out> { ... } fn int_abs(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_abs(&self) -> Result<Self::Out> { ... } fn int_is_even(self) -> Result<bool> where Self: Sized { ... } fn int_ref_is_even(&self) -> Result<bool> { ... } fn int_is_odd(self) -> Result<bool> where Self: Sized { ... } fn int_ref_is_odd(&self) -> Result<bool> { ... } fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out> { ... } fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>> where Self: Sized { ... } fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>> { ... } fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out> { ... } fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out> { ... } fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out> { ... } fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out> { ... } fn int_factorial(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_factorial(&self) -> Result<Self::Out> { ... } fn int_subfactorial(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_subfactorial(&self) -> Result<Self::Out> { ... } fn int_combine(self, r: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_combine(&self, r: &Self::Rhs) -> Result<Self::Out> { ... } fn int_combine_rep(self, r: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_combine_rep(&self, r: &Self::Rhs) -> Result<Self::Out> { ... } fn int_permute(self, r: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_permute(&self, r: &Self::Rhs) -> Result<Self::Out> { ... } fn int_permute_rep(self, r: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_permute_rep(&self, r: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]> where Self: Sized { ... } fn int_ref_div_rem(&self, b: &Self::Rhs) -> Result<[Self::Out; 2]> { ... } fn int_div_ceil(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_ceil(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_floor(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_floor(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_ties_away(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_ties_away(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_ties_towards(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_ties_towards(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_ties_even(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_ties_even(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_div_ties_odd(self, b: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_div_ties_odd(&self, b: &Self::Rhs) -> Result<Self::Out> { ... } fn int_factors(self) -> Result<Vec<Self::Out>> where Self: Sized { ... } fn int_ref_factors(&self) -> Result<Vec<Self::Out>> { ... } fn int_factors_proper(self) -> Result<Vec<Self::Out>> where Self: Sized { ... } fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>> { ... } fn int_factors_prime(self) -> Result<Vec<Self::Out>> where Self: Sized { ... } fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>> { ... } fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>> where Self: Sized { ... } fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>> { ... } fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)> where Self: Sized { ... } fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)> { ... } fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)> where Self: Sized { ... } fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)> { ... } fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize> where Self: Sized { ... } fn int_ref_factors_prime_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize> { ... } fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize> where Self: Sized { ... } fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize> { ... } fn int_is_prime(self) -> Result<bool> where Self: Sized { ... } fn int_ref_is_prime(&self) -> Result<bool> { ... } fn int_prime_nth(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_prime_nth(&self) -> Result<Self::Out> { ... } fn int_prime_pi(self) -> Result<usize> where Self: Sized { ... } fn int_ref_prime_pi(&self) -> Result<usize> { ... } fn int_totient(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_totient(&self) -> Result<Self::Out> { ... } fn int_is_square(self) -> Result<bool> where Self: Sized { ... } fn int_ref_is_square(&self) -> Result<bool> { ... } fn int_sqrt_ceil(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_sqrt_ceil(&self) -> Result<Self::Out> { ... } fn int_sqrt_floor(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_sqrt_floor(&self) -> Result<Self::Out> { ... } fn int_sqrt_round(self) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_sqrt_round(&self) -> Result<Self::Out> { ... } fn int_root_ceil(self, nth: u32) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out> { ... } fn int_root_floor(self, nth: u32) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out> { ... } fn int_modulo(self, modulus: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo(&self, modulus: &Self::Rhs) -> Result<Self::Out> { ... } fn int_modulo_cycles( self, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_ref_modulo_cycles( &self, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_modulo_add( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_add( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out> { ... } fn int_modulo_add_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_ref_modulo_add_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_modulo_add_inv(self, modulus: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_add_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out> { ... } fn int_modulo_sub( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_sub( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out> { ... } fn int_modulo_sub_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_ref_modulo_sub_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_modulo_mul( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_mul( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out> { ... } fn int_modulo_mul_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_ref_modulo_mul_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>> where Self: Sized { ... } fn int_modulo_mul_inv(self, modulus: Self::Rhs) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_mul_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out> { ... } fn int_modulo_div( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out> where Self: Sized { ... } fn int_ref_modulo_div( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out> { ... }
}
Expand description

Common trait for integer types.

See also NumRefInt which is automatically implemented for NumInt references.

§Notes

  • We use n to refer to the self argument in all method descriptions and formulations.
  • Every method in this trait returns NotImplemented by default.
  • Any concrete implementation must define the operations it wants to support.
  • Unsupported operations should ideally return NotSupported.
  • This trait only includes checked methods, which return a Result to handle errors explicitly.
  • It aims to provide the same methods across all implementations, returning a result when possible.
  • Operations are generally supported if they are valid for some input values.
  • Most methods come in two variants, distinguished by their prefixes:
    • int_* methods take arguments by value.
    • int_ref_* methods take arguments by reference.

§Methods

Required Associated Types§

Source

type OutI

Specifically signed output type for some operations (▶ int_gcd_ext).

Provided Methods§

Source

fn int_digital_root(self) -> Result<Self::Out>
where Self: Sized,

Returns the digital root in base 10.

§Implementations

See an implementation for primitive integers: Int::digital_root.

Source

fn int_ref_digital_root(&self) -> Result<Self::Out>

Similar to int_digital_root, but operates on references instead of values.

Source

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the digital root in the given base.

§Implementations

See an implementation for primitive integers: Int::digital_root_base.

Source

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Similar to int_digital_root_base, but operates on references instead of values.

Source

fn int_digits(self) -> Result<Self::Out>
where Self: Sized,

Returns the number of digits in base 10.

§Implementations

See an implementation for primitive integers: Int::digits.

Source

fn int_ref_digits(&self) -> Result<Self::Out>

Similar to int_digits, but operates on references instead of values.

Source

fn int_digits_sign(self) -> Result<Self::Out>
where Self: Sized,

Returns the number of digits in base 10 including the negative sign.

§Implementations

See an implementation for primitive integers: Int::digits_sign.

Source

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Similar to int_digits_sign, but operates on references instead of values.

Source

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of digits in the given base.

§Implementations

See an implementation for primitive integers: Int::digits_base.

Source

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Similar to int_digits_base, but operates on references instead of values.

Source

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of digits in the given base.

§Implementations

See an implementation for primitive integers: Int::digits_base_sign.

Source

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Similar to int_digits_base_sign, but operates on references instead of values.

Source

fn int_abs(self) -> Result<Self::Out>
where Self: Sized,

Returns the absolute value.

§Implementations

See an implementation for primitive integers: Int::abs.

Source

fn int_ref_abs(&self) -> Result<Self::Out>

Similar to int_abs, but operates on references instead of values.

Source

fn int_is_even(self) -> Result<bool>
where Self: Sized,

Returns true if self is even.

§Implementations

See an implementation for primitive integers: Int::is_even.

Source

fn int_ref_is_even(&self) -> Result<bool>

Similar to int_is_even, but operates on references instead of values.

Source

fn int_is_odd(self) -> Result<bool>
where Self: Sized,

Returns true if self is odd.

§Implementations

See an implementation for primitive integers: Int::is_odd.

Source

fn int_ref_is_odd(&self) -> Result<bool>

Similar to int_is_odd, but operates on references instead of values.

Source

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the GCD.

§Implementations

See an implementation for primitive integers: Int::gcd.

Source

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Similar to int_gcd, but operates on references instead of values.

Source

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>
where Self: Sized,

Returns the GCD and the Bézout coeficients.

§Implementations

See an implementation for primitive integers: Int::gcd_ext.

Source

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Similar to int_gcd_ext, but operates on references instead of values.

Source

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the LCM.

§Implementations

See an implementation for primitive integers: Int::lcm.

Source

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Similar to int_lcm, but operates on references instead of values.

Source

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Returns a scaled value in [min..=max] to a new range [a..=b]. If the value lies outside of [min..=max] it will result in extrapolation.

§Errors

Can Overflow for extrapolated values that can’t fit the type, and for overflowing arithmetic operations in the following formula:

§Formulation

$$ \large v’ = (b - a) \frac{v - min}{max - min} + a $$

§Implementations

See an implementation for primitive integers: Int::scale.

Source

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_scale, but operates on references instead of values.

Source

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Returns a scaled value between [min..=max] to a new range [a..=b].

If the value lies outside of [min..=max] it will result in extrapolation, and if the value doesn’t fit in the type it will wrap around its boundaries.

§Panics

Could panic for very large values on some implementations.

§Formulation

$$ \large v’ = (b - a) \frac{v - min}{max - min} + a $$

§Implementations

See an implementation for primitive integers: Int::scale_wrap.

Source

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_scale_wrap, but operates on references instead of values.

Source

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the midpoint of self and other.

§Implementations

See an implementation for primitive integers: Int::midpoint.

Source

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Similar to int_midpoint, but operates on references instead of values.

Source

fn int_factorial(self) -> Result<Self::Out>
where Self: Sized,

Returns the factorial.

Permutations of n items, ordered, where $n = r$.

§Formulation

$$ n! = 1 \cdot 2 \cdot 3 \cdot \ldots \cdot (n-1) \cdot n $$

These are the maximum numbers whose factorials can fit within standard signed integer types:

  • 5 for i8, 7 for i16, 12 for i32, 20 for i64 and 33 for i128.
  • 5 for u8, 8 for u16, 12 for u32, 20 for u64 and 34 for u128.
§Errors

Returns NonNegativeRequired if $n<0$ and Overflow if the result can’t fit the type.

§Implementations

See an implementation for primitive integers: Int::factorial.

Source

fn int_ref_factorial(&self) -> Result<Self::Out>

Similar to int_factorial, but operates on references instead of values.

Source

fn int_subfactorial(self) -> Result<Self::Out>
where Self: Sized,

Returns the subfactorial, or the number of derangements.

Permutations of n items which no element appears in its original position.

§Formulation

The subfactorial $!n$ is defined recursively as: $$ !n = (n - 1) * (!(n - 1) + !(n - 2)) $$

These are the maximum numbers whose subfactorials can fit within standard signed integer types:

  • 5 for i8, 8 for i16, 12 for i32, 20 for i64 and 35 for i128.
  • 5 for u8, 8 for u16, 13 for u32, 20 for u64 and 35 for u128.
§Errors

Returns NonNegativeRequired if $n<0$, and Overflow if the result can’t fit the type.

§Implementations

See an implementation for primitive integers: Int::subfactorial.

Source

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Similar to int_subfactorial, but operates on references instead of values.

Source

fn int_combine(self, r: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of combinations of n items taken r at a time, unordered.

§Formulation

$$ \large C(n+r-1,r) = {n+k-1 \choose r} = \frac{(n+r-1)!}{(n−1)!r!} $$

§Errors

Returns MismatchedSizes if $r > n$ and Overflow if the result cant’t fit the type.

§Implementations

See an implementation for primitive integers: Int::combine.

Source

fn int_ref_combine(&self, r: &Self::Rhs) -> Result<Self::Out>

Similar to int_combine, but operates on references instead of values.

Source

fn int_combine_rep(self, r: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of permutations of n items taken r at a time with repetitions, unordered.

Also known as multichoose.

§Formulation

$$ \large C(n+r-1,r) = {n+k-1 \choose r} = \frac{(n+r-1)!}{(n−1)!r!} $$

§Errors

Returns Overflow if the result cant’t fit the type.

§Implementations

See an implementation for primitive integers: Int::combine_rep.

Source

fn int_ref_combine_rep(&self, r: &Self::Rhs) -> Result<Self::Out>

Similar to int_combine_rep, but operates on references instead of values.

Source

fn int_permute(self, r: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of permutations of n items taken r at a time, ordered.

When $n=r$ or $n=r-1$ the result is the same as calculating the factorial $n!$.

§Formulation

$$ \large P(n,r) = \frac{n!}{(n−r)!} $$

§Errors

Returns MismatchedSizes if $r > n$ and Overflow if the result cant’t fit the type.

§Implementations

See an implementation for primitive integers: Int::permute.

Source

fn int_ref_permute(&self, r: &Self::Rhs) -> Result<Self::Out>

Similar to int_permute, but operates on references instead of values.

Source

fn int_permute_rep(self, r: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the number of permutations of nitems takenr` at a time with repetitions, ordered.

§Formulation

$$ \large P_\text{rep}(n,r) = n_r $$

§Errors

Returns Overflow if the result cant’t fit the type.

§Implementations

See an implementation for primitive integers: Int::permute_rep.

Source

fn int_ref_permute_rep(&self, r: &Self::Rhs) -> Result<Self::Out>

Similar to int_permute_rep, but operates on references instead of values.

Source

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>
where Self: Sized,

Returns the truncated quotient and the remainder.

§Implementations

See an implementation for primitive integers: Int::div_rem.

Source

fn int_ref_div_rem(&self, b: &Self::Rhs) -> Result<[Self::Out; 2]>

Similar to int_div_rem, but operates on references instead of values.

Source

fn int_div_ceil(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding the result towards positive infinity.

§Formulation

$$ \large \left\lceil \frac{x}{y} \right\rceil $$

§Implementations

See an implementation for primitive integers: Int::div_ceil.

Source

fn int_ref_div_ceil(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_ceil, but operates on references instead of values.

Source

fn int_div_floor(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding the result towards negative infinity.

$$ \large \left\lfloor \frac{x}{y} \right\rfloor $$

§Implementations

See an implementation for primitive integers: Int::div_floor.

Source

fn int_ref_div_floor(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_floor, but operates on references instead of values.

Source

fn int_div_ties_away(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding ties away from zero.

§Implementations

See an implementation for primitive integers: Int::div_ties_away.

Source

fn int_ref_div_ties_away(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_ties_away, but operates on references instead of values.

Source

fn int_div_ties_towards(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding ties towards from zero.

§Implementations

See an implementation for primitive integers: Int::div_ties_towards.

Source

fn int_ref_div_ties_towards(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_ties_towards, but operates on references instead of values.

Source

fn int_div_ties_even(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding ties to the nearest even number.

§Implementations

See an implementation for primitive integers: Int::div_ties_even.

Source

fn int_ref_div_ties_even(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_ties_even, but operates on references instead of values.

Source

fn int_div_ties_odd(self, b: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Returns the quotient, rounding ties to the nearest odd number.

§Implementations

See an implementation for primitive integers: Int::div_ties_odd.

Source

fn int_ref_div_ties_odd(&self, b: &Self::Rhs) -> Result<Self::Out>

Similar to int_div_ties_odd, but operates on references instead of values.

Source

fn int_factors(self) -> Result<Vec<Self::Out>>
where Self: Sized,

Available on crate feature alloc only.

Returns the factors (including 1 and self).

This is the allocating version of int_factors_buf.

§Examples
assert_eq![24_i32.int_factors(), Ok(vec![1, 2, 3, 4, 6, 8, 12, 24])];
assert_eq![(-24_i32).int_factors(), Ok(vec![1, 2, 3, 4, 6, 8, 12, 24])];
assert_eq![0_i32.int_factors(), Ok(vec![])];
assert_eq![1_i32.int_factors(), Ok(vec![1])];
assert_eq![7_i32.int_factors(), Ok(vec![1, 7])];
§Implementations

See an implementation for primitive integers: Int::factors.

Source

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.

Similar to int_factors, but operates on references instead of values.

Source

fn int_factors_proper(self) -> Result<Vec<Self::Out>>
where Self: Sized,

Available on crate feature alloc only.

Returns the proper factors.

This is the allocating version of int_factors_proper_buf.

§Examples
assert_eq![24_i32.int_factors_proper(), Ok(vec![2, 3, 4, 6, 8, 12])];
assert_eq![(-24_i32).int_factors_proper(), Ok(vec![2, 3, 4, 6, 8, 12])];
assert_eq![0_i32.int_factors_proper(), Ok(vec![])];
assert_eq![1_i32.int_factors_proper(), Ok(vec![])];
assert_eq![7_i32.int_factors_proper(), Ok(vec![])];
§Implementations

See an implementation for primitive integers: Int::factors_proper.

Source

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.

Similar to int_factors_proper, but operates on references instead of values.

Source

fn int_factors_prime(self) -> Result<Vec<Self::Out>>
where Self: Sized,

Available on crate feature alloc only.

Returns the prime factors.

This is the allocating version of int_factors_prime_buf.

§Examples
assert_eq![24_i32.int_factors_prime(), Ok(vec![2, 2, 2, 3])];
assert_eq![(-24_i32).int_factors_prime(), Ok(vec![2, 2, 2, 3])];
assert_eq![0_i32.int_factors_prime(), Ok(vec![])];
assert_eq![1_i32.int_factors_prime(), Ok(vec![])];
assert_eq![7_i32.int_factors_prime(), Ok(vec![7])];
§Implementations

See an implementation for primitive integers: Int::factors_prime.

Source

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.

Similar to int_factors_prime, but operates on references instead of values.

Source

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>
where Self: Sized,

Available on crate feature alloc only.

Returns the unique prime factors.

This is the allocating version of int_factors_prime_unique_buf.

§Examples
assert_eq![24_i32.int_factors_prime_unique(), Ok(vec![2, 3])];
§Implementations

See an implementation for primitive integers: Int::factors_prime_unique.

Source

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.

Similar to int_factors_prime_unique, but operates on references instead of values.

Source

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>
where Self: Sized,

Writes the factors in fbuf, and the unique prime factors in upfbuf.

This is the non-allocating version of int_factors.

Returns a tuple with the number of factors and unique prime factors found.

§Errors

Returns MismatchedSizes if the total number of factors is greater than the length of any buffer.

§Examples
let (mut fbuf, mut upbuf) = ([0; 20], [0; 20]);
assert_eq![24_i32.int_factors_buf(&mut fbuf, &mut upbuf), Ok((8, 2))];

assert_eq![fbuf[..8], [1, 2, 3, 4, 6, 8, 12, 24]];
assert_eq![upbuf[..2], [2, 3]];
§Implementations

See an implementation for primitive integers: Int::factors_buf.

Source

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Similar to int_factors_buf, but operates on references instead of values.

Source

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>
where Self: Sized,

Writes the proper factors in fbuf, and the unique prime factors in upfbuf.

This is the non-allocating version of int_factors_proper.

Returns a tuple with the number of factors and unique prime factors found.

§Errors

Returns MismatchedSizes if the total number of factors is greater than the length of any buffer.

§Examples
let (mut fbuf, mut upbuf) = ([0; 20], [0; 20]);
assert_eq![24_i32.int_factors_proper_buf(&mut fbuf, &mut upbuf), Ok((6, 2))];

assert_eq![fbuf[..6], [2, 3, 4, 6, 8, 12,]];
assert_eq![upbuf[..2], [2, 3]];
§Implementations

See an implementation for primitive integers: Int::factors_proper_buf.

Source

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Similar to int_factors_proper_buf, but operates on references instead of values.

Source

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>
where Self: Sized,

Writes the prime factors in the given buffer.

This is the non-allocating version of int_factors_prime.

Returns the number of factors found.

§Errors

Returns MismatchedSizes if the total number of factors is greater than the length of the buffer.

§Examples
let mut buf = [0; 5];
assert_eq![24_i32.int_factors_prime_buf(&mut buf), Ok(4)];

assert_eq![buf[..4], [2, 2, 2, 3]];
assert![(24_i32 * 4).int_factors_prime_buf(&mut buf).is_err()];
assert_eq![buf, [2, 2, 2, 2, 2]]; // the 3 didn't fit

assert_eq![0_i32.int_factors_prime_buf(&mut buf), Ok(0)];
assert_eq![1_i32.int_factors_prime_buf(&mut buf), Ok(0)];
assert_eq![7_i32.int_factors_prime_buf(&mut buf), Ok(1)];
assert_eq![buf[..1], [7]];
§Implementations

See an implementation for primitive integers: Int::factors_prime_buf.

Source

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Similar to int_factors_prime_buf, but operates on references instead of values.

Source

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>
where Self: Sized,

Writes the prime factors in the given buffer.

This is the non-allocating version of int_factors_prime_unique.

The buffer must be large enough to hold all the non-unique factors of n. In that case the function will return the number of unique factors found.

§Errors

Returns MismatchedSizes if the unique number of factors is greater than the length of the buffer. In that case the buffer will only contain the non-unique factors that can fit, like int_factors_prime_buf.

§Examples
let mut uniq = [0; 5];
assert_eq![24_i32.int_factors_prime_unique_buf(&mut uniq), Ok(2)];
assert_eq![uniq, [2, 3, 2, 3, 0]];
§Implementations

See an implementation for primitive integers: Int::factors_prime_unique_buf.

Source

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Similar to int_factors_prime_unique_buf, but operates on references instead of values.

Source

fn int_is_prime(self) -> Result<bool>
where Self: Sized,

Returns true if n is prime.

§Implementations

See an implementation for primitive integers: Int::is_prime.

Source

fn int_ref_is_prime(&self) -> Result<bool>

Similar to int_is_prime, but operates on references instead of values.

Source

fn int_prime_nth(self) -> Result<Self::Out>
where Self: Sized,

Finds the 0-indexed nth prime number.

Note: If nth is negative, this function should treat it as its absolute value.

§Errors

Returns Overflow if the result can’t fit the type.

§Implementations

See an implementation for primitive integers: Int::prime_nth.

Source

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Similar to int_prime_nth, but operates on references instead of values.

Source

fn int_prime_pi(self) -> Result<usize>
where Self: Sized,

Counts the number of primes upto and including n.

$$ \pi(x) $$

§Implementations

See an implementation for primitive integers: Int::prime_pi.

Source

fn int_ref_prime_pi(&self) -> Result<usize>

Similar to int_prime_pi, but operates on references instead of values.

Source

fn int_totient(self) -> Result<Self::Out>
where Self: Sized,

Counts the number of integers $<|n|$ that are relatively prime to n.

Note: If n is negative, this function should treat it as its absolute value.

§Implementations

See an implementation for primitive integers: Int::totient.

Source

fn int_ref_totient(&self) -> Result<Self::Out>

Similar to int_totient, but operates on references instead of values.

Source

fn int_is_square(self) -> Result<bool>
where Self: Sized,

Returns true if it’s a perfect square.

Returns false otherwise, which includes all possible negative values.

§Errors

Returns NonNegativeRequired if $n<0$ and Overflow if the result can’t fit the type.

§Formulation

$$ \large \text{is\textunderscore square}(a) = \begin{cases} \text{true} & \text{if } \left(\lfloor \sqrt{a} \rfloor\right)^2 = a \cr \text{false} & \text{if } \left(\lfloor \sqrt{a} \rfloor\right)^2 \neq a \end{cases} $$

§Implementations

See an implementation for primitive integers: Int::is_square.

Source

fn int_ref_is_square(&self) -> Result<bool>

Similar to int_is_square, but operates on references instead of values.

Source

fn int_sqrt_ceil(self) -> Result<Self::Out>
where Self: Sized,

Returns the ceiled integer square root.

§Errors

Returns NonNegativeRequired if self is negative.

§Formulation

$$ \large \begin{align} \notag \left\lceil \sqrt{a} \thinspace\right\rceil = \begin{cases} n & \text{if } n^2 = a \cr n+1 & \text{if } n^2 < a \end{cases} \cr \notag \normalsize\text{where } n = \lfloor \sqrt{a} \rfloor & \end{align} $$

§Implementations

See an implementation for primitive integers: Int::sqrt_ceil.

Source

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Similar to int_sqrt_ceil, but operates on references instead of values.

Source

fn int_sqrt_floor(self) -> Result<Self::Out>
where Self: Sized,

Returns the floored integer square root.

§Errors

Returns NonNegativeRequired if self is negative.

§Formulation
§Algorithm

$$ \large \left\lfloor \sqrt{a} \right\rfloor = n_{k} $$

Where $n_{k}$ is the result of a sequence of estimates that starts with an initial $n_{0} = a/2$ which is updated using Heron’s method:

$$ \large n_{i+1} = n_{i} - ( n_{i}^{2} - a) / 2n_{i}, \quad \small\text{for} \quad i = 0, 1, \ldots, k, $$

Where $n_{i}$ is the current estimate, $n_{i+1}$ is the next estimate, $a$ is self, and $k$ is the number of iterations needed to converge to a solution, on the order of the number of bits of self, about $O(\log_2 b)$, which for e.g. 128 bits would be $ ±7 $ iterations.

Hence, the function continues updating the estimate until reaching $n_{k}$, which provides the largest integer less than or equal to the square root of a.

§Implementations

See an implementation for primitive integers: Int::sqrt_floor.

Source

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Similar to int_sqrt_floor, but operates on references instead of values.

Source

fn int_sqrt_round(self) -> Result<Self::Out>
where Self: Sized,

Returns the rounded integer square root.

§Formulation
§Algorithm

$$ \begin{align} \notag \left\lfloor\sqrt{a} \thinspace\right\rceil = \begin{cases} n & \text{if } a - n^2 < (n+1)^2 - a \cr n+1 & \text{if } a - n^2 \geq (n+1)^2 - a \end{cases} \cr \notag \normalsize\text{where } n = \lfloor \sqrt{a} \rfloor & \end{align} $$

§Implementations

See an implementation for primitive integers: Int::sqrt_round.

Source

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Similar to int_sqrt_round, but operates on references instead of values.

Source

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>
where Self: Sized,

Returns the ceiled integer nth root.

$$ \large \left\lceil |a|^{\frac{1}{n}} \right\rceil \cdot \text{sign}(a) = m $$

§Errors

Returns NonZeroRequired if nth is 0, or NonNegativeRequired if self is negative and nth is even.

§Implementations

See an implementation for primitive integers: Int::root_ceil.

Source

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Similar to int_root_ceil, but operates on references instead of values.

Source

fn int_root_floor(self, nth: u32) -> Result<Self::Out>
where Self: Sized,

Returns the floored integer nth root.

$$ \large \left\lfloor |a|^{\frac{1}{n}} \right\rfloor = m \cdot \text{sign}(a) $$

§Errors

Returns NonZeroRequired if nth is 0, or NonNegativeRequired if self is negative and nth is even.

§Implementations

See an implementation for primitive integers: Int::root_floor.

Source

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Similar to int_root_floor, but operates on references instead of values.

Source

fn int_modulo(self, modulus: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Computes the non-negative modulo of self over |modulus|.

The result is non-negative and less than the absolute value of modulus, i.e., in the range $ [0, |\text{modulus}|) $.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo.

Source

fn int_ref_modulo(&self, modulus: &Self::Rhs) -> Result<Self::Out>

Similar to int_modulo, but operates on references instead of values.

Source

fn int_modulo_cycles( self, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Computes the non-negative modulo of self over |modulus|, and the number of cycles it is reduced.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_cycles.

Source

fn int_ref_modulo_cycles( &self, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Similar to int_modulo_cycles, but operates on references instead of values.

Source

fn int_modulo_add( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Computes the modulo of self + other over |modulus|.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_add.

Source

fn int_ref_modulo_add( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_modulo_add, but operates on references instead of values.

Source

fn int_modulo_add_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Computes the modulo of self + other over |modulus|, and the number of cycles the result is reduced.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_add_cycles.

Source

fn int_ref_modulo_add_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Similar to int_modulo_add_cycles, but operates on references instead of values.

Source

fn int_modulo_add_inv(self, modulus: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Calculates the modular additive inverse.

The modular additive inverse of self modulo modulus is an integer b such that $ a+b \equiv 0 (\mod m) $.

The modular multiplicative inverse always exists and is simply modulus - self if self != 0, or 0 otherwise.

§Errors

Returns NonZeroRequired if modulus == 0.

§Implementations

See an implementation for primitive integers: Int::modulo_add_inv.

Source

fn int_ref_modulo_add_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out>

Similar to int_modulo_add_inv, but operates on references instead of values.

Source

fn int_modulo_sub( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Computes the modulo of self - other over |modulus|.

§Errors

Returns NonZeroRequired if modulus == 0, and Overflow if the result would be a negative value.

§Implementations

See an implementation for primitive integers: Int::modulo_sub.

Source

fn int_ref_modulo_sub( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_modulo_sub, but operates on references instead of values.

Source

fn int_modulo_sub_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Computes the modulo of self - other over |modulus|, and the number of cycles the result is reduced.

§Errors

Returns NonZeroRequired if modulus == 0, and Overflow if the result would be a negative value.

§Implementations

See an implementation for primitive integers: Int::modulo_sub_cycles.

Source

fn int_ref_modulo_sub_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Similar to int_modulo_sub_cycles, but operates on references instead of values.

Source

fn int_modulo_mul( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Computes the modulo of self + other over |modulus|.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_mul.

Source

fn int_ref_modulo_mul( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_modulo_mul, but operates on references instead of values.

Source

fn int_modulo_mul_cycles( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Computes the modulo of self + other over |modulus|, and the number of cycles the result is reduced.

§Errors

Returns NonZeroRequired if modulus == 0, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_mul_cycles.

Source

fn int_ref_modulo_mul_cycles( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<ValueQuant<Self::Out, Self::Out>>
where Self: Sized,

Similar to int_modulo_mul_cycles, but operates on references instead of values.

Source

fn int_modulo_mul_inv(self, modulus: Self::Rhs) -> Result<Self::Out>
where Self: Sized,

Calculates the modular multiplicative inverse.

The modular multiplicative inverse of a modulo m is an integer b such that $ ab \equiv 1 (\mod m) $.

The modular multiplicative inverse exists only if self and modulus are coprime, meaning their greatest common divisor is 1.

§Errors

Returns NonZeroRequired if modulus == 0, [NoInverse] if there’s no inverse, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_mul_inv.

Source

fn int_ref_modulo_mul_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out>

Similar to int_modulo_mul_inv, but operates on references instead of values.

Source

fn int_modulo_div( self, other: Self::Rhs, modulus: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Computes self / other over |modulus|.

$a / b \mod m$ is equivalent to $a * b^{-1} \mod m$, where $b^{-1}$ is the modular multiplicative inverse of $b$ modulo $m$.

§Errors

Returns NonZeroRequired if modulus == 0, [NoInverse] if there’s no multiplicative inverse of other, and it could also return Overflow.

§Implementations

See an implementation for primitive integers: Int::modulo_div.

Source

fn int_ref_modulo_div( &self, other: &Self::Rhs, modulus: &Self::Rhs, ) -> Result<Self::Out>

Similar to int_modulo_div, but operates on references instead of values.

Implementations on Foreign Types§

Source§

impl NumInt for i8

Available on crate feature _int_i8 only.
Source§

type OutI = i8

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for i16

Available on crate feature _int_i16 only.
Source§

type OutI = i16

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for i32

Available on crate feature _int_i32 only.
Source§

type OutI = i32

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for i64

Available on crate feature _int_i64 only.
Source§

type OutI = i64

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for i128

Available on crate feature _int_i128 only.
Source§

type OutI = i128

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for isize

Available on crate feature _int_isize only.
Source§

type OutI = isize

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for u8

Available on crate feature _int_u8 only.
Source§

type OutI = i16

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for u16

Available on crate feature _int_u16 only.
Source§

type OutI = i32

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for u32

Available on crate feature _int_u32 only.
Source§

type OutI = i64

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for u64

Available on crate feature _int_u64 only.
Source§

type OutI = i128

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for u128

Available on crate feature _int_u128 only.
Source§

type OutI = i128

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Source§

impl NumInt for usize

Available on crate feature _int_usize only.
Source§

type OutI = i128

Source§

fn int_digital_root(self) -> Result<Self::Out>

Source§

fn int_ref_digital_root(&self) -> Result<Self::Out>

Source§

fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits(self) -> Result<Self::Out>

Source§

fn int_ref_digits(&self) -> Result<Self::Out>

Source§

fn int_digits_sign(self) -> Result<Self::Out>

Source§

fn int_ref_digits_sign(&self) -> Result<Self::Out>

Source§

fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_abs(self) -> Result<Self::Out>

Source§

fn int_ref_abs(&self) -> Result<Self::Out>

Source§

fn int_is_even(self) -> Result<bool>

Source§

fn int_ref_is_even(&self) -> Result<bool>

Source§

fn int_is_odd(self) -> Result<bool>

Source§

fn int_ref_is_odd(&self) -> Result<bool>

Source§

fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_scale( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_scale_wrap( self, min: Self::Rhs, max: Self::Rhs, a: Self::Rhs, b: Self::Rhs, ) -> Result<Self::Out>
where Self: Sized,

Source§

fn int_ref_scale_wrap( &self, min: &Self::Rhs, max: &Self::Rhs, a: &Self::Rhs, b: &Self::Rhs, ) -> Result<Self::Out>

Source§

fn int_factorial(self) -> Result<Self::Out>

Source§

fn int_ref_factorial(&self) -> Result<Self::Out>

Source§

fn int_subfactorial(self) -> Result<Self::Out>

Source§

fn int_ref_subfactorial(&self) -> Result<Self::Out>

Source§

fn int_permute(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_permute_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_permute_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_combine_rep(self, r: Self) -> Result<Self::Out>

Source§

fn int_ref_combine_rep(&self, r: &Self) -> Result<Self::Out>

Source§

fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>

Source§

fn int_div_ceil(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_floor(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_away(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_towards(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_even(self, b: Self) -> Result<Self::Out>

Source§

fn int_div_ties_odd(self, b: Self) -> Result<Self::Out>

Source§

fn int_factors(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_proper(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>

Available on crate feature alloc only.
Source§

fn int_factors_buf( self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_proper_buf( self, fbuf: &mut [Self], upfbuf: &mut [Self], ) -> Result<(usize, usize)>

Source§

fn int_ref_factors_proper_buf( &self, fbuf: &mut [Self::Out], upfbuf: &mut [Self::Out], ) -> Result<(usize, usize)>

Source§

fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>

Source§

fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>

Source§

fn int_ref_factors_prime_unique_buf( &self, buffer: &mut [Self::Out], ) -> Result<usize>

Source§

fn int_modulo(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_add_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_add_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_add_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_add_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_sub(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_sub_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_sub_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_modulo_mul(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_mul_cycles( self, other: Self, modulus: Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_ref_modulo_mul_cycles( &self, other: &Self, modulus: &Self, ) -> Result<ValueQuant<Self, Self>>

Source§

fn int_is_prime(self) -> Result<bool>

Source§

fn int_ref_is_prime(&self) -> Result<bool>

Source§

fn int_prime_nth(self) -> Result<Self::Out>

Source§

fn int_ref_prime_nth(&self) -> Result<Self::Out>

Source§

fn int_prime_pi(self) -> Result<usize>

Source§

fn int_ref_prime_pi(&self) -> Result<usize>

Source§

fn int_totient(self) -> Result<Self::Out>

Source§

fn int_ref_totient(&self) -> Result<Self::Out>

Source§

fn int_is_square(self) -> Result<bool>

Source§

fn int_ref_is_square(&self) -> Result<bool>

Source§

fn int_root_ceil(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_root_floor(self, nth: u32) -> Result<Self::Out>

Source§

fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>

Source§

fn int_gcd_ext( self, other: Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_ref_gcd_ext( &self, other: &Self::Rhs, ) -> Result<GcdReturn<Self::Out, Self::OutI>>

Source§

fn int_midpoint(self, other: Self::Rhs) -> Result<Self::Out>

Source§

fn int_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>

Source§

fn int_modulo_mul_inv(self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_mul_inv(&self, modulus: &Self) -> Result<Self>

Source§

fn int_modulo_div(self, other: Self, modulus: Self) -> Result<Self>

Source§

fn int_ref_modulo_div(&self, other: &Self, modulus: &Self) -> Result<Self>

Source§

fn int_sqrt_ceil(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>

Source§

fn int_sqrt_floor(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_floor(&self) -> Result<Self::Out>

Source§

fn int_sqrt_round(self) -> Result<Self::Out>

Source§

fn int_ref_sqrt_round(&self) -> Result<Self::Out>

Implementors§

Source§

impl NumInt for NoNum

Available on _int·· only.