Versions in this module Expand all Collapse all v1 v1.3.0 Mar 24, 2020 Changes in this version type Decimal + func (d Decimal) Precision() int32 v1.2.1 Mar 20, 2020 Changes in this version + var DivisionPrecision = 16 + var MarshalJSONWithoutQuotes = false + var Zero = New(0, 1) + func RescalePair(d1 Decimal, d2 Decimal) (Decimal, Decimal) + type Decimal struct + func Avg(first Decimal, rest ...Decimal) Decimal + func Max(first Decimal, rest ...Decimal) Decimal + func Min(first Decimal, rest ...Decimal) Decimal + func New(value int64, exp int32) Decimal + func NewFromBigInt(value *big.Int, exp int32) Decimal + func NewFromFloat(value float64) Decimal + func NewFromFloat32(value float32) Decimal + func NewFromFloatWithExponent(value float64, exp int32) Decimal + func NewFromInt(value int64) Decimal + func NewFromInt32(value int32) Decimal + func NewFromString(value string) (Decimal, error) + func RequireFromString(value string) Decimal + func Sum(first Decimal, rest ...Decimal) Decimal + func (d *Decimal) GobDecode(data []byte) error + func (d *Decimal) Scan(value interface{}) error + func (d *Decimal) UnmarshalBinary(data []byte) error + func (d *Decimal) UnmarshalJSON(decimalBytes []byte) error + func (d *Decimal) UnmarshalText(text []byte) error + func (d Decimal) Abs() Decimal + func (d Decimal) Add(d2 Decimal) Decimal + func (d Decimal) Ceil() Decimal + func (d Decimal) CeilPrec(precision int32) Decimal + func (d Decimal) Cmp(d2 Decimal) int + func (d Decimal) Coefficient() *big.Int + func (d Decimal) Cos() Decimal + func (d Decimal) Div(d2 Decimal) Decimal + func (d Decimal) DivRound(d2 Decimal, precision int32) Decimal + func (d Decimal) Equal(d2 Decimal) bool + func (d Decimal) Equals(d2 Decimal) bool + func (d Decimal) Exponent() int32 + func (d Decimal) Float64() (f float64, exact bool) + func (d Decimal) Floor() Decimal + func (d Decimal) GobEncode() ([]byte, error) + func (d Decimal) GreaterThan(d2 Decimal) bool + func (d Decimal) GreaterThanOrEqual(d2 Decimal) bool + func (d Decimal) IntPart() int64 + func (d Decimal) IsNegative() bool + func (d Decimal) IsPositive() bool + func (d Decimal) IsZero() bool + func (d Decimal) LessThan(d2 Decimal) bool + func (d Decimal) LessThanOrEqual(d2 Decimal) bool + func (d Decimal) MarshalBinary() (data []byte, err error) + func (d Decimal) MarshalJSON() ([]byte, error) + func (d Decimal) MarshalText() (text []byte, err error) + func (d Decimal) Mod(d2 Decimal) Decimal + func (d Decimal) Mul(d2 Decimal) Decimal + func (d Decimal) Neg() Decimal + func (d Decimal) Pow(d2 Decimal) Decimal + func (d Decimal) QuoRem(d2 Decimal, precision int32) (Decimal, Decimal) + func (d Decimal) Rat() *big.Rat + func (d Decimal) Round(places int32) Decimal + func (d Decimal) RoundBank(places int32) Decimal + func (d Decimal) RoundCash(interval uint8) Decimal + func (d Decimal) Shift(shift int32) Decimal + func (d Decimal) Sign() int + func (d Decimal) Sin() Decimal + func (d Decimal) String() string + func (d Decimal) StringFixed(places int32) string + func (d Decimal) StringFixedBank(places int32) string + func (d Decimal) StringFixedCash(interval uint8) string + func (d Decimal) StringScaled(exp int32) string + func (d Decimal) Sub(d2 Decimal) Decimal + func (d Decimal) Tan() Decimal + func (d Decimal) Truncate(precision int32) Decimal + func (d Decimal) Value() (driver.Value, error) + func (x Decimal) Atan() Decimal + type NullDecimal struct + Decimal Decimal + Valid bool + func (d *NullDecimal) Scan(value interface{}) error + func (d *NullDecimal) UnmarshalJSON(decimalBytes []byte) error + func (d NullDecimal) MarshalJSON() ([]byte, error) + func (d NullDecimal) Value() (driver.Value, error)