Integer64

Struct Integer64 

Source
pub struct Integer64(pub i64);
Expand description

A 64-bit integer number, from the set $\Z$, also known as Z64.

The range of valid numeric values is $\lbrack$i64::MIN $\dots$ i64::MAX$\rbrack$. It is equivalent to the i64 primitive.

Tuple Fields§

§0: i64

Implementations§

Source§

impl Integer64

§Methods for all integers

Source

pub const fn is_even(&self) -> bool

Returns true if this integer is even.

Source

pub const fn is_odd(&self) -> bool

Returns true if this integer is odd.

Source

pub const fn is_multiple_of(&self, other: &Self) -> bool

Returns true if this integer is a multiple of the other.

Source

pub const fn is_divisor_of(&self, other: &Self) -> bool

Returns true if this integer is a divisor of the other.

Source

pub const fn is_coprime(&self, other: &Self) -> bool

Returns true if self and other are relative primes, which means they have only 1 as their only common divisor.

§Notation

$a \perp b$.

Source

pub const fn digits(&self) -> usize

Returns the number of digits in base 10.

Source§

impl Integer64

§Methods for non-negative integers

Source

pub fn is_prime(&self) -> Option<bool>

Returns Some(true) if this integer is prime, Some(false) if it’s not prime, or None if it can not be determined.

Returns None if this integer can’t be represented as a usize, or as a u32 in no-std.

Source

pub const fn gcd(&self, other: &Self) -> Self

Calculates the Greatest Common Divisor of this integer and other.

Source

pub const fn lcm(&self, other: &Self) -> Self

Calculates the Lowest Common Multiple of this integer and other.

Source§

impl Integer64

§Addition

Source

pub const fn add(self, rhs: Integer64) -> Integer64

Integer addition.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source

pub const fn checked_add(self, rhs: Integer64) -> Option<Integer64>

Checked addition.

Returns None on overflow.

Source

pub const fn saturating_add(self, rhs: Integer64) -> Integer64

Saturating addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

Source

pub const fn wrapping_add(self, rhs: Integer64) -> Integer64

Wrapping (modular) addition. Computes self + rhs, wrapping around at the boundary of the type.

Source

pub const fn overflowing_add(self, rhs: Integer64) -> (Integer64, bool)

Overflowing addition.

Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

Source§

impl Integer64

§Division

§Comparison of division functions
§Only the quotient:

dividend|divisor||float||trunc|euclid|floor|ceil||away|even| :——:|:—–:||:—–:||:—–:|:——:|:––:|:—–:||:––:|:––:| 7 | 3 || 2.33… || 2 | 2 | 2 | 3 || 2 | 2 | 7 | -3 || “ || -2 | -2 | -3 | -2 || -2 | -2 | -7 | 3 || “ || -2 | -3 | -3 | -2 || -2 | -2 | -7 | -3 || “ || 2 | 3 | 2 | 3 || 2 | 2 | | || || | | | || | | 8 | 5 || 1.6 || 1 | 1 | 1 | 2 || 2 | 2 | 6 | 4 || 1.5 || 1 | 1 | 1 | 2 || 2 | 2 | 7 | 5 || 1.25 || 1 | 1 | 1 | 2 || 1 | 2 |

Source

pub const fn div_trunc(self, rhs: Integer64) -> Integer64

Truncated division.

Rounds the quotient towards zero, or away from infinity.

§Panics

If rhs is 0 or if division results in overflow.

