# Functions

AbsDifferenceWithSign returns | a - b |, (a - b).sign() a is mutated and returned.
BigDecFromDec returns the BigDec representation of an Dec.
BigDecFromDecSlice returns the []BigDec representation of an []Dec.
BigDecFromDec returns the BigDec representation of an Dec.
BigDecFromDecSlice returns the []BigDec representation of an []Dec.
BigDecFromSDKInt returns the BigDec representation of an sdkInt.
intended to be used with require/assert: require.True(IntEq(...)) nolint.
Binary search inputs between [lowerbound, upperbound] to a monotonic increasing function f.
BinarySearchBigDec takes as input: * an input range [lowerbound, upperbound] * an increasing function f * a target output x * max number of iterations (for gas control / handling does-not-converge cases) It binary searches on the input range, until it finds an input y s.t.
DecApproxEq returns true if the differences between two given decimals are smaller than the tolerance range.
DecEq returns true if two given decimals are equal.
DecsEqual tests if two decimal arrays are equal.
No description provided by the author
No description provided by the author
nolint:thelper.
Exp2 takes 2 to the power of a given non-negative decimal exponent and returns the result.
Returns the internal "power precision".
MaxBigDec gets maximum decimal between two.
MaxBigInt returns the maximum between two integers.
MinBigDec gets minimum decimal between two.
return the minimum of the ints.
Returns square root of d returns an error if one of the following conditions is met: - d is negative - d is too small to have a representable square root.
No description provided by the author
No description provided by the author
No description provided by the author
MustMonotonicSqrt returns the output of MonotonicSqrt, panicking on error.
MustMonotonicSqrt returns the output of MonotonicSqrt, panicking on error.
Decimal from string, panic on error.
create a new NewBigDec from integer assuming whole number.
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= BigDecPrecision.
No description provided by the author
returns a BigDec, built using a mutated copy of the passed in bigint.
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= BigDecPrecision.
No description provided by the author
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= BigDecPrecision.
create a new BigDec from big integer with decimal place at prec CONTRACT: prec <= BigDecPrecision.
create a decimal from an input decimal string.
create a new BigDec from integer with decimal place at prec CONTRACT: prec <= BigDecPrecision.
NewBigInt constructs Int from int64.
NewBigIntFromBigInt constructs Int from big.Int.
NewBigIntFromString constructs Int from string.
NewBigIntFromUint64 constructs an Int from a uint64.
NewBigIntWithDecimal constructs Int with decimal Result value is n*10^dec.
No description provided by the author
OneBigInt returns Int value with one.
OrderOfMagnitude calculates the order of magnitude without using logarithms.
Pow computes base^(exp) However since the exponent is not an integer, we must do an approximation algorithm.
Contract: 0 < base <= 2 0 <= exp < 1.
SigFigRound rounds to a specified significant figure.
No description provided by the author
No description provided by the author
ZeroBigInt returns Int value with zero.

# Constants

bytes required to represent the above precision Ceiling[Log2[10**Precision - 1]].
number of decimal places.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Decimal errors.
Decimal errors.
Decimal errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Dec.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Int.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Uint.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

NOTE: never use new(BigDec) or else we will panic unmarshalling into the nil embedded big.Int.
Int wraps big.Int with a 257 bit range bound Checks overflow, underflow and division by zero Exists in range from -(2^256 - 1) to 2^256 - 1.
ErrTolerance is used to define a compare function, which checks if two ints are within a certain error tolerance of one another, and (optionally) that they are rounding in the correct direction.

# Interfaces

SdkDec.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author