HP HP-42S User manual

An alternative HP-42S/Free42 Manual
(Version 0.6)
2005
Author: José Lauro Strapasson, Brazil.
http://joselauro.com/42s.p f

Inde
In ex
1 Intro uction
2 Basic Operations
3 Memory
4 Probability
5 Complex numbers
6 Programming
7 Using the Solver
8 Numeric Integration
9 Statistics
10 Matrices
11 Other Bases
12 Flags
License for this manual

1 Introduction
Since HP-42S was a very nice calculator, an its official manual is no longer freely available an
there were many people looking for its manual, seeme goo to me to write my own HP-42S
manual. I personally on't have a HP-42S (more than U$300 on ebay). I have a HP-33S an ha a
HP-48G, but my brother has one an I also use Free42 simulator for PalmOS.
This manual can interest people who:
a) Have a HP-42S calculator an lost its manual.
b) Got the Free42 simulator an want to know how to use.
c) Have a palmtop with PalmOS an want a nice scientific calculator (get Free42)
) Just want to have an i ea how 42S was.
e) Have the official manual but on't want to rea more than 300 pages!
Why HP-42S? Because it was a very, very nice calculator an also a powerful one. I know some
other HP mo els from the past an the present like 48G, 49G, 28S, 33S, 20S, 6S Solar, 15C, an
even a TI-36X Solar, etc, but 42S is my favorite. An because there is a free simulator (Free42) that
works on Palm OS, Win ows an Linux an there are also some emulators (at the moment
emulators are only useful for who has a real calculator since HP-42S roms are not freely available).
This calculator playe an unique position among HP calculators! Being a scientific programmable
100% RPN calculator, it also ha some graphing abilities but was pockete size an non RPL
(some people as me like RPN, but islike RPL).
It is important to say that this manual is not complete an I on't want it to be. Two things I really
on't want to see here are PRINTING an HP-41 compatibility. This because I suppose most owners
on't have the printer (an it is not so useful) an also haven't ha a HP-41 prior to HP-42S.
If you want to ownloa the fantastic Thomas Okken Free42 program please go to this web site
http://home.planet.nl/~ emun000/thomas_projects/free42/
In my opinion Free42 is even better than the real HP-42S. Try asin(acos(atan(tan(cos(sin(6°)))))).
For more information about HP-42S please see
http://www.hp42s.com
http://www.hpmuseum.org/hp42s.htm
Here you can fin emulators for HP-42S
http://privat.swol. e/ChristophGiesselink (very nice)
http://www.geocities.com/hrastprogrammer/HP42X/in ex.htm
I woul like to finish this intro uction saying that woul be nice to have HP-42S back to life again
an even better to have a mo el (both real an in simulator/emulator form) base on HP-42S but
with some of the 33S features like more memory an equation e itor, fractions, program lines
starting with letters, physical constants, units conversion, less useless functions, etc. An also woul
be nice to have HP-42S roms for free just like what happene to HP-48G an other mo els an
keeping PDF versions of the manuals of retire mo els to ownloa woul be nice too. Perhaps
someone listen to me! :)

2 Basic Operations
2.1 RPN
HP-42S as most ol HP calculators was a RPN calculator. RPN comes from “Reverse Polish
Notation”. In RPN we first enter ata an then we enter the mathematical operations.
Example: To make a simple operation like 2+2 in a normal algebraic calculator we o
2 + 2 =
which give to us 4.
To make this using a RPN calculator we o
2 ENTER 2 +
As we can see in RPN mo e we first enter the ata pressing the ENTER key after every ata (except
for the last in HP's RPN) an then we enter the operations.
Lets now consi er the following calculation
4+(2x79).
In a RPN calculator we o
2 ENTER 79 x 4 +
But how one coul o this in an algebraic calculator?
If the calculator has the ( an ) sings it is just o
4 + ( 2 x 79 ) =
But if there are no () we o this in a goo calculator by oing
4 + 2 x 79 =
By a goo calculator we mean a calculator which knows that x an / are prior to + an -.
In a ba algebraic calculator which oes not know this we have to o
2 x 79 =
an
4 + =
or
2 x 79 + 4 =
What about calculate sin(33)? In a RPN calculator it is just o
33 sin
or if you prefer
33 ENTER sin
(in this case we on't nee to press enter key)
But in an algebraic calculator we have two ways.
In the classic ol mo els it is like RPN an we o
33 sin
but in some mo ern mo els (which typically allow you to e it entere ata using cursors) we o
sin 33 =

So algebraic calculators are ambiguous because the many ways they work. RPN calculators are
more stan ar an so less ambiguous.
The main key to un erstan how to use RPN in more complex calculus is to realize that in RPN we
make calculations from “insi e” to “outsi e” instea of from left to right.
Example:
8 x ln[5+sin(40)] in RPN is oing by
40 sin 5 + ln 8 x
In RPN we can make any calculation we o in algebraic evices an this is not only more elegant
but also more effective since there are less ambiguity's an we use less key strokes.
For example, my HP-33S, which is both algebraic an RPN, is always in RPN mo e. (Just to insert
equations I think algebraic mo e is better)
For more information on RPN, please see http://www.hpmuseum.org/rpn.htm
2.2 Turn ON/OFF
To turn your HP-42 on press ON. The ON key is the same EXIT key.
To turn your HP-42S off press ▀ OFF. OFF is in the same key of EXIT an ON, an by ▀ OFF we
mean you have to press the orange key before press the EXIT key which have OFF in orange above.
The orange ▀ key is what in some other calculators is calle “secon function”. When you press this
all keys turn in what is written in orange above it.
Actually ▀ OFF is a re un ancy since OFF can be only accesse by pressing ▀ first. But (as in HP-
42S official manual) we will o this just to remember when we have to press ▀ or not. If you press
this key a secon time all keys go back to the normal function.
2.3 Setting the display contrast
HP-42S, as most HP calculators, can set the isplay contrast by pressing at the same time ON an +
or -.
2.4 Training RPN using HP-42S
Now that you have your 42S on try to o the following calculations:
1) 6x(4+3).
Answer
4 ENTER 3 + 6 x
2) 2+{2x[2+(2/2)]}
Answer
2 ENTER 2 / 2 + 2 x 2 +

IMPORTANT: For sake of simplicity sometimes we will use / instea of ÷.
2.5 Menus
Not all functions of HP-42S are visible above the keys. It has menus with much more functions. The
menus are
ALPHA, MODES, DISP, CLEAR, SOLVER, ∫f( ), MATRIX, STAT, BASE, CONVERT,
FLAGS, PROB, CUSTOM, PGM. FCN, PRINT, TOP.FCN an CATALOG.
2.6 DISP Menu
The DISP menu is the first menu we have to see. It is above E key. So start by pressing ▀ DISP.
When you o this the DISP menu appears in the first line with the following functions.
FIX, SCI, ENG, ALL, RDX., RDX,
These functions appears just above ∑+, 1/x,√x, LOG, LN an XEQ. Now with DISP menu active
those keys on't represent their original functions but those of DISP menu. The same happens with
all menus.
2.6.1 The FIX function.
The FIX “function” is not a function in the mathematical sense, but a calculator function. By using
FIX function the isplay becomes with a fixe number of igits after ecimal point.
Ok, press FIX. (I mean ∑+ with DISP menu active)
When you o this what appears is
FIX _ _
Then you have to enter a number up to 11. Example
FIX 0 4 set calculator to have 4 igits of precision after the ecimal point. A number like π will
appear as
3.1416
an √2 will appear as 1.4142.
(You can verify this by oing ▀ π an 2 √x respectively)
If you put FIX 0 9 than those numbers will appear as
3.141592654
an
1.414213562.
It is important to say that this is not the actual precision the calculator will have but just the isplay
precision. To see all calculator precision you have to press ALL in DISP menu (above LOG key).
By oing so those numbers will appear as
3.14159265359
an

