handling of non-numeric values in STDEV and VAR functions in Calc

Eike Rathke erack at redhat.com
Mon Jul 4 09:37:08 UTC 2016


Hi Winfried,

On Monday, 2016-07-04 10:36:32 +0200, Winfried Donkers wrote:

> I was pointed to a difference in behaviour between Excel and Calc when the data range contains non-numeric entries (like #DIV/0!).

Indeed, errors should be propagated.

> Excel returns an error with the various VAR and STDEV functions and mentions for these functions that errors or arguments that cannot be converted to numbers produce an error.
> ODFF1.2 tells me that at least 2 numbers are needed as argument.

Otherwise a standard deviation can't be calculated.

> Do I interpret ODFF1.2 correct when I say that for the VAR and STDEV functions all values (single arguments and values in ranges) must return true when checking ISNUMBER(value)?

Not quite, the general rules for 6.3.7 "Conversion to NumberSequence"
apply as usul, i.e. text strings within a cell range are ignored, see
https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017992_715980110

> In that case I shall create a bug report and start fixing ScInterpreter::GetStVarParams(...).

Please do.

Thanks
  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20160704/c79364e3/attachment.sig>


More information about the LibreOffice mailing list