HP Forums

Full Version: Scientific Notation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone with recommendations for a simple program to convert a number to scientific notation (and vice versa)?
I think shift setup lets you switch numeric setup.
Scientific notation is just a display format, it does not change a number, so you really don't convert a number you just tell Prime how to display a number that way. No program is needed.

From Home view, press [blue-Shift] [Settings] (the Home key) to enter the Home Settings screen. Tap the 2nd list down (probably set to Standard display)and pick Scientific Number Format, then tap the narrow list that appears to the right of the Number Format list to specify the number of places to be displayed the right of the decimal mark. Press Esc to exit the Settings screen and save your settings.

Note that if you use CAS mode, you have to make analogous settings in the CAS Settings screen. CAS and Home modes have indepent display settings. Also, you can specify the Display Format from within almost every App to unique settings for that app, or you can leave it to the dafault of using the System setting (meaning the one you set in the Home settings.)
Thanks, I should have explained better. I want a convenient way of displaying the last number on the stack in sci notation. For example, if the answer is 245718362524.23, a quick keystroke to convert (and backwards) would be nice rather than counting the digits manually or changing the display mode for everything.
You can create a short toggle program and assign it to a convenient key.

Here is an example, from tips I found here in the forums.

Code:
// Toggle btwn Standard and Scientific-4 Display format
// Assigned to Sin key for demo purposes
KEY K_Sin()
BEGIN
 IF HFormat == 0  
  THEN HFormat:=2; HDigits:=4
  ELSE HFormat:=0;
 END;
//Trick to refresh screen - Great tip from Terje Vallestad 
STARTVIEW(−8,1);
STARTVIEW(−1,1); 
END;
This works pretty good except that it changes all the numbers on the stack. I tried commenting out HDigits line so the decimals will be dynamic, didn't work. Any way to allow the digits after the decimal to work like the other HP calculators only show non-zero numbers after the decimal?
(02-14-2014 04:52 AM)BruceTTT Wrote: [ -> ]the other HP calculators only show non-zero numbers after the decimal?

The old RPN calculators show the zeros.
(02-13-2014 06:12 PM)rprosperi Wrote: [ -> ]You can create a short toggle program and assign it to a convenient key.

Here is an example, from tips I found here in the forums.

Code:
// 
//Trick to refresh screen - Great tip from Terje Vallestad 
STARTVIEW(−8,1);
STARTVIEW(−1,1); 
END;

Rob, whilst i may have posted this trick on the forum, it originated from a guy called Toby who posted it on comp.sys.hp48. Still a good trick though. Smile

Cheers, Terje
Hi Bruce'
If you are only interested in the number of digits you can just take the LOG of the nunber and add 1.
If you really want or need scientific output use the format command from the catalog.
hope this helps.
jim
Reference URL's