1.41421356237
As you can see the numbers are not truncate but roun e .
Not all numbers can be seem with a fixe ecimal precision. If you put 4 igits for fixe precision
the number π will appear as 3.1416 but if one calculate
108
( o this by oing 8 ▀
10x
) what
you are going to see is 100,000,000.000 with 3 ecimal igits. This happens because the calculator
cannot show more than 12 igits at a same line.
2.6.2 The ALL function
We alrea y talke about ALL function. It makes the calculator to show all of its precision.
2.6.3 The SCI function
The SCI function works just like FIX one but puts the calculator in “scientific” mo e. The numbers
will be shown as a ecimal number between 0 an 1 times a power of 10.
For example 1000 will be represente as 1.00E3 with you put the calculator in scientific mo e with
2 igits. 1.00E3 means 1.00x
103
. The π number will appear as 3.14E0.
Actually even when in FIX mo e the calculator will turn in scientific notation to give some answers.
For example if you calculate 1.0001-1 with FIX 3 you are not going to get 0.000 but 1.000E-4. This
means that the calculator is “smart” an show the result in the best way as possible.
Exercise. Show that 1.0001-1 gives 1.000E-4 in FIX 3 mo e.
Answer:
First we put the calculator in FIX 3 mo e by oing ▀ DISP FIX 0 3.
Then we o 1 . 0 0 0 1 ENTER 1 – an we get the answer.
As you can see when you are in FIX mo e a sign ■ appears on the right si e of FIX name in the
DISP menu. This means FIX mo e is active. The same happens with SCI, ALL, etc.
It is out of our scope to give a full escription of scientific notation. In case of nee please report to
a first book of physics for high school or college.
2.6.4 The ENG function
The ENG function puts the calculator in engineering notation. It looks like scientific notation but
now the first number oes not nee to be between 0 an 1 but can be between 0 an 1000 an the
power will be always 3 manifol .
Example: 100 will be represente by 100.E0 in ENG 2 mo e while 1000 will be 1.00E3 in the same
mo e. Why o we get 100.E0 for 100 instea of 100.00E2 in ENG 2 mo e? Because the calculator
shows in engineering mo e the same number of igits it shows in scientific mo e.
2.6.5 RDX. An RDX, functions
In some countries like Brazil we use ',' for ecimal point instea of '.' an also '.' instea of ',' for
1,000 an 1,000,000 etc.
For example π is written here (Brazil) as 3,141 etc an not as 3.141 etc. In FIX 3 mo e one million
is written here as 1.000.000,000 an not as 1,000,000.000 as in English use. By pressing RDX, you

make the calculator to use ',' for ecimal point an by pressing RDX. we make it use '.' for ecimal
point. Again the active mo e is followe by a ■ sing. Here, in this manual, I suppose the calculator
using '.' for ecimal point.
2.6 MODES Menu
To access MODES menu just press ▀ MODES. (MODES is above +/- key).
DEG actives egree mo e for trigonometric functions. In this mo e a circumference has 360
egrees. RAD actives ra ian mo e an in this mo e a circumference has 2π ra ians or just 2π.
GRAD is not so useful an correspon to 400 egrains for a circumference.
For example: In egrees we have sin(90°)=1 an in ra ians we have sin(π/2)=1.
Try this: ▀ π 2 / COS in ra ians mo e. Why the result is not exactly zero?
Answer: Because the number that calculator entere was not exactly π but 3.14159265359.
REC actives rectangular mo e (x,y) an POLAR actives polar mo e (r,θ). We will see this more in
etail when stu y complex numbers.
The MODES menu has another line but we will iscuss this later. We will iscuss the others menus
later too.
2.7 The Stack
No calculator can store an infinite amount of ata. In algebraic calculators the “( )” are limite to a
given number epen ing on the mo el. The same happens in RPN calculators. In some mo els like
HP-48 or HP-49 the amount of input ata is limite only by available memory. But in other mo els
like 32SII, 33S (in RPN mo e) an 42S the input ata have to fit in a “stack” of four lines.
There are four lines labele x, y, z an t. (actually the name of the last two is not so important).
So the stack is something like
t:0.0000
z:0.0000
y:0.0000
x:0.0000
But as the calculators isplay has only two lines just x an y lines are visible.
When you enter a number (say 2 ENTER) what happens is the following.
i) The content of lines t an z are lost.
ii) The content of line y goes to line t.
iii)The content of line x goes to line z.
iv)The content just entere goes to line y an line x.
So what you just entere appears twice. So if you o 2 ENTER + you will have 4 as answer.
This is a feature, a ba feature I think, of the HP RPN style of 42S (also in 33S, 12C, etc but not in
HP48 or 49). In my opinion we coul have a simpler RPN style. Anyway there is another way to
enter ata in RPN. It is just type what you want an press the esire function key.
For example, if you o 2 1/x before the 1/x function the calculator makes an automatic enter but in

