-
Notifications
You must be signed in to change notification settings - Fork 271
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
Store bills in rational cents rather than floats #528
Comments
I believe this is a duplicate of #165, isn't it? |
Yes but #165 was closed while we are still using float. And as you well know, we have a couple more bugs with the external lib too. |
More interesting research here: https://ren.zone/articles/safe-money |
Yes, you're right : we should move away from these silly floats! |
Hey @Natim ! |
Yes you are exactly right. |
@LeoMouyna how do you plan on serializing |
Storing bills as floats leads to a number of problematic edge cases.
Instead we should handle money as integers in cents and then display them as float in the end.
We did this change on the elm-ihatemoney project during yesterday hackathon with @gdeest and I think we should fix it in the API as well.
The text was updated successfully, but these errors were encountered: