Struct amplify_num::u512 [−][src]
pub struct u512(_);
Expand description
Large integer type
The type is composed of little-endian ordered 64-bit words, which represents its inner representation.
Implementations
Converts the object to a mutable raw pointer
Returns the underlying array of words constituting large integer
Returns the underlying array of words constituting large integer
Constructs integer type from the underlying array of words.
Return the least number of bits needed to represent the number
Creates the integer value from a byte array using big-endian encoding
Creates the integer value from a byte slice using big-endian encoding
Creates the integer value from a byte array using little-endian encoding
Creates the integer value from a byte slice using little-endian encoding
Convert the integer into a byte array using big-endian encoding
Convert a integer into a byte array using little-endian encoding
Checked integer addition. Computes self + rhs
, returning None
if
overflow occurred.
Saturating integer addition. Computes self + rhs
, saturating at the
numeric bounds instead of overflowing.
Calculates self + rhs
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.
Wrapping (modular) addition. Computes self + rhs
, wrapping around at
the boundary of the type.
Checked integer subtraction. Computes self - rhs
, returning None
if
overflow occurred.
Saturating integer subtraction. Computes self - rhs
, saturating at the
numeric bounds instead of overflowing.
Calculates self - rhs
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.
Wrapping (modular) subtraction. Computes self - rhs
, wrapping around
at the boundary of the type.
Checked integer multiplication. Computes self * rhs
, returning None
if overflow occurred.
Saturating integer multiplication. Computes self * rhs
, saturating at
the numeric bounds instead of overflowing.
Calculates self * rhs
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.
Wrapping (modular) multiplication. Computes self * rhs
, wrapping
around at the boundary of the type.
Trait Implementations
Performs the +=
operation. Read more
Performs the &=
operation. Read more
Performs the |=
operation. Read more
Performs the ^=
operation. Read more
Performs the /=
operation. Read more
Performs the *=
operation. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Performs the %=
operation. Read more
Performs the <<=
operation. Read more
Performs the >>=
operation. Read more
Performs the -=
operation. Read more