Post Reply 
HP Prime: how to insert and save formulas in a sort of "Equation library"
02-10-2020, 07:49 AM (This post was last modified: 02-18-2020 12:07 PM by Gene.)
Post: #1
HP Prime: how to insert and save formulas in a sort of "Equation library"
Good morning,

I've recently bought an HP Prime.

I'm trying to insert and save some executable formulas in a sort of "equation library" where formulas are subdivided in categories: accounting formulas,economics formula ans so on...

I've seen that in the d HP50g it was possible to organize and save formulas...

However I've some difficulties with my HP Prime.

Can somebody help me in solving my problem please? I need it urgently...

Thank you very much for your supply.

Mark
Find all posts by this user
Quote this message in a reply
02-10-2020, 01:32 PM
Post: #2
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Here is a great subforums for solutions, you find it at https://www.hpmuseum.org/forum/forum-15....order=desc

For e.g. please have a look at
https://www.hpmuseum.org/forum/thread-11312.html
and
https://www.hpmuseum.org/forum/thread-7725.html

Maybe there a more solutions at hpcalc.org

calculators: Prime G1/G2, HP48, 49, 42S, 50, WP34s, DM42
Find all posts by this user
Quote this message in a reply
02-10-2020, 05:37 PM
Post: #3
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Dear Thomas thank you very much for your reply.
I'll have a look at the links..
Today to test solver, i tried to insert some formula in solver with long name variables,like Gains=Revenues-Costs.
However Solver app pops up a "synthax error" when wrinting the tree "economic" variables..and surprisingly Solver decomposes Gains in G*a*i*n*s and so on...creating a variable for each letter...instead of creating just 3"economic variables...
With old hp 17bll Solver automatically recognized the variables as long names instead of creating many letters
How can I solve this problem in HP Prime?
I hope it is only an entry mode error...

Thank you very much for your kind support..

Best regards,

Mark
Find all posts by this user
Quote this message in a reply
02-11-2020, 08:01 AM (This post was last modified: 02-11-2020 08:09 AM by pinkman.)
Post: #4
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
(02-10-2020 05:37 PM)marprime80 Wrote:  Dear Thomas thank you very much for your reply.
I'll have a look at the links..
Today to test solver, i tried to insert some formula in solver with long name variables,like Gains=Revenues-Costs.
However Solver app pops up a "synthax error" when wrinting the tree "economic" variables..and surprisingly Solver decomposes Gains in G*a*i*n*s and so on...creating a variable for each letter...instead of creating just 3"economic variables...
With old hp 17bll Solver automatically recognized the variables as long names instead of creating many letters
How can I solve this problem in HP Prime?
I hope it is only an entry mode error...

Thank you very much for your kind support..

Best regards,

Mark

Hello Mark,
No the Solver won't create vars on the fly, and math some math students might be helped by the translation of AB into A*B.

Two workarounds:

First (my prefered one): create a program, name it "AllMyVars" or whatever you want, and insert all the vars you need, ie:
Code:

EXPORT Gain, Revenues, Cost;
EXPORT GrossMargin, EBITDA;
// etc.
   

Second:
In Home view, create directly a var, by using the 'Sto' soft or hard key. This is usually done after a calculus.
Code:

Ans▶MyResult
   

You can then use all those created vars in the Solver. You can find them with the 'Vars' key, under the 'User' softkey menu.
Find all posts by this user
Quote this message in a reply
02-11-2020, 08:22 AM
Post: #5
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
(02-11-2020 08:01 AM)pinkman Wrote:  X
Hello Mark,
No the Solver won't create vars on the fly, and math some math students might be helped by the translation of AB into A*B.

Two workarounds:

First (my prefered one): create a program, name it "AllMyVars" or whatever you want, and insert all the vars you need, ie:
Code:

EXPORT Gain, Revenues, Cost;
EXPORT GrossMargin, EBITDA;
// etc.
X
You can then use all those created vars in the Solver. You can find them with the 'Vars' key, under the 'User' softkey menu.

OR - combining another post
refer them using AllMyVars.Gain, AllMyVars.Revenues, AllMyVars.Cost
I would rather save my own Solver app version
and use, say, 'Finance' main app to declare the variables
(among other things)
One can also use START() and RESET() in your own version of an app
I avoid polluting the name space
- -
VPN
Find all posts by this user
Quote this message in a reply
02-11-2020, 10:45 AM
Post: #6
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Dear Sir, thank you very much for your kind reply..
It is not really a trivial process as it was with the old one..
I would like to be able to program the calculator,but I'm more and more convinced that HP Prime is not an easy calculator for beginners..some programming knowledge are required even for some basic solver calculation..sometimes it is quite frustrating..
Is there any specific course on how to program the calculator or some teaching lessons?
I'm a beginner and I need some direct help..
Let me know...
Thank you very much

