4 Finance Operations - HP Prime Free -Lite CAS variables
09-06-2017, 10:44 AM (This post was last modified: 12-07-2021 11:27 AM by lschroeder1947.)
Post: #1
 lschroeder1947 Member Posts: 68 Joined: Apr 2017
4 Finance Operations - HP Prime Free -Lite CAS variables
HP Prime Free programming. In thread Rectangular Coordinate Conversion, by using the Define key, I added functions R_to_P and P_to_R to HP Prime devices including the HP Prime Free - Lite. These two functions allow the CAS view to display exact values for the conversions. I recently used the Define key to add the function arsm, (N/2)*(F+L), to the HP Prime Free. For all the other HP Prime devices, I wrote a library of arithmetic series functions to find the nth term and sum of an arithmetic series. Besides Define the other programming option for the HP Prime Free is to use CAS variables. I used notepad++ with prime plug-in to first type the CAS variable. You could use any text editor. Then I use system copy and paste to enter it into the Windows HP Prime Free app.

Since the HP Prime Fee has no Finance Application library, program editor, or HP connectivity kit I used CAS variables to add the sint, cpint, loan, and ira CAS variables to give us basic finance operations.

Edit 10/19/2017 - added Begin return End to the functions - HP Connectivity Kit needed - Pro/virtual: crashed when Kit tried to display CAS Vars - Free version: using Begin return End with it's functions as well

Copy each of these functions to the CAS command line and press enter:

sint(a,p,r,t):=
BEGIN
return solve(a=p*(1+r*t),x);
END;

cpint(fv,pv,r,m,t):=
BEGIN
return solve(fv=pv*(1+r/m)^(m*t),x);
END;

loan(pv,pmt,r,m,t):=
BEGIN
return solve(pv=pmt*((1-(1+r/m)^(-m*t))/(r/m)),x);
END;

ira(fv,pmt,r,m,t):=
BEGIN
return solve(fv=pmt*(((1+r/m)^(m*t)-1)/(r/m)),x);
END;

Note: The Finance Application Library uses n in months where I use years, r in i% where I use decimals, and I use m for daily, months, quarterly, semi-annually, and annually. For additional CAS variables see my Post 3 and 5 in this thread's. Post 3 uses pivmat to solve dual simplex problem and Post 5 is where we add CAS variables to do a function's partial derivative.
 « Next Oldest | Next Newest »

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