EXCEL的CUMIPMT函数的数学公式是什么(如何计算)? [英] What is the Mathematical formula for CUMIPMT function of EXCEL(how it is calculated)?
问题描述
EXCEL的CUMIPMT函数的数学公式是什么(如何计算)?我想用数学来计算.请帮助
What is the Mathematical formula for CUMIPMT function of EXCEL(how it is calculated)? I want to calculate it mathematically. Please Help
推荐答案
由于Excel不是开放源代码,因此我们无法提供Excel中 CUMIPMT
的实现.
The implementation of CUMIPMT
in Excel is impossible for us to provide seeing as Excel is not open-source.
但是,在Google搜索中会显示大量结果,例如Java语言中的此实现,还在Javascript中也使用了href ="https://gist.github.com/fscottfoti/ef5b1785b22fc79ee8ba" rel ="nofollow noreferrer">其他实现,或ddeboer/phpexcel/blob/master/Classes/PHPExcel/Calculation/Financial.php"rel =" nofollow noreferrer> PHPExcel在PHP中的实现.
However numerous results show up in a Google search such as this implementation in Javascript, this other implementation also in Javascript, or PHPExcel's implementation in PHP.
最接近的结果可能是查看Open Office的C ++实现-与Excel的实现非常接近或相同.
The closest result would probably be to look at Open Office's C++ implementation - thats very close or identical to Excel's implementation.
double SAL_CALL AnalysisAddIn::getCumipmt( double fRate, sal_Int32 nNumPeriods, double fVal,
sal_Int32 nStartPer, sal_Int32 nEndPer, sal_Int32 nPayType ) THROWDEF_RTE_IAE
{
double fRmz, fZinsZ;
if( nStartPer < 1 || nEndPer < nStartPer || fRate <= 0.0 || nEndPer > nNumPeriods || nNumPeriods <= 0 ||
fVal <= 0.0 || ( nPayType != 0 && nPayType != 1 ) )
THROW_IAE;
fRmz = GetRmz( fRate, nNumPeriods, fVal, 0.0, nPayType );
fZinsZ = 0.0;
sal_uInt32 nStart = sal_uInt32( nStartPer );
sal_uInt32 nEnd = sal_uInt32( nEndPer );
if( nStart == 1 )
{
if( nPayType <= 0 )
fZinsZ = -fVal;
nStart++;
}
for( sal_uInt32 i = nStart ; i <= nEnd ; i++ )
{
if( nPayType > 0 )
fZinsZ += GetZw( fRate, double( i - 2 ), fRmz, fVal, 1 ) - fRmz;
else
fZinsZ += GetZw( fRate, double( i - 1 ), fRmz, fVal, 0 );
}
fZinsZ *= fRate;
RETURN_FINITE( fZinsZ );
}
这篇关于EXCEL的CUMIPMT函数的数学公式是什么(如何计算)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!