Problem with rounding floats - 12,70...01 instead of 12,7
Bug #1445152 reported by
Antoni
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Calculator App |
Fix Released
|
Medium
|
Bartosz Kosiorek |
Bug Description
As I observed in this thread
https:/
if you compute simple expression like this
10*0,2+
in calculator app you get as a result
12,700000000000001
I understand that computations on floats are tricky but for such a simple expression the result should be exact.
Related branches
lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-round-fix
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Bartosz Kosiorek: Needs Information
- Riccardo Padovani: Needs Fixing
-
Diff: 112 lines (+46/-5)2 files modifiedapp/ubuntu-calculator-app.qml (+24/-0)
tests/autopilot/ubuntu_calculator_app/tests/test_main.py (+22/-5)
Changed in ubuntu-calculator-app: | |
status: | Triaged → In Progress |
assignee: | nobody → Bartosz Kosiorek (gang65) |
Changed in ubuntu-calculator-app: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We should introduce BigNumbers to fix that issue.