6 Programming
Programming in
6.1 Basic programming.
Let's imagine you want to make a given calculation. For example: Suppose you want to solve a
equation x2−5 x4=0 | which is of the form: ax2bxc=0 . | ||||
As you know the solution for this kind of equation is | |||||
x= | −b ± |
|
| where ∆ = |
|
∆ | b2−4 ac . | ||||
|
|
| |||
| 2 a |
|
Let's suppose a, b and c are in R00, R01 and R02 respectively and we are going to use R03 for ∆. To solve this equation using
RCL 01 (This is b)
x2
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 R03 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