diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-10-03 18:10:49 +0900 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-10-15 13:37:42 +0200 |
commit | e785c027af8d26b78211b0caa740bae7c0384d3a (patch) | |
tree | 6902a03d5609c2cdab0cf9b2e05cf507fd93cc27 /sc/source | |
parent | 0ed250a9ac4f278ce9ecf12fe1fc9e0c7142fbe4 (diff) |
sc: Make KURT() return #DIV/0! when <4 arguments are given
as Excel does:
<https://support.office.com/en-us/article/kurt-function-bc3a265c-5da4-4dcb-b7fd-c237789095ab>
Change-Id: I1059e6e5dd9f01688219492e76af6dbbe97be41a
Reviewed-on: https://gerrit.libreoffice.org/61286
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 02242d9745bc..ed2dc48f8f7c 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2868,8 +2868,10 @@ void ScInterpreter::ScKurt() if ( !CalculateSkew(fSum,fCount,vSum,values) ) return; - if (fCount == 0.0) + // ODF 1.2 constraints: # of numbers >= 4 + if (fCount < 4.0) { + // for interoperability with Excel PushError( FormulaError::DivisionByZero); return; } |