Post Reply 
Plus42 Equations, Preview Release
06-08-2022, 01:10 PM (This post was last modified: 06-08-2022 01:14 PM by Albert Chan.)
Post: #717
RE: Plus42 Equations, Preview Release
(06-08-2022 12:46 PM)Thomas Okken Wrote:  In BEGIN mode, it should divide the calculated value by 1+i (where i is the interest rate per period), and instead it multiplies by that factor.

Fix coming shortly!

Since you are fixing it, you might as well simplify the formula (for END mode)

< pmt = -(pv + fv * exp(-n * log1p(i))) / (-expm1(-n * log1p(i)) / i);

Below does the same, but much simpler.

> pmt = -((pv+fv) / expm1(n*log1p(i)) + pv)*i

Both are equivalent:

XCAS> pmt1 := -(pv + fv * exp(-n * log1p(x))) / (-expm1(-n * log1p(x)) / x);
XCAS> pmt2 := -((pv+fv) / expm1(n*log1p(x)) + pv)*x
XCAS> simplify(pmt1 - pmt2)

0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - Albert Chan - 06-08-2022 01:10 PM



User(s) browsing this thread: 2 Guest(s)