Versions in this module Expand all Collapse all v1 v1.3.0 Sep 22, 2019 v1.2.0 Aug 20, 2019 Changes in this version + const BigDecimalStructSize + var ErrBadNumber = errors.Errorf("Bad Number") + var ErrDivByZero = errors.Errorf("Division by 0") + var ErrOverflow = errors.Errorf("Data Overflow") + var ErrTruncated = errors.Errorf("Data Truncated") + func DecimalAdd(from1, from2, to *Decimal) error + func DecimalDiv(from1, from2, to *Decimal, fracIncr int) error + func DecimalMod(from1, from2, to *Decimal) error + func DecimalMul(from1, from2, to *Decimal) error + func DecimalPeak(b []byte) (int, error) + func DecimalSub(from1, from2, to *Decimal) error + func GetMaxFloat(flen int, decimal int) float64 + func Round(f float64, dec int) float64 + func RoundFloat(f float64) float64 + func Truncate(f float64, dec int) float64 + func TruncateFloat(f float64, flen int, decimal int) (float64, error) + type Decimal struct + Value string + func DecimalNeg(from *Decimal) *Decimal + func NewDecFromFloatForTest(f float64) *Decimal + func NewDecFromInt(i int64) *Decimal + func NewDecFromStringForTest(s string) *Decimal + func NewDecFromUint(i uint64) *Decimal + func NewMaxOrMinDec(negative bool, prec, frac int) *Decimal + func (Decimal) JavaClassName() string + func (d *Decimal) Compare(to *Decimal) int + func (d *Decimal) FromBin(bin []byte, precision, frac int) (binSize int, err error) + func (d *Decimal) FromBytes(str []byte) error + func (d *Decimal) FromFloat64(f float64) error + func (d *Decimal) FromInt(val int64) *Decimal + func (d *Decimal) FromString(str string) error + func (d *Decimal) FromUint(val uint64) *Decimal + func (d *Decimal) GetDigitsFrac() int8 + func (d *Decimal) IsNegative() bool + func (d *Decimal) IsZero() bool + func (d *Decimal) PrecisionAndFrac() (precision, frac int) + func (d *Decimal) Round(to *Decimal, frac int, roundMode RoundMode) (err error) + func (d *Decimal) Shift(shift int) error + func (d *Decimal) String() string + func (d *Decimal) ToBin(precision, frac int) ([]byte, error) + func (d *Decimal) ToBytes() (str []byte) + func (d *Decimal) ToFloat64() (float64, error) + func (d *Decimal) ToHashKey() ([]byte, error) + func (d *Decimal) ToInt() (int64, error) + func (d *Decimal) ToUint() (uint64, error) + type RoundMode int32 + const DivFracIncr + const ModeHalfEven + const ModeTruncate