use div() instead of /0 to content ubsan
for the same reason as...
commit fb2c146752
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: I4cc696e3725beaeb75066e02166bf7bbfdedfde5
This commit is contained in:
@@ -1772,22 +1772,22 @@ void ScInterpreter::ScArcCotHyp()
|
|||||||
|
|
||||||
void ScInterpreter::ScCosecant()
|
void ScInterpreter::ScCosecant()
|
||||||
{
|
{
|
||||||
PushDouble(1.0 / ::rtl::math::sin(GetDouble()));
|
PushDouble(div(1.0, ::rtl::math::sin(GetDouble())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScInterpreter::ScSecant()
|
void ScInterpreter::ScSecant()
|
||||||
{
|
{
|
||||||
PushDouble(1.0 / ::rtl::math::cos(GetDouble()));
|
PushDouble(div(1.0, ::rtl::math::cos(GetDouble())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScInterpreter::ScCosecantHyp()
|
void ScInterpreter::ScCosecantHyp()
|
||||||
{
|
{
|
||||||
PushDouble(1.0 / sinh(GetDouble()));
|
PushDouble(div(1.0, sinh(GetDouble())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScInterpreter::ScSecantHyp()
|
void ScInterpreter::ScSecantHyp()
|
||||||
{
|
{
|
||||||
PushDouble(1.0 / cosh(GetDouble()));
|
PushDouble(div(1.0, cosh(GetDouble())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScInterpreter::ScExp()
|
void ScInterpreter::ScExp()
|
||||||
|
Reference in New Issue
Block a user