summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-13 22:36:20 +0200
committerEike Rathke <erack@redhat.com>2015-08-13 22:43:57 +0200
commit8747442d179367a9cea652643a516021fa7c5510 (patch)
treedda925bd04221d1ee1e7b0a7289e0a314f784d2e
parentd0d76a9aad90c8f07330da7f67eef5c607a27aec (diff)
use sc::divide() for -fsanitize=float-divide-by-zero triggered by unit test
Change-Id: I370f2f5e3e0ceb40051cbf2f806072f4fd213811
-rw-r--r--sc/source/core/tool/interpr3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index ce3dc9129e47..3fad7e760859 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -2850,7 +2850,7 @@ void ScInterpreter::ScChiTest()
{
double fValX = pMat1->GetDouble(i,j);
double fValE = pMat2->GetDouble(i,j);
- fChi += (fValX - fValE) * (fValX - fValE) / fValE;
+ fChi += sc::divide( (fValX - fValE) * (fValX - fValE), fValE);
}
else
{