Calculator uses 06 in place of decimal

Bug #198250 reported by poweruser
14
Affects Status Importance Assigned to Milestone
GCalctool
Fix Released
High
gcalctool (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gcalctool

The calculator in Hardy produces answers that re completely wrong when they are in decimal form. E.g.

3/4 = 0675
7/8 = 06875
5/4 = 1625
1/10 = 061

My guess is that the font used to show the answer does not have a decimal so it shows a 06 for some reason. I would rate this as critical (to gcalctool).
I am using version 5.21.92.

ProblemType: Bug
Architecture: i386
Date: Mon Mar 3 20:35:37 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/gcalctool
Package: gcalctool 5.21.92-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gcalctool
Uname: Linux 2.6.24-11-generic i686

Tags: apport-bug

Related branches

Revision history for this message
poweruser (iamthemasterofdisaster) wrote :
Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

Hi,

Thanks for your bug report.

I am also using that version of gcalctool, but I cannot reproduce your problem. in order to understand more precisely your problem, can you detail a little bit some points :
     -> which mode of gcalctool are you using ?
     -> does this behaviour happen with bith the / typed on the keyboard and on the gcalctool GUI ?

Thanks in advance,

Changed in gcalctool:
status: New → Incomplete
Revision history for this message
Morten Kjeldgaard (mok0) wrote :

Could this be a locale thing? I have LANG=en_DK.UTF-8, and gcalctool shows the decimal separator as a comma instead of a point.

OTOH, when I switch on "Show Thousands Separator", and compute 89/5 I get: 1,7,8

Furthermore:

3/4 = 0,,75
10000/2 = 5,,000

Revision history for this message
Morten Kjeldgaard (mok0) wrote :

I am running gcalctool 5.21.92-0ubuntu1
Linux: 2.6.24-11-generic, amd64

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

To check if it is a locale test, try in an xterm : LANG=C && gcalctool

And see if it is the same behaviour.

Regarding the separator, it is an already existing bug that has been reported upstream.

Revision history for this message
pvdeynse (vandeynse) wrote :

I have the exact same problem

using gcalctool 5.21.92-0ubuntu1

I'm using:
 Linux version 2.6.24-11-generic (buildd@rothera) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu1)) #1 SMP Fri Feb 29 22:08:31 UTC 2008 (Ubuntu 2.6.24-11.17-generic)

my locale is:

LANG=nl_BE.UTF-8
LC_CTYPE="nl_BE.UTF-8"
LC_NUMERIC="nl_BE.UTF-8"
LC_TIME="nl_BE.UTF-8"
LC_COLLATE="nl_BE.UTF-8"
LC_MONETARY="nl_BE.UTF-8"
LC_MESSAGES="nl_BE.UTF-8"
LC_PAPER="nl_BE.UTF-8"
LC_NAME="nl_BE.UTF-8"
LC_ADDRESS="nl_BE.UTF-8"
LC_TELEPHONE="nl_BE.UTF-8"
LC_MEASUREMENT="nl_BE.UTF-8"
LC_IDENTIFICATION="nl_BE.UTF-8"
LC_ALL=

here is how to reproduce the problem:

in calculator do the following:
          4,0-4,0*10%= 3,6 <=== this is correct
          4,1-4,1*10%= 3669 <=== this is bogus

from now on every decimal calculation will give bogus results e.g.
          4-0,2= 368
          3/4= 0675

Revision history for this message
poweruser (iamthemasterofdisaster) wrote :

It does not appear by default, as I originally though. However, I have figured out how to replicate it, and it works in any view.

-(5)/4

That will give you -1625, and afterward all answers with decimals will be wrong. With this knowledge it is now obvious that it is not caused by a font's lack of a full stop.
Multiple instances of gcalctool do not interfere with each other, so it is possible to have one calculator that is malfunctioning while another works as expected.

The bug specifically uses a 6 in place of a decimal, so if the number should be 1.25 it will become 1625, and similarly, if the number should be 1.6 it becomes 166.

Changed in gcalctool:
status: Incomplete → Confirmed
Changed in gcalctool:
status: Unknown → New
Changed in gcalctool:
status: New → Confirmed
Changed in gcalctool:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcalctool - 5.22.0-0ubuntu1

---------------
gcalctool (5.22.0-0ubuntu1) hardy; urgency=low

  * New upstream version
    - fixes the decimal replaced by 6 problem (LP: #198250)
    - fixes memory registers that are save incorrectly (LP: #196181)

 -- Christophe Sauthier <email address hidden> Mon, 10 Mar 2008 16:09:39 +0100

Changed in gcalctool:
status: Confirmed → Fix Released
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Yes, fixed thanks!

Revision history for this message
NITSCH Zoltán (boritek) wrote :

I have Hungarian layouts, and a gcalctool version 5.22.1-0 and i still have problems with the thousand separators:

50000*200= 10,,000.000 instead of 10.000.000
0,565*10 = 5,,65 instead of 5,65
50,865/100 = 0,,50.855 instead of 0,50865

Changed in gcalctool:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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