[Libreoffice-bugs] [Bug 140722] calc: save-load-cycle: some cells shown with wrong value until recalc (F9) | was: calc: calculate: load: some cells shown as '0' after file load, update with values only after hard recalc

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jun 16 06:50:12 UTC 2021


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

--- Comment #6 from b. <newbie-02 at gmx.de> ---
Created attachment 172927
  --> https://bugs.documentfoundation.org/attachment.cgi?id=172927&action=edit
file_to_illustrate_the_effect_of_storing_rounded_values_harming_display_after_reload

Could produce a 'simple reproducer', and boil down the problem a little: 

With attached file you will 
- see a display as in screenshot attached to the next comment after a hard
recalc (shift-ctrl-F9), 
- will get a saved file as in screenshot in second after this comment,
correctly containing the value 1,77635683940025E-15 for cell B3, when saving
the file, 
- but a display as in third after this comment showing '0' for B3 after load. 

In my opinion this bug is interesting/important as it could be the cause of
many other 'save-load' problems and 'hard recalc neccessary' complaints. 

The causal error is, in my opinion, the interaction of three irregularities, 
- first, that for cell A3 the rounded 'UI-display-value' '8,13' is saved as
float value and text, which differs from the (unfortunately wrong) calculation
result '=A1 + A2', and 
- secondly, although it is turned off, some 'recalc on load' is performed, and
- third this recalc recalculates B3, while not! recalculating A3. can be
checked with '=rawsubtract(A3;8,13) in A5, result '0' in fresh loaded file,
changes to 1,7763~E-15 after a individual recalc of A3 (F9). 

I think I will change the title accordingly. 

And would be grateful for a code pointer, where are the display and store
values calculated? (I'd like to try to extend the display values to 16 digits
anyway, if only to make my work on cancellation and addition roundoff/on
problems easier (the example comes from this work, a (decimally) wrong result
of an addition which is only hidden but not corrected by calc's user
interface)). 

(the calculation of 'value' and 'left' in cell B3 is not erroneous, i tried
'=A1 + A2' in A4 and '=rawsubtract(A4;8,13) in cell B4 -> same behaviour, same
fail.)

-- 
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/20210616/fb5df19f/attachment.htm>


More information about the Libreoffice-bugs mailing list