public static function PHPExcel_Calculation_Financial::NOMINAL in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Financial.php \PHPExcel_Calculation_Financial::NOMINAL()
* NOMINAL * * Returns the nominal interest rate given the effective rate and the number of compounding payments per year. * *
Parameters
float $effect_rate Effective interest rate: * @param int $npery Number of compounding payments per year * @return float
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Financial.php, line 1474
Class
- PHPExcel_Calculation_Financial
- PHPExcel_Calculation_Financial
Code
public static function NOMINAL($effect_rate = 0, $npery = 0) {
$effect_rate = PHPExcel_Calculation_Functions::flattenSingleValue($effect_rate);
$npery = (int) PHPExcel_Calculation_Functions::flattenSingleValue($npery);
// Validate parameters
if ($effect_rate <= 0 || $npery < 1) {
return PHPExcel_Calculation_Functions::NaN();
}
// Calculate
return $npery * (pow($effect_rate + 1, 1 / $npery) - 1);
}