§Examples
assert_eq![Z8::new(7).div_trunc(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_trunc(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_trunc(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_trunc(Z8::new(-3)), Z8::new(2)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
Source

pub const fn checked_div_trunc(self, rhs: Integer64) -> Option<Integer64>

Returns the checked truncated division.

Rounds the quotient towards zero, or away from infinity.

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_trunc(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_trunc(Z8::new(-1)), None]; // overflow
Source

pub const fn div_euclid(self, rhs: Integer64) -> Integer64

Returns the euclidean division.

Ensures that the remainder is always non-negative and smaller than the divisor.

§Panics

If rhs is 0 or if division results in overflow.

§Examples
assert_eq![Z8::new(7).div_euclid(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_euclid(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_euclid(Z8::new(3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_euclid(Z8::new(-3)), Z8::new(3)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
Source

pub const fn checked_div_euclid(self, rhs: Integer64) -> Option<Integer64>

Returns the checked euclidean division.

Ensures that the remainder is always non-negative and smaller than the divisor.

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_euclid(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_euclid(Z8::new(-1)), None]; // overflow
Source

pub const fn div_floor(self, rhs: Integer64) -> Integer64

Returns the floored division

Rounds the quotient towards negative infinity.

§Panics

If rhs is 0 or if the division results in overflow.

§Notation

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

§Examples
assert_eq![Z8::new(7).div_floor(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_floor(Z8::new(-3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_floor(Z8::new(3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_floor(Z8::new(-3)), Z8::new(2)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
Source

pub const fn checked_div_floor(self, rhs: Integer64) -> Option<Integer64>

Returns the checked floored division.

Rounds the quotient towards negative infinity.

§Notation

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

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_floor(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_floor(Z8::new(-1)), None]; // overflow
Source

pub const fn div_ceil(self, rhs: Integer64) -> Integer64

Returns the ceiled division.

Rounds the quotient towards positive infinity.

§Notation

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

§Examples
assert_eq![Z8::new(7).div_ceil(Z8::new(3)), Z8::new(3)];
assert_eq![Z8::new(7).div_ceil(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_ceil(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_ceil(Z8::new(-3)), Z8::new(3)];

// tie-breaking
assert_eq![Z8::new(8).div_ceil(Z8::new(5)), Z8::new(2)]; // 8/5 = 1.6 => 2
assert_eq![Z8::new(6).div_ceil(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_ceil(Z8::new(5)), Z8::new(2)]; // 7/5 = 1.4 => 2
Source

pub const fn checked_div_ceil(self, rhs: Integer64) -> Option<Integer64>

Returns the checked ceiled division.

Rounds the quotient towards positive infinity.

§Notation

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

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_ceil(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_ceil(Z8::new(-1)), None]; // overflow
Source

pub const fn div_half_away(self, rhs: Integer64) -> Integer64

Returns the rounded division half away from 0.

Rounds the quotient to the nearest integer, tie-breaking away from 0 (w).

§Panics

If rhs is 0 or if the division results in overflow.

§Examples
assert_eq![Z8::new(7).div_half_away(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_half_away(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_away(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_away(Z8::new(-3)), Z8::new(2)];

// half tie-breaking
assert_eq![Z8::new(6).div_half_away(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_half_away(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.25 => 1
Source

pub const fn checked_div_half_away(self, rhs: Integer64) -> Option<Integer64>

Returns the checked rounded division half away from 0.

Rounds the quotient to the nearest integer, tie-breaking away from 0 (w).

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_half_away(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_half_away(Z8::new(-1)), None]; // overflow
Source

pub const fn div_half_even(self, rhs: Integer64) -> Integer64

Returns the rounded division half to even.

Rounds the quotient to the nearest integer, tie-breaking to the nearest even number.

This is also known as bankers’ rounding and is often the default rounding method, since it helps eliminate positive/negative bias and bias towards/away from zero (w).

§Panics

If rhs is 0 or if the division results in overflow.

§Examples
assert_eq![Z8::new(7).div_half_even(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_half_even(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_even(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_even(Z8::new(-3)), Z8::new(2)];

// half tie-breaking
assert_eq![Z8::new(6).div_half_even(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_half_even(Z8::new(5)), Z8::new(2)]; // 7/5 = 1.25 => 2
Source

pub const fn checked_div_half_even(self, rhs: Integer64) -> Option<Integer64>

Returns the checked rounded division half to even.

Rounds the quotient to the nearest integer, tie-breaking to the nearest even number.

This is also known as bankers’ rounding and is often the default rounding method, since it helps eliminate positive/negative bias and bias towards/away from zero (w).

§Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_half_away(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_half_away(Z8::new(-1)), None]; // overflow
Source§

impl Integer64

§Division and remainder

Source

pub const fn div_rem(self, rhs: Integer64) -> (Integer64, Integer64)

Alias of div_rem_trunc.

Source

pub const fn div_rem_trunc(self, rhs: Integer64) -> (Integer64, Integer64)

Returns the truncated (quotient, remainder).

§Panics

If rhs is 0 or if division results in overflow.

assert_eq![Z8::new(7).div_rem_trunc(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_trunc(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_trunc(Z8::new(3)), (Z8::new(-2), Z8::new(-1))];
assert_eq![Z8::new(-7).div_rem_trunc(Z8::new(-3)), (Z8::new(2), Z8::new(-1))];
Source

pub const fn div_rem_euclid(self, rhs: Integer64) -> (Integer64, Integer64)

Returns the euclidean (quotient, remainder).

§Panics

If rhs is 0 or if division results in overflow.

§Examples
assert_eq![Z8::new(7).div_rem_euclid(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_euclid(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_euclid(Z8::new(3)), (Z8::new(-3), Z8::new(2))];
assert_eq![Z8::new(-7).div_rem_euclid(Z8::new(-3)), (Z8::new(3), Z8::new(2))];
Source

pub const fn div_rem_ceil(self, rhs: Integer64) -> (Integer64, Integer64)

Returns the ceiled (quotient, remainder).

§Panics

If rhs is 0 or if division results in overflow.

§Examples
assert_eq![Z8::new(7).div_rem_ceil(Z8::new(3)), (Z8::new(3), Z8::new(-2))];
assert_eq![Z8::new(7).div_rem_ceil(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_ceil(Z8::new(3)), (Z8::new(-2), Z8::new(-1))];
assert_eq![Z8::new(-7).div_rem_ceil(Z8::new(-3)), (Z8::new(3), Z8::new(2))];
Source

pub const fn div_rem_floor(self, rhs: Integer64) -> (Integer64, Integer64)

Returns the floored (quotient, remainder).

§Panics

If rhs is 0 or if division results in overflow.

§Examples
assert_eq![Z8::new(7).div_rem_floor(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_floor(Z8::new(-3)), (Z8::new(-3), Z8::new(-2))];
assert_eq![Z8::new(-7).div_rem_floor(Z8::new(3)), (Z8::new(-3), Z8::new(2))];
assert_eq![Z8::new(-7).div_rem_floor(Z8::new(-3)), (Z8::new(2), Z8::new(-1))];
Source§

impl Integer64

§Multiplication

Source

pub const fn mul(self, rhs: Integer64) -> Integer64

Integer multiplication.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source

pub const fn checked_mul(self, rhs: Integer64) -> Option<Integer64>

Checked integer multiplication.

Returns None on overflow.

Source

pub const fn saturating_mul(self, rhs: Integer64) -> Integer64

Saturating multiplication. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

Source

pub const fn wrapping_mul(self, rhs: Integer64) -> Integer64

Wrapping (modular) multiplication. Computes self + rhs, wrapping around at the boundary of the type.

Source

pub const fn overflowing_mul(self, rhs: Integer64) -> (Integer64, bool)

Overflowing multiplication.

Returns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

Source§

impl Integer64

§Negation

Source

pub const fn neg(self) -> Integer64

Basic negation. Computes -self.

§Panics

Panics in debug, if self == MIN. While in release, it returns MIN, same as wrapping_neg

Source

pub const fn checked_neg(self) -> Option<Integer64>

Checked negation. Computes -self, returning None if self == MIN instead of overflowing.

Source

pub const fn saturating_neg(self) -> Integer64

Saturating negation. Computes -self, returning MAX if self == MIN instead of overflowing.

Source

pub const fn wrapping_neg(self) -> Integer64

Wrapping negation. Computes -self, returning MIN if self == MIN instead of overflowing.

Source

pub const fn overflowing_neg(self) -> (Integer64, bool)

Overflowing negation. Negates self, overflowing if this is equal to the minimum value.

Returns a tuple of the negated version along with a boolean indicating whether an arithmetic overflow happened. If self == MIN then (MIN, true) is returned.

Source§

impl Integer64

§Exponentiation

Source

pub const fn pow(self, exp: u32) -> Integer64

Integer exponentiation.

Raises self to the power of exp

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source

pub const fn checked_pow(self, exp: u32) -> Option<Integer64>

Checked integer exponentiation.

Returns None on overflow.

Source

pub const fn saturating_pow(self, exp: u32) -> Integer64

Saturating integer exponentiation.

Raises self to the power of exp, saturating at the numeric bounds instead of overflowing.

Source

pub const fn wrapping_pow(self, exp: u32) -> Integer64

Wrapping (modular) integer exponentiation.

Raises self to the power of exp, wrapping around at the boundary of the type.

Source

pub const fn overflowing_pow(self, exp: u32) -> (Integer64, bool)

Overflowing integer exponentiation.

Raises self to the power of exp,

Returns a tuple of the exponentiation along with a boolean indicating whether an overflow happened.

Source§

impl Integer64

§Remainder

Source

pub const fn rem_trunc(self, rhs: Integer64) -> Integer64

Returns the truncated remainder operation.

This is the default remainder operation in Rust, C and Java.

It is based on truncated division, rounding the quotient towards zero, meaning the remainder has the same sign as the dividend.

§Notation

$ x \mod n $

§Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).rem_trunc(Z8::new(2)), Z8::new(-1)];
Source

pub const fn rem_euclid(self, rhs: Integer64) -> Integer64

Returns the euclidean remainder operation.

This is often used in modular arithmetic, since it always returns a non-negative remainder.

It is based on euclidean division, whih ensures that the same value of x will always result in the same remainder when divided by the same value of y.

§Panics

If rhs is 0 or the division results in overflow.

§Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).rem_euclid(Z8::new(2)), Z8::new(1)];
Source

pub const fn checked_rem_euclid(self, rhs: Integer64) -> Option<Integer64>

Returns the checked Euclidean remainder operation.

Computes rem_euclid, returning None if rhs == 0 or the division results in overflow.

§Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).checked_rem_euclid(Z8::new(2)), Some(Z8::new(1))];
assert_eq![Z8::new(-5).checked_rem_euclid(Z8::new(0)), None];
Source

pub const fn rem_floor(self, rhs: Integer64) -> Integer64

Returns the floored remainder operation.

Rounds the quotient towards negative infinity, differing from the truncated division in regard to negative numbers.

This is often used when the quotient represents the number of “groups” of a certain size that can be formed from a given number of items.

§Examples
use numera::all::Z8;

// TODO
Source§

impl Integer64

§Square root

Source

pub fn is_square(self) -> bool

Returns true if self is a perfect square, meaning the square root of self is an integer.

Returns false otherwise, which includes all negative values.

§Algorithm

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

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).is_square(), false];
assert_eq![Integer64(13).is_square(), false];
assert_eq![Integer64(16).is_square(), true];
assert_eq![Integer64(20).is_square(), false];
assert_eq![Integer64(21).is_square(), false];
Source

pub fn sqrt_floor(self) -> Option<Integer64>

Returns the floored integer square root.

Returns None if self is negative.

§Algorithm

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

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

$$ n_{i+1} = n_{i} - ( n_{i}^{2} - x) / 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, $x$ 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 x.

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).sqrt_floor(), Some(Integer64(3))];
assert_eq![Integer64(13).sqrt_floor(), Some(Integer64(3))];
assert_eq![Integer64(16).sqrt_floor(), Some(Integer64(4))];
assert_eq![Integer64(20).sqrt_floor(), Some(Integer64(4))];
assert_eq![Integer64(21).sqrt_floor(), Some(Integer64(4))];
Source

pub fn sqrt_ceil(self) -> Option<Integer64>

Returns the ceiled integer square root.

Returns None if self is negative.

§Algorithm

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

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).sqrt_ceil(), Some(Integer64(4))];
assert_eq![Integer64(13).sqrt_ceil(), Some(Integer64(4))];
assert_eq![Integer64(16).sqrt_ceil(), Some(Integer64(4))];
assert_eq![Integer64(20).sqrt_ceil(), Some(Integer64(5))];
assert_eq![Integer64(21).sqrt_ceil(), Some(Integer64(5))];
Source

pub fn sqrt_round(self) -> Option<Integer64>

Returns the rounded integer square root.

Returns None if self is negative.

§Algorithm

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

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).sqrt_round(), Some(Integer64(3))];
assert_eq![Integer64(13).sqrt_round(), Some(Integer64(4))];
assert_eq![Integer64(16).sqrt_round(), Some(Integer64(4))];
assert_eq![Integer64(20).sqrt_round(), Some(Integer64(4))];
assert_eq![Integer64(21).sqrt_round(), Some(Integer64(5))];
Source

pub fn checked_sqrt_floor(self) -> Option<(Integer64, bool)>

Returns the checked floored integer square root, as a tuple containing sqrt_floor and is_square.

Returns None if self is negative.

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).checked_sqrt_floor(), Some((Integer64(3), false))];
assert_eq![Integer64(13).checked_sqrt_floor(), Some((Integer64(3), false))];
assert_eq![Integer64(16).checked_sqrt_floor(), Some((Integer64(4), true))];
assert_eq![Integer64(20).checked_sqrt_floor(), Some((Integer64(4), false))];
assert_eq![Integer64(21).checked_sqrt_floor(), Some((Integer64(4), false))];
Source

pub fn checked_sqrt_ceil(self) -> Option<(Integer64, bool)>

Returns the checked ceiled integer square root, as a tuple containing sqrt_ceil and is_square.

Returns None if self is negative.

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).checked_sqrt_ceil(), Some((Integer64(4), false))];
assert_eq![Integer64(13).checked_sqrt_ceil(), Some((Integer64(4), false))];
assert_eq![Integer64(16).checked_sqrt_ceil(), Some((Integer64(4), true))];
assert_eq![Integer64(20).checked_sqrt_ceil(), Some((Integer64(5), false))];
assert_eq![Integer64(21).checked_sqrt_ceil(), Some((Integer64(5), false))];
Source

pub fn checked_sqrt_round(self) -> Option<(Integer64, bool)>

Returns the checked rounded integer square root, as a tuple containing sqrt_round and is_square.

Returns None if self is negative.

§Examples
use numera::all::Integer64;

assert_eq![Integer64(12).checked_sqrt_round(), Some((Integer64(3), false))];
assert_eq![Integer64(13).checked_sqrt_round(), Some((Integer64(4), false))];
assert_eq![Integer64(16).checked_sqrt_round(), Some((Integer64(4), true))];
assert_eq![Integer64(20).checked_sqrt_round(), Some((Integer64(4), false))];
assert_eq![Integer64(21).checked_sqrt_round(), Some((Integer64(5), false))];
Source§

impl Integer64

§Subtraction

Source

pub const fn sub(self, rhs: Integer64) -> Integer64

Integer subtraction.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source

pub const fn checked_sub(self, rhs: Integer64) -> Option<Integer64>

Checked subtraction.

Source

pub const fn saturating_sub(self, rhs: Integer64) -> Integer64

Saturating subtraction. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

Source

pub const fn wrapping_sub(self, rhs: Integer64) -> Integer64

Wrapping (modular) subtraction. Computes self + rhs, wrapping around at the boundary of the type.

Source

pub const fn overflowing_sub(self, rhs: Integer64) -> (Integer64, bool)

Overflowing subtraction.

Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

Source§

impl Integer64

§Constructors

Source

pub const fn new(value: i64) -> Self

Returns a new Integer64.

Source§

impl Integer64

§Methods for resizing

Source

pub fn as_larger(&self) -> Integer128

Returns the current number as the next larger bit-size.

This method is not implemented for the largest available bit-size.

Source

pub fn as_larger_or_same(&self) -> Integer128

Returns the current number as the next larger bit-size, or the same if there’s no larger one available.

Source

pub fn try_as_larger(&self) -> NumeraResult<Integer128>

Tries to return the current number as the next larger bit-size.

§Errors

If there’s no larger bit-size available.

Source

pub fn as_smaller_or_same(&self) -> Integers

Available on crate feature try_from only.

Returns the current number as the next smaller bit-size, or the same if the value can’t fit in the smaller bit-size, or if there’s no smaller bit-size available.

Source

pub fn try_as_smaller(&self) -> NumeraResult<Integer32>

Available on crate feature try_from only.

Tries to return the current number as the next smaller bit-size.

§Errors

If the value can’t fit in the smaller bit-size, or if there’s no smaller bit-size available.

Trait Implementations§

Source§

impl Add for Integer64

Source§

fn add(self, rhs: Integer64) -> Self::Output

Performs the + operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

type Output = Integer64

The resulting type after applying the + operator.
Source§

impl AddAssign for Integer64

Source§

fn add_assign(&mut self, rhs: Integer64)

Performs the += operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

impl Bound for Integer64

Source§

fn is_lower_bounded(&self) -> bool

Returns true if the number is lower bounded.
Source§

fn is_upper_bounded(&self) -> bool

Returns true if the number is upper bounded.
Source§

fn lower_bound(&self) -> Option<Self>

Returns the lower bound, if any.
Source§

fn upper_bound(&self) -> Option<Self>

Returns the upper bound, if any.
Source§

impl Clone for Integer64

Source§

fn clone(&self) -> Integer64

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConstLowerBounded for Integer64

Source§

const MIN: Self

The smallest value that can be represented with this type.
Source§

impl ConstNegOne for Integer64

Source§

const NEG_ONE: Self

The additive inverse of the multiplicative identity, -1.
Source§

impl ConstOne for Integer64

Source§

const ONE: Self

The multiplicative identity, 1.
Source§

impl ConstUpperBounded for Integer64

Source§

const MAX: Self

The largest value that can be represented with this type.
Source§

impl ConstZero for Integer64

Source§

const ZERO: Self

The additive identity, 0.
Source§

impl Count for Integer64

Source§

fn is_countable(&self) -> bool

Returns true if the number is countable.
Source§

fn is_uncountable(&self) -> bool

Returns false if the number is countable.
Source§

impl Countable for Integer64

Source§

fn next(&self) -> NumeraResult<Self>

Returns the next countable value. Read more
Source§

fn previous(&self) -> NumeraResult<Self>

Returns the previous countable value. Read more
Source§

impl Debug for Integer64

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Integer64

Source§

fn default() -> Integer64

Returns the “default value” for a type. Read more
Source§

impl Display for Integer64

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div for Integer64

Source§

fn div(self, rhs: Integer64) -> Self::Output

Performs the / operation, using truncated division.

§Panics

In debug, on overflow.

In release, it performs two’s complement wrapping.

Source§

type Output = Integer64

The resulting type after applying the / operator.
Source§

impl DivAssign for Integer64

Source§

fn div_assign(&mut self, rhs: Integer64)

Performs the /= operation.

§Panics

In debug, on overflow.

In release, it performs two’s complement wrapping.

Source§

impl From<&Integer16> for Integer64

Source§

fn from(f: &Integer16) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer32> for Integer64

Source§

fn from(f: &Integer32) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for Integer128

Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for IntegerBig

Available on crate feature dashu-int only.
Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for Rational128

Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for Rational64

Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for i128

Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer64> for i64

Source§

fn from(f: &Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&Integer8> for Integer64

Source§

fn from(f: &Integer8) -> Self

Converts to this type from the input type.
Source§

impl From<&NegativeInteger16> for Integer64

Source§

fn from(f: &NegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&NegativeInteger32> for Integer64

Source§

fn from(f: &NegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&NegativeInteger8> for Integer64

Source§

fn from(f: &NegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&NonNegativeInteger16> for Integer64

Source§

fn from(f: &NonNegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&NonNegativeInteger32> for Integer64

Source§

fn from(f: &NonNegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&NonNegativeInteger8> for Integer64

Source§

fn from(f: &NonNegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&NonPositiveInteger16> for Integer64

Source§

fn from(f: &NonPositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&NonPositiveInteger32> for Integer64

Source§

fn from(f: &NonPositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&NonPositiveInteger8> for Integer64

Source§

fn from(f: &NonPositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<i16>> for Integer64

Source§

fn from(f: &NonZeroI16) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<i32>> for Integer64

Source§

fn from(f: &NonZeroI32) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<i64>> for Integer64

Source§

fn from(f: &NonZeroI64) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<i8>> for Integer64

Source§

fn from(f: &NonZeroI8) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<u16>> for Integer64

Source§

fn from(f: &NonZeroU16) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<u32>> for Integer64

Source§

fn from(f: &NonZeroU32) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZero<u8>> for Integer64

Source§

fn from(f: &NonZeroU8) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZeroInteger16> for Integer64

Source§

fn from(f: &NonZeroInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZeroInteger32> for Integer64

Source§

fn from(f: &NonZeroInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZeroInteger64> for Integer64

Source§

fn from(f: &NonZeroInteger64) -> Self

Converts to this type from the input type.
Source§

impl From<&NonZeroInteger8> for Integer64

Source§

fn from(f: &NonZeroInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&PositiveInteger16> for Integer64

Source§

fn from(f: &PositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&PositiveInteger32> for Integer64

Source§

fn from(f: &PositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&PositiveInteger8> for Integer64

Source§

fn from(f: &PositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&Prime16> for Integer64

Source§

fn from(f: &Prime16) -> Self

Converts to this type from the input type.
Source§

impl From<&Prime32> for Integer64

Source§

fn from(f: &Prime32) -> Self

Converts to this type from the input type.
Source§

impl From<&Prime8> for Integer64

Source§

fn from(f: &Prime8) -> Self

Converts to this type from the input type.
Source§

impl From<&i16> for Integer64

Source§

fn from(f: &i16) -> Self

Converts to this type from the input type.
Source§

impl From<&i32> for Integer64

Source§

fn from(f: &i32) -> Self

Converts to this type from the input type.
Source§

impl From<&i64> for Integer64

Source§

fn from(f: &i64) -> Self

Converts to this type from the input type.
Source§

impl From<&i8> for Integer64

Source§

fn from(f: &i8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer16> for Integer64

Source§

fn from(f: &mut Integer16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer32> for Integer64

Source§

fn from(f: &mut Integer32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for Integer128

Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for IntegerBig

Available on crate feature dashu-int only.
Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for Rational128

Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for Rational64

Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for i128

Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer64> for i64

Source§

fn from(f: &mut Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Integer8> for Integer64

Source§

fn from(f: &mut Integer8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NegativeInteger16> for Integer64

Source§

fn from(f: &mut NegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NegativeInteger32> for Integer64

Source§

fn from(f: &mut NegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NegativeInteger8> for Integer64

Source§

fn from(f: &mut NegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonNegativeInteger16> for Integer64

Source§

fn from(f: &mut NonNegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonNegativeInteger32> for Integer64

Source§

fn from(f: &mut NonNegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonNegativeInteger8> for Integer64

Source§

fn from(f: &mut NonNegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonPositiveInteger16> for Integer64

Source§

fn from(f: &mut NonPositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonPositiveInteger32> for Integer64

Source§

fn from(f: &mut NonPositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonPositiveInteger8> for Integer64

Source§

fn from(f: &mut NonPositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<i16>> for Integer64

Source§

fn from(f: &mut NonZeroI16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<i32>> for Integer64

Source§

fn from(f: &mut NonZeroI32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<i64>> for Integer64

Source§

fn from(f: &mut NonZeroI64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<i8>> for Integer64

Source§

fn from(f: &mut NonZeroI8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<u16>> for Integer64

Source§

fn from(f: &mut NonZeroU16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<u32>> for Integer64

Source§

fn from(f: &mut NonZeroU32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZero<u8>> for Integer64

Source§

fn from(f: &mut NonZeroU8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZeroInteger16> for Integer64

Source§

fn from(f: &mut NonZeroInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZeroInteger32> for Integer64

Source§

fn from(f: &mut NonZeroInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZeroInteger64> for Integer64

Source§

fn from(f: &mut NonZeroInteger64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut NonZeroInteger8> for Integer64

Source§

fn from(f: &mut NonZeroInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut PositiveInteger16> for Integer64

Source§

fn from(f: &mut PositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut PositiveInteger32> for Integer64

Source§

fn from(f: &mut PositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut PositiveInteger8> for Integer64

Source§

fn from(f: &mut PositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Prime16> for Integer64

Source§

fn from(f: &mut Prime16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Prime32> for Integer64

Source§

fn from(f: &mut Prime32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Prime8> for Integer64

Source§

fn from(f: &mut Prime8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut i16> for Integer64

Source§

fn from(f: &mut i16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut i32> for Integer64

Source§

fn from(f: &mut i32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut i64> for Integer64

Source§

fn from(f: &mut i64) -> Self

Converts to this type from the input type.
Source§

impl From<&mut i8> for Integer64

Source§

fn from(f: &mut i8) -> Self

Converts to this type from the input type.
Source§

impl From<&mut u16> for Integer64

Source§

fn from(f: &mut u16) -> Self

Converts to this type from the input type.
Source§

impl From<&mut u32> for Integer64

Source§

fn from(f: &mut u32) -> Self

Converts to this type from the input type.
Source§

impl From<&mut u8> for Integer64

Source§

fn from(f: &mut u8) -> Self

Converts to this type from the input type.
Source§

impl From<&u16> for Integer64

Source§

fn from(f: &u16) -> Self

Converts to this type from the input type.
Source§

impl From<&u32> for Integer64

Source§

fn from(f: &u32) -> Self

Converts to this type from the input type.
Source§

impl From<&u8> for Integer64

Source§

fn from(f: &u8) -> Self

Converts to this type from the input type.
Source§

impl From<Integer16> for Integer64

Source§

fn from(f: Integer16) -> Self

Converts to this type from the input type.
Source§

impl From<Integer32> for Integer64

Source§

fn from(f: Integer32) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for Integer128

Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for IntegerBig

Available on crate feature dashu-int only.
Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for Integers

Source§

fn from(z: Integer64) -> Integers

Converts to this type from the input type.
Source§

impl From<Integer64> for Rational128

Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for Rational64

Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for i128

Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer64> for i64

Source§

fn from(f: Integer64) -> Self

Converts to this type from the input type.
Source§

impl From<Integer8> for Integer64

Source§

fn from(f: Integer8) -> Self

Converts to this type from the input type.
Source§

impl From<NegativeInteger16> for Integer64

Source§

fn from(f: NegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<NegativeInteger32> for Integer64

Source§

fn from(f: NegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<NegativeInteger8> for Integer64

Source§

fn from(f: NegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<NonNegativeInteger16> for Integer64

Source§

fn from(f: NonNegativeInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<NonNegativeInteger32> for Integer64

Source§

fn from(f: NonNegativeInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<NonNegativeInteger8> for Integer64

Source§

fn from(f: NonNegativeInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<NonPositiveInteger16> for Integer64

Source§

fn from(f: NonPositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<NonPositiveInteger32> for Integer64

Source§

fn from(f: NonPositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<NonPositiveInteger8> for Integer64

Source§

fn from(f: NonPositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i16>> for Integer64

Source§

fn from(f: NonZeroI16) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i32>> for Integer64

Source§

fn from(f: NonZeroI32) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i64>> for Integer64

Source§

fn from(f: NonZeroI64) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i8>> for Integer64

Source§

fn from(f: NonZeroI8) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u16>> for Integer64

Source§

fn from(f: NonZeroU16) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u32>> for Integer64

Source§

fn from(f: NonZeroU32) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u8>> for Integer64

Source§

fn from(f: NonZeroU8) -> Self

Converts to this type from the input type.
Source§

impl From<NonZeroInteger16> for Integer64

Source§

fn from(f: NonZeroInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<NonZeroInteger32> for Integer64

Source§

fn from(f: NonZeroInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<NonZeroInteger64> for Integer64

Source§

fn from(f: NonZeroInteger64) -> Self

Converts to this type from the input type.
Source§

impl From<NonZeroInteger8> for Integer64

Source§

fn from(f: NonZeroInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveInteger16> for Integer64

Source§

fn from(f: PositiveInteger16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveInteger32> for Integer64

Source§

fn from(f: PositiveInteger32) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveInteger8> for Integer64

Source§

fn from(f: PositiveInteger8) -> Self

Converts to this type from the input type.
Source§

impl From<Prime16> for Integer64

Source§

fn from(f: Prime16) -> Self

Converts to this type from the input type.
Source§

impl From<Prime32> for Integer64

Source§

fn from(f: Prime32) -> Self

Converts to this type from the input type.
Source§

impl From<Prime8> for Integer64

Source§

fn from(f: Prime8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Integer64

Source§

fn from(f: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Integer64

Source§

fn from(f: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Integer64

Source§

fn from(f: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Integer64

Source§

fn from(f: i8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Integer64

Source§

fn from(f: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Integer64

Source§

fn from(f: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Integer64

Source§

fn from(f: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for Integer64

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ident for Integer64

Source§

fn can_zero(&self) -> bool

Returns true if the number can represent 0, the additive identity. Read more
Source§

fn can_one(&self) -> bool

Returns true if the number can represent 1, the multiplicative identity. Read more
Source§

fn can_neg_one(&self) -> bool

Returns true if the number can represent -1, the additive inverse of the multiplicative identity. Read more
Source§

fn is_zero(&self) -> bool

Returns true if the current value is 0. the additive identity.
Source§

fn is_one(&self) -> bool

Returns true if the current value is 1, the multiplicative identity.
Source§

fn is_neg_one(&self) -> bool

Returns true if the current value is -1, the additive inverse of the multiplicative identity.
Source§

impl Integer for Integer64

Source§

fn integer_is_even(&self) -> bool

Returns true if this integer is even.
Source§

fn integer_is_multiple_of(&self, other: &Self) -> bool

Returns true if this integer is a multiple of the other.
Source§

fn integer_is_prime(&self) -> Option<bool>

Returns Some(true) if this integer is prime, Some(false) if it’s not prime, or None if it can not be determined. Read more
Source§

fn integer_gcd(&self, other: &Self) -> Option<Self>

Calculates the Greatest Common Divisor of this integer and other. Read more
Source§

fn integer_lcm(&self, other: &Self) -> Option<Self>

Calculates the Lowest Common Multiple of this integer and other. Read more
Source§

fn integer_digits(&self) -> usize

Returns the number of digits in base 10, without the sign.
Source§

fn integer_is_odd(&self) -> bool

Returns true if this integer is odd.
Source§

fn integer_is_divisor_of(&self, other: &Self) -> bool

Returns true if this integer is a divisor of the other.
Source§

impl LowerBounded for Integer64

Source§

fn new_min() -> Self

The smallest value that can be represented with this type.
Source§

impl Mul for Integer64

Source§

type Output = Integer64

Performs the * operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

fn mul(self, rhs: Integer64) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for Integer64

Source§

fn mul_assign(&mut self, rhs: Integer64)

Performs the *= operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

impl Neg for Integer64

Source§

fn neg(self) -> Self::Output

Performs the unary - operation.

Source§

type Output = Integer64

The resulting type after applying the - operator.
Source§

impl NegOne for Integer64

Source§

fn new_neg_one() -> Self

Returns a new additive inverse of the multiplicative identity, -1.
Source§

fn set_neg_one(&mut self)
where Self: Sized,

Sets this number to -1.
Source§

impl Number for Integer64

Source§

fn from_inner_repr(value: Self::InnerRepr) -> NumeraResult<Self>

Returns a new Integer64 from the inner representation.

§Errors

This function can’t fail.

Source§

unsafe fn from_inner_repr_unchecked(value: Self::InnerRepr) -> Self

Available on crate feature not(safe) only.

Returns a new Integer64 from the inner representation.

§Safety

This function is safe.

Source§

fn from_innermost_repr(value: Self::InnermostRepr) -> NumeraResult<Self>

Returns a new Integer64 from the innermost representation.

§Errors

This function can’t fail.

Source§

unsafe fn from_innermost_repr_unchecked(value: Self::InnermostRepr) -> Self

Available on crate feature not(safe) only.

Returns a new Integer64 from the innermost representation.

§Safety
§This function is safe.
Source§

type InnerRepr = i64

The inner primitive representation of the number. Read more
Source§

type InnermostRepr = i64

The innermost primitive representation of the number. Read more
Source§

fn into_inner_repr(self) -> Self::InnerRepr

Deconstructs the number to its inner representation.
Source§

fn into_innermost_repr(self) -> Self::InnermostRepr

Deconstructs the number to its innermost representation.
Source§

fn try_from_inner_repr(inner: impl Into<Self::InnerRepr>) -> NumeraResult<Self>
where Self: Sized,

Forms a new number from its converted given inner representation. Read more
Source§

impl One for Integer64

Source§

fn new_one() -> Self

Returns a new multiplicative identity, 1.
Source§

fn set_one(&mut self)
where Self: Sized,

Sets this number to 1.
Source§

impl Ord for Integer64

Source§

fn cmp(&self, other: &Integer64) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Integer64

Source§

fn eq(&self, other: &Integer64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Integer64

Source§

fn partial_cmp(&self, other: &Integer64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Product<&'a Integer64> for Integer64

Source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Product for Integer64

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Rem for Integer64

Source§

fn rem(self, rhs: Integer64) -> Self::Output

Performs the % operation, using truncated remainder.

Source§

type Output = Integer64

The resulting type after applying the % operator.
Source§

impl RemAssign for Integer64

Source§

fn rem_assign(&mut self, rhs: Integer64)

Performs the %= operation.

Source§

impl Sign for Integer64

Source§

fn can_negative(&self) -> bool

Returns true if the type can represent negative numbers.
Source§

fn can_positive(&self) -> bool

Returns true if the type can represent positive numbers.
Source§

fn is_negative(&self) -> bool

Returns true if the value is negative (< 0).
Source§

fn is_positive(&self) -> bool

Returns true if the value is positive (> 0).
Source§

impl Sub for Integer64

Source§

fn sub(self, rhs: Integer64) -> Self::Output

Performs the - operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

type Output = Integer64

The resulting type after applying the - operator.
Source§

impl SubAssign for Integer64

Source§

fn sub_assign(&mut self, rhs: Integer64)

Performs the -= operation.

§Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

Source§

impl<'a> Sum<&'a Integer64> for Integer64

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for Integer64

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<&Integer128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Integer16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Integer16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Integer32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Integer32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Integer8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Integer8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonNegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonNegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonNegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonNegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonNegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonNegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonNegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonNegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonNegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonNegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonPositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonPositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonPositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonPositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonPositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonPositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonPositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonPositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonPositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonPositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroI128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroI128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroI16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroI16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroI32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroI32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroI64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroI64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroI8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroI8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroU128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroU128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroU16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroU16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroU32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroU32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroU64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroU64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroU8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroU8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroInteger128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroInteger16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroInteger32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroInteger64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for NonZeroInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<NonZeroInteger8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for PositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<PositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for PositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<PositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for PositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<PositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for PositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<PositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for PositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<PositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Rational16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Rational16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Rational32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Rational32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for Rational8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<Rational8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for i16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<i16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for i32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<i32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for i8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<i8>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for u128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<u128>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for u16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<u16>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for u32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<u32>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for u64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<u64>

Performs the conversion.
Source§

impl TryFrom<&Integer64> for u8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Integer64) -> NumeraResult<u8>

Performs the conversion.
Source§

impl TryFrom<&NegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonNegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonNegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonNegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonNegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonPositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonPositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonPositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonPositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonZero<i128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonZeroI128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonZero<u128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonZeroU128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonZero<u64>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonZeroU64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&NonZeroInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &NonZeroInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&PositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &PositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&PositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &PositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&Prime128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Prime128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&Prime64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &Prime64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&i128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &i128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Integer16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Integer16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Integer32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Integer32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Integer8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Integer8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonNegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonNegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonNegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonNegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonNegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonNegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonNegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonNegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonNegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonNegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonPositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonPositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonPositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonPositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonPositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonPositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonPositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonPositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonPositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonPositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroI128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroI128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroI16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroI16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroI32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroI32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroI64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroI64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroI8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroI8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroU128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroU128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroU16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroU16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroU32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroU32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroU64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroU64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroU8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroU8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroInteger128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroInteger16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroInteger32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroInteger64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for NonZeroInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<NonZeroInteger8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for PositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<PositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for PositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<PositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for PositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<PositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for PositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<PositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for PositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<PositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Rational16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Rational16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Rational32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Rational32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for Rational8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<Rational8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for i16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<i16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for i32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<i32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for i8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<i8>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for u128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<u128>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for u16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<u16>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for u32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<u32>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for u64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<u64>

Performs the conversion.
Source§

impl TryFrom<&mut Integer64> for u8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Integer64) -> NumeraResult<u8>

Performs the conversion.
Source§

impl TryFrom<&mut NegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonNegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonNegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonNegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonNegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonPositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonPositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonPositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonPositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonZero<i128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonZeroI128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonZero<u128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonZeroU128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonZero<u64>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonZeroU64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut NonZeroInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut NonZeroInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut PositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut PositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut PositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut PositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut Prime128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Prime128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut Prime64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut Prime64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut i128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut i128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut u128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut u128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&mut u64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &mut u64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&u128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &u128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<&u64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: &u64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<Integer128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Integer16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Integer16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Integer32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Integer32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Integer8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Integer8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonNegativeInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonNegativeInteger128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonNegativeInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonNegativeInteger16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonNegativeInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonNegativeInteger32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonNegativeInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonNegativeInteger64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonNegativeInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonNegativeInteger8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonPositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonPositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonPositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonPositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonPositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonPositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonPositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonPositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonPositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonPositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroI128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroI128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroI16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroI16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroI32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroI32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroI64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroI64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroI8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroI8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroU128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroU128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroU16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroU16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroU32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroU32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroU64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroU64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroU8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroU8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroInteger128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroInteger16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroInteger32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroInteger64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for NonZeroInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<NonZeroInteger8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for PositiveInteger128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<PositiveInteger128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for PositiveInteger16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<PositiveInteger16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for PositiveInteger32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<PositiveInteger32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for PositiveInteger64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<PositiveInteger64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for PositiveInteger8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<PositiveInteger8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Rational16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Rational16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Rational32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Rational32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for Rational8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<Rational8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for i16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<i16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for i32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<i32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for i8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<i8>

Performs the conversion.
Source§

impl TryFrom<Integer64> for u128

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<u128>

Performs the conversion.
Source§

impl TryFrom<Integer64> for u16

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<u16>

Performs the conversion.
Source§

impl TryFrom<Integer64> for u32

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<u32>

Performs the conversion.
Source§

impl TryFrom<Integer64> for u64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<u64>

Performs the conversion.
Source§

impl TryFrom<Integer64> for u8

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Integer64) -> NumeraResult<u8>

Performs the conversion.
Source§

impl TryFrom<Integers> for Integer64

Source§

type Error = NumeraErrors

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

fn try_from(z: Integers) -> Result<Integer64, Self::Error>

Performs the conversion.
Source§

impl TryFrom<NegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonNegativeInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonNegativeInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonNegativeInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonNegativeInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonPositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonPositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonPositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonPositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonZero<i128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonZeroI128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonZero<u128>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonZeroU128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonZero<u64>> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonZeroU64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<NonZeroInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: NonZeroInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<PositiveInteger128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: PositiveInteger128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<PositiveInteger64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: PositiveInteger64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<Prime128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Prime128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<Prime64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: Prime64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<i128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: i128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<u128> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: u128) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl TryFrom<u64> for Integer64

Available on crate feature try_from only.
Source§

type Error = NumeraErrors

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

fn try_from(f: u64) -> NumeraResult<Integer64>

Performs the conversion.
Source§

impl UpperBounded for Integer64

Source§

fn new_max() -> Self

The largest value that can be represented with this type.
Source§

impl Zero for Integer64

Source§

fn new_zero() -> Self

Returns a new additive identity, 0.
Source§

fn set_zero(&mut self)
where Self: Sized,

Sets this number to 0.
Source§

impl Copy for Integer64

Source§

impl Eq for Integer64

Source§

impl Negative for Integer64

Source§

impl Positive for Integer64

Source§

impl StructuralPartialEq for Integer64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Also for T

Source§

fn also_mut<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. Read more
Source§

fn also_ref<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, Res> Apply<Res> for T
where T: ?Sized,

Source§

fn apply<F>(self, f: F) -> Res
where F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
Source§

fn apply_ref<F>(&self, f: F) -> Res
where F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by shared reference.
Source§

fn apply_mut<F>(&mut self, f: F) -> Res
where F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by exclusive reference.
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> Bounded for T

Source§

impl<T> ConstBounded for T

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> Signed for T
where T: Positive + Negative,