HP Forums
Displaying Fewer Digits in CAS and HOME - 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: Displaying Fewer Digits in CAS and HOME (/thread-7815.html)



Displaying Fewer Digits in CAS and HOME - chazzs - 02-24-2017 04:26 AM

So I'm trying to only show four decimal digits in both matrices in CAS or in the stack in HOME. I can't seem to get any of the settings to do this. Sorry if this has been asked before, but search gave nothing.

C


RE: Displaying Fewer Digits in CAS and HOME - Tim Wessman - 02-24-2017 05:09 AM

You'll want the display setting "Rounded 4"


RE: Displaying Fewer Digits in CAS and HOME - Joe Horn - 02-24-2017 10:12 AM

(02-24-2017 05:09 AM)Tim Wessman Wrote:  You'll want the display setting "Rounded 4"

Chazzs, please note that the above is in the Home Settings page, not in the CAS Settings page. The "Number Format" setting that you see in the CAS Settings page currently does nothing.


RE: Displaying Fewer Digits in CAS and HOME - toml_12953 - 02-24-2017 01:54 PM

(02-24-2017 05:09 AM)Tim Wessman Wrote:  You'll want the display setting "Rounded 4"
How can I set that from an HPPL program? I know I can use the STRING function for individual numbers but I'd like to be able to save the current display mode, set the mode to a new value and restore the original mode when the program ends.

Tom L


RE: Displaying Fewer Digits in CAS and HOME - DrD - 02-24-2017 02:27 PM

Use the HDigits home variable:

HFormat:=1;
HDigits:=4;

Quote:I'd like to be able to save the current display mode, set the mode to a new value and restore the original mode when the program ends.

F:=HFormat; // save the current display mode
HFormat:=1; // set the mode to a new value
H:=HDigits;
HDigits:=4;
HFormat:=F; //restore the original mode when the program ends


RE: Displaying Fewer Digits in CAS and HOME - Han - 02-24-2017 04:10 PM

(02-24-2017 04:05 PM)toml_12953 Wrote:  
(02-24-2017 02:27 PM)DrD Wrote:  Use the HDigits home variable:

HFormat:=1;
HDigits:=4;


F:=HFormat; // save the current display mode
HFormat:=1; // set the mode to a new value
H:=HDigits;
HDigits:=4;
HFormat:=F; //restore the original mode when the program ends
Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
Changing HDigits doesn't change the decimal places for me.

Tom L

I see the change immediately when I type (in either Home or CAS)

HFormat:=1; // display automatically shows fixed format (any pre-existing numbers on the screen changes);
HDigits:=4; // only four digits displayed after fraction mark

Did you make sure that you changed HFormat to 1 (Fixed mode)? Leaving it as 0 won't do anything. HDigits only applies when HFormat specifies a mode that uses fixed digits.


RE: Displaying Fewer Digits in CAS and HOME - DrD - 02-24-2017 04:17 PM

(02-24-2017 04:05 PM)toml_12953 Wrote:  Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
Changing HDigits doesn't change the number of decimal places for me.
Tom L

Take some time to review the parameters associated with HFormat and HDigits. (User Guide, and Help docs on the Home Variables). It will do the things you desire, but your settings need to be appropriate. I have quite a few programs that take advantage of these settings. I also am quite sure they will work for you too.


RE: Displaying Fewer Digits in CAS and HOME - chazzs - 02-24-2017 05:51 PM

(02-24-2017 05:09 AM)Tim Wessman Wrote:  You'll want the display setting "Rounded 4"

Ah. There it is. Thanks Tim and Joe.

CHUCK


RE: Displaying Fewer Digits in CAS and HOME - toml_12953 - 02-24-2017 06:29 PM

(02-24-2017 04:17 PM)DrD Wrote:  
(02-24-2017 04:05 PM)toml_12953 Wrote:  Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
Changing HDigits doesn't change the number of decimal places for me.
Tom L

Take some time to review the parameters associated with HFormat and HDigits. (User Guide, and Help docs on the Home Variables). It will do the things you desire, but your settings need to be appropriate. I have quite a few programs that take advantage of these settings. I also am quite sure they will work for you too.

My bad (of course!) I was missing the colon in the statement

HDigits:=4;

Thanks for your patience!

Tom L