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

Precise floating point math #5

Closed
dozed-dev opened this issue Feb 1, 2021 · 3 comments · Fixed by #15
Closed

Precise floating point math #5

dozed-dev opened this issue Feb 1, 2021 · 3 comments · Fixed by #15
Labels
bug Something isn't working
Milestone

Comments

@dozed-dev
Copy link

Binary floating point math is imprecise when dealing with decimal numbers, for example 1.1 0.5 - is calculated as 0.6000000000000001. This could be solved if the numbers are represented as rational internally, because rational numbers use integer math.

This library, for example, provides computations on rational numbers.

I hope this won't be too much trouble to implement, and thank you for making this app :)

@apesic
Copy link
Owner

apesic commented Feb 1, 2021

Thanks for sharing that library--I'll take a look at how hard it will be to implement this.

@apesic apesic added the bug Something isn't working label Feb 1, 2021
@apesic
Copy link
Owner

apesic commented Feb 3, 2021

Gave this a try and it was a simple change, so this fix will be included in the next release. I'll probably be able to have it out on the Google Play version next week, but given the slow and unpredictable pace of F-Droid's build + release process, it may be a few weeks before it lands there.

@wviana
Copy link

wviana commented Mar 6, 2023

So this was already solved wan't it?

@apesic apesic added this to the v1.3 milestone Mar 7, 2023
@apesic apesic mentioned this issue Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants