public function test_iconvertdel() { $t = new CT1_Interest_Format(); $t->set_m(367); // anything greater than 366 is treated as continuous $t->set_advance(true); $this->assertTrue(abs($this->icalc->get_rate_in_form($t) - 0.058269) < 1.0E-6); // source of numbers: Formulae and tables 6% p.58 delta }
public function set_from_input($_INPUT = array(), $pre = '') { try { if (parent::set_from_input($_INPUT, $pre)) { if (isset($_INPUT[$pre . 'delta'])) { $this->set_delta($_INPUT[$pre . 'delta']); } if (isset($_INPUT[$pre . 'i_effective'])) { $this->set_i_effective($_INPUT[$pre . 'i_effective']); } return true; } else { return false; } } catch (Exception $e) { throw new Exception(wfMessage('fm-exception-in') . " " . __FILE__ . ": " . $e->getMessage()); } }
public function explain_annuity_certain() { $escalation_format = new CT1_Interest_Format($this->get_escalation_frequency()); if ($escalation_format->is_continuous() || $this->get_escalation_frequency() >= $this->get_m()) { return $this->explain_annuity_certain_escalation_continual(); } else { return $this->explain_annuity_certain_escalation_stepped(); } }