Versions in this module Expand all Collapse all v2 v2.0.0 May 15, 2022 Changes in this version + var FixedPrecision = false + var FloatingPrecision uint64 = 10 + func Eq(n1, n2 Number) bool + func Ge(n1, n2 Number) bool + func Gt(n1, n2 Number) bool + func Le(n1, n2 Number) bool + func Lt(n1, n2 Number) bool + func Ne(n1, n2 Number) bool + func NumDenom(n Number) (Number, Number) + func QuoRem(n1, n2 Number) (Number, Number) + type Int struct + func I(n int64, base ...int) (out Int) + func INan(sign int, base ...int) (out Int) + func ParseInt(str string, base ...int) (n Int, ok bool) + func (a Int) Base() int + func (a Int) IsDefined() bool + func (a Int) IsInf() bool + func (a Int) IsInfinite() bool + func (a Int) IsNan() bool + func (a Int) IsNeg() bool + func (a Int) IsNinf() bool + func (a Int) IsPos() bool + func (a Int) IsZero() bool + func (a Int) Sign() int + func (i Int) Abs() Int + func (i Int) Bit(b int) int64 + func (i Int) Dec() Int + func (i Int) Inc() Int + func (i Int) Is(n int64) bool + func (i Int) IsEven() bool + func (i Int) IsOdd() bool + func (i Int) Len() int + func (i Int) Neg() Int + func (i Int) Sqrt() Int + func (i Int) String() string + func (i Int) ToInt(base ...int) (out Int) + func (i Int) ToRat(base ...int) (out Rat) + func (i Int) Type() NumberType + func (i1 Int) Add(i2 Int) Int + func (i1 Int) Cmp(i2 Int) int + func (i1 Int) Div(i2 Int) Rat + func (i1 Int) Eq(i2 Int) bool + func (i1 Int) Ge(i2 Int) bool + func (i1 Int) Gt(i2 Int) bool + func (i1 Int) Le(i2 Int) bool + func (i1 Int) Lsh(i2 Int) Int + func (i1 Int) Lt(i2 Int) bool + func (i1 Int) Mul(i2 Int) Int + func (i1 Int) Ne(i2 Int) bool + func (i1 Int) Pow(i2 Int) Int + func (i1 Int) Quo(i2 Int) Int + func (i1 Int) QuoRem(i2 Int) (q, r Int) + func (i1 Int) Rem(i2 Int) Int + func (i1 Int) Rsh(i2 Int) Int + func (i1 Int) Sqrtn(i2 Int) Int + func (i1 Int) Sub(i2 Int) Int + type Number interface + Base func() int + Is func(int64) bool + IsDefined func() bool + IsInf func() bool + IsInfinite func() bool + IsNan func() bool + IsNeg func() bool + IsNinf func() bool + IsPos func() bool + IsZero func() bool + Sign func() int + String func() string + ToInt func(...int) Int + ToRat func(...int) Rat + Type func() NumberType + func Abs(n Number) Number + func Add(n1, n2 Number) Number + func Cmp(n1, n2 Number) Number + func Denom(n Number) Number + func Div(n1, n2 Number) Number + func Fact(n Number) Number + func Inf() Number + func Inv(n Number) Number + func Lsh(n1, n2 Number) Number + func Mul(n1, n2 Number) Number + func Nan() Number + func Neg(n Number) Number + func Ninf() Number + func Num(n Number) Number + func Parse(str string) (n Number, ok bool) + func Pow(n, p Number) Number + func Quo(n1, n2 Number) Number + func Rem(n1, n2 Number) Number + func Rsh(n1, n2 Number) Number + func Sqrt(n Number) Number + func Sqrtn(n, s Number) Number + func Sub(n1, n2 Number) Number + func ToBase(n Number, b int) Number + func ToDec(n Number, base ...int) Number + func ToFrac(n Number, base ...int) Number + func ToInt(n Number, base ...int) Number + func ToSci(n Number, base ...int) Number + type NumberType int + const DECIMAL + const FRACTION + const INTEGER + const SCIENTIFIC + type Rat struct + func D(n, d int64, base ...int) Rat + func DI(n int64, base ...int) Rat + func DNan(sign int, base ...int) Rat + func F(n, d int64, base ...int) Rat + func FI(n int64, base ...int) Rat + func FNan(sign int, base ...int) Rat + func ParseDec(str string, base ...int) (n Rat, ok bool) + func ParseFrac(str string, base ...int) (n Rat, ok bool) + func ParseRat(str string, base ...int) (n Rat, ok bool) + func ParseSci(str string, base ...int) (n Rat, ok bool) + func S(n, d int64, base ...int) Rat + func SI(n int64, base ...int) Rat + func SNan(sign int, base ...int) Rat + func (a Rat) Base() int + func (a Rat) IsDefined() bool + func (a Rat) IsInf() bool + func (a Rat) IsInfinite() bool + func (a Rat) IsNan() bool + func (a Rat) IsNeg() bool + func (a Rat) IsNinf() bool + func (a Rat) IsPos() bool + func (a Rat) IsZero() bool + func (a Rat) Sign() int + func (r Rat) Abs() (out Rat) + func (r Rat) Dec() Rat + func (r Rat) Denom() Int + func (r Rat) Inc() Rat + func (r Rat) Inv() Rat + func (r Rat) Is(n int64) bool + func (r Rat) IsInt() bool + func (r Rat) Neg() (out Rat) + func (r Rat) Num() Int + func (r Rat) NumDenom() (n, d Int) + func (r Rat) Sqrt() Rat + func (r Rat) Sqrtn(s Int) Rat + func (r Rat) String() string + func (r Rat) ToDec(base ...int) Rat + func (r Rat) ToFrac(base ...int) Rat + func (r Rat) ToInt(base ...int) (out Int) + func (r Rat) ToRat(base ...int) (out Rat) + func (r Rat) ToSci(base ...int) Rat + func (r Rat) Type() NumberType + func (r1 Rat) Add(r2 Rat) Rat + func (r1 Rat) Cmp(r2 Rat) int + func (r1 Rat) Div(r2 Rat) Rat + func (r1 Rat) Eq(r2 Rat) bool + func (r1 Rat) Ge(r2 Rat) bool + func (r1 Rat) Gt(r2 Rat) bool + func (r1 Rat) Le(r2 Rat) bool + func (r1 Rat) Lt(r2 Rat) bool + func (r1 Rat) Mul(r2 Rat) Rat + func (r1 Rat) Ne(r2 Rat) bool + func (r1 Rat) Pow(r2 Rat) Rat + func (r1 Rat) Quo(r2 Rat) Int + func (r1 Rat) QuoRem(r2 Rat) (q Int, r Rat) + func (r1 Rat) Rem(r2 Rat) Rat + func (r1 Rat) Sub(r2 Rat) Rat Other modules containing this package framagit.org/benjamin.vaudour/number