Open bendh1 opened 3 years ago
Hi @bendh1! Unfortunately Pow
method is only working with Integer exponents right now. This is ongoing issue that must be fixed and we are aware of that. First PR that address this issue have been created some time ago by my #229, but I don't have enough time to polish it and merge to main branch :<
Sorry for any inconvenience.
I've finally implemented an improved Pow
method. Please take a look at this comment: https://github.com/shopspring/decimal/issues/55#issuecomment-2033204145
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?