Bug 100753 - VAR and STDEV functions do not handle non-numeric values correctly (aggregate too)
Summary: VAR and STDEV functions do not handle non-numeric values correctly (aggregate...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.3.0 target:5.2.1 target:5.1.5
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-04 10:15 UTC by Winfried Donkers
Modified: 2016-10-25 18:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Winfried Donkers 2016-07-04 10:15:48 UTC
When a VAR or STDEV function is called with a non-numeric values in the data range, e.g. DIV/0!, the function still returns a result.

In Excel, these function return an error.
In ODFF1.2 is defined what is allowed and what is not:
6.3.7 "Conversion to NumberSequence", see
https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017992_715980110
Comment 1 raal 2016-07-04 13:29:13 UTC
note: affect also aggregate function
Comment 2 Winfried Donkers 2016-07-06 10:38:05 UTC
(In reply to raal from comment #1)
> note: affect also aggregate function

That is correct; AGGREGATE is a shell function (like SUBTOTAL) which calls the applicable functions like VAR and STDEV.
Comment 3 Commit Notification 2016-07-08 17:36:50 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9c9bf666b4eb7ee4568fe155a2c8b50a02c4ad5

tdf#100753 propagate error with VAR and STDEV functions.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-07-08 20:45:14 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aec23208241c951e1d20515e6f8cf8ee2213cb16&h=libreoffice-5-2

tdf#100753 propagate error with VAR and STDEV functions.

It will be available in 5.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2016-07-08 20:45:20 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88065eebdf9bc557b2c5d982b0beacb19ef2ad36&h=libreoffice-5-1

tdf#100753 propagate error with VAR and STDEV functions.

It will be available in 5.1.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.