<-- Previous || Up || Next -->

Future Value Verify Sub
Math Financial Class

Private Sub FutureValueVerify()
    'Verify that the FutureValue function works correctly.

    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, 0, 0), 904195.169918424)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, 0, 1), 911730.129667745)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, 400, 0, 0), -904195.169918424)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, 400, 0, 1), -911730.129667745)
    
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, 20000, 0), 507447.182452414)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, 20000, 1), 514982.142201734)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, -20000, 0), 1300943.15738443)
    Debug.Assert Approx(FutureValue(0.1 / 12, 30 * 12, -400, -20000, 1), 1308478.11713375)

    Debug.Assert Approx(FutureValue(0, 30 * 12, -400, 0, 0), 144000)
    Debug.Assert Approx(FutureValue(0, 30 * 12, -400, 0, 1), 144000)
    Debug.Assert Approx(FutureValue(0, 30 * 12, -400, 12300, 0), 131700)
    Debug.Assert Approx(FutureValue(0, 30 * 12, -400, -12300, 1), 156300)

End Sub

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.