this case the content just entere appears only once.
So if you o 2 1/x or another example 9 √x what you will have will be
i) Only the content of the line 4 (line t) will be lost.
ii) The content of line 3 (z) goes to line 4 (t).
iii)The content of line y goes to line 3 (z).
iv)The content of line x goes to line y.
v) Your result will be in the first line x.
This secon way to enter ata looks more intuitive to me an I think it shoul be aways like this.
But it is not!:( So to o 2+3 we have to o
2 ENTER 3 + (an not 2 ENTER 3 ENTER +).
(Actually one can also use EXIT to enter a number without uplication)
If you just press ENTER you uplicate what is in line x.
When making a calculation one shoul never forget about the limitation of the 4 lines of the stack.
The lines of the stack cannot contain only numbers but also matrices, complex numbers, etc.
The basic operations with the stack are: x><y an R↓. The first changes line x with line y. The
secon makes the stack rolls own (line y goes to line x, line x goes to line t, line t goes to line z
an line z goes to line y)
In the CLEAR Menu there are some interesting functions: CLST which clears all the stack
(something missing in HP-33S). CLX clears the line x in the same way of pressing ←.
The ← is more use to correct a number when typing it.
Another useful function is ▀ LAST which gives the last calculate result.
2.8 Getting used to some keys of the keyboard
Let's iscuss some basic keys of the calculator. We will start from superior left si e.
Σ+ an ▀ Σ- : These are statistical functions. We will iscuss this later.
1/ an ▀
yx
: 1/x just calculate the inverse of a number which is in line x.
▀
yx
is the potential function. To calculate
53
= 5.5.5 we o
5 ENTER 3 ▀
yx
.
√ an ▀
x2
: These functions just calculate the square root an the square of a number in line x.
When stu ying complex numbers we will see that unlike HP-33S in HP-42S the
number in square root can be negative.
LOG an ▀
10x
: These functions calculate the base 10 logarithms an it's inverse.
These things were important before the era of calculators so there is no reason
to have them in one.

LN an ▀
ex
: These functions calculate the base e=2.71828... logarithm an it's inverse.
Unlike LOG these are very, very important functions!
But what about if we want a logarithm in another base? It woul be nice to have a special key for
this but it is just about remembering that
logxy=logzy/logzx
where z is any other base.
If we take z=e=2.71828... we have
logxy=ln y/ln x
.
Example: Calculate
log28
Answer: 8 LN 2 LN / which give us 3 because
23=8
.
XEQ an ▀ GTO: These are relate to programming an we shall iscuss this later. XEQ will also
be iscusse in ALPHA menu part.
STO an ▀ COMPLEX : These are relate to the memories an complex numbers. We will
iscuss this later.
RCL an ▀ % : RCL is relate to memories an we will iscuss later. ▀ % is the percentage
function. To calculate 10% of 300 we o
300 ENTER 10 ▀ % which gives 30 as answer.
Note that 300 remains in line y, so if you want to calculate 300 plus 10% you o
300 ENTER 10 ▀ % +
R↓ an ▀ π : We alrea y iscuss these. The first rows own the stack an the other returns
π=3.14...
SIN an ▀ ASIN : These are the sinus trigonometric function an its inverse. The angle type is set
up as sai before in MODES menu. The efault is egrees. ASIN is the inverse
usually calle arcsine or sometimes
sin−1
. ( on't confuse with cosec which is
1/sin). It is important to remember that ASIN is not a real function since there is
no single result. For example sin(135°)=sin(45°)=√2/2 but the calculator gives
always ASIN(√2/2)=45°. HP-42S will give a complex number if the input of an
arcsinus is bigger than 1 or smaller than -1.
COS an ▀ ACOS: These are the cosinus trigonometric function an its inverse.
TAN an ▀ ATAN: These are the tangent trigonometric function an its inverse. Not all numbers
can have a result for tangent. For example tan(90°) goes to infinite. The
HP-42S gives a big number instea .
ENTER an ▀ ALPHA: The ENTER key oes not nee any comment. ▀ ALPHA is the alpha-
numeric menu use to enter letters instea of numbers. When you press ▀
ALPHA what appears is

ABCDE FGHI JKLM NOPQ RSTUV WXYZ
These are sub-menus. If you press now ABCDE what you will have is
A B C D E
Then just pick the letter you want. But above you can see this symbol ▼▲.
This symbol means the menu has more than on line. You can access the
other lines by pressing ▲ or ▼. In this case there is just one more line with
Ă, Å an Æ. If you press FGHI you will have F G H I, etc.
Among all calculators I know this is in my opinion the best way to enter
letters!
The main ALPHA menu also have ▼▲ symbol. The other line has the
following submenus.
([{ ←↑↓ <=> MATH PUNC MISC, much more than one will ever
nee ! If you are insi e a submenu an want to go back to main menu just
press EXIT.
Why is alpha menu useful? Of course it is useful to label programs, ata
in memory but it is also useful to enter comman s using XEQ key! For
example XEQ “SIN” is the same of pressing SIN key. The “” are calle
automatically when pressing ▀ ALPHA an ENTER. XEQ “SINH”
calculates the hyperbolic sinus while XEQ “OFF” turns the calculator off.
Finally we must say that ▀ ALPHA is not always nee e ! In some cases
like XEQ, GTO (we will see this later) a simple ENTER will o.
><y an ▀ LAST : We alrea y talke about.
+/-: This just change the sign of a number.
E an ▀ DISP: We alrea y talke about DISP menu but what woul be E? The E is the character
meaning the power of 10 in scientific notation. For example, to enter 5.2x
1022
we
o 5 . 2 E 22 ENTER.
← an ▀ CLEAR: As sai before ← clears line x an if you are entering a number you can elete
the last character. We alrea y talke a little about CLEAR menu an we will
iscuss it again later.
▲ or ▼: As sai before we use this to change the line in a multi line menu. We will see ▀ BST an
▀ SST later.
The keys from 0 to 9 have obvious functions.
. an ▀ SHOW: The '.' is just the ecimal point an ▀ SHOW is use to show a number for an
instant with all precision. For example: If you have π in the first line an you are
using the isplay in FIX 4 you have 3.1416 but pressing ▀ SHOW you will see
3.14159265359 for an instant.
We stop stu ying the keyboar here for now.

3 Memory
The real HP-42S has about 7200 bytes of memory while Free42 can have much more epen ing on
the available memory in the computer/han hel .
In fact, 7200 bytes is a lot of memory for HP-42S! A program of 10 lines uses about 15 bytes of
memory. This means that while in some other mo els like HP-20S you woul be able to program
just 99 lines with 42S you woul be able to create programs with thousan s of lines!
This available memory is share with everything inclu ing programs, variables, etc.
Let's start from the basic. To store a number which is in line x of the stack we use STO function.
The HP-42S has by efault 25 positions in the memory from R00 to R24. To store the number π in R10
is just o the following
▀ π STO 10
To get it back it is just o this
RCL 1 0
If you want to make an operation you can use STO+, STO-, STOx, STO÷.
For example, 6 STO- 0 5 subtracts 6 from the number in R05.
2 STO ÷ 1 0 ivi es the number in R10 by 2.
You can also use RCL+. RCL-, RCLx, RCL÷, but it is not so fun. This gives the result of the
calculation but oes not change the number in the memory.
If 25 positions in the memory is not enough for you, you can change this number by using SIZE
function (which is in the secon line of MODES menu).
For example ▀ MODES ▼ SIZE 0 1 0 0 changes to have 100 positions, from R00 to R99.
Despite it is possible I suggest you to not use more than 100 positions. These positions are store in
a normal matrix calle REGS.
(We, the poor owners of HP-33S for example, just have 26 memory positions, from A to Z)
But this kin of memory position only accept real numbers! What about if you want to store other
things? Matrices, complex numbers of even other real numbers?
To o this HP-42S has an arbitrary number of positions limite only by the memory available which
uses letters to label instea of numbers.
We ha store the π number in R10 but we can create a variable calle for example “PI” to store it.
It is just to o
▀ π ENTER STO ▀ ALPHA “PI” ENTER.

Actually is not just PI you type but NOPQ P FGHI I but we wrote that for simplicity.
Now to get this number back it is just type RCL “PI”. When you type RCL the “PI” shoul appear
to you select it.
You can also use STO+, STO-, STOx an STO÷ even in this case since the types of the things you
are operating are the same.
We can eal with the four lines of the stack as we eal with the memory positions. In this case the
lines of the stack are calle ST X, ST Y, ST Z an ST T respectively. To access this we press '.'
before the name of the line. For example:
5 STO . ST X puts 5 in line x of the stack while 5 STO . ST X STO . ST Y is a very extravagant
way to enter 5 twice.
As the content of the stack can change easily I on't think “STO .” is a goo thing. But I cannot say
the same of “RCL .” which may be very useful to get the content especially of lines z an t. You can
also use STO an RCL with +, -, x an ÷ an '.' to work with the content of the lines of the stack.
For example:
5 STO ÷ . ST Z ivi es line z by 5.
3.1 The ▀ CATALOG menu.
The ▀ CATALOG menu has the following submenus:
FCN, PGM, REAL, CPX, MAT, MEM
FCN: It shows all the functions available in HP-42S calculator. It has many lines an one must use
the ▼ an ▲ to navigate through the lines. Here you are going to fin important functions we on't
see in the keyboar inclu ing hyperbolic functions (SINH, COSH, etc), functions to work with
integer an real numbers like IP (integer part) an FP (fraction part), programming functions, etc.
Don't forget you can also use XEQ “function name”.
PGM: It shows all variables with programs in the memory.
REAL: It shows all variables with real numbers in the memory. (But oes not show numbers in R00 ,
etc)
CPX: It shows all variables with complex numbers.
MAT: It shows all variables with matrices. The REGS matrix always appears. It contains the
numeric memories R00, R01, etc.
MEM: It shows all available memory.
3.2 More on the ▀ CLEAR menu
We alrea y saw some of the CLEAR menu functions, but there are also:
CLV: Clears variables we ha store using STO “name”.
CLRG: Clears the R00, R01, etc, memories known as registers.
In the secon line
CLLCD: Clears the LCD isplay (may be useful when plotting)
CLALL: Clears all the memory of the calculator.

3.3 The ▀ CUSTOM menu
This is not relate to memory but as we saw the FCN function in the CATALOG menu we are
alrea y able to talk about it.
The HP-42S calculator has a lot of functions. An it is not a goo i ea to fin the function you want
every time in the FCN or to use every time XEQ “function name”. To solve this problem HP-42S
has the CUSTOM menu which can contain function you personally select.
To o this we use ▀ ASSIGN. When you call this you can select a function from FCN an also
some other things. We are intereste in functions so press FCN. Now you fin the function you
want an then you press the position you want it appears in the CUSTOM menu.
Example: Let's put ABS (absolute value) in the first position of CUSTOM menu.
▀ ASSIGN FCN ABS
In the isplay you are going to see:
ASSIGN “ABS” TO _
Then you pick a position, for example if you have ▄ ▄ ▄ ▄ ▄ ▄ an you press the first ▄ your
CUSTOM menu will become ABS ▄ ▄ ▄ ▄ ▄.
As you can see the CUSTOM menu has also the ▼▲ symbol which means there are more than one
line. There are three lines you can use when calling ASSIGN function which means 18 available
positions.
(I woul like to use this space to make a complain.:) There are some HP mo els with more than
2000 functions! Many functions oes not mean always power but always mean complexity!)

4 Probability
Probability functions are in ▀ PROB menu (over x key).
They are COMB, PERM, N!, GAM, RAN an SEED.
COMB: This calculates the number of combinations of N things taken r at a time. The or er oes
not matter. A thing cannot appear more than one time.
Example: If we have the five letters a, e, i, o an u the possible combinations taken one at a time are
{a,e,i,o,u}. This means 5 combinations.
Taken two at a time
{ae, ai, ao, au, ei, eo, eu, io, iu, ou}. This means 10 combinations.
Taken four at a time
{aeio, aeiu, aeou, aiou, eiou}. This means also 10 combinations.
The number of combinations is given by
CN , r = N !
r !N−r!
(Where N!=N.(N-1).(N-2)...2.1)
To calculate this using 42S just enter N, press ENTER, enter r an press COMB.
PERM: This calculates the number of arrangements of N things taken r at a time. A thing cannot
appear more than one time but now the or er matters.
Example: Five cars are in a race. Their colors are re , blue, green, white an cyan. What are the
possible results?
Solution: For the first position we have five possibilities. For the secon position we have four
possibilities, an three possibilities for the thir position. So we have 5x4x3=60 ifferent
arrangements. To see this using 42S just enter 5, press ENTER, enter 3 an press PERM.
It is simple to realize that the number of arrangements is given by
AN , r =N.N−1...N−r1= N !
N−r!
In particular if r=N (all the things are taken) then the arrangements are calle permutations an the
number of permutation is N!.
Example: In how many ways we can re-arrange the letters of the wor “love”.
Solution: 4!=24.
N!: This just calculates the factorial of N given by N!=N.(N-1)...1 for a number (non-negative
integer). The biggest number allowe is HP-42S is 253 an in Free42 is 170.
GAM: This is the Gamma function which is efine by
Γa=∫0
∞xa−1e−xdx

For a integer number we have Γ(n)=(n-1)! an Γ(n+1)=n!. The number in gamma function must be
real.
In this point HP-42S is ifferent from 33S which has only one function for both things.
RAN: This is the random number generator which gives a pseu o-ran om number in 0≤x≤1.
SEED: A sequence of pseu o-ran om numbers always starts with a see . If you repeat the see the
sequence repeats. To enter a new see just enter a number an press SEED.
If the see is zero the calculator will generate another see .

5 Comple Numbers
5.1 Comple numbers in rectangular coordinates.
Unlike the HP-33S (an its ancestor HP-32SII) complex numbers are straight supporte an use in
HP-42S.
There is almost nothing special to say. Just enter -1 an press √x, what are you going to have is
x: 0.0000 i1.0000
which means i.
(Just to you have an i ea to o the same in HP-33S we have to o
0 ENTER 1 +/- ENTER 0 ENTER .5 CMPLX
yx
an we will have 0 an 1 meaning i)
Despite it is possible we on't nee to calculate the square root of -1 every time, to have i.
We can use ▀ COMPLEX function which take line y an line x of the stack an creates a complex
number y+ix.
Again unlike HP-33S almost all functions of HP-42S fully support complex numbers.
Example: Show that
i2
is -1.
Solution:
0 ENTER 1 ▀ COMPLEX ▀
x2
which gives -1.0000 i0.0000 (means -1).
5.2 Comple numbers in polar coordinates
When representing a point in
2
we can use any kin of coor inate system. The most more use
are the rectangular (or Cartesian system) which use the usual coor inates x an y an the polar
system which use the coor inates r an θ.
The relationship between them is
x= r cos θ, y= r sin θ an
r2=x2y2
, tan θ=y/x.
When ealing with complex numbers we can think is real axis as being the x an the imaginary axis
as being y an then we can use also polar coor inates.
In this case i will be r=1 an θ=π/2 (90°).
To change between rectangular or polar mo es use RECT an POLAR in ▀ MODES menu.

6 Programming
Programming in HP-42 is very simple. It oes not use RPL style of HP-48 or HP-49. You program
in the same way you use the calculator an unlike some non hp cheaper calculators all the steps are
shown in the isplay an in numbere lines.
6.1 Basic programming.
Let's imagine you want to make a given calculation. For example: Suppose you want to solve a
equation
x2−5x4=0
which is of the form:
ax2bxc=0
.
As you know the solution for this kin of equation is
x=−b ±
∆
2a
where ∆ =
b2−4ac
.
Let's suppose a, b an c are in R00, R01 an R02 respectively an we are going to use R03 for ∆.
To solve this equation using HP-42S/Free42 we just o
RCL 01 (This is b)
x2
4
RCL 00 (This is a)
RCL 02 (This is c, keep in min we have only four lines in the stack)
x
x
-
STO 03 (This is ∆)
Unlike some other mo els, say 33S, we on't nee to worry with ∆ is negative. But we let the square
root for late because in R03 the number cannot be complex. (Otherwise we woul nee to store it's
root in a normal memory)
Now we calculate the first root
RCL 01
+/-
RCL 03
x
-
2
RCL 00
x
÷
An the secon root is given by
RCL 01
+/-
RCL 03
x
+
2

RCL 00
x
÷
So what about if you have to solve more 100 of this kin of equation? Only changing the a, b an c
values? It woul be better to save all the steps in the calculator's memory an let it o the
calculations for you. This is what calculators programming is about.
To enter in the program mo e you must o ▀ PRGM (above R/S key).
If the memory has no program you are going to see:
00►{ 0-Byte PRGM}
01 .END.
(If there is a program we can erase it by oing ▀ CLEAR CLP before entering in program mo e)
Now just enter the first sequence starting in RCL 01
x2
, etc.
Every comman will take a line an in the en you will have
08 -
09►STO 03
This means that this part of the program takes 9 lines. You can move through the program lines by
using the ▲▼ cursors (which, of course, cannot be programme ). Two important things to say here
are: 1-The functions are not always shown in the calculators isplay as we know them. For example
the
x2
function is showe as X↑2. 2-We on't nee to press ENTER after a number, unless
between two numbers.
Now let's enter the secon part of the program which gives to us the first root. (if you use the
cursors you must go back where you stoppe ). After oing so we have
17 x
18►÷
Again in the isplay the functions are not exactly as we know an
x
appears as SQRT.
Unless we store the result in a memory we must fin a way to stop the program to see the result.
This is oing by the function STOP which is entere by pressing R/S. (R/S means “run an stop”)
So after this we have
18 ÷
19►STOP
Finally we enter the last part of the program an after this we have
27 x
28►÷
If you move using the cursors you will fin .END. in line 29 (which is the en of the program) an
in line zero we fin 00►{ 31-Byte PRGM }. Almost 1 byte per line of program.
As we sai the HP-42S has about 7200 bytes of memory. Not ba ! Just for comparison HP-32S ha
390 bytes an spen about 1.5bytes per line, HP-20S ha only 99 lines/steps an HP-9G has 400
steps while HP-33S has 31KB (but har ly can take a vantage of this ue to 26 memories/labels
limitation, which is the same of 32S, an it spen s about 3bytes per line).
After entere the program just press EXIT. Now enter the numbers a, b an c of the equation. For
example for the equation
x2−5x4=0
we enter

1 STO 00
5 +/- STO 01
4 STO 02
Now we just press R/S (to run the program) an we get 1, an pressing it again we have 4.
6.2 More than one program in the memory.
If we want to have more than one program in the memory we can use more than one program space.
To create another program space just press ▀ GTO ..
The ▀ GTO comman can be use in two ifferent situations:
i) You are not in the programming mo e.
-In this case you can use ▀ GTO .. to create another empty program space, but this happens only
if the current mo e is not alrea y empty.
-You can use ▀ GTO “label”. (We will see this below)
-You can also use ▀ GTO followe by “END” or “.END.” etc to move among program spaces.
(In this case I must a mit 33S is better because the lack of this complication)
-An after chosen a program space you can use ▀ GTO ._ _ _ _ where in the “_”'s you put the
number of the line you want to go.
ii) You are in programming mo e.
-In this case you cannot change the program space.
-You can use ▀ GTO ._ _ _ _ to move to a line. (This will happen an it is not programme )
-You can use ▀ GTO “label” (This will be programme an will make the program to jump to
that label)
But what is a label? A label is a name we give to a position in the program using the LBL comman
which is available in ▀ PGN.FCN (it means “program functions”) menu.
To create a label you must be in the programing mo e (▀ PRGM) an then just press LBL an then
enter a name (1 to 7 letters). If you use only one letter you are not going to have the “” an the label
won't appear automatically when you press XEQ which is goo for local labels.
(Just for comparison, in 33S the label is just one letter)
Example: In the programing mo e ▀ PGN.FCN LBL A A A creates a label “AAA” which appears
as LBL “AAA” in program. So when the program is running an it foun GTO “AAA”, for
example, it will jump to the line which has LBL “AAA” instructions.
(Please note we on't nee to press ▀ ALPHA to access the A, B, C, etc in this case)
Example of a program
01 LBL “AA”
02 GTO “AA”
03 .END. (you on't enter this)
This program oes nothing. It just run until you press EXIT. By the way, to run it you can use R/S
when the calculator's “pointer” is over the program or you can use XEQ “label”. In the present case
you woul use XEQ “AA”.
The XEQ function calls a program (which must have a label) an runs it. You can use XEQ
function both in programing mo e an also out of programing mo e.
Other manuals for HP-42S
1
This manual suits for next models
1
Table of contents
Other HP Calculator manuals