Issue 102054 - Substraction error
Summary: Substraction error
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOO310m11
Hardware: Unknown Windows, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2009-05-19 10:48 UTC by ruonim
Modified: 2013-01-29 21:52 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ruonim 2009-05-19 10:48:26 UTC
=400000000000001-400000000000000

returns 0
Comment 1 Regina Henschel 2009-05-19 16:45:43 UTC
I think, OOo should be more accurate, when the arguments are pure integral numbers.

As far as I see, in interpr5.cxx the function approxSub is used for subtracting
in all cases. This calls approxEqual, which forces the result to zero, if the
difference is in the last three bits. I am right?
If yes, I suggest to make a case distinction whether the values are pure
integral numbers or not and use a simple minus, when both are pure integral
numbers. As far as I know, IEEE double is accurate up to the last bit in adding,
subtracting and multiplying, in the range of integral numbers. Why should OOo
intentially reduce accuracy?