modulepackage
0.0.0-20221028234842-57aba6a92118
Repository: https://github.com/cymertek/go-big.git
Documentation: pkg.go.dev
# README
Go-Big
A numerical library for GoLang forked off the built-in math/big, with extra functionality, and designed to be portable.
To align with the GoLang package, the majority of the functions are exactly the same.
Documentation: https://pkg.go.dev/github.com/cymertek/go-big
Float Additions:
-
Bytes() and SetBytes() - Ability to work with the mantissa directly as a []byte slice
-
Mod1() - The opposite of Int(), in which only the decimal portion of the Float is maintained.
# Functions
Jacobi returns the Jacobi symbol (x/y), either +1, -1, or 0.
NewFloat allocates and returns a new Float set to x, with precision 53 and rounding mode ToNearestEven.
NewInt allocates and returns a new Int set to x.
NewRat creates a new Rat with numerator a and denominator b.
ParseFloat is like f.Parse(s, base) with f set to the given precision and rounding mode.
# Constants
Constants describing the Accuracy of a Float.
no IEEE 754-2008 equivalent.
Constants describing the Accuracy of a Float.
Constants describing the Accuracy of a Float.
MaxBase is the largest number base accepted for string conversions.
largest supported exponent.
largest (theoretically) supported precision; likely memory-limited.
smallest supported exponent.
== IEEE 754-2008 roundTiesToAway.
== IEEE 754-2008 roundTiesToEven.
== IEEE 754-2008 roundTowardNegative.
== IEEE 754-2008 roundTowardPositive.
== IEEE 754-2008 roundTowardZero.
# Structs
An ErrNaN panic is raised by a Float operation that would lead to a NaN under IEEE-754 rules.
A nonzero finite Float represents a multi-precision floating point number
sign × mantissa × 2**exponent
with 0.5 <= mantissa < 1.0, and MinExp <= exponent <= MaxExp.
An Int represents a signed multi-precision integer.
A Rat represents a quotient a/b of arbitrary precision.
# Type aliases
Accuracy describes the rounding error produced by the most recent operation that generated a Float value, relative to the exact value.
RoundingMode determines how a Float value is rounded to the desired precision.
A Word represents a single digit of a multi-precision unsigned integer.