decimal icon indicating copy to clipboard operation
decimal copied to clipboard

Arbitrary-precision fixed-point decimal numbers in Go

Results 140 decimal issues
Sort by recently updated
recently updated
newest added

So, our team still working with legacy provider to mongo [gopkg.in/mgo.v2](https://pkg.go.dev/gopkg.in/mgo.v2) and currently, we're migrating to [official mongo driver](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo). Both of them has different bson serialization library, and, what is...

hi, pow(0.5) is not working that is say sqrt() is not working, I see someone has raised PR, why not merge it?

``` go NewFromFloat(5.45600).Round(4).String() // output: "5.4560" // I want output in the following format NewFromFloat(5).Round(4).String() // output: "5.0000" ```

``` b := big.NewInt(100) d := int32(1

Many functions like math.Acos, math.Cosh are not included in the decimal library! Are you planning to include them soon? If not, mustn't they be included? Please suggest!

For computing the arbitrary nth root of any number. I also go formatted some unrelated bits of code. I implemented the shifting nth root algorithm in order to compute an...

Could you use the correct format for deprecated API. According to https://github.com/golang/go/wiki/Deprecated, the deprecated API must follow this. Plz find an example of resolve below ```diff diff --git a/decimal.go b/decimal.go...

I have just notices that the following happens: ```go a := decimal.RequireFromString("1.5") b := decimal.RequireFromString("3") one := decimal.NewFromInt(1) bInv := one.Div(b) fmt.Println(a, b, bInv, a.Mul(bInv), a.Div(b)) ``` which prints ```...

[https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b99f910/src/encoding/json/encode.go#L341](https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b99f910/src/encoding/json/encode.go#L341) 不然 json 的 tag omitEmpty 无效 谢谢