[calculator] Doesn't parse decimal point

Bug #1333795 reported by Felipe Hommen on 2014-06-24
36
This bug affects 9 people
Affects Status Importance Assigned to Milestone
One Hundred Scopes
Undecided
Unassigned
Unity Calculator Scope
Undecided
Unassigned
unity-scope-calculator (Ubuntu)
Medium
Unassigned

Bug Description

When I type a number with decimal point at dash, it simply ignores that character.

For example:
Type 1.1+1
Result: 12
Expected: 2.1

Type 1,1+1
Result: 12
Expected: 2,1

Type 3.14*2
Result: 628
Expected: 6.28

Type 3,14*2
Result: 628
Expected: 6,28

I type both "." and "," as decimal separator character, because I use spanish localization and spanish decimal character is "," instead of "".

Calculator application work as expected.

Related branches

David Callé (davidc3) wrote :

Hi and thanks for the report, which version of Ubuntu are you using?
Does it also happen when you type "calc:3,14*2" ? What about "calc:pi*2" ?

Felipe Hommen (felihommen) wrote :

Using Ubuntu 14.04 LTS

calc:3,14*2 returns 628
calc:3.14*2 returns 628

calc:pi*2 returns 6,283185307

Adolfo Jayme (fitojb) on 2014-06-24
Changed in unity-scope-calculator (Ubuntu):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-scope-calculator (Ubuntu):
status: New → Confirmed
Georg Lipps (georg-lipps) wrote :

Will the scopes be used in LTS 18.04. If yes, this problem should be solved, as a correct calculator in the HUD is very convenient ...
My suggestions use . and , as decimal point regardless of localization.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers