Wrong result after calculate and clean value

Bug #1286932 reported by Bartosz Kosiorek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Calculator App
Fix Released
Undecided
Bartosz Kosiorek

Bug Description

Steps to reproduce:

1. Type 256 number
2. Press "/"
3. Press "2"
4. Press "=". Engine formula is 256/2
5. Press "=". Engine formula is (256/2)/2
6. Press "/". (Now pressing "C" is possible)
7. Press "2". Engine formula is ((256/2)/2)/2
8. Press "C". Engine formula is ((256/2)/2
8. Press "C". Engine formula is ((256/2
5. Press "=". Result 0 is wrong. Should be 128.

The root of cause of this problem is that function "this.pop", removes Close bracket, without removin Start bracket:
  For example (256/2)/2 transform to (256/2 but should transform to 256/2

Related branches

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

I have prepared working patch. I will add it after detailed tests will passed

Changed in ubuntu-calculator-app:
assignee: nobody → Bartosz Kosiorek (gang65)
status: New → Confirmed
description: updated
description: updated
Changed in ubuntu-calculator-app:
status: Confirmed → In Progress
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

To simplify the implementation process, improve visibility, repeat operation (you could trigger it by pressing "=" several times) is displayed.

Before:
  256
  /2 < Press "=" >
  128 < Press "=" >
  64 < Press "=" >
  32

Now:
  256/2 < Press "=" >
  128 < Press "=" >
  /2
  64 < Press "=" >
  /2
  32

With that implementation you could simply map "screenFormula" to "formula".

Thanks !

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calculator-app at revision 223, scheduled for release in ubuntu-calculator-app, milestone 1.6

Changed in ubuntu-calculator-app:
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calculator-app at revision None, scheduled for release in ubuntu-calculator-app, milestone 1.6

Changed in ubuntu-calculator-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.