ExponentialNoError
Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:Exp({mantissa: 5100000000000000000}).
expScale
uint256 expScaledoubleScale
uint256 doubleScalehalfExpScale
uint256 halfExpScalemantissaOne
uint256 mantissaOneExp
struct Exp {
uint256 mantissa;
}Double
truncate
Truncates the given exp to a whole number value. For example, truncate(Exp{mantissa: 15 * expScale}) = 15
mul_ScalarTruncate
Multiply an Exp by a scalar, then truncate to return an unsigned integer.
mul_ScalarTruncateAddUInt
Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
lessThanExp
Checks if first Exp is less than second Exp.
lessThanOrEqualExp
Checks if left Exp <= right Exp.
greaterThanExp
Checks if left Exp > right Exp.
isZeroExp
returns true if Exp is exactly zero