[Libreoffice-bugs] [Bug 137679] Implement a Kahan summation algorithm for reduce the numerical error in the total

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 23 07:06:14 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=137679

--- Comment #7 from b. <newbie-02 at gmx.de> ---
@Roman and @erAck: 

i am glad about all efforts for better and correct calculations in calc, please
be aware that as long as calc calculates as it currently does (unspecific
rounding), all efforts suffer from rounding errors, and it is hard to see if
they improve anything, 

an exotic but simple and clear example, i'm in doubt if the following error can
be fixed with 'Kahan':
'=(2^53+31-2^53)+(2^53-31-2^53)+(2^53+31-2^53)+(2^53-31-2^53)' should result in
'0' (the subterms in brackets cancel each other out), but calc calculates '64'
(and any amount more if you repeat the sequence), 

@erAck: before you press the 'off topic' or 'no value' buzzer ... i'm aware
that above is another bug and will file one, but pls. consider ... it's exactly
what 'Kahan' is designed for, avoiding the accumulation of small errors, and
Roman will have problems to see the bottom of the lake while other influences
crumble the surface and stir up mud ... 

a simple and clear example for such a clouded view: with the above formula and
the result '0' in calc version 4.1.6.2 one could assume this version had been
better ... far from it ... try
'=(2^53+33-2^53)+(2^53-33-2^53)+(2^53+33-2^53)+(2^53-33-2^53)', similar with
3.5.1.2, thus 'old bug', 

ex$el (2010) fails too, '2', that's inside the precision of IEEE 754
(granularity 2 above 2^53), it is not! unavoidable, but would require some
effort, e.g. 'term reordering' or perhaps Kahan can help in that situation ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201123/312fd33e/attachment.htm>


More information about the Libreoffice-bugs mailing list