summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-27 21:28:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-27 21:28:59 +0100
commitebe04c075649c677b55941e3b4e57fbca150b5db (patch)
tree1bae1619740ab92a314808b25ede778a1ac5ff35
parent748525431147ff17248cb33fbfefd1b540717889 (diff)
use div() instead of /0 to content ubsan
for the same reason as... commit fb2c146752074b132d665e40343a08dcb2e6672e Author: Eike Rathke <erack@redhat.com> Date: Mon Jul 25 13:32:17 2016 +0200 use div() instead of /0 to content ubsan While we do handle double floating point division by 0 at least on IEEE754 systems, ubsan builds mock about. Change-Id: Id2e34686b053707c83ca535689b693d80b606533
-rw-r--r--sc/source/core/tool/interpr1.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index dbbc55e0a759..37afb35d0dd8 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1695,7 +1695,7 @@ void ScInterpreter::ScTan()
void ScInterpreter::ScCot()
{
- PushDouble( div( 1.0, ::rtl::math::tan(GetDouble())));
+ PushDouble(div(1.0, ::rtl::math::tan(GetDouble())));
}
void ScInterpreter::ScArcSin()
@@ -1735,7 +1735,7 @@ void ScInterpreter::ScTanHyp()
void ScInterpreter::ScCotHyp()
{
- PushDouble(1.0 / tanh(GetDouble()));
+ PushDouble(div(1.0, tanh(GetDouble())));
}
void ScInterpreter::ScArcSinHyp()