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

cube root is sometimes inaccurate #142

Closed
dan-simon opened this issue Sep 29, 2022 · 0 comments · Fixed by #143
Closed

cube root is sometimes inaccurate #142

dan-simon opened this issue Sep 29, 2022 · 0 comments · Fixed by #143

Comments

@dan-simon
Copy link
Contributor

When trying to implement the cubic formula, I came across this problem:

c = new Decimal(2.5e-8)
Decimal {mantissa: 2.5, exponent: -8}
c.cbrt().pow(3)
Decimal {mantissa: 2.4999999999999996, exponent: -7}

(The cube root is inaccurate, not the .pow(3))

@dan-simon dan-simon mentioned this issue Sep 29, 2022
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

Successfully merging a pull request may close this issue.

1 participant