Bug 118300 - kcalc truncates decimals sporadically
Summary: kcalc truncates decimals sporadically
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Klaus Niederkrüger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 09:21 UTC by Stefan Winter
Modified: 2006-01-10 17:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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