HP Forums

Full Version: HP Prime: Converting number to Sci notation and back
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Is there a simple way to convert a floating point to scientific notation and the reverse as well? (IOW a sic notation method like the a b/c button).

One method, maybe not what you are looking for, is make a user key program to change the global HFormat setting. Whatever key you pick (in this case EEX) will cycle through the formats, you could easily make it cycle through only the formats you want. It updates any numbers on the stack/history as well. The STARTVIEW lines are just a way to get the screen to update, RETURN 5 returns a HOME key press which is the way I have found to "not do anything extra". The only problem I know with this method is it will take you to the home screen as it switches modes. Also some keys don't let you re-assign them.

KEY K_Eex()
BEGIN
HFormat:=(HFormat+1) MOD 4;
STARTVIEW(-8,0);
STARTVIEW(-1,1);
RETURN 5;
END;

or an alternative

KEY K_Eex()
BEGIN
IF HFormat == 0 THEN
HFormat := 2;
ELSE
HFormat := 0;
END;
STARTVIEW(-8,0);
STARTVIEW(-1,1);
RETURN 5;
END;

(To make a User Key just put those lines in any program listing, substitute for K_Eex the key you want to use, and then SHIFT->Help(User) + EEX)
(Or lock User keys with SHIFT->Help(User) twice)