Post Reply 
Scientific Notation
02-13-2014, 01:16 AM
Post: #1
Scientific Notation
Anyone with recommendations for a simple program to convert a number to scientific notation (and vice versa)?
Find all posts by this user
Quote this message in a reply
02-13-2014, 02:17 AM
Post: #2
RE: Scientific Notation
I think shift setup lets you switch numeric setup.
Find all posts by this user
Quote this message in a reply
02-13-2014, 03:28 AM
Post: #3
RE: Scientific Notation
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.)

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-13-2014, 04:46 AM
Post: #4
RE: Scientific Notation
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.
Find all posts by this user
Quote this message in a reply
02-13-2014, 06:12 PM
Post: #5
RE: Scientific Notation
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;

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-14-2014, 04:52 AM
Post: #6
RE: Scientific Notation
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?
Find all posts by this user
Quote this message in a reply
02-14-2014, 04:16 PM
Post: #7
RE: Scientific Notation
(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.

Massimo
from 34c to prime
Find all posts by this user
Quote this message in a reply
02-22-2014, 01:58 PM
Post: #8
RE: Scientific Notation
(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
Find all posts by this user
Quote this message in a reply
02-23-2014, 11:09 PM
Post: #9
RE: Scientific Notation
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
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: