Post Reply 
48-ish units for Prime?
09-09-2018, 06:25 PM
Post: #1
48-ish units for Prime?
Greetings - I'm new here, but have been using HP calculators (and RPN) for a long time (28C, 32SII, 48gx). I'll try to keep this initial post short...

I have a son who just started 8th grade and is taking HS-level math classes, and plans to attend either the local 'Math & Science' Academy or the IB HS next year. Although I know it's early, he's leaning towards engineering. I have been doing WAY too much 'calculator' research in the last year, but I think I've settled on the HP Prime as the ONE tool that can best get him through the next few years - including (and probably most importantly) the SAT. I know I probably won't convince him of how awesome RPN is (otherwise I might try to push the 50g on him!), but even without using RPN, the Prime outweighs (slightly) anything TI offers - especially considering the Nspire CAS cannot be used on IB exams (which he will be taking if he goes that route).

Ok, with that background out of the way, the real question I have is this: Can I install any sort of program (app?) on the Prime that comes even remotely close to the usefulness of the 'Units' function(s) of the 48-series?? I used a 48gx in college (science degree) and used this feature CONSTANTLY. I STILL use it on my 'virtual' 48gx on my phone a few times a week. I love the ability to be able to choose the 'family/flavor' (Length, volume, speed, etc), then the unit itself (without TYPING the unit!!), and then easily CONVERTING to the desired unit - again, with a soft key (no need to type it out).

I would gladly pay for such an app.

Thanks in advance for any help!
Find all posts by this user
Quote this message in a reply
09-09-2018, 09:19 PM (This post was last modified: 09-09-2018 09:24 PM by StephenG1CMZ.)
Post: #2
RE: 48-ish units for Prime?
If the built-in capabilities of the HP Prime don't suit, you might find my Z_UNITS program helpful, or epp's Convert.
http://www.hpmuseum.org/forum/thread-524...ht=Z_units
http://www.hpmuseum.org/forum/thread-501...ight=Units
But it's not HP-48.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
09-09-2018, 11:32 PM
Post: #3
RE: 48-ish units for Prime?
Thanks Stephen,

I ran them both on my emulator (still waiting to pull the trigger on a 'real' Prime) and they are great! Nice job. They are... close(?) to what I'm looking for, but still obviously pretty far short of the 48/49/50's capabilities. Is there a way to allow either of those programs to use the stack? For example, crunch something that ends up on the stack and then allow the program to do the conversion on the bottom of the stack (without having to retype the result)? And then, return the result to the stack of course.

This is almost certainly a bridge too far, but ideally, I would like to use soft-keys to assign units to stack values, multiply/divide them via RPN, and then convert the result to the desired unit.

