diff options
author | Łukasz Hryniuk <lukasz.hryniuk@wp.pl> | 2015-08-08 16:04:01 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-08-10 21:50:21 +0000 |
commit | d5bff1225a6739e8369bacd8392686bd26630d2f (patch) | |
tree | 7861d920f714df89aa94ee1b0c9b46af89776091 | |
parent | 4532ea42904e4a7d6c50f7f8ea53aaa97ec72c5e (diff) |
tdf#89387 related, fix SumSquare bug in SumMXMY2
SumSquare returns IterateResult, which, because of rounding errors, store
first value in mfFirst and rest in mfRest. They should be added to get
the full sum of square of matrices difference.
Change-Id: I9bc435801d94206960b0b4fe4a9149ef1abeb3be
Reviewed-on: https://gerrit.libreoffice.org/17592
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/core/tool/interpr5.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index c3c746dbba8f..907ce8da921e 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1791,7 +1791,7 @@ void ScInterpreter::ScSumXMY2() else { ScMatrix::IterateResult aRes = pResMat->SumSquare(false); - double fSum = aRes.mfRest; + double fSum = aRes.mfFirst + aRes.mfRest; PushDouble(fSum); } } |