Private Function DoubleDecliningBalanceDepreciationVerify()
'Verify that the DoubleDecliningBalanceDepreciation function works correctly.
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 1), 480)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 2), 384)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 3), 307.2)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 4), 245.76)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 5), 196.608)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 6), 157.2864)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 7), 125.82912)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 8), 3.31648000000035, 0.000000000001) ' Epsilon = 1E-12
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 9), 0)
Debug.Assert Approx(DoubleDecliningBalanceDepreciation(2400, 500, 10, 10), 0)
End FunctionCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.