Bug 118300

Summary: kcalc truncates decimals sporadically
Product: [Applications] kcalc Reporter: Stefan Winter <swinter>
Component: generalAssignee: Klaus Niederkrüger <kniederk>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Stefan Winter 2005-12-14 09:21:30 UTC
Version:           2.0 (using KDE 3.5.0, compiled sources)
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14.2

Even when no decimal precision is set in the settings, or when the precision is set higher than the result needs, truncating of decimals happens under specific circumstances.
This bug is _not_ present in 1.8 (KDE 3.4) but in 2.0 (KDE 3.5). Test case:

Numbers below 10000 are calculated correctly, above not (decimal precision set to 2 digits, max digits overall set to 12):

1+1.95 = 1.95
9998+1.95 = 9999.95
10000+1.95 = 10001.9 <-- .05 is truncated; internally it's still there, if you add again a 0.05 it will jump to 10002 as expected.
Comment 1 Philippe Rigault 2005-12-15 04:36:44 UTC
Confirmed.
Comment 2 Bob D. 2005-12-20 06:49:42 UTC
I can confirm as well. KDE 3.5.0, KCalc 2.0, on PCLinuxOS 0.92.
Comment 3 Klaus Niederkrüger 2006-01-10 17:19:29 UTC
I fixed this in the svn-tree (for KDE-3.5.1 and KDE 4.0).
If it still doesn't work, please reopen the bug.

Thanks

Klaus