Discount factor for compound interest
discount.RdComputes the discount factor \(v^t = (1+i)^{-t}\).
Examples
discount(0.05, 0:5)
#> [1] 1.0000000 0.9523810 0.9070295 0.8638376 0.8227025 0.7835262
discount(c(0.03, 0.05), 1)
#> [1] 0.9708738 0.9523810