My Computer Programs

time value of money

steloflute 2014. 5. 19. 20:22

#lang racket
(define (fv i n)
  (expt (+ 1 i) n))

(define (pv i n)
  (/ 1 (expt (+ 1 i) n)))

(define (annuity-fv i n)
  (/ (- (expt (+ 1 i) n) 1) i))

(define (annuity-pv i n)
  (/ (- 1 (/ 1 (expt (+ 1 i) n))) i))

 

'My Computer Programs' 카테고리의 다른 글

Arcadia: An implementation of the Arc programming language  (0) 2014.10.26
Arcadia에서 string에 대해서 GC  (0) 2014.10.26
The L++ Programming Language  (0) 2014.05.08
L++ 0.1  (0) 2014.05.08
getline, readline  (0) 2014.04.09