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

Payment Verify Sub
Math Financial Class

Private Sub PaymentVerify()
    'Verify that the Payment function works correctly.

    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, 0, 0), -456.526501825451)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, 0, 1), -452.753555529373)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, -18000, 0, 0), 456.526501825451)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, -18000, 0, 1), 452.753555529373)
    
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, 5000, 0), -541.67275233252)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, 5000, 1), -537.196118015723)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, -5000, 0), -371.380251318381)
    Debug.Assert Approx(Payment(0.1 / 12, 4 * 12, 18000, -5000, 1), -368.310993043023)

    Debug.Assert Approx(Payment(0, 4 * 12, 18000, 0, 0), -375)
    Debug.Assert Approx(Payment(0, 4 * 12, 18000, 0, 1), -375)
    Debug.Assert Approx(Payment(0, 4 * 12, 18000, 5000, 0), -479.166666666667)
    Debug.Assert Approx(Payment(0, 4 * 12, 18000, -5000, 1), -270.833333333333)

End Sub

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