pub type NoNum = ();
Expand description
Represents the absence of a number.
This can be used anywhere an implementation of Num
is expected,
since it implements all the numeric traits, but does nothing.
Trait Implementations§
Source§impl Num for NoNum
impl Num for NoNum
Source§fn num_from(value: Self::Inner) -> Result<Self>where
Self: Sized,
fn num_from(value: Self::Inner) -> Result<Self>where
Self: Sized,
Returns
Self
if given a valid value
.Source§fn num_from_ref(value: &Self::Inner) -> Result<Self>where
Self: Sized,
fn num_from_ref(value: &Self::Inner) -> Result<Self>where
Self: Sized,
Returns
Self
if given a valid &value
.Source§fn num_set_ref(&mut self, value: &Self::Inner) -> Result<()>
fn num_set_ref(&mut self, value: &Self::Inner) -> Result<()>
Sets
self
to the given valid &value
.Source§fn num_is_zero(&self) -> Result<bool>
fn num_is_zero(&self) -> Result<bool>
Returns
true
if self
is zero.Source§fn num_get_zero() -> Result<Self>where
Self: Sized,
fn num_get_zero() -> Result<Self>where
Self: Sized,
Returns the number zero.
Source§fn num_set_zero(&mut self) -> Result<()>
fn num_set_zero(&mut self) -> Result<()>
Sets
self
to 0
.Source§fn num_is_one(&self) -> Result<bool>
fn num_is_one(&self) -> Result<bool>
Returns
true
if self
is one.Source§fn num_get_one() -> Result<Self>where
Self: Sized,
fn num_get_one() -> Result<Self>where
Self: Sized,
Returns the number one.
Source§fn num_set_one(&mut self) -> Result<()>
fn num_set_one(&mut self) -> Result<()>
Sets the number to one.
Source§fn num_add(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
fn num_add(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Computes
self + rhs
(addition).Source§fn num_ref_add(&self, rhs: &Self::Rhs) -> Result<Self::Out>
fn num_ref_add(&self, rhs: &Self::Rhs) -> Result<Self::Out>
Like
num_add
but takes the arguments by reference.Source§fn num_ref_add_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
fn num_ref_add_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
Computes
&mut self += rhs;
(addition).Source§fn num_sub(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
fn num_sub(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Computes
self - rhs
(subtraction).Source§fn num_ref_sub(&self, rhs: &Self::Rhs) -> Result<Self::Out>
fn num_ref_sub(&self, rhs: &Self::Rhs) -> Result<Self::Out>
Like
num_sub
but takes the arguments by reference.Source§fn num_ref_sub_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
fn num_ref_sub_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
Computes
&mut self -= rhs;
(subtraction).Source§fn num_mul(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
fn num_mul(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Computes
self * rhs
(multiplication).Source§fn num_ref_mul(&self, rhs: &Self::Rhs) -> Result<Self::Out>
fn num_ref_mul(&self, rhs: &Self::Rhs) -> Result<Self::Out>
Like
num_mul
but takes the arguments by reference.Source§fn num_ref_mul_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
fn num_ref_mul_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
Computes
&mut self *= rhs;
(multiplication).Source§fn num_div(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
fn num_div(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Computes
self / rhs
(division).Source§fn num_ref_div(&self, rhs: &Self::Rhs) -> Result<Self::Out>
fn num_ref_div(&self, rhs: &Self::Rhs) -> Result<Self::Out>
Like
num_div
but takes the arguments by reference.Source§fn num_ref_div_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
fn num_ref_div_assign(&mut self, rhs: &Self::Rhs) -> Result<()>
Computes
&mut self /= rhs;
(division).Source§fn num_rem(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
fn num_rem(self, rhs: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Computes
self % rhs
(remainder).Source§fn num_ref_rem(&self, rhs: &Self::Rhs) -> Result<Self::Out>
fn num_ref_rem(&self, rhs: &Self::Rhs) -> Result<Self::Out>
Like
num_rem
but takes the arguments by reference.Source§impl NumInt for NoNum
Available on _int··
only.
impl NumInt for NoNum
Available on
_int··
only.Source§fn int_digital_root(self) -> Result<Self::Out>where
Self: Sized,
fn int_digital_root(self) -> Result<Self::Out>where
Self: Sized,
Returns the digital root in base 10. Read more
Source§fn int_ref_digital_root(&self) -> Result<Self::Out>
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,
fn int_digital_root_base(self, base: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the digital root in the given
base
. Read moreSource§fn int_ref_digital_root_base(&self, base: &Self::Rhs) -> Result<Self::Out>
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,
fn int_digits(self) -> Result<Self::Out>where
Self: Sized,
Returns the number of digits in base 10. Read more
Source§fn int_ref_digits(&self) -> Result<Self::Out>
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,
fn int_digits_sign(self) -> Result<Self::Out>where
Self: Sized,
Returns the number of digits in base 10 including the negative sign. Read more
Source§fn int_ref_digits_sign(&self) -> Result<Self::Out>
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,
fn int_digits_base(self, base: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the number of digits in the given
base
. Read moreSource§fn int_ref_digits_base(&self, base: &Self::Rhs) -> Result<Self::Out>
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,
fn int_digits_base_sign(self, base: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the number of digits in the given
base
. Read moreSource§fn int_ref_digits_base_sign(&self, base: &Self::Rhs) -> Result<Self::Out>
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_ref_abs(&self) -> Result<Self::Out>
fn int_ref_abs(&self) -> Result<Self::Out>
Similar to int_abs, but operates on references instead of values.
Source§fn int_ref_is_even(&self) -> Result<bool>
fn int_ref_is_even(&self) -> Result<bool>
Similar to int_is_even, but operates on references instead of values.
Source§fn int_ref_is_odd(&self) -> Result<bool>
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,
fn int_gcd(self, other: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the GCD. Read more
Source§fn int_ref_gcd(&self, other: &Self::Rhs) -> Result<Self::Out>
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,
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. Read more
Source§fn int_ref_gcd_ext(
&self,
other: &Self::Rhs,
) -> Result<GcdReturn<Self::Out, Self::OutI>>
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,
fn int_lcm(self, other: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the LCM. Read more
Source§fn int_ref_lcm(&self, other: &Self::Rhs) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_scale(
&self,
min: &Self::Rhs,
max: &Self::Rhs,
a: &Self::Rhs,
b: &Self::Rhs,
) -> Result<Self::Out>
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,
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>
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_ref_midpoint(&self, other: &Self::Rhs) -> Result<Self::Out>
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,
fn int_factorial(self) -> Result<Self::Out>where
Self: Sized,
Returns the factorial. Read more
Source§fn int_ref_factorial(&self) -> Result<Self::Out>
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,
fn int_subfactorial(self) -> Result<Self::Out>where
Self: Sized,
Returns the subfactorial, or the number of derangements. Read more
Source§fn int_ref_subfactorial(&self) -> Result<Self::Out>
fn int_ref_subfactorial(&self) -> Result<Self::Out>
Similar to int_subfactorial, but operates on references instead of values.
Source§fn int_ref_combine(&self, r: &Self::Rhs) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_combine_rep(&self, r: &Self::Rhs) -> Result<Self::Out>
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_ref_permute(&self, r: &Self::Rhs) -> Result<Self::Out>
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,
fn int_permute_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,
ordered. Read moreSource§fn int_ref_permute_rep(&self, r: &Self::Rhs) -> Result<Self::Out>
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,
fn int_div_rem(self, b: Self::Rhs) -> Result<[Self::Out; 2]>where
Self: Sized,
Returns the truncated quotient and the remainder. Read more
Source§fn int_ref_div_rem(&self, b: &Self::Rhs) -> Result<[Self::Out; 2]>
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,
fn int_div_ceil(self, b: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the quotient, rounding the result towards positive infinity. Read more
Source§fn int_ref_div_ceil(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
fn int_div_floor(self, b: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the quotient, rounding the result towards negative infinity. Read more
Source§fn int_ref_div_floor(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
fn int_div_ties_away(self, b: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the quotient, rounding ties away from zero. Read more
Source§fn int_ref_div_ties_away(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
fn int_div_ties_towards(self, b: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Returns the quotient, rounding ties towards from zero. Read more
Source§fn int_ref_div_ties_towards(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
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. Read more
Source§fn int_ref_div_ties_even(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
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. Read more
Source§fn int_ref_div_ties_odd(&self, b: &Self::Rhs) -> Result<Self::Out>
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,
fn int_factors(self) -> Result<Vec<Self::Out>>where
Self: Sized,
Available on crate feature
alloc
only.Returns the factors (including 1 and self). Read more
Source§fn int_ref_factors(&self) -> Result<Vec<Self::Out>>
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,
fn int_factors_proper(self) -> Result<Vec<Self::Out>>where
Self: Sized,
Available on crate feature
alloc
only.Returns the proper factors. Read more
Source§fn int_ref_factors_proper(&self) -> Result<Vec<Self::Out>>
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,
fn int_factors_prime(self) -> Result<Vec<Self::Out>>where
Self: Sized,
Available on crate feature
alloc
only.Returns the prime factors. Read more
Source§fn int_ref_factors_prime(&self) -> Result<Vec<Self::Out>>
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,
fn int_factors_prime_unique(self) -> Result<Vec<Self::Out>>where
Self: Sized,
Available on crate feature
alloc
only.Returns the unique prime factors. Read more
Source§fn int_ref_factors_prime_unique(&self) -> Result<Vec<Self::Out>>
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,
fn int_factors_buf(
self,
fbuf: &mut [Self::Out],
upfbuf: &mut [Self::Out],
) -> Result<(usize, usize)>where
Self: Sized,
Source§fn int_ref_factors_buf(
&self,
fbuf: &mut [Self::Out],
upfbuf: &mut [Self::Out],
) -> Result<(usize, usize)>
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,
fn int_factors_proper_buf(
self,
fbuf: &mut [Self],
upfbuf: &mut [Self],
) -> Result<(usize, usize)>where
Self: Sized,
Source§fn int_ref_factors_proper_buf(
&self,
fbuf: &mut [Self::Out],
upfbuf: &mut [Self::Out],
) -> Result<(usize, usize)>
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,
fn int_factors_prime_buf(self, buffer: &mut [Self]) -> Result<usize>where
Self: Sized,
Writes the prime factors in the given
buffer
. Read moreSource§fn int_ref_factors_prime_buf(&self, buffer: &mut [Self::Out]) -> Result<usize>
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,
fn int_factors_prime_unique_buf(self, buffer: &mut [Self]) -> Result<usize>where
Self: Sized,
Writes the prime factors in the given
buffer
. Read moreSource§fn int_ref_factors_prime_unique_buf(
&self,
buffer: &mut [Self::Out],
) -> Result<usize>
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_ref_is_prime(&self) -> Result<bool>
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,
fn int_prime_nth(self) -> Result<Self::Out>where
Self: Sized,
Finds the 0-indexed
nth
prime number. Read moreSource§fn int_ref_prime_nth(&self) -> Result<Self::Out>
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,
fn int_prime_pi(self) -> Result<usize>where
Self: Sized,
Counts the number of primes upto and including
n
. Read moreSource§fn int_ref_prime_pi(&self) -> Result<usize>
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,
fn int_totient(self) -> Result<Self::Out>where
Self: Sized,
Counts the number of integers $<|n|$ that are relatively prime to
n
. Read moreSource§fn int_ref_totient(&self) -> Result<Self::Out>
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,
fn int_is_square(self) -> Result<bool>where
Self: Sized,
Returns
true
if it’s a perfect square. Read moreSource§fn int_ref_is_square(&self) -> Result<bool>
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,
fn int_sqrt_ceil(self) -> Result<Self::Out>where
Self: Sized,
Returns the ceiled integer square root. Read more
Source§fn int_ref_sqrt_ceil(&self) -> Result<Self::Out>
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,
fn int_sqrt_floor(self) -> Result<Self::Out>where
Self: Sized,
Returns the floored integer square root. Read more
Source§fn int_ref_sqrt_floor(&self) -> Result<Self::Out>
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,
fn int_sqrt_round(self) -> Result<Self::Out>where
Self: Sized,
Returns the rounded integer square root. Read more
Source§fn int_ref_sqrt_round(&self) -> Result<Self::Out>
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,
fn int_root_ceil(self, nth: u32) -> Result<Self::Out>where
Self: Sized,
Returns the ceiled integer
nth
root. Read moreSource§fn int_ref_root_ceil(&self, nth: u32) -> Result<Self::Out>
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,
fn int_root_floor(self, nth: u32) -> Result<Self::Out>where
Self: Sized,
Returns the floored integer
nth
root. Read moreSource§fn int_ref_root_floor(&self, nth: u32) -> Result<Self::Out>
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_ref_modulo(&self, modulus: &Self::Rhs) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_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,
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,
fn int_modulo_add(
self,
other: Self::Rhs,
modulus: Self::Rhs,
) -> Result<Self::Out>where
Self: Sized,
Source§fn int_ref_modulo_add(
&self,
other: &Self::Rhs,
modulus: &Self::Rhs,
) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_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,
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,
fn int_modulo_add_inv(self, modulus: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Calculates the modular additive inverse. Read more
Source§fn int_ref_modulo_add_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out>
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,
fn int_modulo_sub(
self,
other: Self::Rhs,
modulus: Self::Rhs,
) -> Result<Self::Out>where
Self: Sized,
Source§fn int_ref_modulo_sub(
&self,
other: &Self::Rhs,
modulus: &Self::Rhs,
) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_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,
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,
fn int_modulo_mul(
self,
other: Self::Rhs,
modulus: Self::Rhs,
) -> Result<Self::Out>where
Self: Sized,
Source§fn int_ref_modulo_mul(
&self,
other: &Self::Rhs,
modulus: &Self::Rhs,
) -> Result<Self::Out>
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,
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. Read moreSource§fn int_ref_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,
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,
fn int_modulo_mul_inv(self, modulus: Self::Rhs) -> Result<Self::Out>where
Self: Sized,
Calculates the modular multiplicative inverse. Read more
Source§fn int_ref_modulo_mul_inv(&self, modulus: &Self::Rhs) -> Result<Self::Out>
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,
fn int_modulo_div(
self,
other: Self::Rhs,
modulus: Self::Rhs,
) -> Result<Self::Out>where
Self: Sized,
Source§fn int_ref_modulo_div(
&self,
other: &Self::Rhs,
modulus: &Self::Rhs,
) -> Result<Self::Out>
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.