Struct break_infinity::Decimal [−][src]
pub struct Decimal { /* fields omitted */ }
Expand description
A struct representing a decimal number, which can reach a maximum of 1e1.79e308 instead of f64
’s maximum of 1.79e308.
Implementations
Converts the Decimal into a string with the scientific notation.
Converts the Decimal into a string with the fixed notation.
Converts the Decimal into a string with the scientific notation if the exponent is greater than the precision.
Returns the mantissa with the specified precision.
Rounds the Decimal, if the exponent isn’t greater than the maximum significant digits.
Truncates the Decimal, if the exponent isn’t greater than the maximum significant digits.
Floors the Decimal, if the exponent isn’t greater than the maximum significant digits.
Rounds the Decimal to its ceiling, if the exponent isn’t greater than the maximum significant digits.
Returns the reciprocal of the Decimal.
Returns the reciprocal of the Decimal.
Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments. For example, if you put in 1e-9, then any number closer to the larger number than (larger number) * 1e-9 will be considered equal.
Raises the Decimal to the power of the given Decimal.
Joke function from Realm Grinder
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
Auto Trait Implementations
impl RefUnwindSafe for Decimal
impl UnwindSafe for Decimal
Blanket Implementations
Mutably borrows from an owned value. Read more