Kaydet (Commit) dcda4292 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

interpr: fPeriodn -> fPeriods

Change-Id: I21b76d2d121b27c5b4aeb676948786ab91bff0b7
üst e886f9ad
......@@ -1866,14 +1866,14 @@ void ScInterpreter::ScEffektiv()
nFuncFmtType = NUMBERFORMAT_PERCENT;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
double fPeriodn = GetDouble();
double fPeriods = GetDouble();
double fNominal = GetDouble();
if (fPeriodn < 1.0 || fNominal <= 0.0)
if (fPeriods < 1.0 || fNominal <= 0.0)
PushIllegalArgument();
else
{
fPeriodn = ::rtl::math::approxFloor(fPeriodn);
PushDouble(pow(1.0 + fNominal/fPeriodn, fPeriodn) - 1.0);
fPeriods = ::rtl::math::approxFloor(fPeriods);
PushDouble(pow(1.0 + fNominal/fPeriods, fPeriods) - 1.0);
}
}
}
......@@ -1883,14 +1883,14 @@ void ScInterpreter::ScNominal()
nFuncFmtType = NUMBERFORMAT_PERCENT;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
double fPeriodn = GetDouble();
double fPeriods = GetDouble();
double fEffective = GetDouble();
if (fPeriodn < 1.0 || fEffective <= 0.0)
if (fPeriods < 1.0 || fEffective <= 0.0)
PushIllegalArgument();
else
{
fPeriodn = ::rtl::math::approxFloor(fPeriodn);
PushDouble( (pow(fEffective + 1.0, 1.0 / fPeriodn) - 1.0) * fPeriodn );
fPeriods = ::rtl::math::approxFloor(fPeriods);
PushDouble( (pow(fEffective + 1.0, 1.0 / fPeriods) - 1.0) * fPeriods );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment