6 Programming
Programming in HP-42 is very simple. It does not use RPL style of HP-48 or HP-49. You program
in the same way you use the calculator and unlike some non hp cheaper calculators all the steps are
shown in the display and in numbered lines.
6.1 Basic programming.
Let's imagine you want to make a given calculation. For example: Suppose you want to solve a
equation
x
2
−
5
x
4
=
0 which is of the form:
ax
2
bx
c
=
0 .
As you know the solution for this kind of equation is
x
=−
b ±
∆
2
a
where ∆ =
b
2
−
4
ac
.
Let's suppose a, b and c are in R
00
, R
01
and R
02
respectively and we are going to use R
03
for ∆.
To solve this equation using HP-42S/Free42 we just do
RCL 01 (This is b)
x
2
4
RCL 00 (This is a)
RCL 02 (This is c, keep in mind we have only four lines in the stack)
x
x
-
STO 03 (This is ∆)
Unlike some other models, say 33S, we don't need to worry with ∆ is negative. But we let the square
root for late because in R
03
the number cannot be complex. (Otherwise we would need to store it's
root in a normal memory)
Now we calculate the first root
RCL 01
+/-
RCL 03
x
-
2
RCL 00
x
÷
And the second root is given by
RCL 01
+/-
RCL 03
x
+
2