Package Usage: go: github.com/vegaprotocol/decimal
Multiprecision decimal numbers.
For floating-point formatting only; not general purpose.
Only operations are assign and (binary) left/right shift.
Can do binary floating point in multiprecision decimal precisely
because 2 divides 10; cannot do decimal floating point
in multiprecision binary precisely.
Package decimal implements an arbitrary precision fixed-point decimal.
To use as part of a struct:
The zero-value of a Decimal is 0, as you would expect.
The best way to create a new Decimal is to use decimal.NewFromString, ex:
NOTE: This can "only" represent numbers with a maximum of 2^31 digits
after the decimal point.
Multiprecision decimal numbers.
For floating-point formatting only; not general purpose.
Only operations are assign and (binary) left/right shift.
Can do binary floating point in multiprecision decimal precisely
because 2 divides 10; cannot do decimal floating point
in multiprecision binary precisely.
5 versions
Latest release: about 5 years ago
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/vegaprotocol/decimal