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

Conversion of Scientific to JNumber computes an incorrect exponent #84

Closed
sheaf opened this issue Feb 11, 2022 · 0 comments · Fixed by #85
Closed

Conversion of Scientific to JNumber computes an incorrect exponent #84

sheaf opened this issue Feb 11, 2022 · 0 comments · Fixed by #85

Comments

@sheaf
Copy link
Contributor

sheaf commented Feb 11, 2022

ghci> jNumberToScientific $ _JNumberScientific # ( fromFloatDigits @Double 5 )
Just 5.0
ghci> jNumberToScientific $ _JNumberScientific # ( fromFloatDigits @Double 0.5 )
Just 5.0

This seems to be because of an off-by-one error in _JNumberScientific. I don't understand why the testsuite doesn't catch this.

Fix in #85.

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