Kaydet (Commit) 3133f128 authored tarafından Johnny_M's avatar Johnny_M Kaydeden (comit) Eike Rathke

Correct German variable names translation in Calc (financial)

This aligns the translation of the "Zins" argument of the financial
functions to "Rate", as used in the function documentation in English.
The original translation was done by the same author recently in
the commit 8ba9dfe2.

Compare (as in MS Excel):
German: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two/de#RMZ
English: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT

Change-Id: Ifa125d94a639c91c454d7b540f86feeecea250ff
Reviewed-on: https://gerrit.libreoffice.org/44021Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 570eed8c
......@@ -1231,36 +1231,36 @@ double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal
}
double GetRmz( double fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType )
double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType )
{
double fPmt;
if( fInterest == 0.0 )
if( fRate == 0.0 )
fPmt = ( fPv + fFv ) / fNper;
else
{
double fTerm = pow( 1.0 + fInterest, fNper );
double fTerm = pow( 1.0 + fRate, fNper );
if( nPayType > 0 )
fPmt = ( fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fInterest );
fPmt = ( fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fRate );
else
fPmt = fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm );
fPmt = fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1.0 / fTerm );
}
return -fPmt;
}
double GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType )
double GetZw( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType )
{
double fFv;
if( fInterest == 0.0 )
if( fRate == 0.0 )
fFv = fPv + fPmt * fNper;
else
{
double fTerm = pow( 1.0 + fInterest, fNper );
double fTerm = pow( 1.0 + fRate, fNper );
if( nPayType > 0 )
fFv = fPv * fTerm + fPmt * ( 1.0 + fInterest ) * ( fTerm - 1.0 ) / fInterest;
fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) * ( fTerm - 1.0 ) / fRate;
else
fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fInterest;
fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fRate;
}
return -fFv;
......
......@@ -155,8 +155,8 @@ double GetOddlprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_In
/// @throws css::lang::IllegalArgumentException
double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest,
double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase );
double GetRmz( double fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType );
double GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType );
double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType );
double GetZw( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType );
/// @throws css::uno::RuntimeException
/// @throws css::lang::IllegalArgumentException
......
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