diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index bec54db19b56..52db34123cb1 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1697,7 +1697,7 @@ void ScInterpreter::ScTan() void ScInterpreter::ScCot() { - PushDouble(div(1.0, ::rtl::math::tan(GetDouble()))); + PushDouble(1.0 / ::rtl::math::tan(GetDouble())); } void ScInterpreter::ScArcSin() @@ -1737,7 +1737,7 @@ void ScInterpreter::ScTanHyp() void ScInterpreter::ScCotHyp() { - PushDouble(div(1.0, tanh(GetDouble()))); + PushDouble(1.0 / tanh(GetDouble())); } void ScInterpreter::ScArcSinHyp() @@ -1774,22 +1774,22 @@ void ScInterpreter::ScArcCotHyp() void ScInterpreter::ScCosecant() { - PushDouble(div(1.0, ::rtl::math::sin(GetDouble()))); + PushDouble(1.0 / ::rtl::math::sin(GetDouble())); } void ScInterpreter::ScSecant() { - PushDouble(div(1.0, ::rtl::math::cos(GetDouble()))); + PushDouble(1.0 / ::rtl::math::cos(GetDouble())); } void ScInterpreter::ScCosecantHyp() { - PushDouble(div(1.0, sinh(GetDouble()))); + PushDouble(1.0 / sinh(GetDouble())); } void ScInterpreter::ScSecantHyp() { - PushDouble(div(1.0, cosh(GetDouble()))); + PushDouble(1.0 / cosh(GetDouble())); } void ScInterpreter::ScExp() diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 37d84650215a..658119848879 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -1883,11 +1883,11 @@ double ScInterpreter::ScGetRmz(double fRate, double fNper, double fPv, else { if (bPayInAdvance) // payment in advance - fPayment = div((fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) ) ) * fRate, - (::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) - fRate)); + fPayment = (fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) ) ) * fRate / + (::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) - fRate); else // payment in arrear - fPayment = div((fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) ) ) * fRate, - ::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) )); + fPayment = (fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) ) ) * fRate / + ::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) ); } return -fPayment; } |