Versions in this module Expand all Collapse all v0 v0.0.1 Dec 14, 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 Integer struct + BitCount int + BitLength int + FirstNonzeroIntNum int + LowestSetBit int + Mag []int + Signum int32 + func (Integer) JavaClassName() string + func (i *Integer) Format(s fmt.State, ch rune) + func (i *Integer) FromSignAndMag(signum int32, mag []int) + func (i *Integer) FromString(s string) (err error) + func (i *Integer) GetSignAndMag() (signum int32, mag []int) + func (i *Integer) GobDecode(buf []byte) error + func (i *Integer) GobEncode() ([]byte, error) + func (i *Integer) MarshalJSON() ([]byte, error) + func (i *Integer) MarshalText() (text []byte, err error) + func (i *Integer) SetValue(value *big.Int) + func (i *Integer) String() string + func (i *Integer) UnmarshalJSON(text []byte) error + func (i *Integer) UnmarshalText(text []byte) error + func (i *Integer) Value() *big.Int + type RoundMode int32 + const DivFracIncr + const ModeHalfEven + const ModeTruncate