Package big implements arbitrary-precision arithmetic (big numbers).



func Jacobi

1func Jacobi(x, y *Int) int

Jacobi returns the Jacobi symbol (x/y), either +1, -1, or 0. The y argument must be an odd integer.

func ParseFloat

1func ParseFloat(s string, base int, prec uint, mode RoundingMode) (f *Float, b int, err error)

ParseFloat is like f.Parse(s, base) with f set to the given precision and rounding mode.

func NewFloat

1func NewFloat(x float64) *Float

NewFloat allocates and returns a new Float set to x, with precision 53 and rounding mode ToNearestEven. NewFloat panics with ErrNaN if x is a NaN.

func NewInt

1func NewInt(x int64) *Int

NewInt allocates and returns a new Int set to x.

func NewRat

1func NewRat(a, b int64) *Rat

NewRat creates a new Rat with numerator a and denominator b.

© Matthias Hochgatterer – MastodonGithubRésumé