Marco Russo
Find all posts by this user
Quote this message in a reply
02-11-2020, 09:05 PM (This post was last modified: 02-11-2020 09:09 PM by pinkman.)
Post: #7
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Yes, despite the (receivable) arguments often debated here, HP Prime is a high level tool, but it is not a too high mountain to be climbed.

First, stay tuned here!

Then don’t be afraid by the programming module. You just need to write the names of a few vars in a text file from a module called ‘program’, you’re not yet into programming, so it will be easy.

Before programming, use the tools offered by the Prime, they are really powerful.

Then :
My advice for your library of functions is to create another program file, just to make your functions usable anywhere.

Code:

EXPORT FGains(theRevenues,theCosts)
BEGIN
RETURN theRevenues-theCosts;
END;

That’s a bit of programming, but I think you will recognize your original function.
I intentionally used other variable names to avoid confusion between these ones and the previous ones.

Then you can use the solver:
Code:

Gains=FGains(Revenues, Costs)

And here you are!
   
   
Find all posts by this user
Quote this message in a reply
02-11-2020, 10:15 PM (This post was last modified: 02-11-2020 10:16 PM by BruceH.)
Post: #8
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
There's a very good equation library for the Prime here.

You might like to look at the source to pick-up some tips or modify it to add any missing equations that you use.
Find all posts by this user
Quote this message in a reply
02-13-2020, 07:40 AM
Post: #9
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Sorry for my late response and sorry if this had been explained before.
I do this in the following way.
Open Apps Window, select Solve App and save it with a new name based on Solve.
In the App window select the new Solve App. The focus of the Prime is now focused on this new Solve App.
Go to Program Editor (Shift Program) and select your "new name (APP)" and type EXPORT VarName, VarName, ...; Possibly several EXPORTs. Close the Progam editor. You can now use your variables in your new Solve App. They are visible and selectable in Vars, App, "new name", Program.
In this way you can possibly use the same variable names for different Apps, while they are not the same variables.

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
02-17-2020, 02:09 PM
Post: #10
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
See LibraryTut at link below.

https://www.hpmuseum.org/forum/thread-14522.html

BM
Find all posts by this user
Quote this message in a reply
02-18-2020, 06:03 AM
Post: #11
RE: Hp Prime: how to insert and save formulas in a sort of "Equation library"
Hello,

You can also create AVars (App Variables), which are not program variables...
a first call to
AVars("name"):=value
Will create the app variable. From there on, you can use it as a regular variable.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
02-18-2020, 04:33 PM (This post was last modified: 02-23-2020 09:34 PM by BERNARD MICHAUD.)
Post: #12
RE: HP Prime: how to insert and save formulas in a sort of "Equation library"
HI Cyrille
Since we are on this topic of vars and its use in programs, could I impose upon you with this question or perhaps experience I had with the use of polar_coordinates(); When used from the command line polar_coordinates(3+4*i) produces [5 53.13],
but when used from inside a program it produces [5,0.9273]. Of course, 53.13*pi/180 is 53.13. So due to this phenomenon, I undertook to use ABS() and ARG() to generate the proper result 5 < 53.13 in my EE_Analyses program which I will publish soon. Do you have any idea as to why that is ??

Thank you
Bernard Michaud
Find all posts by this user
Quote this message in a reply
02-18-2020, 09:26 PM
Post: #13
RE: HP Prime: how to insert and save formulas in a sort of "Equation library"
(02-18-2020 06:03 AM)cyrille de brébisson Wrote:  Hello,

You can also create AVars (App Variables), which are not program variables...
a first call to
AVars("name"):=value
Will create the app variable. From there on, you can use it as a regular variable.

Cyrille

So I discover this functionality. Thanks, looks interesting.
A few questions:
- Why are AVars and DelAVars not mentioned in the catalog menu?
- Once an AVar is created, such as AVars(“vtest”):=123.456, what’s the difference between vtest:=654.321 and AVars(“vtest”):=654.321 ?
Find all posts by this user
Quote this message in a reply
02-19-2020, 08:28 AM
Post: #14
RE: HP Prime: how to insert and save formulas in a sort of "Equation library"
(02-18-2020 09:26 PM)pinkman Wrote:  So I discover this functionality. Thanks, looks interesting.
A few questions:
- Why are AVars and DelAVars not mentioned in the catalog menu?
- Once an AVar is created, such as AVars(“vtest”):=123.456, what’s the difference between vtest:=654.321 and AVars(“vtest”):=654.321 ?

They are. They appear under the app var function menu as they are app specific. If you press the CATLG button however, do you see how it has a > on the side and a multi app icon? You will see a copy of each app there to pick a specific one.

Nothing essentially. The first will be slightly faster however.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




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