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 expScale

doubleScale

uint256 doubleScale

halfExpScale

uint256 halfExpScale

mantissaOne

uint256 mantissaOne

Exp

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

safe224

safe32

add_

add_

add_

add_

sub_

sub_

sub_

sub_

mul_

mul_

mul_

mul_

mul_

mul_

mul_

mul_

div_

div_

div_

div_

div_

div_

div_

div_

fraction