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

Sorry for the PR without an issue 👋 README uses the old URLs of the Go Playground and Go Doc (They are still valid but redirected to the new ones...

In our projects we use this library and use type Decimal. But sometimes we need to have a pointer to this struct. Now if you want to create pointer to...

Based this on https://github.com/shopspring/decimal/pull/111 , but corrected an algorithmic bug. Not sure why those other changes are showing up.

I hope `decimal.Decimal` can have a method that show calculating expression, example:`num1.Div(num2).Add(num3).Round(4)`. if num1=1.23, num2=2.34, num3=3.45, then it can format like as follow: ``` round(1.23 / 2.34 + 3.45, 4)...

RoundUp, RoundDown, RoundFloor is needed

input: fmt.Println(math.Pow(0.0208333333333333, 0.33)) fmt.Println(decimal.NewFromFloat(0.0208333333333333).Pow(decimal.NewFromFloat(0.33))) ouput: 0.2787342852450195 1 can you help me?

How to convert a string to NullDecimal? I use NullDecimal in gorm correspond to decimal(50,15) NOT NULL in mysql