From 50bc939cf377340862d24fc21e7d740144908bfc Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Wed, 28 Oct 2020 17:04:37 -0400 Subject: [PATCH] Refactor comments --- mortgage-calculator.lisp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mortgage-calculator.lisp b/mortgage-calculator.lisp index 0acfb12..fd829a0 100644 --- a/mortgage-calculator.lisp +++ b/mortgage-calculator.lisp @@ -1,25 +1,27 @@ ;;;; Mortgage Calculators #| +Formulas: + P = payment PV = Present Value r = rate per period n = number of periods +Find payments P = (r(PV)) / (1-(1+r)^-n) -Okay, but I want to find PV instead -Guess I need to remember algebra - +Find total P = (r(PV)) / (1-(1+r)^-n) P * (1-(1+r)^-n) = r * PV - (P * (1-(1+r)^-n) / r = PV - monthly-payments conversion +Find rate +TODO + +Find payments +TODO - (find-payments loan-total (/ rate 12) (* number-of-payments 12))) - find-payments = loan-total |# (defun find-payments (loan-total rate number-of-payments)