Bug 144156 - Slight inaccuracy / deviation in SKEW() with uniform integer sequences for Calc pre-7.2
Summary: Slight inaccuracy / deviation in SKEW() with uniform integer sequences for Ca...
Status: RESOLVED DUPLICATE of bug 137679
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.6.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2021-08-29 12:37 UTC by stragu
Modified: 2021-09-20 09:04 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example spreadsheet to test (18.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-29 12:38 UTC, stragu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stragu 2021-08-29 12:37:37 UTC
Description:
I am reporting this even though it is fixed in 7.2, because:
- no bug report seem to already exist on the topic, so we might want to have one in order to link the fix to a commit
- the issue being an inaccuracy in calculation, I thought we might want to have that fix in 7.1 as well - depending on how disruptive the commit is.

The issue is with the SKEW() function giving a result slightly off 0 when it should be exactly 0, depending on the size of the uniform integer sequence.

Steps to Reproduce:
1. Open attachment

Actual Results:
Observe that the skewness is correct for some sets of integers but not for others, e.g. correct all the way to 10, but starts being off when 11 is included, then back to correct when 19 is included...

Expected Results:
The skewness is 0 for all rows.


Reproducible: Always


User Profile Reset: No



Additional Info:
This is reproducible in:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and:

Version: 7.1.5.2 / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

but is NOT reproduced in:

Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 stragu 2021-08-29 12:38:19 UTC
Created attachment 174603 [details]
example spreadsheet to test
Comment 2 stragu 2021-08-29 12:40:13 UTC
Wondering if the fix has anything to do with Bug 137679.
Comment 3 Xisco Faulí 2021-09-13 07:46:01 UTC
Issue fixed by

author	dante <dante19031999@gmail.com>	2021-04-28 19:37:21 +0200
committer	Mike Kaganski <mike.kaganski@collabora.com>	2021-04-30 23:29:59 +0200
commit	4283fb9d4a6152643364bfe1f98ee1f36aabbb78 (patch)
tree	7be85479adc740afa41ac360903bb51b86987d46
parent	6a113a4f14808ac7f4bbdb4a5baff9383541d49a (diff)
tdf#137679 Use kahan summation for ScInterpreter::CalculateSkew

Not possible to backport it to 7.1 branch. Closing as duplicated of bug 137679

*** This bug has been marked as a duplicate of bug 137679 ***
Comment 4 stragu 2021-09-16 00:32:55 UTC
Just marking this as (formerly) affecting all OSs (not just Linux), for good measure.

Tested with:

Version: 7.1.6.2 (x64) / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-AU (en_AU); UI: en-US
Calc: threaded