HP 42S manual Programming, Basic programming

Page 18

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 x25 x4=0

which is of the form: ax2bxc=0 .

As you know the solution for this kind of equation is

x=

b ±

 

 

where ∆ =

 

b24 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 HP-42S/Free42 we just do

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

Image 18
Contents An alternative HP-42S/Free42 Manual Version 2005 Index Introduction Basic Operations RPNSetting the display contrast Training RPN using HP-42STurn ON/OFF Menus FIX, SCI, ENG, ALL, RDX., RDXPage Modes Menu StackGetting used to some keys of the keyboard Page Abcde Fghi Jklm Nopq Rstuv Wxyz Memory Catalog menu More on the Clear menuCustom menu Assign FCN ABSAssign ABS to Where N!=N.N-1.N-2...2.1 ProbabilityPage Complex Numbers Complex numbers in rectangular coordinatesComplex numbers in polar coordinates Programming Basic programming19STOP More than one program in the memory Enter X?0 and X?Y sub-menusReal program examples LBL PrimeSqrt Using the Solver Select Solve ProgramPage Numeric Integration Ba f  xdxStatistics Enter 6 Σ+Sub-menu Cfit Second line ALLΣ, LINΣ, Σreg and ΣRG? Functions Matrices Enter Matrix NEW = BEnter 3 NEW Edit 1 Enter →→5 +/- Enter Exit STO B Enter NEW Enter ComplexMatrix 1 Enter 3 NEW RCL a RCL B Matrix CrossOther Bases Flags License