Documentation
¶
Overview ¶
Package decimals provides decimal formatting and conversion utilities.
Index ¶
- func Abs(a *big.Float) *big.Float
- func Add(a, b *big.Float) *big.Float
- func ApplyDecimals(x *big.Float, y int64) (*big.Int, big.Accuracy)
- func Div(a, b *big.Float) *big.Float
- func FromString(x string) (*big.Float, bool)
- func Lesser(x, y *big.Float) bool
- func Mul(a, b *big.Float) *big.Float
- func NewFloat(f float64) *big.Float
- func Pow(a *big.Float, e int64) *big.Float
- func RemoveDecimals(x *big.Int, y int64) *big.Float
- func Root(a *big.Float, n uint64) *big.Float
- func Sub(a, b *big.Float) *big.Float
- func Zero() *big.Float
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDecimals ¶
ApplyDecimals multiplies x by 10^y and returns the result as a big.Int.
func FromString ¶
FromString parses x as a decimal number into a big.Float with 256-bit precision.
func RemoveDecimals ¶
RemoveDecimals divides x by 10^y and returns the result as a big.Float.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.