[Libreoffice-bugs] [Bug 140717] New: calc: calculate: formula: precision: calc should catch up with ex$el accuracy features - make silly rounding switchable

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Feb 28 19:22:40 UTC 2021


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

            Bug ID: 140717
           Summary: calc: calculate: formula: precision: calc should catch
                    up with ex$el accuracy features - make silly rounding
                    switchable
           Product: LibreOffice
           Version: 7.2.0.0.alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: newbie-02 at gmx.de

Description:
from 

https://ask.libreoffice.org/en/question/32183/calc-why-are-bits-killed-in-subtractions-with-heavy-cancellation-and-can-this-be-turned-off/ 

i learned that: 

1. ex$el does 'bit killing' similar to calc but less violent, 
   -> calc isn't fully compatible, 
2. you can turn this off in ex$el by enclosing the expression in parentheses, 
   -> calc lags behind the capabilities of ex$el, and is not fully compatible, 

in calc you can also calculate more exactly by using 'rawsubtract' instead of
'-', but this is terribly cumbersome,  

i think calc should catch up ... and overtake by introducing that for 'sum'
over ranges and similar expressions too! 

the results are not! exact in absolute decimal means, but let it to the user to
gain dec-math-correct results '=ROUND((1-0,999999999999999);15)', (even
'=ROUND(1-0,999999999999999;15)' holds), 

calc: ... '=ROUND(RAWSUBTRACT(1;0,999999999999999);15)' ... works ... but
produces the bad feeling Thompson, Kernighan and Ritchie try to fool us again

Steps to Reproduce:
1. fetch a copy of ex$el, 
2. key '=1-0,999999999999999' into a cell, 
3. observe result '0,00000000000000000000' (if neccess. adjust format and width
to show 20 decimals),  
4. key '=(1-0,999999999999999)' into a cell, !parentheses, 
5. observe result '0,00000000000000099920' (if neccess. adjust format and width
to show 20 decimals), 
6. try the same in calc ... :-( 

Actual Results:
ex$el gives the user access to the basic values, calc only with awkward tricks


Expected Results:
same or better functionality as ex$el, and possibility to work 'compatible' to
ex$el to avoid problems when exchanging data / files



Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 62dff2844b0bf1d1bcb8eb4d6db529ef4a31bee4
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default;
VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: 

assume older ver. affected as well, assume linux affected as well,

-- 
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/20210228/a0a73d05/attachment.htm>


More information about the Libreoffice-bugs mailing list