decimal
decimal copied to clipboard
A high-performance, arbitrary-precision, floating-point decimal library.
Using latest one, the Error `cannot convert type: types.Decimal` occurred from [sqlboiler](https://github.com/volatiletech/sqlboiler) when inserting data at Decimal type. For now, workaround is to use very old one. ``` replace github.com/ericlagergren/decimal...
All I am doing is: ``` import ( decimal "github.com/ericlagergren/decimal/v3" ) ``` This produces the following: ``` $ go mod tidy go: finding module for package github.com/ericlagergren/decimal/v3 go: found github.com/ericlagergren/decimal/v3...
I've run into some strange behaviour when converting values to strings that require rounding up. For example, see the code snippet below: ```go var b decimal.Big b.SetString("9.996208266660") fmt.Println(fmt.Sprintf("%.2f", &b)) //...
 - why result is sci 3E+3 ,why not 3000 ``` go version go1.17.5 darwin/arm64 GOARCH="arm64" github.com/ericlagergren/decimal v0.0.0-20211103172832-aca2edc11f73 ```
When converting to float64 using `Float64()`, the value _can_ differ from the input string while `shopspring/decimal` seems to produce the correct result. for example  Appreciate that the value cannot...
when saving to mongodb with mongo go driver, the decimal.Big is created with an empty context only. Maybe you don't want this dependency, but how can serialize this? As a...
Right now the tests are set up for 64-bit platforms (the min/max exponents in the test suite are too large for 32-bit). All the tests "pass" with `GOARCH=386` to the...
In the GDA arithmetic specification, inexact exp, ln, log10 and power operations may be up to 1 ulp (unit in last place) in error: http://speleotrove.com/decimal/daops.html
I am trying to have fixed scale after multiply operations I trient to set MaxScale before mult but the scale becomes twice. What is the correct way to handle this?