package
2025.0.0+incompatible
Repository: https://github.com/harmony-one/harmony.git
Documentation: pkg.go.dev
# Functions
DecsEqual test if two decimal arrays are equal.
IsZeroes checks if the byte array is all zeroes.
MaxDec maximum decimal between two.
MinDec minimum decimal between two.
MustNewDecFromStr Decimal from string, panic on error.
NewDec creates a new Dec from integer assuming whole number.
NewDecFromBigInt creates a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
NewDecFromBigIntWithPrec creates a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
NewDecFromInt creates a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
NewDecFromIntWithPrec creates a new Dec from big integer with decimal place at prec CONTRACT: prec <= Precision.
NewDecFromStr creates a decimal from an input decimal string.
NewDecWithPrec creates a new Dec from integer with decimal place at prec CONTRACT: prec <= Precision.
OneDec ...
SmallestDec ...
ZeroDec ...
# Constants
bytes required to represent the above precision Ceiling[Log2[999 999 999 999 999 999]].
number of decimal places.