Converts an Int to a Decimal
Converts an Int to a Decimal, but specifying the exponent
Converts a String to a Maybe Decimal. The string shall be in the format [<sign>]<numbers>[.<numbers>][e<numbers>]
Converts a Float to a Decimal
Converts a String to a Decimal, but if the string does not represent a valid Decimal, it crashes. Useful for Decimal constants.
Converts a Decimal to a String
Converts a Decimal to a Float
Addition
Substraction
Changes the sign of a Decimal
Multiplication
Fast and dirty division. Don't expect too much precision from this division. Dividing by zero is bad, and Nothing will be returned.
Truncates the Decimal to the specified decimal places
Rounds the Decimal to the specified decimal places
Greater than
Greater than or equals
Equals
Not equals
Less than
Less than or equals
Compares two Decimals
Absolute value (sets the sign as positive)
Gets the specified digit from a Decimal. The digits are: 0 -> units 1 -> tens 2 -> hundreds and so on -1 -> tenths -2 -> hundredths and so on
The number 0
The number 1
The number -1
The Decimal data type It is represented as mantissa * 10 ^ exponent