-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Invalid results when using big numbers #46
Comments
I also have this issue on latest calculator app. It seems that most calculator apps have this issue, even Google. |
Recently Microsoft open-sourced their calcuator app, and inside we can find a library that allows for
The calculator is written in C++ but glancing over the library I think it's using only C so it should be possible to use it relatively easily. |
Another example: The problem is that the built-in data type, The solution is quite simple: use third-party data types for calculations using long arithmetic. https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software For Vala there is a building to Or see https://github.com/GNOME/gnome-calculator/tree/master/vapi |
Hello,
Although there's no size limit for entered numbers, the result wrong for big numbers.
3 examples 👍
11111111111111111-1 = 11111111111111112
777777777777777777+1 = 777777777777777792 !
777777777777777777-1 = 777777777777777792 ?!
Tested on elementaryOS Loki with various kernels (4.4.0-104-generic and 4.13.10-041310-generic)
[INFO 14:26:07.508519] Application.vala:154: Calculatrice version: 0.1.3
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: