[calculator] Doesn't parse decimal point

Bug #1333795 reported by Felipe Hommen
This bug affects 9 people
Affects Status Importance Assigned to Milestone
One Hundred Scopes
Unity Calculator Scope
unity-scope-calculator (Ubuntu)

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

Revision history for this message
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" ?

Revision history for this message
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)
Changed in unity-scope-calculator (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity-scope-calculator (Ubuntu):
status: New → Confirmed
Revision history for this message
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