Versions in this module Expand all Collapse all v0 v0.7.2 Jan 16, 2022 Changes in this version type Decimal + func (d *Decimal) MarshalMsgpack() ([]byte, error) + func (d *Decimal) UnmarshalMsgpack(b []byte) error v0.7.1 Jan 16, 2022 Changes in this version + var MarshalQuoted = false + var NaN = NewDecimal(math.NaN()) + var ONE = NewFromString("1") + var TEN = NewFromString("10") + var ZERO = NewFromString("0") + type Decimal struct + func MaxSlice(decimals ...Decimal) Decimal + func MinSlice(decimals ...Decimal) Decimal + func NewDecimal(val float64) Decimal + func NewFromInt(dec int) Decimal + func NewFromString(str string) Decimal + func (d *Decimal) Scan(src interface{}) error + func (d *Decimal) UnmarshalJSON(b []byte) error + func (d Decimal) Abs() Decimal + func (d Decimal) Add(addend Decimal) Decimal + func (d Decimal) Cmp(other Decimal) int + func (d Decimal) Div(denominator Decimal) Decimal + func (d Decimal) EQ(other Decimal) bool + func (d Decimal) Float() float64 + func (d Decimal) FormattedString(places int) string + func (d Decimal) Frac(f float64) Decimal + func (d Decimal) GT(other Decimal) bool + func (d Decimal) GTE(other Decimal) bool + func (d Decimal) IsZero() bool + func (d Decimal) LT(other Decimal) bool + func (d Decimal) LTE(other Decimal) bool + func (d Decimal) MarshalJSON() ([]byte, error) + func (d Decimal) Mul(factor Decimal) Decimal + func (d Decimal) NaN() bool + func (d Decimal) Neg() Decimal + func (d Decimal) Pow(exp int) Decimal + func (d Decimal) Sqrt() Decimal + func (d Decimal) String() string + func (d Decimal) Sub(subtrahend Decimal) Decimal + func (d Decimal) Value() (driver.Value, error) + func (d Decimal) Zero() bool