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

Fix: Rounding Error On Display During Entry #18

Merged
merged 1 commit into from
Apr 4, 2021

Conversation

efguydan
Copy link
Member

This Pull Request fixes Double's problem with accurately storing 1.0E23 in memory, storing 9.99999999999E22 instead. This is fixed by changing the parsed number during entry to BigDecimal from Double.
BigDecimal doesn't have a problem with storing 1.0E23 or any other number in memory accurately, fixing this problem.

Another plus that comes with this fix is; Double has a limit of 1.0E308, which returns infinity after this point. BigDecimal can store as many numbers as you can type.

Fixes #17

@rasheedsulayman
Copy link
Member

rasheedsulayman commented Mar 29, 2021

Do you maybe know the implication of using BigDecimal? i.e how heavy/slow is it.

@rasheedsulayman rasheedsulayman merged commit 938f33a into master Apr 4, 2021
@efguydan efguydan deleted the Fix/overflow_error branch December 27, 2022 23:22
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 this pull request may close these issues.

Rounding error on display during entry
2 participants