hp calculators
HP 9s Operating Modes and Display Format
It is sometimes necessary to replace a number by its truncated or rounded value. Even though there’s no specific
function to do it on the HP 9s, it can be easily done: to truncate a number to n decimal places, simply add and subtract
n
−
13
10
.
Example 3: Truncate
π
to four decimal digits.
Solution:
Let’s select the default mode:
~p
.
. Now press
U
or
\
to cancel/finish any previous
calculation, and
~a
to display the number 3.141592654. To truncate it to four decimal places, press:
+A9-A9\
It is important not to use the
\
key to display the partial result
: the sequence
~a+
A9\-A9\
returns 3.14 instead of 3.1415 because the 13-digit precision is only
maintained in chain calculations.
9
10
+
π
2
Answer: 3.1415
To truncate a number to zero decimal digits, that is to say, to obtain its integer part, the following sequence is shorter:
~Ø~Ù
provided the number is between – 9999999999 and 9999999999.
Rounding a number to n decimal digits is a bit more involved,
must be added to the number and then the
1
10
5
−
−
⋅
n
result must be truncated using the above procedure.
Example 4: Round
π
to four decimal digits.
Solution: Press
~a
again and then:
+A=5+A9-A9\
Answer:
3.1416. Note that this is not the same result as the one obtained by pressing
~a~p
4
, even
though they appear to be the same number. Set FIX 6 (
~p
6
) in both cases to tell the difference.
The HP 9s provides two keys to convert the number that is currently in the display to scientific format (i.e. displayed with
an exponent, and only one digit to the left of the decimal point) and engineering format (i.e. with an exponent that is a
multiple of 3). This conversion affects only the displayed number so that results can be easily interpreted as multiples or
submultiples of a unit, for example, but keying in any new number or continuing the calculation restores the display
setting (i.e. either fixed or floating point). The number of decimal digits in scientific and engineering format is the one
previously set by FIX. In the following example we’ll try to show all possible cases:
Example 5: Let’s set FIX 4 (
~p
4
) , press
U
and key in 123.45678:
123.45678
2
The following example will help you tell the difference: 1234567809
{+
0.001
-[
returns 0.001, but
[+
0.001
\
-[
returns 0.
hp calculators
- 4 -
HP 9s Operating Modes and Display Format - Version 1.0