function testprincipalPayment()
 {
     // various random calculations
     $this->assertTrue(abs(-194.675308 - Math_Finance::principalPayment(0.1 / 12, 3, 3 * 12, 8000)) < FINANCE_PRECISION);
     $this->assertTrue(abs(-211.5203289 - Math_Finance::principalPayment(0.1 / 12, 13, 3 * 12, 8000)) < FINANCE_PRECISION);
     $this->assertTrue(abs(-249.709231 - Math_Finance::principalPayment(0.1 / 12, 33, 3 * 12, 8000)) < FINANCE_PRECISION);
     $this->assertTrue(abs(-193.066421 - Math_Finance::principalPayment(0.1 / 12, 3, 3 * 12, 8000, 0, FINANCE_PAY_BEGIN)) < FINANCE_PRECISION);
     // cannot pass a type differenet from 0 and 1
     $this->assertType('object', Math_Finance::principalPayment(0.1 / 12, 3, 3 * 12, 8000, 0, 2));
 }