Issue 102054

Summary: Substraction error
Product: Calc Reporter: ruonim <ruonim>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: acelists, issues, jbf.faure, rb.henschel
Version: OOO310m11Keywords: oooqa
Target Milestone: ---   
Hardware: Unknown   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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?