Issue 125229 - sum of specific numbers
Summary: sum of specific numbers
Status: CLOSED DUPLICATE of issue 69749
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: 4.1.0
Hardware: PC Windows 7
: P3 Major (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2014-07-09 21:27 UTC by Paul Santek
Modified: 2014-07-09 21:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

first field minus second fild results in the third field (13.39 KB, image/jpeg)
2014-07-09 21:27 UTC, Paul Santek
no flags Details
calculation is not always the same (15.25 KB, image/jpeg)
2014-07-09 21:33 UTC, Paul Santek
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Paul Santek 2014-07-09 21:27:29 UTC
Created attachment 83665 [details]
first field minus second fild results in the third field

one fild has the number 4470 in it, an other the number 4461,1. The second fild is subtracted from the first one, gives the result -8,89999999999964 instead of -8,9.
Occurs around the numbers 4470 and 4461,1 (it has to be around ,1 ... ,2)
Comment 1 Paul Santek 2014-07-09 21:33:34 UTC
Created attachment 83666 [details]
calculation is not always the same

compare both attachments
Comment 2 Regina Henschel 2014-07-09 21:53:26 UTC
That is the particularity of floating point numbers. To avoid the problems, you can calculate in a unit, that will give you integer numbers. Or you display the results in a rounded format.

Some of the problems are described in (The article is not finished, but explains already some problems with floating point numbers.) Find a lot of other examples in the duplicates of issue 69749.

*** This issue has been marked as a duplicate of issue 69749 ***