Converting - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Converting (/thread-2913.html) Pages: 1 2 Converting - marcusnicolas1 - 01-24-2015 03:18 AM I read the book and tried convert 20.5 km to miles but I was not able to for some reason. Can anyone help me with this? Thanks RE: Converting - toml_12953 - 01-24-2015 06:06 AM (01-24-2015 03:18 AM)marcusnicolas1 Wrote:  I read the book and tried convert 20.5 km to miles but I was not able to for some reason. Can anyone help me with this? Thanks If you're in RPN mode, do this: 1. Type 20.5 (do NOT press Enter) 2. Press Shift then Units 3. Tap Units menu choice 4. Tap Length 5. Tap km (20.5_km will be displayed) 6. Press Enter 7. Put in 1_mi using same technique as steps 1 - 5. 8. Press Shift then Units 9. Tap Tools menu choice 10. Tap CONVERT menu choice 11. Display will read 12.7381094409_mile (depending on your decimal setting) RE: Converting - Joe Horn - 01-25-2015 01:12 AM (01-24-2015 03:18 AM)marcusnicolas1 Wrote:  I read the book and tried convert 20.5 km to miles but I was not able to for some reason. Can anyone help me with this? Thanks There's a nifty shortcut. Just type this and press Enter: In Home view: 20.5_km►_mile In CAS view: 20.5_km►_mi where ► is the "Sto" character (either Shift EEX or the [Sto►] menu button). Prime will add parentheses around the units automatically. The fact that miles are called "mile" in Home and "mi" in CAS is a symptom of Prime's unfortunate dissociative identity disorder. EDIT: Just noticed that CAS also allows "mile", but Home doesn't allow "mi". Humph. RE: Converting - toml_12953 - 01-25-2015 03:57 AM (01-25-2015 01:12 AM)Joe Horn Wrote:   (01-24-2015 03:18 AM)marcusnicolas1 Wrote:  I read the book and tried convert 20.5 km to miles but I was not able to for some reason. Can anyone help me with this? Thanks There's a nifty shortcut. Just type this and press Enter: In Home view: 20.5_km►_mile In CAS view: 20.5_km►_mi where ► is the "Sto" character (either Shift EEX or the [Sto►] menu button). Prime will add parentheses around the units automatically. The fact that miles are called "mile" in Home and "mi" in CAS is a symptom of Prime's unfortunate dissociative identity disorder. EDIT: Just noticed that CAS also allows "mile", but Home doesn't allow "mi". Humph. I can't make it work in RPN mode. I tried 20.5_km then pressing STO. I get bad argument count I tried 20.5_km Enter then type _mile and STO I get "Do you want to create a variable called ►_mile" Tom Lake RE: Converting - rprosperi - 01-25-2015 04:28 AM (01-25-2015 03:57 AM)toml_12953 Wrote:   (01-25-2015 01:12 AM)Joe Horn Wrote:  There's a nifty shortcut. Just type this and press Enter: In Home view: 20.5_km►_mile In CAS view: 20.5_km►_mi where ► is the "Sto" character (either Shift EEX or the [Sto►] menu button). Prime will add parentheses around the units automatically. The fact that miles are called "mile" in Home and "mi" in CAS is a symptom of Prime's unfortunate dissociative identity disorder. EDIT: Just noticed that CAS also allows "mile", but Home doesn't allow "mi". Humph. I can't make it work in RPN mode. I tried 20.5_km then pressing STO. I get bad argument count I tried 20.5_km Enter then type _mile and STO I get "Do you want to create a variable called ►_mile" Tom Lake This shortcut works in Algebraic and Textbook modes only. Storage (using the STO ►method) in RPN works differently due to the way the stack works, whereby one must put the value to store onto the stack, then specify the target variable, then invoke the storage command. RE: Converting - marcusnicolas1 - 02-01-2015 02:59 AM Thanks for the help. Now I have one more question. I tried adding 1cm to 5in and it will not give me an answer. I just keep getting an error code. The book tells me I should get an answer. Can anyone help me with this please? Thanks RE: Converting - Joe Horn - 02-01-2015 06:02 AM (02-01-2015 02:59 AM)marcusnicolas1 Wrote:  Thanks for the help. Now I have one more question. I tried adding 1cm to 5in and it will not give me an answer. I just keep getting an error code. The book tells me I should get an answer. Can anyone help me with this please? Thanks Depends on the mode you're in, and the quirk that inches are called "in" in Home, and "inch" in CAS. Home in RPN Entry mode: 1_(cm) Enter 5_(in) + Home in Textbook/Algebraic entry mode: 1_(cm)+5_(in) Enter CAS in Algebraic Entry mode: 1_cm+5_inch Enter CAS in Textbook Entry mode: 1_(cm)+5_(inch) Enter CAS in RPN Entry mode acts like CAS in Algebraic Entry mode. RE: Converting - Miguel Toro - 02-01-2015 01:15 PM (01-24-2015 06:06 AM)toml_12953 Wrote:   (01-24-2015 03:18 AM)marcusnicolas1 Wrote:  I read the book and tried convert 20.5 km to miles but I was not able to for some reason. Can anyone help me with this? Thanks If you're in RPN mode, do this: 1. Type 20.5 (do NOT press Enter) 2. Press Shift then Units 3. Tap Units menu choice 4. Tap Length 5. Tap km (20.5_km will be displayed) 6. Press Enter 7. Put in 1_mi using same technique as steps 1 - 5. 8. Press Shift then Units 9. Tap Tools menu choice 10. Tap CONVERT menu choice 11. Display will read 12.7381094409_mile (depending on your decimal setting) Hi, At least one step less in RPN : Step 7 can be "7. Put in 1_mi using same technique as steps 2 - 5." If you choose the unit without giving a quantity first, 1 is assumed automatically by the calculator. Cheers, Miguel RE: Converting - retoa - 02-03-2015 09:49 PM I have some problems converting units in CAS. Here the display 1 as I introduce the command 2 after having pressed Enter As you see after the Enter there is some backspace more and it ends with an error. In home all works fine. The nifty trick with the Sto button does't seem to work in CAS Where is the problem? Regards Reto RE: Converting - Offroad - 02-03-2015 10:24 PM try 3_cm►_m worked for me here using the emulator.[/code] RE: Converting - retoa - 02-03-2015 10:48 PM In home it works fine In CAS it works but not properly. The answer should be 0.03_m, but it gives _([0.03 _m]). Why all the parenthesis? RE: Converting - Offroad - 02-03-2015 11:09 PM (02-03-2015 10:48 PM)retoa Wrote:  In home it works fine In CAS it works but not properly. The answer should be 0.03_m, but it gives _([0.03 _m]). Why all the parenthesis? Interesting. I still don't know why we should use 'in' in Home and 'inch' in CAS. RE: Converting - Tim Wessman - 02-03-2015 11:17 PM Basically, the CAS has "in" as a reserved word. RE: Converting - ndzied1 - 02-03-2015 11:45 PM I gave up trying to do unit conversions in the prime a while ago. The number of keystrokes and convoluted forms required to enter them are enough to make me want to poke my eyes in. My prime sits atop my 50g and for any unit conversions required I move to the 50g. IMHO the way the 50g handles units is just about as perfect as it can get in a calculator. If I could magically change one thing in the Prime it would be to make units work like they do in the 50g. RE: Converting - Offroad - 02-03-2015 11:54 PM (02-03-2015 11:45 PM)ndzied1 Wrote:  I gave up trying to do unit conversions in the prime a while ago. The number of keystrokes and convoluted forms required to enter them are enough to make me want to poke my eyes in. My prime sits atop my 50g and for any unit conversions required I move to the 50g. IMHO the way the 50g handles units is just about as perfect as it can get in a calculator. If I could magically change one thing in the Prime it would be to make units work like they do in the 50g. Apart from the extra parenthesis, I would say the number of keystrokes is the about the same. Using the 50g one also needs to nagivate thru menus and stuff. On the Prime I only have to key in the numbers, underline, unit, sto, underline unit and hit ENTER. It~s Worth mentioning that the extra parenthesis won't affect you calculations. RE: Converting - Joe Horn - 02-04-2015 12:34 AM (02-03-2015 10:48 PM)retoa Wrote:  In home it works fine In CAS it works but not properly. The answer should be 0.03_m, but it gives _([0.03 _m]). Why all the parenthesis? Textbook Display mode (Home Settings, page 2) and CAS don't always play well together. I usually leave it turned off. RE: Converting - ndzied1 - 02-04-2015 01:45 AM (02-03-2015 11:54 PM)Offroad Wrote:   (02-03-2015 11:45 PM)ndzied1 Wrote:  I gave up trying to do unit conversions in the prime a while ago. The number of keystrokes and convoluted forms required to enter them are enough to make me want to poke my eyes in. My prime sits atop my 50g and for any unit conversions required I move to the 50g. IMHO the way the 50g handles units is just about as perfect as it can get in a calculator. If I could magically change one thing in the Prime it would be to make units work like they do in the 50g. Apart from the extra parenthesis, I would say the number of keystrokes is the about the same. Using the 50g one also needs to nagivate thru menus and stuff. On the Prime I only have to key in the numbers, underline, unit, sto, underline unit and hit ENTER. It~s Worth mentioning that the extra parenthesis won't affect you calculations. I often find myself jumping back and forth multiple times between two units for instance gallons and liters. Once the menu is up I can assure you that going back and forth between units is much much easier on the 50g at least for me. RE: Converting - retoa - 02-04-2015 07:15 AM (02-04-2015 12:34 AM)Joe Horn Wrote:   (02-03-2015 10:48 PM)retoa Wrote:  In home it works fine In CAS it works but not properly. The answer should be 0.03_m, but it gives _([0.03 _m]). Why all the parenthesis? Textbook Display mode (Home Settings, page 2) and CAS don't always play well together. I usually leave it turned off. I changed to Algebraic Display mode but still have the same error when I use the convert command from the units menu and all the parenthesis when I use the sto button (in CAS). I find the way you can convert units with the Prime in home with the sto button is very good and fast. And with the touchscreen choosing a unit it very easy, better then on the 50g. What I find very useful is the ability of the Prime to automatically simplify the units, like kg*m/s^2 to N. RE: Converting - ndzied1 - 02-04-2015 06:56 PM My real world example. Convert 50 liters to galUS then convert 75 liters to galUS 50g required steps (12): R-Shift Units Vol (F4) NXT 50 l (F1) L-Shift gal (F4) 75 l (F1) L-Shift gal (F4) Prime required steps (24): 50 Shift Units Volume (4) l (touch) Sto> (touch) Shift Units Volume (4) swipe up galUS (touch) Enter 75 Shift Units Volume (4) l (touch) Sto> (touch) Shift Units Volume (4) swipe up galUS (touch) Enter And the more conversions I have to do, the worse the Prime is because I always have to keep bringing back the unit menu and hitting Enter. :-( RE: Converting - Han - 02-04-2015 07:31 PM Make a customized key that brings up a full choose-menu of all the units (you can even do nested choose menus by applying choose() in sequence) and outputs the proper units. Once done, you probably could do all your conversions in a few keypresses and touch-screen taps. Bind the key to the underscore symbol and then every time you type _ it should allow you to quickly pick the units. Your program can even keep track of the most recent menus, too. That said, I do think the lack of menus from the HP48 through HP50 calcs is indeed a nuisance. Here's an example (just modify it to add more categories and units): Code: ```lastunit:={0,0}; KEY KS_Space() BEGIN   local list1:={"Length", "Volume"};   local list2:={{"m","cm","in"},{"m^3","cm^3","in^3"}};   local c1,c2;   if lastunit(1) OR lastunit(2) then     c1:=lastunit(1); c2:=lastunit(2);     choose(c2,list1(c1),list2(c1));   else     c1:=0; c2:=0;   end;   if c2==0 then     repeat       choose(c1,"Units",list1);       if c1 then         choose(c2,list1(c1),list2(c1));       end;     until c1==0 OR c2;     lastunit:={c1,c2};   end;   if c2 then return("_"+list2(c1,c2)); else return(""); end; END;``` Only 10 keystrokes/screentouches to convert from 1 meter to inches (or 12 if you count setting up user mode)