For example, on my 48gx (or 50g - after enabling flag 117 I think?), I could quickly determine how many Joules of energy were used to move something 55 cm using 23 ft-lbf (I know it's unlikely, but I intentionally mixed SI and Imperial units to help illustrate the point). By first putting 55 <units> <length> [cm] on the stack, then 23 <units> <force> [lbf], multiply, and then convert the product [1265 cm*lbf] to J via <units> <energy> <left-shift> [J]: 56.27 J.

I just did it and it took about 15 seconds using a mouse on my 50g emulator (would have been faster with an actual calculator). On any other calculator, it would require first converting things to the same system (SI, or meters and Newtons in this example), then 'knowing' the product of those two terms to be Joules. I like how the 48 series lets you convert unconventional units (like cm*lbf) to the 'proper' unit (J) without needing to do any preliminary conversions OR move away from the stack. In fact, I used this 'unit analysis' to check my work all the time in my undergrad studies. Saved me from [way too many !] stupid errors I would have probably never noticed otherwise.

Like I said, probably a bridge too far for the Prime. But if folks think it's possible to create such a program, man it would be awesome! I would definitely pay for that.
Find all posts by this user
Quote this message in a reply
09-10-2018, 01:39 PM
Post: #4
RE: 48-ish units for Prime?
I just did your exact example with my Prime.

In RPN:
55 ->shift ->units and find "cm" under units->length on the second tab [Enter]
23 ->shift ->units and find "lbf" under units->force. Then hit multiplication.
1 ->shift ->units and find "J" under units->energy. Hit [Enter]
Shift ->units, under first tab (Tools) find "Convert" and hit last tab "OK" and [Enter]

Esben
15C CE, 28s, 35s, 49G+, 50G, Prime G2 HW D, SwissMicros DM32, DM42, DM42n, WP43 Pilot
Elektronika MK-52 & MK-61
Find all posts by this user
Quote this message in a reply
09-10-2018, 04:41 PM
Post: #5
RE: 48-ish units for Prime?
(09-10-2018 01:39 PM)DA74254 Wrote:  I just did your exact example with my Prime.

In RPN:
55 ->shift ->units and find "cm" under units->length on the second tab [Enter]
23 ->shift ->units and find "lbf" under units->force. Then hit multiplication.
1 ->shift ->units and find "J" under units->energy. Hit [Enter]
Shift ->units, under first tab (Tools) find "Convert" and hit last tab "OK" and [Enter]

Soft MENU "back" to HP Prime.
The touch screen is wonderful!
Custom Menu could be assigned to HOLD the [Shift] & [Menu]
Just one CST menu is enough, just one...
Find all posts by this user
Quote this message in a reply
09-10-2018, 07:10 PM
Post: #6
RE: 48-ish units for Prime?
(09-10-2018 01:39 PM)DA74254 Wrote:  I just did your exact example with my Prime.

In RPN:
55 ->shift ->units and find "cm" under units->length on the second tab [Enter]
23 ->shift ->units and find "lbf" under units->force. Then hit multiplication.
1 ->shift ->units and find "J" under units->energy. Hit [Enter]
Shift ->units, under first tab (Tools) find "Convert" and hit last tab "OK" and [Enter]
DOH!! Ok, that was exactly what I was looking for (or at least 99.9% of the way there)!!! In front of me the whole time. I guess that seals the deal for me (or my kid, rather). HP Prime it is!! Now I just need to read up on these 'G2' rumors...? Wonder if I should wait for it to appear in the states, buy the current model, or buy one from the Netherlands?

Sorry... off topic. Thanks SO MUCH for schooling me on this! I guess I need to play with the emulator more and <gasp!>... read the manual!! Very happy this was just 'noob ignorance!'
Find all posts by this user
Quote this message in a reply
09-10-2018, 08:25 PM
Post: #7
RE: 48-ish units for Prime?
(09-10-2018 07:10 PM)cvicisso Wrote:  
(09-10-2018 01:39 PM)DA74254 Wrote:  I just did your exact example with my Prime.

In RPN:
55 ->shift ->units and find "cm" under units->length on the second tab [Enter]
23 ->shift ->units and find "lbf" under units->force. Then hit multiplication.
1 ->shift ->units and find "J" under units->energy. Hit [Enter]
Shift ->units, under first tab (Tools) find "Convert" and hit last tab "OK" and [Enter]
DOH!! Ok, that was exactly what I was looking for (or at least 99.9% of the way there)!!! In front of me the whole time. I guess that seals the deal for me (or my kid, rather). HP Prime it is!! Now I just need to read up on these 'G2' rumors...? Wonder if I should wait for it to appear in the states, buy the current model, or buy one from the Netherlands?

Sorry... off topic. Thanks SO MUCH for schooling me on this! I guess I need to play with the emulator more and <gasp!>... read the manual!! Very happy this was just 'noob ignorance!'

"buy one from the Netherlands" <-- THAT
Find all posts by this user
Quote this message in a reply
09-10-2018, 10:46 PM
Post: #8
RE: 48-ish units for Prime?
(09-10-2018 07:10 PM)cvicisso Wrote:  Sorry... off topic. Thanks SO MUCH for schooling me on this! I guess I need to play with the emulator more and <gasp!>... read the manual!! Very happy this was just 'noob ignorance!'

Welcome to the Forums cvicisso!

Another quick tip. If you need help with a command, press the HELP key in the upper right corner. With the help key, you can get explanations, command syntax, and examples. It has a help tree, a key mode where you can press any key to get help on, and a search function to find help using some key words.

Seeing how this calculator is aimed towards you son, who seems to prefer algabraic/textbook entry, he would be able to convert units in this manner.

55 [Shift] [Units] Length cm * 23 [Shift] [Units] Force lbf [ENTER]
Then...
[Shift] [STO] [Shift] [Units] Energy J [ENTER]

In short, you can use the STO command as a shortcut to access CONVERT. It's rather convenient.
Find all posts by this user
Quote this message in a reply
09-11-2018, 02:02 AM
Post: #9
RE: 48-ish units for Prime?
(09-10-2018 08:25 PM)CyberAngel Wrote:  "buy one from the Netherlands" <-- THAT

I think I will! Anyone know how long it takes to arrive in U.S.? His birthday is in 9 days... Wasn't planning it as a birthday gift, but the timing might work out that way.
Find all posts by this user
Quote this message in a reply
09-11-2018, 02:05 AM
Post: #10
RE: 48-ish units for Prime?
(09-10-2018 10:46 PM)Carsen Wrote:  In short, you can use the STO command as a shortcut to access CONVERT. It's rather convenient.

This is great!! Thanks!!
Find all posts by this user
Quote this message in a reply
09-11-2018, 07:32 AM
Post: #11
RE: 48-ish units for Prime?
(09-11-2018 02:02 AM)cvicisso Wrote:  I think I will! Anyone know how long it takes to arrive in U.S.? His birthday is in 9 days... Wasn't planning it as a birthday gift, but the timing might work out that way.

Do it now Smile You might just get it in time.

No affiliation to De Rekenwinkel, just a happy owner of 3x HP Prime, one of which is the new G2 model bought from Klaas.
Find all posts by this user
Quote this message in a reply
09-11-2018, 07:45 AM
Post: #12
RE: 48-ish units for Prime?
(09-09-2018 11:32 PM)cvicisso Wrote:  For example, on my 48gx (or 50g - after enabling flag 117 I think?), I could quickly determine how many Joules of energy were used to move something 55 cm using 23 ft-lbf (I know it's unlikely, but I intentionally mixed SI and Imperial units to help illustrate the point). By first putting 55 <units> <length> [cm] on the stack, then 23 <units> <force> [lbf], multiply, and then convert the product [1265 cm*lbf] to J via <units> <energy> <left-shift> [J]: 56.27 J.

Don't forget the (imho outstanding) capability of the 48/49/50 series to numerically solve equations with variables with units.
Unfortunately i found the Prime a huge step back in this matter, being practically useless to me :-(

Cheers
Find all posts by this user
Quote this message in a reply
09-11-2018, 08:15 AM
Post: #13
RE: 48-ish units for Prime?
(09-11-2018 07:45 AM)Marco Polo Wrote:  
(09-09-2018 11:32 PM)cvicisso Wrote:  For example, on my 48gx (or 50g - after enabling flag 117 I think?), I could quickly determine how many Joules of energy were used to move something 55 cm using 23 ft-lbf (I know it's unlikely, but I intentionally mixed SI and Imperial units to help illustrate the point). By first putting 55 <units> <length> [cm] on the stack, then 23 <units> <force> [lbf], multiply, and then convert the product [1265 cm*lbf] to J via <units> <energy> <left-shift> [J]: 56.27 J.

Don't forget the (imho outstanding) capability of the 48/49/50 series to numerically solve equations with variables with units.
Unfortunately i found the Prime a huge step back in this matter, being practically useless to me :-(

Cheers

I wanted the 49/50 series to have a Complex Solver with Units
(280_mV 4.12_rad)
280_mV+4.12_rad*i
Find all posts by this user
Quote this message in a reply
09-12-2018, 03:40 AM
Post: #14
RE: 48-ish units for Prime?
(09-11-2018 07:45 AM)Marco Polo Wrote:  Don't forget the (imho outstanding) capability of the 48/49/50 series to numerically solve equations with variables with units.
Unfortunately i found the Prime a huge step back in this matter, being practically useless to me :-(
Interesting. Can you give an example? It's obviously something I haven't used (at least not often or recently). Is the 48 series the only one that can do it, or can anything TI flavored do it as well?
Find all posts by this user
Quote this message in a reply
09-12-2018, 03:43 AM
Post: #15
RE: 48-ish units for Prime?
(09-12-2018 03:40 AM)cvicisso Wrote:  
(09-11-2018 07:45 AM)Marco Polo Wrote:  Don't forget the (imho outstanding) capability of the 48/49/50 series to numerically solve equations with variables with units.
Unfortunately i found the Prime a huge step back in this matter, being practically useless to me :-(
Interesting. Can you give an example? It's obviously something I haven't used (at least not often or recently). Is the 48 series the only one that can do it, or can anything TI flavored do it as well?

Key in all the known variables with correct units and hit |SOLVE|
Your answer will also have units.
Find all posts by this user
Quote this message in a reply
09-12-2018, 07:04 AM
Post: #16
RE: 48-ish units for Prime?
(09-12-2018 03:43 AM)CyberAngel Wrote:  Key in all the known variables with correct units and hit |SOLVE|
Your answer will also have units.

Be careful to input an estimate with the desidered UOM into the variable to solve for: if no or wrong UOM is attached you will get a "Inconsistent Units" error
Find all posts by this user
Quote this message in a reply
09-12-2018, 10:32 PM (This post was last modified: 09-18-2018 09:47 PM by Gene222.)
Post: #17
RE: 48-ish units for Prime?
(09-09-2018 09:19 PM)StephenG1CMZ Wrote:  If the built-in capabilities of the HP Prime don't suit, you might find my Z_UNITS program helpful, or epp's Convert.
http://www.hpmuseum.org/forum/thread-524...ht=Z_units
http://www.hpmuseum.org/forum/thread-501...ight=Units
But it's not HP-48.

For those who only use a few unit conversions, they might want to consider writing their own custom conversion program, like the one shown here for flow rate conversions. This program requires you to access the conversion sub-programs or functions though the "toolbox" key and "user" tab, as shown in the images below. It saves a couple of key strokes at the sacrifice of versatility. It's a step backwards, but it's quicker. It's like the old calculators that had dedicated unit conversion keys. EDIT 9/15/18. Just make sure you use the correct conversion formula. Corrected the errors in code below. Also, I don't know why the program works without the functions being declared. EDIT 9/18/18. The function names, such as cfs→cms(X1) will not work in CAS mode. CAS will not recognize the → to be part of the function name. To use the programs in CAS mode, all of the function names would have to be changed to something like cfs_cms(X1).

Code:
UnitConv()
BEGIN
END;

EXPORT cfs→cms(X1)
BEGIN
  RETURN 0.0283168465921*X1;  //corrected error
END;

EXPORT cms→cfs(X1)
BEGIN
  RETURN X1/0.0283168465921;  //corrected error
END;

EXPORT mgd→cfs(X1)
BEGIN
  RETURN 1.54722865228*X1;  //corrected error
END;

EXPORT cfs→mgd(X1)
BEGIN
  RETURN X1/1.54722865228;  //corrected error
END;

EXPORT gpm→cfs(X1)
BEGIN
  RETURN 0.00222800925927*X1;
END;

EXPORT cfs→gpm(X1)
BEGIN
  RETURN X1/0.00222800925927;
END;

[Image: 11kwe92.png] [Image: 2gxqmnb.png]

EDIT 9/15/18 Alternatively, for tedious unit conversions that are often used, you can write a similar program using CONVERT. The program below removed the units tag by dividing the variable with the units by its units. The units tag can be left in, if that is what you want. One last thing. If you load both of these programs onto your calculator (UnitConv and Unit), there will be two of each function with the same name. When you run "cfs→cms", the program name and function name will be shown in the display, such as "UnitConv.cfs→cms()", which can clutter the display. So you should delete one of the programs or rename the functions with unique names, so that only the function name is displayed, such as "cfs→cms()".

EDIT 9/18/18. Changed the "→" in the function names to a "_" in the program below, so that the program will work in CAS mode.

In Home RPN mode, you enter the number followed by the function then press Enter, such as 5 cfs_cms() Enter. Or, 5 Enter cfs_cms() Enter.

Code:
Unit()
BEGIN
END;

LOCAL x1;

EXPORT cfs_cms(x1)
BEGIN
  x1:=CONVERT(x1*(1_ft^3/1_s),(1_m^3/1_s));
  x1:=x1/(1_m^3/1_s);  //remove unit tag
  RETURN x1;
END;

EXPORT cms_cfs(x1)
BEGIN
  x1:=CONVERT(x1*(1_m^3/1_s),(1_ft^3/1_s));
  x1:=x1/(1_ft^3/1_s);  //remove unit tag
  RETURN x1;
END;

EXPORT mgd_cfs(x1)
BEGIN
  x1:=x1*1000000;
  x1:=CONVERT(x1*(1_galUS/1_d),(1_ft^3/1_s));
  x1:=x1/(1_ft^3/1_s);  //remove unit tag
  RETURN x1;
END;

EXPORT cfs_mgd(x1)
BEGIN
  x1:=x1/1000000;
  x1:=CONVERT(x1*(1_ft^3/1_s),(1_galUS/1_d));
  x1:=x1/(1_galUS/1_d);  //remove unit tag
  RETURN x1;
END;

EXPORT gpm_cfs(x1)
BEGIN
  x1:=CONVERT(x1*(1_galUS/1_min),(1_ft^3/1_s));
  x1:=x1/(1_ft^3/1_s);  //remove unit tag
  RETURN x1;
END;

EXPORT cfs_gpm(x1)
BEGIN
  x1:=CONVERT(x1*(1_ft^3/1_s),(1_galUS/1_min));
  x1:=x1/(1_galUS/1_min);  //remove unit tag
  RETURN x1;
END;
Find all posts by this user
Quote this message in a reply
09-14-2018, 11:00 AM (This post was last modified: 09-14-2018 11:00 AM by Didier Lachieze.)
Post: #18
RE: 48-ish units for Prime?
(09-09-2018 06:25 PM)cvicisso Wrote:  This is almost certainly a bridge too far, but ideally, I would like to use soft-keys to assign units to stack values, multiply/divide them via RPN, and then convert the result to the desired unit.

I’ve just released a preview of the Units48 app I’m working on that just does that.
Find all posts by this user
Quote this message in a reply
Post Reply 




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