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

Creates a new instance of Decimal with the given value.

Converts the Decimal to an f64.

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.

Returns the absolute value of the Decimal.

Returns the sign of the Decimal.

Returns the sign of the Decimal.

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.

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

Joke function from Cookie Clicker. It’s ‘egg’

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

Performs the /= operation. Read more

Creates a new instance of Decimal from the given string.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Performs the -= operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.