gcalctool can't divide correctly in Jaunty

Bug #326059 reported by Thomas Novin
This bug report is a duplicate of:  Bug #318300: no commas in gcalctool . Edit Remove
2
Affects Status Importance Assigned to Milestone
gcalctool (Ubuntu)
Incomplete
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gcalctool

Simple divides doesn't work correctly in Jaunty.

For example:

1111/10 = 111,1
Result with gcalctool: 1111

3590/12 = 299
Result with gcalctool: 299166666667

However! If you take 3590/12 and then multiply 299166666667 with 12 you get 3590 again :)

Revision history for this message
Thomas Novin (thomasn80) wrote :

$ apt-cache policy gcalctool
gcalctool:
  Installed: 5.25.90-0ubuntu1
  Candidate: 5.25.90-0ubuntu1
  Version table:
 *** 5.25.90-0ubuntu1 0
        500 http://se.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

$ lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04

Revision history for this message
Pedro Villavicencio (pedro) wrote :

thanks for the report, with the first example i got as a result : 111,1 so its ok with the second one i got the bad result, which mode are you using? thanks.

Changed in gcalctool:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Thomas Novin (thomasn80) wrote :

This was using the Basic mode. I just tested Advanced and Financial with the same result. The problem seems to be that it doesn't print the decimal point. Since you can do 3590 / 12 and then * 12 and get 3590 again it obviously has the right numers, it just presents them wrong.

Btw, 2590/12 isn't exactly 299 but 299,166666667. Used bc to calculate and there were no decimal points there..

Revision history for this message
Jesper Larsen (knorr) wrote :

This bug seems to be related to bug #318300
It's a bug on systems with locales that uses , as a decimal separator instead of . causing to decimal separator to disappear.
A fix has been committed upstream and will be included in 5.25.91.

I've included the fix in a package in my PPA https://launchpad.net/~knorr/+archive/ppa

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.