function testeffectiveRate()
 {
     // various random calculations
     $this->assertTrue(abs(0.14597025 - Math_Finance::effectiveRate(0.141, 2)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.1455398 - Math_Finance::effectiveRate(0.139, 3)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.009030420000000001 - Math_Finance::effectiveRate(0.008999999999999999, 4)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.44 - Math_Finance::effectiveRate(0.4, 2)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.141 - Math_Finance::effectiveRate(0.141, 1)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.14694625 - Math_Finance::effectiveRate(0.139, 5)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.009040090000000001 - Math_Finance::effectiveRate(0.008999999999999999, 77)) < FINANCE_PRECISION);
     $this->assertTrue(abs(0.48285538 - Math_Finance::effectiveRate(0.4, 13)) < FINANCE_PRECISION);
     // cannot pass negative number of periods per year
     $this->assertType('object', Math_Finance::effectiveRate(0.4, -13));
 }