32 foreach ($schedule as $rate) {
34 $principal *= 1 + $rate;
37 return $e->getMessage();
54 public static function periods($rate, $presentValue, $futureValue)
65 return $e->getMessage();
69 if ($rate <= 0.0 || $presentValue <= 0.0 || $futureValue <= 0.0) {
73 return (log($futureValue) - log($presentValue)) / log(1 + $rate);
87 public static function interestRate($periods = 0.0, $presentValue = 0.0, $futureValue = 0.0)
98 return $e->getMessage();
102 if ($periods <= 0.0 || $presentValue <= 0.0 || $futureValue < 0.0) {
106 return ($futureValue / $presentValue) ** (1 / $periods) - 1;
static validatePresentValue($presentValue)
static periods($rate, $presentValue, $futureValue)
PDURATION.
static validateRate($rate)
static validateFutureValue($futureValue)
static interestRate($periods=0.0, $presentValue=0.0, $futureValue=0.0)
RRI.
static flattenArray($array)
Convert a multi-dimensional array to a simple 1-dimensional array.
static futureValue($principal, $schedule)
FVSCHEDULE.
static validateFloat($value)
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.