File: package.lisp

package info (click to toggle)
cl-rsm-finance 1.3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 120 kB
  • ctags: 46
  • sloc: lisp: 1,081; makefile: 44; sh: 28
file content (67 lines) | stat: -rw-r--r-- 2,292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name:          package.lisp
;;;; Purpose:       Package definition for rsm.finance.
;;;; Author:        R. Scott McIntire
;;;; Date Started:  Aug 2003
;;;;
;;;; $Id: package.lisp,v 1.2 2003/09/10 22:19:24 rscottmcintire Exp $
;;;; *************************************************************************

(in-package #:cl-user)


(defpackage rsm.finance
  (:use #:cl)
  (:documentation
   "Functions to compute loan financing. Loans are assumed to compound monthly.

Export Summary:

calc-num-payments    : Calculate the number of payments to make for a loan 
                       given the initial debt; the annual interest rate; 
                       and the monthly payment.

display-num-payments : Display the number of payments to make for a loan.
                       (uses calc-num-payments)


calc-monthly-payment   : Calculate the monthly payments for a loan 
                         given initial debt; years to pay; and the 
                         annual interest rate.

display-monthly-payment: Display the monthly payment for a loan.
                         (uses calc-monthly-payment)


calc-initial-debt    : Calculate the initial debt given: years to pay;
                       the annual interest rate; and the monthly payment.

display-initial-debt : Display the initial debt of a loan.
                       (uses calc-initial-debt)


calc-interest-rate   : Calculate the annual interest rate given: 
                       the years to pay; the annual interest rate; 
                       and the monthly payment.

display-interest-rate: Display the interest rate of a loan.
                       (uses calc-initial-debt)

non-solvable: A Condition that represents an inablity to solve 
              a financial problem. This may be because the problem
              is impossible, or that the solution is numerically unstable.
")
  (:export
   #:calc-num-payments
   #:display-num-payments
   #:calc-initial-debt
   #:display-initial-debt
   #:calc-monthly-payment
   #:display-monthly-payment
   #:calc-interest-rate
   #:display-interest-rate
   #:non-solveable))