hp 33s scientific calculator
user's guide
H
HP part number F2216-90001
Edition 3
Contents
Part 1. Basic Operation
1. Getting Started
Important Preliminaries.......................................................1–1
Turning the Calculator On and Off.................................1–1
Adjusting Display Contrast............................................1–1
Highlights of the Keyboard and Display ...............................1–2
Shifted Keys................................................................1–2
Alpha Keys.................................................................1–3
Cursor Keys ................................................................1–3
Silver Paint Keys ..........................................................1–4
Backspacing and Clearing............................................1–4
Using Menus..............................................................1–7
Exiting Menus.............................................................1–9
RPN and ALG Keys ...................................................1–10
The Display and Annunciators.....................................1–11
Keying in Numbers..........................................................1–14
Making Numbers Negative ........................................1–14
Exponents of Ten .......................................................1–14
Understanding Digit Entry...........................................1–15
Range of Numbers and OVERFLOW ............................1–16
Doing Arithmetic.............................................................1–16
One–Number Functions..............................................1–17
Two–Number Functions ..............................................1–17
Controlling the Display Format ..........................................1–18
Contents
1
Periods and Commas in Numbers................................ 1–18
Number of Decimal Places ......................................... 1–19
SHOWing Full 12–Digit Precision................................ 1–20
Fractions........................................................................ 1–21
Entering Fractions...................................................... 1–21
Displaying Fractions .................................................. 1–23
Messages...................................................................... 1–23
Calculator Memory......................................................... 1–24
Checking Available Memory ...................................... 1–24
Clearing All of Memory ............................................. 1–24
2. RPN: The Automatic Memory Stack
What the Stack Is ............................................................. 2–1
The X and Y–Registers are in the Display........................ 2–2
Clearing the X–Register................................................ 2–2
Reviewing the Stack..................................................... 2–3
Exchanging the X– and Y–Registers in the Stack .............. 2–4
Arithmetic – How the Stack Does It...................................... 2–4
How ENTER Works ..................................................... 2–5
How CLEAR x Works................................................... 2–6
The LAST X Register ........................................................... 2–7
Correcting Mistakes with LAST X.................................... 2–8
Reusing Numbers with LAST X....................................... 2–9
Chain Calculations in RPN mode ...................................... 2–11
Work from the Parentheses Out................................... 2–11
Exercises.................................................................. 2–13
Order of Calculation ................................................. 2–13
More Exercises ......................................................... 2–14
2
Contents
3. Storing Data into Variables
Storing and Recalling Numbers...........................................3–2
Viewing a Variable without Recalling It.................................3–3
Reviewing Variables in the VAR Catalog...............................3–3
Clearing Variables ............................................................3–4
Arithmetic with Stored Variables ..........................................3–4
Storage Arithmetic.......................................................3–4
Recall Arithmetic .........................................................3–5
Exchanging x with Any Variable..........................................3–6
The Variable "i"................................................................3–7
4. Real–Number Functions
Exponential and Logarithmic Functions .................................4–1
Quotient and Remainder of Division.....................................4–2
Power Functions ................................................................4–2
Trigonometry ....................................................................4–3
Entering π ..................................................................4–3
Setting the Angular Mode.............................................4–4
Trigonometric Functions ................................................4–4
Hyperbolic Functions..........................................................4–6
Percentage Functions..........................................................4–6
Physics Constants ..............................................................4–8
Conversion Functions .........................................................4–9
Coordinate Conversions .............................................4–10
Time Conversions ......................................................4–12
Angle Conversions.....................................................4–13
Unit Conversions .......................................................4–13
Probability Functions........................................................4–14
Contents
3
Factorial .................................................................. 4–14
Gamma................................................................... 4–14
Probability ............................................................... 4–14
Parts of Numbers............................................................ 4–16
Names of Functions......................................................... 4–17
5. Fractions
Entering Fractions ............................................................. 5–1
Fractions in the Display...................................................... 5–2
Display Rules.............................................................. 5–2
Accuracy Indicators..................................................... 5–3
Longer Fractions.......................................................... 5–4
Changing the Fraction Display............................................ 5–4
Setting the Maximum Denominator................................ 5–5
Choosing a Fraction Format.......................................... 5–5
Examples of Fraction Displays....................................... 5–6
Rounding Fractions............................................................ 5–7
Fractions in Equations........................................................ 5–8
Fractions in Programs ........................................................ 5–9
6. Entering and Evaluating Equations
How You Can Use Equations.............................................. 6–1
Summary of Equation Operations........................................ 6–3
Entering Equations into the Equation List ............................... 6–4
Variables in Equations ................................................. 6–4
Numbers in Equations ................................................. 6–5
Functions in Equations.................................................. 6–5
Parentheses in Equations .............................................. 6–6
Displaying and Selecting Equations..................................... 6–6
4
Contents
Editing and Clearing Equations...........................................6–7
Types of Equations.............................................................6–9
Evaluating Equations..........................................................6–9
Using ENTER for Evaluation ........................................6–11
Using XEQ for Evaluation ...........................................6–12
Responding to Equation Prompts..................................6–12
The Syntax of Equations ...................................................6–13
Operator Precedence.................................................6–13
Equation Functions.....................................................6–15
Syntax Errors ............................................................6–18
Verifying Equations..........................................................6–18
7. Solving Equations
Solving an Equation...........................................................7–1
Understanding and Controlling SOLVE .................................7–5
Verifying the Result ......................................................7–6
Interrupting a SOLVE Calculation ...................................7–7
Choosing Initial Guesses for SOLVE................................7–7
For More Information.......................................................7–11
8. Integrating Equations
Integrating Equations ( ³ FN)...............................................8–2
Accuracy of Integration......................................................8–5
Specifying Accuracy ....................................................8–6
Interpreting Accuracy...................................................8–6
For More Information.........................................................8–8
9. Operations with Complex Numbers
The Complex Stack............................................................9–1
Complex Operations .........................................................9–2
Contents
5
Using Complex Numbers in Polar Notation........................... 9–5
10. Base Conversions and Arithmetic
Arithmetic in Bases 2, 8, and 16....................................... 10–2
The Representation of Numbers......................................... 10–4
Negative Numbers.................................................... 10–4
Range of Numbers.................................................... 10–5
Windows for Long Binary Numbers............................. 10–6
11. Statistical Operations
Entering Statistical Data................................................... 11–1
Entering One–Variable Data....................................... 11–2
Entering Two–Variable Data........................................ 11–2
Correcting Errors in Data Entry.................................... 11–2
Statistical Calculations..................................................... 11–4
Mean...................................................................... 11–4
Sample Standard Deviation ........................................ 11–6
Population Standard Deviation.................................... 11–6
Linear Regression...................................................... 11–7
Limitations on Precision of Data......................................... 11–9
Summation Values and the Statistics Registers ................... 11–10
Summation Statistics................................................ 11–10
The Statistics Registers in Calculator Memory .............. 11–11
Access to the Statistics Registers ................................ 11–11
Part 2. Programming
12. Simple Programming
Designing a Program ...................................................... 12–3
6
Contents
Selecting a Mode......................................................12–3
Program Boundaries (LBL and RTN) ..............................12–3
Using RPN, ALG and Equations in Programs..................12–4
Data Input and Output ...............................................12–4
Entering a Program..........................................................12–5
Keys That Clear.........................................................12–6
Function Names in Programs.......................................12–7
Running a Program..........................................................12–9
Executing a Program (XEQ).........................................12–9
Testing a Program......................................................12–9
Entering and Displaying Data .........................................12–11
Using INPUT for Entering Data ..................................12–11
Using VIEW for Displaying Data................................12–13
Using Equations to Display Messages.........................12–14
Displaying Information without Stopping .....................12–16
Stopping or Interrupting a Program..................................12–17
Programming a Stop or Pause (STOP, PSE)...................12–17
Interrupting a Running Program .................................12–17
Error Stops .............................................................12–17
Editing a Program .........................................................12–18
Program Memory..........................................................12–19
Viewing Program Memory ........................................12–19
Memory Usage.......................................................12–20
The Catalog of Programs (MEM)................................12–20
Clearing One or More Programs ...............................12–20
The Checksum.........................................................12–21
Nonprogrammable Functions..........................................12–22
Programming with BASE.................................................12–22
Contents
7
Selecting a Base Mode in a Program......................... 12–22
Numbers Entered in Program Lines ............................ 12–23
Polynomial Expressions and Horner's Method ................... 12–23
13. Programming Techniques
Routines in Programs....................................................... 13–1
Calling Subroutines (XEQ, RTN) .................................. 13–2
Nested Subroutines ................................................... 13–3
Branching (GTO) ............................................................ 13–4
A Programmed GTO Instruction................................... 13–5
Using GTO from the Keyboard.................................... 13–5
Conditional Instructions.................................................... 13–6
Tests of Comparison (x?y, x?0) ................................... 13–7
Flags....................................................................... 13–8
Loops.......................................................................... 13–16
Conditional Loops (GTO).......................................... 13–17
Loops with Counters (DSE, ISG)................................. 13–18
Indirectly Addressing Variables and Labels ....................... 13–20
The Variable "i"...................................................... 13–20
The Indirect Address, (i) ........................................... 13–21
Program Control with (i)........................................... 13–22
Equations with (i) .................................................... 13–24
14. Solving and Integrating Programs
Solving a Program .......................................................... 14–1
Using SOLVE in a Program............................................... 14–6
Integrating a Program...................................................... 14–7
Using Integration in a Program ......................................... 14–9
Restrictions on Solving and Integrating ............................. 14–11
8
Contents
15. Mathematics Programs
Vector Operations...........................................................15–1
Solutions of Simultaneous Equations.................................15–12
Polynomial Root Finder...................................................15–20
Coordinate Transformations ............................................15–32
16. Statistics Programs
Curve Fitting...................................................................16–1
Normal and Inverse–Normal Distributions.........................16–11
Grouped Standard Deviation ..........................................16–17
17. Miscellaneous Programs and Equations
Time Value of Money.......................................................17–1
Prime Number Generator.................................................17–6
Part 3. Appendixes and Reference
A. Support, Batteries, and Service
Calculator Support ........................................................... A–1
Answers to Common Questions .................................... A–1
Environmental Limits.......................................................... A–2
Changing the Batteries...................................................... A–2
Testing Calculator Operation ............................................. A–4
The Self–Test.................................................................... A–5
Warranty........................................................................ A–6
Service........................................................................... A–7
Regulatory Information...................................................... A–9
B. User Memory and the Stack
Managing Calculator Memory............................................B–1
Contents
9
Resetting the Calculator ..................................................... B–2
Clearing Memory ............................................................. B–3
The Status of Stack Lift ....................................................... B–4
Disabling Operations .................................................. B–4
Neutral Operations ..................................................... B–4
The Status of the LAST X Register......................................... B–6
C. ALG: Summary
About ALG ......................................................................C–1
Doing Two–number Arithmetic in ALG..................................C–2
Simple Arithmetic........................................................C–2
Power Functions..........................................................C–2
Percentage Calculations...............................................C–3
Permutations and Combinations ....................................C–4
Quotient and Remainder Of Division..............................C–4
Parentheses Calculations....................................................C–5
Chain Calculations ...........................................................C–5
Reviewing the Stack ..........................................................C–6
Coordinate Conversions.....................................................C–7
Integrating an Equation .....................................................C–8
Operations with Complex Numbers.....................................C–9
Arithmetic in Bases 2, 8, and 16.......................................C–11
Entering Statistical Two–Variable Data ...............................C–12
D. More about Solving
How SOLVE Finds a Root ...................................................D–1
Interpreting Results ............................................................D–3
When SOLVE Cannot Find a Root .......................................D–8
Round–Off Error ............................................................. D–13
10
Contents
Underflow......................................................................D–14
E. More about Integration
How the Integral Is Evaluated..............................................E–1
Conditions That Could Cause Incorrect Results.......................E–2
Conditions That Prolong Calculation Time .............................E–7
F. Messages
G. Operation Index
Index
Contents
11
Part 1
Basic Operation
1
Getting Started
Watch for this symbol in the margin. It identifies
examples or keystrokes that are shown in RPN
mode and must be performed differently in ALG
mode.
v
Appendix C explains how to use your calculator in ALG mode.
Important Preliminaries
Turning the Calculator On and Off
To turn the calculator on, press . ON is printed below the key.
To turn the calculator off, press | . That is, press and release the | shift
key, then press (which has OFF printed in purple above it). Since the
calculator has Continuous Memory, turning it off does not affect any information
you've stored.
To conserve energy, the calculator turns itself off after 10 minutes of no use. If you
see the low–power indicator ( ¥ ) in the display, replace the batteries as soon as
possible. See appendix A for instructions.
Adjusting Display Contrast
Display contrast depends on lighting, viewing angle, and the contrast setting. To
increase or decrease the contrast, hold down the key and press or ꢀ.
Getting Started 1–1
Highlights of the Keyboard and Display
Shifted Keys
Each key has three functions: one printed on its face, a left–shifted function
(Green), and a right–shifted function (Purple). The shifted function names are
printed in green and purple above each key. Press the appropriate shift key ({
or |) before pressing the key for the desired function. For example, to turn the
calculator off, press and release the | shift key, then press .
1–2
Getting Started
Pressing { or | turns on the corresponding ¡ or ¢ annunciator symbol at
the top of the display. The annunciator remains on until you press the next key. To
cancel a shift key (and turn off its annunciator), press the same shift key again.
Alpha Keys
Right-shifted
function
Left-shifted
function
Letter for
alphabetic key
G
Most keys have a letter written next to them, as shown above. Whenever you
need to type a letter (for example, a variable or a program label), the A..Z
annunciator appears in the display, indicating that the alpha keys are
"active”.
Variables are covered in chapter 3; labels are covered in chapter 12.
Cursor Keys
Note that the cursor key itself is not actually marked with arrows. To make the
explanations in this manual as easy to understand as possible, we will refer to
specific cursor keys as noted in the illustration below.
Getting Started 1–3
Silver Paint Keys
Those eight silver paint keys have their specific pressure points marked in blue
position in the illustration below.
To use those keys, make sure to press down the corresponding position for the
desired function.
Backspacing and Clearing
One of the first things you need to know is how to clear: how to correct numbers,
clear the display, or start over.
1–4
Getting Started
Keys for Clearing
Description
Key
Backspace.
b
ꢀ
Keyboard–entry mode:
Erases the character immediately to the left of "_" (the
digit–entry cursor) or backs out of the current menu. (Menus
are described in "Using Menus" on page 1–7.) If the
number is completed (no cursor), b clears the entire
number.
ꢀ
Equation–entry mode:
Erases the character immediately to the left of " " (the
¾
equation–entry cursor). If a number entry in your equation
is complete, b erases the entire number. If the number is
not complete, b erases the character immediately to the
left of "_" (the number–entry cursor). "_" changes back to
" " when number entry is complete.
¾
b also clears error messages, and deletes the current
program line during program entry.
Clear or Cancel.
Clears the displayed number to zero or cancels the current
situation (such as a menu, a message, a prompt, a catalog, or
Equation–entry or Program–entry mode).
Getting Started 1–5
Keys for Clearing (continued)
Description
Key
The CLEAR menu ({ } {
Contains options for clearing x (the number in the X–register), all
variables, all of memory, or all statistical data.
} {
} { })
º
#ꢀꢁ ꢀꢂꢂ
´
{c
If you select {
}, a new menu (
{ } { }) is
ꢀꢂꢂ
ꢃꢂꢁ ꢀꢂꢂ@ &
ꢄ
displayed so you can verify your decision before erasing
everything in memory.
During program entry, {
} is replaced by {
}. If you select
ꢀꢂꢂ
ꢅꢆꢇ
{
}, a new menu (
{ } { } ) is displayed, so you
ꢅꢆꢇ
ꢃꢂꢁ ꢅꢆꢇ @ &
ꢄ
can verify your decision before erasing all your programs.
During equation entry (either keyboard equations or equations in
program lines), the
{ } { } menu is displayed, so you
ꢃꢂꢁ ꢈꢉꢄ@ &
ꢄ
can verify your decision before erasing the equation.
If you are viewing a completed equation, the equation is deleted
with no verification.
1–6
Getting Started
Using Menus
There is a lot more power to the HP 33s than what you see on the keyboard. This is
because 14 of the keys are menu keys. There are 14 menus in all, which provide
many more functions, or more options for more functions.
HP 33s Menus
Menu
Name
Menu
Description
Chapter
Numeric Functions
L.R.
ˆ ˆ
11
11
T P E
º ¸
Linear regression: curve fitting and linear estimation.
y
,
x
º ¸ º·
Arithmetic mean of statistical x– and y–values;
weighted mean of statistical x–values.
s,σ
σ
σ
11
Uº U¸
º
¸ꢊ
Sample standard deviation, population standard
deviation.
CONST
SUMS
BASE
Functions to use 40 physics constants—refer to
4
" Physics constants" on page 4–8.
ꢊ
ꢋꢊ ꢋꢊ
11
11
Qꢊ;ºꢊ;¸ꢊ;º ;¸ ;º¸
Statistical data summations.
ꢌꢈꢃ ꢍꢈ% ꢎꢃ! ꢏꢐꢄ
Base conversions (decimal, hexadecimal, octal, and
binary).
Programming Instructions
FLAGS
13
13
13
ꢑ ꢃꢑ ꢑ @
Functions to set, clear, and test flags.
?
x y
≠ ≤ < > ≥ =
Comparison tests of the X–and Y–registers.
?
x 0
≠ ≤ < > ≥ =
Comparison tests of the X–register and zero.
Getting Started 1–7
HP 33s Menus (continued)
Menu
Name
Menu
Description
Chapter
Other functions
MEM
1, 3, 12
4, 1
#ꢀꢁ ꢅꢆꢇ
Memory status (bytes of memory available); catalog
of variables; catalog of programs (program labels).
MODES
DISPLAY
ꢌꢈꢆ ꢁꢀꢌ ꢆꢁꢀꢌ * 8
Angular modes and " " or " " radix (decimal point)
)
8
convention.
1
ꢑꢐ% ꢃꢐ ꢈꢄꢆ ꢀꢂꢂ
Fix, scientific, engineering, and ALL display formats.
¶
µ
R
R
C
%ꢒ %ꢋ %ꢓ %ꢔꢊ
Functions to review the stack in ALG mode –X1–, X2–,
X3–, X4–registers
Functions to clear different portions of memory—refer
ꢊ
CLEAR
1, 3,
6, 12
to { c in the table on page 1–6.
To use a menu function:
1. Press a menu key (shifted) to produce a menu in the display — a series of
choices.
2. Press to move the underline to the item you want to
select.
3. Press while the item is underlined.
With numbered menu items, you can either press while the item is
underlined, or just enter the number of the item.
The CONST and SUMS menu keys have more menu pages, turning on the
(or
§
) annunciator. You can use the cursor keys or press the menu key once to access
¨
the next menu page.
The following example shows you how to use a menu function:
1–8
Getting Started
Example:
6 ÷ 7 = 0.8571428571…
Keys:
Display:
ꢒꢑꢐ%
ꢋ ꢃꢐꢊ
ꢔꢀꢂꢂ
6 7 qꢁ
ꢓꢈꢄꢆ
})
ꢈ
ꢂ ({
ꢀꢂꢂ
ꢕ)ꢖꢗꢒꢔꢋꢕꢖꢗꢒꢔ .ꢒꢊ
( or )
Menus help you execute dozens of functions by guiding you to them with menu
choices. You don't have to remember the names of the functions built into the
calculator nor search through the names printed on its keyboard.
Exiting Menus
Whenever you execute a menu function, the menu automatically disappears,
as in the above example. If you want to leave a menu without executing a function,
you have three options:
ꢀ
Pressing b backs out of the 2–level CLEAR or MEM menu, one level at a
time. Refer to { c in the table on page 1–6.
ꢀ
Pressing b or cancels any other menu.
Keys:
Display:
123.5678
_
ꢒꢋꢓ)ꢖ ꢗꢕ ꢊ
ꢒꢑꢐ%
ꢓꢈꢄꢆ
ꢋ ꢃꢐꢊ
ꢔꢀꢂꢂ
ꢊ
b or
ꢒꢋꢓ)ꢖ ꢗꢕꢊ
ꢀ
Pressing another menu key replaces the old menu with the new one.
Keys:
Display:
123.5678
_
ꢒꢋꢓ)ꢖ ꢗꢕ ꢊ
ꢒꢑꢐ%
ꢓꢈꢄꢆ
ꢒ%
ꢋ ꢃꢐꢊ
ꢔꢀꢂꢂ
ꢊ
ꢋ#ꢀꢁ
{ c
ꢊ
ꢓꢀꢂꢂ
ꢔ´
ꢊ
ꢒꢋꢓ)ꢖ ꢗꢕꢊ
Getting Started 1–9
RPN and ALG Keys
The calculator can be set to perform arithmetic operations in either RPN (Reverse
Polish Notation) or ALG (Algebraic) mode.
In Reverse Polish Notation (RPN) mode, the intermediate results of calculations are
stored automatically; hence, you do not have to use parentheses.
In algebraic (ALG) mode, you perform addition, subtraction, multiplication, and
division in the traditional way.
To select RPN mode:
Press { ¦ to set the calculator to RPN mode. When the calculator is in RPN
mode, the RPN annunciator is on.
To select ALG mode:
Press | to set the calculator to ALG mode. When the calculator is in ALG
mode, the ALG annunciator is on.
Example:
Suppose you want to calculate 1 + 2 = 3.
In RPN mode, you enter the first number, press the key, enter the second
number, and finally press the arithmetic operator key: .
In ALG mode, you enter the first number, press , enter the second number, and
finally press the key.ꢁ
RPN mode
ALG mode
1 ꢁ2
1 2
In ALG mode, the results and the calculations are displayed. In RPN mode, only
the results are displayed, not the calculations.
Note
You can choose either ALG (Algebraic) or RPN (Reverse Polish
Notation) mode for your calculations. Throughout the manual, the
“v
“ in the margin indicates that the examples or keystrokes in
RPN mode must be performed differently in ALG mode. Appendix
C explains how to use your calculator in ALG mode.
1–10 Getting Started
The Display and Annunciators
First Line
Second Line
Annunciators
The display comprises two lines and annunciators.
The first line can display up to 255 characters. Entries with more than 14
characters will scroll to the left. However, if entries are more than 255 characters,
the characters from the 256th onward are replaced with an ellipsis (
).
)))
During inputting, the second line displays an entry; after calculating, it displays the
result of a calculation. Every calculation is displayed in up to 14 digits, including
ꢈ
an sign (exponent), and exponent value up to three digits.
The symbols on the display, shown in the above figure, are called annunciators.
Each one has a special significance when it appears in the display.
Getting Started 1–11
HP 33s Annunciators
Meaning
Annunciator
Chapter
£ꢁ
The "£ (Busy)" annunciator blinks while an
operation, equation, or program is
executing.
c
d
When in Fraction–display mode (press {
5
c
d
), only one of the " " or " " halves
cd
ꢁ
of the "
"' annunciator will be turned on
to indicate whether the displayed
numerator is slightly less than or slightly
greater than its true value. If neither part of
cd
"
"' is on, the exact value of the fraction
is being displayed.
¡
Left shift is active.
Right shift is active.
1
1
¢
RPN
ALG
PRGM
EQN
Reverse Polish Notation mode is active.
Algebraic mode is active.
Program–entry is active.
1, 2
1, C
12
6
Equation–entry mode is active, or the
calculator is evaluating an expression or
executing an equation.
0 1 2 3 4
Indicates which flags are set (flags 5
through 11 have no annunciator.
Radians or Grad angular mode is set. DEG
mode (default) has no annunciator.
Indicates the active number base. DEC
(base 10, default) has no annunciator.
13
4
RAD or GRAD
HEX OCT BIN
10
1–12 Getting Started
HP 33s Annunciators (continued)
Meaning
Annunciator
Chapter
,
The or keys are active to scroll the
display, i.e. there are more digits to the left
and right. (Equation–entry and Program–entry
mode aren’t included)
1, 6
§ ¨
Use | to see the rest of a decimal
number; use the left and right–cursor keys
( , ) to see the rest of an equation or
binary number.
Both these annunciators may appear
simultaneously in the display, indicating that
there are more characters to the left and to the
right. Press either of the indicated cursor keys
( or ꢁ) to see the leading or trailing
characters.
When an entry or equation has more than one
display, you can press | or { followed
by to skip from the current display to the
first one. To skip to the last display, press |
or { followed by .
In the CONST and SUMS menus, you can
press and ꢁto access the next menu
page.
,
The and keys are active for
stepping through an equation list or program
lines.
1, 6, 12
© ª
A..Z
¤
The alphabetic keys are active.
3
1
Attention! Indicates a special condition or an
error.
¥
Battery power is low.
A
Getting Started 1–13
Keying in Numbers
You can key in a number that has up to 12 digits plus a 3–digit exponent up to
499. If you try to key in a number larger than this, digit entry halts and the ¤
annunciator briefly appears.
If you make a mistake while keying in a number, press b to backspace and
delete the last digit, or press to clear the whole number.
Making Numbers Negative
The ^ key changes the sign of a number.
ꢀ
ꢀ
To key in a negative number, type the number, then press ^.
To change the sign of a number that was entered previously, just press ^.
(If the number has an exponent, ^ affects only the mantissa — the
non–exponent part of the number.)
Exponents of Ten
Exponents in the Display
–5
Numbers with exponents of ten (such as 4.2 × 10 ) are displayed with an ꢈ
preceding the exponent (such as ꢔ)ꢋꢘꢘꢘꢈ.ꢖ).
A number whose magnitude is too large or too small for the display format will
automatically be displayed in exponential form.
For example, in FIX 4 format for four decimal places, observe the effect of the
following keystrokes:
Keys:
Display:
Description:
.000062
_
Shows number being entered.
Rounds number to fit the display
format.
ꢘ)ꢘꢘꢘꢘ ꢋ
ꢘ)ꢘꢘꢘꢒꢊ
ꢈ
.000042
Automatically uses scientific notation
because otherwise no significant
digits would appear.
ꢔ)ꢋꢘꢘꢘ .ꢖꢊ
1–14 Getting Started
Keying in Exponents of Ten
Use a (exponent) to key in numbers multiplied by powers of ten. For example,
–34
take Planck's constant, 6.6261 × 10
:
1. Key in the mantissa (the non–exponent part) of the number. If the mantissa is
negative, press ^ after keying in its digits.
Keys:
6.6261
Display:
_
) ꢋ ꢒ
2. Press a. Notice that the cursor moves behind the
:
ꢈ
ꢈ
a
_
) ꢋ ꢒ
ꢊ
3. Key in the exponent. (The largest possible exponent is 499.) If the exponent is
ꢈ
negative, press ^ after you key in the or after you key in the value of the
exponent:
ꢈ
34 ^
_
) ꢋ ꢒ .ꢓꢔ
34
For a power of ten without a multiplier, such as 10 , just press a 34. The
ꢈ
calculator displays
.
ꢒ ꢓꢔ
Other Exponent Functions
To calculate an exponent of ten (the base 10 antilogarithm), use { ꢃ. To
calculate the result of any number raised to a power (exponentiation), use ꢄ
(see chapter 4).
Understanding Digit Entry
As you key in a number, the cursor (_) appears in the display. The cursor shows
you where the next digit will go; it therefore indicates that the number is not
complete.
Getting Started 1–15
Keys:
Display:
Description:
123
_
ꢒꢋꢓ
Digit entry not terminated: the number
is not complete.
If you execute a function to calculate a result, the cursor disappears because the
number is complete — digit entry has been terminated.
#
Digit entry is terminated.
ꢒꢒ)ꢘꢙꢘꢖꢊ
Pressing terminates digit entry. To separate two numbers, key in the first
number, press to terminate digit, entry, and then key in the second
number
123
4
A completed number.
ꢒꢋꢓ)ꢘꢘꢘꢘꢊ
ꢒꢋꢗ)ꢘꢘꢘꢘꢊ
Another completed number.
If digit entry is not terminated (if the cursor is present), b backspaces to erase
the last digit. If digit entry is terminated (no cursor), b acts like and clears
the entire number. Try it!
Range of Numbers and OVERFLOW
–499
The smallest number available on the calculator is 1 × 10
. The largest number
because of rounding).
499
ꢈ
is 9.99999999999 × 10
(displayed as
ꢒ)ꢘꢘꢘꢘ ꢖꢘꢘ
ꢀ
ꢀ
If a calculation produces a result that exceeds the largest possible number,
499
9.99999999999 × 10
is returned, and the warning message
appears.
ꢎ#ꢈꢁꢑꢂꢎ$
If a calculation produces a result smaller that the smallest possible number,
zero is returned. No warning message appears.
Doing Arithmetic
All operands (numbers) must be present before you press a function key. (When
you press a function key, the calculator immediately executes the function
shown on that key.)
All calculations can be simplified into one–number functions and/or two–number
functions.
1–16 Getting Started
One–Number Functions
To use a one–number function (such as ꢅ, #, !,ꢁ{ @, { $, |
K,ꢁ{ ꢆ,ꢁQ or ^)
1. Key in the number. ( You don't need to press .)
2. Press the function key. (For a shifted function, press the appropriate { or
| shift key first.)
For example, calculate 1/32 and
change its sign.
. Then square the last result and
148.84
Keys:
Display:
Description:
32
ꢅ
_
Operand.
ꢓꢋ
Reciprocal of 32.
Square root of 148.84.
Square of 12.2.
ꢘ)ꢘꢓꢒꢓꢊ
148.84 #
!
ꢒꢋ)ꢋꢘꢘꢘꢊ
ꢒꢔꢕ)ꢕꢔꢘꢘꢊ
.ꢒꢔꢕ)ꢕꢔꢘꢘꢊ
^
Negation of 148.8400.
The one–number functions also include trigonometric, logarithmic, hyperbolic, and
parts–of–numbers functions, all of which are discussed in chapter 4.
Two–Number Functions
In RPN mode, to use a two–number function (such as , ꢀ, z, q, ꢄ,
{ F, | D,ꢁꢇ, { \, { _, Qꢁor | T):
1. Key in the first number.
2. Press to separate the first number from the second.
3. Key in the second number. (Do not press .)
4. Press the function key. (For a shifted function, press the appropriate shift key
first.)
In RPN mode, type in both numbers (separate them by selecting
) before selecting a function key.
Note
Getting Started 1–17
For example,
To calculate:
Press:
Display:
12 + 3
12 – 3
12 × 3
12 3
12 3 ꢀ
12 3 z
12 3 ꢄ
8 5 | T
ꢒꢖ)ꢘꢘꢘꢘꢊ
ꢙ)ꢘꢘꢘꢘꢊ
ꢓ )ꢘꢘꢘꢘꢊ
ꢒ8ꢗꢋꢕ)ꢘꢘꢘꢘꢊ
.ꢓꢗ)ꢖꢘꢘꢘꢊ
3
12
Percent change from
8 to 5
The order of entry is important only for non–commutative functions such as ꢀ,
q, ꢄ, { F, | D, ꢇ, { \, { _,ꢁQ, |
T. If you type numbers in the wrong order, you can still get the correct
answer (without re–typing them) by pressing [ to swap the order of the
numbers on the stack. Then press the intended function key. (This is explained in
detail in chapter 2 under "Exchanging the X– and Y–Registers in the Stack.")
Controlling the Display Format
Periods and Commas in Numbers
To exchange the periods and commas used for the decimal point (radix mark) and
digit separators in a number:
1. Press to display the MODES menu.
2. Specify the decimal point (radix mark) by pressing { } or { }.
)
8
For example, the number one million looks like:
ꢀ
if you press { } or
ꢒ8ꢘꢘꢘ8ꢘꢘꢘ)ꢘꢘꢘꢘ
ꢒ)ꢘꢘꢘ)ꢘꢘꢘ8ꢘꢘꢘꢘ
)
ꢀ
if you press { }.
8
1–18 Getting Started
Number of Decimal Places
All numbers are stored with 12–digit precision, but you can select the number of
decimal places to be displayed by pressing
(the display menu). During
some complicated internal calculations, the calculator uses 15–digit precision for
intermediate results. The displayed number is rounded according to the display
format. The DISPLAY menu gives you four options:
ꢑꢐ% ꢃꢐ ꢈꢄꢆ ꢀꢂꢂ
Fixed–Decimal Format ({
})
ꢑꢐ%
FIX format displays a number with up to 11 decimal places (11 digits to the right of
the " " or " " radix mark) if they fit. After the prompt
decimal places to be displayed. For 10 or 11 places, press 0 or 1.
_, type in the number of
)
8
ꢑꢐ%
For example, in the number
decimal digits you see when the calculator is set to FIX 4 display mode.
, the "7", "0", "8", and "9" are the
ꢒꢋꢓ8ꢔꢖ )ꢗꢘꢕꢙ
Any number that is too large or too small to display in the current decimal–place
setting will automatically be displayed in scientific format.
Scientific Format ({
})
ꢃꢐ
SCI format displays a number in scientific notation (one digit before the " " or " "
)
8
radix mark) with up to 11 decimal places (if they fit) and up to three digits in the
exponent. After the prompt,
displayed. For 10 or 11 places, press 0 or 1. (The mantissa part of the
_, type in the number of decimal places to be
ꢃꢐ
number will always be less than 10.)
ꢈ
For example, in the number
decimal digits you see when the calculator is set to SCI 4 display mode. The "5"
, the "2", "3", "4", and "6" are the
ꢒ)ꢋꢓꢔ
ꢖ
5
following the "E" is the exponent of 10: 1.2346 × 10 .
Getting Started 1–19
Engineering Format ({
})
ꢈꢄꢆ
ENG format displays a number in a manner similar to scientific notation, except
that the exponent is a multiple of three (there can be up to three digits before the
" " or " " radix mark). This format is most useful for scientific and engineering
)
8
3
calculations that use units specified in multiples of 10 (such as micro–, milli–, and
kilo–units.)
After the prompt,
significant digit. For 10 or 11 places, press 0 or 1.
_, type in the number of digits you want after the first
ꢈꢄꢆ
ꢈ
For example, in the number
significant digits after the first significant digit you see when the calculator is
, the "2", "3", "4", and "6" are the
ꢒꢋꢓ)ꢔ
ꢓ
ꢈ
set to ENG 4 display mode. The "3" following the " " is the (multiple of 3)
exponent of 10: 123.46 x 10 .
3
Pressing C or | A will cause the exponent display for the number
being displayed to change in multiples of 3.
ꢈ
For example, key in the number
and pressing C will convert the
ꢒꢋ)ꢓꢔ
ꢔ
ꢈ
displayed value to
, which the mantissa n satisfies 1≤ n < 1000 and
ꢒꢋꢓ)ꢔ
ꢓ
the exponent is a multiple of 3. When you press C again, the displayed value
ꢈ
is converted to
by shifting the decimal point three places to the right
ꢒꢋꢓ8ꢔ ꢘ ꢘꢊ
and converting the exponent to the next lower multiple of 3.
ꢈ
Key in the number
displayed value to
and pressing | A will convert the
, which the mantissa n satisfies 0.01≤ n < 10 and
ꢒꢋ)ꢓꢔ ꢔꢊ
ꢈ
ꢘ)ꢒꢋꢓꢔ
the exponent is a multiple of 3. When you press | A again, the
ꢈ
displayed value is converted to
three places to the left and converting the exponent to the next higher multiple of 3.
by shifting the decimal point
ꢘ)ꢘꢘꢘꢒꢋꢓꢔ ꢙꢊ
ALL Format ({
})
ꢀꢂꢂ
ALL
format displays a number as precisely as possible (12 digits maximum). If all
the digits don't fit in the display, the number is automatically displayed in scientific
format.
SHOWing Full 12–Digit Precision
Changing the number of displayed decimal places affects what you see, but it
does not affect the internal representation of numbers. Any number stored
internally always has 12 digits.
1–20 Getting Started
For example, in the number 14.8745632019, you see only "14.8746" when the
display mode is set to FIX 4, but the last six digits ("632019") are present
internally in the calculator.
To temporarily display a number in full precision, press | . This shows
you the mantissa (but no exponent) of the number for as long as you hold down
.
Keys:
Display:
Description:
{
} 4
Displays four decimal places.
Four decimal places displayed.
Scientific format: two decimal
places and an exponent.
Engineering format.
ꢑꢐ%
ꢊ
45 1.3 z
ꢖꢕ)ꢖꢘꢘꢘꢊ
ꢈ
{
} 2
ꢃꢐ
ꢖ)ꢕꢖ ꢒꢊ
ꢈ
{
{
} 2
}
ꢈꢄꢆ
ꢖꢕ)ꢖ ꢘꢊ
All significant digits; trailing
zeros dropped.
ꢀꢂꢂ
ꢖꢕ)ꢖꢊ
{
} 4
Four decimal places, no
exponent.
ꢑꢐ%
ꢖꢕ)ꢖꢘꢘꢘꢊ
ꢅ
Reciprocal of 58.5.
ꢘ)ꢘꢒꢗꢒꢊ
| (hold)
Shows full precision until you
release
ꢒꢗꢘꢙꢔꢘꢒꢗꢘꢙꢔꢘꢊ
Fractions
The HP 33s allows you to type in and display fractions, and to perform math
operations on them. Fractions are real numbers of the form
a b/c
where a, b, and c are integers; 0 ≤ b < c; and the denominator (c) must be in the
range 2 through 4095.
Entering Fractions
Fractions can be entered onto the stack at any time:
1. Key in the integer part of the number and press . (The first
separates the integer part of the number from its fractional part.)
Getting Started 1–21
2. Key in the fraction numerator and press again. The second
separates the numerator from the denominator.
3. Key in the denominator, then press or a function key to terminate
digit entry. The number or result is formatted according to the current
display format.
The a b/c symbol under the key is a reminder that the key is used
twice for fraction entry.
3
For example, to enter the fractional number 12 / , press these keys:
8
Keys:
Display:
Description:
12
_
Enters the integer part of the number.
The key is interpreted in the normal
manner.
ꢒꢋ ꢊ
_
ꢒꢋ)
3
_
Enters the numerator of the fraction (the
number is still displayed in decimal
form).
ꢒꢋ)ꢓ ꢊ
_
The calculator interprets the second
as a fraction and separates the
numerator from denominator.
Appends the denominator of the
fraction.
ꢒꢋꢊꢓ+ ꢊ
8
_
ꢒꢋꢊꢓ+ꢕ ꢊ
Terminates digit entry; displays the
number in the current display format.
ꢒꢋ)ꢓꢗꢖꢘꢊ
3
If the number you enter has no integer part (for example, / ), just start the
8
number without an integer:
Keys:
Display:
Description:
3 8
_
Enters no integer part. (3 8
also works.)
ꢘ ꢓ+ꢕ ꢊ
Terminates digit entry; displays the
number in the current display format
(FIX 4).
ꢘ)ꢓꢗꢖꢘꢊ
1–22 Getting Started
Displaying Fractions
Press {ꢁ to switch between Fraction–display mode and the current
decimal display mode.
Keys:
Display:
Description:
12 3 8
_
Displays characters as you key them in.
Terminates digit entry; displays the
number in the current display format.
Displays the number as a fraction.
ꢒꢋ ꢓ+ꢕ ꢊ
ꢒꢋ)ꢓꢗꢖꢘꢊ
{
ꢒꢋ ꢓ+ꢕꢊ
3
3
Now add / to the number in the X–register (12 / ):
4
8
Keys:
Display:
Description:
3 4
_
Displays characters as you key them in.
Adds the numbers in the X– and
Y–registers; displays the result as a
fraction.
ꢘ ꢓ+ꢔ ꢊ
ꢒꢓ ꢒ+ꢕꢊ
{
Switches to current decimal display
format.
ꢒꢓ)ꢒꢋꢖꢘꢊ
Refer to chapter 5, "Fractions," for more information about using fractions.
Messages
The calculator responds to certain conditions or keystrokes by displaying a
message. The ¤ symbol comes on to call your attention to the message.
ꢀ
ꢀ
To clear a message, press or b.
To clear a message and perform another function, press any other key.
If no message appears but ¤ does, you have pressed an inactive key (a key that
has no meaning in the current situation, such as ꢈ in Binary mode).
All displayed messages are explained in appendix F, "Messages".
Getting Started 1–23
Calculator Memory
The HP 33s has 31KB of memory in which you can store any combination of data
(variables, equations, or program lines).
Checking Available Memory
Pressing { Y displays the following menu:
ꢒ#ꢀꢁ ꢋꢅꢆꢇꢊ
ꢓꢒ8ꢋꢗꢗꢊ
Where
is the number of bytes of memory available.
ꢓꢒ8ꢋꢗꢗ
Pressing the {
} menu key displays the catalog of variables (see "Reviewing
#ꢀꢁ
Variables in the VAR Catalog" in chapter 3). Pressing the {
the catalog of programs.
} menu key displays
ꢅꢆꢇ
1. To enter the catalog of variables, press {
}; to enter the catalog of programs,
#ꢀꢁ
press {
}.
ꢅꢆꢇ
2. To review the catalogs, press or .
3. To delete a variable or a program, press { c while viewing it in its
catalog.
4. To exit the catalog, press .
Clearing All of Memory
Clearing all of memory erases all numbers, equations, and programs you've
stored. It does not affect mode and format settings. (To clear settings as well as
data, see "Clearing Memory" in appendix B.)
To clear all of memory:
1. Press { c {
}. You will then see the confirmation prompt
ꢀꢂꢂ
ꢃꢂꢁ
{ } { }, which safeguards against the unintentional clearing of memory.
ꢀꢂꢂ@ &
ꢄ
2. Press { } (yes).
&
1–24 Getting Started
2
RPN: The Automatic
Memory Stack
This chapter explains how calculations take place in the automatic memory stack
in RPN mode. You do not need to read and understand this material to use the
calculator, but understanding the material will greatly enhance your use of the
calculator, especially when programming.
In part 2, "Programming", you will learn how the stack can help you to manipulate
and organize data for programs.
What the Stack Is
Automatic storage of intermediate results is the reason that the HP 33s easily
processes complex calculations, and does so without parentheses. The key to
automatic storage is the automatic, RPN memory stack.
HP's operating logic is based on an unambiguous, parentheses–free mathematical
logic known as "Polish Notation," developed by the Polish logician Jan
à
ukasiewicz (1878–1956).
While conventional algebraic notation places the operators between the relevant
à
numbers or variables, ukasiewicz's notation places them before the numbers or
variables. For optimal efficiency of the stack, we have modified that notation to
specify the operators after the numbers. Hence the term Reverse Polish Notation, or
RPN.
The stack consists of four storage locations, called registers, which are "stacked"
on top of each other. These registers — labeled X, Y, Z, and T — store and
manipulate four current numbers. The "oldest" number is stored in the T– (top)
register. The stack is the work area for calculations.
RPN: The Automatic Memory Stack
2–1
T
0.0000
0.0000
0.0000
0.0000
"Oldest" number
Z
Y
X
Displayed
Displayed
The most "recent" number is in the X–register: this is the number you see in the
second line of the display.
In programming, the stack is used to perform calculations, to temporarily store
intermediate results, to pass stored data (variables) among programs and
subroutines, to accept input, and to deliver output.
The X and Y–Registers are in the Display
The X and Y–Registers are what you see except when a menu, a message, or a
program line is being displayed. You might have noticed that several function
names include an x or y.
This is no coincidence: these letters refer to the X– and Y–registers. For example,
{ ꢃ raises ten to the power of the number in the X–register.
Clearing the X–Register
Pressing { c { } always clears the X–register to zero; it is also used to
º
program this instruction. The key, in contrast, is context–sensitive. It either
clears or cancels the current display, depending on the situation: it acts like {
c { } only when the X–register is displayed. b also acts like { c
º
{ } when the X–register is displayed and digit entry is terminated (no cursor
º
present). It cancels other displays: menus, labeled numbers, messages, equation
entry, and program entry.
2–2
RPN: The Automatic Memory Stack
Reviewing the Stack
¶
R
(Roll Down)
The (roll down) key lets you review the entire contents of the stack by
"rolling" the contents downward, one register at a time. You can see each
number when it enters the X–register.
Suppose the stack is filled with 1, 2, 3, 4. (press 1 2 3 4)
Pressing four times rolls the numbers all the way around and back to where
they started:
1
2
3
4
4
1
2
3
3
4
1
2
2
3
4
1
1
2
3
4
T
Z
Y
X
What was in the X–register rotates into the T–register, the contents of the T–register
rotate into the Z–register, etc. Notice that only the contents of the registers are
rolled — the registers themselves maintain their positions, and only the X– and
Y–register's contents are displayed.
µ
R
(Roll Up)
The | ꢉ (roll up) key has a similar function to except that it "rolls" the
stack contents upward, one register at a time.
The contents of the X–register rotate into the Y–register; what was in the T–register
rotates into the X–register, and so on.
1
2
3
4
2
3
4
1
3
4
1
2
4
1
2
3
1
2
3
4
T
Z
Y
X
RPN: The Automatic Memory Stack
2–3
Exchanging the X– and Y–Registers in the Stack
Another key that manipulates the stack contents is [ (x exchange y). This key
swaps the contents of the X– and Y–registers without affecting the rest of the stack.
Pressing [ twice restores the original order of the X– and Y–register contents.
The [ function is used primarily to swap the order of numbers in a calculation.
For example, one way to calculate 9 ÷ (13 × 8):
Press 13 8 z 9 [ q.
The keystrokes to calculate this expression from left–to–right are:
9 13 8 z q.
Always make sure that there are no more than four numbers in the
stack at any given time — the contents of the T–register (the top
register) will be lost whenever a fifth number is entered.
Note
Arithmetic – How the Stack Does It
The contents of the stack move up and down automatically as new numbers enter
the X–register (lifting the stack) and as operators combine two numbers in the X–
and Y–registers to produce one new number in the X–register (dropping the stack).
Suppose the stack is filled with the numbers 1, 2, 3, and 4. See how the stack drops
and lifts its contents while calculating
1. The stack "drops" its contents. The T–(top) register replicates its contents.
2. The stack "lifts" its contents. The T–register's contents are lost.
2–4
RPN: The Automatic Memory Stack
3. The stack drops.
ꢀ
Notice that when the stack lifts, it replaces the contents of the T– (top) register
with the contents of the Z–register, and that the former contents of the
T–register are lost. You can see, therefore, that the stack's memory is limited
to four numbers.
ꢀ
ꢀ
Because of the automatic movements of the stack, you do not need to clear
the X–register before doing a new calculation.
Most functions prepare the stack to lift its contents when the next number
enters the X–register. See appendix B for lists of functions that disable stack
lift.
How ENTER Works
You know that separates two numbers keyed in one after the other. In
?
terms of the stack, how does it do this Suppose the stack is again filled with 1, 2,
3, and 4. Now enter and add two new numbers:
1 lost
2 lost
T
1
2
3
4
2
3
4
5
3
4
5
5
3
4
5
6
3
3
Z
Y
X
4
11
1
2
3
4
1. Lifts the stack.
2. Lifts the stack and replicates the X–register.
3. Does not lift the stack.
4. Drops the stack and replicates the T–register.
ꢁreplicates the contents of the X–register into the Y–register. The next
number you key in (or recall) writes over the copy of the first number left in the
X–register. The effect is simply to separate two sequentially entered numbers.
You can use the replicating effect of to clear the stack quickly: press 0
. All stack registers now contain zero. Note, however,
that you don't need to clear the stack before doing calculations.
RPN: The Automatic Memory Stack
2–5
Using a Number Twice in a Row
You can use the replicating feature of to other advantages. To add a
number to itself, press .
Filling the stack with a constant
The replicating effect of together with the replicating effect of stack drop
(from T into Z) allows you to fill the stack with a numeric constant for calculations.
Example:
Given bacterial culture with a constant growth rate of 50% per day, how large
?
would a population of 100 be at the end of 3 days
register
1.5
Replicates T
T
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1
Z
1.5
Y
1.5
1.5
1.5
1.5
X
100 100
150
225
337.5
2
3
4
5
1. Fills the stack with the growth rate.
2. Keys in the initial population.
3. Calculates the population after 1 day.
4. Calculates the population after 2 days.
5. Calculates the population after 3 days.
How CLEAR x Works
Clearing the X–register puts a zero in the X–register. The next number you key in
(or recall) writes over this zero.
There are three ways to clear the contents of the X–register, that is, to clear x:
1. Press
2. Press b
3. Press { c { } (Mainly used during program entry.)
º
Note these exceptions:
2–6
RPN: The Automatic Memory Stack
ꢀ
During program entry, b deletes the currently–displayed program line and
cancels program entry.
ꢀ
ꢀ
During digit entry, b backspaces over the displayed number.
If the display shows a labeled number (such as
), pressing
ꢀ/ꢋ)ꢘꢘꢘꢘ
or b cancels that display and shows the X–register.
ꢀ
ꢀ
When viewing an equation, b displays the cursor at the end the equation
to allow for editing.
During equation entry, b backspaces over the displayed equation, one
function at a time.
For example, if you intended to enter 1 and 3 but mistakenly entered 1 and 2, this
is what you should do to correct your error:
T
Z
Y
1
1
1
0
1
3
1
2
X
1
1
2
3
5
4
1. Lifts the stack
2. Lifts the stack and replicates the X–register.
3. Overwrites the X–register.
4. Clears x by overwriting it with zero.
5. Overwrites x (replaces the zero.)
The LAST X Register
The LAST X register is a companion to the stack: it holds the number that was in the
X–register before the last numeric function was executed. (A numeric function is an
operation that produces a result from another number or numbers, such as #.)
Pressing { returns this value into the X–register.
This ability to retrieve the "last x" has two main uses:
1. Correcting errors.
RPN: The Automatic Memory Stack
2–7
2. Reusing a number in a calculation.
See appendix B for a comprehensive list of the functions that save x in the LAST X
register.
Correcting Mistakes with LAST X
Wrong One–Number Function
If you execute the wrong one–number function, use { to retrieve the
number so you can execute the correct function. (Press first if you want to
clear the incorrect result from the stack.)
Since Q and | T don't cause the stack to drop, you can recover from
these functions in the same manner as from one–number functions.
Example:
5
Suppose that you had just computed ln 4.7839 × (3.879 × 10 ) and wanted to
find its square root, but pressed ꢊ by mistake. You don't have to start over! To
find the correct result, press { ꢁ#.
Mistakes with Two–number Functions
If you make a mistake with a two–number operation, (, ꢀ, z, q, ꢄ,
{ F, | D,ꢁꢇ, { \, { _, Qꢁor | Tꢁ),
you can correct it by using { and the inverse of the two–number
function.
1. Press { to recover the second number (x just before the operation).
2. Execute the inverse operation. This returns the number that was originally first.
The second number is still in the LAST X register. Then:
ꢀ
If you had used the wrong function, press { again to restore
the original stack contents. Now execute the correct function.
If you had used the wrong second number, key in the correct one and
execute the function.
ꢀ
If you had used the wrong first number, key in the correct first number, press {
to recover the second number, and execute the function again. (Press
first if you want to clear the incorrect result from the stack.)
2–8
RPN: The Automatic Memory Stack
Example:
Suppose you made a mistake while calculating
16 × 19 = 304
There are three kinds of mistakes you could have made:
Wrong
Calculation:
Mistake:
Correction:
16 19 ꢀ Wrong function
{ ꢁ
{ z
15 19 z Wrong first number 16 { z
16 18 z Wrong second number{ q 19 z
Reusing Numbers with LAST X
You can use { to reuse a number (such as a constant) in a calculation.
Remember to enter the constant second, just before executing the arithmetic
operation, so that the constant is the last number in the X–register, and therefore
can be saved and retrieved with { .
Example:
96.704+ 52.3947
Calculate
52.3947
RPN: The Automatic Memory Stack
2–9
T
t
t
t
Z
z
z
t
Y
96.7040
52.3947
z
96.704
LAST
96.7040
96.7040
X
52.3947
149.0987
X
l
l
52.3947
T
t
t
t
Z
z
Y
149.0987
52.3947
z
X
2.8457
X
52.3947
52.3947
LAST
Keys:
Display:
Description:
Enters first number.
Intermediate result.
Brings back display from before
.
96.704
52.3947
{
ꢀ )ꢁꢂꢃꢂꢄ
ꢅꢃꢀ)ꢂꢀꢆꢁꢄ
ꢇꢈ)ꢉꢀꢃꢁꢄ
q
Final result.
ꢈ)ꢆꢃꢇꢁꢄ
Example:
Two close stellar neighbors of Earth are Rigel Centaurus (4.3 light–years away)
15
and Sirius (8.7 light–years away). Use c, the speed of light (9.5 × 10 meters per
year) to convert the distances from the Earth to these stars into meters:
15
To Rigel Centaurus: 4.3 yr × (9.5 × 10 m/yr).
15
To Sirius: 8.7 yr × (9.5 × 10 m/yr).
Keys:
4.3
Display:
Description:
Light–years to Rigel Centaurus.
ꢃ)ꢉꢂꢂꢂꢄ
2–10 RPN: The Automatic Memory Stack
ꢈ
9.5 a 15
z
_
Speed of light, c.
Meters to R. Centaurus.
Retrieves c.
ꢙ)ꢖ ꢒꢖ ꢊ
ꢈ
ꢔ)ꢘꢕꢖꢘ ꢒ ꢊ
ꢈ
8.7 {
z
ꢙ)ꢖꢘꢘꢘ ꢒꢖꢊ
ꢈ
Meters to Sirius.
ꢕ)ꢋ ꢖꢘ ꢒ ꢊ
Chain Calculations in RPN mode
In RPN mode, the automatic lifting and dropping of the stack's contents let you
retain intermediate results without storing or reentering them, and without using
parentheses.
Work from the Parentheses Out
For example, solve (12 + 3) × 7.
If you were working out this problem on paper, you would first calculate the
intermediate result of (12 + 3) ...
(12 + 3) = 15
… then you would multiply the intermediate result by 7:
(15) × 7 = 105
Solve the problem in the same way on the HP 33s, starting inside the
parentheses:
Keys:
Display:
Description:
12 3
Calculates the intermediate result first.
ꢒꢖ)ꢘꢘꢘꢘꢊ
You don't need to press to save this intermediate result before
proceeding; since it is a calculated result, it is saved automatically.
Keys:
Display:
Description:
7 z
Pressing the function key produces the
answer. This result can be used in
further calculations.
ꢒꢘꢖ)ꢘꢘꢘꢘꢊ
RPN: The Automatic Memory Stack 2–11
Now study the following examples. Remember that you need to press
only to separate sequentially–entered numbers, such as at the beginning of a
problem The operations themselves (, ꢀ, etc.) separate subsequent numbers
and save intermediate results. The last result saved is the first one retrieved as
needed to carry out the calculation.
Calculate 2 ÷ (3 + 10):
Keys:
Display:
Description:
3 10
2 [ q
Calculates (3 + 10) first.
Puts 2 before 13 so the division is
correct: 2 ÷ 13.
ꢒꢓ)ꢘꢘꢘꢘꢊ
ꢘ)ꢒꢖꢓꢕꢊ
Calculate 4 ÷ [14 + (7 × 3) – 2] :
Keys:
Display:
Description:
7 3 z
14 2 ꢀ
4 [
Calculates (7 × 3).
ꢋꢒ)ꢘꢘꢘꢘꢊ
ꢓꢓ)ꢘꢘꢘꢘꢊ
ꢓꢓ)ꢘꢘꢘꢘꢊ
Calculates denominator.
Puts 4 before 33 in preparation for
division.
q
Calculates 4 ÷ 33, the answer.
ꢘ)ꢒꢋꢒꢋꢊ
Problems that have multiple parentheses can be solved in the same manner using
the automatic storage of intermediate results. For example, to solve (3 + 4) × (5 +
6) on paper, you would first calculate the quantity (3 + 4). Then you would
calculate (5 + 6). Finally, you would multiply the two intermediate results to get the
answer.
Work through the problem the same way with the HP 33s, except that you don't
have to write down intermediate answers—the calculator remembers them for you.
Keys:
Display:
Description:
First adds (3+4)
3 4
5 6
z
ꢗ)ꢘꢘꢘꢘꢊ
Then adds (5+6)
ꢒꢒ)ꢘꢘꢘꢘꢊ
ꢗꢗ)ꢘꢘꢘꢘꢊ
Then multiplies the intermediate
answers together for the final
answer.
2–12 RPN: The Automatic Memory Stack
Exercises
Calculate:
(16.3805x5)
= 181.0000
0.05
Solution:
16.3805 5 z # .05 q
Calculate:
[(2+ 3)×(4 + 5)] + [(6 + 7)×(8+ 9)] = 21.5743
Solution:
2 3 4 5 z # 6 7 8 9 z
#
Calculate:
(10 – 5) ÷ [(17 – 12) × 4] = 0.2500
Solution:
17 12 ꢀ 4 z 10 5 ꢀ [ q
or
10 5 ꢀ 17 12 ꢀ 4 z q
Order of Calculation
We recommend solving chain calculations by working from the innermost
parentheses outward. However, you can also choose to work problems in a
left–to–right order.
For example, you have already calculated:
4 ÷ [14 + (7 × 3) – 2]
by starting with the innermost parentheses (7 × 3) and working outward, just
as you would with pencil and paper. The keystrokes were 7 3 z 14
2 ꢀ 4 [ q.
If you work the problem from left–to–right, press
4 14 7 3 z 2 ꢀ q.
RPN: The Automatic Memory Stack 2–13
This method takes one additional keystroke. Notice that the first intermediate result
is still the innermost parentheses (7 × 3). The advantage to working a problem
left–to–right is that you don't have to use [ to reposition operands for
nomcommutaiive functions ( ꢀ and q ).
However, the first method (starting with the innermost parentheses) is often
preferred because:
ꢀ
ꢀ
It takes fewer keystrokes.
It requires fewer registers in the stack.
When using the left–to–right method, be sure that no more than
four intermediate numbers (or results) will be needed at one
Note
time (the stack can hold no more than four numbers).
The above example, when solved left–to–right, needed all registers in the stack at
one point:
Keys:
Display:
Description:
4 14
Saves 4 and 14 as intermediate
numbers in the stack.
At this point the stack is full with
numbers for this calculation.
Intermediate result.
ꢒꢔ)ꢘꢘꢘꢘꢊ
7 3
_
ꢓ ꢊ
z
ꢋꢒ)ꢘꢘꢘꢘꢊ
ꢓꢖ)ꢘꢘꢘꢘꢊ
ꢓꢓ)ꢘꢘꢘꢘꢊ
ꢘ)ꢒꢋꢒꢋꢊ
2 ꢀ
q
Intermediate result.
Intermediate result.
Final result.
More Exercises
Practice using RPN by working through the following problems:
Calculate:
(14 + 12) × (18 – 12) ÷ (9 – 7) = 78.0000
2–14 RPN: The Automatic Memory Stack
A Solution:
14 12 18 12 ꢀ z 9 7 ꢀ q
Calculate:
2
23 – (13 × 9) + 1/7 = 412.1429
A Solution:
23 ! 13 9 z ꢀ 7 ꢅ
Calculate:
(5.4× 0.8) ÷ (12.5− 0.73) = 0.5961
Solution:
5.4 .8 z .7 3 ꢄ 12.5 [ ꢀ qꢁ#
or
5.4 .8 z 12.5 .7 3 ꢄ ꢀ q #
Calculate:
8.33×(4 − 5.2)÷[(8.33− 7.46)× 0.32]
= 4.5728
4.3×(3.15− 2.75)− (1.71×2.01)
A Solution:
4 5.2 ꢀ 8.33 z { 7.46 ꢀ 0.32 z q 3.15
2.75 ꢀ 4.3 z 1.71 2.01 z ꢀ q #ꢁ
RPN: The Automatic Memory Stack 2–15
3
Storing Data into Variables
The HP 33s has 31KB of user memory: memory that you can use to store numbers,
equations, and program lines. Numbers are stored in locations called variables,
each named with a letter from A through Z. (You can choose the letter to remind
you of what is stored there, such as B for bank balance and C for the speed of
light.)
1. Cursor prompts for variable.
2. Indicates letter keys are active.
3. Letter keys.
Storing Data into Variables 3–1
Each black letter is associated with a key and a unique variable. The letter keys
are automatically active when needed. (The A..Z annunciator in the display
confirms this.)
Note that the variables, X, Y, Z and T are different storage locations from the
X–register, Y–register, Z–register, and T–register in the stack.
Storing and Recalling Numbers
Numbers are stored into and recalled from lettered variables with the I (store)
and Lꢀ(recall) functions.
To store a copy of a displayed number (X–register) to a variable:
Press I letter–key.
To recall a copy of a number from a variable to the display:
Press L letter–key.
Example: Storing Numbers.
23
Store Avogadro's number (approximately 6.0221 × 10 ) in A.
Keys:
Display:
Description:
Avogadro's number.
ꢃ
6.0221 a 23
I
_
)ꢀꢁꢁꢂ ꢁꢄ
_
Prompts for variable.
!ꢅ
A (hold ꢁ key)
Displays function as long as key is
held down.
!ꢅ ꢆꢇ
ꢃ
(release)
Stores a copy of Avogadro's
number in A. This also terminates
digit entry (no cursor present).
Clears the number in the display.
Prompts for variable.
)ꢀꢁꢁꢂ ꢁꢄꢇ
L
A
ꢀ)ꢀꢀꢀꢀꢇ
_
ꢈꢉꢊꢇ ꢇ
ꢃ
Copies Avogadro's number from A
the display.
)ꢀꢁꢁꢂ ꢁꢄꢇ
3–2
Storing Data into Variables
Viewing a Variable without Recalling It
The | function shows you the contents of a variable without putting that
number in the X–register. The display is labeled for the variable, such as:
ꢀ/ꢁ
ꢂꢃꢄꢅ)ꢆ ꢇꢈꢁ
In Fraction–display mode ({ ), part of the integer may be dropped. This
will be indicated by "…" at the left end of the integer.
To see the full mantissa, press | . The integer part is the portion to the
left of the radix ( or ).ꢀ
)
8
| is most often used in programming, but it is useful anytime you want to
view a variable's value without affecting the contents of the stack.
To cancel the VIEW display, press b or once.
Reviewing Variables in the VAR Catalog
The { Y (memory) function provides information about memory:
ꢂ#ꢀꢉ ꢃꢊꢋꢌꢁ
QQ8QQQ
ꢁ
where nn,nnn is the number of bytes of available memory.
Pressing the {
} menu key displays the catalog of variables.
} menu key displays the catalog of programs.
#ꢀꢉ
ꢊꢋꢌ
Pressing the {
To review the values at any or all non–zero variables:
1. Press { Y {VAR}.
2. Press or to move the list and display the desired variable. (Note
©ª
the
annunciators, indicating that the and keys are active. If
cd
Fraction–display mode is active,
accuracy.)
indicator will not be turned on to indicate
To see all the significant digits of a number displayed in the {
press | . (If it is a binary number with more than 12 digits, use the
and keys to see the rest.)
} catalog,
#ꢀꢉ
3. To copy a displayed variable from the catalog to the X–register, press .
4. To clear a variable to zero, press { c while it is displayed in the
catalog.
5. Press to cancel the catalog.
Storing Data into Variables 3–3
Clearing Variables
Variables' values are retained by Continuous Memory until you replace them or
clear them. Clearing a variable stores a zero there; a value of zero takes no
memory.
To clear a single variable:
Store zero in it: Press 0 I variable.
To clear selected variables:
1. Press { Y {
2. Press { c.
} and use or to display the variable.
#ꢀꢁ
3. Press to cancel the catalog.
To clear all variables at once:
Press { c {
}.
#ꢀꢁ
Arithmetic with Stored Variables
Storage arithmetic and recall arithmetic allow you to do calculations with a
number stored in a variable without recalling the variable into the stack. A
calculation uses one number from the X–register and one number from the
specified variable.
Storage Arithmetic
Storage arithmetic uses I , I ꢀ, I z, or I q to do
arithmetic in the variable itself and to store the result there. It uses the value in the
X–register and does not affect the stack.
New value of variable = Previous value of variable {+, –, ×, ÷} x.
For example, suppose you want to reduce the value in A(15) by the number in the
X–register (3, displayed). Press I ꢀ A. Now A = 12, while 3 is still in the
display.
3–4
Storing Data into Variables
A
Result: 15
that is,A
3
A
15
12
x
T
T
t
t
Z
Y
X
Z
z
z
Y
y
y
X
3
3
Recall Arithmetic
Recall arithmetic uses L , L ꢀ, L z, or L q to do
arithmetic in the X–register using a recalled number and to leave the result in the
display. Only the X–register is affected.
New x = Previous x {+, –, ×, ÷} Variable
For example, suppose you want to divide the number in the X–register (3,
displayed) by the value in A(12). Press L q A. Now x = 0.25, while 12 is
still in A. Recall arithmetic saves memory in programs: using L A (one
instruction) uses half as much memory as L A, (two instructions).
A
A
12
12
T
t
T
t
Z
Y
X
Z
Y
X
z
y
3
z
y
Result: 3 12
that is, x 12
0.25
Example:
Suppose the variables D, E, and F contain the values 1, 2, and 3. Use storage
arithmetic to add 1 to each of those variables.
Storing Data into Variables 3–5
Keys:
1 I D
2 I E
3 I F
1 I D
I E I
F
Display:
Description:
Stores the assumed values into the
variable.
ꢒ)ꢘꢘꢘꢘꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢓ)ꢘꢘꢘꢘꢊ
ꢊ
Adds1 to D, E, and F.
ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
ꢌ/ꢊ
| D
Displays the current value of D.
ꢋ)ꢘꢘꢘꢘꢊ
ꢈ/ꢊ
| E
| F
bꢁ
ꢓ)ꢘꢘꢘꢘꢊ
ꢑ/ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
ꢒ)ꢘꢘꢘꢘꢊ
Clears the VIEW display; displays
X-register again.
Suppose the variables D, E, and F contain the values 2, 3, and 4 from the last
example. Divide 3 by D, multiply it by E, and add F to the result.
Keys:
Display:
Description:
Calculates 3 ÷ D.
3 ÷ D × E.
3 ÷ D × E + F.
3 L q D
L z E
L F
ꢒ)ꢖꢘꢘꢘꢊ
ꢔ)ꢖꢘꢘꢘꢊ
ꢕ)ꢖꢘꢘꢘꢊ
Exchanging x with Any Variable
The | Z key allows you to exchange the contents of x (the displayed
X –register) with the contents of any variable. Executing this function does not
affect the Y–, Z–, or T–registers
Example:
Keys:
Display:
Description:
12 I A
3
Stores 12 in variable A.
Displays x.
ꢒꢋ)ꢘꢘꢘꢘꢊ
_
ꢓ
3–6
Storing Data into Variables
| Z A
Exchanges contents of the
X–register and variable A.
Exchanges contents of the
X–register and variable A.
ꢒꢋ)ꢘꢘꢘꢘꢊ
ꢓ)ꢘꢘꢘꢘꢊ
| Z A
A
12
3
A
T
t
t
T
Z
z
z
Z
Y
X
Y
y
y
X
3
12
The Variable "i"
There is a 27th variable that you can access directly — the variable i. The
key
is labeled "i", and it means i whenever the A..Z annunciator is on. Although it
stores numbers as other variables do, i is special in that it can be used to refer to
other variables, including the statistics registers, using the (i) function. This is a
programming technique called indirect addressing that is covered under
"Indirectly Addressing Variables and Labels" in chapter 13.
Storing Data into Variables 3–7
4
Real–Number Functions
This chapter covers most of the calculator's functions that perform computations on
real numbers, including some numeric functions used in programs (such as ABS,
the absolute–value function):
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Exponential and logarithmic functions.
Quotient and Remainder of Divisions.
Power functions. (ꢄ and ꢇ)
Trigonometric functions.
Hyperbolic functions.
Percentage functions.
Physics constants
Conversion functions for coordinates, angles, and units.
Probability functions.
Parts of numbers (number–altering functions).
Arithmetic functions and calculations were covered in chapters 1 and 2. Advanced
numeric operations (root–finding, integrating, complex numbers, base conversions,
and statistics) are described in later chapters.
Exponential and Logarithmic Functions
Put the number in the display, then execute the function — there is no need to press
.
Real–Number Functions
4–1
To Calculate:
Press:
Natural logarithm (base e)
Common logarithm (base 10)
Natural exponential
ꢋ
{ ꢌ
ꢊ
Common exponential (antilogarithm) { ꢃ
Quotient and Remainder of Division
You can use { F and | D to produce either the quotient or
remainder of division operations involving two integers.
1. Key in the first integer.
2. Press to separate the first number from the second.
3. Key in the second number. (Do not press .)
4. Press the function key.
Example:
To display the quotient and remainder produced by 58 ÷ 9
Keys:
Display:
Description:
58 9 { F
58 9 | D
Displays the quotient.
Displays the remainder.
)ꢘꢘꢘꢘꢊ
ꢔ)ꢘꢘꢘꢘꢊ
Power Functions
To calculate the square of a number x, key in x and press !.
To calculate the square root of a number x, key in x and press #.
To calculate the cube of a number x, key in x and press { $.
To calculate the cube root of a number x, key in x and press { @.
To calculate a power x of 10, key in x and press { ꢃ.
4–2
Real–Number Functions
In RPN mode, to calculate a number y raised to a power x, key in y x,
then press ꢄ. (For y > 0, x can be any number; for y < 0, x must be an odd
integer; for y = 0, x must be positive.)
To Calculate:
Press:
Result:
2
15
15 !
ꢋꢋꢖ)ꢘꢘꢘꢘꢊ
ꢒ8ꢘꢘꢘ8ꢘꢘꢘ)ꢘꢘꢘꢘ
ꢋꢖ)ꢘꢘꢘꢘꢊ
6
10
6 { ꢃ
4
5
5 4 ꢄ
–1.4
2
2 1.4 ^ ꢄ
1.4 ^ { $
196 #
ꢘ)ꢓꢗꢕꢙꢊ
3
(–1.4)
.ꢋ)ꢗꢔꢔꢘꢊ
196
ꢒꢔ)ꢘꢘꢘꢘꢊ
3 −125
125 ^ { @
.ꢖ)ꢘꢘꢘꢘꢊ
th
In RPN mode, to calculate a root x of a number y (the x root of y), key in y
x, then press ꢇ. For y < 0, x must be an integer.
To Calculate:
4 625
Press:
Result:
625 4 ꢇ
ꢖ)ꢘꢘꢘꢘꢊ
−1.4 .37893
.37893ꢁꢁ1.4 ^ꢁꢇ
ꢋ)ꢘꢘꢘꢘꢊ
Trigonometry
Entering π
Press | N to place the first 12 digits of π into the X–register.
(The number displayed depends on the display format.) Because π is a function, it
doesn't need to be separated from another number by .
Note that the calculator cannot exactly represent π, since π is an irrational number.
Real–Number Functions
4–3
Setting the Angular Mode
The angular mode specifies which unit of measure to assume for angles used in
trigonometric functions. The mode does not convert numbers already present (see
"Conversion Functions" later in this chapter).
360 degrees = 2π radians = 400 grads
To set an angular mode, press . A menu will be displayed from which you
can select an option.
Option
Description
Annunciator
none
{
}
Sets Degrees mode (DEG). Uses decimal
degrees, not degrees, minutes, and
seconds.
ꢌꢈꢆ
{
{
}
Sets Radians mode (RAD).
Sets Grads mode (GRAD).
RAD
ꢁꢀꢌ
}
GRAD
ꢆꢁꢀꢌ
Trigonometric Functions
With x in the display:
To Calculate:
Press:
Sine of x.
O
Cosine of x.
R
Tangent of x.
Arc sine of x.
Arc cosine of x.
Arc tangent of x.
U
{ M
{ P
{ S
ꢁ
Calculations with the irrational number π cannot be expressed
exactly by the 12–digit internal precision of the calculator. This is
Note
particularly noticeable in trigonometry. For example, the calculated
–13
sin π (radians) is not zero but –2.0676 × 10
, a very small
number close to zero.
4–4
Real–Number Functions
Example:
Show that cosine (5/7)π radians and cosine 128.57° are equal (to four significant
digits).
Keys:
Display:
Description:
{
}
Sets Radians mode; RAD
annunciator on.
ꢁꢀꢌ
ꢊ
5 7
| N z R
5/7 in decimal format.
Cos (5/7)π.
Switches to Degrees mode (no
annunciator).
ꢘ)ꢗꢒꢔꢓꢊ
.ꢘ) ꢋꢓꢖꢊ
.ꢘ) ꢋꢓꢖꢊ
{
}
ꢌꢈꢆ
128.57 R
Calculates cos 128.57°, which
is the same as cos (5/7)π.
.ꢘ) ꢋꢓꢖꢊ
Programming Note:
Equations using inverse trigonometric functions to determine an angle θ, often look
something like this:
θ = arctan (y/x).
If x = 0, then y/x is undefined, resulting in the error:
then, it would be more reliable to determine θ by a rectangular to polar conversion,
. For a program,
ꢌꢐ#ꢐꢌꢈ ꢏ& ꢘ
which converts (x,y) to (r,θ). See "Coordinate Conversions" later in this chapter.
Real–Number Functions
4–5
Hyperbolic Functions
With x in the display:
To Calculate:
Press:
Hyperbolic sine of x (SINH).
{ ꢍ O
Hyperbolic cosine of x (COSH).
Hyperbolic tangent of x (TANH).
Hyperbolic arc sine of x (ASINH).
Hyperbolic arc cosine of x (ACOSH).
Hyperbolic arc tangent of x (ATANH).
{ ꢍ R
{ ꢍ U
{ ꢍ { M
{ ꢍ { P
{ ꢍ { S
Percentage Functions
The percentage functions are special (compared with z and q ) because they
preserve the value of the base number (in the Y–register) when they return the result
of the percentage calculation (in the X–register). You can then carry out subsequent
calculations using both the base number and the result without reentering the base
number.
To Calculate:
Press:
y x Q
y x | T
x% of y
Percentage change from y to x. (y≠ 0)
Example:
Find the sales tax at 6% and the total cost of a $15.76 item.
Use FIX 2 display format so the costs are rounded appropriately.
Keys:
Display:
Description:
{
} 2
Rounds display to two decimal
places.
ꢑꢐ%
ꢊ
15.76
6 Q
ꢒꢖ)ꢗ ꢊ
ꢘ)ꢙꢖꢊ
Calculates 6% tax.
4–6
Real–Number Functions
Total cost (base price + 6% tax).
ꢒ )ꢗꢒꢊ
Suppose that the $15.76 item cost $16.12 last year. What is the percentage
?
change from last year's price to this year's
Keys: Display:
16.12
15.76 | T
Description:
ꢒ )ꢒꢋꢊ
This year's price dropped about
2.2% from last year's price.
Restores FIX 4 format.
.ꢋ)ꢋꢓꢊ
{
} 4
ꢑꢐ%
.ꢋ)ꢋꢓꢓꢓꢊ
The order of the two numbers is important for the %CHG function.
The order affects whether the percentage change is considered
positive or negative.
Note
Real–Number Functions
4–7
Physics Constants
There are 40 physics constants in the CONST menu. You can press |
ꢁto view the following items.
CONST Menu
Items
Description
Value
299792458 m s–1
–2
{ }
Speed of light in vacuum
Standard acceleration of gravity
F
{ }
9.80665 m s
6.673×10 –11 m3 kg– 1s–2
J
{ }
Newtonian constant of
gravitation
ꢆ
3
–1
–1
–1
{
}
}
Molar volume of ideal gas
Avogadro constant
Rydberg constant
Elementary charge
Electron mass
Proton mass
Neutron mass
Muon mass
Boltzmann constant
Planck constant
0.022413996 m mol
#P
{
{
6.02214199×10 23 mol
10973731.5685 m
1.602176462×10
ꢄ
ꢀ
∞
}
ꢁ
–19
{ }
C
kg
kg
kg
H
–31
{
{
{
{
}
}
}
}
9.10938188×10
PH
PR
–27
1.67262158×10
–27
1.67492716×10
P
Q
–28
1.88353109×10
kg
–1
P_
–23
{ }
1.3806503×10
6.62606876×10
1.054571596×10
J K
N
–34
–34
{ }
J s
J s
Wb
K
{
{
{
}
Planck constant over 2 pi
Magnetic flux quantum
Bohr radius
K
–15
}
}
}
2.067833636×10
«
D
µ
µ
µ
–11
5.291772083×10
m
–1
–12
{
Electric constant
8.854187817×10
F m
ε
–1 –1
{ }
{ }
{ }
Molar gas constant
Faraday constant
Atomic mass constant
Magnetic constant
Bohr magneton
Nuclear magneton
Proton magnetic moment
Electron magnetic moment
Neutron magnetic moment
Muon magnetic moment
8.314472 J mol k
–1
96485.3415 C mol
–27
1.66053873×10
kg
W
–2
–1
–1
–1
–1
–1
–1
–6
{
}
1.2566370614×10 NA
_
µ
–24
{
_ꢏ
{
_ꢄ
{
_ꢅ
{
_H
{
WQ
{
__
}
}
}
}
}
}
9.27400899×10
5.05078317×10
1.410606633×10
–9.28476362×10
–9.662364×10
J T
J T
J T
J T
J T
J T
–27
–26
–24
–27
–26
–4.49044813×10
4–8
Real–Number Functions
Items
Description
Value
–15
{
{
}
}
Classical electron radius
Characteristic impendence of
vacuum
2.817940285×10
m
TH
376.730313461 Ω
'
µ
–12
{λ } Compton wavelength
2.426310215×10
m
m
m
F
–15
–15
{λ
{λ
{α}
{σ}
}
}
Neutron Compton wavelength
1.319590898×10
FQ
FR
Proton Compton wavelength
Fine structure constant
Stefan–Boltzmann constant
Celsius temperature
1.321409847×10
–3
7.297352533×10
–2 –4
–8
5.6704×10 W m K
273.15
{ }
V
{a
}
}
Standard atmosphere
101325 Pa
267522212 s–1T–1
VP
͋
{
Proton gyromagnetic ratio
First radiation constant
Second radiation constant
Conductance quantum
R
2
–16
{
{
{
}
}
}
374177107×10
W m
ꢃꢒ
ꢃꢋ
0.014387752 m K
–5
7.748091696×10
S
ꢆ
µ
Reference: Peter J.Mohr and Barry N.Taylor, CODATA Recommended Values of
the Fundamental Physical Constants: 1998, Journal of Physical and Chemical
Reference Data,Vol.28, No.6,1999 and Reviews of Modern Physics,Vol.72,
No.2, 2000.
ꢊ
To insert a constant:
1. Position your cursor where you want the constant inserted.
2. Press | to display the physics constants menu.
3. Press ꢁꢁꢁ (or, you can press | ꢁto access
the next page, one page at a time) to scroll through the menu until the constant
you want is underlined, then press to insert the constant.
Conversion Functions
There are four types of conversions: coordinate (polar/rectangular), angular
(degrees/radians), time (decimal/minutes–seconds), and unit (cm/in, °C/°F, l/gal,
kg/lb).
Real–Number Functions
4–9
Coordinate Conversions
Æ
, Æ
The function names for these conversions are y,x θ,r and θ r y,x.
,
Polar coordinates (r θ) and rectangular coordinates (x,y) are measured as shown
in the illustration. The angle θ uses units set by the current angular mode. A
calculated result for θ will be between –180° and 180°, between –π and π radians,
or between –200 and 200 grads.
To convert between rectangular and polar coordinates:
1. Enter the coordinates (in rectangular or polar form) that you want to convert. In
RPN mode, the order is y x or θ r.
2. Execute the conversion you want: press { r (rectangular–to–polar) or
| s (polar–to–rectangular). The converted coordinates occupy the X–
and Y–registers.
3. The resulting display (the X–register) shows either r (polar result) or x
(rectangular result). Press [ to see θ or y.
y,x θ, r
y
x
θ
Y
X
r
θ
r y, x
,
4–10 Real–Number Functions
Example: Polar to Rectangular Conversion.
In the following right triangles, find sides x and y in the triangle on the left, and
hypotenuse r and angle θ in the triangle on the right.
10
r
y
4
30o
θ
x
3
Keys:
Display:
Description:
{
}
Sets Degrees mode.
Calculates x.
Displays y.
Calculates hypotenuse (r).
Displays θ.
ꢌꢈꢆ
ꢊ
30 10 | s
[
ꢕ) ꢘꢓꢊ
ꢖ)ꢘꢘꢘꢘꢊ
ꢖ)ꢘꢘꢘꢘꢊ
ꢖꢓ)ꢒꢓꢘꢒꢊ
4 3 { r
[
Example: Conversion with Vectors.
Engineer P.C. Bord has determined that in the RC circuit shown, the total
impedance is 77.8 ohms and voltage lags current by 36.5º. What are the values
?
of resistance R and capacitive reactance X in the circuit
C
Use a vector diagram as shown, with impedance equal to the polar magnitude, r,
and voltage lag equal to the angle, θ, in degrees. When the values are converted
to rectangular coordinates, the x–value yields R, in ohms; the y–value yields X , in
C
ohms.
Real–Number Functions 4–11
R
θ
_
36.5o
R
X
c
77.8 ohms
C
Keys:
Display:
Description:
Sets Degrees mode.
Enters θ, degrees of voltage lag.
Enters r, ohms of total impedance.
Calculates x, ohms resistance, R.
{
}
ꢌꢈꢆ
ꢊ
36.5 ^
77.8
.ꢓ )ꢖꢘꢘꢘꢊ
_
ꢗꢗ)ꢕ
| s
[
ꢋ)ꢖꢔꢘꢒꢊ
Displays y, ohms reactance, X .
.ꢔ )ꢋꢗꢗꢋꢊ
C
For more sophisticated operations with vectors (addition, subtraction, cross
product, and dot product), refer to the "Vector Operations" program in chapter 15,
"Mathematics Programs".
Time Conversions
Values for time (in hours, H) or angles (in degrees, D) can be converted between a
decimal–fraction form (H.h or D.d) and a minutes–seconds form (H.MMSSss or
D.MMSSss) using the { t or | u keys.
To convert between decimal fractions and minutes–seconds:
1. Key in the time or angle (in decimal form or minutes–seconds form) that you
want to convert.
2. Press | u or { t. The result is displayed.
Example: Converting Time Formats.
?
How many minutes and seconds are there in 1/7 of an hour Use FIX 6 display
format.
Keys:
Display:
Description:
{
} 6
Sets FIX 6 display format.
1/7 as a decimal fraction.
ꢑꢐ%
ꢊ
1 7
_
ꢘ ꢒ+ꢗ ꢊ
4–12 Real–Number Functions
| u
Equals 8 minutes and 34.29
seconds.
Restores FIX 4 display format.
ꢘ)ꢘꢕꢓꢔꢋꢙꢊ
ꢘ)ꢘꢕꢓꢔꢊ
{
} 4
ꢑꢐ%
Angle Conversions
When converting to radians, the number in the x–register is assumed to be
degrees; when converting to degrees, the number in the x–register is assumed to
be radians.
To convert an angle between degrees and radians:
1. Key in the angle (in decimal degrees or radians) that you want to convert.
2. Press | w or { v. The result is displayed.
Unit Conversions
The HP 33s has eight unit–conversion functions on the keyboard: kg, lb, ºC,
ºF, cm, in, l, gal.
To Convert:
To:
Press:
Displayed Results:
1 lb
kg
lb
1 { }
1 | ~
32 {
100 |
1 {
100 |
1 {
(kilograms)
ꢘ)ꢔꢖꢓ
ꢋ)ꢋꢘꢔ
ꢘ)ꢘꢘꢘꢘ
1 kg
(pounds)
32 ºF
100 ºC
1 in
ºC
ºF
(°C)
(°F)
ꢋꢒꢋ)ꢘꢘꢘꢘ
cm
in
(centimeters)
ꢋ)ꢖꢔꢘꢘ
100 cm
1 gal
1 l
(inches)
ꢓꢙ)ꢓꢗꢘꢒ
l
(liters)
ꢓ)ꢗꢕꢖꢔ
ꢘ)ꢋ ꢔꢋ
gal
1 |
(gallons)
Real–Number Functions 4–13
Probability Functions
Factorial
To calculate the factorial of a displayed non-negative integer x (0 ≤ x ≤ 253), press
{ ꢆ (the left–shifted ꢅ key).
Gamma
To calculate the gamma function of a noninteger x, Γ(x), key in (x – 1) and press
{ ꢆ. The x! function calculates Γ(x + 1). The value for x cannot be a negative
integer.
Probability
Combinations
To calculate the number of possible sets of n items taken r at a time, enter n first,
{ \, then r (nonnegative integers only). No item occurs more than once in a
set, and different orders of the same r items are not counted separately.
Permutations
To calculate the number of possible arrangements of n items taken r at a time, enter
n first, { _, then r (nonnegative integers only). No item occurs more than
once in an arrangement, and different orders of the same r items are counted
separately.
Seed
To store the number in x as a new seed for the random number generator, press
| i.
Random number generator
To generate a random number in the range 0 ≤ x < 1, press | k. (The
number is part of a uniformly–distributed pseudo–random number sequence. It
passes the spectral test of D. Knuth, The Art of Computer Programming, vol. 2,
Seminumerical Algorithms, London: Addison Wesley, 1981.)
4–14 Real–Number Functions
The RANDOM function uses a seed to generate a random number. Each random
number generated becomes the seed for the next random number. Therefore, a
sequence of random numbers can be repeated by starting with the same seed. You
can store a new seed with the SEED function. If memory is cleared, the seed is reset
to zero. A seed of zero will result in the calculator generating its own seed.
Example: Combinations of People.
A company employing 14 women and 10 men is forming a six–person safety
?
committee. How many different combinations of people are possible
Keys:
24 6
Display:
Description:
_
Twenty–four people grouped six
at a time.
ꢊ
{ \
Total number of combinations
possible.
ꢒꢓꢔ8ꢖꢙ )ꢘꢘꢘꢘꢊ
If employees are chosen at random, what is the probability that the committee will
?
contain six women To find the probability of an event, divide the number of
combinations for that event by the total number of combinations.
Keys:
14 6
Display:
Description:
Fourteen women grouped six
at a time.
_
ꢊ
Number of combinations of
six women on the committee.
Brings total number of
combinations back into the
X–register.
{ \
[
ꢓ8ꢘꢘꢓ)ꢘꢘꢘꢘꢊ
ꢒꢓꢔ8ꢖꢙ )ꢘꢘꢘꢘꢊ
Divides combinations of
women by total combinations
to find probability that any
one combination would have
all women.
q
ꢘ)ꢘꢋꢋꢓꢊ
Real–Number Functions 4–15
Parts of Numbers
These functions are primarily used in programming.
Integer part
To remove the fractional part of x and replace it with zeros, press | ". (For
example, the integer part of 14.2300 is 14.0000.)
Fractional part
To remove the integer part of x and replace it with zeros, press | ?. (For
example, the fractional part of 14.2300 is 0.2300)
Absolute value
To replace x with its absolute value, press { B.
Sign value
To indicate the sign of x, press | E. If the x value is negative, –1.0000 is
displayed; if zero, 0.0000 is displayed; if positive, 1.0000 is displayed.
Greatest integer
To obtain the greatest integer equal to or less than given number, press |
K.
Example:
To calculate:
Press:
2.47 | "
2.47 | ?
7 ^ { B
9 | E
5.3 ^ | K
Display:
The integer part of 2.47
The fractional part of 2.47
The absolute value of –7
The sign value of 9
The greatest integer equal to or less
than –5.3
ꢋ)ꢘꢘꢘꢘꢊ
ꢘ)ꢔꢗꢘꢘꢊ
ꢗ)ꢘꢘꢘꢘꢊ
ꢒ)ꢘꢘꢘꢘꢊ
. )ꢘꢘꢘꢘ
The RND function ( { J ) rounds x internally to the number of digits
specified by the display format. (The internal number is represented by 12 digits.)
Refer to chapter 5 for the behavior of RND in Fraction–display mode.
4–16 Real–Number Functions
Names of Functions
You might have noticed that the name of a function appears in the display when
you press and hold the key to execute it. (The name remains displayed for as long
as you hold the key down.) For instance, while pressing O, the display shows
. "SIN" is the name of the function as it will appear in program lines (and
usually in equations also).
ꢐꢄ
Real–Number Functions 4–17
5
Fractions
"Fractions" in chapter 1 introduces the basics about entering, displaying, and
calculating with fractions:
ꢀ
ꢀ
ꢀ
To enter a fraction, press twice — after the integer part, and between the
3
numerator and denominator. To enter 2 / , press 2 3 8. To enter
8
5
/ , press 5 8 or 5 8.
8
To turn Fraction–display mode on and off, press { . When you
turn off Fraction–display mode, the display goes back to the previous display
format. (FIX, SCI, ENG, and ALL also turn off Fraction–display mode.)
Functions work the same with fractions as with decimal numbers — except for
RND, which is discussed later in this chapter.
This chapter gives more information about using and displaying fractions.
Entering Fractions
You can type almost any number as a fraction on the keyboard — including an
improper fraction (where the numerator is larger than the denominator). However,
the calculator displays ¤ if you disregard these two restrictions:
ꢀ
ꢀ
The integer and numerator must not contain more than 12 digits total.
The denominator must not contain more than 4 digits.
Example:
Keys:
Display:
Description:
{
Turns on Fraction–display mode.
Enters 1.5; shown as a fraction.
3
Enters 1 / .
4
Displays x as a decimal number.
Displays x as a fraction.
ꢊ
1.5
1 3 4
{
ꢒ ꢒ+ꢋꢊ
ꢒ ꢓ+ꢔꢊ
ꢒ)ꢗꢖꢘꢘꢊ
ꢒ ꢓ+ꢔꢊ
{
Fractions
5–1
If you didn't get the same results as the example, you may have accidentally
changed how fractions are displayed. (See "Changing the Fraction Display" later
in this chapter.)
The next topic includes more examples of valid and invalid input fractions.
You can type fractions only if the number base is 10 — the normal number base.
See chapter 10 for information about changing the number base.
Fractions in the Display
In Fraction–display mode, numbers are evaluated internally as decimal numbers,
then they're displayed using the most precise fractions allowed. In addition,
accuracy annunciators show the direction of any inaccuracy of the fraction
compared to its 12–digit decimal value. (Most statistics registers are exceptions —
they're always shown as decimal numbers.)
Display Rules
The fraction you see may differ from the one you enter. In its default condition, the
calculator displays a fractional number according to the following rules. (To
change the rules, see "Changing the Fraction Display" later in this chapter.)
ꢀ
The number has an integer part and, if necessary, a proper fraction (the
numerator is less than the denominator).
ꢀ
ꢀ
The denominator is no greater than 4095.
The fraction is reduced as far as possible.
Examples:
These are examples of entered values and the resulting displays. For comparison,
c
d
the internal 12–digit values are also shown. The and annunciators in the last
column are explained below.
5–2
Fractions
Entered Value
Internal Value
Displayed Fraction
3
2 /
2.37500000000
14.4687500000
4.50000000000
9.60000000000
2.83333333333
0.00183105469
(Illegal entry)
ꢋ
ꢓ+ꢕꢊ
8
15
14
/
ꢒꢔ ꢒꢖ+ꢓꢋꢊ
32
54
/
ꢔ
ꢙ
ꢋ
ꢘ
ꢁ
ꢒ+ꢋꢊ
12
18
6
/
ꢓ+ꢖꢊ
5
34
/
/
T
S
ꢖ+ ꢊ
12
8192
15
ꢗ+ꢓꢕꢋꢓꢊ
12345
12345678
/
3
¤
¤
3
16 /
(Illegal entry)
ꢁ
16384
Accuracy Indicators
c
d
The accuracy of a displayed fraction is indicated by the and annunciators at
the right of the display. The calculator compares the value of the fractional part of
the internal 12–digit number with the value of the displayed fraction:
ꢀ
If no indicator is lit, the fractional part of the internal 12–digit value exactly
matches the value of the displayed fraction.
ꢀ
d
If is lit, the fractional part of the internal 12–digit value is slightly less than
the displayed fraction — the exact numerator is no more than 0.5 below the
displayed numerator.
ꢀ
c
If
is lit, the fractional part of the internal 12–digit value is slightly greater
than the displayed fraction — the exact numerator is no more than 0.5 above
the displayed numerator.
c
d
This diagram shows how the displayed fraction relates to nearby values —
means the exact numerator is "a little above" the displayed numerator, and
means the exact numerator is "a little below".
0 7/16
0 7/16
0 7/16
6
6.5
7
7.5
8
/
/
/
/
/
16
16
16
16
16
(0.40625)
(0.43750)
(0.46875)
Fractions
5–3
This is especially important if you change the rules about how fractions are
displayed. (See "Changing the Fraction Display" later.) For example, if you force
2
c
all fractions to have 5 as the denominator, then / is displayed as
3
ꢘ ꢓ+ꢖ
3.3333
3
because the exact fraction is approximately
/ , "a little above" / .
5
5
2
c
Similarly, – / is displayed as
3
because the true numerator is "a little
.ꢘ ꢓ+ꢖ
above" 3.
Sometimes an annunciator is lit when you wouldn't expect it to be. For example, if
2
c
you enter 2 / , you see
, even though that's the exact number you
ꢋ ꢋ+ꢓ
3
entered. The calculator always compares the fractional part of the internal value
and the 12–digit value of just the fraction. If the internal value has an integer part,
its fractional part contains less than 12 digits — and it can't exactly match a
fraction that uses all 12 digits.
Longer Fractions
If the displayed fraction is too long to fit in the display, it's shown with ... at the
beginning. The fraction part always fits — the ... means the integer part isn't
shown completely. To see the integer part (and the decimal fraction), press and
hold | . (You can't scroll a fraction in the display.)
Example:
Keys:
14 ꢊ
|
Display:
Description:
14
...
Calculates e
.
Shows all decimal digits.
Stores value in A.
Views A.
ꢋ ꢘꢔ ꢕꢕꢕ+ꢓꢒꢋꢖꢊ
ꢒꢋꢘꢋ ꢘꢔ)ꢋꢕꢔꢒ ꢊ
I A
| A
...
ꢋ ꢘꢔ ꢕꢕꢕ+ꢓꢒꢋꢖꢊ
ꢀ/ꢊ
...
ꢋ ꢘꢔ ꢕꢕꢕ+ꢓꢒꢋꢖꢊ
Clears x.
ꢘꢊ
Changing the Fraction Display
In its default condition, the calculator displays a fractional number according to
certain rules. (See "Display Rules" earlier in this chapter.) However, you can
change the rules according to how you want fractions displayed:
ꢀ
You can set the maximum denominator that's used.
5–4
Fractions
ꢀ
You can select one of three fraction formats.
The next few topics show how to change the fraction display.
Setting the Maximum Denominator
For any fraction, the denominator is selected based on a value stored in the
calculator. If you think of fractions as a b/c, then /c corresponds to the value that
controls the denominator.
The /c value defines only the maximum denominator used in Fraction–display
mode — the specific denominator that's used is determined by the fraction format
(discussed in the next topic).
ꢀ
To set the /c value, press n |ꢁ, where n is the maximum denominator
you want. n can't exceed 4095. This also turns on Fraction–display mode.
ꢀ
ꢀ
To recall the /c value to the X–register, press 1 | .
To restore the default value or 4095, press 0 | . (You also restore the
default if you use 4095 or greater.) This also turns on Fraction–display mode.
The /c function uses the absolute value of the integer part of the number in the
X–register. It doesn't change the value in the LAST X register.
Choosing a Fraction Format
The calculator has three fraction formats. Regardless of the format, the displayed
fractions are always the closest fractions within the rules for that format.
ꢀ
Most precise fractions. Fractions have any denominator up to the /c
value, and they're reduced as much as possible. For example, if you're
studying math concepts with fractions, you might want any denominator to
be possible (/c value is 4095). This is the default fraction format.
ꢀ
Factors of denominator. Fractions have only denominators that are
factors of the /c value, and they're reduced as much as possible. For
example, if you're calculating stock prices, you might want to see
ꢖꢓ ꢒ+ꢔ
and
( /c value is 8 ). Or if the /c value is 12, possible denominators
ꢓꢗ ꢗ+ꢕ
are 2, 3, 4, 6, and 12.
ꢀ
Fixed denominator. Fractions always use the /c value as the
denominator — they're not reduced. For example, if you're working with time
measurements, you might want to see
( /c value is 60 ).
ꢒ ꢋꢖ+ ꢘ
Fractions
5–5
To select a fraction format, you must change the states of two flags. Each flag can
be "set" or "clear," and in one case the state of flag 9 doesn't matter.
To Get This Fraction Format:
Change These Flags:
8
9
Clear
Set
—
Clear
Set
Most precise
Factors of denominator
Fixed denominator
Set
You can change flags 8 and 9 to set the fraction format using the steps listed here.
(Because flags are especially useful in programs, their use is covered in detail in
chapter 13.)
1. Press | y to get the flag menu.
2. To set a flag, press { } and type the flag number, such as 8.
ꢑ
To clear a flag, press { ) and type the flag number.
ꢃꢑ
To see if a flag is set, press {
} and type the flag number. Press or b
ꢑ @
to clear the
or
response.
&ꢈ
ꢄꢎ
Examples of Fraction Displays
The following table shows how the number 2.77 is displayed in the three fraction
formats for two /c values.
Fraction
Format
How 2.77 Is Displayed
/c = 4095 /c = 16
(2.7700)
(2.7699)
(2.7699)
(2.7692)
(2.7500)
(2.7500)
S
Most Precise
2 77/100
2 10/13
Factors of
Denominator
S
S
S
2 1051/1365
2 3153/4095
2 3/4
2 12/16
S
Fixed Denominator
The following table shows how different numbers are displayed in the three
fraction formats for a /c value of 16.
5–6
Fractions
Fraction
Format ¼
Number Entered and Fraction Displayed
2
16
2
2.5
2 /
2.9999
2
/
25
3
S
T
T
2 9/14
Most precise
2
2
2 1/2
2 2/3
3
3
Factors of
denominator
T
T
T
S
2 5/8
2 1/2
2 11/16
Fixed
denominator
T
S
2 10/16
2 0/16 2 8/16 2 11/16
3 0/16
¼ For a /c value of 16.
Example:
1
5
Suppose a stock has a current value of 48 / . If it goes down 2 / , what would
4
8
?
?
be its value What would then be 85 percent of that value
Keys:
Display:
Description:
| y { } 8 |
Sets flag 8, clears flag 9 for
"factors of denominator"
format.
ꢑ
ꢊ
ꢊ
y { } 9
ꢃꢑ
1
8 |
Sets up fraction format for /
8
increments.
48 1 4
2 5 8 ꢀ
85 Q
Enters the starting value.
Subtracts the change.
ꢔꢕ ꢒ+ꢔꢊ
ꢔꢖ ꢖ+ꢕꢊ
ꢓꢕ ꢓ+ꢔ
S
ꢊ
Finds the 85–percent value to
1
the nearest / .
8
Rounding Fractions
If Fraction–display mode is active, the RND function converts the number in the
X–register to the closest decimal representation of the fraction. The rounding is
done according to the current /c value and the states of flags 8 and 9. The
accuracy indicator turns off if the fraction matches the decimal representation
exactly. Otherwise, the accuracy indicator stays on, (See "Accuracy Indicators"
earlier in this chapter.)
Fractions
5–7
In an equation or program, the RND function does fractional rounding if
Fraction–display mode is active.
Example:
3
Suppose you have a 56 / –inch space that you want to divide into six equal
4
sections. How wide is each section, assuming you can conveniently measure
1
?
?
/
–inch increments What's the cumulative roundoff error
16
Keys:
Display:
Description:
16 |
Sets up fraction format for
1
ꢊ
/
–inch increments. (Flags 8
16
and 9 should be the same as for
the previous example.)
56 3 4 I D
6 q
Stores the distance in D.
ꢖ
ꢓ+ꢔꢊ
S
ꢊ
The sections are a bit wider than
7
ꢙ ꢗ+ꢒ
9 / inches.
16
{ J
6 z
L D ꢀ
| y { } 8
{
Rounds the width to this value.
Width of six sections.
The cumulative round off error.
Clears flag 8.
ꢙ ꢗ+ꢒ ꢊ
ꢖ
ꢖ+ꢕꢊ
.ꢘ ꢒ+ꢕꢊ
.ꢘ ꢒ+ꢕꢊ
ꢃꢑ
Turns off Fraction–display mode.
.ꢘ)ꢒꢋꢖꢘꢊ
Fractions in Equations
When you're typing an equation, you can't type a number as a fraction. When an
equation is displayed, all numeric values are shown as decimal values —
Fraction–display mode is ignored.
When you're evaluating an equation and you're prompted for variable values,
you may enter fractions — values are displayed using the current display format.
See chapter 6 for information about working with equations.
5–8
Fractions
Fractions in Programs
When you're typing a program, you can type a number as a fraction — but it's
converted to its decimal value. All numeric values in a program are shown as
decimal values — Fraction–display mode is ignored.
When you're running a program, displayed values are shown using
Fraction–display mode if it's active. If you're prompted for values by INPUT
instructions, you may enter fractions, regardless of the display mode.
A program can control the fraction display using the /c function and by setting
and clearing flags 7, 8, and 9. Setting flag 7 turns on Fraction–display mode —
{ isn't programmable. See "Flags" in chapter 13.
See chapters 12 and 13 for information about working with programs.
Fractions
5–9
6
Entering and Evaluating Equations
How You Can Use Equations
You can use equations on the HP 33s in several ways:
ꢀ
ꢀ
ꢀ
For specifying an equation to evaluate (this chapter).
For specifying an equation to solve for unknown values (chapter 7).
For specifying a function to integrate (chapter 8).
Example: Calculating with an Equation.
Suppose you frequently need to determine the volume of a straight section of pipe.
The equation is
2
V = .25 π d l
where d is the inside diameter of the pipe, and l is its length.
You could key in the calculation over and over; for example, .25 |
1
N z 2.5 ! z 16 z calculates the volume of 16 inches of 2 / –inch
2
diameter pipe (78.5398 cubic inches). However, by storing the equation, you get
the HP 33s to "remember" the relationship between diameter, length, and
volume — so you can use it many times.
Put the calculator in Equation mode and type in the equation using the following
keystrokes:
Keys:
Display:
Description:
| H
Selects Equation mode, shown
by the EQN annunciator.
ꢈꢉꢄꢊꢂꢐ !ꢊ!ꢎꢅꢊ
or the current equation
ꢊ
Entering and Evaluating Equations
6–1
L
Begins a new equation, turning
¾ꢊ
on the " " equation–entry
¾
cursor. L turns on the A..Z
annunciator so you can enter a
variable name.
V | d
.25
L V types and moves the
cursor to the right.
Digit entry uses the "_"
digit–entry cursor.
#/¾ꢊ
#
_
#/ꢊꢘ)ꢋꢖ ꢊ
z | N z
z ends the number and
#/ꢘ)ꢋꢖº º¾ꢊ
π
restores the " " cursor.
¾
L D ꢄ 2
z L L
_
ꢄ types
.
#/ꢘ)ꢋꢖº ºꢌ: ꢋ ꢊ
:
#/ꢘ)ꢋꢖºπºꢌ:ꢋºꢂ¾ꢊ
#/ꢘ)ꢋꢖºπºꢌ:ꢋºꢂꢊ
Terminates and displays the
equation.
π
|
Shows the checksum and length
for the equation, so you can
check your keystrokes.
ꢃꢚ/ꢔꢙꢃꢀꢊ
ꢂꢄ/ꢒꢔꢊ
By comparing the checksum and length of your equation with those in the example,
you can verify that you've entered the equation properly. (See "Verifying
Equations" at the end of this chapter for more information.)
Evaluate the equation ( to calculate V ):
Keys:
Display:
Description:
Prompts for variables on the
right–hand side of the equation.
Prompts for D first; value is the
current value of D.
ꢌ@ꢊ
value
ꢊ
1
2 1 2
g
Enters 2 / inches as a fraction.
2
ꢌ@ꢊ
_
ꢋ
ꢒ+ꢋ ꢊ
Stores D, prompts for L; value is
current value of L.
Stores L; calculates V in cubic
inches and stores the result in V.
ꢂ@ꢊ
value
ꢊ
16 g
#/ꢊ
ꢗꢕ)ꢖꢓꢙꢕꢊ
6–2
Entering and Evaluating Equations
Summary of Equation Operations
All equations you create are saved in the equation list. This list is visible whenever
you activate Equation mode.
You use certain keys to perform operations involving equations. They're described
in more detail later.
Key
Operation
| H
Enters and leaves Equation mode.
Evaluates the displayed equation. If the equation is an
assignment, evaluates the right–hand side and stores the
result in the variable on the left–hand side. If the equation
is an equality or expression, calculates its value like
X. (See "Types of Equations" later in this chapter.)
X
Evaluates the displayed equation. Calculates its value,
replacing "=" with "–" if an "=" is present.
| ꢎ
b
Solves the displayed equation for the unknown variable
you specify. (See chapter 7.)
Integrates the displayed equation with respect to the
variable you specify. (See chapter 8.)
Begins editing the displayed equation; subsequent
presses delete the rightmost function or variable.
{ c
ꢁor
{ꢁjꢁꢁ
{ꢁh
Deletes the displayed equation from the equation list.
Steps up or down through the equation list.
Goes to the top line of the equation or program list.
Goes to the last line of the equation or program list.
|
Shows the displayed equation's checksum (verification
value) and length (bytes of memory).
Leaves Equation mode.
You can also use equations in programs — this is discussed in chapter 12.
Entering and Evaluating Equations
6–3
Entering Equations into the Equation List
The equation list is a collection of equations you enter. The list is saved in the
calculator's memory. Each equation you enter is automatically saved in the
equation list.
To enter an equation:
1. Make sure the calculator is in its normal operating mode, usually with a
number in the display. For example, you can't be viewing the catalog of
variables or programs.
2. Press | H. The EQN annunciator shows that Equation mode is active,
and an entry from the equation list is displayed.
3. Start typing the equation. The previous display is replaced by the equation
you're entering — the previous equation isn't affected. If you make a mistake,
press b as required. You can enter up to 255 characters per equation.
4. Press to terminate the equation and see it in the display. The equation
is automatically saved in the equation list — right after the entry that was
displayed when you started typing. (If you press instead, the equation is
saved, but Equation mode is turned off.)
Equations can contain variables, numbers, functions, and parentheses — they're
described in the following topics. The example that follows illustrates these
elements.
Variables in Equations
You can use any of the calculator's 28 variables in an equation: A through Z, i,
and (i). You can use each variable as many times as you want. (For information
about (i), see "Indirectly Addressing Variables and Labels" in chapter 13.)
To enter a variable in an equation, press L variable (or I variable). When
you press L, the A..Z annunciator shows that you can press a variable key to
enter its name in the equation.
6–4
Entering and Evaluating Equations
Numbers in Equations
You can enter any valid number in an equation except fractions and numbers that
aren't base 10 numbers. Numbers are always shown using ALL display format,
which displays up to 12 characters.
To enter a number in an equation, you can use the standard number–entry keys,
including , ^, and a. Press ^ only after you type one or more digits.
Don't use ^ for subtraction.
When you start entering the number, the cursor changes from " " to "_" to show
¾
numeric entry. The cursor changes back when you press a nonnumeric key.
Functions in Equations
You can enter many HP 33s functions in an equation. A complete list is given
under “Equation Functions” later in this chapter. Appendix G, "Operation Index,"
also gives this information.
When you enter an equation, you enter functions in about the same way you put
them in ordinary algebraic equations:
ꢀ
In an equation, certain functions are normally shown between their
arguments, such as "+" and "÷". For such infix operators, enter them in an
equation in the same order.
ꢀ
Other functions normally have one or more arguments after the function
name, such as "COS" and "LN". For such prefix functions, enter them in an
equation where the function occurs — the key you press puts a left
parenthesis after the function name so you can enter its arguments.
If the function has two or more arguments, press § (on the key) to
separate them.
If the function is followed by other operations, press | ` to complete the
function arguments.
Entering and Evaluating Equations
6–5
Parentheses in Equations
You can include parentheses in equations to control the order in which operations
are performed. Press | ] and | ` to insert parentheses. (For more
information, see "Operator Precedence" later in this chapter.)
Example: Entering an Equation.
Enter the equation r = 2 × c × cos (t – a)+25
Keys:
Display:
Description:
| H
π
Shows the last equation used in
the equation list.
#/ꢘ)ꢋꢖº ºꢌ:ꢋºꢂꢊ
L R | d
Starts a new equation with
variable R.
ꢁ/¾ꢊ
2
_
Enters a number, changing the
cursor to "_".
ꢁ/ ꢋ ꢊ
z L C z
R
Enters infix operators.
Enters a prefix function with a
left parenthesis.
ꢁ/ꢋºꢃº¾ꢊ
ꢁ/ꢋºꢃºꢃꢎ 1¾ꢊ
L T ꢀ L A
| ` 25
Enters the argument and right
parenthesis.
Terminates the equation and
displays it.
ꢊ
_
ºꢃꢎ 1!.ꢀ2-ꢊꢋꢖꢊ ꢊ
ꢁ/ꢋºꢃºꢃꢎ 1!.ꢀ2ꢊ
|
Shows its checksum and length.
ꢃꢚ/ꢒꢌꢒꢘꢊ
ꢂꢄ/ꢒꢗꢊ
ꢊ
Leaves Equation mode.
Displaying and Selecting Equations
The equation list contains the equations you've entered. You can display the
equations and select one to work with.
To display equations:
1. Press | H. This activates Equation mode and turns on the EQN
annunciator. The display shows an entry from the equation list:
6–6
Entering and Evaluating Equations
ꢀ
ꢀ
if there are no equations in the equation list or if the
equation pointer is at the top of the list.
The current equation (the last equation you viewed).
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
2. Press or to step through the equation list and view each equation.
The list "wraps around" at the top and bottom.
"top" of the list.
marks the
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
To view a long equation:
1. Display the equation in the equation list, as described above. If it's more than
14 characters long, only 14 characters are shown. The
indicates more characters to the right.
annunciator
¨
2. Press to scroll the equation one character at a time, showing characters
to the right. Press to show characters to the left.
there are no more characters to the left or right.
and
turn off if
§
¨
To select an equation:
Display the equation in the equation list, as described above. The displayed
equation is the one that's used for all equation operations.
Example: Viewing an Equation.
View the last equation you entered.
Keys:
Display:
Description:
| H
Displays the current equation in the
equation list.
ꢁ/ꢋºꢃºꢃꢎ 1!.ꢀ2ꢊ
Shows three more characters to the
right.
ºꢃºꢃꢎ 1!.ꢀ2-ꢋꢖꢊ
Shows one character to the left.
Leaves Equation mode.
ꢋºꢃºꢃꢎ 1!.ꢀ2-ꢋꢊ
ꢊ
Editing and Clearing Equations
You can edit or clear an equation that you're typing. You can also edit or clear
equations saved in the equation list.
Entering and Evaluating Equations
6–7
To edit an equation you're typing:
1. Press b repeatedly until you delete the unwanted number or function.
If you're typing a decimal number and the "_" digit–entry cursor is on, b
deletes only the rightmost character. If you delete all characters in the number,
the calculator switches back to the " " equation–entry cursor.
¾
If the " " equation–entry cursor is on, pressing b deletes the entire rightmost
¾
number or function.
2. Retype the rest of the equation.
3. Press (or ) to save the equation in the equation list.
To edit a saved equation:
1. Display the desired equation. (See "Displaying and Selecting Equations"
above.)
2. Press b (once only) to start editing the equation. The " " equation–entry
¾
cursor appears at the end of the equation. Nothing is deleted from the
equation.
3. Use b to edit the equation as described above.
4. Press (or ) to save the edited equation in the equation list,
replacing the previous version.
To clear an equation you're typing:
Press { c then press { }. The display goes back to the previous entry in
&
the equation list.
To clear a saved equation:
1. Display the desired equation. (See "Displaying and Selecting Equations"
above.)
2. Press { c. The display shows the previous entry in the equation list.
To clear all equations, clear them one at a time: scroll through the equation list until
you come to
each equation is displayed until you see
, press , then press { c repeatedly as
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
.
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
Example: Editing an Equation.
Remove 25 in the equation from the previous example.
6–8
Entering and Evaluating Equations
Keys:
Display:
Description:
| H
Shows the current equation in the
equation list.
ꢁ/ꢋºꢃºꢃꢎ 1!.ꢀ2ꢊ
b
Turns on Equation–entry mode and
ꢃºꢃꢎ 1!.ꢀ2-ꢋꢖ¾ꢊ
shows the " " cursor at the end of
¾
the equation.
b b
Deletes the number 25.
Shows the end of edited equation
in the equation list.
/ꢋºꢃºꢃꢎ 1!.ꢀ2¾ꢊ
ꢁ/ꢋºꢃºꢃꢎ 1!.ꢀ2ꢊ
Leaves Equation mode.
ꢊ
Types of Equations
The HP 33s works with three types of equations:
ꢀ
ꢀ
ꢀ
Equalities. The equation contains an "=", and the left side contains more
than just a single variable. For example, x + y = r is an equality.
2
2
2
Assignments. The equation contains an "=", and the left side contains
just a single variable. For example, A = 0.5 × b × h is an assignment.
3
Expressions. The equation does not contain an "=". For example, x + 1
is an expression.
When you're calculating with an equation, you might use any type of equation —
although the type can affect how it's evaluated. When you're solving a problem
for an unknown variable, you'll probably use an equality or assignment. When
you're integrating a function, you'll probably use an expression.
Evaluating Equations
One of the most useful characteristics of equations is their ability to be
evaluated — to generate numeric values. This is what enables you to calculate a
result from an equation. (It also enables you to solve and integrate equations, as
described in chapters 7 and 8).
Entering and Evaluating Equations
6–9
Because many equations have two sides separated by "=", the basic value of an
equation is the difference between the values of the two sides. For this calculation,
"=" in an equation essentially treated as "ಥ". The value is a measure of how well
the equation balances.
The HP 33s has two keys for evaluating equations: and X. Their
actions differ only in how they evaluate assignment equations:
ꢀ
ꢀ
X returns the value of the equation, regardless of the type of equation.
ꢁreturns the value of the equation — unless it's an assignment–type
equation. For an assignment equation, returns the value of the right
side only, and also "enters" that value into the variable on the left side — it
stores the value in the variable.
The following table shows the two ways to evaluate equations.
Type of Equation
Result for
Result for X
Equality: g(x) = f(x)
Example: x + y = r
g(x) – f(x)
2
2
2
2
2
2
x + y – r
¼
Assignment: y = f(x)
Example: A = 0.5 × b x h
f(x)
0.5 × b × h
y – f(x)
A – 0.5 × b × h
¼
Expression: f(x)
Example: x + 1
f(x)
3
3
x + 1
¼
Also stores the result in the left–hand variable, A for example.
To evaluate an equation:
1. Display the desired equation. (See "Displaying and Selecting Equations"
above.)
2. Press or X. The equation prompts for a value for each variable
needed. (If you've changed the number base, it's automatically changed back
to base 10.)
3. For each prompt, enter the desired value:
ꢀ
If the displayed value is good, press g.
ꢀ
If you want a different value, type the value and press g. (Also see
"Responding to Equation Prompts" later in this chapter.)
6–10 Entering and Evaluating Equations
The evaluation of an equation takes no values from the stack — it uses only
numbers in the equation and variable values. The value of the equation is returned
to the X–register. The LAST X register isn't affected.
Using ENTER for Evaluation
If an equation is displayed in the equation list, you can press to evaluate
the equation. (If you're in the process of typing the equation, pressing only
ends the equation — it doesn't evaluate it.)
ꢀ
If the equation is an assignment, only the right–hand side is evaluated. The
result is returned to the X–register and stored in the left–hand variable, then
the variable is VIEWed in the display. Essentially, finds the value of
the left–hand variable.
ꢀ
If the equation is an equality or expression, the entire equation is
evaluated — just as it is for X. The result is returned to the X–register.
Example: Evaluating an Equation with ENTER.
Use the equation from the beginning of this chapter to find the volume of a 35–mm
diameter pipe that's 20 meters long.
Keys:
Display:
Description:
| H
π
Displays the desired
equation.
#/ꢘ)ꢋꢖº ºꢌ:ꢋºꢂꢊ
( as required)
Starts evaluating the
assignment equation so the
value will be stored in V.
Prompts for variables on the
right–hand side of the
equation. The current value
for D is 2.5000.
ꢌ@ꢊ
ꢋ)ꢖꢘꢘꢘꢊ
35 g
Stores D, prompts for L,
whose current value is
16.0000.
ꢂ@ꢊ
ꢒ )ꢘꢘꢘꢘꢊ
20 1000
z g
Stores L in millimeters;
calculates V in cubic
millimeters, stores the result
in V, and displays V.
ꢊ
#/ꢊ
ꢒꢙ8ꢋꢔꢋ8ꢋꢖꢖ)ꢘꢘꢓꢋꢊ
Entering and Evaluating Equations 6–11
a 6 q
Changes cubic millimeters to
liters (but doesn't change V).
ꢒꢙ)ꢋꢔꢋꢓꢊ
Using XEQ for Evaluation
If an equation is displayed in the equation list, you can press X to evaluate the
equation. The entire equation is evaluated, regardless of the type of equation. The
result is returned to the X–register.
Example: Evaluating an Equation with XEQ.
Use the results from the previous example to find out how much the volume of the
pipe changes if the diameter is changed to 35.5 millimeters.
Keys:
Display:
Description:
| H
X
π
Displays the desired equation.
Starts evaluating the equation to
find its value. Prompts for all
variables.
#/ꢘ)ꢋꢖº ºꢌ:ꢋºꢂꢊ
#@ꢊ
ꢒꢙ8ꢋꢔꢋ8ꢋꢖꢖ)ꢘꢘꢓꢋꢊ
g
Keeps the same V, prompts for D.
ꢌ@ꢊ
ꢓꢖ)ꢘꢘꢘꢘꢊ
ꢂ@ꢊ
35.5 gꢁ
g
Stores new D, Prompts for L.
ꢋꢘ8ꢘꢘꢘ)ꢘꢘꢘꢘꢊ
.ꢖꢖꢓ8ꢗꢘꢖ)ꢗꢘꢖꢋꢊ
Keeps the same L; calculates the
value of the equation — the
imbalance between the left and
right sides.
a 6 q
Changes cubic millimeters to liters.
.ꢘ)ꢖꢖꢓꢗꢊ
The value of the equation is the old volume (from V) minus the new volume
(calculated using the new D value) — so the old volume is smaller by the amount
shown.
Responding to Equation Prompts
When you evaluate an equation, you're prompted for a value for each variable
that's needed. The prompt gives the variable name and its current value, such as
.
%@ꢋ)ꢖꢘꢘꢘ
ꢀ
To leave the number unchanged, just press g.
6–12 Entering and Evaluating Equations
ꢀ
To change the number, type the new number and press g. This new
number writes over the old value in the X–register. You can enter a number as
a fraction if you want. If you need to calculate a number, use normal
keyboard calculations, then press g. For example, you can press 2
5 ꢄ g.
ꢀ
ꢀ
To calculate with the displayed number, press before
typing another number.
To cancel the prompt, press . The current value for the variable
remains in the X–register. If you press during digit entry, it clears the
number to zero. Press again to cancel the prompt.
ꢀ
To display digits hidden by the prompt, press | .
Each prompt puts the variable value in the X–register and disables stack lift. If
you type a number at the prompt, it replaces the value in the X–register. When you
press g, stack lift is enabled, so the value is retained on the stack.
The Syntax of Equations
Equations follow certain conventions that determine how they're evaluated:
ꢀ
ꢀ
ꢀ
How operators interact.
What functions are valid in equations.
How equations are checked for syntax errors.
Operator Precedence
Operators in an equation are processed in a certain order that makes the
evaluation logical and predictable:
Entering and Evaluating Equations 6–13
Order
Operation
Example
1
2
3
4
5
6
Functions and Parentheses
Power ( ꢄ )
,
ꢐꢄ1%-ꢒ2 1%-ꢒ2ꢊ
%:ꢓꢊ
.ꢀꢊ
Unary Minus (^)
Multiply and Divide
Add and Subtract
Equality
,
%º& ꢀªꢏꢊ
,
ꢅ-ꢉ ꢀ.ꢏꢊ
ꢏ/ꢃꢊ
So, for example, all operations inside parentheses are performed before
operations outside the parentheses.
Examples:
Equations
Meaning
3
a × (b ) = c
ꢀºꢏ:ꢓ/ꢃꢊ
1ꢀºꢏ2:ꢓ/ꢃ
ꢀ-ꢏªꢃ/ꢒꢋ
3
(a × b) = c
a + (b/c) = 12
(a + b) / c = 12
1ꢀ-ꢏ2ªꢃ/ꢒꢋꢊ
2
[%CHG ((t + 12), (a – 6)) ]
0ꢃꢍꢆ1!-ꢒꢋ(ꢀ. 2:ꢋꢊ
You can't use parentheses for implied multiplication. For example, the expression
p (1 – f) must be entered as
and the left parenthesis.
, with the " " operator inserted between P
ꢅº1ꢒ.ꢑ2
º
6–14 Entering and Evaluating Equations
Equation Functions
The following table lists the functions that are valid in equations. Appendix G,
"Operation Index" also gives this information.
LN
LOG
IP
EXP
ALOG
RND
SQ
SQRT
x!
INV
SGN
SIN
FP
ABS
INTG
COS
COSH
IDIV
TAN
TANH
RMDR
ASIN
ACOS
ATAN
SINH
ASINH
ACOSH
%CHG
ATANH
XROOT
DEG
RAD
HR
HMS
CB
CBRT
Cn,r
Pn,r
KG
LB
°C
°F
CM
IN
+
–
L
GAL
RANDOM
π
×
÷
^
x
m
y
sx
sy
σ x
σ y
r
ˆ
y
w
b
x
ˆ
x
2
2
n
Σx
Σy
Σx
Σy
Σxy
For convenience, prefix–type functions, which require one or two arguments,
display a left parenthesis when you enter them.
The prefix functions that require two arguments are %CHG, RND, XROOT, IDIV,
RMDR, Cn,r and Pn,r. Separate the two arguments with a colon.
In an equation, the XROOT function takes its arguments in the opposite order from
RPN usage. For example, –8 3 ꢇ to is equivalent to
.
%ꢁꢎꢎ!1ꢓ(.ꢕ2
All other two–argument functions take their arguments in the Y, X order used for
RPN. For example, 28 4 { \ is equivalent to
.
ꢃQ8T1ꢋꢕ(ꢔ2
For two–argument functions, be careful if the second argument is negative. For a
number or variable, use ^ or ꢀ. These are valid equations:
Entering and Evaluating Equations 6–15
0ꢃꢍꢆ1.%(.ꢋ2ꢊ
0ꢃꢍꢆ1%(1.&22ꢊ
Eleven of the equation functions have names that differ from their equivalent
operations:
Operation
Equation function
2
x
SQ
SQRT
EXP
x
x
e
x
10
ALOG
INV
1/x
X
y
x
XROOT
^
y
INT÷
Rmdr
IDIV
RMDR
CB
3
x
3
CBRT
x
Example: Perimeter of a Trapezoid.
The following equation calculates the perimeter of a trapezoid. This is how the
equation might appear in a book:
1
1
+
)
Perimeter = a + b + h ( sinθ sinφ
a
h
φ
θ
b
The following equation obeys the syntax rules for HP 33s equations:
6–16 Entering and Evaluating Equations
Parentheses used to group items
P=A+B+Hx(1
Ί
SIN(T)+1 SIN(F))
Ί
Single
letter
name
No implied
multiplication
Division is done
before addition
Th
e next equation also obeys the syntax rules. This equation uses the inverse
function,
, instead of the fractional form,
. Notice that
ꢐꢄ#1 ꢐꢄ1!22
ꢒª ꢐꢄ1!2
the SIN function is "nested" inside the INV function. (INV is typed by ꢅ.)
ꢅ/ꢀ-ꢏ-ꢍº1ꢐꢄ#1 ꢐꢄ1!22-ꢐꢄ#1 ꢐꢄ1ꢑ222ꢊ
Example: Area of a Polygon.
The equation for area of a regular polygon with n sides of length d is:
1
4
cos(π /n)
sin(π/n)
n d 2
Area =
d
2
π/n
You can specify this equation as
π
π
ꢀ/ꢘ)ꢋꢖºꢄºꢌ:ꢋºꢃꢎ 1 ªꢄ2ª ꢐꢄ1 ªꢄ2ꢊ
Notice how the operators and functions combine to give the desired equation.
You can enter the equation into the equation list using the following keystrokes:
A
| H L |
.25
N
z L z L ꢄ z R |
D
2
N
N q L | ` q O | N q L | `
N
Entering and Evaluating Equations 6–17
Syntax Errors
The calculator doesn't check the syntax of an equation until you evaluate the
equation and respond to all the prompts — only when a value is actually being
calculated. If an error is detected,
the equation to correct the error. (See "Editing and Clearing Equations" earlier in
this chapter.)
is displayed. You have to edit
ꢐꢄ#ꢀꢂꢐꢌ ꢈꢉꢄ
By not checking equation syntax until evaluation, the HP 33s lets you create
"equations" that might actually be messages. This is especially useful in programs,
as described in chapter 12.
Verifying Equations
When you're viewing an equation — not while you're typing an equation — you
can press | to show you two things about the equation: the equation's
checksum and its length. Hold the key to keep the values in the display.
The checksum is a four–digit hexadecimal value that uniquely identifies this
equation. No other equation will have this value. If you enter the equation
incorrectly, it will not have this checksum. The length is the number of bytes of
calculator memory used by the equation.
The checksum and length allow you to verify that equations you type are correct.
The checksum and length of the equation you type in an example should match the
values shown in this manual.
Example: Checksum and Length of an Equation.
Find the checksum and length for the pipe–volume equation at the beginning of
this chapter.
Keys:
Display:
Description:
| H
π
Displays the desired
equation.
#/ꢘ)ꢋꢖº ºꢌ:ꢋºꢂꢊ
( ꢁas required)
| ꢁ(hold)
Display equation's checksum
and length.
Redisplays the equation.
Leaves Equation mode.
ꢃꢚ/ꢔꢙꢃꢀꢊ
ꢂꢄ/ꢒꢔꢊ
(release)
π
#/ꢘ)ꢋꢖº ºꢌ:ꢋºꢂꢊ
ꢊ
6–18 Entering and Evaluating Equations
7
Solving Equations
In chapter 6 you saw how you can use to find the value of the left–hand
variable in an assignment–type equation. Well, you can use SOLVE to find the
value of any variable in any type of equation.
For example, consider the equation
2
x – 3y = 10
If you know the value of y in this equation, then SOLVE can solve for the unknown
x. If you know the value of x, then SOLVE can solve for the unknown y. This works
for "word problems" just as well:
Markup × Cost = Price
If you know any two of these variables, then SOLVE can calculate the value of the
third.
When the equation has only one variable, or when known values are supplied for
all variables except one, then to solve for x is to find a root of the equation. A root
of an equation occurs where an equality or assignment equation balances exactly,
or where an expression equation equals zero. (This is equivalent to the value of the
equation being zero.)
Solving an Equation
To solve an equation for an unknown variable:
1. Press | H and display the desired equation. If necessary, type the
equation as explained in chapter 6 under "Entering Equations into the
Equation List."
2. Press then press the key for the unknown variable. For example, press
X to solve for x. The equation then prompts for a value for every other
variable in the equation.
3. For each prompt, enter the desired value:
Solving Equations
7–1
ꢀ
ꢀ
If the displayed value is the one you want, press g.
If you want a different value, type or calculate the value and press g.
(For details, see "Responding to Equation Prompts" in chapter 6.)
You can halt a running calculation by pressing or g.
When the root is found, it's stored in the unknown variable, and the variable value
is VIEWed in the display. In addition, the X–register contains the root, the
Y–register contains the previous estimate, and the Z–register contains the value of
the equation at the root (which should be zero).
For some complicated mathematical conditions, a definitive solution cannot be
found — and the calculator displays
later in this chapter, and "Interpreting Results" and "When SOLVE Cannot Find a
Root" in appendix D.
. See "Verifying the Result"
ꢄꢎ ꢁꢎꢎ! ꢑꢎ"ꢄꢌ
For certain equations it helps to provide one or two initial guesses for the unknown
variable before solving the equation. This can speed up the calculation, direct the
answer toward a realistic solution, and find more than one solution, if appropriate.
See "Choosing Initial Guesses for Solve" later in this chapter.
Example: Solving the Equation of Linear Motion.
The equation of motion for a free–falling object is:
1
2
d = v t + / g t
0
2
where d is the distance, v is the initial velocity, t is the time, and g is the
0
acceleration due to gravity.
Type in the equation:
Keys:
Display:
Description:
Clears memory.
{ c {
| H
} { }
&
ꢀꢂꢂ
ꢊ
Selects Equation mode.
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅꢊ
or current equation
ꢊ
L D | d L V
z L T
.5 z L G z L T
ꢄ 2
Starts the equation.
ꢊ
ꢌ/#º!-¾ꢊ
ꢊ
_
#º!-ꢘ)ꢖºꢆº!: ꢋ ꢊ
7–2
Solving Equations
Terminates the equation
and displays the left end.
Checksum and length.
ꢌ/#º!-ꢘ)ꢖºꢆº!:ꢋꢊ
|
ꢃꢚ/ꢑꢏꢓꢃꢊ
ꢂꢄ/ꢒꢖꢊ
g (acceleration due to gravity) is included as a variable so you can change it for
2
2
different units (9.8 m/s or 32.2 ft/s ).
Calculate how many meters an object falls in 5 seconds, starting from rest. Since
Equation mode is turned on and the desired equation is already in the display, you
can start solving for D:
Keys:
Display:
Description:
D
_
Prompts for unknown
variable.
Selects D; prompts for V.
ꢎꢂ#ꢈ ꢊ
#@ꢊ
value
ꢊ
ꢊ
ꢊ
0 g
5 g
9.8 g
Stores 0 in V; prompts for
T.
Stores 5 in T; prompts for
G.
Stores 9.8 in G; solves
for D.
!@ꢊ
value
ꢆ@ꢊ
value
ꢎꢂ#ꢐꢄꢆꢊ
ꢌ/ꢊ
ꢒꢋꢋ)ꢖꢘꢘꢘꢊ
Try another calculation using the same equation: how long does it take an object
?
to fall 500 meters from rest
Keys:
Display:
Description:
| H
Displays the equation.
Solves for T; prompts for
D.
Stores 500 in D; prompts
for V.
Retains 0 in V; prompts
for G.
Retains 9.8 in G; solves
for T.
ꢌ/#º!-ꢘ)ꢖºꢆº!:ꢋꢊ
ꢌ@ꢊ
T
ꢒꢋꢋ)ꢖꢘꢘꢘꢊ
#@ꢊ
500 g
g
ꢘ)ꢘꢘꢘꢘꢊ
ꢆ@ꢊ
ꢙ)ꢕꢘꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
!/ꢊ
g
ꢒꢘ)ꢒꢘꢒꢖꢊ
Solving Equations
7–3
Example: Solving the Ideal Gas Law Equation.
The Ideal Gas Law describes the relationship between pressure, volume,
temperature, and the amount (moles) of an ideal gas:
P × V = N × R × T
2
where P is pressure (in atmospheres or N/m ), V is volume (in liters), N is the
number of moles of gas, R is the universal gas constant (0.0821 liter–atm/mole–K
or 8.314 J/mole–K), and T is temperature (Kelvins: K=°C + 273.1).
Enter the equation:
Keys:
Display:
Description:
| H L P z
Selects Equation mode
and starts the equation.
ꢅº¾ꢊ
L V | dꢁ
L N zꢁ
L R z L T
ꢊ
ꢊ
ꢅº#/ꢄºꢁº!¾ꢊ
ꢅº#/ꢄºꢁº!ꢊ
Terminates and displays
the equation.
|
Checksum and length.
ꢃꢚ/ꢈꢌꢃꢕꢊ
ꢂꢄ/ꢙꢊ
A 2–liter bottle contains 0.005 moles of carbon dioxide gas at 24°C. Assuming
that the gas behaves as an ideal gas, calculate its pressure. Since Equation mode
is turned on and the desired equation is already in the display, you can start
solving for P:
Keys:
Display:
Description:
P
2 g
Solves for P; prompts for
V.
Stores 2 in V; prompts for
N.
Stores .005 in N;
prompts for R.
Stores .0821 in R;
prompts for T.
#@ꢊ
value
ꢊ
ꢊ
ꢊ
ꢊ
ꢄ@ꢊ
value
.005 g
ꢁ@ꢊ
value
.0821 g
!@ꢊ
value
24 273.1
Calculates T (Kelvins).
!@ꢊ
ꢋꢙꢗ)ꢒꢘꢘꢘꢊ
7–4
Solving Equations
g
Stores 297.1 in T; solves
for P in atmospheres.
ꢎꢂ#Oꢄꢆꢊ
ꢅ/ꢊ
ꢘ)ꢘ ꢒꢘꢊ
A 5–liter flask contains nitrogen gas. The pressure is 0.05 atmospheres when the
temperature is 18°C. Calculate the density of the gas (N × 28/V, where 28 is the
molecular weight of nitrogen).
Keys:
Display:
Description:
| H
Displays the equation.
Solves for N; prompts for
P.
Stores .05 in P; prompts
for V.
Stores 5 in V; prompts for
R.
Retains previous R;
prompts for T.
ꢅº#/ꢄºꢁº!ꢊ
ꢅ@ꢊ
N
.05 g
5 g
ꢘ)ꢘ ꢒꢘꢊ
#@ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢁ@ꢊ
ꢘ)ꢘꢕꢋꢒꢊ
!@ꢊ
g
ꢋꢙꢗ)ꢒꢘꢘꢘꢊ
!@ꢊ
18 ꢁ273.1
g
Calculates T (Kelvins).
ꢋꢙꢒ)ꢒꢘꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢄ/ꢊ
Stores 291.1 in T; solves
for N.
ꢘ)ꢘꢒꢘꢖꢊ
ꢘ)ꢋꢙꢋꢙꢊ
28 z
Calculates mass in
grams, N × 28.
L V q
Calculates density in
grams per liter.
ꢘ)ꢘꢖꢕ ꢊ
Understanding and Controlling SOLVE
SOLVE first attempts to solve the equation directly for the unknown variable. If the
attempt fails, SOLVE changes to an iterative(repetitive) procedure. The procedure
starts by evaluating the equation using two initial guesses for the unknown variable.
Based on the results with those two guesses, SOLVE generates another, better
guess. Through successive iterations, SOLVE finds a value for the unknown that
makes the value of the equation equal to zero.
Solving Equations
7–5
When SOLVE evaluates an equation, it does it the same way X does — any
"=" in the equation is treated as a " – ". For example, the Ideal Gas Law equation
is evaluated as P × V – (N × R × T). This ensures that an equality or assignment
equation balances at the root, and that an expression equation equals zero at the
root.
Some equations are more difficult to solve than others. In some cases, you need to
enter initial guesses in order to find a solution. (See "Choosing Initial Guesses for
SOLVE," below.) If SOLVE is unable to find a solution, the calculator displays
.
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌ
See appendix D for more information about how SOLVE works.
Verifying the Result
After the SOLVE calculation ends, you can verify that the result is indeed a solution
of the equation by reviewing the values left in the stack:
ꢀ
ꢀ
The X–register (press to clear the VIEWed variable) contains the solution
(root) for the unknown; that is, the value that makes the evaluation of the
equation equal to zero.
The Y–register (press ) contains the previous estimate for the root. This
number should be the same as the value in the X–register. If it is not, then the
root returned was only an approximation, and the values in the X– and
Y–registers bracket the root. These bracketing numbers should be close
together.
ꢀ
The Z– register (press again) contains this value of the equation at the
root. For an exact root, this should be zero. If it is not zero, the root given was
only an approximation; this number should be close to zero.
If a calculation ends with the
, the calculator could not converge on
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌ
a root. (You can see the value in the X–register — the final estimate of the root —
by pressing or b to clear the message.) The values in the X– and Y–registers
bracket the interval that was last searched to find the root. The Z–register contains
the value of the equation at the final estimate of the root.
ꢀ
If the X– and Y–register values aren't close together, or the Z–register value
isn't close to zero, the estimate from the X–register probably isn't a root.
ꢀ
If the X– and Y–register values are close together, and the Z–register value is
close to zero, the estimate from the X–register may be an approximation to a
root.
7–6
Solving Equations
Interrupting a SOLVE Calculation
To halt a calculation, press or g. The current best estimate of the root is in
the unknown variable; use | to view it without disturbing the stack.
Choosing Initial Guesses for SOLVE
The two initial guesses come from:
ꢀ
ꢀ
The number currently stored in the unknown variable.
The number in the X–register (the display).
These sources are used for guesses whether you enter guesses or not. If you enter
only one guess and store it in the variable, the second guess will be the same value
since the display also holds the number you just stored in the variable. (If such is
the case, the calculator changes one guess slightly so that it has two different
guesses.)
Entering your own guesses has the following advantages:
ꢀ
By narrowing the range of search, guesses can reduce the time to find a
solution.
ꢀ
If there is more than one mathematical solution, guesses can direct the SOLVE
procedure to the desired answer or range of answers. For example, the
equation of linear motion
1
2
d = v t + / gt
0
2
can have two solutions for t. You can direct the answer to the required
solution by entering appropriate guesses.
T
he example using this equation earlier in this chapter didn't require you to
enter guesses before solving for T because in the first part of that example
you stored a value for T and solved for D. The value that was left in T was a
.
good (realistic) one, so it was used as a guess when solving for T
Solving Equations
7–7
ꢀ
If an equation does not allow certain values for the unknown, guesses can
prevent these values from occurring. For example,
y = t + log x
results in an error if x ≤ 0 (message
).
ꢄꢎꢊꢁꢎꢎ!ꢊꢑꢄꢌ
In the following example, the equation has more than one root, but guesses help
find the desired root.
Example: Using Guesses to Find a Root.
Using a rectangular piece of sheet metal 40 cm by 80 cm, form an open–top box
3
having a volume of 7500 cm . You need to find the height of the box (that is, the
amount to be folded up along each of the four sides) that gives the specified
volume. A taller box is preferred to a shorter one.
H
_
40 2H
40
H
_
H
80 2H
H
80
If H is the height, then the length of the box is (80 – 2H) and the width is (40 – 2H).
The volume V is:
V = ( 80 – 2H ) × (40 – 2H ) × H
which you can simplify and enter as
V= ( 40 – H ) × ( 20 – H ) × 4 × H
7–8
Solving Equations
Type in the equation:
Keys:
Display:
Description:
| Hꢁ
Selects Equation mode
and starts the
equation.
ꢊ
L V | d
#/¾ꢊ
| ] 40 ꢀꢁ
L H | `
z | ] 20 ꢀ L H
| `
ꢊ
#/1ꢔꢘ.ꢍ2¾ꢊ
ꢊ
1ꢔꢘ.ꢍ2º1ꢋꢘ.ꢍ2¾ꢊ
ꢍ2º1ꢋꢘ.ꢍ2ºꢔºꢍ¾ꢊ
#/1ꢔꢘ.ꢍ2º1ꢋꢘ.ꢍꢊ
z 4 z L H
Terminates and
displays the equation.
Checksum and length.
|
ꢃꢚ/ꢔꢙꢀꢔꢊ
ꢂꢄ/ꢒꢙꢊ
It seems reasonable that either a tall, narrow box or a short, flat box could be
formed having the desired volume. Because the taller box is preferred, larger
initial estimates of the height are reasonable. However, heights greater than 20
cm are not physically possible because the metal sheet is only 40 cm wide. Initial
estimates of 10 and 20 cm are therefore appropriate.
Keys:
Display:
Description:
Leaves Equation mode.
Stores lower and upper limit
guesses.
Displays current equation.
Solves for H; prompts for V.
ꢊ
ꢊ
10 I H
20
| H
H
_
ꢋꢘ ꢊ
#/1ꢔꢘ.ꢍ2º1ꢋꢘ.ꢍꢊ
#@ꢊ
value
ꢊ
7500 g
Stores 7500 in V; solves for H.
ꢍ/ꢊ
ꢒꢖ)ꢘꢘꢘꢘꢊ
Now check the quality of this solution — that is, whether it returned an exact
root — by looking at the value of the previous estimate of the root (in the Y–register)
and the value of the equation at the root (in the Z–register).
Solving Equations
7–9
Keys:
Display:
Description:
This value from the Y–register is
the estimate made just prior to
the final result. Since it is the
same as the solution, the
solution is an exact root.
This value from the Z–register
shows the equation equals zero
at the root.
ꢒꢖ)ꢘꢘꢘꢘꢊ
ꢘ)ꢘꢘꢘꢘꢊ
The dimensions of the desired box are 50 × 10 × 15 cm. If you ignored the upper
limit on the height (20 cm) and used initial estimates of 30 and 40 cm, you would
obtain a height of 42.0256 cm — a root that is physically meaningless. If you
used small initial estimates such as 0 and 10 cm, you would obtain a height of
2.9774 cm — producing an undesirably short, flat box.
If you don't know what guesses to use, you can use a graph to help understand the
behavior of the equation. Evaluate your equation for several values of the
unknown. For each point on the graph, display the equation and press Xꢁ—
at the prompt for x enter the x–coordinate, and then obtain the corresponding
value of the equation, the y–coordinate. For the problem above, you would always
set V = 7500 and vary the value of H to produce different values for the equation.
Remember that the value for this equation is the difference between the left and
right sides of the equation. The plot of the value of this equation looks like this.
_
_
_
7500 (40 H) (20 H) 4H
20,000
H
_
10
50
_
10,000
7–10 Solving Equations
For More Information
This chapter gives you instructions for solving for unknowns or roots over a wide
range of applications. Appendix D contains more detailed information about how
the algorithm for SOLVE works, how to interpret results, what happens when no
solution is found, and conditions that can cause incorrect results.
Solving Equations 7–11
8
Integrating Equations
Many problems in mathematics, science, and engineering require calculating the
definite integral of a function. If the function is denoted by f(x) and the interval of
integration is a to b, then the integral can be expressed mathematically as
I = b f (x)dx
³
a
f (x)
I
x
a
b
The quantity I can be interpreted geometrically as the area of a region bounded by
the graph of the function f(x), the x–axis, and the limits x = a and x = b (provided
that f(x) is nonnegative throughout the interval of integration).
The ꢎ operation ( FN) integrates the current equation with respect to a
³
specified variable (
d_). The function may have more than one variable.
ꢑꢄ
³
ꢎ works only with real numbers.
Integrating Equations
8–1
Integrating Equations ( ³ FN)
To integrate an equation:
1. If the equation that defines the integrand's function isn't stored in the equation
list, key it in (see "Entering Equations into the Equation List" in chapter 6) and
leave Equation mode. The equation usually contains just an expression.
2. Enter the limits of integration: key in the lower limit and press , then
key in the upper limit.
3. Display the equation: Press | H and, if necessary, scroll through the
equation list (press or ) to display the desired equation.
4. Select the variable of integration: Press | ꢎ variable. This starts the
calculation.
ꢎ uses far more memory than any other operation in the calculator. If executing
ꢎ causes a
message, refer to appendix B.
ꢇꢈꢇꢎꢁ& ꢑ"ꢂꢂ
You can halt a running integration calculation by pressing or g. However,
no information about the integration is available until the calculation finishes
normally.
The display format setting affects the level of accuracy assumed for your function
and used for the result. The integration is more precise but takes much longer in the
{
} and higher {
}, {
}, and {
} settings. The uncertainty of the result
ꢀꢂꢂ
ꢑꢐ% ꢃꢐ
ꢈꢄꢆ
ends up in the Y–register, pushing the limits of integration up into the T– and
Z–registers. For more information, see "Accuracy of Integration" later in this
chapter.
To integrate the same equation with different information:
If you use the same limits of integration, press move them into the X– and
Y–registers. Then start at step 3 in the above list. If you want to use different limits,
begin at step 2.
To work another problem using a different equation, start over from step 1 with an
equation that defines the integrand.
Example: Bessel Function.
The Bessel function of the first kind of order 0 can be expressed as
π cos(x sint)dt
1
π
J0(x) =
³
0
8–2
Integrating Equations
Find the Bessel function for x–values of 2 and 3.
Enter the expression that defines the integrand's function:
cos (x sin t )
Keys:
Display:
Description:
Clears memory.
{ c {
}
ꢀꢂꢂ
ꢊ
{ }
&
| H
Current equation or
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅꢊ
ꢃꢎ 1%¾ꢊ
Selects Equation mode.
Types the equation.
R L X
z O
ꢃꢎ 1%º ꢐꢄ1¾ꢊ
ꢃꢎ 1%º ꢐꢄ1!¾ꢊ
ꢃꢎ 1%º ꢐꢄ1!22¾ꢊ
ꢃꢎ 1%º ꢐꢄ1!22ꢊ
L T
| ` | `
Terminates the expression
and displays its left end.
Checksum and length.
|
ꢃꢚ/ꢈꢒꢈꢃꢊ
ꢂꢄ/ꢒꢓꢊ
ꢊ
Leaves Equation mode.
Now integrate this function with respect to t from zero to π ; x = 2.
Keys:
Display:
Description:
{
}
Selects Radians mode.
Enters the limits of integration
(lower limit first).
ꢁꢀꢌ
ꢊ
0 | N
ꢓ)ꢒꢔꢒ ꢊ
| H
| ꢎ
Displays the function.
Prompts for the variable of
integration.
ꢃꢎ 1%º ꢐꢄ1!22ꢊ
_
ꢑꢄ G ꢊ
³
T
Prompts for value of X.
%@ꢊ
value
x = 2. Starts integrating;
2 g
ꢊ
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
calculates result for
/ꢊ
³
π f(t)
ꢘ)ꢗꢘꢓꢔꢊ
³
0
| N q
The final result for J (2).
ꢘ)ꢋꢋꢓꢙꢊ
0
Integrating Equations
8–3
Now calculate J (3) with the same limits of integration. You must respecify the
0
limits of integration (0, π) since they were pushed off the stack by the subsequent
division by π.
Keys:
Display:
Description:
0 | N
Enters the limits of integration
(lower limit first).
ꢓ)ꢒꢔꢒ ꢊ
| H
| ꢎ
Displays the current equation.
Prompts for the variable of
integration.
ꢃꢎ 1%º ꢐꢄ1!22ꢊ
_
ꢑꢄ G
³
T
Prompts for value of X.
%@ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
x = 3. Starts integrating and
3 g
calculates the result for
/ꢊ
³
π
.ꢘ)ꢕꢒꢗꢘꢊ
.
f(t)
³
0
| N q
The final result for
J (3).
.ꢘ)ꢋ ꢘꢒꢊ
0
Example: Sine Integral.
Certain problems in communications theory (for example, pulse transmission
through idealized networks) require calculating an integral (sometimes called the
sine integral) of the form
t
sinx
x
Si (t) =
(
)dx
³
0
Find Si (2).
Enter the expression that defines the integrand's function:
sinx
x
If the calculator attempted to evaluate this function at x = 0, the lower limit of
integration, an error (
) would result. However, the integration
ꢌꢐ#ꢐꢌꢈ ꢏ& ꢘ
algorithm normally does not evaluate functions at either limit of integration, unless
the endpoints of the interval of integration are extremely close together or the
number of sample points is extremely large.
8–4
Integrating Equations
Keys:
Display:
Description:
| H
The current equation
Selects Equation mode.
or
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅꢊ
O L X
| `
Starts the equation.
The closing right parenthesis is
required in this case.
ꢐꢄ1%¾ꢊ
ꢐꢄ1%2¾ꢊ
q L X
ꢐꢄ1%2ª%¾ꢊ
ꢐꢄ1%2ª%ꢊ
ꢃꢚ/ꢘꢈꢈꢘꢊ
ꢂꢄ/ꢕꢊ
Terminates the equation.
Checksum and length.
|
Leaves Equation mode.
ꢊ
Now integrate this function with respect to x (that is, X) from zero to 2 (t = 2).
Keys:
Display:
Description:
{
0 2
}
Selects Radians mode.
Enters limits of integration (lower
first).
ꢁꢀꢌ
ꢊ
_
ꢋ ꢊ
| H
Displays the current equation.
Calculates the result for Si(2).
ꢐꢄ1%2ª%ꢊ
| ꢎ X
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢒ) ꢘꢖꢔꢊ
Accuracy of Integration
Since the calculator cannot compute the value of an integral exactly, it
approximates it. The accuracy of this approximation depends on the accuracy of
the integrand's function itself, as calculated by your equation. This is affected by
round–off error in the calculator and the accuracy of the empirical constants.
Integrals of functions with certain characteristics such as spikes or very rapid
oscillations might be calculated inaccurately, but the likelihood is very small. The
general characteristics of functions that can cause problems, as well as techniques
for dealing with them, are discussed in appendix E.
Integrating Equations
8–5
Specifying Accuracy
The display format's setting (FIX, SCI, ENG, or ALL) determines the precision of the
integration calculation: the greater the number of digits displayed, the greater the
precision of the calculated integral (and the greater the time required to calculate
it). The fewer the number of digits displayed, the faster the calculation, but the
calculator will presume that the function is accurate to the only number of digits
specified in the display format.
To specify the accuracy of the integration, set the display format so that the display
shows no more than the number of digits that you consider accurate in the
integrand's values. This same level of accuracy and precision will be reflected in
the result of integration.
If Fraction–display mode is on (flag 7 set), the accuracy is specified by the
previous display format.
Interpreting Accuracy
After calculating the integral, the calculator places the estimated uncertainty of that
integral's result in the Y–register. Press [ to view the value of the uncertainty.
For example, if the integral Si(2) is 1.6054
0.0002, then 0.0002 is its
uncertainty.
Example: Specifying Accuracy.
With the display format set to SCI 2, calculate the integral in the expression for
Si(2) (from the previous example).
Keys:
Display:
Description:
ꢈ
{
} 2
Sets scientific notation with two
decimal places, specifying that
the function is accurate to two
decimal places.
ꢃꢐ
ꢒ) ꢒ ꢘꢊ
ꢈ
Rolls down the limits of
integration from the Z–and
T–registers into the X–and
Y–registers.
ꢘ)ꢘꢘ ꢘꢊ
ꢈ
ꢋ)ꢘꢘ ꢘꢊ
| H
Displays the current Equation.
ꢐꢄ1%2ª%ꢊ
8–6
Integrating Equations
| ꢎ X
The integral approximated to
two decimal places.
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢈ
ꢒ) ꢒ ꢘꢊ
ꢈ
[
The uncertainty of the
approximation of the integral.
ꢒ) ꢒ .ꢋꢊ
The integral is 1.61 0.0161. Since the uncertainty would not affect the
approximation until its third decimal place, you can consider all the displayed
digits in this approximation to be accurate.
If the uncertainty of an approximation is larger than what you choose to tolerate,
you can increase the number of digits in the display format and repeat the
integration (provided that f(x) is still calculated accurately to the number of digits
shown in the display), In general, the uncertainty of an integration calculation
decreases by a factor of ten for each additional digit, specified in the display
format.
Example: Changing the Accuracy.
For the integral of Si(2) just calculated, specify that the result be accurate to four
decimal places instead of only two.
Keys:
Display:
Description:
ꢈ
{
} 4
Specifies accuracy to four
decimal places. The uncertainty
from the last example is still in
the display.
ꢃꢐ
ꢒ) ꢘꢗꢙ .ꢋꢊ
ꢈ
Rolls down the limits of
integration from the Z– and
T–registers into the X– and
Y–registers.
ꢘ)ꢘꢘꢘꢘ ꢘꢊ
ꢈ
ꢋ)ꢘꢘꢘꢘ ꢘꢊ
| H
Displays the current equation.
Calculates the result.
ꢐꢄ1%2ª%ꢊ
| ꢎ X
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢈ
ꢒ) ꢘꢖꢔ ꢘꢊ
ꢈ
[
Note that the uncertainty is
about 1/100 as large as the
uncertainty of the SCI 2 result
calculated previously.
ꢒ) ꢘꢖ .ꢔꢊ
{
} 4
Restores FIX 4 format.
ꢑꢐ%
ꢘ)ꢘꢘꢘꢋꢊ
Integrating Equations
8–7
{
}
Restores Degrees mode.
ꢌꢈꢆ
ꢘ)ꢘꢘꢘꢋꢊ
This uncertainty indicates that the result might be correct to only three decimal
places. In reality, this result is accurate to seven decimal places when compared
with the actual value of this integral. Since the uncertainty of a result is calculated
conservatively, the calculator's approximation in most cases is more accurate than
its uncertainty indicates.
For More Information
This chapter gives you instructions for using integration in the HP 33s over a wide
range of applications. Appendix E contains more detailed information about how
the algorithm for integration works, conditions that could cause incorrect results
and conditions that prolong calculation time, and obtaining the current
approximation to an integral.
8–8
Integrating Equations
9
Operations with
Complex Numbers
The HP 33s can use complex numbers in the form
x + iy.
It has operations for complex arithmetic (+, –, ×, ÷), complex trigonometry (sin, cos,
z1z2
z
tan), and the mathematics functions –z, 1/z,
z are complex numbers).
2
, ln z, and e . (where z and
1
To enter a complex number:
1. Type the imaginary part.
2. Press .
3. Type the real part.
Complex numbers in the HP 33s are handled by entering each part (imaginary
and real) of a complex number as a separate entry. To enter two complex numbers,
you enter four separate numbers. To do a complex operation, press { G
before the operator. For example, to do
(2 + i 4) + (3 + i 5),
press 4 2 5 3 { G .
The result is 5 + i 9. (The first line is the imaginary and the second is the real part.)
The Complex Stack
In RPN mode, the complex stack is really the regular memory stack split into two
double registers for holding two complex numbers, z + i z and z + i z
:
1x 1y 2x 2y
Operations with Complex Numbers
9–1
Since the imaginary and real parts of a complex number are entered and stored
separately, you can easily work with or alter either part by itself.
y1
Z1
Complex function
x1
(displayed)
(displayed)
y2
x2
y
x
imaginary part
real part
Z2
Complex input
z or z1and z2
Complex result, z
Always enter the imaginary part (the y–part) of a number first. The real portion of
the result (z ) is displayed on the second line; the imaginary portion (z ) is
x
y
displayed on the first line. (For two–number operations, the first complex number,
z , is replicated in the stack's Z and T registers.)
1
Complex Operations
Use the complex operations as you do real operations, but precede the operator
with { G.
To do an operation with one complex number:
1. Enter the complex number z, composed of x + i y, by keying in y x.
2. Select the complex function.
9–2
Operations with Complex Numbers
Functions for One Complex Number, z
To Calculate:
Change sign, –z
Press:
{ G ^
{ G ꢅ
{ G ꢋ
{ G ꢊ
{ G O
{ G R
{ G U
Inverse, 1/z
Natural log, ln z
Natural antilog, e
Sin z
z
Cos z
Tan z
To do an arithmetic operation with two complex numbers:
1. Enter the first complex number, z (composed of x + i y ), by keying in y
1
1
1
1
z1z2
x . (For
, key in the base part, z , first.)
1
1
z1z2
2. Enter the second complex number, z , by keying in y x . (For
,
2
2
2
key in the exponent, z , second.)
2
3. Select the arithmetic operation:
Arithmetic With Two Complex Numbers, z and z
1
2
To Calculate:
Addition, z + z
Press:
{ G
{ G ꢀ
{ G z
{ G q
{ G ꢄ
1
2
Subtraction, z – z
1
2
Multiplication, z × z
1
2
Division, z ÷ z
1
2
Power function, z1z2
Operations with Complex Numbers
9–3
Examples:
Here are some examples of trigonometry and arithmetic with complex numbers:
Evaluate sin (2 + i 3)
Keys:
3 2
{ G O
Display:
Description:
Result is 9.1545 – i
4.1689.
ꢊ
.ꢔ)ꢒ ꢕꢙꢊ
ꢙ)ꢒꢖꢔꢖꢊ
Evaluate the expression
z
÷ (z + z ),
1
2
3
where z = 23 + i 13, z = –2 + i z = 4 – i 3
1
2
3
Since the stack can retain only two complex numbers at a time, perform the
calculation as
z
1
× [1 ÷ (z + z )]
2
3
Keys:
Display:
Description:
1 2 ^ ꢁ
3 ^ 4 {ꢁ
G
Add z + z ; displays real
part.
ꢊ
ꢊ
2
3
.ꢋ)ꢘꢘꢘꢘꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢘ)ꢋꢖꢘꢘꢊ
ꢘ)ꢋꢖꢘꢘꢊ
ꢊ
{ G ꢅ
1 ÷ (z + z ).
2
3
13 23
{ G z
z
1
÷ (z + z ). Result is 2.5
2
3
+ i 9.
ꢙ)ꢘꢘꢘꢘꢊ
ꢋ)ꢖꢘꢘꢘꢊ
Evaluate (4 – i 2/5) (3 – i 2/3). Do not use complex operations when calculating
just one part of a complex number.
Keys:
Display:
Description:
2 5 ^
Enters imaginary part of
first complex number as a
fraction.
.ꢘ)ꢔꢘꢘꢘꢊ
.ꢘ)ꢔꢘꢘꢘꢊ
4
Enters real part of first
complex number.
ꢔ)ꢘꢘꢘꢘꢊ
ꢔ)ꢘꢘꢘꢘꢊ
9–4
Operations with Complex Numbers
2 3 ^
Enters imaginary part of
second complex number as
a fraction.
.ꢘ)
.ꢘ)
ꢗꢊ
ꢗꢊ
3 { G z
Completes entry of second
number and then multiplies
the two complex numbers.
Result is 11.7333 – i
3.8667.
.ꢓ)ꢕ ꢗꢊ
ꢒꢒ)ꢗꢓꢓꢓꢊ
ez−2
–2
Evaluate
enter –2 as –2 + i 0.
, where z = (1 + i ). Use { G ꢄ to evaluate z
;
Keys:
Display:
Description:
1 1
0 2 ^ {ꢁ
G ꢄ
Intermediate result of
ꢊ
ꢊ
–2
(1 + i )
.ꢘ)ꢖꢘꢘꢘꢊ
ꢘ)ꢘꢘꢘꢘꢊ
.ꢘ)ꢔꢗꢙꢔꢊ
ꢘ)ꢕꢗꢗ ꢊ
{ G ꢊ
Final result is
0.8776 – i 0.4794.
Using Complex Numbers in Polar Notation
Many applications use real numbers in polar form or polar notation. These forms
use pairs of numbers, as do complex numbers, so you can do arithmetic with these
numbers by using the complex operations. Since the HP 33s's complex operations
work on numbers in rectangular form, convert polar form to rectangular form
(using |ꢁs) before executing the complex operation, then convert the
result back to polar form.
iθ
a + i b = r (cos θ + i sin θ) = re
= r ∠θ (Polar or phase form)
Operations with Complex Numbers
9–5
imaginary
(a, b)
r
θ
real
Example: Vector Addition.
Add the following three loads. You will first need to convert the polar coordinates
to rectangular coordinates.
y
62o
L
185 lb
2
170 lb
143o
L
1
x
L
3
100 lb
261o
Keys:
Display:
Description:
{
}
Sets Degrees mode.
Enters L and converts it to
1
rectangular form.
ꢌꢈꢆ
ꢊ
62 185 | s
143 170 | s
{ G
ꢒ ꢓ)ꢓꢔꢖꢓꢊ
ꢕ )ꢕꢖꢋꢋꢊ
ꢒꢘꢋ)ꢓꢘꢕ ꢊ
Enters and converts L .
2
.ꢒꢓꢖ)ꢗ ꢕꢘꢊ
ꢋ ꢖ) ꢖꢓꢙꢊ
.ꢔꢕ)ꢙꢒꢖꢕꢊ
.ꢙꢕ)ꢗ ꢕꢕꢊ
.ꢒꢖ) ꢔꢓꢔꢊ
Adds vectors.
261 100 | s
Enters and converts L .
3
9–6
Operations with Complex Numbers
{ G
{ r
Adds L + L + L .
ꢒ
)ꢕꢕꢖꢘꢊ
1
2
3
. ꢔ)ꢖꢖꢙꢋꢊ
ꢒꢒꢒ)ꢒꢔꢕꢙꢊ
ꢒꢗꢕ)ꢙꢓꢗꢋꢊ
Converts vector back to
polar form; displays r, θ
Operations with Complex Numbers
9–7
10
Base Conversions and Arithmetic
The BASE menu ( { x ) lets you change the number base used for entering
numbers and other operations (including programming). Changing bases also
converts the displayed number to the new base.
BASE Menu
Menu label
Description
{
{
}
Decimal mode. No annunciator. Converts numbers to
base 10. Numbers have integer and fractional parts.
ꢌꢈꢃ
}
Hexadecimal mode. HEX annunciator on. Converts
numbers to base 16; uses integers only. The top–row keys
become digits % through *.
ꢍꢈ%
{
}
Octal mode. OCT annunciator on. Converts numbers to
base 8; uses integers only. The ꢏ, ꢐ, and unshifted
top–row keys are inactive.
ꢎꢃ!
{
}
Binary mode. BIN annunciator on. Converts numbers to
base 2; uses integers only. Digit keys other than ꢑ and
ꢒ, and the unshifted top–row functions are inactive. If a
number is longer than 12 digits, then the and
keys are active for viewing windows. (See "Windows for
Long Binary Numbers" later in this chapter.)
ꢏꢐꢄ
Examples: Converting the Base of a Number.
The following keystrokes do various base conversions.
Convert 125.99 to hexadecimal, octal, and binary numbers.
10
Keys:
Display:
Description:
125.99 { x
Converts just the integer part
(125) of the decimal number to
base 16 and displays this value.
Base 8.
ꢗꢌꢊ
{
}
ꢍꢈ%
{ x {
}
ꢎꢃ!
ꢒꢗꢖꢊ
Base Conversions and Arithmetic 10–1
{ x {
}
}
Base 2.
ꢏꢐꢄ
ꢒꢒꢒꢒꢒꢘꢒꢊ
{ x {
Restores base 10; the original
decimal value has been
preserved, including its fractional
part.
ꢌꢈꢃ
ꢒꢋꢖ)ꢙꢙꢘꢘꢊ
Convert 24FF to binary base. The binary number will be more than 12 digits
16
(the maximum display) long.
Keys:
Display:
Description:
{ x {
24FF
}
}
Use the ! key to type "F".
ꢍꢈ%
ꢊ
_
ꢋꢔꢑꢑ ꢊ
{ x {
The entire binary number does not
ꢏꢐꢄ
ꢘꢒꢘꢘꢒꢒꢒꢒꢒꢒꢒꢒꢊ
fit. The
annunciator indicates
§
that the number continues to the
left.
Displays the rest of the number.
The full number is
ꢒꢘꢊ
10010011111111 .
2
Displays the first 12 digits again.
Restores base 10.
ꢘꢒꢘꢘꢒꢒꢒꢒꢒꢒꢒꢒꢊ
ꢙ8ꢔꢗꢒ)ꢘꢘꢘꢘꢊ
{ x {
}
ꢌꢈꢃ
Arithmetic in Bases 2, 8, and 16
You can perform arithmetic operations using , ꢀ, z, and q in any base.
The only function keys that are actually deactivated outside of Decimal mor dee
areꢊ, ꢋ, ꢄ, ꢅ, ꢓ, and !. However, you should realize that most
operations other than arithmetic will not produce meaningful results since the
fractional parts of numbers are truncated.
Arithmetic in bases 2, 8, and 16 is in 2's complement form and uses integers only:
ꢀ
If a number has a fractional part, only the integer part is used for an
arithmetic calculation.
ꢀ
The result of an operation is always an integer (any fractional portion is
truncated).
Whereas conversions change only the displayed number and not the number in
the X–register, arithmetic does alter the number in the X–register.
10–2 Base Conversions and Arithmetic
If the result of an operation cannot be represented in 36 bits, the display shows
and then shows the largest positive or negative number possible.
ꢎ#ꢈꢁꢑꢂꢎ$
Example:
Here are some examples of arithmetic in Hexadecimal, Octal, and Binary modes:
?
12F + E9A
16 16
=
Keys:
Display:
Description:
{ x {
}
Sets base 16; HEX
annunciator on.
Result.
ꢍꢈ%
ꢊ
12F E9A
ꢑꢃꢙꢊ
?
7760 – 4326 =
8
8
{ x {
}
Sets base 8; OCT
annunciator on. Converts
displayed number to octal.
Result.
ꢎꢃ!
ꢗꢗꢒꢒꢊ
7760 4326 ꢀ
ꢓꢔꢓꢋꢊ
?
100 ÷ 5 =
8
8
100 5 q
Integer part of result.
ꢒꢔ
?
5A0 + 1001100 =
16
2
{ x {
} 5A0
_
Set base 16; HEX
annunciator on.
ꢍꢈ%
ꢖꢀꢘ ꢊ
{ x {
} 1001100
_
Changes to base 2; BIN
annunciator on. This
terminates digit entry, so no
is needed between
the numbers.
ꢏꢐꢄ
ꢒꢘꢘꢒꢒꢘꢘ ꢊ
Result in binary base.
Result in hexadecimal base.
Restores decimal base.
ꢒꢘꢒꢒꢒꢒꢘꢒꢒꢘꢘꢊ
ꢖꢈꢃꢊ
{ x {
{ x {
}
}
ꢍꢈ%
ꢌꢈꢃ
ꢒ8ꢖꢒ )ꢘꢘꢘꢘꢊ
Base Conversions and Arithmetic 10–3
The Representation of Numbers
Although the display of a number is converted when the base is changed, its
stored form is not modified, so decimal numbers are not truncated — until they are
used in arithmetic calculations.
When a number appears in hexadecimal, octal, or binary base, it is shown as a
right–justified integer with up to 36 bits (12 octal digits or 9 hexadecimal digits).
Leading zeros are not displayed, but they are important because they indicate a
positive number. For example, the binary representation of 125 is displayed as:
10
1111101
which is the same as these 36 digits:
000000000000000000000000000001111101
Negative Numbers
The leftmost (most significant or "highest") bit of a number's binary representation
is the sign bit; it is set (1) for negative numbers. If there are (undisplayed) leading
zeros, then the sign bit is 0 (positive). A negative number is the 2's complement of
its positive binary number.
Keys:
Display:
Description:
546 { x {
}
Enters a positive, decimal
number; then converts it to
hexadecimal.
ꢍꢈ%
ꢋꢋꢋꢊ
^
2's complement (sign
changed).
ꢑꢑꢑꢑꢑꢑꢌꢌꢈꢊ
ꢒꢒꢘꢒꢒꢒꢘꢒꢒꢒꢒꢘꢊ
ꢒꢒꢒꢒꢒꢒꢒꢒꢒꢒꢒꢒꢊ
{ x {
}
Binary version;
ꢏꢐꢄ
§
indicates more digits.
Displays the leftmost
window; the number is
negative since the highest
bit is 1.
ꢁ
{ x {
}
Negative decimal number.
ꢌꢈꢃ
.ꢖꢔ )ꢘꢘꢘꢘꢊ
10–4 Base Conversions and Arithmetic
Range of Numbers
The 36-bit word size determines the range of numbers that can be represented in
hexadecimal (9 digits), octal (12 digits), and binary bases (36 digits), and the
range of decimal numbers (11 digits) that can be converted to these other bases.
Range of Numbers for Base Conversions
Base
Positive Integer
of Largest Magnitude
Negative Integer
of Largest Magnitude
Hexadecimal
Octal
7FFFFFFFF
377777777777
800000000
400000000000
Binary
0111111111111111111111 1000000000000000000000
11111111111111
00000000000000
Decimal
34,359,738,367
–34,359,738,368
When you key in numbers, the calculator will not accept more than the maximum
number of digits for each base. For example, if you attempt to key in a 10–digit
hexadecimal number, digit entry halts and the ¤ annunciator appears.
If a number entered in decimal base is outside the range given above, then it
produces the message
in the other base modes. In RPN mode, the
!ꢎꢎ ꢏꢐꢆ
original decimal value of any too–big number is used in calculations. Any
operation that results in a number outside the range given above causes
OVERFLOW to be briefly displayed. The display then shows the largest positive or
negative integer representable in the current base. In ALG mode, any operation
(except +/– in the entry line but not in a variable prompt) using
the ¤ꢁannunciator.
displays
!ꢎꢎ ꢏꢐꢆꢊ
Base Conversions and Arithmetic 10–5
Windows for Long Binary Numbers
The longest binary number can have 36 digits — three times as many digits as fit
in the display. Each 12–digit display of a long number is called a window.
36 - bit number
Highest window
Lowest window
(displayed)
When a binary number is larger than the 12 digits, the
both) appears, indicating in which direction the additional digits lie. Press the
or
annunciator (or
§
¨
indicated key ( or ) to view the obscured window.
Press to display
left window
Press to display
right window
ꢁ
ꢁꢁꢁ
10–6 Base Conversions and Arithmetic
11
Statistical Operations
The statistics menus in the HP 33s provide functions to statistically analyze a set of
one– or two–variable data:
ꢀ
ꢀ
ꢀ
ꢀ
Mean, sample and population standard deviations.
ˆ
y ).
Linear regression and linear estimation (
and
ˆ
x
Weighted mean (x weighted by y).
2
2
Summation statistics: n, Σx, Σy, Σx , Σy , and Σxy.
Entering Statistical Data
One– and two–variable statistical data are entered (or deleted) in similar fashion
using the ꢓ (or { ꢔ ) key. Data values are accumulated as summation
statistics in six statistics registers (28 through 33), whose names are displayed in
ꢋꢊ ꢋꢊ
the SUMS menu. (Press | ꢕ and see
).
Qꢊ;ºꢊ;¸ꢊ;º ;¸ ;º¸
Always clear the statistics registers before entering a new set of
Note
statistical data (press { c { } ).
;
Statistical Operations 11–1
Entering One–Variable Data
1. Press { c {Σ} to clear existing statistical data.
2. Key in each x–value and press ꢓ.
3. The display shows n, the number of statistical data values now accumulated.
Pressing ꢓ actually enters two variables into the statistics registers because the
value already in the Y–register is accumulated as the y–value. For this reason, the
calculator will perform linear regression and show you values based on y even
when you have entered only x–data — or even if you have entered an unequal
number of x–and y–values. No error occurs, but the results are obviously not
meaningful.
To recall a value to the display immediately after it has been entered, press {
.
Entering Two–Variable Data
In RPN mode, when your data consist of two variables, x is the independent
variable and y is the dependent variable. Remember to enter an (x, y) pair in
reverse order (y x) so that y ends up in the Y–register and X in the
X–register.
1. Press { c {Σ} to clear existing statistical data.
2. Key in the y–value first and press .
3. Key in the corresponding x–value and press ꢓ.
4. The display shows n, the number of statistical data pairs you have
accumulated.
5. Continue entering x, y–pairs. n is updated with each entry.
To recall an x–value to the display immediately after it has been entered, press
{ .
Correcting Errors in Data Entry
If you make a mistake when entering statistical data, delete the incorrect data and
add the correct data. Even if only one value of an x, y–pair is incorrect, you must
delete and reenter both values.
To correct statistical data:
11–2 Statistical Operations
1. Reenter the incorrect data, but instead of pressing ꢓ, press { ꢔ. This
deletes the value(s) and decrements n.
2. Enter the correct value(s) using ꢓ.
If the incorrect values were the ones just entered, press { to retrieve
them, then press { ꢔ to delete them. (The incorrect y–value was still in the
Y–register, and its x–value was saved in the LAST X register.)
Example:
Key in the x, y–values on the left, then make the corrections shown on the right:
Initial x, y
20, 4
Corrected x, y
20, 5
400, 6
40, 6
Keys:
Display:
Description:
{ c { }
Clears existing statistical
data.
´
ꢊ
4 20 ꢓ
Enters the first new data
pair.
Display shows n, the
number of data pairs you
entered.
ꢔ)ꢘꢘꢘꢘꢊ
ꢒ)ꢘꢘꢘꢘꢊ
)ꢘꢘꢘꢘꢊ
6 400 ꢓ
ꢋ)ꢘꢘꢘꢘꢊ
{
Brings back last x–value.
Last y is still in Y–register.
Deletes the last data pair.
)ꢘꢘꢘꢘꢊ
ꢔꢘꢘ)ꢘꢘꢘꢘꢊ
)ꢘꢘꢘꢘꢊ
{ ꢔ
ꢒ)ꢘꢘꢘꢘꢊ
)ꢘꢘꢘꢘꢊ
6 40 ꢓ
4 20 { ꢔ
5 20 ꢓ
Reenters the last data pair.
Deletes the first data pair.
ꢋ)ꢘꢘꢘꢘꢊ
ꢔ)ꢘꢘꢘꢘꢊ
ꢒ)ꢘꢘꢘꢘꢊ
ꢖ)ꢘꢘꢘꢘꢊ
ꢋ)ꢘꢘꢘꢘꢊ
Reenters the first data pair.
There is still a total of two
data pairs in the statistics
registers.
Statistical Operations 11–3
Statistical Calculations
Once you have entered your data, you can use the functions in the statistics menus.
Statistics Menus
Menu
L.R.
Key
Description
|
The linear–regression menu: linear
estimation { ˆ } { ˆ } and curve–fitting { } { }
T
P
º ¸
{ }. See ''Linear Regression'' later in this
chapter.
E
, y
| ꢖ
| ꢗ
The mean menu: { } { } {
"Mean" below.
}. See
x
º
¸
º·
s,σ
The standard–deviation menu: { } {
}
Uº U¸
{σ } {σ }. See "Sample Standard
º
¸
Deviation" and "Population Standard
Deviation" later in this chapter.
ꢋ
SUMS
| ꢕ
The summation menu: { } { } { } {
}
Q
;º ;¸ ;º
ꢋ
{
;¸
} {
;º¸
}. See "Summation Statistics"
later in this chapter.
Mean
Mean is the arithmetic average of a group of numbers.
ꢀ
ꢀ
ꢀ
Press | ꢖ { } for the mean of the x–values.
º
Press | ꢖ { } for the mean of the y–values.
¸
Press | ꢖ {
} for the weighted mean of the x–values using the
º·
y–values as weights or frequencies. The weights can be integers or
non–integers.
Example: Mean (One Variable).
Production supervisor May Kitt wants to determine the average time that a certain
process takes. She randomly picks six people, observes each one as he or she
carries out the process, and records the time required (in minutes):
11–4 Statistical Operations
15.5
12.5
9.25
12.0
10.0
8.5
Calculate the mean of the times. (Treat all data as x–values.)
Keys:
Display:
Description:
{ c { }
Clears the statistics
registers.
´
ꢊ
15.5 ꢓ
9.25 ꢓ 10 ꢓ 12.5 ꢓ
12 ꢓ 8.5 ꢓ
Enters the first time.
Enters the remaining data;
six data points
ꢒ)ꢘꢘꢘꢘꢊ
ꢊ
)ꢘꢘꢘꢘꢊ
accumulated.
ꢊ ¸ ꢊ º· ꢊ
| ꢖ {
}
Calculates the mean time to
complete the process.
º
º
ꢒꢒ)ꢋꢙꢒꢗꢊ
Example: Weighted Mean (Two Variables).
A manufacturing company purchases a certain part four times a year. Last year's
purchases were:
Price per Part (x)
Number of Parts (y)
$4.25 $4.60 $4.70 $4.10
250 800 900 1000
Find the average price (weighted for the purchase quantity) for this part.
Remember to enter y, the weight (frequency), before x, the price.
Keys:
Display:
Description:
{ c { }
Clears the statistics
registers.
´
ꢊ
250 4.25 ꢓꢁ
800 4.6 ꢓꢁ
900 4.7 ꢓ
Enters data; displays n.
ꢊ
ꢊ
ꢙꢘꢘ)ꢘꢘꢘꢘꢊ
ꢓ)ꢘꢘꢘꢘꢊ
1000 ꢁ4.1 ꢓ
Four data pairs
accumulated.
Calculates the mean
price weighted for the
quantity purchased.
ꢒ8ꢘꢘꢘ)ꢘꢘꢘꢘꢊ
ꢔ)ꢘꢘꢘꢘꢊ
º ꢊ ¸ ꢊ º· ꢊ
| ꢖ {
}
º·
ꢔ)ꢔꢓꢒꢔꢊ
Statistical Operations 11–5
Sample Standard Deviation
Sample standard deviation is a measure of how dispersed the data values are
about the mean sample standard deviation assumes the data is a sampling of a
larger, complete set of data, and is calculated using n – 1 as a divisor.
ꢀ
ꢀ
Press | ꢗ { } for the standard deviation of x–values.
Uº
Press | ꢗ { } for the standard deviation of y–values.
U¸
The {σ } and {σ } keys in this menu are described in the next section, "Population
º
¸
Standard Deviation."
Example: Sample Standard Deviation.
Using the same process–times as in the above "mean" example, May Kitt now
wants to determine the standard deviation time (s ) of the process:
x
9.25
12.0
15.5
12.5
10.0
8.5
Calculate the standard deviation of the times. (Treat all the data as x–values.)
Keys:
Display:
Description:
{ c { }
15.5 ꢓ
9.25 ꢓ 10 ꢓ 12.5 ꢓ
12 ꢓ 8.5 ꢓ
Clears the statistics registers.
Enters the first time.
Enters the remaining data; six
data points entered.
Calculates the standard
deviation time.
´
ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
ꢊ
)ꢘꢘꢘꢘꢊ
UºꢊU¸ꢊσºꢊσ¸
| ꢗ {
}
Uº
ꢋ)ꢖꢕꢘꢕꢊ
Population Standard Deviation
Population standard deviation is a measure of how dispersed the data values are
about the mean. Population standard deviation assumes the data constitutes the
complete set of data, and is calculated using n as a divisor.
ꢀ
ꢀ
Press | ꢗ {σ } for the population standard deviation of the x–values.
º
Press | ꢗ {σ } for the population standard deviation of the y–values.
¸
11–6 Statistical Operations
Example: Population Standard Deviation.
Grandma Hinkle has four grown sons with heights of 170, 173, 174, and 180 cm.
Find the population standard deviation of their heights.
Keys:
Display:
Description:
{ c { }
170 ꢓ 173 ꢓꢁ
174 ꢓ 180 ꢓ
Clears the statistics registers.
Enters data. Four data points
accumulated.
Calculates the population
standard deviation.
´
ꢊ
ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
σ
σ
UºꢊU¸ꢊ ºꢊ ¸
| ꢗ {σ }
º
ꢓ) ꢓꢒꢖꢊ
Linear Regression
Linear regression, L.R. (also called linear estimation) is a statistical method for
finding a straight line that best fits a set of x,y–data.
To avoid a
executing any of the functions in the L.R. menu.
message, enter your data before
!ꢀ! ꢈꢁꢁꢎꢁ
Note
L.R. (Linear Regression) Menu
Description
Menu Key
{ ˆ }
Estimates (predicts) x for a given hypothetical value of y,
based on the line calculated to fit the data.
º
{ ˆ }
Estimates (predicts) y for a given hypothetical value of x,
based on the line calculated to fit the data.
¸
{ }
T
Correlation coefficient for the (x, y) data. The correlation
coefficient is a number in the range –1 through +1 that
measures how closely the calculated line fits the data.
{ }
Slope of the calculated line.
P
{ }
E
y–intercept of the calculated line.
Statistical Operations 11–7
ꢀ
ꢀ
To find an estimated value for x (or y), key in a given hypothetical value for y
(or x), then press |
{ ˆ } (or |
{ ˆ }).
º
¸
To find the values that define the line that best fits your data, press |
followed by { }, { }, or { }.
T
P
E
Example: Curve Fitting.
The yield of a new variety of rice depends on its rate of fertilization with nitrogen.
For the following data, determine the linear relationship: the correlation coefficient,
the slope, and the y–intercept.
X, Nitrogen Applied 0.00
(kg per hectare)
20.00
5.78
40.00
6.61
60.00
7.21
80.00
7.78
Y, Grain Yield
4.63
(metric tons per hectare)
Keys:
Display:
Description:
{ c { }
Clears all previous statistical
data.
´
ꢊ
4.63 0 ꢓ
5.78 20 ꢓ
6.61 40 ꢓ
7.21 60 ꢓ
Enters data; displays n.
ꢊ
ꢊ
ꢊ
ꢗ)ꢋꢒꢘꢘꢊ
ꢔ)ꢘꢘꢘꢘꢊ
ꢗ)ꢗꢕꢘꢘꢊ
ꢖ)ꢘꢘꢘꢘꢊ
7.78 80 ꢓ
Five data pairs entered.
ˆ ˆ T P Eꢊ
º ¸
|
{ }
T
Displays linear–regression
menu.
Correlation coefficient; data
closely approximate a straight
line.
ꢘ)ꢙꢕꢕꢘ
ˆ ˆ T P E
º ¸
Slope of the line.
ꢊ
ꢘ)ꢘꢓꢕꢗꢊ
E
ˆ ˆ T Pꢊ
º ¸
y–intercept.
ꢊ
ꢔ)ꢕꢖ ꢘꢊ
11–8 Statistical Operations
y
8.50
7.50
6.50
5.50
4.50
X
(70, y)
r = 0.9880
m = 0.0387
b = 4.8560
20
x
0
40
60
80
?
What if 70 kg of nitrogen fertilizer were applied to the rice field Predict the grain
yield based on the above statistics.
Keys:
Display:
Description:
70
Enters hypothetical x–value.
ꢗ)ꢗꢕꢘꢘꢊ
_
ꢗꢘ ꢊ
ˆ
ˆ
T P E
¸
|
{ ˆ }
The predicted yield in tons per
hectare.
º
ꢊ
¸
ꢗ)ꢖ ꢒꢖꢊ
Limitations on Precision of Data
Since the calculator uses finite precision (12 to 15 digits), it follows that there are
limitations to calculations due to rounding. Here are two examples:
Statistical Operations 11–9
Normalizing Close, Large Numbers
The calculator might be unable to correctly calculate the standard deviation and
linear regression for a variable whose data values differ by a relatively small
amount. To avoid this, normalize the data by entering each value as the difference
from one central value (such as the mean). For normalized x–values,ˆthis difference
y
must then be added back to the calculation of
also be adjusted. For example, if your x–values were 7776999, 7777000, and
and
, and
and b must
x
ˆ
x
7777001, you should enter the data as –1, 0, and 1; then add 7777000 back to
ˆ
y , be sure to supply
and
. For b, add back 7777000 × m. To calculate
x
ˆ
x
an x–value that is less 7777000.
Similar inaccuracies can result if your x and y values have greatly different
magnitudes. Again, scaling the data can avoid this problem.
Effect of Deleted Data
Executing { ꢔ does not delete any rounding errors that might have been
generated in the statistics registers by the original data values. This difference is
not serious unless the incorrect data have a magnitude that is enormous compared
with the correct data; in such a case, it would be wise to clear and reenter all the
data.
Summation Values and the Statistics Registers
The statistics registers are six unique locations in memory that store the
accumulation of the six summation values.
Summation Statistics
Pressing | ꢕ gives you access to the contents of the statistics registers:
ꢀ
ꢀ
ꢀ
ꢀ
Press { } to recall the number of accumulated data sets.
Q
Press { } to recall the sum of the x–values.
º
Press { } to recall the sum of the y–values.
¸
ꢋ
ꢋ
Press {
}, {
}, and {
} to recall the sums of the squares and the sum
;º
;¸
;º¸
of the products of the x and y — values that are of interest when performing
other statistical calculations in addition to those provided by the calculator.
11–10 Statistical Operations
If you've entered statistical data, you can see the contents of the statistics registers.
Press { Y {
}, then use and to view the statistics registers.
#ꢀꢁ
Example: Viewing the Statistics Registers.
Use ꢀ to store data pairs (1,2) and (3,4) in the statistics registers. Then view the
stored statistical values.
Keys:
Display:
Description:
{ c { }
2 1 ꢀ
Clears the statistics registers.
Stores the first data pair (1,2).
´
ꢂ
ꢃ)ꢄꢄꢄꢄꢂ
ꢅ)ꢄꢄꢄꢄꢂ
ꢆ)ꢄꢄꢄꢄꢂ
ꢃ)ꢄꢄꢄꢄ
Q/ꢂ
4 3 ꢀ
Stores the second data pair (3,4).
{ Y {
}
Displays VAR catalog and views n
register.
Views Σxy register.
#ꢀꢁ
ꢃ)ꢄꢄꢄꢄꢂ
´º¸/ꢂ
ꢅꢆ)ꢄꢄꢄꢄ
´¸ꢃ/ꢂ
2
Views Σy register.
ꢃꢄ)ꢄꢄꢄꢄ
´ºꢃ/ꢂ
2
Views Σx register.
ꢅꢄ)ꢄꢄꢄꢄ
´¸/ꢂ
Views Σy register.
Views Σx register.
Leaves VAR catalog.
)ꢄꢄꢄꢄ
´º/ꢂ
ꢆ)ꢄꢄꢄꢄ
ꢆ)ꢄꢄꢄꢄꢂ
ꢃ)ꢄꢄꢄꢄ
The Statistics Registers in Calculator Memory
The memory space for the statistics registers is automatically allocated when you
press ꢀ or ꢁ. The registers are deleted and the memory deallocated when
you execute { c { }.
´
Access to the Statistics Registers
The statistics register assignments in the HP 33s are shown in the following table.
Statistical Operations 11–11
Statistics Registers
Description
Register
Number
n
28
29
30
31
32
33
Number of accumulated data pairs.
Sum of accumulated x–values.
Sum of accumulated y–values.
Sum of squares of accumulated x–values.
Sum of squares of accumulated y–values.
Sum of products of accumulated x– and
Σx
Σy
Σx
Σy
Σxy
2
2
y–values.
You can load a statistics register with a summation by storing the number (28
through 33) of the register you want in i (number I ) and then storing the
summation (value I ). Similarly, you can press | to view a
register value — the display is labeled with the register name. The SUMS menu
contains functions for recalling the register values. See "Indirectly Addressing
Variables and Labels" in chapter 13 for more information.
11–12 Statistical Operations
Part 2
Programming
12
Simple Programming
Part 1 of this manual introduced you to functions and operations that you can use
manually, that is, by pressing a key for each individual operation. And you saw
how you can use equations to repeat calculations without doing all of the
keystrokes each time.
In part 2, you'll learn how you can use programs for repetitive calculations —
calculations that may involve more input or output control or more intricate logic. A
program lets you repeat operations and calculations in the precise manner you
want.
In this chapter you will learn how to program a series of operations. In the next
chapter, "Programming Techniques," you will learn about subroutines and
conditional instructions.
Example: A Simple Program.
To find the area of a circle with a radius of 5, you would use the
2
formula A = π r and press
RPN mode: 5 ! | N zꢁ
ALG mode: 5 ! z | N
to get the result for this circle, 78.5398.
?
But what if you wanted to find the area of many different circles
Rather than repeat the given keystrokes each time (varying only the "5" for the
different radii), you can put the repeatable keystrokes into a program:
Simple Programming 12–1
RPN mode
ALG mode
ꢋ
ꢋ
ꢘꢘꢘꢘꢒ º
ꢘꢘꢘꢘꢒꢊº
ꢘꢘꢘꢘꢋ º
π
ꢘꢘꢘꢘꢋ
π
ꢘꢘꢘꢘꢓ º
ꢘꢘꢘꢘꢓ
ꢊ
ꢘꢘꢘꢘꢔ ꢈꢄ!ꢈꢁꢊ
This very simple program assumes that the value for the radius is in the X– register
(the display) when the program starts to run. It computes the area and leaves it in
the X–register.
In RPN mode, to enter this program into program memory, do the following:
Keys:
Display:
Description:
(In RPN mode)
{ c {
{ e
} { }
Clears memory.
ꢀꢂꢂ
&
ꢊ
ꢊ
Activates Program–entry mode
(PRGM annunciator on).
Resets program pointer to
PRGM TOP.
{ V
ꢅꢁꢆꢇ !ꢎꢅꢊ
2
ꢋ
!
(Radius)
ꢘꢘꢘꢘꢒ º
| N
z
π
ꢘꢘꢘꢘꢋ
2
Area = πx
Exits Program–entry mode.
ꢘꢘꢘꢘꢓ º
{ e
Try running this program to find the area of a circle with a radius of 5:
Keys:
Display:
Description:
(In RPN mode)
{ V
This sets the program to its
beginning.
ꢊ
5 g
The answer!
ꢗꢕ)ꢖꢓꢙꢕꢊ
We will continue using the above program for the area of a circle to illustrate
programming concepts and methods.
12–2 Simple Programming
Designing a Program
The following topics show what instructions you can put in a program. What you
put in a program affects how it appears when you view it and how it works when
you run it.
Selecting a Mode
Programs created and saved in RPN mode can only be edited and executed in
RPN mode, and programs or steps created and saved in ALG mode can only be
edited and executed in ALG mode. You can ensure that your program executes in
the correct mode by making RPN or ALG the first instruction in the program.
Program Boundaries (LBL and RTN)
If you want more than one program stored in program memory, then a program
needs a label to mark its beginning (such as
) and a return to mark
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀ
its end (such as
).
ꢀꢘꢘꢘꢖ ꢁ!ꢄ
Notice that the line numbers acquire an to match their label.
ꢀ
Program Labels
Programs and segments of programs (called routines) should start with a label. To
record a label, press:
{ letter–key
The label is a single letter from A through Z. The letter keys are used as they are for
variables (as discussed in chapter 3). You cannot assign the same label more than
once (this causes the message
letter that a variable uses.
), but a label can use the same
ꢌ"ꢅꢂꢐꢃꢀ!)ꢂꢏꢂ
It is possible to have one program (the top one) in memory without any label.
However, adjacent programs need a label between them to keep them distinct.
Program Returns
Programs and subroutines should end with a return instruction. The keystrokes are:
|
Simple Programming 12–3
When a program finishes running, the last RTN instruction returns the program
pointer to
, the top of program memory.
ꢅꢁꢆꢇ !ꢎꢅ
Using RPN, ALG and Equations in Programs
You can calculate in programs the same ways you calculate on the keyboard:
ꢀ
ꢀ
ꢀ
Using RPN operations (which work with the stack, as explained in chapter 2).
Using ALG operations (as explained in appendix C).
Using equations (as explained in chapter 6).
The previous example used a series of RPN operations to calculate the area of the
circle. Instead, you could have used an equation in the program. (An example
follows later in this chapter.) Many programs are a combination of RPN and
equations, using the strengths of both.
Strengths of RPN Operations
Strengths of Equations and
ALG Operations
Use less memory.
Easier to write and read.
Execute a bit faster.
Can automatically prompt.
When a program executes a line containing an equation, the equation is
evaluated in the same way that X evaluates an equation in the equation list.
For program evaluation, "=" in an equation is essentially treated as "–". (There's
no programmable equivalent to for an assignment equation — other than
writing the equation as an expression, then using STO to store the value in a
variable.)
For both types of calculations, you can include RPN instructions to control input,
output, and program flow.
Data Input and Output
For programs that need more than one input or return more than one output, you
can decide how you want the program to enter and return information.
For input, you can prompt for a variable with the INPUT instruction, you can get an
equation to prompt for its variables, or you can take values entered in advance
onto the stack.
12–4 Simple Programming
For output, you can display a variable with the VIEW instruction, you can display a
message derived from an equation, or you can leave unmarked values on the
stack.
These are covered later in this chapter under "Entering and Displaying Data."
Entering a Program
Pressing { e toggles the calculator into and out of Program–entry
mode — turns the PRGM annunciator on and off. Keystrokes in Program–entry
mode are stored as program lines in memory. Each instruction or number occupies
one program line, and there is no limit (other than available memory) on the
number of lines in a program.
To enter a program into memory:
1. Press { e to activate Program–entry mode.
2. Press { V to display
. This sets the program pointer
ꢀꢁꢂꢃ !ꢄꢀ
to a known spot, before any other programs. As you enter program lines, they
are inserted before all other program lines.
If you don't need any other programs that might be in memory, clear program
memory by pressing { c {
}. To confirm that you want all
ꢀꢂꢃ
programs deleted, press { } after the message
.
&
ꢅꢆꢁ ꢀꢂꢃ @ & ꢇ
3. Give the program a label — a single letter, A through Z. Press { letter.
Choose a letter that will remind you of the program, such as "A" for "area."
If the message
is displayed, use a different letter. You can
ꢈ"ꢀꢆꢉꢅꢊ!)ꢆꢋꢆ
clear the existing program instead — press { Y {
to find the label, and press { c and .
}, use or
ꢀꢂꢃ
4. To record calculator operations as program instructions, press the same keys
you would to do an operation manually. Remember that many functions don't
appear on the keyboard but must be accessed using menus.
Programs written for ALG mode should normally have an "="
(ENTER) as the last instruction in the program (before the RTN
instruction). This will complete any pending calculations and allow the user
to re-use the result of the program in further calculations.
To enter an equation in a program line, see the instructions below.
Simple Programming 12–5
5. End the program with a return instruction, which sets the program pointer back
to
after the program runs. Press | .
ꢅꢁꢆꢇ !ꢎꢅ
6. Press (or { e ) to cancel program entry.
Numbers in program lines are stored as precisely as you entered them, and they're
displayed using ALL or SCI format. (If a long number is shortened in the display,
press | to view all digits.)
To enter an equation in a program line:
1. Press | H to activate Equation–entry mode. The EQN annunciator
turns on.
2. Enter the equation as you would in the equation list. See chapter 6 for details.
Use b to correct errors as you type.
3. Press to terminate the equation and display its left end. (The equation
does not become part of the equation list.)
After you've entered an equation, you can press | to see its checksum
and length. Hold the key to keep the values in the display.
For a long equation, the
this program line. You can use and to scroll the display.
and
annunciators show that scrolling is active for
¨
§
Keys That Clear
Note these special conditions during program entry:
ꢀ
ꢀ
always cancels program entry. It never clears a number to zero.
If the program line doesn't contain an equation, b deletes the current
program line. It backspaces if a digit is being entered ("_" cursor present).
ꢀ
If the program line contains an equation, b begins editing the equation. It
deletes the rightmost function or variable if an equation is being entered (" "
¾
cursor present).
ꢀ
ꢀ
{ c {
} deletes a program line if it contains an equation.
ꢈꢉꢄ
To program a function to clear the X–register, use { c { }.
º
12–6 Simple Programming
Function Names in Programs
The name of a function that is used in a program line is not necessarily the same as
the function's name on its key, in its menu, or in an equation. The name that is used
in a program is usually a fuller abbreviation than that which can fit on a key or in
a menu. This fuller name appears briefly in the display whenever you execute a
function — as long as you hold down the key, the name is displayed.
Example: Entering a Labeled Program.
The following keystrokes delete the previous program for the area of a circle and
enter a new one that includes a label and a return instruction. If you make a
mistake during entry, press b to delete the current program line, then reenter the
line correctly.
Keys:
Display:
Description:
(In RPN mode)
{ e
Activates Program–entry
mode (PRGM on).
Clears all of program
memory.
Labels this program
routine A (for "area").
Enters the three program
lines.
ꢊ
ꢊ
{ c {
}
ꢅꢆꢇ
{ }
&
ꢅꢁꢆꢇ !ꢎꢅꢊ
{ A
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢋ
!
ꢀꢘꢘꢘꢋ º ꢊ
| N
z
π
ꢀꢘꢘꢘꢓ
ꢊ
ꢀꢘꢘꢘꢔ ºꢊ
ꢀꢘꢘꢘꢖ ꢁ!ꢄꢊ
ꢂꢏꢂ ꢀ
|
Ends the program.
Displays label A and the
length of the program in
bytes.
{ Y {
}
ꢅꢆꢇ
ꢂꢄ/ꢒꢖꢊ
|
Checksum and length of
program.
Cancels program entry
(PRGM annunciator off).
ꢃꢚ/ꢌꢈꢑꢌꢊ
ꢂꢄ/ꢒꢖꢊ
A different checksum means the program was not entered exactly as given here.
Simple Programming 12–7
Example: Entering a Program with an Equation.
The following program calculates the area of a circle using an equation, rather
than using RPN operations like the previous program.
Keys:
Display:
Description:
(In RPN mode)
{ e {
V
Activates Program–entry
mode; sets pointer to top
of memory.
ꢅꢁꢆꢇ !ꢎꢅꢊ
{ E
Labels this program
routine E (for
"equation").
Stores radius in variable
R.
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈꢊ
ꢈꢘꢘꢘꢋ !ꢎ ꢁꢊ
I R
| H | Nꢁ
z L R
ꢄ 2
Selects Equation–entry
mode; enters the
equation; returns to
Program–entry mode.
ꢊ
ꢊ
π
ꢈꢘꢘꢘꢓ ºꢁ:ꢋꢊ
|
ꢃꢚ/ꢗꢈꢖꢏꢊ
ꢂꢄ/ꢖꢊ
|
Ends the program.
Displays label E and the
length of the program in
bytes.
ꢈꢘꢘꢘꢔ ꢁ!ꢄꢊ
ꢂꢏꢂ ꢈ
{ Y {
}
ꢅꢆꢇ
ꢂꢄ/ꢒꢗꢊ
|
Checksum and length of
equation.
Cancels program entry.
ꢃꢚ/ꢔꢃꢌꢑꢊ
ꢂꢄ/ꢒꢗꢊ
ꢊ
12–8 Simple Programming
Running a Program
To run or execute a program, program entry cannot be active (no program–line
numbers displayed; PRGM off). Pressing will cancel Program–entry mode.
Executing a Program (XEQ)
Press X label to execute the program labeled with that letter. If there is only
one program in memory, you can also execute it by pressing { V
g (run/stop).
If necessary, enter the data before executing the program.
Example:
Run the programs labeled A and E to find the areas of three different circles with
radii of 5, 2.5, and 2π. Remember to enter the radius before executing A or E.
Keys:
Display:
Description:
(In RPN mode)
5 X A
Enters the radius, then starts
program A. The resulting area is
displayed.
Calculates area of the second
circle using program E.
Calculates area of the third
circle.
ꢁ"ꢄꢄꢐꢄꢆꢊ
ꢗꢕ)ꢖꢓꢙꢕꢊ
ꢒꢙ) ꢓꢖꢘꢊ
2.5 X E
2 | N z X
A
ꢊ
ꢒꢋꢔ)ꢘꢋꢖꢒꢊ
Testing a Program
If you know there is an error in a program, but are not sure where the error is, then
a good way to test the program is by stepwise execution. It is also a good idea to
test a long or complicated program before relying on it. By stepping through its
execution, one line at a time, you can see the result after each program line is
executed, so you can verify the progress of known data whose correct results are
also known.
1. As for regular execution, make sure program entry is not active (PRGM
annunciator off).
Simple Programming 12–9
2. Press { V label to set the program pointer to the start of the program
(that is, at its LBL instruction). The
without starting execution. (If the program is the first or only program, you can
press { V to move to its beginning.)
instruction moves the program pointer
ꢆ!ꢎ
3. Press and hold . This displays the current program line. When you release
, the line is executed. The result of that execution is then displayed (it is in
the X–register).
To move to the preceding line, you can press . No execution occurs.
4. The program pointer moves to the next line. Repeat step 3 until you find an
error (an incorrect result occurs) or reach the end of the program.
If Program–entry mode is active, then or ꢁsimply changes the program
pointer, without executing lines. Holding down a cursor key during program entry
makes the lines roll by automatically.
Example: Testing a Program.
Step through the execution of the program labeled A. Use a radius of 5 for the test
data. Check that Program–entry mode is not active before you start:
Keys:
Display:
Description:
(In RPN mode)
5 { V A
(hold)
(release)
(hold)
(release)
(hold)
(release)
(hold)
(release)
Moves program counter to label A.
ꢖ)ꢘꢘꢘꢘꢊ
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢖ)ꢘꢘꢘꢘꢊ
ꢋ
Squares input.
ꢀꢘꢘꢘꢋ º ꢊ
ꢋꢖ)ꢘꢘꢘꢘꢊ
π
Value of π.
ꢀꢘꢘꢘꢓ
ꢊ
ꢓ)ꢒꢔꢒ ꢊ
25π.
ꢀꢘꢘꢘꢔ ºꢊ
ꢗꢕ)ꢖꢓꢙꢕꢊ
ꢀꢘꢘꢘꢖ ꢁ!ꢄꢊ
ꢗꢕ)ꢖꢓꢙꢕꢊ
(hold)
(release)
End of program. Result is correct.
12–10 Simple Programming
Entering and Displaying Data
The calculator's variables are used to store data input, intermediate results, and
final results. (Variables, as explained in chapter 3, are identified by a letter from A
through Z or i, but the variable names have nothing to do with program labels.)
In a program, you can get data in these ways:
ꢀ
From an INPUT instruction, which prompts for the value of a variable. (This is
the most handy technique.)
ꢀ
From the stack. (You can use STO to store the value in a variable for later
use.)
ꢀ
ꢀ
From variables that already have values stored.
From automatic equation prompting (if enabled by flag 11 set).
(This is also handy if you're using equations.)
In a program, you can display information in these ways:
ꢀ
ꢀ
ꢀ
With a VIEW instruction, which shows the name and value of a variable.
(This is the most handy technique.)
On the stack — only the value in the X–register is visible. (You can use PSE
for a 1–second look at the X–register.)
In a displayed equation (if enabled by flag 10 set). (The "equation" is usually
a message, not a true equation.)
Some of these input and output techniques are described in the following topics.
Using INPUT for Entering Data
The INPUT instruction ( { Variable ) stops a running program and
displays a prompt for the given variable. This display includes the existing value
for the variable, such as
ꢁ@ꢊ
ꢘ)ꢘꢘꢘꢘꢊ
where
"R" is the variable's name,
?
" " is the prompt for information, and
0.0000 is the current value stored in the variable.
Simple Programming 12–11
Press g (run/stop) to resume the program. The value you keyed in then writes
over the contents of the X–register and is stored in the given variable. If you have
not changed the displayed value, then that value is retained in the X–register.
The area–of–a–circle program with an INPUT instruction looks like this:
RPN mode
ALG mode
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢀꢘꢘꢘꢋ ꢐꢄꢅ"! ꢁꢊ
ꢀꢘꢘꢘꢋ ꢐꢄꢅ"! ꢁꢊ
ꢋ
ꢋ
ꢀꢘꢘꢘꢓ º ꢊ
ꢀꢘꢘꢘꢓꢊº ꢊ
π
ꢀꢘꢘꢘꢔ
ꢊ
ꢀꢘꢘꢘꢔ ºꢊ
π
ꢀꢘꢘꢘꢖ ºꢊ
ꢀꢘꢘꢘꢖꢊ ꢊ
ꢀꢘꢘꢘ ꢁ!ꢄꢊ
ꢀꢘꢘꢘ ꢈꢄ!ꢈꢁꢊ
ꢀꢘꢘꢘꢗ ꢁ!ꢄꢊ
To use the INPUT function in a program:
1. Decide which data values you will need, and assign them names.
(In the area–of–a–circle example, the only input needed is the radius, which
we can assign to R.)
2. In the beginning of the program, insert an INPUT instruction for each variable
whose value you will need. Later in the program, when you write the part of the
calculation that needs a given value, insert a L variable instruction to bring
that value back into the stack.
Since the INPUT instruction also leaves the value you just entered in the
X–register, you don't have to recall the variable at a later time — you could
INPUT it and use it when you need it. You might be able to save some memory
space this way. However, in a long program it is simpler to just input all your
data up front, and then recall individual variables as you need them.
Remember also that the user of the program can do calculations while the
program is stopped, waiting for input. This can alter the contents of the stack,
which might affect the next calculation to be done by the program. Thus the
program should not assume that the X–, Y–, and Z–registers' contents will be
the same before and after the INPUT instruction. If you collect all the data in
the beginning and then recall them when needed for calculation, then this
prevents the stack's contents from being altered just before a calculation.
12–12 Simple Programming
"
For example, see the Coordinate Transformations" program in chapter 15.
Routine D collects all the necessary input for the variables M, N, and T (lines
D0002 through D0004) that define the x and y coordinates and angle θ of a new
system.
To respond to a prompt:
When you run the program, it will stop at each INPUT and prompt you for that
variable, such as
X–register) will be the current contents of R.
. The value displayed (and the contents of the
ꢁ@ꢘ)ꢘꢘꢘꢘ
ꢀ
ꢀ
To leave the number unchanged, just press g.
To change the number, type the new number and press g. This new
number writes over the old value in the X–register. You can enter a number as
a fraction if you want. If you need to calculate a number, use normal
keyboard calculations, then press g. For example, you can press 2
5 ꢄ g.
ꢀ
ꢀ
To calculate with the displayed number, press before
typing another number.
To cancel the INPUT prompt, press . The current value for the
variable remains in the X–register. If you press g to resume the program,
the canceled INPUT prompt is repeated. If you press during digit entry, it
clears the number to zero. Press again to cancel the INPUT prompt.
Using VIEW for Displaying Data
The programmed VIEW instruction ( | variable ) stops a running
program and displays and identifies the contents of the given variable, such as
ꢀ/ꢊ
ꢗꢕ)ꢖꢓꢙꢕꢊ
This is a display only, and does not copy the number to the X–register. If
Fraction–display mode is active, the value is displayed as a fraction.
ꢀ
ꢀ
Pressing copies this number to the X–register.
If the number is wider than 14 characters, pressing | displays
the entire number. (If it is a binary number with more than 12 digits, use the
and keys to see the rest.)
ꢀ
Pressing (or b) erases the VIEW display and shows the X–register.
Simple Programming 12–13
ꢀ
Pressing { c clears the contents of the displayed variable.
Press g to continue the program,
If you don't want the program to stop, see "Displaying Information without
Stopping" below.
For example, see the program for "Normal and Inverse–Normal Distributions" in
chapter 16. Lines T0015 and T0016 at the end of the T routine display the result
for X. Note also that this VIEW instruction in this program is preceded by a RCL
instruction. The RCL instruction is not necessary, but it is convenient because it
brings the VIEWed variable to the X–register, making it available for manual
calculations. (Pressing while viewing a VIEW display would have the
same effect.) The other application programs in chapters 15 through 17 also
ensure that the VIEWed variable is in the X–register as well — except for the
"Polynomial Root Finder" program.
Using Equations to Display Messages
Equations aren't checked for valid syntax until they're evaluated. This means you
can enter almost any sequence of characters into a program as an equation — you
enter it just as you enter any equation. On any program line, press | H to
start the equation. Press number and math keys to get numbers and symbols. Press
L before each letter. Press to end the equation.
If flag 10 is set, equations are displayed instead of being evaluated. This means
you can display any message you enter as an equation. (Flags are discussed in
detail in chapter 13.)
When the message is displayed, the program stops — press g to resume
execution. If the displayed message is longer than 14 characters, the
annunciator turns on when the message is displayed. You can then use and
¨
to scroll the display.
If you don't want the program to stop, see "Displaying Information without
Stopping" below.
Example: INPUT, VIEW, and Messages in a Program.
Write an equation to find the surface area and volume of a cylinder given its
radius and height. Label the program C (for cylinder), and use the variables S
(surface area), V (volume), R (radius), and H (height). Use these formulas:
12–14 Simple Programming
2
V = πR H
2
S = 2π R + 2π RH = 2π R ( R + H )
Keys:
Display:
Description:
(In RPN mode)
{ e {
V
{ C
{ R
{ H
Program, entry; sets pointer
to top of memory.
Labels program.
ꢊ
ꢅꢁꢆꢇ !ꢎꢅꢊ
ꢃꢘꢘꢘꢒ ꢂꢏꢂ ꢃꢊ
ꢃꢘꢘꢘꢋ ꢐꢄꢅ"! ꢁꢊ
ꢃꢘꢘꢘꢓ ꢐꢄꢅ"! ꢍꢊ
Instructions to prompt for
radius and height.
| H |
N z L R ꢄ
2 z L H
Calculates the volume.
ꢊ
ꢊ
ꢊ
π
ꢃꢘꢘꢘꢔ ºꢁ:ꢋºꢍꢊ
|
Checksum and length of
equation.
Store the volume in V.
Calculates the surface area.
ꢃꢚ/ꢗꢔꢑꢈ
ꢂꢄ/ꢗꢊ
I V
ꢃꢘꢘꢘꢖ !ꢎ #ꢊ
| H 2
zꢁ| N
zꢁL R z
| ] L R
L H |
`
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
π
ꢃꢘꢘꢘ ꢋº ºꢁº1ꢁꢊ
|
Checksum and length of
equation.
Stores the surface area in S.
Sets flag 10 to display
equations.
ꢃꢚ/ꢒꢙꢏꢓꢊ
ꢂꢄ/ꢒꢒꢊ
I S
ꢃꢘꢘꢘꢗ !ꢎ ꢊ
| y {
0
}
ꢑ
ꢊ
ꢃꢘꢘꢘꢕ ꢑ ꢒꢘꢊ
| H L V
L O L L
p p
L A L R
L E L A
Displays message in
equations.
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
ꢃꢘꢘꢘꢙ #ꢎꢂ - ꢀꢁꢊ
| y {
0
}
Clears flag 10.
ꢃꢑ
ꢊ
ꢃꢘꢘꢒꢘ ꢃꢑ ꢒꢘꢊ
Simple Programming 12–15
Keys:
Display:
Description:
Displays volume.
Displays surface area.
Ends program.
Displays label C and the
length of the program in
bytes.
(In RPN mode)
| V
| S
|
ꢃꢘꢘꢒꢒ #ꢐꢈ$ #ꢊ
ꢃꢘꢘꢒꢋ #ꢐꢈ$ ꢊ
ꢃꢘꢘꢒꢓ ꢁ!ꢄꢊ
ꢂꢏꢂ ꢃ
{ Y {
}
ꢅꢆꢇ
ꢂꢄ/ ꢗꢊ
|
Checksum and length of
program.
Cancels program entry.
ꢃꢚ/ ꢒꢕꢋꢊ
ꢂꢄ/ ꢗꢊ
ꢊ
1
Now find the volume and surface area–of a cylinder with a radius of 2 / cm
2
and a height of 8 cm.
Keys:
Display:
Description:
(In RPN mode)
X C
Starts executing C; prompts
for R. (It displays whatever
value happens to be in R.)
ꢁ@ꢊ
value
ꢊ
ꢊ
1
2 1 2 g
Enters 2 / as a fraction.
2
ꢍ@ꢊ
value
Prompts for H.
Message displayed.
8 g
g
#ꢎꢂ - ꢀꢁꢈꢀꢊ
#/ꢊ
3
Volume in cm .
ꢒꢖꢗ)ꢘꢗꢙ ꢊ
/ꢊ
2
g
Surface area in cm .
ꢒ ꢔ)ꢙꢓꢓ ꢊ
Displaying Information without Stopping
Normally, a program stops when it displays a variable with VIEW or displays an
equation message. You normally have to press g to resume execution.
If you want, you can make the program continue while the information is displayed.
If the next program line — after a VIEW instruction or a viewed equation —
contains a PSE (pause) instruction, the information is displayed and execution
continues after a 1–second pause. In this case, no scrolling or keyboard input is
allowed.
12–16 Simple Programming
The display is cleared by other display operations, and by the RND operation if
flag 7 is set (rounding to a fraction).
Press | f to enter PSE in a program.
The VIEW and PSE lines — or the equation and PSE lines — are treated as one
operation when you execute a program one line at a time.
Stopping or Interrupting a Program
Programming a Stop or Pause (STOP, PSE)
ꢀ
Pressing g (run/stop) during program entry inserts a STOP instruction.
This will halt a running program until you resume it by pressing g from the
keyboard. You can use STOP rather than RTN in order to end a program
without returning the program pointer to the top of memory.
ꢀ
Pressing | f during program entry inserts a PSE (pause) instruction.
This will suspend a running program and display the contents of the
X–register for about 1 second — with the following exception. If PSE
immediately follows a VIEW instruction or an equation that's displayed (flag
10 set), the variable or equation is displayed instead — and the display
remains after the 1–second pause.
Interrupting a Running Program
You can interrupt a running program at any time by pressing or g. The
program completes its current instruction before stopping. Press g (run/stop) to
resume the program.
If you interrupt a program and then press X, { V, or | , you
cannot resume the program with g. Reexecute the program instead (X
label).
Error Stops
If an error occurs in the course of a running program, program execution halts and
an error message appears in the display. (There is a list of messages and
conditions in appendix F.)
Simple Programming 12–17
To see the line in the program containing the error–causing instruction, press {
e. The program will have stopped at that point. (For instance, it might be a ÷
instruction, which caused an illegal division by zero.)
Editing a Program
You can modify a program in program memory by inserting, deleting, and editing
program lines. If a program line contains an equation, you can edit the
equation — if any other program line requires even a minor change, you must
delete the old line and insert a new one.
To delete a program line:
1. Select the relevant program or routine ( { V label), activate program
entry ( { e ), and press or to locate the program line that
must be changed. Hold the cursor key down to continue scrolling. (If you know
the line number you want, pressing { V label nnnn moves the
program pointer there.)
2. Delete the line you want to change — if it contains an equation, press {
c {
}; otherwise, press b. The pointer then moves to the preceding
line. (If you are deleting more than one consecutive program line, start with the
last line in the group.)
ꢀꢁꢂ
3. Key in the new instruction, if any. This replaces the one you deleted.
4. Exit program entry ( or { e ).
To insert a program line:
1. Locate and display the program line that is before the spot where you would
like to insert a line.
2. Key in the new instruction; it is inserted after the currently displayed line.
For example, if you wanted to insert a new line between lines A0004 and A0005
of a program, you would first display line A0004, then key in the instruction or
instructions. Subsequent program lines, starting with the original line A0005, are
moved down and renumbered accordingly.
To edit an equation in a program line:
1. Locate and display the program line containing the equation.
12–18 Simple Programming
2. Press b. This turns on the " " editing cursor, but does not delete anything in
¾
the equation.
3. Press b as required to delete the function or number you want to change,
then enter the desired corrections.
4. Press to end the equation.
Program Memory
Viewing Program Memory
Pressing { e toggles the calculator into and out of program entry (PRGM
annunciator on, program lines displayed). When Program–entry mode is active,
the contents of program memory are displayed.
Program memory starts at
. The list of program lines is circular, so you
ꢅꢁꢆꢇ !ꢎꢅ
can wrap the program pointer from the bottom to the top and reverse. While
program entry is active, there are three ways to change the program pointer (the
displayed line):
ꢀ
Use the cursor keys, { j and { h. Pressing { j at the last
line moves the pointer to
moves the pointer to the last program line.
, while pressing { h at
ꢅꢁꢆꢇ !ꢎꢅ
ꢅꢁꢆꢇ !ꢎꢅ
To move more than one line at a time ("scrolling"), continue to hold the
or key.
ꢀ
ꢀ
Press { V to move the program pointer to
.
ꢅꢁꢆꢇ !ꢎꢅ
Press { V label nnnn to move to a labeled line number less than
10000.
If Program–entry mode is not active (if no program lines are displayed), you can
also move the program pointer by pressing { V label.
Canceling Program–entry mode does not change the position of the program
pointer.
Simple Programming 12–19
Memory Usage
If during program entry you encounter the message
, then there is
ꢇꢈꢇꢎꢁ& ꢑ"ꢂꢂ
not enough room in program memory for the line you just tried to enter. You can
make more room available by clearing programs or other data. See "Clearing
One or More Programs" below, or "Managing Calculator Memory" in appendix
B.
The Catalog of Programs (MEM)
The catalog of programs is a list of all program labels with the number of bytes of
memory used by each label and the lines associated with it. Press { Y
{
} to display the catalog, and press or to move within the list. You
ꢅꢆꢇ
can use this catalog to:
ꢀ
ꢀ
Review the labels in program memory and the memory cost of each labeled
program or routine.
Execute a labeled program. (Press X or g while the label is
displayed.)
ꢀ
ꢀ
ꢀ
Display a labeled program. (Press { e while the label is displayed.)
Delete specific programs. (Press { c while the label is displayed.)
See the checksum associated with a given program segment. (Press |
.)
The catalog shows you how many bytes of memory each labeled program
segment uses. The programs are identified by program label:
ꢂꢏꢂ ꢃ
ꢂꢄ/ ꢗ
where 67 is the number of bytes used by the program.
Clearing One or More Programs
To clear a specific program from memory
1. Press { Y {
} and display (using and ) the label of the
ꢅꢆꢇ
program.
2. Press { c.
3. Press to cancel the catalog or b to back out.
12–20 Simple Programming
To clear all programs from memory:
1. Press { e to display program lines (PRGM annunciator on).
2. Press { c {
} to clear program memory.
ꢅꢆꢇ
3. The message
prompts you for confirmation. Press { }.
ꢃꢂꢁ ꢅꢆꢇ @ & ꢄ
&
4. Press { e to cancel program entry.
Clearing all of memory ({ c {
}) also clears all programs.
ꢀꢂꢂ
The Checksum
The
checksum is a unique hexadecimal value given to each program label and its
associated lines (until the next label). This number is useful for comparison with a
known checksum for an existing program that you have keyed into program
memory. If the known checksum and the one shown by your calculator are the
same, then you have correctly entered all the lines of the program. To see your
checksum:
1. Press { Y {
2. Display the appropriate label by using the cursor keys, if necessary.
} for the catalog of program labels.
ꢅꢆꢇ
3. Press and hold | to display
checksum and
length.
ꢃꢚ/
ꢂꢄ/
For example, to see the checksum for the current program (the "cylinder"
program):
Keys:
Display:
Description:
(In RPN mode)
{ Y {
}
Displays label C, which
takes 67 bytes.
Checksum and length.
ꢅꢆꢇ
ꢂꢏꢂ ꢃ
ꢂꢄ/ ꢗꢊ
| (hold)
ꢃꢚ/ ꢒꢕꢋꢊ
ꢂꢄ/ ꢗꢊ
If your checksum does not match this number, then you have not entered this
program correctly.
You will see that all of the application programs provided in chapters 15 through
17 include checksum values with each labeled routine so that you can verify the
accuracy of your program entry.
In addition, each equation in a program has a checksum. See "To enter an
equation in a program line" earlier in this chapter.
Simple Programming 12–21
Nonprogrammable Functions
The following functions of the HP 33s are not programmable:
{ c {
{ c {
b
}
}
{ V
{ V label nnnn
{ Y
ꢅꢆꢇ
ꢀꢂꢂ
, ,ꢁ,
{ e
|
| H
{ h, {ꢁj
{
Programming with BASE
You can program instructions to change the base mode using { x. These
settings work in programs just as they do as functions executed from the keyboard.
This allows you to write programs that accept numbers in any of the four bases, do
arithmetic in any base, and display results in any base.
When writing programs that use numbers in a base other than 10, set the base
mode both as the current setting for the calculator and in the program (as an
instruction).
Selecting a Base Mode in a Program
Insert a BIN, OCT, or HEX instruction into the beginning of the program. You
should usually include a DEC instruction at the end of the program so that the
calculator's setting will revert to Decimal mode when the program is done.
An instruction in a program to change the base mode will determine how input is
interpreted and how output looks during and after program execution, but it does
not affect the program lines as you enter them.
Equation evaluation, SOLVE, and FN automatically set Decimal mode.
³
12–22 Simple Programming
Numbers Entered in Program Lines
Before starting program entry, set the base mode. The current setting for the base
mode determines the base of the numbers that are entered into program lines. The
display of these numbers changes when you change the base mode.
Program line numbers always appear in base 10.
An annunciator tells you which base is the current setting. Compare the program
lines below in the left and right columns. All non–decimal numbers are
right–justified in the calculator's display. Notice how the number 13 appears as
"D" in Hexadecimal mode.
Decimal mode set:
Hexadecimal mode set:
:
:
:
:
PRGM
PRGM
HEX
ꢀꢘꢘꢘꢙ ꢍꢈ%
ꢀꢘꢘꢘꢙ ꢍꢈ%
PRGM
PRGM
HEX
ꢀꢘꢘꢒꢘ ꢒꢓ
ꢀꢘꢘꢒꢘ
ꢌꢊ
:
:
:
:
Polynomial Expressions and Horner's Method
Some expressions, such as polynomials, use the same variable several times for
their solution. For example, the expression
4
3
2
Ax + Bx + Cx + Dx + E
uses the variable x four different times. A program to calculate such an expression
using ALG operations could repeatedly recall a stored copy of x from a variable.
Example:
4
3
Write a program using ALG operations for 5x + 2x , then evaluate it for x = 7.
Simple Programming 12–23
Keys:
Display:
Description:
(In ALG mode)
{ e {
ꢊ
V
ꢅꢁꢆꢇ !ꢎꢅꢊ
{ A
{ Xꢁ
5
z
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢀꢘꢘꢘꢋꢊꢐꢄꢅ"!ꢊ%ꢊ
ꢀꢘꢘꢘꢓꢊꢖꢊ
5
ꢀꢘꢘꢘꢔꢊºꢊ
L X
ꢄ
5x.
ꢀꢘꢘꢘꢖꢊꢁꢃꢂꢊ%ꢊ
º
ꢀꢘꢘꢘ ¸ ꢊ
4
4ꢁ
5x
ꢀꢘꢘꢘꢗꢊꢔꢊ
ꢀꢘꢘꢘꢕ -ꢊ
4
5x +
4
2ꢁ
z
5x + 2
ꢀꢘꢘꢘꢙꢊꢋꢊ
ꢀꢘꢘꢒꢘ ºꢊ
4
L X
ꢄ
5x + 2x
ꢀꢘꢘꢒꢒꢊꢁꢃꢂꢊ%ꢊ
º
ꢀꢘꢘꢒꢋꢊ¸ ꢊ
4
3
3
5x + 2x
ꢀꢘꢘꢒꢓ ꢓꢊ
ꢀꢘꢘꢒꢔ ꢈꢄ!ꢈꢁꢊ
ꢀꢘꢘꢒꢖ ꢁ!ꢄꢊ
ꢂꢏꢂ ꢀ
|
{ Y {
}
Displays label A, which
takes 93 bytes.
Checksum and length.
ꢅꢆꢇ
ꢂꢄ/ꢙꢓꢊ
|
ꢃꢚ/ ꢀꢓꢑꢊ
ꢂꢄ/ꢙꢓꢊ
Cancels program entry.
ꢊ
Now evaluate this polynomial for x = 7.
Keys:
Display:
Description:
(In ALG mode)
X A
Prompts for x.
%@ꢊ
value
ꢊ
7 g
Result.
ꢒꢋ8 ꢙꢒ)ꢘꢘꢘꢘꢊ
12–24 Simple Programming
A more general form of this program for any equation
4
3
2
Ax + Bx + Cx + Dx + E would be:
ꢀꢘꢘꢘꢒꢊꢂꢏꢂꢊꢀꢊꢊ
ꢀꢘꢘꢘꢋꢊꢐꢄꢅ"!ꢊꢀꢊ
ꢀꢘꢘꢘꢓꢊꢐꢄꢅ"!ꢊꢏꢊ
ꢀꢘꢘꢘꢔꢊꢐꢄꢅ"!ꢊꢃꢊ
ꢀꢘꢘꢘꢖꢊꢐꢄꢅ"!ꢊꢌꢊ
ꢀꢘꢘꢘ ꢊꢐꢄꢅ"!ꢊꢈꢊ
ꢀꢘꢘꢘꢗꢊꢐꢄꢅ"!ꢊ%ꢊ
ꢀꢘꢘꢘꢕꢊꢁꢃꢂꢊ%ꢊ
ꢀꢘꢘꢘꢙꢊꢁꢃꢂhꢊꢀꢊ
ꢀꢘꢘꢒꢘꢊꢁꢃꢂ-ꢊꢏꢊ
ꢀꢘꢘꢒꢒꢊꢁꢃꢂhꢊ%ꢊ
ꢀꢘꢘꢒꢋꢊꢁꢃꢂ-ꢊꢃꢊ
ꢀꢘꢘꢒꢓꢊꢁꢃꢂhꢊ%ꢊ
ꢀꢘꢘꢒꢔꢊꢁꢃꢂ-ꢊꢌꢊ
ꢀꢘꢘꢒꢖꢊꢁꢃꢂhꢊ%ꢊ
ꢀꢘꢘꢒ ꢊꢁꢃꢂ-ꢊꢈꢊ
ꢀꢘꢘꢒꢗꢊꢈꢄ!ꢈꢁꢊ
ꢀꢘꢘꢒꢕꢊꢁ!ꢄꢊ
Checksum and length: E41A 54
Simple Programming 12–25
13
Programming Techniques
Chapter 12 covered the basics of programming. This chapter explores more
sophisticated but useful techniques:
ꢀ
Using subroutines to simplify programs by separating and labeling portions
of the program that are dedicated to particular tasks. The use of subroutines
also shortens a program that must perform a series of steps more than once.
ꢀ
ꢀ
ꢀ
Using conditional instructions (comparisons and flags) to determine which
instructions or subroutines should be used.
Using loops with counters to execute a set of instructions a certain number of
times.
Using indirect addressing to access different variables using the same
program instruction.
Routines in Programs
A program is composed of one or more routines. A routine is a functional unit that
accomplishes something specific. Complicated programs need routines to group
and separate tasks. This makes a program easier to write, read, understand, and
alter.
For example, look at the program for "Normal and Inverse–Normal Distributions"
in chapter 16. Routine S "initializes" the program by collecting the input for the
mean and standard deviation. Routine D sets a limit of integration, executes
routine Q, and displays the result. Routine Q integrates the function defined in
routine F and finishes the probability calculation of Q(x).
A routine typically starts with a label (LBL) and ends with an instruction that alters
or stops program execution, such as RTN, GTO, or STOP, or perhaps another
label.
Programming Techniques 13–1
Calling Subroutines (XEQ, RTN)
A subroutine is a routine that is called from (executed by) another routine and
returns to that same routine when the subroutine is finished. The subroutine must
start with a LBL and end with a RTN. A subroutine is itself a routine, and it can call
other subroutines.
ꢀ
XEQ must branch to a label (LBL) for the subroutine. (It cannot branch to a line
number.)
ꢀ
At the very next RTN encountered, program execution returns to the line after
the originating XEQ.
For example, routine Q in the "Normal and Inverse–Normal Distributions"
program in chapter 16 is a subroutine (to calculate Q(x)) that is called from routine
D by line
. Routine Q ends with a RTN instruction that sends
ꢌꢘꢘꢘꢓ %ꢈꢉ ꢉ
program execution back to routine D (to store and display the result) at line D0004.
See the flow diagrams below.
The flow diagrams in this chapter use this notation:
M
Program execution branches from this line to
ꢀꢘꢘꢘꢖ ꢆ!ꢎ ꢏ
ꢏꢘꢘꢘꢒ ꢂꢏꢂ ꢏ
M
the line marked
("from 1").
M
Program execution branches from a line
M
marked
("to 1") to this line.
Starts here.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌ
ꢌꢘꢘꢘꢋ ꢐꢄꢅ"! %
ꢌꢘꢘꢘꢓ %ꢈꢉ ꢉ
ꢌꢘꢘꢘꢔ !ꢎ ꢉ
ꢌꢘꢘꢘꢖ #ꢐꢈ$ ꢉ
ꢌꢘꢘꢘ ꢆ!ꢎ ꢌ
Calls subroutine Q.
Returns here.
M
N
Starts D again.
Starts subroutine.
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉ
M
N
.
.
.
Returns to routine D.
ꢉꢘꢘꢒ ꢁ!ꢄ
13–2 Programming Techniques
Nested Subroutines
A subroutine can call another subroutine, and that subroutine can call yet another
subroutine. This "nesting" of subroutines — the calling of a subroutine within
another subroutine — is limited to a stack of subroutines seven levels deep (not
counting the topmost program level). The operation of nested subroutines is as
shown below:
MAIN program
(top level)
End of program
Attempting to execute a subroutine nested more than seven levels deep causes an
error.
%ꢈꢉ ꢎ#ꢈꢁꢑꢂꢎ$
Example: A Nested Subroutine.
The following subroutine, labeled S, calculates the value of the expression
a2 + b2 + c2 + d2
as part of a larger calculation in a larger program. The subroutine calls upon
another subroutine (a nested subroutine), labeled Q, to do the repetitive squaring
and addition. This saves memory by keeping the program shorter than it would be
without the subroutine.
Programming Techniques 13–3
In RPN mode,
ꢘꢘꢘꢒ ꢂꢏꢂ
ꢘꢘꢘꢋ ꢐꢄꢅ"! ꢀ
ꢘꢘꢘꢓ ꢐꢄꢅ"! ꢏ
ꢘꢘꢘꢔ ꢐꢄꢅ"! ꢃ
ꢘꢘꢘꢖ ꢐꢄꢅ"! ꢌ
ꢘꢘꢘ ꢁꢃꢂ ꢌ
ꢘꢘꢘꢗ ꢁꢃꢂ ꢃ
ꢘꢘꢘꢕ ꢁꢃꢂ ꢏ
ꢘꢘꢘꢙ ꢁꢃꢂ ꢀ
Starts subroutine here.
Enters A.
Enters B.
Enters C.
Enters D.
Recalls the data.
2
ꢋ
A .
ꢘꢘꢒꢘ º
2
2
A + B .
ꢘꢘꢒꢒ %ꢈꢉ ꢉ
ꢘꢘꢒꢋ %ꢈꢉ ꢉ
ꢘꢘꢒꢓ %ꢈꢉ ꢉ
M
O
Q
2
2
2
2
A + B + C
N
P
R
2
2
2
A + B + C + D
ꢘꢘꢒꢔꢊ
º
A2 + B2 + C2 + D2
Returns to main routine.
ꢘꢘꢒꢖ ꢁ!ꢄ
Nested subroutine
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉ
ꢉꢘꢘꢘꢋ º65¸
MOQ
ꢋ
ꢉꢘꢘꢘꢓ º
ꢉꢘꢘꢘꢔ -
2
Adds x .
Returns to subroutine S.
NPR
ꢉꢘꢘꢘꢖ ꢁ!ꢄ
Branching (GTO)
As we have seen with subroutines, it is often desirable to transfer execution to a
part of the program other than the next line. This is called branching.
Unconditional branching uses the GTO (go to) instruction to branch to a program
label. It is not possible to branch to a specific line number during a program.
13–4 Programming Techniques
A Programmed GTO Instruction
The GTO label instruction (press { V label) transfers the execution of a
running program to the program line containing that label, wherever it may be.
The program continues running from the new location, and never automatically
returns to its point of origination, so GTO is not used for subroutines.
For example, consider the "Curve Fitting" program in chapter 16. The
ꢆ!ꢎ '
instruction branches execution from any one of three independent initializing
routines to LBL Z, the routine that is the common entry point into the heart of the
program:
Can start here.
ꢘꢘꢘꢒ ꢂꢏꢂ
.
.
.
Branches to Z.
ꢘꢘꢘꢖ ꢆ!ꢎ '
M
M
Can start here.
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂ
.
.
.
Branches to Z.
Can start here.
ꢂꢘꢘꢘꢖ ꢆ!ꢎ '
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈ
.
.
.
Branches to Z.
Branch to here.
ꢈꢘꢘꢘꢖ ꢆ!ꢎ '
M
M
'ꢘꢘꢘꢒ ꢂꢏꢂ '
.
.
.
Using GTO from the Keyboard
You can use { V to move the program pointer to a specified label or line
number without starting program execution.
Programming Techniques 13–5
ꢀ
ꢀ
To
: { V .
ꢅꢁꢆꢇ !ꢎꢅ
To a line number: { V label nnnn (nnnn < 10000). For example,
{ V A0005.
ꢀ
To a label: { V label —but only if program entry is not active (no
program lines displayed; PRGM off). For example, { V A.
Conditional Instructions
Another way to alter the sequence of program execution is by a conditional test, a
true/false test that compares two numbers and skips the next program instruction if
the proposition is false.
For instance, if a conditional instruction on line A0005 is
(that is, is x equal
º/ꢘ@
?
to zero ), then the program compares the contents of the X–register with zero. If
the X–register does contain zero, then the program goes on to the next line. If the
X–register does not contain zero, then the program skips the next line, thereby
branching to line A0007. This rule is commonly known as "Do if true."
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀ
.
.
.
Do next if true.
Skip next if false.
ꢀꢘꢘꢘꢖ º/ꢘ@
ꢀꢘꢘꢘ ꢆ!ꢎ ꢏ
ꢀꢘꢘꢘꢗ ꢂꢄ
N
N
M
M
ꢀꢘꢘꢘꢕ !ꢎ ꢀ
.
.
.
ꢏꢘꢘꢘꢒ ꢂꢏꢂ ꢏ
.
.
.
ꢊ
The above example points out a common technique used with conditional tests: the
line immediately after the test (which is only executed in the "true" case) is a
branch to another label. So the net effect of the test is to branch to a different
routine under certain circumstances.
There are three categories of conditional instructions:
ꢀ
Comparison tests. These compare the X–and Y–registers, or the X–register
and zero.
13–6 Programming Techniques
ꢀ
ꢀ
Flag tests. These check the status of flags, which can be either set or clear.
times.
Loop counters. These are usually used to loop a specified number of
Tests of Comparison (x?y, x?0)
There are 12 comparisons available for programming. Pressing { n or
| o displays a menu for one of the two categories of tests:
ꢀ
ꢀ
?
x y for tests comparing x and y.
?
x 0 for tests comparing x and 0.
Remember that x refers to the number in the X–register, and y refers to the number
in the Y–register. These do not compare the variables X and Y.
Select the category of comparison, then press the menu key for the conditional
instruction you want.
The Test Menus
?
x y
?
x 0
?
?
{≠} for x ≠ y
{≠} for x≠0
?
?
{≤} for x≤y
{<} for x<y
{>} for x>y
{≤} for x≤0
{<} for x<0
{>} for x>0
{≥} for x≥0
?
?
?
?
?
?
{≥} for x ≥y
?
?
{ } for x=y
/
{ } for x=0
/
If you execute a conditional test from the keyboard, the calculator will display
&ꢈ
or
.
ꢄꢎ
For example, if x =2 and y =7, test x<y .
Keys:
Display:
In RPN mode
In ALG mode
7 2 { n {<}
&ꢈ ꢊ
7 [ 2 { n {<}
&ꢈ
Programming Techniques 13–7
Example:
The "Normal and Inverse–Normal Distributions" program in chapter 16 uses the
?
x<y conditional in routine T:
Program Lines:
(In RPN mode)
Description
.
.
.
Calculates the correction for X
Adds the correction to yield a new X
.
!ꢘꢘꢘꢙ ª
guess
.
!ꢘꢘꢒꢘ !ꢎ- %
!ꢘꢘꢒꢒ ꢀꢏ
guess
!ꢘꢘꢒꢋ ꢘ)ꢘꢘꢘꢒ
<
Tests to see if the correction is significant.
Goes back to start of loop if correction is significant.
Continues if correction is not significant.
!ꢘꢘꢒꢓ º ¸@
!ꢘꢘꢒꢔ ꢆ!ꢎ !
!ꢘꢘꢒꢖ ꢁꢃꢂ %
Displays the calculated value of X.
!ꢘꢘꢒ #ꢐꢈ$ %
.
.
.
ꢊ
Line T0009 calculates the correction for X
guess
. Line T0013 compares the absolute
value of the calculated correction with 0.0001. If the value is less than 0.0001
("Do If True"), the program executes line T0014; if the value is equal to or greater
than 0.0001, the program skips to line T0015.
Flags
A flag is an indicator of status. It is either set (true) or clear (false). Testing a flag is
another conditional test that follows the "Do if true" rule: program execution
proceeds directly if the tested flag is set, and skips one line if the flag is clear.
Meanings of Flags
The HP 33s has 12 flags, numbered 0 through 11. All flags can be set, cleared,
and tested from the keyboard or by a program instruction. The default state of all
12 flags is clear. The three–key memory clearing operation described in appendix
B clears all flags. Flags are not affected by { c {
} { }.
&
ꢀꢂꢂ
13–8 Programming Techniques
ꢀ
ꢀ
Flags 0, 1, 2, 3, and 4 have no preassigned meanings. That is, their
states will mean whatever you define them to mean in a given program. (See
the example below.)
Flag 5, when set, will interrupt a program when an overflow occurs within
the program, displaying
result exceeds the largest number that the calculator can handle. The largest
possible number is substituted for the overflow result. If flag 5 is clear, a
and ¤. An overflow occurs when a
ꢎ#ꢈꢁꢑꢂꢎ$
program with an overflow is not interrupted, though
briefly when the program eventually stops.
is displayed
ꢎ#ꢈꢁꢑꢂꢎ$
ꢀ
Flag 6 is automatically set by the calculator any time an overflow occurs
(although you can also set flag 6 yourself). It has no effect, but can be tested.
Flags 5 and 6 allow you to control overflow conditions that occur during a
program. Setting flag 5 stops a program at the line just after the line that
caused the overflow. By testing flag 6 in a program, you can alter the
program's flow or change a result anytime an overflow occurs.
ꢀ
Flags 7, 8 and 9 control the display of fractions. Flag 7 can also be
controlled from the keyboard. When Fraction–display mode is toggled on or
off by pressing { , flag 7 is set or cleared as well.
Flag
Status
Fraction–Control Flags
8
7
9
Clear
(Default)
Fraction display
off; display real
numbers in the
current display
format.
Fraction
Reduce fractions
to smallest form.
denominators not
greater than the
/c value.
Set
Fraction display
on; display real
numbers as
Fraction
No reduction of
fractions. (Used
only if flag 8 is
set.)
denominators are
factors of the /c
Value.
fractions.
Programming Techniques 13–9
ꢀ
Flag 10 controls program execution of equations:
When flag 10 is clear (the default state), equations in running programs are
evaluated and the result put on the stack.
When flag 10 is set, equations in running programs are displayed as
messages, causing them to behave like a VIEW statement:
1. Program execution halts.
2. The program pointer moves to the next program line.
3. The equation is displayed without affecting the stack. You can clear the
display by pressing b or . Pressing any other key executes that
key's function.
4. If the next program line is a PSE instruction, execution continues after a
1–second pause.
The status of flag 10 is controlled only by execution of the SF and CF
operations from the keyboard, or by SF and CF statements in programs.
ꢀ
Flag 11 controls prompting when executing equations in a program — it
doesn't affect automatic prompting during keyboard execution:
When flag 11 is clear (the default state), evaluation, SOLVE, and FN of
³
equations in programs proceed without interruption. The current value of
each variable in the equation is automatically recalled each time the variable
is encountered. INPUT prompting is not affected.
When flag 11 is set, each variable is prompted for when it is first
encountered in the equation. A prompt for a variable occurs only once,
regardless of the number of times the variable appears in the equation.
When solving, no prompt occurs for the unknown; when integrating, no
prompt occurs for the variable of integration. Prompts halt execution. Pressing
g resumes the calculation using the value for the variable you keyed in, or
the displayed (current) value of the variable if g is your sole response to
the prompt.
Flag 11 is automatically cleared after evaluation, SOLVE, or
FN of an equation in a program. The status of flag 11 is also controlled by
³
execution of the SF and CF operations from the keyboard, or by SF and CF
statements in programs.
13–10 Programming Techniques
Annunciators for Set Flags
Flags 0, 1, 2, 3 and 4 have annunciators in the display that turn on when the
corresponding flag is set. The presence or absence of 0, 1, 2, 3 or 4 lets you
know at any time whether any of these five flags is set or not. However, there is no
such indication for the status of flags 5 through 11. The statuses of these flags can
?
be determined by executing the FS instruction from the keyboard. (See "Using
Flags" below.)
Using Flags
Pressing | y displays the FLAGS menu: { } { } {
}
ꢑ ꢃꢑ ꢑ @
After selecting the function you want, you will be prompted for the flag number
(0–11). For example, press | y { } 0 to set flag 0; press | y
ꢑ
{
ꢑ
} 0 to set flag 10; press | y { } 1 to set flag 11.
ꢑ
FLAGS Menu
Menu Key
Description
Set flag. Sets flag n.
Clear flag. Clears flag n.
{
{
{
} n
ꢑ
ꢃꢑ
} n
?
} n
Is flag set Tests the status of flag n.
ꢑ @
A flag test is a conditional test that affects program execution just as the
?
comparison tests do. The FS n instruction tests whether the given flag is set. If it is,
then the next line in the program is executed. If it is not, then the next line is
skipped. This is the "Do if True" rule, illustrated under "Conditional Instructions"
earlier in this chapter.
If you test a flag from the keyboard, the calculator will display "
" or " ".
&ꢈ
ꢄꢎ
It is good practice in a program to make sure that any conditions you will be
testing start out in a known state. Current flag settings depend on how they have
been left by earlier programs that have been run. You should not assume that any
given flag is clear, for instance, and that it will be set only if something in the
program sets it. You should make sure of this by clearing the flag before the
condition arises that might set it. See the example below.
Programming Techniques 13–11
Example: Using Flags.
The "Curve Fitting" program in chapter 16 uses flags 0 and 1 to determine
whether to take the natural logarithm of the X– and Y–inputs:
ꢀ
Lines S0003 and S0004 clear both of these flags so that lines W0007 and
W0011 (in the input loop routine) do not take the natural logarithms of the
X– and Y–inputs for a Straight–line model curve.
ꢀ
ꢀ
ꢀ
Line L0003 sets flag 0 so that line W0007 takes the natural log of the
X–input for a Logarithmic–model curve.
Line E0004 sets flag 1 so that line W0011 takes the natural log of the
Y–input for an Exponential–model curve.
Lines P0003 and P0004 set both flags so that lines W0007 and W0011
take the natural logarithms of both the X– and Y–inputs for a Power–model
curve.
Note that lines S0003, S0004, L0004, and E0003 clear flags 0 and 1 to ensure
that they will be set only as required for the four curve models.
13–12 Programming Techniques
Program Lines:
(In RPN mode)
Description:
.
.
.
Clears flag 0, the indicator for In X.
ꢘꢘꢘꢓ ꢃꢑ ꢘ
Clears flag 1, the indicator for In Y.
ꢘꢘꢘꢔ ꢃꢑ ꢒ
.
.
.
ꢊ
Sets flag 0, the indicator for In X.
ꢂꢘꢘꢘꢓ ꢑ ꢘ
ꢂꢘꢘꢘꢔ ꢃꢑ ꢒ
Clears flag 1, the indicator for In Y.
.
.
.
Clears flag 0, the indicator for In X.
ꢈꢘꢘꢘꢓ ꢃꢑ ꢘ
ꢈꢘꢘꢘꢔ ꢑ ꢒ
Sets flag 1, the indicator for In Y.
.
.
.
Sets flag 0, the indicator for ln X.
ꢅꢘꢘꢘꢓ ꢑ ꢘ
ꢅꢘꢘꢘꢔ ꢑ ꢒ
Sets flag 1, the indicator for In Y.
.
.
.
If flag 0 is set ...
$ꢘꢘꢘ ꢑ @ ꢘ
$ꢘꢘꢘꢗ ꢂꢄ
... takes the natural log of the X–input.
.
.
.
If flag 1 is set ...
$ꢘꢘꢒꢘ ꢑ @ ꢒ
$ꢘꢘꢒꢒ ꢂꢄ
... takes the natural log of the Y–input.
.
.
.
ꢊ
Programming Techniques 13–13
Example: Controlling the Fraction Display.
The following program lets you exercise the calculator's fraction–display
capability. The program prompts for and uses your inputs for a fractional number
and a denominator (the /c value). The program also contains examples of how the
three fraction–display flags (7, 8, and 9) and the "message–display" flag (10) are
used.
Messages in this program are listed as MESSAGE and are entered as equations:
1. Set Equation–entry mode by pressing | H (the EQN annunciator turns
on).
2. Press L letter for each alpha character in the message; press p (the
g key) for each space character.
3. Press to insert the message in the current program line and end
Equation–entry mode.
13–14 Programming Techniques
Program Lines:
(In ALG mode)
Description:
Begins the fraction program.
Clears three fraction flags.
ꢑꢘꢘꢘꢒ ꢂꢏꢂ ꢑ
ꢑꢘꢘꢘꢋ ꢃꢑ ꢗ
ꢑꢘꢘꢘꢓ ꢃꢑ ꢕ
ꢑꢘꢘꢘꢔ ꢃꢑ ꢙꢊ
ꢑꢘꢘꢘꢖ ꢑ ꢒꢘ
Displays messages.
Selects decimal base.
Prompts for a number.
Prompts for denominator (2 – 4095).
Displays message, then shows the decimal
number.
ꢑꢘꢘꢘ
ꢌꢈꢃꢊ
ꢑꢘꢘꢘꢗ ꢐꢄꢅ"! #
ꢑꢘꢘꢘꢕ ꢐꢄꢅ"! ꢌ
ꢑꢘꢘꢘꢙ ꢁꢃꢂ #
ꢑꢘꢘꢒꢘ ꢌꢈꢃꢐꢇꢀꢂꢊ
ꢑꢘꢘꢒꢒ ꢅ ꢈꢊ
ꢑꢘꢘꢒꢋ !ꢎꢅꢊ
ꢑꢘꢘꢒꢓ ꢁꢃꢂ ꢌ
ꢑꢘꢘꢒꢔ +Fꢊ
Sets /c value and sets flag 7.
ꢑꢘꢘꢒꢖ ꢁꢃꢂ #ꢊ
Displays message, then shows the fraction.
ꢑꢘꢘꢒ
ꢇꢎ ! ꢅꢁꢈꢃꢐ ꢈ
ꢑꢘꢘꢒꢗ ꢅ ꢈ
ꢑꢘꢘꢒꢕ !ꢎꢅ
ꢑꢘꢘꢒꢙ ꢑ ꢕ
Sets flag 8.
Displays message, then shows the fraction.
ꢑꢘꢘꢋꢘ ꢑꢀꢃ!ꢎꢁ ꢌꢈꢄꢎꢇ
ꢑꢘꢘꢋꢒ ꢅ ꢈꢊ
ꢑꢘꢘꢋꢋ !ꢎꢅꢊ
ꢑꢘꢘꢋꢓ ꢑ ꢙ
Sets flag 9.
Displays message, then shows the fraction.
ꢑꢘꢘꢋꢔ ꢑꢐ%ꢈꢌ ꢌꢈꢄꢎꢇ
ꢑꢘꢘꢋꢖ ꢅ ꢈꢊ
ꢑꢘꢘꢋ
!ꢎꢅꢊ
Goes to beginning of program.
ꢑꢘꢘꢋꢗ ꢆ!ꢎ ꢑ
Checksum and length: 6F14 123
Programming Techniques 13–15
Use the above program to see the different forms of fraction display:
Keys:
Display:
Description:
(In ALG mode)
X F
Executes label F; prompts for a
fractional number (V).
Stores 2.53 in V; prompts for
denominator (D).
Stores 16 as the /c value.
Displays message, then the
decimal number.
#@ꢊ
value
ꢊ
ꢊ
2.53 g
ꢌ@ꢊ
value
16 g
ꢌꢈꢃꢐꢇꢀꢂꢊ
ꢋ)ꢖꢓꢘꢘꢊ
g
Message indicates the fraction
format (denominator is no greater
than 16), then shows the fraction.
ꢇꢎ ! ꢅꢁꢈꢃꢐ ꢈꢊ
d
ꢋ ꢕ+ꢒꢖꢊ
ꢊ
d
indicates that the numerator is
"a little below" 8.
g
Message indicates the fraction
format (denominator is factor of
16), then shows the fraction.
Message indicates the fraction
format (denominator is 16), then
shows the fraction.
ꢑꢀꢃ!ꢎꢁ ꢌꢈꢄꢎꢇꢊ
c
ꢋ ꢒ+ꢋꢊ
ꢊ
g
ꢑꢐ%ꢈꢌ ꢌꢈꢄꢎꢇꢊ
c
ꢋ ꢕ+ꢒ ꢊ
ꢊ
g ꢁ
Stops the program and clears flag
10
ꢋ)ꢖꢓꢘꢘꢊ
| y { }
0
ꢃꢑ
Loops
Branching backwards — that is, to a label in a previous line — makes it possible
to execute part of a program more than once. This is called looping.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌ
ꢌꢘꢘꢘꢋ ꢐꢄꢅ"! ꢇ
ꢌꢘꢘꢘꢓ ꢐꢄꢅ"! ꢄ
ꢌꢘꢘꢘꢔ ꢐꢄꢅ"! !ꢊ
ꢌꢘꢘꢘꢖ ꢆ!ꢎ ꢌ
13–16 Programming Techniques
This routine (taken from the "Coordinate Transformations" program on page
15–32 in chapter 15) is an example of an infinite loop. It is used to collect the
initial data prior to the coordinate transformation. After entering the three values, it
is up to the user to manually interrupt this loop by selecting the transformation to be
performed (pressing X N for the old–to–new system or X O for the
new–to–old system).
Conditional Loops (GTO)
When you want to perform an operation until a certain condition is met, but you
don't know how many times the loop needs to repeat itself, you can create a loop
with a conditional test and a GTO instruction.
For example, the following routine uses a loop to diminish a value A by a constant
amount B until the resulting A is less than or equal to B.
Program lines:
(In RPN mode)
Description:
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀ
ꢀꢘꢘꢘꢋ ꢐꢄꢅ"! ꢀ
ꢀꢘꢘꢘꢓ ꢐꢄꢅ"! ꢏ
Checksum and length: D548
9
ꢘꢘꢘꢒ ꢂꢏꢂ
It is easier to recall A than to remember where it is in the
stack.
ꢘꢘꢘꢋ ꢁꢃꢂ ꢀ
Calculates A – B.
Replaces old A with new result.
Recalls constant for comparison.
ꢘꢘꢘꢓ ꢁꢃꢂ. ꢏ
ꢘꢘꢘꢔ !ꢎ ꢀ
ꢘꢘꢘꢖ ꢁꢃꢂ ꢏ
ꢘꢘꢘ º6¸@
ꢘꢘꢘꢗ ꢆ!ꢎ
ꢘꢘꢘꢕ #ꢐꢈ$ ꢀ
ꢘꢘꢘꢙ ꢁ!ꢄ
?
Is B < new A
Yes: loops to repeat subtraction.
No: displays new A.
Checksum and length: AC36 27
Programming Techniques 13–17
Loops with Counters (DSE, ISG)
When you want to execute a loop a specific number of times, use the { l
(increment; skip if greater than) or | m (decrement; skip if less than or equal
to) conditional function keys. Each time a loop function is executed in a program, it
automatically decrements or increments a counter value stored in a variable. It
compares the current counter value to a final counter value, then continues or exits
the loop depending on the result.
For a count–down loop, use | m variable
For a count–up loop, use { l variable
These functions accomplish the same thing as a FOR–NEXT loop in BASIC:
variable = initial–value
final–value
increment
ꢑꢎꢁ
!ꢎ
!ꢈꢅ
.
.
.
variable
ꢄꢈ%!
A DSE instruction is like a FOR–NEXT loop with a negative increment.
After pressing a shifted key for ISG or DSE ( { l or | m ), you will be
prompted for a variable that will contain the loop–control number (described
below).
The Loop–Control Number
The specified variable should contain a loop–control number ccccccc.fffii, where:
ꢀ
ꢀ
ꢀ
ccccccc is the current counter value (1 to 12 digits). This value changes with
loop execution.
fff is the final counter value (must be three digits). This value does not change
as the loop runs.
ii is the interval for incrementing and decrementing (must be two digits or
unspecified). This value does not change. An unspecified value for ii is
assumed to be 01 (increment/decrement by 1).
Given the loop–control number ccccccc.fffii, DSE decrements ccccccc to
ccccccc — ii, compares the new ccccccc with fff, and makes program execution
skip the next program line if this ccccccc ≤ fff.
13–18 Programming Techniques
Given the loop–control number ccccccc.fffii, ISG increments ccccccc to ccccccc +
ii, compares the new ccccccc with fff, and makes program execution skip the next
program line if this ccccccc > fff.
M
M
M
M
$ꢘꢘꢘꢒ ꢂꢏꢂ $
.
.
.
If current value >
final value, continue
loop.
If current value
≤ final value,
exit loop.
$ꢘꢘꢘꢙ ꢌ ꢈ ꢀ
$ꢘꢘꢒꢘ ꢆ!ꢎ $
$ꢘꢘꢒꢒ %ꢈꢉ %
N
N
.
.
.
$ꢘꢘꢘꢒ ꢂꢏꢂ $
.
.
.
If current value ≤
final value, continue
loop.
If current value
> final value,
exit loop.
$ꢘꢘꢘꢙ ꢐ ꢆ ꢀ
$ꢘꢘꢒꢘ ꢆ!ꢎ $
$ꢘꢘꢒꢒ %ꢈꢉ %
N
N
.
.
.
For example, the loop–control number 0.050 for ISG means: start counting at zero,
count up to 50, and increase the number by 1 each loop.
The following program uses ISG to loop 10 times. The loop counter
(0000001.01000) is stored in the variable Z. Leading and trailing zeros can be
left off.
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂꢊ
ꢂꢘꢘꢘꢋ ꢒ)ꢘꢒ
ꢂꢘꢘꢘꢓ !ꢘ '
ꢇꢘꢘꢘꢒ ꢂꢏꢂ ꢇꢊ
ꢇꢘꢘꢘꢋ ꢐ ꢆ '
ꢇꢘꢘꢘꢓ ꢆ!ꢎ ꢇ
ꢇꢘꢘꢘꢔ ꢁ!ꢄ
Press | Z to see that the loop–control number is now 11.0100.
ꢊ
Programming Techniques 13–19
Indirectly Addressing Variables and Labels
Indirect addressing is a technique used in advanced programming to specify a
variable or label without specifying beforehand exactly which one. This is
determined when the program runs, so it depends on the intermediate results (or
input) of the program.
Indirect addressing uses two different keys: (with ) and (with ).
The variable I has nothing to do with or the variable i. These keys are active
for many functions that take A through Z as variables or labels.
ꢀ
ꢀ
i is a variable whose contents can refer to another variable or label. It holds a
number just like any other variable (A through Z).
is a programming function that directs, "Use the number in i to determine
which variable or label to address."
This is an indirect address. (A through Z are direct addresses.)
Both and are used together to create an indirect address. (See the
examples below.)
By itself, i is just another variable.
By itself, is either undefined (no number in i) or uncontrolled (using whatever
number happens to be left over in i).
The Variable "i"
Your can store, recall, and manipulate the contents of i just as you can the contents
of other variables. You can even solve for i and integrate using i . The functions
listed below can use variable "i".
STO i
RCL i
INPUT i
VIEW i
DSE i
ISG i
STO +,–, × ,÷ i
RCL +,–, × ,÷ i
FN d i
SOLVE i
x < > i
³
13–20 Programming Techniques
The Indirect Address, (i)
Many functions that use A through Z (as variables or labels) can use to refer to
A through Z (variables or labels) or statistics registers indirectly. The function
uses the value in variable i to determine which variable, label, or register to
address. The following table shows how.
If i contains:
Then (i) will address:
1
variable A or label A
.
.
.
.
.
.
26
variable Z or label Z
27
variable i
28
n register
29
Σx register
30
Σy register
2
31
Σx register
2
32
33
Σy register
Σxy register
≥34 or ≤–34 or 0
error:
ꢐꢄ#ꢀꢂꢐꢌ 1L2
Only the absolute value of the integer portion of the number in i is used for
addressing.
The INPUT(i) and VIEW(i) operations label the display with the name of the
indirectly–addressed variable or register.
The SUMS menu enables you to recall values from the statistics registers. However,
you must use indirect addressing to do other operations, such as STO, VIEW, and
INPUT.
The functions listed below can use (i) as an address. For GTO, XEQ, and FN=, (i)
refers to a label; for all other functions (i) refers to a variable or register.
Programming Techniques 13–21
STO(i)
RCL(i)
STO +, –,× ,÷, (i)
RCL +, –,× ,÷, (i)
XEQ(i)
INPUT(i)
VIEW(i)
DSE(i)
ISG(i)
SOLVE(i)
GTO(i)
FN d(i)
³
X<>(i)
FN=(i)
Program Control with (i)
Since the contents of i can change each time a program runs — or even in different
parts of the same program — a program instruction such as
can branch
ꢆ!ꢎ1L2
to a different label at different times. This maintains flexibility by leaving open (until
the program runs) exactly which variable or program label will be needed. (See
the first example below.)
Indirect addressing is very useful for counting and controlling loops. The variable i
serves as an index, holding the address of the variable that contains the
loop–control number for the functions DSE and ISG. (See the second example
below.)
Example: Choosing Subroutines With (i).
The "Curve Fitting" program in chapter 16 uses indirect addressing to determine
which model to use to compute estimated values for x and y. (Different subroutines
compute x and y for the different models.) Notice that i is stored and then indirectly
addressed in widely separated parts of the program.
The first four routines (S, L, E, P) of the program specify the curve–fitting model that
will be used and assign a number (1, 2, 3, 4) to each of these models. This number
is then stored during routine Z, the common entry point for all models:
'ꢘꢘꢘꢓ !ꢎ L
Routine Y uses i to call the appropriate subroutine (by model) to calculate the x–
ˆ
y
and y–estimates. Line Y0003 calls the subroutine to compute
:
&ꢘꢘꢘꢓ %ꢈꢉ1L2
and line Y0008 calls a different subroutine to compute ˆ after i has been
x
increased by 6:
13–22 Programming Techniques
&ꢘꢘꢘ
&ꢘꢘꢘꢗ !ꢎ- L
&ꢘꢘꢘꢕ %ꢈꢉ1L2
If i holds:
Then XEQ(i) calls:
To:
ˆ
y
1
2
3
4
7
8
9
10
LBL A
LBL B
LBL C
LBL D
LBL G
LBL H
LBL I
Compute
Compute
Compute
Compute
Compute
Compute
Compute
Compute
for straight–line model.
for logarithmic model.
for exponential model.
for power model.
for straight–line model.
for logarithmic model.
for exponential model.
for power model.
ˆ
y
ˆ
y
ˆ
y
ˆ
x
ˆ
x
ˆ
x
LBL J
ˆ
x
Example: Loop Control With (i).
An index value in i is used by the program "Solutions of Simultaneous Equations —
Matrix Inversion Method" in chapter 15. This program uses the looping
instructions
and
in conjunction with the indirect instructions
ꢐ ꢆ L
ꢌ ꢈ L
and
to fill and manipulate a matrix.
ꢁꢃꢂ1L2
!ꢎ1L2
The first part of this program is routine A, which stores the initial loop–control
number in i.
Program lines:
(In RPN mode)
Description:
The starting point for data input.
Loop–control number: loop from 1 to 12 in intervals of 1.
Stores loop–control number in i.
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀ
ꢀꢘꢘꢘꢋ ꢒ)ꢘꢒꢋ
ꢀꢘꢘꢘꢓ !ꢎ L
The next routine is L, a loop to collect all 12 known values for a 3 × 3 coefficient
matrix (variables A – I ) and the three constants ( J – L ) for the equations.
Programming Techniques 13–23
Program Lines:
(In RPN mode)
Description:
This routine collects all known values in three
equations.
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂ
Prompts for and stores a number into the variable
addressed by i.
Adds 1 to i and repeats the loop until i reaches
13.012.
ꢂꢘꢘꢘꢋ ꢐꢄꢅ"!1L2
ꢂꢘꢘꢘꢓ ꢐ ꢆ L
ꢂꢘꢘꢘꢔ ꢆ!ꢎ ꢂ
ꢂꢘꢘꢘꢖ ꢆ!ꢎ ꢀ
When i exceeds the final counter value, execution
branches back to A.
Label J is a loop that completes the inversion of the 3 × 3 matrix.
Program Lines:
(In RPN mode)
Description:
This routine completes inverse by dividing by
determinant.
ꢛꢘꢘꢘꢒ ꢂꢏꢂ ꢛ
Divides element.
Decrements index value so it points closer to A
Loops for next value.
ꢛꢘꢘꢘꢋ !ꢎª1L2
ꢛꢘꢘꢘꢓ ꢌ ꢈ L
ꢛꢘꢘꢘꢔ ꢆ!ꢎ ꢛ
ꢛꢘꢘꢘꢖ ꢁ!ꢄ
Returns to the calling program or to
.
ꢅꢁꢆꢇ !ꢎꢅ
Equations with (i)
You can use (i) in an equation to specify a variable indirectly. Notice that
means the variable specified by the number in variable i (an indirect reference),
1L2
but that i or
means variable i.
1L2
The following program uses an equation to find the sum of the squares of variables
A through Z.
13–24 Programming Techniques
Program Lines:
(In RPN mode)
Description:
Begins the program.
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈ
Sets equations for execution.
Disables equation prompting.
Sets counter for 1 to 26.
Stores counter.
ꢈꢘꢘꢘꢋ ꢃꢑ ꢒꢘ
ꢈꢘꢘꢘꢓ ꢃꢑ ꢒꢒ
ꢈꢘꢘꢘꢔ ꢒ)ꢘꢋ
ꢈꢘꢘꢘꢖ !ꢎ L
Initializes sum.
ꢈꢘꢘꢘ
ꢘ
Checksum and length: AEC5 42
Starts summation loop.
ꢑꢘꢘꢘꢒ ꢂꢏꢂ ꢑ
ꢑꢘꢘꢘꢋ 1L2:ꢋ
Equation to evaluate the ith square.
(Press | H to start the equation.)
Ckecksum and length of equation: F09C
5
Adds ith square to sum.
Tests for end of loop.
Branches for next variable.
Ends program.
ꢑꢘꢘꢘꢓ -
ꢑꢘꢘꢘꢔ ꢐ ꢆ L
ꢑꢘꢘꢘꢖ ꢆ!ꢎ ꢑ
ꢑꢘꢘꢘ ꢁ!ꢄ
Checksum and length of program: E005 23
Programming Techniques 13–25
14
Solving and Integrating Programs
Solving a Program
In chapter 7 you saw how you can enter an equation — it's added to the equation
list — and then solve it for any variable. You can also enter a program that
calculates a function, and then solve it for any variable. This is especially useful if
the equation you're solving changes for certain conditions or if it requires repeated
calculations.
To solve a programmed function:
1. Enter a program that defines the function. (See "To write a program for SOLVE"
below.)
2. Select the program to solve: press | W label. (You can skip this step if
you're re–solving the same program.)
3. Solve for the unknown variable: press variable.
Notice that FN= is required if you're solving a programmed function, but not if
you're solving an equation from the equation list.
To halt a calculation, press or g. The current best estimate of the root is in
the unknown variable; use | to view it without disturbing the stack. To
resume the calculation, press g.
To write a program for SOLVE:
The program can use equations and ALG or RPN operations — in whatever
combination is most convenient.
1. Begin the program with a label. This label identifies the function that you want
SOLVE to evaluate (
label).
ꢑꢄ/
Solving and Integrating Programs 14–1
2. Include an INPUT instruction for each variable, including the unknown. INPUT
instructions enable you to solve for any variable in a multi–variable function.
INPUT for the unknown is ignored by the calculator, so you need to write only
one program that contains a separate INPUT instruction for every variable
(including the unknown).
If you include no INPUT instructions, the program uses the values stored in the
variables or entered at equation prompts.
3. Enter the instructions to evaluate the function.
ꢀ
A function programmed as a multi–line RPN or ALG sequence must be in
the form of an expression that goes to zero at the solution. If your equation
is f(x) = g(x), your program should calculate f(x) – g(x). "=0" is implied.
A function programmed as an equation can be any type of equation —
equality, assignment, or expression. The equation is evaluated by the
program, and its value goes to zero at the solution. If you want the
equation to prompt for variable values instead of including INPUT
instructions, make sure flag 11 is set.
ꢀ
4. End the program with a RTN. Program execution should end with the value of
the function in the X–register.
If the program contains a VIEW or STOP instruction, or a message for display (an
equation with Flag 10 set), then the instruction is normally executed only once - it is
not executed each time the program is called by SOLVE. However, if VIEW or a
message is followed by PSE, then the value or message will be displayed for one
second each time the program is called. (STOP followed by PSE is ignored.)
SOLVE works only with real numbers. However, if you have a complex–valued
function that can be written to isolate its real and imaginary parts, SOLVE can solve
for the parts separately.
Example: Program Using ALG.
Write a program using ALG operations that solves for any unknown in the
equation for the "Ideal Gas Law." The equation is:
P x V= N x R x T
where
2
P = Pressure (atmospheres or N/m ).
V = Volume (liters).
N = Number of moles of gas.
14–2 Solving and Integrating Programs
R = The universal gas constant
(0.0821 liter–atm/mole–K or 8.314 J/mole–K).
T = Temperature (kelvins; K = °C + 273.1).
To begin, put the calculator in Program mode; if necessary, position the program
pointer to the top of program memory.
Keys:
Display:
Description:
(In ALG mode)
{ e {
V
Sets Program mode.
ꢊ
ꢅꢁꢆꢇ !ꢎꢅꢊ
Type in the program:
Program Lines:
(In ALG mode)
Description:
Identifies the programmed function.
Stores P.
Stores V.
Stores N.
Stores R.
Stores T.
Pressure.
Pressure × volume.
ꢆꢘꢘꢘꢒ ꢂꢏꢂ ꢆ
ꢆꢘꢘꢘꢋ ꢐꢄꢅ"! ꢅ
ꢆꢘꢘꢘꢓ ꢐꢄꢅ"! #
ꢆꢘꢘꢘꢔ ꢐꢄꢅ"! ꢄ
ꢆꢘꢘꢘꢖ ꢐꢄꢅ"! ꢁ
ꢆꢘꢘꢘ ꢐꢄꢅ"! !
ꢆꢘꢘꢘꢗ ꢁꢃꢂ ꢅ
ꢆꢘꢘꢘꢕ ꢁꢃꢂº #
ꢆꢘꢘꢘꢙ .
Pressure × volume –
Pressure × volume – Number of moles of gas.
Pressure × volume – Moles × gas constant.
Pressure × volume – Moles × gas constant × temp.
Gets the result.
ꢆꢘꢘꢒꢘ ꢁꢃꢂ ꢄꢊ
ꢆꢘꢘꢒꢒ ꢁꢃꢂº ꢁ
ꢆꢘꢘꢒꢋꢊꢁꢃꢂº !
ꢆꢘꢘꢒꢓꢊꢈꢄ!ꢈꢁ
ꢆꢘꢘꢒꢔ ꢁ!ꢄ
Ends the program.
Checksum and length: EB2A 42
Press to cancel Program–entry mode.
Use program "G" to solve for the pressure of 0.005 moles of carbon dioxide in a
2–liter bottle at 24 °C.
Solving and Integrating Programs 14–3
Keys:
Display:
Description:
(In ALG mode)
| WꢁG
Selects "G" — the program.
SOLVE evaluates to find the
value of the unknown variable.
Selects P; prompts for V.
ꢊ
P
#@ꢊ
value
ꢊ
2 g
Stores 2 in V; prompts for N.
ꢄ@ꢊ
value
ꢊ
ꢊ
ꢊ
.005 g
.0821 g
24 273.1
g
Stores .005 in N; prompts for R.
ꢁ@ꢊ
value
Stores .0821 in R; prompts for
T.
Calculates T.
!@ꢊ
value
!@ꢊ
ꢋꢙꢗ)ꢒꢘꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢅ/ꢊ
Stores 297.1 in T; solves for P.
Pressure is 0.0610 atm.
ꢘ)ꢘ ꢒꢘꢊ
Example: Program Using Equation.
Write a program that uses an equation to solve the "Ideal Gas Law."
Keys:
Display:
Description:
(In RPN mode)
{ e {
V
Selects Program–entry mode.
Moves program pointer to top of
the list of programs.
ꢊ
ꢅꢁꢆꢇ !ꢎꢅꢊ
{ H
| y { }
1
| H
L P z
L V |
L N z
L R z
L T
Labels the program.
Enables equation prompting.
ꢍꢘꢘꢘꢒ ꢂꢏꢂ ꢍꢊ
ꢑ
ꢊ
ꢍꢘꢘꢘꢋ ꢑ ꢒꢒꢊ
Evaluates the equation, clearing
flag 11. (Checksum and length:
EDC8 9).
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
ꢍꢘꢘꢘꢓ ꢅº#/ꢄºꢁºꢊ
14–4 Solving and Integrating Programs
|
Ends the program.
Cancels Program–entry mode.
ꢍꢘꢘꢘꢔ ꢁ!ꢄꢊ
ꢘ)ꢘ ꢒꢘꢊ
Checksum and length of program: 36FF 21
Now calculate the change in pressure of the carbon dioxide if its temperature
drops by 10 °C from the previous example.
Keys:
Display:
Description:
(In RPN mode)
I L
| W H
P
Stores previous pressure.
Selects program “H.”
Selects variable P; prompts for V.
ꢘ)ꢘ ꢒꢘꢊ
ꢘ)ꢘ ꢒꢘꢊ
#@ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢄ@ꢊ
g
Retains 2 in V; prompts for N.
Retains .005 in N; prompts for R.
Retains .0821 in R; prompts for T.
Calculates new T.
ꢘ)ꢘꢘꢖꢘꢊ
ꢁ@ꢊ
g
ꢘ)ꢘꢕꢋꢒꢊ
!@ꢊ
g
ꢋꢙꢗ)ꢒꢘꢘꢘꢊ
!@ꢊ
10 ꢀ
g
ꢋꢕꢗ)ꢒꢘꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢅ/ꢊ
Stores 287.1 in T; solves for new
P.
ꢘ)ꢘꢖꢕꢙꢊ
.ꢘ)ꢘꢘꢋꢒꢊ
L L ꢀ
Calculates pressure change of the
gas when temperature drops from
297.1 K to 287.1 K (negative
result indicates drop in pressure).
Solving and Integrating Programs 14–5
Using SOLVE in a Program
You can use the SOLVE operation as part of a program.
If appropriate, include or prompt for initial guesses (into the unknown variable and
into the X–register) before executing the SOLVE variable instruction. The two
instructions for solving an equation for an unknown variable appear in programs
as:
label
ꢑꢄ/
variable
ꢎꢂ#ꢈꢊ
The programmed SOLVE instruction does not produce a labeled display (variable
= value) since this might not be the significant output for your program (that is, you
might want to do further calculations with this number before displaying it). If you
do want this result displayed, add a VIEW variable instruction after the SOLVE
instruction.
If no solution is found for the unknown variable, then the next program line is
skipped (in accordance with the "Do if True" rule, explained in chapter 13). The
program should then handle the case of not finding a root, such as by choosing
new initial estimates or changing an input value.
Example: SOLVE in a Program.
The following excerpt is from a program that allows you to solve for x or y by
pressing X X or Y.
14–6 Solving and Integrating Programs
Program Lines:
(In RPN mode)
Description:
Setup for X.
Index for X.
Branches to main routine.
%ꢘꢘꢘꢒ ꢂꢏꢂ %
%ꢘꢘꢘꢋ ꢋꢔ
%ꢘꢘꢘꢓ ꢆ!ꢎ ꢂ
Checksum and length: 4800 21
Setup for Y.
Index for Y.
Branches to main routine.
&ꢘꢘꢘꢒ ꢂꢏꢂ &
&ꢘꢘꢘꢋ ꢋꢖ
&ꢘꢘꢘꢓ ꢆ!ꢎ ꢂ
Checksum and length: C5E1 21
Main routine.
Stores index in i.
Defines program to solve.
Solves for appropriate variable.
Displays solution.
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂ
ꢂꢘꢘꢘꢋ !ꢎ L
ꢂꢘꢘꢘꢓ ꢑꢄ/ ꢑ
ꢂꢘꢘꢘꢔ ꢎꢂ#ꢈ1L2
ꢂꢘꢘꢘꢖ #ꢐꢈ$1L2
ꢂꢘꢘꢘ ꢁ!ꢄ
Ends program.
Checksum and length: D82E 18
Calculates f (x,y). Include INPUT or equation
prompting as required.
ꢑꢘꢘꢘꢒ ꢂꢏꢂ ꢑꢊ
)ꢊ
)ꢊ
)
ꢑꢘꢘꢒꢘ ꢁ!ꢄ
Integrating a Program
In chapter 8 you saw how you can enter an equation (or expression) — it's added
to the list of equations — and then integrate it with respect to any variable. You
can also enter a program that calculates a function, and then integrate it with
respect to any variable. This is especially useful if the function you're integrating
changes for certain conditions or if it requires repeated calculations.
To integrate a programmed function:
1. Enter a program that defines the integrand's function. (See "To write a
program for ³ FN" below.)
Solving and Integrating Programs 14–7
2. Select the program that defines the function to integrate: press | W
label. (You can skip this step if you're reintegrating the same program.)
3. Enter the limits of integration: key in the lower limit and press , then
key in the upper limit.
4. Select the variable of integration and start the calculation: press | ꢎ
variable.
Notice that FN= is required if you're integrating a programmed function, but not if
list.
you're integrating an equation from the equation
You can halt a running integration calculation by pressing or g. However,
the calculation cannot be resumed.
To write a program for FN:
³
The program can use equations, ALG or RPN operations — in whatever
combination is most convenient.
1. Begin the program with a label. This label identifies the function that you want
to integrate (
label).
ꢑꢄ/
2. Include an INPUT instruction for each variable, including the variable of
integration. INPUT instructions enable you to integrate with respect to any
variable in a multi–variable function. INPUT for the variable of integration is
ignored by the calculator, so you need to write only one program that contains
a separate INPUT instruction for every variable (including the variable of
integration).
If you include no INPUT instructions, the program uses the values stored in the
variables or entered at equation prompts.
3. Enter the instructions to evaluate the function.
ꢀ
ꢀ
A function programmed as a multi–line RPN or ALG sequence must
calculate the function values you want to integrate.
A function programmed as an equation is usually included as an
expression specifying the integrand — though it can be any type of
equation. If you want the equation to prompt for variable values instead of
including INPUT instructions, make sure flag 11 is set.
4. End the program with a RTN. Program execution should end with the value of
the function in the X–register.
14–8 Solving and Integrating Programs
Example: Program Using Equation.
The sine integral function in the example in chapter 8 is
sin x
x
t
0
Si(t) =
(
)dx
³
This function can be evaluated by integrating a program that defines the
integrand:
Defines the function.
The function as an expression. (Checksum and length:
0EE0 8).
ꢘꢘꢘꢒ ꢂꢏꢂ
ꢘꢘꢘꢋ ꢐꢄ1%2ª%
Ends the subroutine
Checksum and length of program: BDE3 17
ꢘꢘꢘꢓ ꢁ!ꢄ
Enter this program and integrate the sine integral function with respect to
to 2 ( = 2).
x
from 0
t
Keys:
(In RPN mode)
Display:
Description:
{
| W S
0 2
}
}
Selects Radians mode.
ꢁꢀꢌ
ꢊ
ꢊ
Selects label
S
as the integrand.
_
Enters lower and upper limits of
integration.
Integrates function from 0 to 2;
displays result.
ꢋ ꢊ
| ꢎ X
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢒ) ꢘꢖꢔꢊ
{
Restores Degrees mode.
ꢌꢈꢆ
ꢒ) ꢘꢖꢔꢊ
Using Integration in a Program
Integration can be executed from a program. Remember to include or prompt for
the limits of integration before executing the integration, and remember that
accuracy and execution time are controlled by the display format at the time the
program runs. The two integration instructions appear in the program as:
label
ꢑꢄ/
Solving and Integrating Programs 14–9
variable
ꢑꢄ G
³
The programmed FN instruction does not produce a labeled display ( = value)
³
³
since this might not be the significant output for your program (that is, you might
want to do further calculations with this number before displaying it). If you do
want this result displayed, add a PSE ( |ꢁf ) or STOP (g) instruction to
display the result in the X–register after the FN instruction.
³
If the program contains a VIEW or STOP instruction, or a message for display (an
equation with Flag 10 set), then the instruction is normally executed only once — it
is not executed each time the program is called by FN. However, if VIEW or a
³
message is followed by PSE, then the value or message will be displayed for one
second each time the program is called. (STOP followed by PSE is ignored.)
Example: FN in a Program.
³
The "Normal and Inverse–Normal Distributions" program in chapter 16 includes
an integration of the equation of the normal density function
2
D−M
S
e−(
/2dD.
)
1
S 2π
D
M
³
2
e((D−M)÷S)
The
÷2 function is calculated by the routine labeled F. Other routines
prompt for the known values and do the other calculations to find Q(D), the
upper–tail area of a normal curve. The integration itself is set up and executed
from routine Q:
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉ
Recalls lower limit of integration.
Recalls upper limit of integration. (X = D.)
Specifies the function.
Integrates the normal function using the dummy variable D.
ꢉꢘꢘꢘꢋ ꢁꢃꢂ ꢇ
ꢉꢘꢘꢘꢓ ꢁꢃꢂ %
ꢉꢘꢘꢘꢔ ꢑꢄ/ ꢑ
ꢉꢘꢘꢘꢖꢊ ꢑꢄ G ꢌ
³
14–10 Solving and Integrating Programs
Restrictions on Solving and Integrating
The SOLVE variable and FN d variable instructions cannot call a routine that
³
contains another SOLVE or FN instruction. That is, neither of these instructions
³
can be used recursively. For example, attempting to calculate a multiple integral
will result in an
contains an
error. Also, SOLVE and FN cannot call a routine that
1
ꢑꢄ2
³
³
³
label instruction; if attempted, a
or
ꢑꢄ/
ꢎꢂ#ꢈ ꢀꢃ!ꢐ#ꢈ
ꢑꢄ
³
error will be returned. SOLVE cannot call a routine that contains an
FN instruction (produces a
ꢀꢃ!ꢐ#ꢈ
error), just as FN cannot call a
ꢎꢂ#ꢈ1 ꢑꢄ2
³
³
³
routine that contains a SOLVE instruction (produces an
error).
1 ꢎꢂ#ꢈ2
³
The SOLVE variable and FN d variable instructions in a program use one of the
³
seven pending subroutine returns in the calculator. (Refer to "Nested Subroutines"
in chapter 13.)
The SOLVE and FN operations automatically set Decimal display format.
³
Solving and Integrating Programs 14–11
15
Mathematics Programs
Vector Operations
This program performs the basic vector operations of addition, subtraction, cross
product, and dot (or scalar) product. The program uses three–dimensional vectors
and provides input and output in rectangular or polar form. Angles between
vectors can also be found.
Z
P
R
Y
T
X
This program uses the following equations. Coordinate conversion:
X2 + Y2 + Z2
X = R sin(P) cos(T)
R =
Y = R sin(P) sin(T)
T = arctan (Y/X)
Z
Z = R cos(P)
P = arctan
X2 +Y2
Mathematics Programs 15–1
Vector addition and subtraction:
v + v = (X + U)i + (Y + V)j + (Z + W)k
1
2
v – v = (U – X)i + (V – Y)j + (W – Z)k
2
1
Cross product:
Dot Product:
v
× v = (YW – ZV )i + (ZU – XW)j + (XV – YU)k
1
2
D = XU + YV + ZW
Angle between vectors (γ):
D
R1 × R2
G = arccos
where
v = X i + Y j + Z k
1
and
v =U i + V j + W k
2
The vector displayed by the input routines (LBL P and LBL R) is V .
1
15–2 Mathematics Programs
Program Listing:
Program Lines:
(In ALG mode)
Description
Defines the beginning of the rectangular input/display
routine.
ꢁꢘꢘꢘꢒ ꢂꢏꢂ ꢁꢊ
Displays or accepts input of X.
Displays or accepts input of Y.
Displays or accepts input of Z.
ꢁꢘꢘꢘꢋ ꢐꢄꢅ"! %ꢊ
ꢁꢘꢘꢘꢓ ꢐꢄꢅ"! &ꢊ
ꢁꢘꢘꢘꢔ ꢐꢄꢅ"! 'ꢊ
Checksum and length: 8E7D 12
Defines beginning of rectangular–to–polar conversion
process.
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉꢊ
ꢉꢘꢘꢘꢋ ꢁꢃꢂ &ꢊ
ꢉꢘꢘꢘꢓꢊº65¸ꢊ
ꢉꢘꢘꢘꢔ ꢁꢃꢂ %ꢊ
Calculates (X2 + Y2) and arctan(Y/X).
´
θ
ꢉꢘꢘꢘꢖ ¸8º
8Tꢊ
8Tꢊ
ꢉꢘꢘꢘ º65¸ꢊ
ꢉꢘꢘꢘꢗ !ꢎ !ꢊ
ꢉꢘꢘꢘꢕ ꢁꢃꢂ 'ꢊ
´
Saves T = arctan(Y/X).
θ
Calculates (X2 + Y2 + Z2) and P.
Saves R.
ꢉꢘꢘꢘꢙ ¸8º
ꢉꢘꢘꢒꢘ !ꢎ ꢁꢊ
ꢉꢘꢘꢒꢒ º65¸ꢊ
ꢉꢘꢘꢒꢋ !ꢎ ꢅꢊ
Saves P
Checksum and length: E230 36
Defines the beginning of the polar input/display
routine.
ꢅꢘꢘꢘꢒ ꢂꢏꢂ ꢅꢊ
Displays or accepts input of R.
Displays or accepts input of T.
Displays or accepts input of P.
ꢅꢘꢘꢘꢋ ꢐꢄꢅ"! ꢁꢊ
ꢅꢘꢘꢘꢓ ꢐꢄꢅ"! !ꢊ
ꢅꢘꢘꢘꢔ ꢐꢄꢅ"! ꢅꢊ
ꢅꢘꢘꢘꢖ ꢁꢃꢂ ꢅꢊ
ꢅꢘꢘꢘ º65¸ꢊ
ꢅꢘꢘꢘꢗꢊꢁꢃꢂ ꢁꢊ
´
θ
Calculates R cos(P) and R sin(P).
ꢅꢘꢘꢘꢕꢊ 8T ¸8ºꢊ
Mathematics Programs 15–3
Program Lines:
(In ALG mode)
Description
Stores Z = R cos(P).
ꢅꢘꢘꢘꢙ !ꢎ 'ꢊ
ꢅꢘꢘꢒꢘ ꢁꢃꢂꢊ!ꢊ
ꢅꢘꢘꢒꢒꢊº65¸ꢊ
´
θ
Calculates R sin(P) cos(T) and R sin(P) sin(T).
Saves X = R sin(P) cos(T).
ꢅꢘꢘꢒꢋ 8T ¸8ºꢊ
ꢅꢘꢘꢒꢓ !ꢎ %ꢊ
ꢅꢘꢘꢒꢔ º65¸ꢊ
ꢅꢘꢘꢒꢖ !ꢎ &ꢊ
ꢅꢘꢘꢒ ꢆ!ꢎ ꢅꢊ
Saves Y = R sin(P) sin(T).
Loops back for another display of polar form.
Checksum and length: 5F1D 48
Defines the beginning of the vector–enter routine.
Copies values in X, Y and Z to U, V and W
respectively.
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈꢊ
ꢈꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
ꢈꢘꢘꢘꢓ !ꢎ "ꢊ
ꢈꢘꢘꢘꢔ ꢁꢃꢂ &ꢊ
ꢈꢘꢘꢘꢖ !ꢎ #ꢊ
ꢈꢘꢘꢘ ꢁꢃꢂ 'ꢊ
ꢈꢘꢘꢘꢗ !ꢎ $ꢊ
ꢈꢘꢘꢘꢕ ꢆ!ꢎ ꢉꢊ
Loops back for polar conversion and display/input.
Checksum and length: 1961 24
Defines beginning of vector–exchange routine.
Exchanges X, Y and Z with U, V and W respectively.
%ꢘꢘꢘꢒ ꢂꢏꢂ %ꢊ
%ꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
%ꢘꢘꢘꢓ %65 "ꢊ
%ꢘꢘꢘꢔ !ꢎ %ꢊ
%ꢘꢘꢘꢖ ꢁꢃꢂ &ꢊ
%ꢘꢘꢘ º65 #ꢊ
%ꢘꢘꢘꢗ !ꢎ &ꢊ
%ꢘꢘꢘꢕ ꢁꢃꢂ 'ꢊ
%ꢘꢘꢘꢙ º65 $ꢊ
%ꢘꢘꢒꢘ !ꢎ 'ꢊ
%ꢘꢘꢒꢒ ꢆ!ꢎ ꢉꢊ
Loops back for polar conversion and display/input.
Checksum and length: CE3C 33
Defines beginning of vector–addition routine.
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
15–4 Mathematics Programs
Program Lines:
(In ALG mode)
Description
ꢀꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
ꢀꢘꢘꢘꢓ ꢁꢃꢂ- "ꢊ
ꢀꢘꢘꢘꢔ !ꢎ %ꢊ
ꢀꢘꢘꢘꢖ ꢁꢃꢂ #ꢊ
ꢀꢘꢘꢘ ꢁꢃꢂ- &ꢊ
ꢀꢘꢘꢘꢗ !ꢎ &ꢊ
ꢀꢘꢘꢘꢕ ꢁꢃꢂ 'ꢊ
ꢀꢘꢘꢘꢙ ꢁꢃꢂ- $ꢊ
ꢀꢘꢘꢒꢘ !ꢎ 'ꢊ
ꢀꢘꢘꢒꢒ ꢆ!ꢎ ꢉꢊ
Saves X + U in X.
Saves V + Y in Y.
Saves Z + W in Z.
Loops back for polar conversion and display/input.
Checksum and length: 6ED7 33
Defines the beginning of the vector–subtraction
routine.
ꢘꢘꢘꢒ ꢂꢏꢂ ꢊ
Multiplies X, Y and Z by (–1) to change the sign.
ꢘꢘꢘꢋ .ꢒꢊ
ꢘꢘꢘꢓ !ꢎº %ꢊ
ꢘꢘꢘꢔ !ꢎº &ꢊ
ꢘꢘꢘꢖ !ꢎº 'ꢊ
ꢘꢘꢘ ꢆ!ꢎ ꢀꢊ
Goes to the vector–addition routine.
Checksum and length: 5FC1 30
Defines the beginning of the cross–product routine.
ꢃꢘꢘꢘꢒ ꢂꢏꢂ ꢃꢊ
ꢃꢘꢘꢘꢋ ꢁꢃꢂ &ꢊ
ꢃꢘꢘꢘꢓ ꢁꢃꢂº $ꢊ
ꢃꢘꢘꢘꢔ .ꢊ
ꢃꢘꢘꢘꢖ ꢁꢃꢂ 'ꢊ
ꢃꢘꢘꢘ ꢁꢃꢂº #ꢊ
ꢃꢘꢘꢘꢗ ꢈꢄ!ꢈꢁꢊ
ꢃꢘꢘꢘꢕꢊ !ꢎꢊꢀꢊ
ꢃꢘꢘꢘꢙ ꢁꢃꢂ 'ꢊ
ꢃꢘꢘꢒꢘ ꢁꢃꢂº "ꢊ
ꢃꢘꢘꢒꢒꢊ.ꢊ
Calculates (YW – ZV), which is the X component.
ꢃꢘꢘꢒꢋ ꢁꢃꢂ %ꢊ
ꢃꢘꢘꢒꢓ ꢁꢃꢂº $ꢊ
Mathematics Programs 15–5
Program Lines:
(In ALG mode)
Description
Calculates (ZU – WX), which is the Y component.
ꢃꢘꢘꢒꢔ ꢈꢄ!ꢈꢁꢊ
ꢃꢘꢘꢒꢖꢊ !ꢎ ꢏꢊ
ꢃꢘꢘꢒ ꢁꢃꢂ %ꢊ
ꢃꢘꢘꢒꢗ ꢁꢃꢂº #ꢊ
ꢃꢘꢘꢒꢕ .ꢊ
ꢃꢘꢘꢒꢙ ꢁꢃꢂ &ꢊ
ꢃꢘꢘꢋꢘꢊꢁꢃꢂº "ꢊ
ꢃꢘꢘꢋꢒꢊꢈꢄ!ꢈꢁꢊ
ꢃꢘꢘꢋꢋ !ꢎ 'ꢊ
ꢃꢘꢘꢋꢓꢊꢁꢃꢂꢊꢀꢊ
ꢃꢘꢘꢋꢔꢊ !ꢎ %ꢊ
ꢃꢘꢘꢋꢖꢊꢁꢃꢂꢊꢏꢊ
ꢃꢘꢘꢋ !ꢎ &ꢊ
ꢃꢘꢘꢋꢗ ꢆ!ꢎ ꢉꢊ
Stores (XV – YU), which is the Z component.
Stores X component.
Stores Y component.
Loops back for polar conversion and display/input.
Checksum and length: 6F95 81
Defines beginning of dot–product and vector–angle
routine.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
ꢌꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
ꢌꢘꢘꢘꢓ ꢁꢃꢂº "ꢊ
ꢌꢘꢘꢘꢔ -ꢊ
ꢌꢘꢘꢘꢖ ꢁꢃꢂ &ꢊ
ꢌꢘꢘꢘ ꢁꢃꢂº #ꢊ
ꢌꢘꢘꢘꢗ -ꢊ
ꢌꢘꢘꢘꢕ ꢁꢃꢂ 'ꢊ
ꢌꢘꢘꢘꢙ ꢁꢃꢂº $ꢊ
ꢌꢘꢘꢒꢘ ꢈꢄ!ꢈꢁꢊ
ꢌꢘꢘꢒꢒ !ꢎ ꢌꢊ
ꢌꢘꢘꢒꢋ #ꢐꢈ$ ꢌꢊ
ꢌꢘꢘꢒꢓ ꢁꢃꢂ #ꢊ
ꢌꢘꢘꢒꢔꢊº65¸ꢊ
ꢌꢘꢘꢒꢖ ꢁꢃꢂꢊ"ꢊ
Stores the dot product of XU + YV + ZW.
Displays the dot product.
´
θ
ꢌꢘꢘꢒ ¸8º
8Tꢊ
ꢌꢘꢘꢒꢗꢊº65¸ꢊ
15–6 Mathematics Programs
Program Lines:
(In ALG mode)
Description
ꢌꢘꢘꢒꢕ ꢁꢃꢂ $ꢊ
´
θ
Calculates the magnitude of the U, V, W vector.
ꢌꢘꢘꢒꢙ ¸8º
8Tꢊ
ꢌꢘꢘꢋꢘꢊ !ꢎꢊꢈꢊ
ꢌꢘꢘꢋꢒꢊ1ꢊ
ꢌꢘꢘꢋꢋꢊꢁꢃꢂꢊꢌꢊ
Divides the dot product by the magnitude of the X–,
Y–, Z–vector.
ꢌꢘꢘꢋꢓ ꢁꢃꢂª ꢁꢊ
Divides previous result by the magnitude.
ꢌꢘꢘꢋꢔꢊªꢊ
ꢌꢘꢘꢋꢖ ꢁꢃꢂ ꢈꢊ
ꢌꢘꢘꢋ 2ꢊ
Calculates angle.
ꢌꢘꢘꢋꢗ ꢀꢃꢎ ꢊ
ꢌꢘꢘꢋꢕꢊ !ꢎ ꢆꢊ
ꢌꢘꢘꢋꢙꢊ#ꢐꢈ$ ꢆꢊ
ꢌꢘꢘꢓꢘꢊꢆ!ꢎ ꢅꢊ
Displays angle.
Loops back for polar display/input.
Checksum and length: 0548 90
Flags Used:
None.
Remarks:
The terms "polar" and "rectangular," which refer to two–dimensional systems, are
used instead of the proper three–dimensional terms of "spherical" and
"Cartesian." This stretch of terminology allows the labels to be associated with
their function without confusing conflicts. For instance, if LBL C had been
associated with Cartesian coordinate input, it would not have been available for
cross product.
Program Instructions:
1. Key in the program routines; press when done.
2. If your vector is in rectangular form, press X R and go to step 4. If your
vector is in polar form, press X P and continue with step 3.
Mathematics Programs 15–7
3. Key in R and press g, key in T and press g, then key in P and press
g. Continue at step 5.
4. Key in X and press g, key in Y and press g, and key in Z and press
g.
5. To key in a second vector, press X E (for enter), then go to step 2.
6. Perform desired vector operation:
a. Add vectors by pressing X A;
b. Subtract vector one from vector two by pressing X S;
c. Compute the cross product by pressing X C;
d. Compute the dot product by pressing X D and the angle between
vectors by pressing g.
7. Optional: to review v in polar form, press X P, then press g
1
repeatedly to see the individual elements.
8. Optional: to review v in rectangular form, press X R, then press g
1
repeatedly to see the individual elements.
9. If you added, subtracted, or computed the cross product, v has been
1
replaced by the result, v is not altered. To continue calculations based on the
2
result, remember to press X E before keying in a new vector.
10. Go to step 2 to continue vector calculations.
Variables Used:
X, Y, Z
U, V, W
R, T, P
The rectangular components of v .
1
The rectangular components of v .
2
The radius, the angle in the x–y plane (θ), and the angle from
the Z axis of v (U).
1
D
The dot product
G
The angle between vectors (γ)
Example 1:
A microwave antenna is to be pointed at a transmitter which is 15.7 kilometers
North, 7.3 kilometers East and 0.76 kilometers below. Use the rectangular to
polar conversion capability to find the total distance and the direction to the
transmitter.
15–8 Mathematics Programs
N
(y)
7.3
Transmitter
15.7
Antenna
E
(x)
W
S
Keys:
(In ALG mode)
Display:
Description:
Sets Degrees mode.
Starts rectangular input/display
routine.
{
X Rꢁ
}
ꢌꢈꢆ
ꢊ
%@ꢊ
value
ꢊ
ꢊ
ꢊ
7.3 gꢁ
Sets X equal to 7.3.
&@ꢊ
value
15.7 gꢁ
Sets Y equal to 15.7.
'@ꢊ
value
.76 ^ gꢁ
gꢁ
Sets Z equal to –0.76 and
calculates R, the radius.
Calculates T, the angle in the x/y
plane.
Calculates P, the angle from the
z–axis.
ꢁ@ꢊ
ꢒꢗ)ꢓꢓꢘꢕꢊ
!@ꢊ
ꢖ)ꢘ ꢓꢒꢊ
ꢅ@ꢊ
gꢁ
ꢙꢋ)ꢖꢒꢓꢔꢊ
Example 2:
?
What is the moment at the origin of the lever shown below What is the
?
component of force along the lever What is the angle between the resultant of the
?
force vectors and the lever
Mathematics Programs 15–9
F = 17
T = 215
P = 17
1
o
o
Z
F = 23
1.07m
o
2
o
T = 80
P = 74
63
o
Y
o
125
X
First, add the force vectors.
Keys:
Display:
Description:
(In ALG mode)
X P
Starts polar input routine.
Sets radius equal to 17.
Sets T equal to 215.
ꢁ@ꢊ
value
ꢊ
ꢊ
17 g
!@ꢊ
value
215 g
ꢅ@ꢊ
value
17 g
Sets P equal to 17.
ꢁ@ꢊ
ꢒꢗ)ꢘꢘꢘꢘ
ꢁ@ꢊ
X E
23 g
80 g
74 g
X A
g
Enters vector by copying it into
v .
ꢒꢗ)ꢘꢘꢘꢘ
!@ꢊ
2
Sets radius of v equal to 23.
1
.ꢒꢔꢖ)ꢘꢘꢘꢘꢊ
ꢅ@ꢊ
Sets T equal to 80.
ꢒꢗ)ꢘꢘꢘꢘꢊ
ꢁ@ꢊ
Sets P equal to 74.
ꢋꢓ)ꢘꢘꢘꢘꢊ
ꢁ@ꢊ
Adds the vectors and displays the
resultant R.
Displays T of resultant vector.
ꢋꢙ)ꢔꢗꢔꢒꢊ
!@ꢊ
ꢙꢘ)ꢗꢘꢓꢋꢊ
15–10 Mathematics Programs
g
Displays P of resultant vector.
ꢅ@ꢊ
ꢓꢙ)ꢙꢔꢔꢖꢊ
ꢁ@ꢊ
X E
Enters resultant vector.
ꢋꢙ)ꢔꢗꢔꢒꢊ
Since the moment equals the cross product of the radius vector and the force vector
(r × F), key in the vector representing the lever and take the cross product.
Keys:
Display:
Description:
(In ALG mode)
1.07 g
125 g
63 g
X C
g
Sets R equal to 1.07.
Sets T equal to 125.
Sets P equal to 63.
!@ꢊ
ꢙꢘ)ꢗꢘꢓꢋꢊ
ꢅ@ꢊ
ꢓꢙ)ꢙꢔꢔꢖꢊ
ꢁ@ꢊ
ꢒ)ꢘꢗꢘꢘꢊ
ꢁ@ꢊ
Calculates cross product and
displays R of result.
Displays T of cross product.
ꢒꢕ)ꢘꢋꢘꢙꢊ
!@ꢊ
ꢖꢖ)ꢓꢗꢒꢙꢊ
ꢅ@ꢊ
g
Displays P of cross product.
ꢒꢋꢔ)ꢓꢔꢒꢋꢊ
%@ꢊ
X R
g
Displays rectangular form of
cross product.
ꢕ)ꢔꢖꢖꢔꢊ
&@ꢊ
ꢒꢋ)ꢋꢔꢓꢙꢊ
'@ꢊ
g
.ꢒꢘ)ꢒ ꢘꢊ
The dot product can be used to resolve the force (still in v ) along the axis of the
2
lever.
Keys:
Display:
Description:
(In ALG mode)
X P
Starts polar input routine.
ꢁ@ꢊ
ꢒꢕ)ꢘꢋꢘꢙꢊ
!@ꢊ
1 g
Defines the radius as one unit
vector.
ꢖꢖ)ꢓꢗꢒꢙꢊ
Mathematics Programs 15–11
125 g
63 g
X D
g
Sets T equal to 125.
Sets P equal to 63.
Calculates dot product.
ꢅ@ꢊ
ꢒꢋꢔ)ꢓꢔꢒꢋꢊ
ꢁ@ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
ꢌ/ꢊ
ꢋꢔ)ꢒꢕꢕꢋꢊ
ꢆ/ꢊ
Calculates angle between
resultant force vector and lever.
Gets back to input routine.
ꢓꢔ)ꢕꢔꢙꢘꢊ
ꢁ@ꢊ
g
ꢒ)ꢘꢘꢘꢘꢊ
Solutions of Simultaneous Equations
This program solves simultaneous linear equations in two or three unknowns. It
does this through matrix inversion and matrix multiplication.
A system of three linear equations
AX + DY + GZ = J
BX + EY + HZ = K
CX + FY + IZ = L
can be represented by the matrix equation below.
A
B
C
D
E
F
G
H
I
X
Y
Z
J
ª
«
«
º ª
» «
» «
º
»
»
ª
«
º
»
»
= K
«
«
¬
» «
¼ ¬
»
¼
«
»
¼
L
¬
The matrix equation may be solved for X, Y, and Z by multiplying the result matrix
by the inverse of the coefficient matrix.
′
′
′
′
′
′
′
′
A
B
C
D
E
F
G
H
I
J
K
L
X
= Y
ª
«
«
ºª
»«
»«
º
»
»
ª
«
º
»
»
«
«
¬
′ »«
»
¼
«
Z
¬
»
¼
¼¬
Specifics regarding the inversion process are given in the comments for the
inversion routine, I.
15–12 Mathematics Programs
Program Listing:
Program Lines:
(In RPN mode)
Description
Starting point for input of coefficients.
Loop–control value: loops from 1 to 12, one at a
time.
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢀꢘꢘꢘꢋ ꢒ)ꢘꢒꢋꢊ
Stores control value in index variable.
Checksum and length: 35E7 21
ꢀꢘꢘꢘꢓ !ꢎ Lꢊ
Starts the input loop.
Prompts for and stores the variable addressed by i.
Adds one to i.
If i is less than 13, goes back to LBL L and gets the
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂꢊ
ꢂꢘꢘꢘꢋ ꢐꢄꢅ"!1L2ꢊ
ꢂꢘꢘꢘꢓ ꢐ ꢆ Lꢊ
ꢂꢘꢘꢘꢔ ꢆ!ꢎ ꢂꢊ
next value.
Returns to LBL A to review values.
Checksum and length: 51AB 15
ꢂꢘꢘꢘꢖ ꢆ!ꢎ ꢀꢊ
This routine inverts a 3 × 3 matrix.
Calculates determinant and saves value for the
division loop, J.
ꢐꢘꢘꢘꢒ ꢂꢏꢂ ꢐꢊ
ꢐꢘꢘꢘꢋ %ꢈꢉ ꢌꢊ
ꢐꢘꢘꢘꢓ !ꢎ $ꢊ
ꢐꢘꢘꢘꢔ ꢁꢃꢂ ꢀꢊ
ꢐꢘꢘꢘꢖ ꢁꢃꢂº ꢐꢊ
ꢐꢘꢘꢘ ꢁꢃꢂ ꢃꢊ
ꢐꢘꢘꢘꢗ ꢁꢃꢂº ꢆꢊ
ꢐꢘꢘꢘꢕ .ꢊ
Calculates E' × determinant = AI – CG.
ꢐꢘꢘꢘꢙ !ꢎ %ꢊ
ꢐꢘꢘꢒꢘ ꢁꢃꢂ ꢃꢊ
ꢐꢘꢘꢒꢒ ꢁꢃꢂº ꢌꢊ
ꢐꢘꢘꢒꢋ ꢁꢃꢂ ꢀꢊ
ꢐꢘꢘꢒꢓ ꢁꢃꢂº ꢑꢊ
ꢐꢘꢘꢒꢔ .ꢊ
Calculates F' × determinant = CD – AF.
ꢐꢘꢘꢒꢖ !ꢎ &ꢊ
ꢐꢘꢘꢒ ꢁꢃꢂ ꢏꢊ
ꢐꢘꢘꢒꢗ ꢁꢃꢂº ꢆꢊ
ꢐꢘꢘꢒꢕ ꢁꢃꢂ ꢀꢊ
Mathematics Programs 15–13
Program Lines:
(In RPN mode)
Description
ꢐꢘꢘꢒꢙ ꢁꢃꢂº ꢍꢊ
ꢐꢘꢘꢋꢘ .ꢊ
Calculates H' × determinant = BG – AH.
ꢐꢘꢘꢋꢒ !ꢎ 'ꢊ
ꢐꢘꢘꢋꢋ ꢁꢃꢂ ꢀꢊ
ꢐꢘꢘꢋꢓ ꢁꢃꢂº ꢈꢊ
ꢐꢘꢘꢋꢔ ꢁꢃꢂ ꢏꢊ
ꢐꢘꢘꢋꢖ ꢁꢃꢂº ꢌꢊ
ꢐꢘꢘꢋ .ꢊ
Calculates I' × determinant = AE – BD.
ꢐꢘꢘꢋꢗ !ꢎ Lꢊ
ꢐꢘꢘꢋꢕ ꢁꢃꢂ ꢈꢊ
ꢐꢘꢘꢋꢙ ꢁꢃꢂº ꢐꢊ
ꢐꢘꢘꢓꢘ ꢁꢃꢂ ꢑꢊ
ꢐꢘꢘꢓꢒ ꢁꢃꢂº ꢍꢊ
ꢐꢘꢘꢓꢋ .ꢊ
Calculates A' x determinant = EI – FH,
ꢐꢘꢘꢓꢓ !ꢎ ꢀꢊ
ꢐꢘꢘꢓꢔ ꢁꢃꢂ ꢃꢊ
ꢐꢘꢘꢓꢖ ꢁꢃꢂº ꢍꢊ
ꢐꢘꢘꢓ ꢁꢃꢂ ꢏꢊ
ꢐꢘꢘꢓꢗ ꢁꢃꢂº ꢐꢊ
ꢐꢘꢘꢓꢕ .ꢊ
Calculates B' × determinant = CH – BI.
ꢐꢘꢘꢓꢙ ꢁꢃꢂ ꢏꢊ
ꢐꢘꢘꢔꢘ ꢁꢃꢂº ꢑꢊ
ꢐꢘꢘꢔꢒ ꢁꢃꢂ ꢃꢊ
ꢐꢘꢘꢔꢋ ꢁꢃꢂº ꢈꢊ
ꢐꢘꢘꢔꢓ .ꢊ
Calculates C' × determinant = BF – CE.
ꢐꢘꢘꢔꢔ !ꢎ ꢃꢊ
¶
ꢐꢘꢘꢔꢖ ꢁ
ꢊ
Stores B'.
ꢐꢘꢘꢔ !ꢎ ꢏꢊ
ꢐꢘꢘꢔꢗ ꢁꢃꢂ ꢑꢊ
ꢐꢘꢘꢔꢕ ꢁꢃꢂº ꢆꢊ
ꢐꢘꢘꢔꢙ ꢁꢃꢂ ꢌꢊ
ꢐꢘꢘꢖꢘ ꢁꢃꢂº ꢐꢊ
ꢐꢘꢘꢖꢒ .ꢊ
Calculates D' × determinant = FG – DI.
15–14 Mathematics Programs
Program Lines:
(In RPN mode)
Description
ꢐꢘꢘꢖꢋ ꢁꢃꢂ ꢌ
ꢐꢘꢘꢖꢓ ꢁꢃꢂº ꢍꢊ
ꢐꢘꢘꢖꢔ ꢁꢃꢂ ꢈꢊ
ꢐꢘꢘꢖꢖ ꢁꢃꢂº ꢆꢊ
ꢐꢘꢘꢖ .ꢊ
Calculates G' × determinant = DH – EG.
ꢐꢘꢘꢖꢗ !ꢎ ꢆꢊ
¶
ꢐꢘꢘꢖꢕ ꢁ
ꢊ
Stores D'.
Stores I'.
Stores E'.
Stores F'.
Stores H'.
ꢐꢘꢘꢖꢙ !ꢎ ꢌꢊ
ꢐꢘꢘ ꢘ ꢁꢃꢂ Lꢊ
ꢐꢘꢘ ꢒ !ꢎ ꢐꢊ
ꢐꢘꢘ ꢋ ꢁꢃꢂ %ꢊ
ꢐꢘꢘ ꢓ !ꢎ ꢈꢊ
ꢐꢘꢘ ꢔ ꢁꢃꢂ &ꢊ
ꢐꢘꢘ ꢖ !ꢎ ꢑꢊ
ꢐꢘꢘ
ꢁꢃꢂ 'ꢊ
ꢐꢘꢘ ꢗ !ꢎ ꢍꢊ
ꢐꢘꢘ ꢕ ꢙꢊ
Sets index value to point to last element of matrix.
Recalls value of determinant.
Checksum and length: 0FFB 222
ꢐꢘꢘ ꢙ !ꢎ Lꢊ
ꢐꢘꢘꢗꢘ ꢁꢃꢂ $ꢊ
This routine completes inverse by dividing by
determinant.
ꢛꢘꢘꢘꢒ ꢂꢏꢂ ꢛꢊ
Divides element.
Decrements index value so it points closer to A.
Loops for next value.
ꢛꢘꢘꢘꢋ !ꢎª1L2ꢊ
ꢛꢘꢘꢘꢓ ꢌ ꢈ Lꢊ
ꢛꢘꢘꢘꢔ ꢆ!ꢎ ꢛꢊ
ꢛꢘꢘꢘꢖ ꢁ!ꢄꢊ
Returns to the calling program or to
.
ꢅꢁꢆꢇ !ꢎꢅ
Checksum and length: 1FCF 15
This routine multiplies a column matrix and a 3 × 3
matrix.
ꢇꢘꢘꢘꢒ ꢂꢏꢂ ꢇꢊ
Sets index value to point, to last element in first row.
ꢇꢘꢘꢘꢋ ꢗꢊ
ꢇꢘꢘꢘꢓ %ꢈꢉ ꢄꢊ
ꢇꢘꢘꢘꢔ ꢕꢊ
Sets index value to point to last element in second
Mathematics Programs 15–15
Program Lines:
(In RPN mode)
Description
row.
ꢇꢘꢘꢘꢖ %ꢈꢉ ꢄꢊ
ꢇꢘꢘꢘ ꢙꢊ
Sets index value to point to last element in third row.
Checksum and length: DA21 54
This routine calculates product of column vector and
row pointed to by index value.
ꢄꢘꢘꢘꢒ ꢂꢏꢂ ꢄꢊ
Saves index value in i.
Recalls J from column vector.
Recalls K from column vector.
Recalls L from column vector.
Multiplies by last element in row.
Multiplies by second element in row and adds.
Multiplies by first element in row and adds.
Sets index value to display X, Y, or Z based on input
row.
ꢄꢘꢘꢘꢋ !ꢎ Lꢊ
ꢄꢘꢘꢘꢓ ꢁꢃꢂ ꢛꢊ
ꢄꢘꢘꢘꢔ ꢁꢃꢂ ꢚꢊ
ꢄꢘꢘꢘꢖ ꢁꢃꢂ ꢂꢊ
ꢄꢘꢘꢘ ꢁꢃꢂº1L2ꢊ
ꢄꢘꢘꢘꢗ %ꢈꢉ ꢅꢊ
ꢄꢘꢘꢘꢕ %ꢈꢉ ꢅꢊ
ꢄꢘꢘꢘꢙ ꢋꢓꢊ
ꢄꢘꢘꢒꢘ !ꢎ- Lꢊ
¶
Gets result back.
Stores result.
Displays result.
ꢄꢘꢘꢒꢒ ꢁ
ꢊ
ꢄꢘꢘꢒꢋ !ꢎ1L2ꢊ
ꢄꢘꢘꢒꢓ #ꢐꢈ$1L2ꢊ
ꢄꢘꢘꢒꢔ ꢁ!ꢄꢊ
Returns to the calling program or to
.
ꢅꢁꢆꢇ !ꢎꢅ
Checksum and length: DFF4 54
This routine multiples and adds values within a row.
Gets next column value.
Sets index value to point to next row value.
ꢅꢘꢘꢘꢒ ꢂꢏꢂ ꢅꢊ
ꢅꢘꢘꢘꢋ º65¸ꢊ
ꢅꢘꢘꢘꢓ ꢌ ꢈ Lꢊ
ꢅꢘꢘꢘꢔ ꢌ ꢈ Lꢊ
ꢅꢘꢘꢘꢖ ꢌ ꢈ Lꢊ
ꢅꢘꢘꢘ ꢁꢃꢂº1L2ꢊ
ꢅꢘꢘꢘꢗ -ꢊ
Multiples column value by row value.
Adds product to previous sum.
Returns to the calling program.
ꢅꢘꢘꢘꢕ ꢁ!ꢄꢊ
Checksum and length: 7F00 24
This routine calculates the determinant.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
ꢌꢘꢘꢘꢋ ꢁꢃꢂ ꢀꢊ
15–16 Mathematics Programs
Program Lines:
(In RPN mode)
Description
ꢌꢘꢘꢘꢓ ꢁꢃꢂº ꢈꢊ
ꢌꢘꢘꢘꢔ ꢁꢃꢂº ꢐꢊ
ꢌꢘꢘꢘꢖ ꢁꢃꢂ ꢌꢊ
ꢌꢘꢘꢘ ꢁꢃꢂº ꢍꢊ
ꢌꢘꢘꢘꢗ ꢁꢃꢂº ꢃꢊ
ꢌꢘꢘꢘꢕ -ꢊ
Calculates A × E × I.
Calculates (A × E × I) + (D × H × C).
ꢌꢘꢘꢘꢙ ꢁꢃꢂ ꢆꢊ
ꢌꢘꢘꢒꢘ ꢁꢃꢂº ꢑꢊ
ꢌꢘꢘꢒꢒ ꢁꢃꢂº ꢏꢊ
ꢌꢘꢘꢒꢋ -ꢊ
Calculates (A × E × I) + (D × H × C) + (G × F × B).
(A × E × I) + (D × H × C) + (G × F × B) – (G × E × C).
ꢌꢘꢘꢒꢓ ꢁꢃꢂ ꢆꢊ
ꢌꢘꢘꢒꢔ ꢁꢃꢂº ꢈꢊ
ꢌꢘꢘꢒꢖ ꢁꢃꢂº ꢃꢊ
ꢌꢘꢘꢒ .ꢊ
ꢌꢘꢘꢒꢗ ꢁꢃꢂ ꢀꢊ
ꢌꢘꢘꢒꢕ ꢁꢃꢂº ꢑꢊ
ꢌꢘꢘꢒꢙ ꢁꢃꢂº ꢍꢊ
ꢌꢘꢘꢋꢘ .ꢊ
(A × E × I) + (D × H × C) + (G × F × B) –(G × E × C) –
(A × F × H).
ꢌꢘꢘꢋꢒ ꢁꢃꢂ ꢌꢊ
ꢌꢘꢘꢋꢋ ꢁꢃꢂº ꢏꢊ
ꢌꢘꢘꢋꢓ ꢁꢃꢂº ꢐꢊ
ꢌꢘꢘꢋꢔ .ꢊ
(A × E × I) + (D × H × C) + (G × F × B) – (G × E × C) –
(A × F × H) – (D × B × I).
Returns to the calling program or to
Checksum and length: 7957 75
.
ꢌꢘꢘꢋꢖ ꢁ!ꢄꢊ
ꢅꢁꢆꢇ !ꢎꢅ
Flags Used:
None.
Mathematics Programs 15–17
Program Instructions:
1. Key in the program routines; press when done.
2. Press X A to input coefficients of matrix and column vector.
3. Key in coefficient or vector value (A through L) at each prompt and press g.
4. Optional: press X D to compute determinant of 3 × 3 system.
5. Press X I to compute inverse of 3 × 3 matrix.
6. Optional: press X A and repeatedly press g to review the values of the
inverted matrix.
7. Press X M to multiply the inverted matrix by the column vector and to see
the value of X. Press g to see the value of Y, then press g again to see
the value of Z.
8. For a new case, go back to step 2.
Variables Used:
A through I
J through L
W
Coefficients of matrix.
Column vector values.
Scratch variable used to store the determinant.
Output vector values; also used for scratch.
Loop–control value (index variable); also used for
scratch.
X through Z
i
Remarks:
For 2 × 2 solutions use zero for coefficients C, F, H, G and for L. Use 1 for
coefficient I.
Not all systems of equations have solutions.
Example:
For the system below, compute the inverse and the system solution. Review the
inverted matrix. Invert the matrix again and review the result to make sure that the
original matrix is returned.
23X + 15Y + 17Z = 31
8X + 11Y – 6Z = 17
4X + 15Y + 12Z = 14
15–18 Mathematics Programs
Keys:
Display:
Description:
Starts input routine.
(In RPN mode)
X A
23 g
8 g
ꢀ@ꢊ
value
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
Sets first coefficient, A, equal to
23.
Sets B equal to 8.
ꢏ@ꢊ
value
ꢃ@ꢊ
value
4 g
Sets C equal to 4.
ꢌ@ꢊ
value
15 g
Sets D equal to 15.
ꢈ@ꢊ
value
.
.
.
.
.
.
Continues entry for E through L.
14 g
X I
X M
g
Returns to first coefficient entered.
ꢀ@ꢊ
ꢋꢓ)ꢘꢘꢘꢘꢊ
Calculates the inverse and
displays the determinant.
Multiplies by column vector to
compute X.
ꢔ8ꢖꢙꢕ)ꢘꢘꢘꢘꢊ
%/ꢊ
ꢘ)ꢙꢓꢘ ꢊ
&/ꢊ
Calculates and displays Y.
ꢘ)ꢗꢙꢔꢓꢊ
'/ꢊ
g
Calculates and displays Z.
.ꢘ)ꢒꢓ ꢔꢊ
ꢀ@ꢊ
X A
g
Begins review of the inverted
matrix.
Displays next value.
ꢘ)ꢘꢔꢕꢓꢊ
ꢏ@ꢊ
.ꢘ)ꢘꢋ ꢒꢊ
ꢃ@ꢊ
g
Displays next value.
Displays next value.
Displays next value.
Displays next value.
ꢘ)ꢘꢒ ꢖꢊ
ꢌ@ꢊ
g
ꢘ)ꢘꢒ ꢓꢊ
ꢈ@ꢊ
g
ꢘ)ꢘꢔꢖꢋꢊ
ꢑ@ꢊ
g
.ꢘ)ꢘ ꢋꢘꢊ
Mathematics Programs 15–19
g
Displays next value.
Displays next value.
Displays next value.
ꢆ@ꢊ
.ꢘ)ꢘ ꢘꢋꢊ
ꢍ@ꢊ
g
ꢘ)ꢘꢖꢙ ꢊ
ꢐ@ꢊ
g
ꢘ)ꢘꢋꢕꢙꢊ
ꢘ)ꢘꢘꢘꢋꢊ
X I
X A
g
Inverts inverse to produce original
matrix.
Begins review of inverted matrix.
ꢀ@ꢊ
ꢋꢓ)ꢘꢘꢘꢘꢊ
ꢏ@ꢊ
Displays next value, ...... and so
on.
ꢕ)ꢘꢘꢘꢘꢊ
.
.
.
.
.
.
Polynomial Root Finder
This program finds the roots of a polynomial of order 2 through 5 with real
coefficients. It calculates both real and complex roots.
For this program, a general polynomial has the form
n
n–1
x + a
x
n–1
+ ... + a x + a = 0
1
0
where n = 2, 3, 4, or 5. The coefficient of the highest–order term (a ) is assumed to
n
be 1. If the leading coefficient is not 1, you should make it 1 by dividing all the
coefficients in the equation by the leading coefficient. (See example 2.)
The routines for third– and fifth–order polynomials use SOLVE to find one real root
of the equation, since every odd–order polynomial must have at least one real root.
After one root is found, synthetic division is performed to reduce the original
polynomial to a second– or fourth–order polynomial.
To solve a fourth–order polynomial, it is first necessary to solve the resolvant cubic
polynomial:
3
2
y + b y + b y + b = 0
2
1
0
where b = – a
2
2
b = a a – 4a
3 1
1
0
15–20 Mathematics Programs
2
2
b = a (4a – a ) – a
1
.
0
0
2
3
Let y be the largest real root of the above cubic. Then the fourth–order polynomial
0
is reduced to two quadratic polynomials:
2
x + (J + L)x + (K + M) = 0
2
x + (J – L)x + (K – M) = 0
where J = a /2
3
K = y /2
0
J2 − a2 + y0
K2 − a0
L =
× (the sign of JK – a /2)
1
M =
Roots of the fourth degree polynomial are found by solving these two quadratic
polynomials.
2
A quadratic equation x + a x + a = 0 is solved by the formula
1
0
a1
2
a1
2
x1,2 = −
( )2 − a0
2
If the discriminant d = (a /2) – a ≥ 0, the roots are real; if d < 0, the roots are
1
o
complex, being
.
u iv = −(a1 2) i − d
Mathematics Programs 15–21
Program Listing:
Program Lines:
(In RPN mode)
Description
Defines the beginning of the polynomial root finder
routine.
ꢅꢘꢘꢘꢒ ꢂꢏꢂ ꢅꢊ
Prompts for and stores the order of the polynomial.
Uses order as loop counter.
ꢅꢘꢘꢘꢋ ꢐꢄꢅ"! ꢑꢊ
ꢅꢘꢘꢘꢓ !ꢎ Lꢊ
Checksum and length: 5CC4
9
Starts prompting routine.
Prompts for a coefficient.
Counts down the input loop.
Repeats until done.
ꢐꢘꢘꢘꢒ ꢂꢏꢂ ꢐꢊ
ꢐꢘꢘꢘꢋ ꢐꢄꢅ"!1L2
ꢐꢘꢘꢘꢓ ꢌ ꢈ Lꢊ
ꢐꢘꢘꢘꢔ ꢆ!ꢎ ꢐꢊ
ꢐꢘꢘꢘꢖ ꢁꢃꢂ ꢑꢊ
ꢐꢘꢘꢘ !ꢎ Lꢊ
ꢐꢘꢘꢘꢗ ꢆ!ꢎ1L2ꢊ
Uses order to select root finding routine.
Starts root finding routine.
Checksum and length: 588B 21
Evaluates polynomials using Horner's method, and
synthetically reduces the order of the polynomial using
the root.
ꢍꢘꢘꢘꢒ ꢂꢏꢂ ꢍꢊ
ꢍꢘꢘꢘꢋ ꢁꢃꢂ ꢍꢊ
ꢍꢘꢘꢘꢓ !ꢎ Lꢊ
ꢍꢘꢘꢘꢔ ꢒꢊ
Uses pointer to polynomial as index.
Starting value for Horner's method.
Checksum and length: 0072 24
Starts the Horner's method loop.
ꢛꢘꢘꢘꢒ ꢂꢏꢂ ꢛꢊ
ꢛꢘꢘꢘꢋ ꢈꢄ!ꢈꢁꢊ
ꢛꢘꢘꢘꢓ ꢁꢃꢂº %ꢊ
ꢛꢘꢘꢘꢔ ꢁꢃꢂ-1L2ꢊ
ꢛꢘꢘꢘꢖ ꢌ ꢈ Lꢊ
ꢛꢘꢘꢘ ꢆ!ꢎ ꢛꢊ
ꢛꢘꢘꢘꢗ ꢁ!ꢄꢊ
Saves synthetic division coefficient.
Multiplies current sum by next power of x.
Adds new coefficient.
Counts down the loop.
Repeats until done.
Checksum and length: 2582 21
Starts solver setup routine.
Stores location of coefficients to use.
ꢘꢘꢘꢒ ꢂꢏꢂ ꢊ
ꢘꢘꢘꢋ !ꢎ ꢍꢊ
15–22 Mathematics Programs
Program Lines:
(In RPN mode)
Description
ꢘꢘꢘꢓ ꢋꢖꢘꢊ
First initial guess.
Second initial guess.
Specifies routine to solve.
Solves for a real root.
Gets synthetic division coefficients for next lower order
polynomial.
ꢘꢘꢘꢔ !ꢎ %ꢊ
ꢘꢘꢘꢖ -+.ꢊ
ꢘꢘꢘ ꢑꢄ/ ꢍꢊ
ꢘꢘꢘꢗ ꢎꢂ#ꢈ %ꢊ
ꢘꢘꢘꢕ ꢆ!ꢎ ꢍꢊ
ꢘꢘꢘꢙ ꢘꢊ
ꢘꢘꢒꢘ ªꢊ
Generates DIVIDE BY 0 error if no real root found.
Checksum and length: 15FE 54
Starts quadratic solution routine.
Exchanges a and a .
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉꢊ
ꢉꢘꢘꢘꢋ º65¸ꢊ
ꢉꢘꢘꢘꢓ ꢋꢊ
0
1
a /2.
1
–a /2.
1
ꢉꢘꢘꢘꢔ ªꢊ
ꢉꢘꢘꢘꢖ -+.ꢊ
ꢉꢘꢘꢘ ꢈꢄ!ꢈꢁꢊ
ꢉꢘꢘꢘꢗ ꢈꢄ!ꢈꢁꢊ
ꢉꢘꢘꢘꢕ !ꢎ ꢑꢊ
ꢉꢘꢘꢘꢙ ºꢋꢊ
Saves – a /2.
1
Stores real part if complex root.
2
(a /2) .
1
µ
a .
ꢉꢘꢘꢒꢘ ꢁ
ꢊ
0
2
(a /2) – a .
1
ꢉꢘꢘꢒꢒ .ꢊ
o
Initializes flag 0.
Discriminant (d) < 0
Sets flag 0 if d < 0 (complex roots).
d
ꢉꢘꢘꢒꢋ ꢃꢑ ꢘꢊ
ꢉꢘꢘꢒꢓ º6ꢘ@ꢊ
ꢉꢘꢘꢒꢔ ꢑ ꢘꢊ
ꢉꢘꢘꢒꢖ ꢀꢏ ꢊ
ꢉꢘꢘꢒ ꢊ ºꢊ
d
Stores imaginary part if complex root.
ꢉꢘꢘꢒꢗ !ꢎ ꢆꢊ
ꢉꢘꢘꢒꢕ ꢑ @ ꢘꢊ
ꢉꢘꢘꢒꢙ ꢁ!ꢄꢊ
?
Complex roots
Returns if complex roots.
ꢉꢘꢘꢋꢘ !ꢎ. ꢑꢊ
d
Calculates – a /2 –
1
¶
ꢉꢘꢘꢋꢒ ꢁ
ꢊ
ꢉꢘꢘꢋꢋ !ꢎ- ꢆꢊ
d
Calculates – a /2 +
1
Mathematics Programs 15–23
Program Lines:
(In RPN mode)
Description
ꢉꢘꢘꢋꢓ ꢁ!ꢄꢊ
Checksum and length: B9A7 81
Starts second–order solution routine.
Gets L.
Gets M.
ꢏꢘꢘꢘꢒ ꢂꢏꢂ ꢏꢊ
ꢏꢘꢘꢘꢋ ꢁꢃꢂ ꢏꢊ
ꢏꢘꢘꢘꢓ ꢁꢃꢂ ꢀꢊ
ꢏꢘꢘꢘꢔ ꢆ!ꢎ !ꢊ
Calculates and displays two roots.
Checksum and length: DE6F 12
Starts third–order solution routine.
Indicates cubic polynomial to be solved.
Solves for one real root and puts a and a for
second–order polynomial on stack.
ꢃꢘꢘꢘꢒ ꢂꢏꢂ ꢃꢊ
ꢃꢘꢘꢘꢋ ꢓꢊ
ꢃꢘꢘꢘꢓ %ꢈꢉ ꢊ
0
1
¶
Discards polynomial function value.
Solves remaining second–order polynomial and stores
roots.
ꢃꢘꢘꢘꢔ ꢁ
ꢊ
ꢃꢘꢘꢘꢖ %ꢈꢉ ꢉꢊ
Displays real root of cubic.
Displays remaining roots.
Checksum and length: 7A4B 33
ꢃꢘꢘꢘ #ꢐꢈ$ %ꢊ
ꢃꢘꢘꢘꢗ ꢆ!ꢎ ꢄꢊ
Starts fifth–order solution routine.
Indicates fifth–order polynomial to be solved.
Solves for one real root and puts three synthetic
division coefficients for fourth–order polynomial on
stack.
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈꢊ
ꢈꢘꢘꢘꢋ ꢖꢊ
ꢈꢘꢘꢘꢓ %ꢈꢉ ꢊ
¶
Discards polynomial function value.
Stores coefficient.
ꢈꢘꢘꢘꢔ ꢁ
ꢊ
ꢈꢘꢘꢘꢖ !ꢎ ꢀꢊ
¶
ꢈꢘꢘꢘ
ꢁ
ꢊ
Stores coefficient.
Stores coefficient.
ꢈꢘꢘꢘꢗ !ꢎ ꢏꢊ
¶
ꢈꢘꢘꢘꢕ ꢁ
ꢊ
ꢈꢘꢘꢘꢙ !ꢎ ꢃꢊ
ꢈꢘꢘꢒꢘ ꢁꢃꢂ ꢈꢊ
ꢈꢘꢘꢒꢒ ꢁꢃꢂ- %ꢊ
ꢈꢘꢘꢒꢋ !ꢎ ꢌꢊ
ꢈꢘꢘꢒꢓ #ꢐꢈ$ %ꢊ
Calculates a .
3
Stores a .
3
Displays real root of fifth–order polynomial.
15–24 Mathematics Programs
Program Lines:
(In RPN mode)
Description
Checksum and length: C7A6 51
Starts fourth–order solution routine.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
ꢌꢘꢘꢘꢋ ꢔꢊ
2
4a .
ꢌꢘꢘꢘꢓ ꢁꢃꢂº ꢃꢊ
ꢌꢘꢘꢘꢔ ꢁꢃꢂ ꢌꢊ
ꢌꢘꢘꢘꢖ ºꢋꢊ
a .
3
2
a
.
3
2
4a – a
.
ꢌꢘꢘꢘ .ꢊ
2
3
2
a (4a – a ).
ꢌꢘꢘꢘꢗ ꢁꢃꢂº ꢀꢊ
ꢌꢘꢘꢘꢕ ꢁꢃꢂ ꢏꢊ
ꢌꢘꢘꢘꢙ ºꢋꢊ
o
2
3
a .
1
2
a
.
1
2
2
b =a (4a – a ) – a
0 1
.
ꢌꢘꢘꢒꢘ .ꢊ
0
0
3
Stores b .
ꢌꢘꢘꢒꢒ !ꢎ ꢈꢊ
ꢌꢘꢘꢒꢋ ꢁꢃꢂ ꢃꢊ
ꢌꢘꢘꢒꢓ -+.ꢊ
ꢌꢘꢘꢒꢔ !ꢎ ꢆꢊ
ꢌꢘꢘꢒꢖ ꢁꢃꢂ ꢌꢊ
ꢌꢘꢘꢒ ꢁꢃꢂº ꢏꢊ
ꢌꢘꢘꢒꢗ ꢔꢊ
0
a .
2
b = –a .
2
2
Stores b .
2
a .
3
a a .
3
1
4a .
ꢌꢘꢘꢒꢕ ꢁꢃꢂº ꢀꢊ
ꢌꢘꢘꢒꢙ .ꢊ
0
b = a a – 4a .
3 1
1
0
Stores b .
ꢌꢘꢘꢋꢘ !ꢎ ꢑꢊ
ꢌꢘꢘꢋꢒ ꢔꢊ
1
To enter lines D0021 and D0022;
press 4 | 3.
ꢌꢘꢘꢋꢋ ꢓꢊ
º
ꢌꢘꢘꢋꢓ ꢒꢘ ꢊ
ꢌꢘꢘꢋꢔ ªꢊ
ꢌꢘꢘꢋꢖ ꢗꢊ
Creates 7.004 as a pointer to the cubic coefficients.
ꢌꢘꢘꢋ -ꢊ
Solves for real root and puts a and a for
ꢌꢘꢘꢋꢗ %ꢈꢉ ꢊ
0
1
second–order polynomial on stack.
¶
Discards polynomial function value.
Solves for remaining roots of cubic and stores roots.
Gets real root of cubic.
ꢌꢘꢘꢋꢕ ꢁ
ꢊ
ꢌꢘꢘꢋꢙ %ꢈꢉ ꢉꢊ
ꢌꢘꢘꢓꢘ ꢁꢃꢂ %ꢊ
ꢌꢘꢘꢓꢒ !ꢎ ꢈꢊ
Stores real root.
Mathematics Programs 15–25
Program Lines:
(In RPN mode)
Description
?
Complex roots
ꢌꢘꢘꢓꢋ ꢑ @ ꢘꢊ
ꢌꢘꢘꢓꢓ ꢆ!ꢎ ꢑꢊ
Calculate four roots of remaining fourth–order
polynomial.
If not complex roots, determine largest real root (y )
ꢌꢘꢘꢓꢔ ꢁꢃꢂ ꢑꢊ
ꢌꢘꢘꢓꢖ º6¸@ꢊ
ꢌꢘꢘꢓ º65¸ꢊ
ꢌꢘꢘꢓꢗ ꢁꢃꢂ ꢆꢊ
ꢌꢘꢘꢓꢕ º6¸@ꢊ
ꢌꢘꢘꢓꢙ º65¸ꢊ
ꢌꢘꢘꢔꢘ !ꢎ ꢈꢊ
0
Stores largest real root of cubic.
Checksum and length: C8B3 180
Starts fourth–order solution routine.
ꢑꢘꢘꢘꢒ ꢂꢏꢂ ꢑꢊ
ꢑꢘꢘꢘꢋ ꢋꢊ
J = a /2.
ꢑꢘꢘꢘꢓ !ꢎª ꢌꢊ
ꢑꢘꢘꢘꢔ !ꢎª ꢈꢊ
ꢑꢘꢘꢘꢖ ꢙꢊ
3
K = y /2.
0
º
ꢑꢘꢘꢘ ꢒꢘ ꢊ
–9
2
Creates 10 as a lower bound for M .
ꢑꢘꢘꢘꢗ ꢒ+ºꢊ
ꢑꢘꢘꢘꢕ ꢁꢃꢂ ꢈꢊ
ꢑꢘꢘꢘꢙ ºꢋꢊ
K
K .
2
2
2
M = K –a .
ꢑꢘꢘꢒꢘ ꢁꢃꢂ. ꢀꢊ
ꢑꢘꢘꢒꢒ º6¸@ꢊ
ꢑꢘꢘꢒꢋ ꢃꢂºꢊ
ꢑꢘꢘꢒꢓꢊ ºꢊ
0
2
–9
2
If M < 10 , use 0 for M .
K2 − a0
M =
.
Stores M.
J.
JK.
ꢑꢘꢘꢒꢔ !ꢎ ꢀꢊ
ꢑꢘꢘꢒꢖ ꢁꢃꢂ ꢌꢊ
ꢑꢘꢘꢒ ꢁꢃꢂº ꢈꢊ
ꢑꢘꢘꢒꢗ ꢁꢃꢂ ꢏꢊ
ꢑꢘꢘꢒꢕ ꢋꢊ
a .
1
a /2.
ꢑꢘꢘꢒꢙ ªꢊ
1
JK – a /2.
ꢑꢘꢘꢋꢘ .ꢊ
1
ꢑꢘꢘꢋꢒ º/ꢘ@ꢊ
ꢑꢘꢘꢋꢋ ꢒꢊ
Use 1 if JK – a /2 = 0
1
15–26 Mathematics Programs
Program Lines:
(In RPN mode)
Description
Stores 1 or JK – a /2.
ꢑꢘꢘꢋꢓ !ꢎ ꢏꢊ
ꢑꢘꢘꢋꢔ ꢀꢏ ꢊ
1
Calculates sign of C.
J.
ꢑꢘꢘꢋꢖ !ꢎª ꢏꢊ
ꢑꢘꢘꢋ ꢁꢃꢂ ꢌꢊ
ꢑꢘꢘꢋꢗ ºꢋꢊ
2
J
2
J -– a .
ꢑꢘꢘꢋꢕ ꢁꢃꢂ. ꢃꢊ
ꢑꢘꢘꢋꢙ ꢁꢃꢂ- ꢈꢊ
ꢑꢘꢘꢓꢘ ꢁꢃꢂ- ꢈꢊ
ꢑꢘꢘꢓꢒꢊ ºꢊ
2
2
J -– a +y .
2
0
C = J2 − a2 + y0 .
Stores C with proper sign.
J.
J + L.
K.
K + M.
ꢑꢘꢘꢓꢋ !ꢎº ꢏꢊ
ꢑꢘꢘꢓꢓ ꢁꢃꢂ ꢌꢊ
ꢑꢘꢘꢓꢔ ꢁꢃꢂ- ꢏꢊ
ꢑꢘꢘꢓꢖ ꢁꢃꢂ ꢈꢊ
ꢑꢘꢘꢓ ꢁꢃꢂ- ꢀꢊ
ꢑꢘꢘꢓꢗ %ꢈꢉ !ꢊ
Calculate and display two roots of the fourth–order
polynomial.
J.
J – L.
K.
ꢑꢘꢘꢓꢕ ꢁꢃꢂ ꢌꢊ
ꢑꢘꢘꢓꢙ ꢁꢃꢂ. ꢏꢊ
ꢑꢘꢘꢔꢘ ꢁꢃꢂ ꢈꢊ
ꢑꢘꢘꢔꢒ ꢁꢃꢂ. ꢀꢊ
K – M.
Checksum and length: 539D 171
Starts routine to calculate and display two roots.
Uses quadratic routine to calculate two roots.
!ꢘꢘꢘꢒ ꢂꢏꢂ !ꢊ
!ꢘꢘꢘꢋ %ꢈꢉ ꢉꢊ
Checksum and length: 410A
6
Starts routine to display two real roots or two complex
roots.
ꢄꢘꢘꢘꢒ ꢂꢏꢂ ꢄꢊ
Gets the first real root.
Stores the first real root.
Displays real root or real part of complex root.
Gets the second real root or imaginary part of complex
root.
ꢄꢘꢘꢘꢋ ꢁꢃꢂ ꢑꢊ
ꢄꢘꢘꢘꢓ !ꢎ %ꢊ
ꢄꢘꢘꢘꢔ #ꢐꢈ$ %ꢊ
ꢄꢘꢘꢘꢖ ꢁꢃꢂ ꢆꢊ
?
Were there any complex roots
ꢄꢘꢘꢘ ꢑ @ ꢘꢊ
Mathematics Programs 15–27
Program Lines:
(In RPN mode)
Description
Displays complex roots if any.
Stores second real root.
Displays second real root.
Returns to calling routine.
ꢄꢘꢘꢘꢗ ꢆ!ꢎ "ꢊ
ꢄꢘꢘꢘꢕ !ꢎ %ꢊ
ꢄꢘꢘꢘꢙ #ꢐꢈ$ %ꢊ
ꢄꢘꢘꢒꢘ ꢁ!ꢄꢊ
Checksum and length: 96DA 30
Starts routine to display complex roots.
"ꢘꢘꢘꢒ ꢂꢏꢂ "ꢊ
"ꢘꢘꢘꢋ !ꢎ Lꢊ
"ꢘꢘꢘꢓ #ꢐꢈ$ Lꢊ
"ꢘꢘꢘꢔ #ꢐꢈ$ %ꢊ
"ꢘꢘꢘꢖ ꢁꢃꢂ Lꢊ
"ꢘꢘꢘ -+.ꢊ
Stores the imaginary part of the first complex root.
Displays the imaginary part of the first complex root.
Displays the real part of the second complex root.
Gets the imaginary part of the complex roots.
Generates the imaginary part of the second complex
root.
Stores the imaginary part of the second complex root.
Displays the imaginary part of the second complex
root.
"ꢘꢘꢘꢗ !ꢎ Lꢊ
"ꢘꢘꢘꢕ #ꢐꢈ$ Lꢊ
Checksum and length: 748D 24
Flags Used:
Flag 0 is used to remember if the root is real or complex (that is, to remember the
sign of d). If d is negative, then flag 0 is set. Flag 0 is tested later in the program to
assure that both the real and imaginary parts are displayed if necessary.
Remarks:
The program accommodates polynomials of order 2, 3, 4, and 5. It does not
check if the order you enter is valid.
The program requires that the constant term a is nonzero for these polynomials. (If
0
a is 0, then 0 is a real root. Reduce the polynomial by one order by factoring out
0
x.)
The order and the coefficients are not preserved by the program.
15–28 Mathematics Programs
Because of round–off error in numerical computations, the program may produce
values that are not true roots of the polynomial. The only way to confirm the roots is
to evaluate the polynomial manually to see if it is zero at the roots.
For a third– or higher–order polynomial, if SOLVE cannot find a real root, the error
is displayed.
ꢌꢐ#ꢐꢌꢈ ꢏ& ꢘ
You can save time and memory by omitting routines you don't need. If you're not
solving fifth–order polynomials, you can omit routine E. If you're not solving fourth–
or fifth–order polynomials, you can omit routines D, E, and F. If you're not solving
third–, fourth–, or fifth–order polynomials, you can omit routines C, D, E, and F.
Program Instructions:
1. Press { c {
2. Key in the program routines; press when done.
} to clear all programs and variables.
ꢀꢂꢂ
3. Press X P to start the polynomial root finder.
4. Key in F, the order of the polynomial, and press g
5. At each prompt, key in the coefficient and press g. You're not prompted for
the highest–order coefficient — it's assumed to be 1. You must enter 0 for
coefficients that are 0. Coefficient A must not be 0.
Terms and Coefficients
5
4
3
2
Order
x
x
x
x
x
B
B
B
B
Constant
5
4
3
2
1
E
1
D
D
C
A
A
A
A
C
C
1
1
6. After you enter the coefficients, the first root is calculated. A real root is
displayed as
real value. A complex root is displayed as
real part,
%/
%/
(Complex roots always occur in pairs of the form u i v, and are labeled in the
output as
real part and i =imaginary part, which you'll see in the next step.)
%/
7. Press g repeatedly to see the other roots, or to see i = imaginary part, the
imaginary part of a complex root. The order of the polynomial is same as the
number of roots you get.
8. For a new polynomial, go to step 3.
Mathematics Programs 15–29
A through E
F
Coefficients of polynomial; scratch.
Order of polynomial; scratch.
Scratch.
Pointer to polynomial coefficients.
The value of a real root, or the real part of complex root
G
H
X
i
The imaginary part of a complex root; also used as an index
variable.
Example 1:
5
4
3
2
Find the roots of x – x – 101x +101x + 100x – 100 = 0.
Keys:
Display:
Description:
(In RPN mode)
X P
Starts the polynomial root finder;
prompts for order.
Stores 5 in F; prompts for E.
ꢑ@ꢊ
value
ꢊ
ꢊ
5 g
ꢈ@ꢊ
value
1 ^ g
101 ^ g
101 g
100 g
100 ^ g
g
Stores –1 in E; prompts for D.
Store –101 in D. prompts for C.
Stores 101 in C; prompts for B.
Stores 100 in B; prompts for A.
ꢌ@ꢊ
value
ꢃ@ꢊ
value
ꢏ@ꢊ
value
ꢀ@ꢊ
value
ꢊ
Stores –100 in A; calculates the
first root.
Calculates the second root.
%/ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
%/ꢊ
.ꢒꢘ)ꢘꢘꢘꢘꢊ
%/ꢊ
g
Displays the third root.
Displays the fourth root.
Displays the fifth root.
.ꢒ)ꢘꢘꢘꢘꢊ
%/ꢊ
g
ꢒ)ꢘꢘꢘꢘꢊ
%/ꢊ
g
ꢒꢘ)ꢘꢘꢘꢘꢊ
15–30 Mathematics Programs
Example 2:
4
3
2
Find the roots of 4x – 8x – 13x – 10x + 22 = 0. Because the coefficient of the
highest–order term must be 1, divide that coefficient into each of the other
coefficients.
Keys:
Display:
Description:
(In RPN mode)
X P
Starts the polynomial root finder;
prompts for order.
Stores 4 in F; prompts for D.
ꢑ@ꢊ
value
ꢊ
ꢊ
4 g
ꢌ@ꢊ
value
8 ^ 4
q g
Stores –8/4 in D; prompts for C.
Stores –13/4 in C. prompts for B.
Stores –10/4 in B; prompts for A.
ꢊ
ꢃ@ꢊ
value
13 ^ 4
q g
ꢊ
ꢏ@ꢊ
value
10 ^ 4
q g
ꢊ
ꢀ@ꢊ
value
22 4 q
g
Stores 22/4 in A; calculates the
first root.
ꢊ
%/ꢊ
ꢘ)ꢕꢕꢋꢘꢊ
%/ꢊ
g
g
g
g
g
Calculates the second root.
ꢓ)ꢒꢒꢕꢘꢊ
%/ꢊ
Displays the real part of the third
root.
Displays the imaginary part of the
third root.
Displays the real part of the fourth
root.
Displays the imaginary part of the
fourth root.
.ꢒ)ꢘꢘꢘꢘꢊ
L/ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
%/ꢊ
.ꢒ)ꢘꢘꢘꢘꢊ
L/ꢊ
.ꢒ)ꢘꢘꢘꢘꢊ
The third and fourth roots are –1.00 1.00 i.
Mathematics Programs 15–31
Example 3:
Find the roots of the following quadratic polynomial:
2
x + x – 6 = 0
Keys:
Display:
Description:
(In RPN mode)
X P
2 g
1 g
6 ^g
g
Starts the polynomial root finder;
prompts for order.
Stores 2 in F; prompts for B.
ꢑ@ꢊ
value
ꢊ
ꢊ
ꢊ
ꢏ@ꢊ
value
Stores 1 in B; prompts for A.
ꢀ@ꢊ
value
Stores –6 in A; calculates the first
root.
Calculates the second root.
%/ꢊ
.ꢓ)ꢘꢘꢘꢘꢊ
%/ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
Coordinate Transformations
This program provides two–dimensional coordinate translation and rotation.
The following formulas are used to convert a point P from the Cartesian coordinate
pair (x, y) in the old system to the pair (u, v) in the new, translated, rotated system.
u = (x – m) cosθ + (y – n) sinθ
v = (y – n) cos θ –(x – m) sinθ
The inverse transformation is accomplished with the formulas below.
x = u cosθ – v sinθ + m
y = u sinθ + v cosθ + n
The HP 33s complex and polar–to–rectangular functions make these computations
straightforward.
15–32 Mathematics Programs
y
y'
x
u
Old coordinate
system
P
x'
v
y
[0, 0]
x
θ
[m, n]
New coordinate
system
Mathematics Programs 15–33
Program Listing:
Program Lines:
(In RPN mode)
Description
This routine defines the new coordinate system.
Prompts for and stores M, the new origin's x–coordinate.
Prompts for and stores N, the new origin's y–coordinate.
Prompts for and stores T, the angle θ.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
ꢌꢘꢘꢘꢋ ꢐꢄꢅ"! ꢇꢊ
ꢌꢘꢘꢘꢓ ꢐꢄꢅ"! ꢄꢊ
ꢌꢘꢘꢘꢔ ꢐꢄꢅ"! !ꢊ
ꢌꢘꢘꢘꢖ ꢆ!ꢎ ꢌꢊ
Loops for review of inputs.
Checksum and length: 1EDA 15
This routine converts from the old system to the new
system.
ꢄꢘꢘꢘꢒ ꢂꢏꢂ ꢄꢊ
Prompts for and stores X, the old x–coordinate.
Prompts for and stores Y, the old y–coordinate.
Pushes Y up and recalls X to the X–register.
Pushes X and Y up and recalls N to the X–register.
Pushes N, X, and Y up and recalls M.
ꢄꢘꢘꢘꢋ ꢐꢄꢅ"! %ꢊ
ꢄꢘꢘꢘꢓ ꢐꢄꢅ"! &ꢊ
ꢄꢘꢘꢘꢔ ꢁꢃꢂ %ꢊ
ꢄꢘꢘꢘꢖ ꢁꢃꢂ ꢄꢊ
ꢄꢘꢘꢘ ꢁꢃꢂ ꢇꢊ
ꢄꢘꢘꢘꢗ ꢃꢇꢅꢂ%.ꢊ
ꢄꢘꢘꢘꢕ ꢁꢃꢂ !ꢊ
ꢄꢘꢘꢘꢙ -+.ꢊ
Calculates (X – M) and (Y – N).
Pushes (X – M) and (Y – N) up and recalls T.
Changes the sign of T because sin(–T) equals –sin(T).
Sets radius to 1 for computation of cos(T) and –sin(T).
Calculates cos (T) and –sin(T) in X– and Y–registers.
Calculates (X – M) cos (T) + (Y–N) sin (T) and (Y – N) cos
(T) – (X – M) sin(T).
ꢄꢘꢘꢒꢘ ꢒꢊ
´
θ
ꢄꢘꢘꢒꢒ 8T ¸8º
ꢄꢘꢘꢒꢋ ꢃꢇꢅꢂ%ºꢊ
Stores x–coordinate in variable U.
Swaps positions of the coordinates.
Stores y–coordinate in variable V.
Swaps positions of coordinates back.
Halts program to display U.
ꢄꢘꢘꢒꢓ !ꢎ "ꢊ
ꢄꢘꢘꢒꢔ º65¸ꢊ
ꢄꢘꢘꢒꢖ !ꢎ #ꢊ
ꢄꢘꢘꢒ º65¸ꢊ
ꢄꢘꢘꢒꢗ #ꢐꢈ$ "ꢊ
ꢄꢘꢘꢒꢕ #ꢐꢈ$ #ꢊ
ꢄꢘꢘꢒꢙ ꢆ!ꢎ ꢄꢊ
Halts program to display V.
Goes back for another calculation.
Checksum and length: 921A 69
This routine converts from the new system to the old
system.
ꢎꢘꢘꢘꢒ ꢂꢏꢂ ꢎꢊ
Prompts for and stores U.
ꢎꢘꢘꢘꢋ ꢐꢄꢅ"! "ꢊ
15–34 Mathematics Programs
Program Lines:
(In RPN mode)
Description
Prompts for and stores V.
Pushes V up and recalls U.
Pushes U and V up and recalls T.
Sets radius to 1 for the computation of sin(T) and cos(T).
Calculates cos(T) and sin(T).
Calculates U cos(T) –V sin(T) and U sin(T) + V cos(T).
Pushes up previous results and recalls N.
Pushes up results and recalls M.
ꢎꢘꢘꢘꢓ ꢐꢄꢅ"! #ꢊ
ꢎꢘꢘꢘꢔ ꢁꢃꢂ "ꢊ
ꢎꢘꢘꢘꢖ ꢁꢃꢂ !ꢊ
ꢎꢘꢘꢘ ꢒꢊ
´
θ
ꢎꢘꢘꢘꢗ 8T ¸8º
ꢎꢘꢘꢘꢕ ꢃꢇꢅꢂ%ºꢊ
ꢎꢘꢘꢘꢙ ꢁꢃꢂ ꢄꢊ
ꢎꢘꢘꢒꢘ ꢁꢃꢂ ꢇꢊ
ꢎꢘꢘꢒꢒ ꢃꢇꢅꢂ%-ꢊ
Completes calculation by adding M and N to previous
results.
Stores the x–coordinate in variable X.
Swaps the positions of the coordinates.
Stores the y–coordinate in variable Y.
Swaps the positions of the coordinates back.
Halts the program to display X.
ꢎꢘꢘꢒꢋ !ꢎ %ꢊ
ꢎꢘꢘꢒꢓ º65¸ꢊ
ꢎꢘꢘꢒꢔ !ꢎ &ꢊ
ꢎꢘꢘꢒꢖ º65¸ꢊ
ꢎꢘꢘꢒ #ꢐꢈ$ %ꢊ
ꢎꢘꢘꢒꢗ #ꢐꢈ$ &ꢊ
ꢎꢘꢘꢒꢕ ꢆ!ꢎ ꢎꢊ
Halts the program to display Y.
Goes back for another calculation.
Checksum and length: 8C82 66
Flags Used:
None.
Program Instructions:
1. Key in the program routines; press when done.
2. Press X D to start the prompt sequence which defines the coordinate
transformation.
3. Key in the x–coordinate of the origin of the new system M and press g.
4. Key in the y–coordinate of the origin of the new system N and press g
5. Key in the rotation angle T and press g.
6. To translate from the old system to the new system, continue with step 7. To
translate from the new system to the old system, skip to step 12.
Mathematics Programs 15–35
7. Press X N to start the old–to–new transformation routine.
8. Key in X and press g.
9. Key in Y, press g, and see the x–coordinate, U, in the new system.
10. Press g and see the y–coordinate, V, in the new system.
11. For another old–to–new transformation, press g and go to step 8. For a
new–to–old transformation, continue with step 12.
12. Press X O to start the new–to–old transformation routine.
13. Key in U (the x–coordinate in the new system) and press g.
14. Key in V (the y–coordinate in the new system) and press g to see X.
15. Press g to see Y.
16. For another new–to–old transformation, press g and go to step 13. For an
old–to–new transformation, go to step 7.
Variables Used:
M
N
T
The x–coordinate of the origin of the new system.
The y–coordinate of the origin of the new system.
The rotation angle, θ, between the old and new systems.
The x–coordinate of a point in the old system.
The y–coordinate of a point in the old system.
The x–coordinate of a point in the new system.
The y–coordinate of a point in the new system.
X
Y
U
V
Remark:
For translation only, key in zero for T. For rotation only, key in zero for M and N.
Example:
For the coordinate systems shown below, convert points P , P and P ,which are
1
2
3
currently in the (X, Y) system, to points in the (X', Y') system. Convert point P' ,
4
which is in the (X',Y') system, to the (X,Y) system.
15–36 Mathematics Programs
y
y'
P
(6, 8)
3
_
P
( 9, 7)
1
x
_
_
_
T
P
( 5, 4)
2
(M, N)
P' (2.7, 3.6)
4
_
(M, N) = (7, 4)
T = 27 o
Keys:
(In RPN mode)
Display:
Description:
{
}
Sets Degrees mode since T is
given in degrees.
ꢌꢈꢆ
ꢊ
X D
Starts the routine that defines the
transformation.
Stores 7 in M.
ꢇ@ꢊ
value
ꢊ
7 g
ꢄ@ꢊ
value
4 ^ g
27 g
X N
9 ^ g
7 g
Stores –4 in U.
!@ꢊ
value
Stores 27 in T.
ꢇ@ꢊ
ꢗ)ꢘꢘꢘꢘꢊ
%@ꢊ
Starts the old–to–new routine.
Stores –9 in X.
value
ꢊ
&@ꢊ
value
ꢊ
Stores 7 in Y and calculates U.
Calculates V.
"/ꢊ
.ꢙ)ꢋ ꢋꢋꢊ
#/ꢊ
g
ꢒꢗ)ꢘ ꢔꢙꢊ
Mathematics Programs 15–37
g
Resumes the old–to–new routine
for next problem.
Stores –5 in X.
%@ꢊ
.ꢙ)ꢘꢘꢘꢘꢊ
&@ꢊ
5 ^ g
4 ^ g
g
ꢗ)ꢘꢘꢘꢘꢊ
"/ꢊ
Stores –4 in Y.
.ꢒꢘ) ꢙꢋꢒꢊ
#/ꢊ
Calculates V.
ꢖ)ꢔꢔꢗꢙꢊ
%@ꢊ
g
Resumes the old–to–new routine
for next problem.
Stores 6 in X .
.ꢖ)ꢘꢘꢘꢘꢊ
&@ꢊ
6 g
.ꢔ)ꢘꢘꢘꢘꢊ
"/ꢊ
8 g
Stores 8 in Y and calculates U.
Calculates V.
ꢔ)ꢖꢖ ꢙꢊ
#/ꢊ
g
ꢒꢒ)ꢒꢔ ꢒꢊ
"@ꢊ
X O
2.7 g
3.6 ^ g
g
Starts the new–to–old routine.
Stores 2.7 in U.
ꢔ)ꢖꢖ ꢙꢊ
#@ꢊ
ꢒꢒ)ꢒꢔ ꢒꢊ
%/ꢊ
Stores –3.6 in V and calculates
X.
Calculates Y.
ꢒꢒ)ꢘꢔꢘꢒꢊ
&/ꢊ
.ꢖ)ꢙꢕꢒꢕꢊ
15–38 Mathematics Programs
16
Statistics Programs
Curve Fitting
This program can be used to fit one of four models of equations to your data. These
models are the straight line, the logarithmic curve, the exponential curve and the
power curve. The program accepts two or more (x, y) data pairs and then
calculates the correlation coefficient, r, and the two regression coefficients, m and
ˆ
y . (For
b. The program includes a routine to calculate the estimates
definitions of these values, see "Linear Regression" in chapter 11.)
and
ˆ
x
Samples of the curves and the relevant equations are shown below. The internal
regression functions of the HP 33s are used to compute the regression coefficients.
Statistics Programs 16–1
Exponential Curve Fit
Straight Line Fit
E
S
y
y
Mx
y = Be
y = B + Mx
x
x
Logarithmic Curve Fit
Power Curve Fit
L
P
y
y
M
y = B + MIn x
y = Bx
x
x
To fit logarithmic curves, values of x must be positive. To fit exponential curves,
values of y must be positive. To fit power curves, both x and y must be positive. A
error will occur if a negative number is entered for these cases.
ꢂꢎꢆ1ꢄꢈꢆ2
Data values of large magnitude but relatively small differences can incur problems
of precision, as can data values of greatly different magnitudes. Refer to
"Limitations in Precision of Data" in chapter 11.
16–2 Statistics Programs
Program Listing:
Program Lines:
(In RPN mode)
Description
This routine sets, the status for the straight–line model.
Enters index value for later storage in i (for indirect
addressing).
ꢘꢘꢘꢒ ꢂꢏꢂ ꢊ
ꢘꢘꢘꢋ ꢒꢊ
Clears flag 0, the indicator for ln X.
Clears flag 1, the indicator for In Y.
Branches to common entry point Z.
ꢘꢘꢘꢓ ꢃꢑ ꢘꢊ
ꢘꢘꢘꢔ ꢃꢑ ꢒꢊ
ꢘꢘꢘꢖ ꢆ!ꢎ 'ꢊ
Checksum and length: E3F5 27
This routine sets the status for the logarithmic model.
Enters index value for later storage in i (for indirect
addressing).
ꢂꢘꢘꢘꢒ ꢂꢏꢂ ꢂꢊ
ꢂꢘꢘꢘꢋ ꢋꢊ
Sets flag 0, the indicator for ln X.
Clears flag 1, the indicator for ln Y
Branches to common entry point Z.
ꢂꢘꢘꢘꢓ ꢑ ꢘꢊ
ꢂꢘꢘꢘꢔ ꢃꢑ ꢒꢊ
ꢂꢘꢘꢘꢖ ꢆ!ꢎ 'ꢊ
Checksum and length: F78E 27
This routine sets the status for the exponential model.
Enters index value for later storage in i (for indirect
addressing).
ꢈꢘꢘꢘꢒ ꢂꢏꢂ ꢈꢊ
ꢈꢘꢘꢘꢋ ꢓꢊ
Clears flag 0, the indicator for ln X.
Sets flag 1, the indicator for ln Y.
Branches to common entry point Z.
ꢈꢘꢘꢘꢓ ꢃꢑ ꢘꢊ
ꢈꢘꢘꢘꢔ ꢑ ꢒꢊ
ꢈꢘꢘꢘꢖ ꢆ!ꢎ 'ꢊ
Checksum and length: 293B 27
This routine sets the status for the power model.
Enters index value for later storage in i (for indirect
addressing.)
ꢅꢘꢘꢘꢒ ꢂꢏꢂ ꢅꢊ
ꢅꢘꢘꢘꢋ ꢔꢊ
Sets flag 0, the indicator for ln X.
Sets flag 1, the indicator for ln Y.
Checksum and length: 43AA 24
ꢅꢘꢘꢘꢓ ꢑ ꢘꢊ
ꢅꢘꢘꢘꢔ ꢑ ꢒꢊ
Defines common entry point for all models.
Clears the statistics registers.
Stores the index value in i for indirect addressing.
'ꢘꢘꢘꢒ ꢂꢏꢂ 'ꢊ
'ꢘꢘꢘꢋ ꢃꢂ´ꢊ
'ꢘꢘꢘꢓ !ꢎ Lꢊ
Statistics Programs 16–3
Program Lines:
(In RPN mode)
Description
Sets the loop counter to zero for the first input.
Checksum and length: 5AB9 24
'ꢘꢘꢘꢔ ꢘꢊ
Defines the beginning of the input loop.
Adjusts the loop counter by one to prompt for input.
$ꢘꢘꢘꢒ ꢂꢏꢂ $ꢊ
$ꢘꢘꢘꢋ ꢒꢊ
$ꢘꢘꢘꢓ -ꢊ
Stores loop counter in X so that it will appear with the
prompt for X.
$ꢘꢘꢘꢔ !ꢎ %ꢊ
Displays counter with prompt and stores X input.
If flag 0 is set . . .
. . . takes the natural log of the X–input.
Stores that value for the correction routine.
Prompts for and stores Y.
$ꢘꢘꢘꢖ ꢐꢄꢅ"! %
$ꢘꢘꢘ ꢑ @ ꢘꢊ
$ꢘꢘꢘꢗ ꢂꢄꢊ
$ꢘꢘꢘꢕ !ꢎ ꢏꢊ
$ꢘꢘꢘꢙ ꢐꢄꢅ"! &
$ꢘꢘꢒꢘ ꢑ @ ꢒꢊ
$ꢘꢘꢒꢒ ꢂꢄꢊ
If flag 1 is set . . .
. . . takes the natural log of the Y–input.
$ꢘꢘꢒꢋ !ꢎ ꢁꢊ
$ꢘꢘꢒꢓ ꢁꢃꢂ ꢏꢊ
$ꢘꢘꢒꢔ ´-ꢊ
Accumulates B and R as x,y–data pair in statistics registers.
Loops for another X, Y pair.
Checksum and length: C95E 57
$ꢘꢘꢒꢖ ꢆ!ꢎ $ꢊ
Defines the beginning of the "undo" routine.
Recalls the most recent data pair.
"ꢘꢘꢘꢒ ꢂꢏꢂ "ꢊ
"ꢘꢘꢘꢋ ꢁꢃꢂ ꢁꢊ
"ꢘꢘꢘꢓ ꢁꢃꢂ ꢏꢊ
"ꢘꢘꢘꢔ ´.ꢊ
Deletes this pair from the statistical accumulation.
Loops for another X, Y pair.
Checksum and length: AB71 15
"ꢘꢘꢘꢖ ꢆ!ꢎ $ꢊ
Defines the start of the output routine
Calculates the correlation coefficient.
Stores it in R.
Displays the correlation coefficient.
Calculates the coefficient b.
If flag 1 is set takes the natural antilog of b.
ꢁꢘꢘꢘꢒ ꢂꢏꢂ ꢁꢊ
ꢁꢘꢘꢘꢋ Tꢊ
ꢁꢘꢘꢘꢓ !ꢎ ꢁꢊ
ꢁꢘꢘꢘꢔ #ꢐꢈ$ ꢁ
ꢁꢘꢘꢘꢖ Eꢊ
ꢁꢘꢘꢘ ꢑ @ ꢒꢊ
%
ꢁꢘꢘꢘꢗ H ꢊ
16–4 Statistics Programs
Program Lines:
(In RPN mode)
Description
Stores b in B.
Displays value.
Calculates coefficient m.
Stores m in M.
Displays value.
ꢁꢘꢘꢘꢕ !ꢎ ꢏꢊ
ꢁꢘꢘꢘꢙ #ꢐꢈ$ ꢏ
ꢁꢘꢘꢒꢘ Pꢊ
ꢁꢘꢘꢒꢒ !ꢎ ꢇꢊ
ꢁꢘꢘꢒꢋ #ꢐꢈ$ ꢇ
Checksum and length: 9CC9 36
Defines the beginning of the estimation (projection) loop.
Displays, prompts for, and, if changed, stores x–value in X.
&ꢘꢘꢘꢒ ꢂꢏꢂ &ꢊ
&ꢘꢘꢘꢋ ꢐꢄꢅ"! %
&ꢘꢘꢘꢓ %ꢈꢉ1L2
&ꢘꢘꢘꢔ !ꢎ &ꢊ
&ꢘꢘꢘꢖ ꢐꢄꢅ"! &
ˆ
y .
Calls subroutine to compute
ˆ
y –value in Y.
Stores
Displays, prompts for, and, if changed, stores y–value in Y.
&ꢘꢘꢘ
ꢊ
Adjusts index value to address the appropriate subroutine.
&ꢘꢘꢘꢗ !ꢎ- L
&ꢘꢘꢘꢕ %ꢈꢉ1L2
&ꢘꢘꢘꢙ !ꢎ %ꢊ
&ꢘꢘꢒꢘ ꢆ!ꢎ &ꢊ
Calls subroutine to compute
.
ˆ
x
Stores
in X for next loop.
ˆ
x
Loops for another estimate.
Checksum and length: 9B34 42
ˆ
y
This subroutine calculates
for the straight–line model.
ꢀꢘꢘꢘꢒ ꢂꢏꢂ ꢀꢊ
ꢀꢘꢘꢘꢋ ꢁꢃꢂ ꢇꢊ
ꢀꢘꢘꢘꢓ ꢁꢃꢂº %
ꢀꢘꢘꢘꢔ ꢁꢃꢂ- ꢏ
ꢀꢘꢘꢘꢖ ꢁ!ꢄꢊ
ˆ
y
Calculates
= MX + B.
Returns to the calling routine.
Checksum and length: F321 15
This subroutine calculates
Restores index value to its original value.
for the straight–line model.
ꢆꢘꢘꢘꢒ ꢂꢏꢂ ꢆꢊ
ꢆꢘꢘꢘꢋ !ꢎ. L
ꢆꢘꢘꢘꢓ ꢁꢃꢂ &ꢊ
ꢆꢘꢘꢘꢔ ꢁꢃꢂ. ꢏ
ꢆꢘꢘꢘꢖ ꢁꢃꢂª ꢇ
ꢆꢘꢘꢘ ꢁ!ꢄꢊ
ˆ
x
Calculates
Returns to the calling routine.
=(Y – B) ÷ M.
ˆ
x
Checksum and length: 65AB 18
ˆ
y
This subroutine calculates
for the logarithmic model.
ꢏꢘꢘꢘꢒ ꢂꢏꢂ ꢏꢊ
Statistics Programs 16–5
Program Lines:
(In RPN mode)
Description
ꢏꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
ꢏꢘꢘꢘꢓ ꢂꢄꢊ
ꢏꢘꢘꢘꢔ ꢁꢃꢂº ꢇ
ꢏꢘꢘꢘꢖ ꢁꢃꢂ- ꢏ
ꢏꢘꢘꢘ ꢁ!ꢄꢊ
ˆ
y
Calculates
= M In X + B.
Returns to the calling routine.
Checksum and length: A5BB 18
This subroutine calculates
Restores index value to its original value.
for the logarithmic model.
ꢍꢘꢘꢘꢒ ꢂꢏꢂ ꢍꢊ
ꢍꢘꢘꢘꢋ !ꢎ. L
ꢍꢘꢘꢘꢓ ꢁꢃꢂ &ꢊ
ꢍꢘꢘꢘꢔ ꢁꢃꢂ. ꢏ
ꢍꢘꢘꢘꢖ ꢁꢃꢂª ꢇ
ˆ
x
(Y – B) ÷ M
%
Calculates
= e
ꢍꢘꢘꢘ H ꢊ
ˆ
x
Returns to the calling routine.
ꢍꢘꢘꢘꢗ ꢁ!ꢄꢊ
Checksum and length: 5117 21
ˆ
y
This subroutine calculates
for the exponential model.
ꢃꢘꢘꢘꢒ ꢂꢏꢂ ꢃꢊ
ꢃꢘꢘꢘꢋ ꢁꢃꢂ ꢇꢊ
ꢃꢘꢘꢘꢓ ꢁꢃꢂº %
%
ꢃꢘꢘꢘꢔ H ꢊ
MX
ˆ
y = Be
Calculates
.
ꢃꢘꢘꢘꢖ ꢁꢃꢂº ꢏ
Returns to the calling routine.
ꢃꢘꢘꢘ ꢁ!ꢄꢊ
Checksum and length: 1F92 18
ꢀ
ꢀ
This subroutine calculates
Restores index value to its original value.
for the exponential model.
ꢐꢘꢘꢘꢒ ꢂꢏꢂ ꢐꢊ
ˆ
x
!
!
ꢐꢘꢘꢘꢋ !ꢎ. L
!
!
ꢐꢘꢘꢘꢓ ꢁꢃꢂ &ꢊ
!
!
ꢐꢘꢘꢘꢔ ꢁꢃꢂª ꢏ
!
ꢐꢘꢘꢘꢖ ꢂꢄꢊ
!
!
Calculates
Returns to the calling routine.
= (ln (Y ÷ B)) ÷ M.
ꢐꢘꢘꢘ ꢁꢃꢂª ꢇ
ˆ
x
ꢀ
ꢐꢘꢘꢘꢗ ꢁ!ꢄꢊ
Checksum and length: CC13 21
ˆ
y
ꢀ
ꢀ
!
This subroutine calculates
for the power model.
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
!
ꢌꢘꢘꢘꢋ ꢁꢃꢂ %ꢊ
16–6 Statistics Programs
Program Lines:
(In RPN mode)
Description
!
!
ꢌꢘꢘꢘꢓ ꢁꢃꢂ ꢇꢊ
%
!
ꢌꢘꢘꢘꢔ ¸ ꢊ
M
!
!
Calculates Y= B(X ).
Returns to the calling routine.
ꢌꢘꢘꢘꢖ ꢁꢃꢂº ꢏ
!
ꢌꢘꢘꢘ ꢁ!ꢄꢊ
Checksum and length: 018C 18
This subroutine calculates
Restores index value to its original value.
for the power model.
ꢛꢘꢘꢘꢒ ꢂꢏꢂ ꢛꢊ
ꢛꢘꢘꢘꢋ !ꢎ. L
ꢛꢘꢘꢘꢓ ꢁꢃꢂ &ꢊ
ꢛꢘꢘꢘꢔ ꢁꢃꢂª ꢏ
ꢛꢘꢘꢘꢖ ꢁꢃꢂ ꢇꢊ
ꢛꢘꢘꢘ ꢒ+ºꢊ
ˆ
x
1/M
%
Calculates
= (Y/B)
ꢛꢘꢘꢘꢗ ¸ ꢊ
ˆ
x
Returns to the calling routine.
ꢛꢘꢘꢘꢕ ꢁ!ꢄꢊ
Checksum and length: 3040 24
Flags Used:
Flag 0 is set if a natural log is required of the X input. Flag 1 is set if a natural log
is required of the Y input.
Program instructions:
1. Key in the program routines; press when done.
2. Press X and select the type of curve you wish to fit by pressing:
ꢀ
ꢀ
ꢀ
ꢀ
S for a straight line;
L for a logarithmic curve;
E for an exponential curve; or
P for a power curve.
3. Key in x–value and press g.
4. Key in y–value and press g.
Statistics Programs 16–7
5. Repeat steps 3 and 4 for each data pair. If you discover that you have made
an error after you have pressed g in step 3 (with the
value prompt still
&@
visible), press g again (displaying the
value prompt) and press X U
%@
to undo (remove) the last data pair. If you discover that you made an error after
step 4, press X U. In either case, continue at step 3.
6. After all data are keyed in, press X R to see the correlation coefficient, R.
7. Press g to see the regression coefficient B.
8. Press g to see the regression coefficient M.
ˆ
y –estimation routine.
9. Press g to see the
value prompt for the
,
%@
ˆ
x
ˆ
y
based on x, key in x at the
value prompt, then
10. If you wish to estimˆate
%@
y
press g to see
11. If you wish to estimate
(
).
&@
based on y, press g until you see the
value
&@
ˆ
x
prompt, key in y, then press g to see
12. For more estimations, go to step 10 or 11.
(
).
%@
ˆ
x
13. For a new case, go to step 2.
Variables Used:
B
Regression coefficient (y–intercept of a straight line); also
used for scratch.
M
R
Regression coefficient (slope of a straight line).
Correlation coefficient; also used for scratch.
X
The x–value of a data pair whenˆentering data; the
y ; or
hypothetical x when projecting
when given a hypothetical y.
(x–estimate)
ˆ
x
Y
The y–value of a data pair when entering data; the
hypothetical y when projecting
when given a hypothetical x.
; or
(y–estimate)
ˆ
x
ˆ
y
i
Index variable used to indirectly address the correct
ˆ
y –projection equation.
–,
ˆ
x
Statistics registers
Statistical accumulation and computation.
16–8 Statistics Programs
Example 1:
Fit a straight line to the data below. Make an intentional error when keying in the
third data pair and correct it with the undo routine. Also, estimate y for an x value
of 37. Estimate x for a y value of 101.
X
Y
40.5
38.6
102
37.9
100
36.2
97.5
35.1
95.5
34.6
94
104.5
Keys:
Display:
Description:
(In RPN mode)
X S
Starts straight–line routine.
Enters x–value of data pair.
Enters y–value of data pair.
Enters x–value of data pair.
Enters y–value of data pair.
%@ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
&@ꢊ
40.5 g
104.5 g
38.6 g
102 g
value
ꢊ
%@ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
&@ꢊ
ꢒꢘꢔ)ꢖꢘꢘꢘꢊ
%@ꢊ
ꢓ)ꢘꢘꢘꢘꢊ
Now intentionally enter 379 instead of 37.9 so that you can see how to correct
incorrect entries.
Keys:
Display:
Description:
(In RPN mode)
379 g
Enters wrong x–value of data
pair.
&@ꢊ
ꢒꢘꢋ)ꢘꢘꢘꢘꢊ
%@ꢊ
g
Retrieves
prompt.
%@
ꢔ)ꢘꢘꢘꢘꢊ
%@ꢊ
X U
Deletes the last pair. Now
proceed with the correct data
entry.
ꢓ)ꢘꢘꢘꢘꢊ
37.9 g
Enters correct x–value of data
pair.
&@ꢊ
ꢒꢘꢋ)ꢘꢘꢘꢘꢊ
Statistics Programs 16–9
100 g
36.2 g
97.5 g
35.1 g
95.5 g
34.6 g
94 g
X R
g
Enters y–value of data pair.
Enters x–value of data pair.
Enters y–value of data pair.
Enters x–value of data pair.
Enters y–value of data pair.
Enters x–value of data pair.
Enters y–value of data pair.
%@ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
&@ꢊ
ꢒꢘꢘ)ꢘꢘꢘꢘꢊ
%@ꢊ
ꢖ)ꢘꢘꢘꢘꢊ
&@ꢊ
ꢙꢗ)ꢖꢘꢘꢘꢊ
%@ꢊ
)ꢘꢘꢘꢘꢊ
&@ꢊ
ꢙꢖ)ꢖꢘꢘꢘꢊ
%@ꢊ
ꢗ)ꢘꢘꢘꢘꢊ
ꢁ/ꢊ
Calculates the correlation
coefficient.
Calculates regression coefficient
B.
Calculates regression coefficient
M.
Prompts for hypothetical x–value.
ꢘ)ꢙꢙꢖꢖꢊ
ꢏ/ꢊ
ꢓꢓ)ꢖꢋꢗꢒꢊ
ꢇ/ꢊ
g
ꢒ)ꢗ ꢘꢒꢊ
%@ꢊ
g
ꢗ)ꢘꢘꢘꢘꢊ
&@ꢊ
ˆ
y .
37 g
101 g
Stores 37 in X and calculates
ꢙꢕ) ꢖꢋ ꢊ
%@ꢊ
Stores 101 in Y and calculates
.
ꢓꢕ)ꢓꢓꢓ ꢊ
ˆ
x
Example 2:
Repeat example 1 (using the same data) for logarithmic, exponential, and power
curve fits. The table below gives you the starting execution label and the results (the
correlation and regression coefficients and the x– and y– estimates) for each type
of curve. You will need to reenter the data values each time you run the program
for a different curve fit.
16–10 Statistics Programs
Logarithmic
Exponential
Power
To start:
X L
0.9965
X E
0.9945
X P
0.9959
8.9730
0.6640
98.6845
38.3151
R
M
–139.0088
65.8446
98.7508
38.2857
51.1312
0.0177
B
ˆ
Y (y
when X=37)
when Y=101)
98.5870
38.3628
X (
ˆ
x
Normal and Inverse–Normal Distributions
Normal distribution is frequently used to model the behavior of random variation
about a mean. This model assumes that the sample distribution is symmetric about
the mean, M, with a standard deviation, S, and approximates the shape of the
bell–shaped curve shown below. Given a value x, this program calculates the
probability that a random selection from the sample data will have a higher value.
This is known as the upper tail area, Q(x). This program also provides the inverse:
given a value Q(x), the program calculates the corresponding value x.
y
"Upper tail"
area
Q [x]
x
x
2
1
Q(x) = 0.5−
e
−((x−x)÷σ ) ÷2dx
³
x
σ 2π
This program uses the built–in integration feature of the HP 33s to integrate the
equation of the normal frequency curve. The inverse is obtained using Newton's
method to iteratively search for a value of x which yields the given probability
Q(x).
Statistics Programs 16–11
Program Listing:
Program Lines:
(In RPN mode)
Description
This routine initializes the normal distribution program.
Stores default value for mean.
ꢘꢘꢘꢒ ꢂꢏꢂ ꢊ
ꢘꢘꢘꢋ ꢘꢊ
ꢘꢘꢘꢓ !ꢎ ꢇꢊ
ꢘꢘꢘꢔ ꢐꢄꢅ"! ꢇ
ꢘꢘꢘꢖ ꢒꢊ
Prompts for and stores mean, M.
Stores default value for standard deviation.
ꢘꢘꢘ !ꢎ ꢊ
ꢘꢘꢘꢗ ꢐꢄꢅ"!
ꢘꢘꢘꢕ ꢁ!ꢄꢊ
Prompts for and stores standard deviation, S.
Stops displaying value of standard deviation.
Checksum and length: D72F 48
This routine calculates Q(X) given X.
Prompts for and stores X.
Calculates upper tail area.
Stores value in Q so VIEW function can display it.
Displays Q(X).
ꢌꢘꢘꢘꢒ ꢂꢏꢂ ꢌꢊ
ꢌꢘꢘꢘꢋ ꢐꢄꢅ"! %
ꢌꢘꢘꢘꢓ %ꢈꢉ ꢉꢊ
ꢌꢘꢘꢘꢔ !ꢎ ꢉꢊ
ꢌꢘꢘꢘꢖ #ꢐꢈ$ ꢉꢊ
ꢌꢘꢘꢘ ꢆ!ꢎ ꢌꢊ
Loops to calculate another Q(X).
Checksum and length: EA54 18
This routine calculates X given Q(X).
Prompts for and stores Q(X).
Recalls the mean.
ꢐꢘꢘꢘꢒ ꢂꢏꢂ ꢐꢊ
ꢐꢘꢘꢘꢋ ꢐꢄꢅ"! ꢉ
ꢐꢘꢘꢘꢓ ꢁꢃꢂ ꢇꢊ
ꢐꢘꢘꢘꢔ !ꢎ %ꢊ
Stores the mean as the guess for X, called X
.
guess
Checksum and length: 79B9 12
This label defines the start of the iterative loop.
Calculates (Q( X )– Q(X)).
!ꢘꢘꢘꢒ ꢂꢏꢂ !ꢊ
!ꢘꢘꢘꢋ %ꢈꢉ ꢉꢊ
!ꢘꢘꢘꢓ ꢁꢃꢂ. ꢉꢊ
!ꢘꢘꢘꢔ ꢁꢃꢂ %ꢊ
!ꢘꢘꢘꢖ !ꢎ ꢌꢊ
¶
guess
!ꢘꢘꢘ
ꢁ
ꢊ
Calculates the derivative at X
guess
.
!ꢘꢘꢘꢗ %ꢈꢉ ꢑꢊ
!ꢘꢘꢘꢕ ꢁꢃꢂª !ꢊ
!ꢘꢘꢘꢙ ªꢊ
Calculates the correction for X
.
guess
16–12 Statistics Programs
Program Lines:
(In RPN mode)
Description
Adds the correction to yield a new X
.
!ꢘꢘꢒꢘ !ꢎ- %ꢊ
!ꢘꢘꢒꢒ ꢀꢏ ꢊ
guess
!ꢘꢘꢒꢋ ꢘ)ꢘꢘꢘꢒ
!ꢘꢘꢒꢓ º6¸@ꢊ
!ꢘꢘꢒꢔ ꢆ!ꢎ !ꢊ
Tests to see if the correction is significant.
Goes back to start of loop if correction is significant.
Continues if correction is not significant.
!ꢘꢘꢒꢖ ꢁꢃꢂ %ꢊ
!ꢘꢘꢒ #ꢐꢈ$ %ꢊ
!ꢘꢘꢒꢗ ꢆ!ꢎ ꢐꢊ
Displays the calculated value of X.
Loops to calculate another X.
Checksum and length: 0E12 63
This subroutine calculates the upper–tail area Q(x).
Recalls the lower limit of integration.
Recalls the upper limit of integration.
Selects the function defined by LBL F for integration.
Integrates the normal function using the dummy variable
D.
ꢉꢘꢘꢘꢒ ꢂꢏꢂ ꢉꢊ
ꢉꢘꢘꢘꢋ ꢁꢃꢂ ꢇꢊ
ꢉꢘꢘꢘꢓ ꢁꢃꢂ %ꢊ
ꢉꢘꢘꢘꢔ ꢑꢄ/ ꢑꢊ
ꢉꢘꢘꢘꢖꢊ ꢑꢄ G ꢌ
³
ꢉꢘꢘꢘ ꢋꢊ
π
ꢉꢘꢘꢘꢗ
ꢊ
ꢉꢘꢘꢘꢕ ºꢊ
ꢉꢘꢘꢘꢙꢊ ºꢊ
ꢉꢘꢘꢒꢘ ꢁꢃꢂº ꢊ
ꢉꢘꢘꢒꢒ !ꢎ !ꢊ
ꢉꢘꢘꢒꢋ ªꢊ
Calculates S ×
Stores result temporarily for inverse routine.
.
2π
ꢉꢘꢘꢒꢓ -+.ꢊ
ꢉꢘꢘꢒꢔ ꢘ)ꢖꢊ
ꢉꢘꢘꢒꢖ -ꢊ
Adds half the area under the curve since we integrated
using the mean as the lower limit.
Returns to the calling routine.
Checksum and length: FA83 72
ꢉꢘꢘꢒ ꢁ!ꢄꢊ
This subroutine calculates the integrand for the normal
ꢑꢘꢘꢘꢒ ꢂꢏꢂ ꢑꢊ
−((X −M)÷S)2 ÷2
function
e
ꢑꢘꢘꢘꢋ ꢁꢃꢂ ꢌꢊ
ꢑꢘꢘꢘꢓ ꢁꢃꢂ. ꢇꢊ
Statistics Programs 16–13
Program Lines:
(In RPN mode)
Description
ꢑꢘꢘꢘꢔ ꢁꢃꢂª ꢊ
ꢋ
ꢑꢘꢘꢘꢖ º ꢊ
ꢑꢘꢘꢘ ꢋꢊ
ꢑꢘꢘꢘꢗ ªꢊ
ꢑꢘꢘꢘꢕ -+.ꢊ
%
ꢑꢘꢘꢘꢙ H ꢊ
Returns to the calling routine.
ꢑꢘꢘꢒꢘ ꢁ!ꢄꢊ
Checksum and length: 1981 42
Flags Used:
None.
Remarks:
The accuracy of this program is dependent on the display setting. For inputs in the
area between 3 standard deviations, a display of four or more significant figures
is adequate for most applications.
At full precision, the input limit becomes 5 standard deviations. Computation time
is significantly less with a lower number of displayed digits.
In routine Q, the constant 0.5 may be replaced by 2 and ꢅ.
You do not need to key in the inverse routine (in routines I and T) if you are not
interested in the inverse capability.
Program Instructions:
1. Key in the program routines; press when done.
2. Press X S.
3. After the prompt for M, key in the population mean and press g. (If the
mean is zero, just press g.)
4. After the prompt for S, key in the population standard deviation and press
g. (If the standard deviation is 1, just press g.)
5. To calculate X given Q(X), skip to step 9 of these instructions.
16–14 Statistics Programs
6. To calculate Q(X) given X, X D.
7. After the prompt, key in the value of X and press g. The result, Q(X), is
displayed.
8. To calculate Q(X) for a new X with the same mean and standard deviation,
press g and go to step 7.
9. To calculate X given Q(X), press X I.
10. After the prompt, key in the value of Q(X) and press g. The result, X, is
displayed.
11. To calculate X for a new Q(X) with the same mean and standard deviation,
press g and go to step 10.
Variables Used:
D
M
Q
S
Dummy variable of integration.
Population mean, default value zero.
Probability corresponding to the upper–tail area.
Population standard deviation, default value of 1.
T
Variable used temporarily to pass the value S ×
inverse program.
to the
2π
X
Input value that defines the left side of the upper–tail area.
Example 1:
Your good friend informs you that your blind date has "3σ" intelligence. You
interpret this to mean that this person is more intelligent than the local population
except for people more than three standard deviations above the mean.
Suppose that you intuit that the local population contains 10,000 possible blind
?
dates. How many people fall into the "3σ" band Since this problem is stated in
terms of standard deviations, use the default value of zero for M and 1 for S.
Keys:
Display:
Description:
(In RPN mode)
X S
Starts the initialization routine.
ꢇ@ꢊ
ꢘ)ꢘꢘꢘꢘꢊ
@ꢊ
g
Accepts the default value of zero for
M.
Accepts the default value of 1 for S.
ꢒ)ꢘꢘꢘꢘꢊ
ꢒ)ꢘꢘꢘꢘꢊ
g
Statistics Programs 16–15
X D
Starts the distribution program and
prompts for X.
%@ꢊ
value
ꢊ
3 g
Enters 3 for X and starts computation
of Q(X). Displays the ratio of the
population smarter than everyone
within three standard deviations of
the mean.
ꢉ/ꢊ
ꢘ)ꢘꢘꢒꢓꢊ
10000 z
Multiplies by the population.
Displays the approximate number of
blind dates in the local population
that meet the criteria.
ꢒꢓ)ꢔꢙꢕꢔꢊ
Since your friend has been known to exaggerate from time to time, you decide to
see how rare a "2σ" date might be. Note that the program may be rerun simply by
pressing g.
Keys:
Display:
Description:
(In RPN mode)
g
Resumes program.
%@ꢊ
ꢓ)ꢘꢘꢘꢘꢊ
ꢉ/ꢊ
2 g
Enters X–value of 2 and calculates
Q(X).
Multiplies by the population for the
revised estimate.
ꢘ)ꢘꢋꢋꢕꢊ
ꢋꢋꢗ)ꢖꢘꢒꢋꢊ
10000 z
Example 2:
The mean of a set of test scores is 55. The standard deviation is 15.3. Assuming
that the standard normal curve adequately models the distribution, what is the
?
probability that a randomly selected student scored at least 90 What is the score
?
that only 10 percent of the students would be expected to have surpassed What
would be the score that only 20 percent of the students would have failed to
?
achieve
Keys:
Display:
Description:
(In RPN mode)
X S
Starts the initialization routine.
ꢇ@ꢊ
ꢘ)ꢘꢘꢘꢘꢊ
16–16 Statistics Programs
55 g
15.3 g
X D
90 g
Stores 55 for the mean.
@ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
ꢒꢖ)ꢓꢘꢘꢘꢊ
Stores 15.3 for the standard
deviation.
Starts the distribution program and
prompts for X.
%@ꢊ
value
ꢊ
Enters 90 for X and calculates Q(X).
ꢉ/ꢊ
ꢘ)ꢘꢒꢒꢒꢊ
Thus, we would expect that only about 1 percent of the students would do better
than score 90.
Keys:
Display:
Description:
(In RPN mode)
X I
0.1 g
g
Starts the inverse routine.
ꢉ@ꢊ
ꢘ)ꢘꢒꢒꢒꢊ
%/ꢊ
Stores 0.1 (10 percent) in Q(X) and
calculates X.
Resumes the inverse routine.
ꢗꢔ) ꢘꢗꢗꢊ
ꢉ@ꢊ
ꢘ)ꢒꢘꢘꢘꢊ
%/ꢊ
0.8 g
Stores 0.8 (100 percent minus 20
percent) in Q(X) and calculates X.
ꢔꢋ)ꢒꢋꢓꢋꢊ
Grouped Standard Deviation
The standard deviation of grouped data, S , is the standard deviation of data
xy
points x , x , ... , x , occurring at positive integer frequencies f , f , ... , f .
1
2
n
1
2
n
(
xifi)2
f
xi2fi−
¦
¦
¦
i
Sxg
=
(
f ) −1
¦
i
This program allows you to input data, correct entries, and calculate the standard
deviation and weighted mean of the grouped data.
Statistics Programs 16–17
Program Listing:
Program Lines:
(In ALG mode)
Description
Start grouped standard deviation program.
Clears statistics registers (28 through 33).
ꢘꢘꢘꢒꢊꢂꢏꢂꢊ ꢊ
ꢘꢘꢘꢋꢊꢃꢂ;ꢊ
ꢘꢘꢘꢓꢊꢘꢊ
Clears the count N.
Checksum and length: EF85 24
ꢘꢘꢘꢔꢊ !ꢎꢊꢄꢊ
Input statistical data points.
Stores data point in X.
Stores data–point frequency in F.
Enters increment for N.
ꢐꢘꢘꢘꢒꢊꢂꢏꢂꢊꢐꢊ
ꢐꢘꢘꢘꢋꢊꢐꢄꢅ"!ꢊ%ꢊ
ꢐꢘꢘꢘꢓꢊꢐꢄꢅ"!ꢊꢑꢊ
ꢐꢘꢘꢘꢔꢊꢒꢊ
ꢐꢘꢘꢘꢖꢊ !ꢎꢊꢏꢊ
ꢐꢘꢘꢘ ꢊꢁꢃꢂꢊꢑꢊ
Recalls data–point frequency f .
Checksum and length: 184C 30
i
Accumulate summations.
Stores index for register 28.
ꢑꢘꢘꢘꢒꢊꢂꢏꢂꢊꢑꢊ
ꢑꢘꢘꢘꢋꢊꢋꢕꢊ
ꢑꢘꢘꢘꢓꢊ !ꢎꢊLꢊ
ꢑꢘꢘꢘꢔꢊꢁꢃꢂꢊꢑꢊ
ꢑꢘꢘꢘꢖꢊ !ꢎ-1L2ꢊ
ꢑꢘꢘꢘ ꢊꢁꢃꢂhꢊ%ꢊ
ꢑꢘꢘꢘꢗꢊꢈꢄ!ꢈꢁꢊ
ꢑꢘꢘꢘꢕꢊ !ꢎꢊ'ꢊ
ꢑꢘꢘꢘꢙꢊꢋꢙꢊ
f
Updates
xifi
in register 28.
¦
i
Stores index for register 29.
ꢑꢘꢘꢒꢘꢊ !ꢎꢊLꢊ
ꢑꢘꢘꢒꢒꢊꢁꢃꢂꢊ'ꢊ
ꢑꢘꢘꢒꢋꢊ !ꢎ-1L2ꢊ
ꢑꢘꢘꢒꢓꢊꢁꢃꢂhꢊ%ꢊ
ꢑꢘꢘꢒꢔꢊꢈꢄ!ꢈꢁꢊ
ꢑꢘꢘꢒꢖꢊ !ꢎꢊ'ꢊ
ꢑꢘꢘꢒ ꢊꢓꢒꢊ
xifi
Updates
in register 29.
¦
xi2f
i
Stores index for register 31.
ꢑꢘꢘꢒꢗꢊ !ꢎꢊLꢊꢊ
ꢑꢘꢘꢒꢕꢊꢁꢃꢂꢊ'ꢊ
16–18 Statistics Programs
Program Lines:
(In ALG mode)
Description
xi2f
Updates
in register 31.
ꢑꢘꢘꢒꢙꢊ !ꢎ-1L2ꢊ
ꢑꢘꢘꢋꢘꢊꢁꢃꢂꢊꢏꢊ
ꢑꢘꢘꢋꢒꢊ !ꢎ-ꢊꢄꢊ
ꢑꢘꢘꢋꢋꢊꢁꢃꢂꢊꢄꢊ
ꢑꢘꢘꢋꢓꢊꢁꢃꢂꢊꢑꢊ
ꢑꢘꢘꢋꢔꢊꢀꢏ ꢊ
¦
i
Increments (or decrements) N.
ꢑꢘꢘꢋꢖꢊ !ꢎꢊꢑꢊ
ꢑꢘꢘꢋ ꢊ#ꢐꢈ$ꢊꢄꢊ
ꢑꢘꢘꢋꢗꢊꢆ!ꢎꢊꢐꢊ
Displays current number of data pairs.
Goes to label I for next data input.
Checksum and length: 3080 117
Calculates statistics for grouped data.
Grouped standard deviation.
ꢆꢘꢘꢘꢒꢊꢂꢏꢂꢊꢆꢊ
ꢆꢘꢘꢘꢋꢊUºꢊ
ꢆꢘꢘꢘꢓꢊ !ꢎꢊ ꢊ
ꢆꢘꢘꢘꢔꢊ#ꢐꢈ$ꢊ ꢊ
Displays grouped standard deviation.
Weighted mean.
ꢆꢘꢘꢘꢖꢊ
ꢊ
º
ꢆꢘꢘꢘ ꢊ !ꢎꢊꢇꢊ
ꢆꢘꢘꢘꢗꢊ#ꢐꢈ$ꢊꢇꢊ
ꢆꢘꢘꢘꢕꢊꢆ!ꢎꢊꢐꢊ
Displays weighted mean.
Goes back for more points.
Checksum and length: 7246 24
Undo data–entry error.
Enters decrement for N.
"ꢘꢘꢘꢒꢊꢂꢏꢂꢊ"ꢊ
"ꢘꢘꢘꢋꢊ.ꢒꢊ
"ꢘꢘꢘꢓꢊ !ꢎꢊꢏꢊ
"ꢘꢘꢘꢔꢊꢁꢃꢂꢊꢑꢊ
"ꢘꢘꢘꢖꢊ-+.ꢊ
Recalls last data frequency input.
Changes sign of f .
i
"ꢘꢘꢘ ꢊ !ꢎꢊꢑꢊ
"ꢘꢘꢘꢗꢊꢆ!ꢎꢊꢑꢊ
Adjusts count and summations.
Checksum and length: E469 33
Flags Used:
None.
Statistics Programs 16–19
Program Instructions:
1. Key in the program routines; press when done.
2. Press X S to start entering new data.
3. Key in x –value (data point) and press g.
i
4. Key in f –value (frequency) and press g.
i
5. Press g after VIEWing the number of points entered.
6. Repeat steps 3 through 5 for each data point.
If you discover that you have made a data-entry error (x or f ) after you have
i
i
pressed g in step 4, press X U and then press g again. Then go
back to step 3 to enter the correct data.
7. When the last data pair has been input, press X G to calculate and
display the grouped standard deviation.
8. Press g to display the weighted mean of the grouped data.
9. To add additional data points, press g and continue at step 3.
To start a new problem, start at step 2.
Variables Used:
X
F
N
S
M
i
Data point.
Data–point frequency.
Data–pair counter.
Grouped standard deviation.
Weighted mean.
Index variable used to indirectly address the correct
statistics register.
Register 28
Register 29
Register 31
Summation Σf .
i
Summation Σx f .
i i
2
Summation Σx f .
i
i
Example:
Enter the following data and calculate the grouped standard deviation.
16–20 Statistics Programs
Group
1
2
3
4
5
6
x
5
17
8
26
13
37
15
43
22
73
37
115
i
f
i
Keys:
Display:
Description:
(In ALG mode)
X S
Prompts for the first x
i
%@ꢊ
.
value
ꢊ
ꢊ
5 g
17 g
g
Stores 5 in X; prompts for first f .
ꢑ@ꢊ
i
value
Stores 17 in F; displays the
counter.
Prompts for the second x
ꢄ/ꢊ
ꢒ)ꢘꢘꢘꢘꢊ
%@ꢊ
.
i
ꢖ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
8 g
26 g
g
Prompts for second f .
i
ꢒꢗ)ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
ꢋ)ꢘꢘꢘꢘꢊ
%@ꢊ
Prompts for the third x
.
i
ꢕ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
14 g
37 g
Prompts for the third f .
i
ꢋ )ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
ꢓ)ꢘꢘꢘꢘꢊ
You erred by entering 14 instead of 13 for x . Undo your error by executing
3
routine U:
X U
Removes the erroneous data;
displays the revised counter.
ꢄ/ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
%@ꢊ
g
Prompts for new third x .
i
ꢒꢔ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
13 g
g
Prompts for the new third f .
i
ꢓꢗ)ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
ꢓ)ꢘꢘꢘꢘꢊ
Statistics Programs 16–21
g
Prompts for the fourth x .
%@ꢊ
i
ꢒꢓ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
15 g
43 g
g
Prompts for the fourth f .
i
ꢓꢗ)ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
ꢔ)ꢘꢘꢘꢘꢊ
%@ꢊ
Prompts for the fifth x .
i
ꢒꢖ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
22 g
73 g
g
Prompts for the fifth f .
i
ꢔꢓ)ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
ꢖ)ꢘꢘꢘꢘꢊ
%@ꢊ
Prompts for the sixth x .
i
ꢋꢋ)ꢘꢘꢘꢘꢊ
ꢑ@ꢊ
37 g
115 g
Prompts for the sixth f .
i
ꢗꢓ)ꢘꢘꢘꢘꢊ
ꢄ/ꢊ
Displays the counter.
)ꢘꢘꢘꢘꢊ
/ꢊ
X
Calculates and displays the
grouped standard deviation (sx)
of the six data points.
G
ꢒꢒ)ꢔꢒꢒꢕꢊ
g
Calculates and displays
ꢇ/ꢊ
weighted mean ( ).
ꢋꢓ)ꢔꢘꢕꢔꢊ
ꢋꢓ)ꢔꢘꢕꢔꢊ
x
Clears VIEW.
16–22 Statistics Programs
17
Miscellaneous Programs and
Equations
Time Value of Money
Given any four of the five values in the "Time–Value–of–Money equation" (TVM),
you can solve for the fifth value. This equation is useful in a wide variety of
financial applications such as consumer and home loans and savings accounts.
The TVM equation is:
−N
ª
º
1− (1+ I 100)
P
+ F(1+ (I 100))−N + B = 0
«
¬
»
¼
I 100
Balance, B
Payments, P
N
_
N 1
3
1
2
Future Value, F
The signs of the cash values (balance, B; payment, P; and future balance, F)
correspond to the direction of the cash flow. Money that you receive has a positive
sign while money that you pay has a negative sign. Note that any problem can be
viewed from two perspectives. The lender and the borrower view the same
problem with reversed signs.
Miscellaneous Programs and Equations 17–1
Equation Entry:
Key in this equation:
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-ꢐªꢒꢘꢘ2:.ꢄ2ªꢐ-ꢑº1ꢒ-ꢐªꢒꢘꢘ2:.ꢄ-ꢏꢊ
Keys:
Display:
Description:
(In RPN mode)
| H
Selects Equation
mode.
Starts entering
equation.
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
or current equation
ꢊ
L P z 100
_
ꢅº ꢒꢘꢘ ꢊ
z | ] 1 ꢀ
| ] 1
L I q 100
| ` ꢄ
ꢅºꢒꢘꢘº1ꢒ.¾ꢊ
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-¾ꢊ
_
º1ꢒ.1ꢒ-ꢐªꢊꢒꢘꢘ ꢊ
1ꢒ.1ꢒ-ꢐªꢒꢘꢘ2:¾ꢊ
1ꢒ-ꢐªꢒꢘꢘ2:.ꢄ2¾ꢊ
ꢒꢘꢘ2:.ꢄ2ªꢐ-ꢑº¾ꢊ
:.ꢄ2ªꢐ-ꢑº1ꢒ-ꢐ¾ꢊ
ꢐ-ꢑº1ꢒ-ꢐªꢒꢘꢘ2¾ꢊ
º1ꢒ-ꢐªꢒꢘꢘ2:.ꢄ¾ꢊ
ꢒ-ꢐªꢒꢘꢘ2:.ꢄ-ꢏ¾ꢊ
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-ꢐªꢊ
ꢀ L N | `
q L I L F z
| ] 1 L I
q 100 | `
ꢄ ꢀ L N
L B
Terminates the
equation.
| (hold)
Checksum and
length.
ꢃꢚ/ꢓꢕꢋꢈꢊ
ꢂꢄ/ꢔꢒꢊ
Remarks:
The TVM equation requires that I must be non–zero to avoid a
error. If you're solving for I and aren't sure of its current value, press 1 I I
ꢌꢐ#ꢐꢌꢈ ꢏ& ꢘ
before you begin the SOLVE calculation ( I ).
The order in which you're prompted for values depends upon the variable you're
solving for.
17–2 Miscellaneous Programs and Equations
SOLVE instructions:
1. If your first TVM calculation is to solve for interest rate, I, press 1 I I.
2. Press | H. If necessary, press or to scroll through the
equation list until you come to the TVM equation.
3. Do one of the following five operations:
a. Press N to calculate the number of compounding periods.
b. Press I to calculate periodic interest.
For monthly payments, the result returned for I is the monthly interest rate,
i; press 12 z to see the annual interest rate.
c. Press B to calculate initial balance of a loan or savings account.
d. Press P to calculate periodic payment.
.
e. Press F to calculate future value or balance of a loan
4. Key in the values of the four known variables as they are prompted for; press
g after each value.
5. When you press the last g, the value of the unknown variable is calculated
and displayed.
6. To calculate a new variable, or recalculate the same variable using different
data, go back to step 2.
SOLVE works effectively in this application without initial guesses.
Variables Used:
N
I
The number of compounding periods.
The periodic interest rate as a percentage. (For example, if the
annual interest rate is 15% and there are 12 payments per year,
the periodic interest rate, i, is 15÷12=1.25%.)
B
P
F
The initial balance of loan or savings account.
The periodic payment.
The future value of a savings account or balance of a loan.
Example:
Part 1. You are financing the purchase of a car with a 3–year (36–month) loan
at 10.5% annual interest compounded monthly. The purchase price of the car is
$7,250. Your down payment is $1,500.
Miscellaneous Programs and Equations 17–3
_
B = 7,250 1,500
I = 10.5% per year
N = 36 months
F = 0
P =
?
Keys:
Display:
Description:
(In RPN mode)
{
} 2
Selects FIX 2 display format.
Displays the leftmost part of
the TVM equation.
ꢑꢐ%
ꢊ
| H ( as
needed )
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-ꢐª
P
Selects P; prompts for I.
ꢐ@ꢊ
value
ꢊ
10.5 12 q
Converts your annual interest
rate input to the equivalent
monthly rate.
ꢐ@ꢊ
ꢘ)ꢕꢕꢊ
g
Stores 0.88 in I; prompts for
N.
Stores 36 in N; prompts for F.
ꢄ@ꢊ
value
ꢊ
36 g
ꢑ@ꢊ
value
ꢊ
0 g
Stores 0 in F; prompts for B.
ꢏ@ꢊ
value
ꢊ
7250 1500 ꢀ
Calculates B, the beginning
loan balance.
Stores 5750 in B; calculates
monthly payment, P.
ꢏ@ꢊ
ꢖ8ꢗꢖꢘ)ꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢅ/ꢊ
g
.ꢒꢕ )ꢕꢙꢊ
The answer is negative since the loan has been viewed from the borrower's
perspective. Money received by the borrower (the beginning balance) is positive,
while money paid out is negative.
17–4 Miscellaneous Programs and Equations
?
Part 2. What interest rate would reduce the monthly payment by $10
Keys:
Display:
Description:
(In RPN mode)
| H
Displays the leftmost hart of the
TVM equation.
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-ꢐª
I
{ J
10
g
Selects I; prompts for P.
ꢅ@ꢊ
.ꢒꢕ )ꢕꢙꢊ
ꢅ@ꢊ
Rounds the payment to two
decimal places.
Calculates new payment.
.ꢒꢕ )ꢕꢙꢊ
ꢅ@ꢊ
.ꢒꢗ )ꢕꢙꢊ
ꢄ@ꢊ
Stores –176,89 in P; prompts for
N.
Retains 36 in N; prompts for F.
ꢓ )ꢘꢘꢊ
ꢑ@ꢊ
g
ꢘ)ꢘꢘꢊ
ꢏ@ꢊ
g
Retains 0 in F; prompts for B.
ꢖ8ꢗꢖꢘ)ꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢐ/ꢊ
g
Retains 5750 in B; calculates
monthly interest rate.
ꢘ)ꢖ ꢊ
)ꢗꢖꢊ
12 z
Calculates annual interest rate.
Part 3. Using the calculated interest rate (6.75%), assume that you sell the car
?
after 2 years. What balance will you still owe In other words, what is the future
?
balance in 2 years
Note that the interest rate, I, from part 2 is not zero, so you won't get a
ꢌꢐ#ꢐꢌꢈ
error when you calculate the new I.
ꢏ& ꢘ
Keys:
Display:
Description:
(In RPN mode)
| H
Displays leftmost part of the TVM
equation.
ꢅºꢒꢘꢘº1ꢒ.1ꢒ-ꢐª
F
Selects F; prompts for P.
ꢅ@ꢊ
.ꢒꢗ )ꢕꢙꢊ
Miscellaneous Programs and Equations 17–5
g
Retains P; prompts for I.
ꢐ@ꢊ
ꢘ)ꢖ ꢊ
g
Retains 0.56 in I; prompts for N.
Stores 24 in N; prompts for B.
ꢄ@ꢊ
ꢓ )ꢘꢘꢊ
ꢏ@ꢊ
24 g
g
ꢖ8ꢗꢖꢘ)ꢘꢘꢊ
ꢎꢂ#ꢐꢄꢆꢊ
ꢑ/ꢊ
Retains 5750 in B; calculates F,
the future balance. Again, the
sign is negative, indicating that
you must, pay out this money.
Sets FIX 4 display format.
.ꢋ8ꢘꢔꢗ)ꢘꢖꢊ
{
} 4
ꢑꢐ%
ꢊ
Prime Number Generator
This program accepts any positive integer greater than 3. If the number is a prime
number (not evenly divisible by integers other than itself and 1), then the program
returns the input value. If the input is not a prime number, then the program returns
the first prime number larger than the input.
The program identifies non–prime numbers by exhaustively trying all possible
factors. If a number is not prime, the program adds 2 (assuring that the value is still
odd) and tests to see if it has found a prime. This process continues until a prime
number is found.
17–6 Miscellaneous Programs and Equations
LBL Y
VIEW Prime
LBL Z
Note: x is the
value in the
X-register.
P + 2
→
x
Start
LBL P
x
3
→
→
P
D
LBL X
yes
x = 0
?
no
yes
no
Miscellaneous Programs and Equations 17–7
Program Listing:
Program Lines:
(In ALG mode)
Description
This routine displays prime number P.
&ꢘꢘꢘꢒ ꢂꢏꢂ &ꢊ
&ꢘꢘꢘꢋ #ꢐꢈ$ ꢅꢊ
Checksum and length: AA7A
6
This routine adds 2 to P.
'ꢘꢘꢘꢒ ꢂꢏꢂ 'ꢊ
'ꢘꢘꢘꢋ ꢋꢊ
'ꢘꢘꢘꢓ ꢁꢃꢂ- ꢅꢊ
Checksum and length: 8696 21
This routine stores the input value for P.
ꢅꢘꢘꢘꢒ ꢂꢏꢂ ꢅꢊ
ꢅꢘꢘꢘꢋ !ꢎ ꢅꢊ
ꢅꢘꢘꢘꢓꢊªꢊ
ꢅꢘꢘꢘꢔꢊꢋꢊ
ꢅꢘꢘꢘꢖꢊꢈꢄ!ꢈꢁꢊ
ꢅꢘꢘꢘ ꢑꢅꢊ
ꢅꢘꢘꢘꢗꢊº65¸ꢊ
ꢅꢘꢘꢘꢕ ꢘꢊ
Tests for even input.
ꢅꢘꢘꢘꢙ º/¸@ꢊ
ꢅꢘꢘꢒꢘ ꢒꢊ
Increments P if input an even number.
Stores 3 in test divisor, D.
ꢅꢘꢘꢒꢒ !ꢎ- ꢅꢊ
ꢅꢘꢘꢒꢋ ꢓꢊ
ꢅꢘꢘꢒꢓ !ꢎ ꢌꢊ
Checksum and length: D0B8 87
This routine tests P to see if it is prime.
%ꢘꢘꢘꢒ ꢂꢏꢂ %ꢊ
%ꢘꢘꢘꢋ ꢁꢃꢂ ꢅꢊ
%ꢘꢘꢘꢓ ꢁꢃꢂªꢌꢊ
%ꢘꢘꢘꢔ ꢑꢅꢊ
Finds the fractional part of P ÷ D.
Tests for a remainder of zero (not prime).
If the number is not prime, tries next possibility.
%ꢘꢘꢘꢖ º/ꢘ@ꢊ
%ꢘꢘꢘ ꢆ!ꢎ 'ꢊ
%ꢘꢘꢘꢗ ꢁꢃꢂ ꢅꢊ
%ꢘꢘꢘꢕꢊ ºꢊ
%ꢘꢘꢘꢙꢊº65¸ꢊ
17–8 Miscellaneous Programs and Equations
Program Lines:
(In ALG mode)
Description
%ꢘꢘꢒꢘ ꢁꢃꢂ ꢌꢊ
>
Tests to see whether all possible factors have been tried.
If all factors have been tried, branches to the display
routine.
%ꢘꢘꢒꢒ º ¸@ꢊ
%ꢘꢘꢒꢋ ꢆ!ꢎ &ꢊ
Calculates the next possible factor, D + 2.
%ꢘꢘꢒꢓ ꢋꢊ
%ꢘꢘꢒꢔ !ꢎ- ꢌꢊ
%ꢘꢘꢒꢖ ꢆ!ꢎ %ꢊ
Branches to test potential prime with new factor.
Checksum and length: 161E 57
Flags Used:
None.
Program Instructions:
1. Key in the program routines; press when done.
2. Key in a positive integer greater than 3.
3. Press X P to run program. Prime number, P will be displayed.
4. To see the next prime number, press g.
Variables Used:
P
Prime value and potential prime values.
D
Divisor used to test the current value of P.
Remarks:
No test is made to ensure that the input is greater than 3.
Example:
?
?
What is the first prime number after 789 What is the next prime number
Miscellaneous Programs and Equations 17–9
Keys:
Display:
Description:
(In ALG mode)
789 X P
Calculates next prime number
after 789.
Calculates next prime number
after 797.
ꢅ/ꢊ
ꢗꢙꢗ)ꢘꢘꢘꢘꢊ
ꢅ/ꢊ
g
ꢕꢘꢙ)ꢘꢘꢘꢘꢊ
17–10 Miscellaneous Programs and Equations
Part 3
Appendixes and Reference
A
Support, Batteries,
and Service
Calculator Support
You can obtain answers to questions about using your calculator from our
Calculator Support Department. Our experience shows that many customers have
similar questions about our products, so we have provided the following section,
"Answers to Common Questions." If you don't find an answer to your question,
contact the Calculator Support Department listed on page A–7.
Answers to Common Questions
?
Q: How can I determine if the calculator is operating properly
A: Refer to page A–5, which describes the diagnostic self–test.
Q: My numbers contain commas instead of periods as decimal points. How do I
?
restore the periods
A: Use the { } function (page 1–18).
)
?
Q: How do l change the number of decimal places in the display
A: Use the
menu (page 1–19).
?
Q: How do I clear all or portions of memory
A: { c displays the CLEAR menu, which allows you to clear all variables,
all programs (in program entry only), the statistics registers, or all of user memory
(not during program entry).
ꢈ
?
) mean
Q: What does an "E" in a number (for example,
–13
ꢋ)ꢖꢒ .ꢒꢓ
A: Exponent of ten; that is, 2.51 × 10
.
?
. What should I do
Q: The calculator has displayed the message
ꢇꢈꢇꢎꢁ& ꢑ"ꢂꢂ
Support, Batteries, and Service A–1
A: You must clear a portion of memory before proceeding. (See appendix B.)
Q: Why does calculating the sine (or tangent) of π radians display a very small
?
number instead of 0
A: π cannot be represented exactly with the 12–digit precision of the calculator.
?
Q: Why do I get incorrect answers when I use the trigonometric functions
A: You must make sure the calculator is using the correct angular mode (
{
}, {
}, or {
} ).
ꢌꢈꢆ ꢁꢀꢌ
ꢆꢁꢀꢌ
?
Q: What does an annunciator in the display mean
A: It indicates something about the status of the calculator. See "Annunciators" in
chapter 1.
?
Q: Numbers show up as fractions. How do I get decimal numbers
A: Press { .
Environmental Limits
To maintain product reliability, observe the following temperature and humidity
limits:
ꢀ
ꢀ
ꢀ
Operating temperature: 0 to 45 °C (32 to 113 °F).
°
Storage temperature: –20 to 65 C (–4 to 149 °F).
°
°
Operating and storage humidity: 90% relative humidity at 40 C (104 F)
maximum.
Changing the Batteries
The calculator is powered by two 3-volt lithium coin batteries, CR2032.
Replace the batteries as soon as possible when the low battery annunciator ( ¥ꢁ)
appears. If the battery annunciator is on, and the display dims, you may lose data.
If data is lost, the
message is displayed.
ꢇꢈꢇꢎꢁ& ꢃꢂꢈꢀꢁ
A–2
Support, Batteries, and Service
Once you've removed the batteries, replace them within 2 minutes to avoid losing
stored information. (Have the new batteries readily at hand before you open the
battery compartment.)
To install batteries:
1. Have two fresh button–cell batteries at hand. Avoid touching the battery
terminals — handle batteries only by their edges.
2. Make sure the calculator is OFF. Do not press ON ( ) again until
the entire battery–changing procedure is completed. If the
calculator is ON when the batteries are removed, the
contents of Continuous Memory will be erased.
3. Turn the calculator over and slide off the battery cover.
4. Never remove two old batteries at the same time, to prevent
memory lose. Remove one of the two batteries. Press down the holder. Push
the plate in the shown direction and lift it.
Support, Batteries, and Service A–3
Do not mutilate, puncture, or dispose of batteries
in fire. The batteries can burst or explode,
releasing hazardous chemicals.
Warning
5. Insert a new CR2032 lithium battery, making sure that the positive sign (+) is
facing outward. Replace the plate and push it into its original place.
6. Remove and insert the other battery as in step 4~5. Make sure that the positive
sign (+) on each battery is facing outward.
7. Replace the battery compartment cover.
8. Press .
Testing Calculator Operation
Use the following guidelines to determine if the calculator is working properly. Test
the calculator after every step to see if its operation has been restored. If your
calculator requires service, refer to page A–7.
ꢀ
The calculator won't turn on (steps 1–4) or doesn't respond
when you press the keys (steps 1–3):
1. Reset the calculator. Hold down the key and press ꢋ. It may be
necessary to repeat these reset keystrokes several times.
2. Erase memory. Press and hold down , then press and hold down both
ꢊ and ꢓ. Memory is cleared and the
displayed when you release all three keys.
message is
ꢇꢈꢇꢎꢁ& ꢃꢂꢈꢀꢁ
3. Remove the batteries (see "Changing the Batteries") and lightly press a
coin against both battery contacts in the calculator. Replace the batteries
and turn on the calculator. It should display
4. If the calculator still does not respond to keystrokes, use a thin, pointed
.
ꢇꢈꢇꢎꢁ& ꢃꢂꢈꢀꢁ
object to press the RESET hole. Stored data usually remain intact.
If these steps fail to restore calculator operation, it requires service.
A–4
Support, Batteries, and Service
ꢀ
If the calculator responds to keystrokes but you suspect
that it is malfunctioning:
1. Do the self–test described in the next section. If the calculator fails the self
test, it requires service.
2. If the calculator passes the self–test, you may have made a mistake
operating the calculator. Reread portions of the manual and check
"Answers to Common Questions" (page A–1).
3. Contact the Calculator Support Department listed on page A–7.
The Self–Test
If the display can be turned on, but the calculator does not seem to be operating
properly, do the following diagnostic self–test.
1. Hold down the key, then press ꢄ at the same time.
2. Press any key eight times and watch the various patterns displayed. After
you've pressed the key eight times, the calculator displays the copyright
©
message
and then the message
.
ꢊꢋꢘꢘꢓꢊꢍꢅꢊꢌꢈ#ꢊꢃꢎ)ꢊꢂ)ꢊꢅ)ꢊ
ꢚꢏꢌ ꢘꢒ
3. Starting from ꢊ and moving from left to right, press each key in the top row.
Then, moving left to right, press each key in the second row, the third row, and
so on, until you've pressed . Then, continue to press these keys in order:
C
.
ꢀ
If you press the keys in the proper order and they are functioning properly,
the calculator displays
followed by two–digit numbers. (The
ꢚꢏꢌ
calculator is counting the keys using hexadecimal base.)
If you press a key out of order, or if a key isn't functioning properly, the
next keystroke displays a fail message (see step 4).
ꢀ
4. The self–test produces one of these two results:
ꢀ
The calculator displays
The calculator displays
if it passed the self–test. Go to step 5.
followed by a one–digit number, if it
ꢓꢓ .ꢎꢚ
ꢀ
ꢓꢓ .ꢑꢀꢐꢂ
failed the self–test. If you received the message because you pressed a key
out of order, reset the calculator (hold down , press ꢋ ) and do the
self test again. If you pressed the keys in order, but got this message,
repeat the self–test to verify the results. If the calculator fails again, it
requires service (see page A–7). Include a copy of the fail message with
the calculator when you ship it for service.
5. To exit the self–test, reset the calculator (hold down and press ꢋ).
Pressing and ꢅ starts a continuous self–test that is used at the factory. You
can halt this factory test by pressing any key.
Support, Batteries, and Service A–5
Warranty
HP 33s Scientific Calculator; Warranty period: 12 months
1. HP warrants to you, the end-user customer, that HP hardware, accessories
and supplies will be free from defects in materials and workmanship after the
date of purchase, for the period specified above. If HP receives notice of such
defects during the warranty period, HP will, at its option, either repair or
replace products which prove to be defective. Replacement products may be
either new or like-new.
2. HP warrants to you that HP software will not fail to execute its programming
instructions after the date of purchase, for the period specified above, due to
defects in material and workmanship when properly installed and used. If HP
receives notice of such defects during the warranty period, HP will replace
software media which does not execute its programming instructions due to
such defects.
3. HP does not warrant that the operation of HP products will be uninterrupted or
error free. If HP is unable, within a reasonable time, to repair or replace any
product to a condition as warranted, you will be entitled to a refund of the
purchase price upon prompt return of the product.
4. HP products may contain remanufactured parts equivalent to new in
performance or may have been subject to incidental use.
5. Warranty does not apply to defects resulting from (a) improper or inadequate
maintenance or calibration, (b) software, interfacing, parts or supplies not
supplied by HP, (c) unauthorized modification or misuse, (d) operation outside
of the published environmental specifications for the product, or (e) improper
site preparation or maintenance.
6. HP MAKES NO OTHER EXPRESS WARRANTY OR CONDITION WHETHER
WRITTEN OR ORAL. TO THE EXTENT ALLOWED BY LOCAL LAW, ANY
IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY,
SATISFACTORY QUALITY, OR FITNESS FOR A PARTICULAR PURPOSE IS
LIMITED TO THE DURATION OF THE EXPRESS WARRANTY SET FORTH
ABOVE. Some countries, states or provinces do not allow limitations on the
duration of an implied warranty, so the above limitation or exclusion might
not apply to you. This warranty gives you specific legal rights and you might
also have other rights that vary from country to country, state to state, or
province to province.
A–6
Support, Batteries, and Service
7. TO THE EXTENT ALLOWED BY LOCAL LAW, THE REMEDIES IN THIS
WARRANTY STATEMENT ARE YOUR SOLE AND EXCLUSIVE REMEDIES.
EXCEPT AS INDICATED ABOVE, IN NO EVENT WILL HP OR ITS SUPPLIERS
BE LIABLE FOR LOSS OF DATA OR FOR DIRECT, SPECIAL, INCIDENTAL,
CONSEQUENTIAL (INCLUDING LOST PROFIT OR DATA), OR OTHER
DAMAGE, WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE.
Some countries, States or provinces do not allow the exclusion or limitation of
incidental or consequential damages, so the above limitation or exclusion
may not apply to you.
8. The only warranties for HP products and services are set forth in the express
warranty statements accompanying such products and services. Nothing
herein should be construed as constituting an additional warranty. HP shall not
be liable for technical and editorial errors or omissions contained herein.
FOR CONSUMER TRANSACTIONS IN AUSTRALIA AND NEW
ZEALAND: THE WARRANTY TERMS CONTAINED IN THIS
STATEMENT, EXCEPT TO THE EXTENT LAWFULLY PERMITTED, DO
NOT EXCLUDE, RESTRICT OR MODIFY AND ARE IN ADDITION TO
THE MANDATORY STATUTORY RIGHTS APPLICABLE TO THE SALE
OF THIS PRODUCT TO YOU.
Service
Europe
Country :
Telephone numbers
Austria
Belgium
+43-1-3602771203
+32-2-7126219
Denmark
Eastern Europe countries
Finland
+45-8-2332844
+420-5-41422523
+35-89640009
France
Germany
Greece
Holland
Italy
+33-1-49939006
+49-69-95307103
+420-5-41422523
+31-2-06545301
+39-02-75419782
Support, Batteries, and Service A–7
Norway
Portugal
Spain
+47-63849309
+351-229570200
+34-915-642095
Sweden
Switzerland
+46-851992065
+41-1-4395358 (German)
+41-22-8278780 (French)
+39-02-75419782 (Italian)
+420-5-41422523
+44-207-4580161
+420-5-41422523
+27-11-2376200
Turkey
UK
Czech Republic
South Africa
Luxembourg
+32-2-7126219
Other European countries +420-5-41422523
Asia Pacific
L.America
Country :
Telephone numbers
Australia
Singapore
+61-3-9841-5211
+61-3-9841-5211
Country :
Telephone numbers
Argentina
Brazil
0-810-555-5520
Sao Paulo 3747-7799; ROTC
0-800-157751
Mexico
Mx City 5258-9922; ROTC
01-800-472-6684
Venezuela
Chile
0800-4746-8368
800-360999
Columbia
Peru
9-800-114726
0-800-10111
Central America &
Caribbean
1-800-711-2884
Guatemala
Puerto Rico
Costa Rica
1-800-999-5105
1-877-232-0589
0-800-011-0524
A–8
Support, Batteries, and Service
N.America
Country :
Telephone numbers
USA
1800-HP INVENT
Canada
(905)206-4663 or
800-HP INVENT
ROTC = Rest of the country
Please logon to http://www.hp.com for the latest service and support
information.
Regulatory Information
This section contains information that shows how the HP 33s scientific calculator
complies with regulations in certain regions. Any modifications to the calculator
not expressly approved by Hewlett-Packard could void the authority to operate the
33s in these regions.
USA
This calculator generates, uses, and can radiate radio frequency energy and may
interfere with radio and television reception. The calculator complies with the limits
for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are
designed to provide reasonable protection against harmful interference in a
residential installation.
However, there is no guarantee that interference will not occur in a particular
installation. In the unlikely event that there is interference to radio or television
reception(which can be determined by turning the calculator off and on), the user
is encouraged to try to correct the interference by one or more of the following
measures:
ꢀ
ꢀ
Reorient or relocate the receiving antenna.
Relocate the calculator, with respect to the receiver.
Canada
This Class B digital apparatus complies with Canadian ICES-003.
Cet appareil numerique de la classe B est conforme a la norme NMB-003 du
Canada.
Support, Batteries, and Service A–9
Japan
この装置は、情報処理装置等電波障害自主規制協議会(VCCI)の基準
に基づく第二情報技術装置です。この装置は、家庭環境で使用することを目的としていま
すが、この装置がラジオやテレビジョン受信機に近接して使用されると、受信障害を引き
起こすことがあります。
取扱説明書に従って正しい取り扱いをしてください。
Noise Declaration. In the operator position under normal operation (per ISO
7779): LpA<70dB.
Disposal of Waste Equipment by Users in Private Household in
the European Union
This symbol on the product or on its packaging indicates that
this product must not be disposed of with your other household
waste. Instead, it is your responsibility to dispose of your waste
equipment by handing it over to a designated collection point
for the recycling of waste electrical and electronic equipment.
The separate collection and recycling of your waste equipment
at the time of disposal will help to conserve natural resources
and ensure that it is recycled in a manner that protects human health and the
environment. For more information about where you can drop off your waste
equipment for recycling, please contact your local city office, your household
waste disposal service or the shop where you purchased the product.
A–10 Support, Batteries, and Service
B
User Memory and the Stack
This appendix covers
ꢀ
ꢀ
ꢀ
ꢀ
The allocation and requirements of user memory,
How to reset the calculator without affecting memory,
How to clear (purge) all of user memory and reset the system defaults, and
Which operations affect stack lift.
Managing Calculator Memory
The HP 33s has 31KB of user memory available to you for any combination of
stored data (variables, equations, or program lines). SOLVE, FN, and statistical
³
calculations also require user memory. (The
"expensive" to run.)
FN operation is particularly
³
All of your stored data is preserved until you explicitly clear it. The message
means that there is currently not enough memory available for the
operation you just attempted. You need to clear some (or all) of user memory. For
instance, you can:
ꢇꢈꢇꢎꢁ& ꢑ"ꢂꢂ
ꢀ
ꢀ
ꢀ
Clear any or all equations (see "Editing and Clearing Equations" in chapter
6).
Clear any or all programs (see "Clearing One or More Programs" in chapter
12).
{
}
).
Clear all of user memory (press { c
ꢀꢂꢂ
To see how much memory is available, press { Y. The display shows the
number of bytes available.
To see the memory requirements of specific equations in the equation list:
1. Press | H to activate Equation mode. (
or the left end
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
of the current equation will be displayed.)
User Memory and the Stack
B–1
2. If necessary, scroll through the equation list (press or ) until you see
the desired equation.
3. Press | to see the checksum (hexadecimal) and length (in bytes) of
the equation. For example,
.
ꢃꢚ/ꢓꢕꢋꢈ ꢂꢄ/ꢔꢒ
To see the total memory requirements of specific programs:
1. Press { Y {
2. Scroll through the program list (press or until you see the desired
} to display the first label in the program list.
ꢅꢆꢇ
program label and size). For example,
3. Optional: Press | to see the checksum (hexadecimal) and length
.
ꢂꢏꢂ ꢑ ꢂꢄ/ꢖꢗ
(in bytes) of the program. For example,
for program F.
ꢃꢚ/ꢙꢃꢃꢙ ꢂꢄ/ꢖꢗ
To see the memory requirements of an equation in a program:
1. Display the program line containing the equation.
2. Press | to see the checksum and length. For example,
.
ꢃꢚ/ꢀꢏꢗꢒ ꢂꢄ/ꢒꢖ
To manually deallocate the memory allocated for a SOLVE or FN calculation
³
that has been interrupted, press | . This deallocation is done
automatically whenever you execute a program or another SOLVE or FN
³
calculation.
Resetting the Calculator
If the calculator doesn't respond to keystrokes or if it is otherwise behaving
unusually, attempt to reset it. Resetting the calculator halts the current calculation
and cancels program entry, digit entry, a running program, a SOLVE calculation,
an FN calculation, a VIEW display, or an INPUT display. Stored data usually
³
remain intact.
To reset the calculator, hold down the key and press ꢋ. If you are unable to
reset the calculator, try installing fresh batteries. If the calculator cannot be reset, or
if it still fails to operate properly, you should attempt to clear memory using the
special procedure described in the next section.
If the calculator still does not respond to keystrokes, use a thin, pointed object to
press the RESET hole.
The calculator can reset itself if it is dropped or if power is interrupted.
B–2
User Memory and the Stack
Clearing Memory
The usual way to clear user memory is to press { c {
there is also a more powerful clearing procedure that resets additional information
and is useful if the keyboard is not functioning properly.
}. However,
ꢀꢂꢂ
If the calculator fails to respond to keystrokes, and you are unable to restore
operation by resetting it or changing the batteries, try the following MEMORY
CLEAR procedure. These keystrokes clear all of memory, reset the calculator, and
restore all format and modes to their original, default settings (shown below):
1. Press and hold down the key.
2. Press and hold down ꢊ.
3. Press ꢓ. (You will be pressing three keys simultaneously). When you release
all three keys, the display shows
successful.
if the operation is
ꢇꢈꢇꢎꢁ& ꢃꢂꢈꢀꢁ
Category
Angular mode
CLEAR ALL
MEMORY CLEAR
(Default)
Unchanged
Unchanged
Unchanged
Unchanged
Unchanged
Unchanged
Unchanged
Unchanged
Unchanged
EQN LIST TOP
Cleared
Degrees
Decimal
Medium
Base mode
Contrast setting
Decimal point
Denominator (/c value)
Display format
Flags
Fraction–display mode
Random–number seed
Equation pointer
Equation list
" "
)
4095
FIX 4
Cleared
Off
Zero
EQN LIST TOP
Cleared
Null
FN = label
Null
Program pointer
Program memory
Stack lift
Stack registers
Variables
PRGM TOP
Cleared
Enabled
Cleared to zero
Cleared to zero
PRGM TOP
Cleared
Enabled
Cleared to zero
Cleared to zero
User Memory and the Stack
B–3
Memory may inadvertently be cleared if the calculator is dropped or if power is
interrupted.
The Status of Stack Lift
The four stack registers are always present, and the stack always has a stack–lift
status. That is to say, the stack lift is always enabled or disabled regarding its
behavior when the next number is placed in the X–register. (Refer to chapter 2,
"The Automatic Memory Stack.")
All functions except those in the following two lists will enable stack lift.
Disabling Operations
The four operations ENTER, Σ+, Σ–, and CLx disable stack lift. A number keyed in
after one of these disabling operations writes over the number currently in the
X–register. The Y–, Z– and T–registers remain unchanged.
In addition, when and b act like CLx, they also disable stack lift.
The INPUT function disables stack lift as it halts a program for prompting (so any
number you then enter writes over the X–register), but it enables stack lift when the
program resumes.
Neutral Operations
The following operations do not affect the status of stack lift:
B–4
User Memory and the Stack
DEG, RAD,
GRAD
FIX, SCI,
ENG, ALL
DEC, HEX,
OCT, BIN
CLVARS
PSE
SHOW
RADIX . RADIX , CLΣ
Y {
EQNꢁ
g and STOP and * and b*
}** Y {
}** V
V
label nnnn
#ꢀꢁ
ꢅꢆꢇ
FDISPꢁ
Errorsꢁ
e and program
entryꢁ
Switching
Digit entry
binary windows
¼
Except when used like CLx.
¼¼
Including all operations performed while the catalog is displayed except
{
} and {
} X, which enable stack lift.
#ꢀꢁ
ꢅꢆꢇ
User Memory and the Stack
B–5
The Status of the LAST X Register
The following operations save x in the LAST X register:
3
2
3
x
x
+, –, × , ÷
LN, LOG
, x ,
, x
e , 10
I/x, INT÷, Rmdr
x
y ,
x
X
x
y
SIN, COS, TAN
SINH, COSH, TANH
ASIN, ACOS, ATAN
ASINH, ACOSH, ATANH IP, FP, SGN, INTG,
RND, ABS
%, %CHG
Σ+, Σ–
RCL+, –, ×, ÷
,
,
DEG RAD
y,x θ,r
HR HMS
θ,r y, x
nCr
nPr
x!
CMPLX +/–
x
x
CMPLX +, –, × ,÷
CMPLX e , LN, y ,
1/x
CMPLX SIN, COS,
TAN
l, gal
°C, °F
cm, in
kg, lb
Notice that /c does not affect the LAST X register.
The recall–arithmetic sequence x h Ù variable stores a different value in the
LAST X register than the sequence x h variable Ù does. The former stores x
in LAST X; the latter stores the recalled number in LAST X.
B–6
User Memory and the Stack
C
ALG: Summary
About ALG
This appendix summarizes some features unique to ALG mode, including,
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Two–number arithmetic
Chain calculation
Reviewing the stack
Coordinate conversions
Operations with complex numbers
Integrating an equation
Arithmetic in bases 2, 8, and 16
Entering statistical two–variable data
Press | to set the calculator to ALG mode. When the calculator is in ALG
mode, the ALG annunciator is on.
In ALG mode, operations are performed in the following order.
1. Expression in parenthesis.
2. Function that require inputting values before pressing the function key, for
2
,
example, COS, SIN, TAN, ACOS, ASIN, ATAN, LOG, LN, x 1/x,
, π,
x
x
3
x
, X! , %, CMPLX, RND, RAND, IP, FP, INTG, SGN, ABS, e ,10 , unit
x
conversion.
y and y .
x
x
3.
4. nPr, nCr, %CHG.
5. ×, ÷, INT÷, Rmdr.
6. +, –.
ALG: Summary
C–1
Doing Two–number Arithmetic in ALG
This discussion of arithmetic using ALG replaces the following parts that are
affected by ALG mode. One-number functions (such as #) work the same in ALG
and RPN modes.
Two–number arithmetic operations are affected by ALG mode:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Simple arithmetic
Power functions (ꢄ, ꢇ)
Percentage calculations (Qꢁor | T)
Permutations and Combinations ({ \, { _)
Quotient and Remainder of Division ({ F, | D)
Simple Arithmetic
Here are some examples of simple arithmetic.
In ALG mode, you enter the first number, press the operator (, ꢀ, z, q),
enter the second number, and finally press the key.
To Calculate:
Press:
Display:
12워3
12 ꢁ3
ꢒꢋ-ꢓ/ꢊ
ꢒꢖ)ꢘꢘꢘꢘꢊ
ꢒꢋ.ꢓ/ꢊ
12 – 3
12 × 3
12 ÷ 3
12 ꢀ 3
12 z 3
12 q 3
ꢙ)ꢘꢘꢘꢘꢊ
ꢒꢋºꢓ/ꢊ
ꢓ )ꢘꢘꢘꢘꢊ
ꢒꢋªꢓ/ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
Power Functions
In ALG mode, to calculate a number y raised to a power x, key in y ꢄ x, then
press .
C–2
ALG: Summary
To Calculate:
Press:
Display:
123
12 ꢄ 3
ꢒꢋ:ꢓ/ꢊ
ꢒ8ꢗꢋꢕ)ꢘꢘꢘꢘꢊ
641/3 (cube root)
3 ꢇ 64
º
ꢓ
ꢔ/ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
Percentage Calculations
The Percent Function. The Q key divides a number by 100. Combined with
or ꢀ, it adds or subtracts percentages.
To Calculate:
Press:
Display:
27% of 200
200 z 27 Q
ꢋꢘꢘºꢋꢗ0/ꢊ
ꢖꢔ)ꢘꢘꢘꢘꢊ
ꢋꢘꢘ.ꢋꢗ0/ꢊ
ꢒꢔ )ꢘꢘꢘꢘꢊ
ꢋꢖ-ꢒꢋ0/ꢊ
ꢋꢕ)ꢘꢘꢘꢘꢊ
200 less 27%
200 ꢀ 27 Q
12% greater than 25
25 12 Q
ꢊ
To Calculate:
Press:
x% of y
y z x Q
y | T x
Percentage change from y to x. (y≠ 0)
Compare these keystrokes in RPN and ALG modes:
RPN Mode
ALG Mode
27% of 200
200 27 Q
200 z 27 Q
200 less 27%
200 27 Qꢁꢀ
200 ꢀ 27 Q
ALG: Summary
C–3
Example:
Suppose that the $15.76 item cost $16.12 last year. What is the percentage
?
change from last year's price to this year's
Keys:
Display:
Description:
16.12 | T
15.76
This year's price dropped
about 2.2% from last year's
price.
ꢊ
ꢒ )ꢒꢋ0ꢃꢍꢆꢒꢖ)ꢗ /ꢊ
.ꢋ)ꢋꢓꢓꢓꢊ
Permutations and Combinations
Example: Combinations of People.
A company employing 14 women and 10 men is forming a six–person safety
?
committee. How many different combinations of people are possible
Keys:
Display:
Description:
24 { \ 6
Total number of combinations
possible.
ꢋꢔQꢃT /ꢊ
ꢒꢓꢔ8ꢖꢙ )ꢘꢘꢘꢘ
Quotient and Remainder Of Division
You can use { F and | D to produce either the quotient or
remainder of division operations involving two integers.
Integer { F Integer .
1
2
Integer | D Integer .
1
2
Example:
To display the quotient and remainder produced by 58 ÷ 9
Keys:
Display:
Description:
58 { F 9
Displays the quotient.
ꢖꢕꢐꢄ!ªꢙ/ꢊ
)ꢘꢘꢘꢘꢊ
58 | D 9
Displays the remainder.
ꢖꢕꢁꢇꢌꢁꢙ/ꢊ
ꢔ)ꢘꢘꢘꢘꢊ
C–4
ALG: Summary
Parentheses Calculations
In ALG mode, you can use parentheses up to 13 levels. For example, suppose
you want to calculate:
30
× 9
85 −12
If you were to key in 30 ¯ 85 Ã, the calculator would calculate the
intermediate result, 0.3529. However, that’s not what you want. To delay the
division until you’ve subtracted 12 from 85, use parentheses:
Keys:
Display:
Description:
30 ¯ º y 85 Ã
No calculation is
done.
12 º |
¸ 9
Calculates 85 − 12.
Calculates 30/73.
_
Ï
Calculates 30/(85 −
12) × 9.
You can omit the multiplication sign (×) before a left parenthesis. Implied
multiplication is not available in Equation mode. For example, the expression 2 ×
(5 – 4) can be entered as 2 º y 5 Ã 4 º |, without the ¸ key
inserted between 2 and the left parenthesis.
Chain Calculations
To do a chain calculation, you don’t need to press Ï after each operation,
but only at the very end.
750×12
For instance, to calculate
you can enter either:
360
ALG: Summary
C–5
750 z 12 q 360
or
750 z 12 q 360
In the second case, the q key acts like the key by displaying the result of
750 × 12.
456− 75 68
×
Here’s a longer chain calculation:
18.5
1.9
This calculation can be written as: 456 ꢀ 75 q 18.5 z 68 q 1.9
. Watch what happens in the display as you key it in:
Keys:
Display:
456 ꢀ 75
ꢔꢖ .ꢗꢖ/ꢊ
ꢓꢕꢒ)ꢘꢘꢘꢘꢊ
q 18.5 z
68 q
ꢓꢕꢒªꢒꢕ)ꢖºꢊ
ꢋꢘ)ꢖꢙꢔ ꢊ
ꢓꢕꢒªꢒꢕ)ꢖº ꢕªꢊ
ꢒ8ꢔꢘꢘ)ꢔꢓꢋꢔꢊ
ꢓꢕꢒªꢒꢕ)ꢖº ꢕªꢒ)ꢙ/ꢊ
ꢗꢓꢗ)ꢘ ꢙꢗꢊ
1.9
ꢊ
Reviewing the Stack
The or |ꢁꢉ key produces a menu in the display— X1–, X2–, X3–,
X4–registers, to let you review the entire contents of the stack. The difference
between the and the | ꢉ key is the location of the underline in the
display. Pressing the | ꢉ displays the underline on the X4 register; pressing
the displays the underline on the X2 register.
Pressing displays the following menu:
%ꢒ %ꢋ %ꢓ %ꢔꢊ
value
Pressing | ꢉ displays the following menu:
%ꢒ %ꢋ %ꢓ %ꢔꢊ
value
C–6
ALG: Summary
You can press or (or ꢁand | ꢉ) to review the entire contents
of the stack and recall them.
However, in normal operation in ALG mode, the stack in ALG mode differs from
the one in RPN mode. (Because when you press , the result is not placed
into X1, X2 etc.) Only after evaluating equations, programs, or integrating
equations, the values of the four registers will be the same as in RPN mode.
Coordinate Conversions
To convert between rectangular and polar coordinates:
1. Enter the coordinates (in rectangular or polar form) that you want to convert. In
ALG mode, the order is y [ x or θ [ r.
2. Execute the conversion you want: press { r (rectangular–to–polar) or
| s (polar–to–rectangular). The converted coordinates occupy the X–
and Y–registers.
3. The resulting display (the X–register) shows either r (polar result) or x
(rectangular result). Press to see θ or y.
Example:
?
If x = 5, y = 30, what are r, θ
Keys:
Display:
Description:
{
}
Sets Degrees mode.
Calculates hypotenuse (r).
ꢌꢈꢆ
ꢊ
´
30 [ 5 { r
θ
ꢓꢘ8ꢖ 8Tꢊ
T/ꢓꢘ)ꢔꢒꢓꢕꢊ
´
θ
Displays θ.
ꢓꢘ8ꢖ 8Tꢊ
θ
/ꢕꢘ)ꢖꢓꢗꢗꢊ
?
If r = 25, θ = 56, what are x, y
Keys:
Display:
Description:
{
}
Sets Degrees mode.
Calculates x.
ꢌꢈꢆ
ꢊ
´
56 [ 25 | s
ꢖ 8ꢋꢖ ¸8ºꢊ
%/ꢒꢓ)ꢙꢗꢙꢕꢊ
ALG: Summary
C–7
´
Displays y.
ꢖ 8ꢋꢖ ¸8ºꢊ
&/ꢋꢘ)ꢗꢋꢖꢙꢊ
If you want to perform a coordinate conversion as part of a chain calculation, you
need to use parentheses to impose the required order of operations.
Example:
2
3
π
?
If r = 4.5, θ =
, what are x, y
Keys:
Display:
Description:
{
}
Sets Radians mode.
Use parentheses to impose
the required order of
operations.
ꢁꢀꢌ
ꢊ
| ] 2 q 3 z
| N | `
ꢊ
π
1ꢋªꢓº 2ꢊ
ꢋ)ꢘꢙꢔꢔꢊ
[ 4.5 | sꢁ
Calculates x.
ꢋ)ꢘꢙꢔꢓꢙꢖꢒꢘꢋꢓꢙ8ꢔ)
%/.ꢋ)ꢋꢖꢘꢘꢊ
Displays y.
ꢋ)ꢘꢙꢔꢓꢙꢖꢒꢘꢋꢓꢙ8ꢔ)
&/ꢓ)ꢕꢙꢗꢒꢊ
Integrating an Equation
1. Key in an equation. (see "Entering Equations into the Equation List" in chapter
6) and leave Equation mode.
2. Enter the limits of integration: key in the lower limit and press [, then key
in the upper limit.
3. Display the equation: Press | H and, if necessary, scroll through the
equation list (press or ) to display the desired equation.
4. Select the variable of integration: Press | ꢎ variable. This starts the
calculation.
C–8
ALG: Summary
Operations with Complex Numbers
To enter a complex number웛
x + iy.
1. Type the real part, x, then the function key.
ꢁ
2. Type the imaginary part, y, then press { G.
ꢁ
Fox example, to do 2 + i 4, press 2 4 { G.
To view the result of complex operations웛
After keying in the complex number, press to calculate. Then the real
portion of the result is displayed; press to view the imaginary portion.
Complex Operations
Use the complex operations as you do real operations, but follow the imaginary
ꢁ
part with { G.
To do an operation with one complex number:
1. Enter the complex number z. (Use parentheses for z if the real part exists).
2. Select the complex function.
3. Press to calculate.
To do an arithmetic operation with two complex numbers:
1. Enter the first complex number, z . (Use parentheses for z if the real part
1
exists).
2. Select the arithmetic operation.
3. Enter the second complex number, z . (Use parentheses for z if the real part
2
exists).
4. Press to calculate.
Here are some examples with complex numbers:
ALG: Summary
C–9
Examples:
Evaluate sin (2워3i )
Keys:
Display:
Description:
ꢁ
ꢁ
|ꢁ] 2 3 {
Gꢁ|ꢁ`
ꢊ
워
1ꢋ ꢓL2ꢊ
ꢁꢈ/ꢋ)ꢘꢘꢘꢘꢊ
Oꢁ
ꢁ
워
ꢐꢄ1ꢋ ꢓL2ꢊ
ꢁꢈ/ꢙ)ꢒꢖꢔꢖꢊ
워
Result is 9.1545 – i 4.1689
ꢐꢄ1ꢋ ꢓL2ꢊ
ꢐꢇ/.ꢔ)ꢒ ꢕꢙꢊ
Examples:
Evaluate the expression
z
÷ (z + z ),
1
2
3
where z = 23 + i 13, z = –2 + i z = 4 – i 3
1
2
3
Keys:
Display:
Description:
| ] 23 ꢁ13
{ G | `
Real part of result.
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
q | ] 2 ^
1 { G 4
ꢁ
ꢀ 3 { G
| `
워
1ꢋꢓ ꢒꢓL2ª1.ꢋ-ꢒꢊ
ꢁꢈ/ꢋ)ꢖꢘꢘꢘꢊ
ꢁ
워
Result is
2.5000 + i 9.0000
1ꢋꢓ ꢒꢓL2ª1.ꢋ-ꢒꢊ
ꢐꢇ/ꢙ)ꢘꢘꢘꢘꢊ
C–10 ALG: Summary
Examples:
- -
Evaluate (4 i 2/5)(3 i 2/3)
Keys:
Display:
Description:
ºy 4 Ã Ë 2
Ë 5 ¹cº
|ºy 3 Ã Ë
2 Ë 3 ¹c
º|Ï
Real part of result.
Ø
Result is
11.7333 – i 3.8667
Arithmetic in Bases 2, 8, and 16
In ALG mode, if the current expression in the first line does not fit in the display,
the rightmost digits are replaced with an ellipsis ( ) to indicate it is too long to
be displayed.
Here are some examples of arithmetic in Hexadecimal, Octal, and Binary
modes:
Example:
?
12F + E9A
16
=
16
Keys:
¹ ¶{
Display:
Description:
}
Sets base 16; HEX
annunciator on.
Result.
12F ÙE9A Ï
?
7760 – 4326 =
8
8
¹ ¶{
}
Sets base 8: OCT
annunciator on.
7760 Ã 4326 Ï
Converts displayed number
to octal.
ALG: Summary C–11
?
100 ÷ 5 =
8
8
100 ¯ 5 Ï
Integer part of result.
?
5A0 + 10011000 =
16
2
¹ ¶{
} 5A0
Set base 16; HEX
Ù
annunciator on.
¹ ¶{
}
Changes to base 2; BIN
10011000
annunciator on.
_
Ï
... Result in binary base.
¹ ¶{
¹ ¶{
}
}
... Result in hexadecimal
base.
Restores decimal base.
Entering Statistical Two–Variable Data
In ALG mode, remember to enter an (x, y) pair in reverse order (y w x) so
that y ends up in the Y–register and X in the X–register.
1. Press ¹¡{Σ} to clear existing statistical data.
2. Key in the y–value first and press w.
3. Key in the corresponding x–value and press /.
4. The display shows n, the number of statistical data pairs you have
accumulated.
5. Continue entering x, y–pairs. n is updated with each entry.
Example:
Key in the x, y–values on the left, these make the corrections shown on the right:
Initial x, y
Corrected x, y
20, 4
20, 5
40, 6
400, 6
C–12 ALG: Summary
Keys:
Display:
Description:
{ c { }
Clears existing statistical data.
Enters the first new data pair.
´
ꢊ
4 [ 20 ꢓ
6 [ 400 ꢓ
{
ꢋꢘ8ꢔꢊ
Q/ꢒ)ꢘꢘꢘꢘꢊ
ꢔꢘꢘ8 ꢊ
Display shows n, the number of
data pairs you entered.
Brings back last x–value. Last y is
still in Y–register.
Q/ꢋ)ꢘꢘꢘꢘꢊ
ꢂꢀ !ºꢊ
ꢔꢘꢘ)ꢘꢘꢘꢘꢊ
ꢔꢘꢘ8 ꢊ
{ ꢔ
Deletes the last data pair.
Q/ꢒ)ꢘꢘꢘꢘꢊ
ꢔꢘ8 ꢊ
6 [ 40 ꢓ
4 [ 20 { ꢔ
5 [ 20 ꢓ
Reenters the last data pair.
Deletes the first data pair.
Q/ꢋ)ꢘꢘꢘꢘꢊ
ꢋꢘ8ꢔꢊ
Q/ꢒ)ꢘꢘꢘꢘꢊ
ꢋꢘ8ꢖꢊ
Reenters the first data pair. There
is still a total of two data pairs in
the statistics registers.
Q/ꢋ)ꢘꢘꢘꢘꢊ
ALG: Summary C–13
D
More about Solving
This appendix provides information about the SOLVE operation beyond that given
in chapter 7.
How SOLVE Finds a Root
SOLVE first attempts to solve the equation directly for the unknown variable. If the
attempt fails, SOLVE changes to an iterative(repetitive) procedure. The iterative
operation is to execute repetitively the specified equation. The value returned by
the equation is a function f(x) of the unknown variable x. (f(x) is mathematical
shorthand for a function defined in terms of the unknown variable x.) SOLVE starts
with an estimate for the unknown variable, x, and refines that estimate with each
successive execution of the function, f(x).
If any two successive estimates of the function f(x) have opposite signs, then SOLVE
presumes that the function f(x) crosses the x–axis in at least one place between the
two estimates. This interval is systematically narrowed until a root is found.
For SOLVE to find a root, the root has to exist within the range of numbers of the
calculator, and the function must be mathematically defined where the iterative
search occurs. SOLVE always finds a root, provided one exists (within the overflow
bounds), if one or more of these conditions are met:
ꢀ
Two estimates yield f(x) values with opposite signs, and the function's graph
crosses the x–axis in at least one place between those estimates (figure a,
below).
ꢀ
ꢀ
f(x) always increases or always decreases as x increases (figure b, below).
The graph of f(x) is either concave everywhere or convex everywhere (figure
c, below).
ꢀ
If f(x) has one or more local minima or minima, each occurs singly between
adjacent roots of f(x) (figure d, below).
More about Solving
D–1
f (x)
f (x)
x
x
b
a
f (x)
f (x)
x
x
d
c
Function Whose Roots Can Be Found
In most situations, the calculated root is an accurate estimate of the theoretical,
infinitely precise root of the equation. An "ideal" solution is one for which f(x) = 0.
However, a very small non–zero value for f(x) is often acceptable because it might
result from approximating numbers with limited (12–digit) precision.
D–2
More about Solving
Interpreting Results
The SOLVE operation will produce a solution under either of the following
conditions:
ꢀ
ꢀ
If it finds an estimate for which f(x) equals zero. (See figure a, below.)
If it finds an estimate where f(x) is not equal to zero, but the calculated root is
a 12–digit number adjacent to the place where the function's graph crosses
the x–axis (see figure b, below). This occurs when the two final estimates are
neighbors (that is, they differ by 1 in the 12th digit), and the function's value
is positive for one estimate and negative for the other. Or they are (0,
–499
10
–499
) or (0, –10
). In most cases, f(x) will be relatively close to zero.
f (x)
f (x)
x
x
a
b
Cases Where a Root Is Found
To obtain additional information about the result, press see the previous
estimate of the root (x), which was left in the Y–register. Press again to see the
value of f(x), which was left in the Z–register. If f(x) equals zero or is relatively small,
it is very likely that a solution has been found. However, if f(x) is relatively large,
you must use caution in interpreting the results.
Example: An Equation With One Root.
Find the root of the equation:
3
2
–2x + 4x – 6x + 8 = 0
Enter the equation as an expression:
More about Solving
D–3
Keys:
Display:
Description:
| H
Select Equation mode.
Enters the equation.
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
ꢊ
2 ^ꢁzꢁ
L X ꢄ 3
ꢁ4 zꢁ
L X ꢄꢁ2
ꢀ 6 zꢁLꢁXꢁ
8
|
.ꢋº%:ꢓ-ꢔº%:ꢋ. ºꢊ
Checksum and length.
ꢃꢚ/ꢏꢙꢀꢌꢊ
ꢂꢄ/ꢒꢕꢊ
ꢊ
Cancels Equation mode.
Now, solve the equation to find the root:
Keys:
Display:
Description:
0 I X 10
| H
_
Initial guesses for the root.
Selects Equation mode;
displays the left end of the
equation.
ꢒꢘ
.ꢋº%:ꢓ-ꢔº%:ꢋ. ºꢊ
X
Solves for X; displays the
result.
ꢎꢂ#ꢐꢄꢆꢊ
%/ꢊ
ꢒ) ꢖꢘ ꢊ
ꢒ) ꢖꢘ ꢊ
Final two estimates are the
same to four decimal places.
f(x) is very small, so the
ꢈ
.ꢔ)ꢘꢘꢘꢘ .ꢒꢒꢊ
approximation is a good root.
Example: An Equation with Two Roots.
Find the two roots of the parabolic equation:
2
x + x – 6 = 0.
Enter the equation as an expression:
Keys:
Display:
Description:
| H
Selects Equation mode.
Enters the equation.
ꢊ
ꢊ
L X ꢄ 2
L X ꢀ 6
%:ꢋ-%. ꢊ
D–4
More about Solving
|
Checksum and length.
ꢃꢚ/ꢓꢙꢗꢒꢊ
ꢂꢄ/ꢗꢊ
ꢊ
Cancels Equation mode.
Now, solve the equation to find its positive and negative roots:
Keys:
Display:
Description:
0 I X 10
_
Your initial guesses for the
positive root.
ꢒꢘ
| H
Selects Equation mode; displays
the equation.
%:ꢋ-%. ꢊ
X
Calculates the positive root
using guesses 0 and 10.
ꢎꢂ#ꢐꢄꢆꢊ
%/ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
ꢋ)ꢘꢘꢘꢘꢊ
Final two estimates are the
same.
|
f(x) = 0.
Your initial guesses for the
negative root.
ꢘ)ꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢊ
0 I X 10 ^
_
.ꢒꢘ ꢊ
| H
Redisplays the equation.
Calculates negative root using
guesses 0 and –10.
%:ꢋ-%. ꢊ
ꢎꢂ#ꢐꢄꢆꢊ
%/ꢊ
X
.ꢓ)ꢘꢘꢘꢘꢊ
ꢘ)ꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢊ
|
f(x) = 0.
Certain cases require special consideration:
ꢀ
If the function's graph has a discontinuity that crosses the x–axis, then the
SOLVE operation returns a value adjacent to the discontinuity (see figure a,
below). In this case, f(x) may be relatively large.
ꢀ
Values of f(x) may be approaching infinity at the location where the graph
changes sign (see figure b, below). This situation is called a pole. Since the
SOLVE operation determines that there is a sign change between two
neighboring values of x, it returns the possible root. However, the value for f(x)
will be relatively large. If the pole occurs at a value of x that is exactly
represented with 12 digits, then that value would cause the calculation to halt
with an error message.
More about Solving
D–5
f (x)
f (x)
x
x
a
b
Special Case: A Discontinuity and a Pole
Example: Discontinuous Function.
Find the root of the equation:
IP(x) = 1.5
Enter the equation:
Keys:
Display:
Description:
| H
Selects Equation mode.
Enter the equation.
ꢊ
ꢊ
ꢊ
| " L X |
` | 1.5
ꢐꢅ1%2/ꢒ)ꢖꢊ
ꢃꢚ/ꢌꢋꢃꢒꢊ
ꢂꢄ/ꢙꢊ
|
Checksum and length.
Cancels Equation mode.
ꢊ
Now, solve to find the root:
Keys:
Display:
Description:
0 I X
5
| H
Your initial guesses for the root.
ꢊ
_
ꢖ ꢊ
Selects Equation mode; displays
the equation.
ꢐꢅ1%2/ꢒ)ꢖꢊ
D–6
More about Solving
X
Finds a root with guesses 0 and
5.
ꢎꢂ#ꢐꢄꢆꢊ
%/ꢊ
ꢋ)ꢘꢘꢘꢘꢊ
|
|
Shows root, to 11 decimal
places.
The previous estimate is slightly
bigger.
ꢒ)ꢙꢙꢙꢙꢙꢙꢙꢙꢙꢙꢙꢊ
ꢋ)ꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢊ
f(x) is relatively large.
.ꢘ)ꢖꢘꢘꢘꢊ
Note the difference between the last two estimates, as well as the relatively large
value for f(x). The problem is that there is no value of x for which f(x) equals zero.
However, at x = 1.99999999999, there is a neighboring value of x that yields
ant opposite sign for f(x).
Example:
Find the root of the equation
x
−1= 0
x2 − 6
As x approaches
Enter the equation as an expression.
Keys: Display:
, f(x) becomes a very large positive or negative number.
6
Description:
| H
Selects Equation mode.
Enters the equation.
ꢊ
L X qꢁ
| ] L X
ꢄ 2 ꢀ 6
| ` ꢀ 1
ꢊ
ꢊ
ꢊ
ꢊ
%ª1%:ꢋ. 2.ꢒꢊ
ꢃꢚ/ꢗꢓꢖꢕꢊ
ꢂꢄ/ꢒꢒꢊ
|
Checksum and length.
Cancels Equation mode.
ꢊ
More about Solving
D–7
Now, solve to find the root.
Keys:
Display:
Description:
2.3 I X
2.7
| H
Your initial guesses for the
root.
Selects Equation mode;
displays the equation.
No root found for f(x).
f(x) is relatively large.
ꢊ
_
ꢋ)ꢗ ꢊ
%ª1%:ꢋ. 2.ꢒꢊ
X
ꢄꢎꢊꢁꢎꢎ!ꢊꢑꢄꢌꢊ
ꢕꢒ8 ꢔꢙ8 ꢖꢕ8ꢘꢙꢋ)ꢘ
When SOLVE Cannot Find a Root
Sometimes SOLVE fails to find a root. The following conditions cause the message
:
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌ
ꢀ
The search terminates near a local minimum or maximum (see figure a,
below). If the ending value of f(x) (stored in the Z–register) is relatively close
to zero, it is possible that a root has been found; the number stored in the
unknown variable might be a 12–digit number very close to a theoretical
root.
ꢀ
ꢀ
The search halts because SOLVE is working on a horizontal asymptote—an
area where f(x) is essentially constant for a wide range of x (see figure b,
below). The ending value of f(x) is the value of the potential asymptote.
The search is concentrated in a local "flat" region of the function (see figure c,
below). The ending value of f(x) is the value of the function in this region.
D–8
More about Solving
f (x)
f (x)
x
x
b
a
f (x)
x
c
Case Where No Root Is Found
Example: A Relative Minimum.
Calculate the root of this parabolic equation:
2
x – 6x + 13 = 0.
It has a minimum at x = 3.
Enter the equation as an expression:
Keys:
Display:
Description:
| H
Selects Equation mode.
Enters the equation.
ꢊ
L X ꢄ 2
ꢀ 6 z L X
13
ꢊ
ꢊ
%:ꢋ. º%-ꢒꢓꢊ
ꢃꢚ/ꢈꢃꢗꢔ
ꢂꢄ/ꢒꢘꢊ
|
Checksum and length.
More about Solving
D–9
Cancels Equation mode.
ꢊ
Now, solve to find the root:
Keys:
Display:
Description:
0 I X
10
| H
Your initial guesses for the root.
ꢊ
_
ꢒꢘ ꢊ
Selects Equation mode; displays
the equation.
Search fails with guesses 0 and
10
%:ꢋ. º%-ꢒꢓꢊ
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌꢊ
X
b |
|
Displays the final estimate of x.
Previous estimate was not the
same.
ꢋ)ꢙꢙꢙꢙꢙꢙꢕꢔꢖꢙ ꢊ
ꢋ)ꢙꢙꢙꢙꢙꢙꢕꢔꢖꢙꢔꢊ
Final value for f(x) is relatively
large.
ꢔ)ꢘꢘꢘꢘꢊ
Example: An Asymptote.
Find the root of the equation
1
10 − = 0
X
Enter the equation as an expression.
Keys: Display:
Description:
| H
Selects Equation mode.
Enters the equation.
ꢊ
10 ꢀ ꢅ L X
| `
| ꢁ
ꢊ
ꢒꢘ.ꢐꢄ#1%2ꢊ
Checksum and length.
ꢃꢚ/ ꢈꢀꢏꢊ
ꢂꢄ/ꢙꢊ
ꢁ
Cancels Equation mode.
Your positive guesses for the
root.
Selects Equation mode; displays
the equation.
ꢊ
ꢊ
.005 I X
5ꢁ
| H
_
ꢖ ꢊ
ꢒꢘ.ꢐꢄ#1%2ꢊ
X
Solves for x using guesses
0.005 and 5.
%/ꢊ
ꢘ)ꢒꢘꢘꢘꢊ
D–10 More about Solving
Previous estimate is the same.
f (x) = 0
ꢘ)ꢒꢘꢘꢘꢊ
|
ꢘ)ꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢘꢊ
Watch what happens when you use negative values for guesses:
Keys:
Display:
Description:
1 ^ I X
Your negative guesses for the
root.
.ꢒ)ꢘꢘꢘꢘꢊ
2 ^ | H
Selects Equation mode; displays
the equation.
ꢒꢘ.ꢐꢄ#1%2ꢊ
X
Solves for X; displays the result.
%/ꢊ
ꢘ)ꢒꢘꢘꢘꢊ
Example: Find the root of the equation.
[x ÷ (x + 0.3)]− 0.5 = 0
Enter the equation as an expression:
Keys: Display:
Description:
| H
Selects Equation mode.
Enters the equation.
ꢊ
# L X q |
] L X 3
| ` | ` ꢀ
5
ꢊ
ꢊ
ꢊ
ꢉꢁ!1%ª1%-ꢘ)ꢓ22
|
Checksum and length.
ꢃꢚ/ꢙꢑꢓꢏꢊ
ꢂꢄ/ꢒꢙꢊ
ꢊ
Cancels Equation mode.
First attempt to find a positive root:
Keys: Display:
0 I X
Description:
Your positive guesses for the
root.
Selects Equation mode; displays
the left end of the equation.
Calculates the root using
guesses 0 and 10.
ꢊ
10
| H
_
ꢒꢘ ꢊ
ꢉꢁ!1%ª1%-ꢘ)ꢓ22
X
%/ꢊ
ꢘ)ꢒꢘꢘꢘꢊ
More about Solving D–11
Now attempt to find a negative root by entering guesses 0 and –10. Notice that
the function is undefined for values of x between 0 and –0.3 since those values
produce a positive denominator but a negative numerator, causing a negative
square root.
Keys:
0 I X
10 ^
| H
Display:
Description:
ꢊ
_
.ꢒꢘ ꢊ
Selects Equation mode;
displays the left end of the
equation.
ꢉꢁ!1%ª1%-ꢘ)ꢓ22ꢊ
X
No root found for f(x).
Clears error message; cancels
Equation mode.
ꢄꢎꢊꢁꢎꢎ!ꢊꢑꢄꢌꢊ
ꢊ
| X
Displays the final estimate of
x.
%/ꢊ
ꢘ)ꢘꢘꢘꢘꢊ
Example: A Local "Flat" Region.
Find the root of the function
f(x) = x + 2 if x < –1,
f(x) = 1 for –1 ≤ x ≤ 1 (a local flat region),
f(x) = –x + 2 if x >1.
In RPN mode, enter the function as the program:
ꢛꢘꢘꢘꢒ ꢂꢏꢂ ꢛꢊ
ꢛꢘꢘꢘꢋ ꢒꢊ
ꢛꢘꢘꢘꢓ ꢈꢄ!ꢈꢁꢊ
ꢛꢘꢘꢘꢔ ꢋꢊ
ꢛꢘꢘꢘꢖ ꢁꢃꢂ- %ꢊ
ꢛꢘꢘꢘ º6¸@ꢊ
ꢛꢘꢘꢘꢗ ꢁ!ꢄꢊ
ꢛꢘꢘꢘꢕ ꢔꢊ
ꢛꢘꢘꢘꢙ .ꢊ
ꢛꢘꢘꢒꢘ -+.ꢊ
ꢛꢘꢘꢒꢒ º5¸@ꢊ
D–12 More about Solving
¶
ꢛꢘꢘꢒꢋ ꢁ
ꢊ
ꢛꢘꢘꢒꢓ ꢁ!ꢄꢊ
Checksum and length: B956 75
You can subsequently delete line J0003 to save memory.
–8
–8
Solve for X using initial guesses of 10 and –10
.
Keys:
Display:
Description:
(In RPN mode)
a 8 ^ I X
1 ^ a 8 ^
| W J
Enters guesses.
ꢊ
ꢈ
_
.ꢒ .ꢕ ꢊ
ꢈ
Selects program "J" as the
function.
.ꢒ)ꢘꢘꢘꢘ .ꢕꢊ
X
Solves for X; displays the result.
%/ꢊ
.ꢋ)ꢘꢘꢘꢘꢊ
Round–Off Error
The limited (12–digit) precision of the calculator can cause errors due to rounding
off, which adversely affect the iterative solutions of SOLVE and integration. For
example,
[( x +1) +1015]2 -1030 = 0
has no roots because f(x) is always greater than zero. However, given initial
guesses of 1 and 2, SOLVE returns the answer 1.0000 due to round–off error.
Round–off error can also cause SOLVE to fail to find a root. The equation
x2 - 7 = 0
has a root at
. However, no 12–digit number exactly equals
, so the
7
7
calculator can never make the function equal to zero. Furthermore, the function
never changes sign SOLVE returns the message
estimate of x (press b to see it) is the best possible 12–digit approximation of
. However, the final
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌ
the root when the routine quits.
More about Solving D–13
Underflow
Underflow occurs when the magnitude of a number is smaller than the calculator
can represent, so it substitutes zero. This can affect SOLVE results. For example,
consider the equation
1
x2
whose root is infinite in value. Because of underflow, SOLVE returns a very large
value as a root. (The calculator cannot represent infinity, anyway.)
D–14 More about Solving
E
More about Integration
This appendix provides information about integration beyond that given in chapter
8.
How the Integral Is Evaluated
The algorithm used by the integration operation,
, calculates the integral
ꢑꢄ Gº
³
of a function f(x) by computing a weighted average of the function's values at
many values of x (known as sample points) within the interval of integration. The
accuracy of the result of any such sampling process depends on the number of
sample points considered: generally, the more sample points, the greater the
accuracy. If f(x) could be evaluated at an infinite number of sample points, the
algorithm could — neglecting the limitation imposed by the inaccuracy in the
calculated function f(x) — always provide an exact answer.
Evaluating the function at an infinite number of sample points would take forever.
However, this is not necessary since the maximum accuracy of the calculated
integral is limited by the accuracy of the calculated function values. Using only a
finite number of sample points, the algorithm can calculate an integral that is as
accurate as is justified considering the inherent uncertainty in f(x).
The integration algorithm at first considers only a few sample points, yielding
relatively inaccurate approximations. If these approximations are not yet as
accurate as the accuracy of f(x) would permit, the algorithm is iterated (repeated)
with a larger number of sample points. These iterations continue, using about twice
as many sample points each time, until the resulting approximation is as accurate
as is justified considering the inherent uncertainty in f(x).
More about Integration
E–1
As explained in chapter 8, the uncertainty of the final approximation is a number
derived from the display format, which specifies the uncertainty for the function. At
the end of each iteration, the algorithm compares the approximation calculated
during that iteration with the approximations calculated during two previous
iterations. If the difference between any of these three approximations and the
other two is less than the uncertainty tolerable in the final approximation, the
calculation ends, leaving the current approximation in the X–register and its
uncertainty in the Y–register.
It is extremely unlikely that the errors in each of three successive approximations —
that is, the differences between the actual integral and the approximations —
would all be larger than the disparity among the approximations themselves.
Consequently, the error in the final approximation will be less than its uncertainty
(provided that f(x) does not vary rapidly). Although we can't know the error in the
final approximation, the error is extremely unlikely to exceed the displayed
uncertainty of the approximation. In other words, the uncertainty estimate in the
Y–register is an almost certain "upper bound" on the difference between the
approximation and the actual integral.
Conditions That Could Cause Incorrect Results
Although the integration algorithm in the HP 33s is one of the best available, in
certain situations it — like all other algorithms for numerical integration — might
give you an incorrect answer. The possibility of this occurring is extremely remote.
The algorithm has been designed to give accurate results with almost any smooth
function. Only for functions that exhibit extremely erratic behavior is there any
substantial risk of obtaining an inaccurate answer. Such functions rarely occur in
problems related to actual physical situations; when they do, they usually can be
recognized and dealt with in a straightforward manner.
Unfortunately, since all that the algorithm knows about f(x) are its values at the
sample points, it cannot distinguish between f(x) and any other function that agrees
with f(x) at all the sample points. This situation is depicted below, showing (over a
portion of the interval of integration) three functions whose graphs include the
many sample points in common.
E–2
More about Integration
f (x)
x
With this number of sample points, the algorithm will calculate the same
approximation for the integral of any of the functions shown. The actual integrals
of the functions shown with solid blue and black lines are about the same, so the
approximation will be fairly accurate if f(x) is one of these functions. However, the
actual integral of the function shown with a dashed line is quite different from those
of the others, so the current approximation will be rather inaccurate if f(x) is this
function.
The algorithm comes to know the general behavior of the function by sampling the
function at more and more points. If a fluctuation of the function in one region is
not unlike the behavior over the rest of the interval of integration, at some iteration
the algorithm will likely detect the fluctuation. When this happens, the number of
sample points is increased until successive iterations yield approximations that
take into account the presence of the most rapid, but characteristic, fluctuations.
For example, consider the approximation of
∞ xe−xdx.
³
0
Since you're evaluating this integral numerically, you might think that you should
499
represent the upper limit of integration as 10
number you can key into the calculator.
, which is virtually the largest
–x
Try it and see what happens. Enter the function f(x) = xe .
More about Integration
E–3
Keys:
Display:
Description:
| H
Select equation mode.
Enter the equation.
End of the equation.
ꢊ
L X z ꢊ
ꢀ L X | `
%ºꢈ%ꢅ1¾ꢊ
ꢊ
%ºꢈ%ꢅ1.%2ꢊ
ꢃꢚ/ꢌꢑꢒꢗꢊ
ꢂꢄ/ꢙꢊ
|
Checksum and length.
Cancels Equation mode.
ꢊ
Set the display format to SCI 3, specify the lower and upper limits of integration as
499
zero and 100
, than start the integration.
Keys:
Display:
Description:
{
} 3
Specifies accuracy level
and limits of integration.
Selects Equation mode;
displays the equation.
Approximation of the
integral.
ꢃꢐ
ꢊ
ꢈ
0 a 499
| H
_
ꢒ ꢔꢙꢙ ꢊ
%ºꢈ%ꢅ1.%2ꢊ
| ꢎ X
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢈ
ꢘ)ꢘꢘꢘ ꢘꢊ
The answer returned by the calculator is clearly incorrect, since the actual integral
–x
of f(x) = xe from zero to
is exactly 1. But the problem is not that
was
499
∞
∞
499
represented by 10
, since the actual integral of this function from zero to 10
is very close to 1. The reason for the incorrect answer becomes apparent from the
graph of f(x) over the interval of integration.
E–4
More about Integration
f (x)
x
The graph is a spike very close to the origin. Because no sample point happened
to discover the spike, the algorithm assumed that f(x) was identically equal to zero
throughout the interval of integration. Even if you increased the number of sample
points by calculating the integral in SCI 11 or ALL format, none of the additional
sample points would discover the spike when this particular function is integrated
over this particular interval. (For better approaches to problems such as this, see
the next topic, "Conditions That Prolong Calculation Time.")
Fortunately, functions exhibiting such aberrations (a fluctuation that is
uncharacteristic of the behavior of the function elsewhere) are unusual enough that
you are unlikely to have to integrate one unknowingly. A function that could lead
to incorrect results can be identified in simple terms by how rapidly it and its
low–order derivatives vary across the interval of integration. Basically, the more
rapid the variation in the function or its derivatives, and the lower the order of such
rapidly varying derivatives, the less quickly will the calculation finish, and the less
reliable will be the resulting approximation.
More about Integration
E–5
Note that the rapidity of variation in the function (or its low–order derivatives) must
be determined with respect to the width of the interval of integration. With a given
number of sample points, a function f(x) that has three fluctuations can be better
characterized by its samples when these variations are spread out over most of the
interval of integration than if they are confined to only a small fraction of the
interval. (These two situations are shown in the following two illustrations.)
Considering the variations or fluctuation as a type of oscillation in the function, the
criterion of interest is the ratio of the period of the oscillations to the width of the
interval of integration: the larger this ratio, the more quickly the calculation will
finish, and the more reliable will be the resulting approximation.
f (x)
Calculated integral
of this function
will be accurate.
x
a
b
f (x)
Calculated integral
of this function
may be inaccurate.
x
a
b
E–6
More about Integration
In many cases you will be familiar enough with the function you want to integrate
that you will know whether the function has any quick wiggles relative to the
interval of integration. If you're not familiar with the function, and you suspect that
it may cause problems, you can quickly plot a few points by evaluating the
function using the equation or program you wrote for that purpose.
If, for any reason, after obtaining an approximation to an integral, you suspect its
validity, there's a simple procedure to verify it: subdivide the interval of integration
into two or more adjacent subintervals, integrate the function over each subinterval,
then add the resulting approximations. This causes the function to be sampled at a
brand new set of sample points, thereby more likely revealing any previously
hidden spikes. If the initial approximation was valid, it will equal the sum of the
approximations over the subintervals.
Conditions That Prolong Calculation Time
In the preceding example, the algorithm gave an incorrect answer because it
never detected the spike in the function. This happened because the variation in
the function was too quick relative to the width of the interval of integration. If the
width of the interval were smaller, you would get the correct answer; but it would
take a very long time if the interval were still too wide.
Consider an integral where the interval of integration is wide enough to require
excessive calculation time, but not so wide that it would be calculated incorrectly.
–x
Note that because f(x) = xe approaches zero very quickly as x approaches
,
∞
the contribution to the integral of the function at large values of x is negligible.
Therefore, you can evaluate the integral by replacing
499
, the upper limit of
∞
3
integration, by a number not so large as 10
— say 10 .
Rerun the previous integration problem with this new limit of integration:
Keys:
Display:
Description:
New upper limit.
Selects Equation mode; displays
the equation.
ꢈ
0 a 3
| H
_
ꢒ ꢓ ꢊ
%ºꢈ%ꢅ1.%2ꢊ
| ꢎ X
Integral. (The calculation takes a
minute or two.)
ꢐꢄ!ꢈꢆꢁꢀ!ꢐꢄꢆꢊ
/ꢊ
³
ꢈ
ꢒ)ꢘꢘꢘ ꢘꢊ
More about Integration
E–7
ꢈ
[
Uncertainty of approximation.
ꢒ)ꢘꢘꢘ .ꢓꢊ
This is the correct answer, but it took a very long time. To understand why,
3
compare the graph of the function between x = 0 and x = 10 , which looks about
the same as that shown in the previous example, with the graph of the function
between x = 0 and x = 10:
f (x)
x
0
10
You can see that this function is "interesting" only at small values of x. At greater
values of x, the function is not interesting, since it decreases smoothly and
gradually in a predictable manner.
The algorithm samples the function with higher densities of sample points until the
disparity between successive approximations becomes sufficiently small. For a
narrow interval in an area where the function is interesting, it takes less time to
reach this critical density.
To achieve the same density of sample points, the total number of sample points
required over the larger interval is much greater than the number required over the
smaller interval. Consequently, several more iterations are required over the larger
interval to achieve an approximation with the same accuracy, and therefore
calculating the integral requires considerably more time.
E–8
More about Integration
Because the calculation time depends on how soon a certain density of sample
points is achieved in the region where the function is interesting, the calculation of
the integral of any function will be prolonged if the interval of integration includes
mostly regions where the function is not interesting. Fortunately, if you must
calculate such an integral, you can modify the problem so that the calculation time
is considerably reduced. Two such techniques are subdividing the interval of
integration and transformation of variables. These methods enable you to change
the function or the limits of integration so that the integrand is better behaved over
the interval(s) of integration.
More about Integration
E–9
F
Messages
The calculator responds to certain conditions or keystrokes by displaying a
message. The ¤ symbol comes on to call your attention to the message. For
significant conditions, the message remains until you clear it. Pressing or b
clears the message; pressing any other key clears the message and executes that
key's function.
A running program attempted to select a program
ꢑꢄ ꢀꢃ!ꢐ#ꢈ
³
label (
label) while an integration calculation was
ꢑꢄ/
running.
A running program attempted to integrate a program (
1
ꢑꢄ2
³
³
³
variable) while another integration calculation
was running.
ꢑꢄ G
³
A running program attempted to solve a program while
an integration calculation was running.
1 ꢎꢂ#ꢈ2
The catalog of variables ( { Y {
indicates no values stored.
} )
ꢀꢂꢂ #ꢀꢁ /ꢘ
#ꢀꢁ
The calculator is executing a function that might take a
while.
Allows you to verily clearing the equation you are
editing. (Occurs only in Equation–entry mode.)
Allows you to verify clearing all programs in memory.
(Occurs only in Program–entry mode.)
Attempted to divide by zero. (Includes T if
Y–register contains zero.)
Attempted to enter a program label that already exists
for another program routine.
Indicates the "top" of equation memory. The memory
ꢃꢀꢂꢃ"ꢂꢀ!ꢐꢄꢆꢊ
ꢃꢂꢁ ꢈꢉꢄ@ & ꢄ
ꢃꢂꢁ ꢅꢆꢇ @ & ꢄ
ꢌꢐ#ꢐꢌꢈ ꢏ& ꢘ
ꢌ"ꢅꢂꢐꢃꢀ!)ꢂꢏꢂꢊ
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
scheme is circular, so
"equation" after the last equation in equation memory.
is also the
ꢈꢉꢄ ꢂꢐ ! !ꢎꢅ
Messages
F–1
The calculator is calculating the integral of an equation
or program. This might take a while.
A running SOLVE or FN operation was interrupted
∫
by pressing Å or ¥.
Data error:
ꢀ
ꢀ
Attempted to calculate combinations or
permutations with r >n, with non–integer r or n, or
16
with n ≥10
.
Attempted to use a trigonometric or hyperbolic
function with an illegal argument:
°
ꢀ
ꢀ
ꢀ
ꢀ
q with x an odd multiple of 90 .
l or i with x < –1 or x > 1.
: o with x ≤ –1; or x ≥ 1.
: l with x < 1.
A syntax error in the equation was detected during
equation evaluation, SOLVE, or FN.
∫
Attempted to enter an invalid variable name when
solving an equation.
Attempted a factorial or gamma operation with x as a
negative integer.
Exponentiation error:
th
ꢀ
ꢀ
ꢀ
Attempted to raise 0 to the 0 power or to a
negative power.
Attempted to raise a negative number to a
non–integer power.
Attempted to raise complex number (0 + i 0) to a
number with a negative real part.
Attempted an operation with an indirect address, but
i ≥ 34
).
Attempted to take a logarithm of zero or (0 + i0).
the number in the index register is invalid (
0 ≤ i < 1
or
Attempted to take a logarithm of a negative number.
All of user memory has been erased (see page B–3).
The calculator has insufficient memory available to do
the operation (See appendix B).
The condition checked by a test instruction is not true.
(Occurs only when executed from the keyboard.)
F–2
Messages
Attempted to refer to a nonexistent program label (or
ꢄꢎꢄꢈ%ꢐ !ꢈꢄ!ꢊ
line number) with V,V , X, or { }.
ꢑꢄ
Note that the error
can mean
ꢄꢎꢄꢈ%ꢐ !ꢈꢄ!
ꢀ
you explicitly (from the keyboard) called a program
label that does not exist; or
ꢀ
the program that you called referred to another
label, which does not exist.
The catalog of programs ( { Y {
indicates no program labels stored.
} )
ꢄꢎ ꢂꢀꢏꢈꢂ ꢊ
ꢅꢆꢇ
SOLVE cannot find the root of the equation using the
current initial guesses (see page D–8). A SOLVE
operation executed in a program does not produce this
error; the same condition causes it instead to skip the
next program line (the line following the instruction
ꢄꢎ ꢁꢎꢎ! ꢑꢄꢌꢊ
variable).
ꢎꢂ#ꢈ
Warning (displayed momentarily); the magnitude of a
result is too large for the calculator to handle. The
calculator returns 9.99999999999E499 in the
current display format. (See "Range of Numbers and
Overflow" on page 1–16.) This condition sets flag 6. If
flag 5 is set, overflow has the added effect of halting a
running program and leaving the message in the
display until you press a key.
ꢎ#ꢈꢁꢑꢂꢎ$ꢊ
Indicates the "top" of program memory. The memory
ꢅꢁꢆꢇ !ꢎꢅꢊ
scheme is circular, so
is also the "line"
ꢅꢁꢆꢇ !ꢎꢅ
after the last line in program memory.
Attempted to execute
variable without a selected program label. This can
variable or
d
ꢈꢂꢈꢃ! ꢑꢄꢊ
ꢎꢂ#ꢈ
ꢑꢄ
³
happen only the first time that you use SOLVE or FN
³
after the message
if the current label no longer exists.
, or it can happen
ꢇꢈꢇꢎꢁ& ꢃꢂꢈꢀꢁ
A running program attempted to select a program
ꢎꢂ#ꢈ ꢀꢃ!ꢐ#ꢈꢊ
ꢎꢂ#ꢈ1 ꢎꢂ#ꢈ2ꢊ
label (
running.
label) while a SOLVE operation was
ꢑꢄ/
A running program attempted to solve a program while
a SOLVE operation was running.
A running program attempted to integrate a program
while a SOLVE operation was running.
ꢎꢂ#ꢈ1 ꢑꢄ2ꢊ
³
Messages
F–3
The calculator is solving an equation or program for its
root. This might take a while.
ꢎꢂ#ꢐꢄꢆꢊ
Attempted to calculate the square root of a negative
number.
Statistics error:
ꢉꢁ!1ꢄꢈꢆ2ꢊ
!ꢀ! ꢈꢁꢁꢎꢁꢊ
ꢀ
ꢀ
Attempted to do a statistics calculation with n = 0.
ˆ
y , m, r, or b
Attempted to calculate s s ,
with n = 1.
,
ˆ
x
x
y
ꢀ
ꢀ
Attempted to calculate r,
only (all y–values equal to zero).
or xw with x–data
ˆ
x
ˆ
y, r, m, or b with all
Attempted to calculate
x–values equal.
,
ˆ
x
The magnitude of the number is too large to be
converted to HEX, OCT, or BIN base; the number must
be in the range
!ꢎꢎ ꢏꢐꢆꢊ
%ꢈꢉ ꢎ#ꢈꢁꢑꢂꢎ$ꢊ
&ꢈ ꢊ
–34,359,738,368 ≤ n ≤34,359,738,367.
A running program attempted an eighth nested
label. (Up to seven subroutines can be nested.) Since
%ꢈꢉ
SOLVE and FN each uses a level, they can also
³
generate this error.
The condition checked by a test instruction is true.
(Occurs only when executed from the keyboard.)
Self–Test Messages:
The self–test and the keyboard test passed.
The self–test or the keyboard test failed, and
the calculator requires service.
ꢓꢓ .ꢎꢚꢊ
n
ꢓꢓ .ꢑꢀꢐꢂ
ꢊ
©
Copyright message displayed after
successfully completing the self–test.
ꢊꢋꢘꢘꢓꢊꢍꢅꢊꢌꢈ#ꢊꢃꢎ)ꢊꢂ)ꢊꢅ)
F–4
Messages
G
Operation Index
This section is a quick reference for all functions and operations and their formulas,
where appropriate. The listing is in alphabetical order by the function's name. This
name is the one used in program lines. For example, the function named FIX n is
executed as
{
} n.
ꢑꢐ%
Nonprogrammable functions have their names in key boxes. For example, b.
Non–letter and Greek characters are alphabetized before all the letters; function
names preceded by arrows (for example, DEG) are alphabetized as if the arrow
were not there.
¼
The last column, marked , refers to notes at the end of the table.
Name
Keys and Description
Page
¼
+/–
^ Changes the sign of a
1–14
1
number.
+
–
Addition. Returns y + x.
ꢀ Subtraction. Returns y – x.
z Multiplication. Returns y × x.
q Division. Returns y ÷ x.
1–17
1–17
1–17
1–17
6–15
1
1
1
1
2
×
÷
^
ꢄ Power. Indicates an
exponent.
b
Deletes the last digit keyed in;
clears x; clears a menu; erases last
function keyed in an equation;
starts equation editing; deletes a
program step.
1–4
1–9
6–3
12–6
Operation Index
G–1
Name
Keys and Description
Page
¼
Displays previous entry in catalog;
moves to previous equation in
equation list; moves program
pointer to previous step.
1–24
6–3
12–9
12–18
Displays next entry in catalog;
moves to next equation in
equation list; moves program
pointer to next line (during
program entry); executes the
current program line (not during
program entry).
1–24
6–3
12–9
12–18
or ꢁ
Scrolls the display to show more
digits to the left and right; displays
the rest of an equation or binary
number; goes the next menu page
in the CONST and SUMS menus.
1–11
6–4
10–6
{ꢁjꢁ
{ꢁhꢁ
:ꢁ
Goes to the top line of the
equation or program list.
6–3
6–3
6–5
Goes to the last line of the
equation or program list.ꢁ
§ Separates the two arguments
2
of a function.
1/x
ꢅ Reciprocal.
1–17
4–2
1
1
x
10
{ ꢃ Common exponential.
Returns 10 raised to the × power.
%
Q Percent.
Returns (y × x) ÷ 100.
4–6
4–6
4–3
1
1
1
%CHG
| T Percent change.
Returns (x – y)(100 ÷ y).
π
| N Returns the
approximation 3.14159265359
(12 digits).
G–2
Operation Index
Name
Keys and Description
Page
¼
Σ+
Σ–
Σx
ꢓ Accumulates (y, x) into
statistics registers.
11–2
{ ꢔ Removes (y, x) from
statistics registers.
11–2
11–10
11–10
| ꢕ {
}
1
1
;º
Returns the sum of x–values.
ꢋ
2
Σx
| ꢕ {
}
;º
Returns the sum of squares of
x–values.
Σxy
| ꢕ {
}
11–10
1
;º¸
Returns the sum of products of
x–and y–values.
Σy
| ꢕ {
}
11–10
11–10
1
1
;¸
Returns the sum of y–values.
Σy2
| ꢕ {
}
ꢋ
;¸
Returns the sum of squares of
y–values.
σx
| ꢗ {σ }
Returns population standard
deviation of x–values:
11–6
11–6
4–9
1
º
(x − x)2 ÷ n
¦
i
σy
| ꢗ {σ }
1
¸
Returns population standard
deviation of y–values:
(y − y)2 ÷ n
¦
i
θ, r y,x
| sꢁ
Polar to rectangular coordinates.
Converts (r, θ) to (x, y).
Operation Index
G–3
Name
Keys and Description
Page
¼
FN d variable
| ꢎ {
_} variable
8–2
14–7
ꢑꢄ G
³
³
Integrates the displayed equation
or the program selected by FN=,
using lower limit of the variable of
integration in the Y–register and
upper limit of the variable of
integration in the X–register.
(
| ] Open parenthesis.
Starts a quantity associated with a
function in an equation.
6–6
6–6
2
2
)
| ` Close parenthesis.
Ends a quantity associated with a
function in an equation.
A through Z
ABS
L variable or I variable
Value of named variable.
6–4
4–16
4–4
2
1
1
1
{ B Absolute value.
x
Returns
.
ACOS
{ P Arc cosine.
–1
Returns cos x.
ACOSH
{ ꢍ { Pꢁ
Hyperbolic arc cosine.
4–6
–1
Returns cosh
x.
|
Activates Algebraic mode.ꢁ
1–10
6–15
ALOG
{ ꢃ Common exponential.
Returns 10 raised to the specified
power (antilogarithm).
2
1
ALL
{
}
1–20
4–4
ꢀꢂꢂ
Selects display of all significant
digits.
ASIN
{ M Arc sine
Returns sin
–1
x.
G–4
Operation Index
Name
Keys and Description
Page
¼
ASINH
{ ꢍ { Mꢁ
Hyperbolic arc sine.
4–6
1
–1
Returns sinh
x.
ATAN
{ S Arc tangent.
4–4
4–6
1
1
–1
Returns tan
x.
ATANH
{ ꢍ { S
Hyperbolic arc tangent.
–1
Returns tanh
x.
b
|
{ }
11–10
1
E
Returns the y–intercept of the
regression line:
y
– m
.
x
{ x
BIN
Displays the base–conversion
menu.
10–1
10–1
{ x {
}
ꢏꢐꢄ
Selects Binary (base 2) mode.
Turns on calculator; clears x;
clears messages and prompts;
cancels menus; cancels catalogs;
cancels equation entry; cancels
program entry; halts execution of
an equation; halts a running
program.
1–1
1–4
1–9
1–24
6–3
12–6
12–17
/c
| Denominator.
5–5
Sets denominator limit for
displayed fractions to x. If x = 1,
displays current /c value.
°C
{ Converts ° F to ° C.
{ $ Cube of argument.ꢁ
{ @ Cube root of argument.
4–13
6–15
6–15
13–11
1
2
2
CB
CBRT
CF n
| y { } n
ꢃꢑ
Clears flag n (n = 0 through 11).
Operation Index
G–5
Name
Keys and Description
Page
¼
{ c
Displays menu to clear numbers or
parts of memory; clears indicated
variable or program from a MEM
catalog; clears displayed
equation.
1–6
1–24
{ c {
{ c {
{ c {
CLΣ
}
}
}
Clears all stored data, equations,
and programs.
1–24
12–20
12–6
11–11
3–4
ꢀꢂꢂ
ꢅꢆꢇ
ꢈꢉꢄ
Clears all programs (calculator in
Program mode).
Clears the displayed equation
(calculator in Program mode).
{ c { }
´
Clears statistics registers.
CLVARS
{ c {
}
#ꢀꢁ
Clears all variables to zero.
CLx
{ c { }
Clears x (the X-register) to zero.
2–2
2–6
º
12–6
CM
{ Converts inches to
centimeters.
4–13
1
{ G
Displays the CMPLX_ prefix for
complex functions.
9–2
CMPLX +/–
{ G ^ Complex
9–2
change sign.
Returns –(z + i z ).
x
y
CMPLX +
CMPLX –
{ G Complex
9–2
9–2
addition. Returns (z + i z ) +
1x 1y
(z + i z ).
2x 2y
{ G ꢀ Complex
subtraction.
Returns (z + i z ) – (z + i
1x 1y 2x
z ).
2y
G–6
Operation Index
Name
CMPLX ×
Keys and Description
Page
¼
{ G z Complex
9–2
multiplication.
Returns (z + i z ) × (z + i
1x 1y 2x
z ).
2y
CMPLX ÷
{ G q Complex
9–2
division. Returns (z + i z ) ÷
1x 1y
(z + i z ).
2x 2y
CMPLX1/x
{ G ꢅ Complex
reciprocal. Returns 1/(z + i z ).
9–2
9–2
x
y
CMPLXCOS
{ G R Complex
cosine.
Returns cos (z + i z ).
x
y
x
CMPLXe
{ G ꢊ
Complex natural exponential.
9–2
9–2
+ izy )
e(z
{ G ꢋ
x
Returns
.
CMPLXLN
Complex natural log.
Returns log (z + i z ).
e
x
y
CMPLXSIN
CMPLXTAN
{ G O Complex sine.
Returns sin (z + i z ).
9–2
9–2
x
y
{ G U Complex
tangent.
Returns tan (z + i z ).
x
y
x
CMPLXy
9–2
{ G ꢄ Complex
power.
+ iz2y
)
Returns (z1x + iz1y)(z
.
2x
Cn,r
{ \ Combinations of n
items taken r at a time.
Returns n! ÷ (r! (n – r)!).
4–14
4–3
2
1
COS
R Cosine.
Returns cos x.
Operation Index G–7
Name
Keys and Description
Page
¼
COSH
{ ꢍ R Hyperbolic
4–6
1
cosine. Returns cosh x.
|
DEC
Functions to use 40 physics
4–8
10–1
4–4
constants.
ꢊ
{ x {
}
ꢌꢈꢃ
Selects Decimal mode.
DEG
{
}
ꢌꢈꢆ
Selects Degrees angular mode.
DEG
{ v Radians to degrees.
Returns (360/2π) x.
4–13
1–19
13–18
1
Displays menu to set the display
format.
DSE variable
| m variable
Decrement, Skip if Equal or less.
For control number ccccccc.fffii
stored in a variable, subtracts ii
(increment value) from ccccccc
(counter value) and, if the result
≤fff (final value), skips the next
program line.
a
Begins entry of exponents and
adds "E" to the number being
entered. Indicates that a power of
10 follows.
1–14
1–20
1–20
1
ENG n
{
} n
ꢈꢄꢆ
Selects Engineering display with n
digits following the first digit (n =
0 through 11).
Cꢁand
| A
Causes the exponent display for
the number being displayed to
change in multiple of 3.ꢁ
G–8
Operation Index
Name
Keys and Description
Page
¼
Separates two numbers keyed in
sequentially; completes equation
entry; evaluates the displayed
equation (and stores result if
appropriate).
1–17
6–4
6–11
ENTER
2–5
Copies x into the Y–register, lifts y
into the Z–register, lifts z into the
T–register, and loses t.
| H
Activates or cancels (toggles)
Equation–entry mode.
6–3
12–6
x
e
ꢊ Natural exponential.
Returns e raised to the x power.
4–1
1
2
EXP
ꢊ Natural exponential.
Returns e raised to the specified
power.
6–15
°F
| Converts °C to °F.
4–13
5–1
1
{
Turns on and off Fraction–display
mode.
FIX n
{
} n
1–19
ꢑꢐ%
Selects Fixed display with n
decimal places: 0 ≤ n ≤ 11.
| y
Displays the menu to set, clear,
and test flags.
13–11
FN = label
| W label
Selects labeled program as the
current function (used by SOLVE
14–1
14–7
and FN).
³
FP
| ? Fractional part of x.
4–16
1
Operation Index
G–9
Name
Keys and Description
Page
¼
?
FS n
| y {
} n
13–11
ꢑ @
If flag n (n = 0 through 11) is set,
executes the next program line; if
flag n is clear, skips the next
program line.
GAL
| Converts liters to
gallons.
4–13
4–4
1
GRAD
{
}
ꢆꢁꢀꢌ
Sets Grads angular mode.
GTO label
{ V label
13–4
Sets the program pointer to the
beginning of program label in
program memory.
13–17
{ V label
nnnn
Sets program pointer to line nnnn
of program label.
12–19
12–19
10–1
{ V
Sets program pointer to PRGM
TOP.
HEX
{ x {
}
ꢍꢈ%
Selects Hexadecimal (base 16)
mode.
{ ꢍ
Displays the HYP_ prefix for
hyperbolic functions.
4–6
HMS
| uꢁ
4–12
1
1
Hours to hours, minutes, seconds.
Converts x from a decimal fraction
to hours–minutes–seconds format.
HR
{ tꢁ
Hours, minutes, seconds to hours.
Converts x from
hours–minutes–seconds format to
a decimal fraction.
4–12
6–4
i
L i or I i
2
Value of variable i.
G–10 Operation Index
Name
Keys and Description
Page
¼
(i)
L I
6–4
2
Indirect. Value of variable whose
letter corresponds to the numeric
value stored in variable i.
13–21
IN
| Converts centimeters to
inches.
4–13
6–15
1
2
IDIV
{ F Produces the quotient
of a division operation involving
two integers.ꢁ
INT÷
INTG
{ F Produces the quotient
of a division operation involving
two integers.ꢁ
4–2
4–16
12–11
1
1
| K Obtains the greatest
integer equal to or less than given
number.ꢁ
INPUT variable
{ variable
Recalls the variable to the
X–register, displays the variable's
name and value, and halts
program execution. Pressing g
(to resume program execution) or
(to execute the current
program line) stores your input in
the variable. (Used only in
programs.)
INV
ꢅ Reciprocal of argument.
6–15
4–16
2
1
IP
| " Integer part of x.
ISG variable
{ l variable
13–18
Increment, Skip if Greater.
For control number ccccccc.fffii
stored in variable, adds ii
(increment value) to ccccccc
(counter value) and, if the result >
fff (final value), skips the next
program line.
Operation Index G–11
Name
Keys and Description
Page
¼
KG
L
{ } Converts pounds to
kilograms.
4–13
1
{ Converts gallons to
liters.
4–13
2–7
1
LASTx
{ ꢁ
Returns number stored in the LAST
X register.
LB
| ~ꢁ
Converts kilograms to pounds.
4–13
12–3
1
LBL label
{ label
Labels a program with a single
letter for reference by the XEQ,
GTO, or FN= operations. (Used
only in programs.)
LN
ꢋ Natural logarithm.
4–1
4–1
1
1
Returns log x.
e
LOG
|
m
{ ꢌ Common logarithm.
Returns log x.
10
Displays menu for linear
regression.
11–4
11–7
|
{ }
1
P
Returns the slope of the regression
line: [Σ(x –x )(y – )]÷Σ(x –x )
2
y
i
j
i
{ Y
Displays the amount of available
memory and the catalog menu.
1–24
{ Y {
{ Y {
}
}
Begins catalog of programs.
Begins catalog of variables.
12–20
3–3
ꢅꢆꢇ
#ꢀꢁ
Displays menu to set angular
modes and the radix ( or ).
1–18
4–4
)
8
n
{ ꢕ { }
Returns the number of sets of data
points.
11–10
1
Q
G–12 Operation Index
Name
Keys and Description
Page
¼
OCT
{ x {
}
10–1
ꢎꢃ!
Selects Octal (base 8) mode.
|
Turns the calculator off.
1–1
Pn,r
{ _ Permutations of n items
taken r at a time. Returns n!÷(n –
r)!.
4–14
2
{ e
Activates or cancels (toggles)
Program–entry mode.
12–5
PSE
| f Pause.
12–16
12–17
Halts program execution briefly to
display x, variable, or equation,
then resumes. (Used only in
programs.)
r
|
{ } Returns the
correlation coefficient between the
11–7
1
T
x– and y–values:
(xi − x)(yi − y)
¦
(x − x)2 ×(y − y)2
¦
i
i
RAD
{
}
4–4
4–13
1–18
ꢁꢀꢌ
Selects Radians angular mode.
RAD
| w Degrees to radians.
Returns (2π/360) x.
1
RADIX ,
{ }
8
Selects the comma as the radix
mark (decimal point).
RADIX .
{ }
Selects the period as the radix
mark (decimal point).
1–18
4–14
)
RANDOM
| k Executes the
RANDOM function. Returns a
random number in the range 0
through 1.
1
Operation Index G–13
Name
RCL variable
Keys and Description
L variable
Page
¼
3–5
Recall.
Copies variable into the
X–register.
RCL+ variable
RCL– variable
RCLx variable
RCL÷ variable
RMDR
L variable
Returns x + variable.
3–5
3–5
L ꢀ variable.
Returns x – variable.
L z variable.
Returns x × variable.
3–5
L qꢁvariable.
Returns x ÷ variable.
3–5
| D Produces the
remainder of a division operation
involving two integers.ꢁ
6–15
2
1
RND
{ J Round.
4–16
5–7
Rounds x to n decimal places in
FIX n display mode; to n + 1
significant digits in SCI n or ENG
n display mode; or to decimal
number closest to displayed
fraction in Fraction–display mode.
{ ¦
Activates Reverse Polish notation.
1–10
RTN
| Return.
12–3
13–2
Marks the end of a program; the
program pointer returns to the top
or to the calling routine.
¶
R
Roll down.
2–3
C–6
Moves t to the Z–register, z to the
Y–register, y to the X–register, and
x to the T–register in RPN mode.
Displays the X1~X4 menu to
review the stack in ALG mode.
G–14 Operation Index
Name
Keys and Description
| ꢉ Roll up.
Moves t to the X–register, z to the
T–register, y to the Z–register, and
x to the Y–register in RPN mode.
Page
¼
µ
R
2–3
C–6
Displays the X1~X4 menu to
review the stack in ALG mode.
| ꢗ
Displays the standard–deviation
Menu.
11–4
1–19
SCI n
{
} n
ꢃꢐ
Selects Scientific display with n
decimal places. (n = 0 through
11.)
SEED
| i Restarts the
4–14
random–number sequence with
x
the seed
.
SF n
{ y { } n
Sets flag n (n = 0 through 11).
13–11
4–16
ꢑ
SGN
| E Indicates the sign of x.
1
|
Shows the full mantissa (all 12
digits) of x (or the number in the
current program line); displays
hex checksum and decimal byte
length for equations and
programs.
6–18
12–21
SIN
O Sine.
Returns sin x.
4–3
4–6
1
1
SINH
{ ꢍ O Hyperbolic sine.
Returns sinh x.
SOLVE variable
variable
7–1
Solves the displayed equation or
the program selected by FN=,
using initial estimates in variable
and x.
14–1
Operation Index G–15
Name
Keys and Description
Page
¼
p
g Inserts a blank space
13–14
2
character during equation entry.
SQ
! Square of argument.
6–15
6–15
3–2
2
2
SQRT
# Square root of x.
STO variable
STO + variable
STO – variable
STO × variable
STO ÷ variable
STOP
I variable
Store. Copies x into variable.
I variable
Stores variable + x into variable.
3–4
3–4
I ꢀ variable
Stores variable – x into variable.
I z variable
Stores variable × x into variable.
3–4
I q variable
Stores variable ÷ x into variable.
3–4
g Run/stop.
12–17
Begins program execution at the
current program line; stops a
running program and displays the
X–register.
| ꢕ
Displays the summation menu.
11–4
11–6
sx
| ꢗ {
}
1
1
Uº
Returns sample standard deviation
of x–values:
(x − x)2 ÷ (n −1)
¦
i
sy
| ꢗ {
Returns sample standard deviation
}
11–6
U¸
of y–values:
(yi − y)2 ÷ (n −1)
¦
G–16 Operation Index
Name
Keys and Description
Page
¼
TAN
U Tangent. Returns tan x.
4–3
4–6
1
1
TANH
{ ꢍ U Hyperbolic
tangent.
Returns tanh x.
VIEW variable
| variable
3–3
Displays the labeled contents of
variable without recalling the
value to the stack.
12–13
X
Evaluates the displayed equation.
6–12
13–2
XEQ label
X label
Executes the program identified
by label.
2
x
! Square of x.
4–2
4–2
4–2
4–2
4–2
1
1
1
1
1
3
x
{ $ Cube of x.
# Square root of x.
{ @ Cube root of x.ꢁ
x
3
x
th
X
ꢇ The x root of y.
y
| ꢖ {
}
11–4
1
x
º
Returns the mean of x values:
Σ x ÷ n.
i
|
Given a y–value in the X–register,
returns the x–estimate based on
{ ˆ }
11–10
1
ˆ
x
º
the regression line:
m.
= (y – b) ÷
ˆ
x
x!
{ ꢆ Factorial (or gamma).
Returns (x)(x – 1) ... (2)(1), or Γ (x
+ 1).
4–14
6–15
1
2
XROOT
ꢇ The argument root of
1
argument .
2
Operation Index G–17
Name
Keys and Description
Page
¼
w
Returns weighted mean of x
11–4
1
x
values: (Σy x ) ÷ Σy .
i i
i
| ꢖ
x<> variable
x<>y
Displays the mean (arithmetic
average) menu.
11–4
3–6
| Z x exchange.
Exchanges x with a variable.
[ x exchange y.
Moves x to the Y–register and y to
the X–register.
2–4
?
{ n
Displays the "x y" comparison
tests menu.
13–7
13–7
x≠y
{ n {≠}
If x≠y, executes next program line;
if x=y, skips next program line.
?
x≤y
x<y
x>y
{ n {≤}
If x≤y, executes next program line;
if x>y, skips next program line.
13–7
13–7
13–7
13–7
13–7
13–7
?
?
{ n {<}
If x<y, executes next program line;
if x≥y, skips next program line.
{ n {>}
If x>y, executes next program line;
if x≤y, skips next program line.
?
x≥y
{ n {≥}
If x≥y, executes next program line;
if x<y, skips next program line.
?
x=y
{ n { }
/
If x=y, executes next program line;
if x≠y, skips next program line.
?
| o
Displays the "x 0" comparison
tests menu.
G–18 Operation Index
Name
Keys and Description
| o {≠}
Page
¼
?
?
x≠0
13–7
If x≠0, executes next program line;
if x=0, skips the next program
line.
x≤0
| o {≤}
If x≤0, executes next program line;
if x>0, skips next program line.
13–7
13–7
?
x<0
| o {<}
If x<0, executes next program
line;
if x≥0, skips next program line.
?
x>0
| o {>}
13–7
If x>0, executes next program
line;
if x≤0, skips next program line.
?
x≥0
| o {≥}
If x≥0, executes next program line;
if x<0, skips next program line.
13–7
13–7
?
x=0
| o {=}
If x=0, executes next program
line;
if x≠0, skips next program lire:
y
| ꢖ {
}
11–4
1
1
¸
Returns the mean of y values.
Σy ÷ n.
i
|
Given an x–value in the
{ ˆ }
11–10
ˆ
y
¸
X–register, returns the y–estimate
based on the regression line:
ˆ
y
= m x + b.
y,x θ,r
{ r Rectangular to polar
coordinates. Converts (x, y) to (r,
θ).
4–10
Operation Index G–19
Name
Keys and Description
Page
¼
x
y
ꢄ Power.
Returns y raised to the x power.
4–2
1
th
ꢊ
Notes:
1. Function can be used in equations.
2. Function appears only in equations.
G–20 Operation Index
Index
Algebraic mode, 1–10
ALL format. See display format
Special Characters
, 6–5
FN. See integration
% functions, 4–6
in equations, 6–5
in programs, 12–6
setting, 1–20
∫
. See equation–entry cursor
alpha characters, 1–3
angles
~
. See backspace key
"
. See integration
between vectors, 15–1
converting format, 4–13
converting units, 4–13
implied units, 4–4, A–2
angular mode, 4–4, A–2, B–3
annunciators
z
, 1–14
â
, 1–23
π, 4–3, A–2
§ ¨
annunciators
binary numbers, 10–6
equations, 6–7, 12–6
(in fractions), 1–21, 5–1
alpha, 1–3
battery, 1–1, A–2
descriptions, 1–11
flags, 13–11
list of, 1–7
low–power, 1–1, A–2
shift keys, 1–2
Ë
cd
annunciator
in catalogs, 3–3
in fractions, 3–3, 5–2, 5–3
_. See digit–entry cursor
ß à
annunciators, 1–3
answers to questions, A–1
annunciator, 1–1, A–2
arithmetic
ã
binary, 10–2
general procedure, 1–16
hexadecimal, 10–2
intermediate results, 2–11
long calculations, 2–11
octal, 10–2
A
A..Z annunciator, 1–3, 3–2, 6–4
absolute value (real number), 4–16
addressing
indirect, 13–20, 13–21, 13–22
ALG, 1–10
order of calculation, 2–13
stack operation, 2–4, 9–1
assignment equations, 6–9, 6–10,
6–11, 7–1
compared to equations, 12–4
in programs, 12–4
Index–1
asymptotes of functions, D–8
viewing all digits, 3–3, 10–6
borrower (finance), 17–1
branching, 13–2, 13–16, 14–7
B
backspace key
C
canceling VIEW, 3–3
clearing messages, 1–5, F–1
clearing X–register, 2–2, 2–6
deleting program lines, 12–18
equation entry, 1–5, 6–8
leaving menus, 1–5, 1–9
operation, 1–5
%CHG arguments, 4–7
adjusting contrast, 1–1
canceling prompts, 1–5, 6–13,
12–13
canceling VIEW, 3–3
program entry, 12–6
clearing messages, 1–5, F–1
clearing X–register, 2–2, 2–6
interrupting programs, 12–17
leaving catalogs, 1–5, 3–3
leaving Equation mode, 6–3, 6–4
leaving menus, 1–5, 1–9
leaving Program mode, 12–6
on and off, 1–1
starts editing, 6–8, 12–6, 12–18
balance (finance), 17–1
base
affects display, 10–4
arithmetic, 10–2
converting, 10–1
default, B–3
programs, 12–22
setting, 10–1, 14–11
base mode
operation, 1–5
stopping integration, 8–2, 14–8
stopping SOLVE, 7–7, 14–1
G
, 9–1, 9–2
default, B–3
/c value, 5–5, B–3, B–6
calculator
equations, 6–5, 6–10, 12–22
fractions, 5–2
programming, 12–22
setting, 12–22, 14–11
batteries, 1–1, A–2
adjusting contrast, 1–1
default settings, B–3
environmental limits, A–2
questions about, A–1
resetting, A–4, B–2
self–test, A–5
Bessel function, 8–2
best–fit regression, 11–7, 16–1
BIN annunciator, 10–1
binary numbers. See numbers
shorting contacts, A–4
testing operation, A–4, A–5
turning on and off, 1–1
cash flows, 17–1
arithmetic, 10–2
converting to, 10–1
range of, 10–5
scrolling, 10–6
typing, 10–1
catalogs
leaving, 1–5
Index–2
conversion functions, 4–9
conversions
program, 1–24, 12–20
using, 1–24
variable, 1–24, 3–3
chain calculations, 2–11
change–percentage functions, 4–6
changing sign of numbers, 1–14,
1–17, 9–3
angle format, 4–13
angle units, 4–13
coordinates, 4–9, 9–5, 15–1
length units, 4–13
mass units, 4–13
number bases, 10–1
temperature units, 4–13
time format, 4–12
volume units, 4–13
coordinates
checksums
equations, 6–18, 12–6, 12–21
programs, 12–20
CLEAR menu, 1–6
clearing
converting, 4–5, 4–9, 15–1
transforming, 15–32
correlation coefficient, 11–7, 16–1
cosine (trig), 4–4, 9–3
equations, 6–8
general information, 1–5
memory, 1–24, A–1
messages, 1–23
cross product, 15–1
cubic equation, 15–20
curve fitting, 11–8, 16–1
numbers, 1–14, 1–16
programs, 1–24, 12–20
statistics registers, 11–2, 11–11
variables, 1–24, 3–3, 3–4
X–register, 2–2, 2–6
D
clearing memory, A–4, B–3
combinations, 4–14
commas (in numbers), 1–18, A–1
comparison tests, 13–7
complex numbers
Decimal mode. See base mode
decimal point, 1–18, A–1
degrees
angle units, 4–4, A–2
converting to radians, 4–13
denominators
coordinate systems, 9–5
entering, 9–1
on stack, 9–1
operations, 9–1, 9–2
polynomial roots, 15–20
viewing, 9–1
controlling, 5–5, 13–9, 13–14
range of, 1–22, 5–1, 5–2
setting maximum, 5–4
digit–entry cursor
backspacing, 1–5, 6–8, 12–6
in equations, 6–5
in programs, 12–6
meaning, 1–15
conditional tests, 13–6, 13–7, 13–8,
13–11, 13–17
constant (filling stack), 2–6
Continuous Memory, 1–1
contrast adjustment, 1–1
discontinuities of functions, D–5
display
Index–3
equality equations, 6–9, 6–10, 7–1
equation list
adjusting contrast, 1–1
annunciators, 1–11
function names in, 4–17
X–register shown, 2–2
display format
adding to, 6–4
displaying, 6–6
editing, 6–8
affects integration, 8–2, 8–5,
8–7
affects numbers, 1–19
affects rounding, 4–16
default, B–3
EQN annunciator, 6–4
in Equation mode, 6–3
operation summary, 6–3
Equation mode
backspacing, 1–5, 6–8
during program entry, 12–6
leaving, 1–5, 6–3
periods and commas in, 1–18,
A–1
setting, 1–19, A–1
DISPLAY menu, 1–19
do if true, 13–6, 14–6
dot product, 15–1
DSE, 13–18
shows equation list, 6–3
starting, 6–3, 6–6
equation–entry cursor
backspacing, 1–5, 6–8, 12–19
operation, 6–5
equations
E
and fractions, 5–8
as applications, 17–1
base mode, 6–5, 6–10, 12–22
checksums, 6–18, 12–6, 12–21
compared to ALG, 12–4
compared to RPN, 12–4
controlling evaluation, 13–10
deleting, 1–6, 6–8
clearing stack, 2–5
copying viewed variable, 12–14
duplicating numbers, 2–6
ending equations, 6–4, 6–8,
12–6
evaluating equations, 6–10
separating numbers, 1–16, 1–17,
2–5
deleting in programs, 12–6,
12–18
displaying, 6–6
stack operation, 2–5
displaying in programs, 12–14,
12–16, 13–10
editing, 1–5, 6–8
editing in programs, 12–6,
12–18
entering, 6–4, 6–8
entering in programs, 12–6
evaluating, 6–9, 6–10, 6–12,
7–6, 12–4, 13–10
a
(exponent), 1–15
E in numbers, 1–14, 1–20, A–1
ENG format, 1–20. See also display
format
EQN annunciator
in equation list, 6–4, 6–6
in Program mode, 12–6
EQN LIST TOP, 6–7, F–1
Index–4
exponential curve fitting, 16–1
exponential functions, 1–15, 4–1,
9–3
functions, 6–5, 6–15, G–1
in programs, 12–4, 12–6,
12–21, 13–10
integrating, 8–2
exponents of ten, 1–14, 1–15
expression equations, 6–9, 6–10,
7–1
lengths, 6–18, 12–6, B–2
list of. See equation list
long, 6–7
memory in, 12–14
multiple roots, 7–8
no root, 7–6
F
³
FN. See integration
numbers in, 6–5
numeric value of, 6–9, 6–10, 7–1,
7–5, 12–4
operation summary, 6–3
parentheses, 6–5, 6–6, 6–14
polynomial, 15–20
precedence of operators, 6–13
prompt for values, 6–10, 6–12
prompting in programs, 13–10,
14–1, 14–8
not programmable, 5–9
toggles display mode, 1–23, 5–1,
A–2
toggles flag, 13–9
factorial function, 4–14
financial calculations, 17–1
FIX format, 1–19. See also display
format
flags
annunciators, 13–11
clearing, 13–11
roots, 7–1
scrolling, 6–7, 12–6, 12–14
simultaneous, 15–12
solving, 7–1, D–1
default states, 13–8, B–3
equation evaluation, 13–10
equation prompting, 13–10
fraction display, 5–6, 13–9
meanings, 13–8
stack usage, 6–11
storing variable value, 6–11
syntax, 6–13, 6–18, 12–14
TVM equation, 17–1
types of, 6–9
operations, 13–11
overflow, 13–9
setting, 13–11
uses, 6–1
testing, 13–8, 13–11
unassigned, 13–9
flow diagrams, 13–2
FN=
variables in, 6–3, 7–1
with (i), 13–24
error messages, F–1
errors
in programs, 14–6, 14–9
integrating programs, 14–8
solving programs, 14–1
clearing, 1–5
correcting, 2–7, F–1
estimation (statistical), 11–7, 16–1
executing programs, 12–9
Index–5
fractional–part function, 4–16
Fraction–display mode
G
V
affects rounding, 5–7
affects VIEW, 12–13
setting, 1–23, 5–1, A–2
fractions
finds PRGM TOP, 12–5, 12–19,
13–6
finds program labels, 12–9,
12–19, 13–5
accuracy indicator, 5–2, 5–3
and equations, 5–8
and programs, 5–8, 12–13,
13–9
finds program lines, 12–18,
12–19, 13–5
gamma function, 4–14
go to. See GTO
base 10 only, 5–2
calculating with, 5–1
denominators, 1–22, 5–4, 5–5,
13–9, 13–14
displaying, 1–23, 5–1, 5–2, 5–4,
A–2
grads (angle units), 4–4, A–2
Grandma Hinkle, 11–7
Greatest integer, 4–16
grouped standard deviation, 16–17
GTO, 13–4, 13–17
guesses (for SOLVE), 7–2, 7–5, 7–7,
7–10, 14–6
flags, 5–6, 13–9
formats, 5–5
not statistics registers, 5–2
reducing, 5–2, 5–5
rounding, 5–7
round–off, 5–7
setting format, 5–5, 13–9,
13–14
H
help about calculator, A–1
HEX annunciator, 10–1
hex numbers. See numbers
arithmetic, 10–2
converting to, 10–1
range of, 10–5
showing integer digits, 5–4
typing, 1–21, 5–1
functions
typing, 10–1
in equations, 6–5, 6–15
in programs, 12–6
hexadecimal numbers. See hex
numbers
list of, G–1
Horner's method, 12–23
humidity limits for calculator, A–2
hyperbolic functions, 4–6
names in display, 4–17, 12–7
nonprogrammable, 12–22
one–number, 1–17, 2–8, 9–2
real–number, 4–1
I
two–number, 1–17, 2–8, 9–3
future balance (finance), 17–1
i, 3–7, 13–20
(i), 3–7, 13–20, 13–21, 13–24
Index–6
imaginary part (complex numbers),
9–1, 9–2
indirect addressing, 13–20, 13–21,
inverse trigonometric functions, 4–4
inverse-normal distribution, 16–11
ISG, 13–18
13–22
INPUT
K
always prompts, 13–10
entering program data, 12–11
in integration programs, 14–8
in SOLVE programs, 14–2
responding to, 12–13
keys
alpha, 1–3
letters, 1–3
shifted, 1–3
L
integer–part function, 4–16
integration
LAST X register, 2–7, B–6
accuracy, 8–2, 8–5, 8–6, E–1
base mode, 12–22, 14–11
difficult functions, E–2, E–7
display format, 8–2, 8–6, 8–7
evaluating programs, 14–7
how it works, E–1
in programs, 14–9
interrupting, B–2
limits of, 8–2, 14–8, C–8, E–7
memory usage, 8–2, B–2
purpose, 8–1
LASTx function, 2–7
lender (finance), 17–1
length conversions, 4–13
letter keys, 1–3
limits of integration, 8–2, 14–8, C–8
linear regression (estimation), 11–7,
16–1
logarithmic curve fitting, 16–1
logarithmic functions, 4–1, 9–3
loop counter, 13–18, 13–22
looping, 13–16, 13–17
restrictions, 14–11
results on stack, 8–2, 8–6
stopping, 8–2, 14–8
à
ukasiewicz, 2–1
M
Y
subintervals, E–7
time required, 8–6, E–7
transforming variables, E–9
uncertainty of result, 8–2, 8–5,
8–6, E–2
using, 8–2, C–8
variable of, 8–2, C–8
program catalog, 1–24, 12–20
reviews memory, 1–24
variable catalog, 1–24, 3–3
mantissa, 1–15, 1–21
mass conversions, 4–13
math
intercept (curve–fit), 11–7, 16–1
interest (finance), 17–3
intermediate results, 2–11
inverse function, 1–17, 9–3
inverse hyperbolic functions, 4–6
complex–number, 9–1
general procedure, 1–16
intermediate results, 2–11
long calculations, 2–11
Index–7
order of calculation, 2–13
real–number, 4–1
stack operation, 2–4, 9–1
matrix inversion, 15–12
maximum of function, D–8
mean menu, 11–4
clearing, 1–5, 1–23
displaying, 12–14, 12–16
in equations, 12–14
responding to, 1–23, F–1
summary of, F–1
minimum of function, D–8
modes. See angular mode, base
mode, Equation mode,
Fraction–display mode,
Program–entry mode
means (statistics)
calculating, 11–4
normal distribution, 16–11
memory
MODES menu
amount available, 1–24
clearing, 1–6, 1–24, A–1, A–4,
B–1, B–3
clearing equations, 6–8
clearing programs, 1–24, 12–5,
12–20
angular mode, 4–4
setting radix, 1–18
money (finance), 17–1
N
negative numbers, 1–14, 9–3, 10–4
nested routines, 13–3, 14–11
normal distribution, 16–11
numbers. See binary numbers, hex
numbers, octal numbers,
clearing statistics registers, 11–2,
11–11
clearing variables, 1–24, 3–4
deallocating, B–2
full, A–1
maintained while off, 1–1
programs, 12–19, B–2
size, 1–24, B–1
stack, 2–1
statistics registers, 11–11
usage, B–1
variables
bases, 10–1, 12–22
changing sign of, 1–14, 1–17,
9–3
clearing, 1–5, 1–6, 1–14, 1–16
complex, 9–1
decimal places, 1–19
display format, 1–19, 10–4
doing arithmetic, 1–16
E in, 1–14, 1–15, A–1
editing, 1–5, 1–14, 1–16
exchanging, 2–4
finding parts of, 4–16
fractions in, 1–21, 5–1
in equations, 6–5
variables, 3–4
MEMORY CLEAR, A–4, B–3, F–2
MEMORY FULL, B–1, F–2
menu keys, 1–7
menus
example of using, 1–9
general operation, 1–7
leaving, 1–5, 1–9
list of, 1–7
in programs, 12–6
messages
Index–8
internal representation, 1–19,
10–4
large and small, 1–14, 1–16
limitations, 1–14
P
π, A–2
parentheses
in arithmetic, 2–11
mantissa, 1–15
in equations, 6–5, 6–6, 6–14
pause. See PSE
payment (finance), 17–1
percentage functions, 4–6
periods (in numbers), 1–18, A–1
permutations, 4–14
negative, 1–14, 9–3, 10–4
order in calculations, 1–18
periods and commas in, 1–18,
A–1
precision, 1–19, D–13
prime, 17–6
Physics constants, 4–8
polar–to–rectangular coordinate
conversion, 4–10, 9–5, 15–1
poles of functions, D–5
polynomials, 12–23, 15–20
population standard deviations,
11–6
power annunciator, 1–1, A–2
power curve fitting, 16–1
power functions, 1–15, 4–2, 9–3
precedence (equation operators),
6–13
precision (numbers), 1–19, 1–21,
D–13
present value. See financial
calculations
PRGM TOP, 12–4, 12–6, 12–19,
F–3
prime number generator, 17–6
probability
range of, 1–16, 10–5
real, 4–1, 8–1
recalling, 3–2
reusing, 2–6, 2–9
rounding, 4–16
showing all digits, 1–21
storing, 3–2
truncating, 10–4
typing, 1–14, 1–15, 10–1
O
,
1–1
OCT annunciator, 10–1
octal numbers. See numbers
arithmetic, 10–2
converting to, 10–1
range of, 10–5
typing, 10–1
one–variable statistics, 11–2
overflow
flags, 13–9, F–3
result of calculation, 1–16, 10–3,
10–5
setting response, 13–9, F–3
testing occurrence, 13–9
functions, 4–14
normal distribution, 16–11
program catalog, 1–24, 12–20
program labels
branching to, 13–2, 13–4,
13–16
Index–9
checksums, 12–21
clearing, 12–5
duplicate, 12–5
editing, 1–5, 12–6, 12–18
editing equations, 12–6, 12–18
entering, 12–5
entering, 12–3, 12–5
executing, 12–9
indirect addressing, 13–20,
13–21, 13–22
equation evaluation, 13–10
equation prompting, 13–10
equations in, 12–4, 12–6
errors in, 12–17
moving to, 12–10, 12–19
purpose, 12–3
executing, 12–9
flags, 13–8, 13–11
typing name, 1–3
for integration, 14–7
viewing, 12–20
for SOLVE, 14–1, D–1
fractions with, 5–8, 12–13, 13–9
functions not allowed, 12–22
indirect addressing, 13–20,
13–21, 13–22
inserting lines, 12–5, 12–18
interrupting, 12–17
lengths, 12–20, 12–21, B–2
line numbers, 12–18, 12–19
loop counter, 13–18
looping, 13–16, 13–17
memory usage, 12–20
messages in, 12–14, 12–16
moving through, 12–10
not stopping, 12–16
program lines. See programs
program names. See program labels
program pointer, 12–5, 12–10,
12–17, 12–19, B–3
Program–entry mode, 1–5, 12–5
programs. See program labels
ALG operations, 12–4
base mode, 12–22
branching, 13–2, 13–4, 13–6,
13–16
calculations in, 12–12
calling routines, 13–2, 13–3
catalog of, 1–24, 12–20
checksums, 12–20, 12–21, B–2
clearing, 12–5, 12–20
clearing all, 12–5, 12–21
comparison tests, 13–7
conditional tests, 13–7, 13–8,
13–11, 13–17, 14–6
data input, 12–4, 12–11, 12–13
data output, 12–4, 12–13,
12–16
deleting, 1–24
deleting all, 1–6
deleting equations, 12–6, 12–18
deleting lines, 12–18
designing, 12–3, 13–1
numbers in, 12–6
pausing, 12–17
prompting for data, 12–11
purpose, 12–1
resuming, 12–14
return at end, 12–3
routines, 13–1
RPN operations, 12–4
running, 12–9
showing long number, 12–6
stepping through, 12–9
stopping, 12–13, 12–14, 12–17
techniques, 13–1
Index–10
testing, 12–9
angle unit, 4–4
using integration, 14–9
using SOLVE, 14–6
variables in, 12–11, 14–1, 14–7
angle units, A–2
converting to degrees, 4–13
radix mark, 1–18, A–1
random numbers, 4–14, B–3
RCL, 3–2, 12–12
RCL arithmetic, 3–5, B–6
real numbers
prompts
affect stack, 6–13, 12–12
clearing, 1–5, 6–13, 12–13
equations, 6–12
INPUT, 12–11, 12–13, 14–2,
14–8
programmed equations, 13–10,
14–1, 14–8
responding to, 6–12, 12–13
showing hidden digits, 6–13
integration with, 8–1
operations, 4–1
SOLVE with, 14–2
real part (complex numbers), 9–1,
9–2
recall arithmetic, 3–5, B–6
rectangular–to–polar coordinate
conversion, 4–10, 9–5, 15–1
regression (linear), 11–7, 16–1
resetting the calculator, A–4, B–2
return (program). See programs
Reverse Polish Notation. See RPN
rolling the stack, 2–3, C–6
root functions, 4–3
PSE
pausing programs, 12–11,
12–17, 14–10
preventing program stops, 13–10
Q
quadratic equations, 15–21
questions, A–1
quotient and remainder of division,
4–2
roots. See SOLVE
checking, 7–6, D–3
in programs, 14–6
multiple, 7–8
R
g
none found, 7–6, D–8
of equations, 7–1
of programs, 14–1
polynomial, 15–20
quadratic, 15–21
rounding
ending prompts, 6–10, 6–13,
7–2, 12–13
interrupting programs, 12–17
resuming programs, 12–14,
12–17
running programs, 12–20
stopping integration, 8–2, 14–8
stopping SOLVE, 7–7, 14–1
fractions, 5–7, 12–17
numbers, 4–16
round–off
¶
µ
R
and R , 2–3, C–6
fractions, 5–7
integration, 8–5
radians
Index–11
Sign value, 4–16
SOLVE, D–13
statistics, 11–9
trig functions, 4–4
routines
simultaneous equations, 15–12
sine (trig), 4–4, 9–3, A–2
single–step execution, 12–9
slope (curve–fit), 11–7, 16–1
SOLVE
calling, 13–2
nesting, 13–3, 14–11
parts of programs, 13–1
asymptotes, D–8
base mode, 12–22, 14–11
checking results, 7–6, D–3
discontinuity, D–5
evaluating equations, 7–1, 7–6
evaluating programs, 14–1
flat regions, D–8
RPN
compared to equations, 12–4
in programs, 12–4
origins, 2–1
running programs, 12–9
S
Î
how it works, 7–5, D–1
in programs, 14–6
initial guesses, 7–2, 7–5, 7–7,
7–10, 14–6
interrupting, B–2
equation checksums, 6–18, B–2
equation lengths, 6–18, B–2
fraction digits, 5–4
memory usage, B–2
minimum or maximum, D–8
multiple roots, 7–8
no restrictions, 14–11
no root found, 7–6, 14–6, D–8
pole, D–5
number digits, 1–21, 12–6
program checksums, 12–20, B–2
program lengths, 12–20, B–2
prompt digits, 6–13
variable digits, 3–3, 12–13
®
, 13–14
purpose, 7–1
sample standard deviations, 11–6
SCI format. See display format
real numbers, 14–2
results on stack, 7–2, 7–6, D–3
resuming, 14–1
round–off, D–13
stopping, 7–2, 7–7
underflow, D–14
in programs, 12–6
setting, 1–19
scrolling
binary numbers, 10–6
equations, 6–7, 12–6, 12–14
seed (random number), 4–14
self–test (calculator), A–5
shift keys, 1–3
sign (of numbers), 1–14, 1–17, 9–3,
10–4
sign conventions (finance), 17–1
using, 7–1
square function, 1–17, 4–2
square–root function, 1–17
stack. See stack lift
affected by prompts, 6–13,
12–12
complex numbers, 9–1
Index–12
statistics
calculating, 11–4
effect of , 2–5
equation usage, 6–11
exchanging with variables, 3–6
exchanging X and Y, 2–4
filling with constant, 2–6
long calculations, 2–11
operation, 2–1, 2–4, 9–1
program calculations, 12–12
program input, 12–11
program output, 12–11
purpose, 2–1, 2–2
registers, 2–1
reviewing, 2–3, C–6
rolling, 2–3, C–6
separate from variables, 3–2
size limit, 2–4, 9–1
curve fitting, 11–8, 16–1
distributions, 16–11
grouped data, 16–17
one–variable data, 11–2
operations, 11–1
two–variable data, 11–2
statistics menus, 11–1, 11–4
statistics registers. See statistical
data
accessing, 11–11
clearing, 1–6, 11–2, 11–11
contain summations, 11–1,
11–10, 11–11
correcting data, 11–2
initializing, 11–2
unaffected by VIEW, 12–14
stack lift. See stack
memory, 11–11
default state, B–3
disabling, B–4
enabling, B–4
not affecting, B–4
operation, 2–4
no fractions, 5–2
viewing, 11–11
STO, 3–2, 12–11
STO arithmetic, 3–4
STOP, 12–17
storage arithmetic, 3–4
subroutines. See routines
sums of statistical variables, 11–10
syntax (equations), 6–13, 6–18,
12–14
standard deviations
calculating, 11–6, 11–7
grouped data, 16–17
normal distribution, 16–11
standard–deviation menu, 11–6
statistical data. See statistics
registers
T
clearing, 1–6, 11–2
correcting, 11–2
entering, 11–1
initializing, 11–2
one–variable, 11–2
precision, 11–9
sums of variables, 11–10
two–variable, 11–2
tangent (trig), 4–4, 9–3, A–2
temperatures
converting units, 4–13
limits for calculator, A–2
test menus, 13–7
testing the calculator, A–4, A–5
time formats, 4–12
Index–13
time value of money, 17–1
transforming coordinates, 15–32
T–register, 2–4
trigonometric functions, 4–4, 9–3
troubleshooting, A–4, A–5
turning on and off, 1–1
TVM, 17–1
recalling, 3–2, 3–3
separate from stack, 3–2
showing all digits, 3–3, 12–13
solving for, 7–1, 14–1, 14–6,
D–1
storing, 3–2
storing from equation, 6–11
typing name, 1–3
twos complement, 10–2, 10–4
two–variable statistics, 11–2
viewing, 3–3, 12–13, 12–16
vectors
application program, 15–1
coordinate conversions, 4–11,
9–6, 15–1
U
uncertainty (integration), 8–2, 8–5,
8–6
operations, 15–1
underflow, D–14
units conversions, 4–13
VIEW
displaying program data, 12–13,
12–16, 14–6
displaying variables, 3–3
no stack effect, 12–14
V
variable catalog, 1–24, 3–3
variables
stopping programs, 12–13
volume conversions, 4–13
arithmetic inside, 3–4
catalog of, 1–24, 3–3
clearing, 1–24, 3–3, 3–4
clearing all, 1–6, 3–4
clearing while viewing, 12–13
default, B–3
exchanging with X, 3–6
in equations, 6–3, 7–1
in programs, 12–11, 14–1,
14–7
indirect addressing, 13–20,
13–21
names, 3–1
number storage, 3–1
of integration, 8–2, 14–7, C–8
polynomials, 12–23
program input, 12–12
program output, 12–13, 12–16
W
weight conversions, 4–13
weighted means, 11–4
windows (binary numbers), 10–6
X
X
evaluating equations, 6–10,
6–12
running programs, 12–9, 12–20
X ROOT arguments, 6–16
X–register
affected by prompts, 6–13
arithmetic with variables, 3–4
clearing, 1–6, 2–2, 2–6
Index–14
clearing in programs, 12–6
displayed, 2–2
during programs pause, 12–17
exchanging with variables, 3–6
exchanging with Y, 2–4
not clearing, 2–5
part of stack, 2–1
testing, 13–7
unaffected by VIEW, 12–14
Index–15
|