Versions in this module Expand all Collapse all v0 v0.1.0 Aug 2, 2026 Changes in this version + const Euclid + const RoundCeil + const RoundDown + const RoundFloor + const RoundHalfCeil + const RoundHalfDown + const RoundHalfEven + const RoundHalfFloor + const RoundHalfUp + const RoundUp + var Default = defaultConstructor() + func Bool(v bool) *bool + func I64(v int64) *int64 + func IsDecimal(v any) bool + type Config struct + Crypto *bool + Defaults bool + MaxE *int64 + MinE *int64 + Modulo *int64 + Precision *int64 + Rounding *int64 + ToExpNeg *int64 + ToExpPos *int64 + type Constructor struct + Crypto bool + MaxE int64 + MinE int64 + Modulo int64 + Precision int64 + Rounding int64 + ToExpNeg int64 + ToExpPos int64 + func (c *Constructor) Abs(x any) *Decimal + func (c *Constructor) Acos(x any) *Decimal + func (c *Constructor) Acosh(x any) *Decimal + func (c *Constructor) Add(x, y any) *Decimal + func (c *Constructor) Asin(x any) *Decimal + func (c *Constructor) Asinh(x any) *Decimal + func (c *Constructor) Atan(x any) *Decimal + func (c *Constructor) Atan2(y, x any) *Decimal + func (c *Constructor) Atanh(x any) *Decimal + func (c *Constructor) Cbrt(x any) *Decimal + func (c *Constructor) Ceil(x any) *Decimal + func (c *Constructor) Clamp(x, min, max any) *Decimal + func (c *Constructor) Clone(cfg *Config) *Constructor + func (c *Constructor) Config(cfg *Config) *Constructor + func (c *Constructor) Cos(x any) *Decimal + func (c *Constructor) Cosh(x any) *Decimal + func (c *Constructor) Div(x, y any) *Decimal + func (c *Constructor) Exp(x any) *Decimal + func (c *Constructor) Floor(x any) *Decimal + func (c *Constructor) Hypot(args ...any) *Decimal + func (c *Constructor) Ln(x any) *Decimal + func (c *Constructor) Log(x any, y ...any) *Decimal + func (c *Constructor) Log10(x any) *Decimal + func (c *Constructor) Log2(x any) *Decimal + func (c *Constructor) Max(args ...any) *Decimal + func (c *Constructor) Min(args ...any) *Decimal + func (c *Constructor) Mod(x, y any) *Decimal + func (c *Constructor) Mul(x, y any) *Decimal + func (c *Constructor) New(v any) *Decimal + func (c *Constructor) Pow(x, y any) *Decimal + func (c *Constructor) Random(sds ...int64) *Decimal + func (c *Constructor) Round(x any) *Decimal + func (c *Constructor) Set(cfg *Config) *Constructor + func (c *Constructor) Sign(x any) float64 + func (c *Constructor) Sin(x any) *Decimal + func (c *Constructor) Sinh(x any) *Decimal + func (c *Constructor) Sqrt(x any) *Decimal + func (c *Constructor) Sub(x, y any) *Decimal + func (c *Constructor) Sum(args ...any) *Decimal + func (c *Constructor) Tan(x any) *Decimal + func (c *Constructor) Tanh(x any) *Decimal + func (c *Constructor) Trunc(x any) *Decimal + type Decimal struct + func New(v any) *Decimal + func (x *Decimal) Abs() *Decimal + func (x *Decimal) AbsoluteValue() *Decimal + func (x *Decimal) Acos() *Decimal + func (x *Decimal) Acosh() *Decimal + func (x *Decimal) Add(y any) *Decimal + func (x *Decimal) Asin() *Decimal + func (x *Decimal) Asinh() *Decimal + func (x *Decimal) Atan() *Decimal + func (x *Decimal) Atanh() *Decimal + func (x *Decimal) Cbrt() *Decimal + func (x *Decimal) Ceil() *Decimal + func (x *Decimal) Clamp(min, max any) *Decimal + func (x *Decimal) ClampedTo(min, max any) *Decimal + func (x *Decimal) Cmp(y any) float64 + func (x *Decimal) ComparedTo(y any) float64 + func (x *Decimal) Cos() *Decimal + func (x *Decimal) Cosh() *Decimal + func (x *Decimal) Cosine() *Decimal + func (x *Decimal) CubeRoot() *Decimal + func (x *Decimal) DecimalPlaces() float64 + func (x *Decimal) Div(y any) *Decimal + func (x *Decimal) DivToInt(y any) *Decimal + func (x *Decimal) DividedBy(y any) *Decimal + func (x *Decimal) DividedToIntegerBy(y any) *Decimal + func (x *Decimal) Dp() float64 + func (x *Decimal) Eq(y any) bool + func (x *Decimal) Equals(y any) bool + func (x *Decimal) Exp() *Decimal + func (x *Decimal) Float64() float64 + func (x *Decimal) Floor() *Decimal + func (x *Decimal) GreaterThan(y any) bool + func (x *Decimal) GreaterThanOrEqualTo(y any) bool + func (x *Decimal) Gt(y any) bool + func (x *Decimal) Gte(y any) bool + func (x *Decimal) HyperbolicCosine() *Decimal + func (x *Decimal) HyperbolicSine() *Decimal + func (x *Decimal) HyperbolicTangent() *Decimal + func (x *Decimal) InverseCosine() *Decimal + func (x *Decimal) InverseHyperbolicCosine() *Decimal + func (x *Decimal) InverseHyperbolicSine() *Decimal + func (x *Decimal) InverseHyperbolicTangent() *Decimal + func (x *Decimal) InverseSine() *Decimal + func (x *Decimal) InverseTangent() *Decimal + func (x *Decimal) IsFinite() bool + func (x *Decimal) IsInt() bool + func (x *Decimal) IsInteger() bool + func (x *Decimal) IsNaN() bool + func (x *Decimal) IsNeg() bool + func (x *Decimal) IsNegative() bool + func (x *Decimal) IsPos() bool + func (x *Decimal) IsPositive() bool + func (x *Decimal) IsZero() bool + func (x *Decimal) LessThan(y any) bool + func (x *Decimal) LessThanOrEqualTo(y any) bool + func (x *Decimal) Ln() *Decimal + func (x *Decimal) Log(bases ...any) *Decimal + func (x *Decimal) Logarithm(bases ...any) *Decimal + func (x *Decimal) Lt(y any) bool + func (x *Decimal) Lte(y any) bool + func (x *Decimal) Minus(y any) *Decimal + func (x *Decimal) Mod(y any) *Decimal + func (x *Decimal) Modulo(y any) *Decimal + func (x *Decimal) Mul(y any) *Decimal + func (x *Decimal) NaturalExponential() *Decimal + func (x *Decimal) NaturalLogarithm() *Decimal + func (x *Decimal) Neg() *Decimal + func (x *Decimal) Negated() *Decimal + func (x *Decimal) Plus(y any) *Decimal + func (x *Decimal) Pow(y any) *Decimal + func (x *Decimal) Precision(z ...bool) float64 + func (x *Decimal) Round() *Decimal + func (x *Decimal) Scan(src any) error + func (x *Decimal) Sd(z ...bool) float64 + func (x *Decimal) Sin() *Decimal + func (x *Decimal) Sine() *Decimal + func (x *Decimal) Sinh() *Decimal + func (x *Decimal) Sqrt() *Decimal + func (x *Decimal) SquareRoot() *Decimal + func (x *Decimal) String() string + func (x *Decimal) Sub(y any) *Decimal + func (x *Decimal) Tan() *Decimal + func (x *Decimal) Tangent() *Decimal + func (x *Decimal) Tanh() *Decimal + func (x *Decimal) Times(y any) *Decimal + func (x *Decimal) ToBinary(sd ...int64) string + func (x *Decimal) ToDP(args ...int64) *Decimal + func (x *Decimal) ToDecimalPlaces(args ...int64) *Decimal + func (x *Decimal) ToExponential(args ...int64) string + func (x *Decimal) ToFixed(args ...int64) string + func (x *Decimal) ToFraction(maxD ...any) []*Decimal + func (x *Decimal) ToHex(sd ...int64) string + func (x *Decimal) ToHexadecimal(sd ...int64) string + func (x *Decimal) ToJSON() string + func (x *Decimal) ToNearest(y any, rm ...int64) *Decimal + func (x *Decimal) ToOctal(sd ...int64) string + func (x *Decimal) ToPower(y any) *Decimal + func (x *Decimal) ToPrecision(args ...int64) string + func (x *Decimal) ToSD(args ...int64) *Decimal + func (x *Decimal) ToSignificantDigits(args ...int64) *Decimal + func (x *Decimal) ToString() string + func (x *Decimal) Trunc() *Decimal + func (x *Decimal) Truncated() *Decimal + func (x *Decimal) UnmarshalText(b []byte) error + func (x *Decimal) Value() (driver.Value, error) + func (x *Decimal) ValueOf() string + func (x Decimal) MarshalJSON() ([]byte, error) + func (x Decimal) MarshalText() ([]byte, error)