Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decimal.Pow result fail #242

Open
bendh1 opened this issue Sep 8, 2021 · 2 comments
Open

decimal.Pow result fail #242

bendh1 opened this issue Sep 8, 2021 · 2 comments

Comments

@bendh1
Copy link

bendh1 commented Sep 8, 2021

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?

@mwoss
Copy link
Member

mwoss commented Sep 8, 2021

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.

@mwoss
Copy link
Member

mwoss commented Apr 2, 2024

I've finally implemented an improved Pow method. Please take a look at this comment: #55 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants