Sub Math Financial Class

ModifiedInternalRateOfReturnVerify

Signature (Visual Basic / VBA)

Private Sub ModifiedInternalRateOfReturnVerify()
    'Verify that the ModifiedInternalRateOfReturn function works correctly.

    Debug.Assert Approx(ModifiedInternalRateOfReturn(Array(-120000, 39000, 30000, 21000, 37000, 46000), 0.1, 0.12), 0.126094130365905)
    Debug.Assert Approx(ModifiedInternalRateOfReturn(Array(-120000, 39000, 30000, 21000), 0.1, 0.12), -4.80446552499808E-02)
    Debug.Assert Approx(ModifiedInternalRateOfReturn(Array(-120000, 39000, 30000, 21000, 37000, 46000), 0.1, 0.14), 0.134759110828315)

End Sub