# HP 50g / 49g+ / 48gII graphing calculator

```For example, if the stack looks like this:
then
→ a creates local variable a = 20.
→ ab creates local variables a = 6 and b = 20.
HP 50g / 49g+ / 48gII graphing calculator
→ abc creates local variables a = 10, b = 6, and c = 20.
The defining procedure then uses the local variables to do calculations.
Local variable structures have these advantages:
The → command stores the values from the stack in the corresponding variables — you don’t need to explicitly
execute STO.
Local variables automatically disappear when the defining procedure for which they are created has completed
execution. Consequently, local variables don’t appear in the VAR menu, and they occupy user memory only
during program execution.
Local variables exist only within their defining procedure — different local variable structures can use the same
variable names without conflict.
Example: The following program SPHLV calculates the volume of a spherical cap using local variables. The
defining procedure is an algebraic expression.
Level 2
Level 1
→
Level 1
r
h
→
volume
Program:
«
→ r h
Creates local variables r and h for the radius
of the sphere and height of the cap.
'1/3*π*h^2*(3*r-h)'
Expresses the defining procedure. In this
program, the defining procedure for the local
variable structure is an algebraic expression.
→NUM
Converts expression to a number.
»
`OSPHLVK
Stores the program in variable SPHLV.
Now use SPHLV to calculate the volume of a spherical cap of radius r =10 and height h = 3. Enter the data on the
stack in the correct order, then execute the program.
10 `3
H
Edition 2
HP part number F2228-90010
J%SPHLV%
Printed Date: 2009/7/14
1-8 RPL Programming
This is the program:
Notice
« '1/3*π*H^2*(3*R-H)' →NUM »
Now use SPH to calculate the volume of a spherical cap of radius
r = 10 and height h = 3.
First, store the data in the appropriate variables. Then select the VAR menu and execute the program. The answer is
returned to level 1 of the stack.
10 O R K
3OHK
J %SPH%
Viewing and Editing Programs
You view and edit programs the same way you view and edit other objects — using the command line.
To view or edit a program:
1. View the program:
If the program is in level 1, press ˜ (or use the EDIT command).
If the program is stored in a variable, use the Filer (!¡) to select the variable and press @EDIT! (‘), or
press J, then @ and the variable’s menu key (a shortcut to recall a variable’s contents to level 1), followed
by ˜. Alternatively, with the variable name in level 1 press „ ˜ (or use the EDITB, VISIT or VISITB
command).
2. Optional: Make changes.
3. Press ` to save any changes (or press − to discard changes) and return to the stack, or to Filer if you used
Filer to select the program.
Filer lets you change a stored program without having to do a store operation. From the stack you can change a
program and then store the new version in a different variable.
While you’re editing a program, you may want to switch the command-line entry mode between Program-entry
mode (for editing most objects) and Algebraic/Program-entry mode (for editing algebraic objects). The PRG and
ALG annunciators indicate the current mode.
To switch between entry modes:
Press @Í.
Example: Edit SPH from the previous example so that it stores the number from level 1 into variable H and the
number from level 2 into variable R.
Select SPH from the soft keys.
J
@%SPH% ˜
Move the cursor past the first program delimiter and insert the new program steps.
™OH ™K
OR ™K
1-6 RPL Programming
THIS MANUAL AND ANY EXAMPLES CONTAINED HEREIN ARE PROVIDED “AS IS” AND ARE
SUBJECT TO CHANGE WITHOUT NOTICE. HEWLETT-PACKARD COMPANY MAKES NO
WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS
FOR A PARTICULAR PURPOSE.
HEWLETT-PACKARD CO. SHALL NOT BE LIABLE FOR ANY ERRORS OR FOR INCIDENTAL OR
CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR
USE OF THIS MANUAL OR THE EXAMPLES CONTAINED HEREIN.
Reproduction, adaptation, or translation of this manual is prohibited without prior written permission of HewlettPackard Company, except as allowed under the copyright laws.
Hewlett-Packard Company
4995 Murphy Canyon Rd,
Suite 301
San Diego, CA 92123
Acknowledgements
Hewlett-Packard would like to thank the following for their contribution:
Jordi Hidalgo, Joe Horn, Tony Hutchins, Ted Kerber, Wlodek Mier-Jedrzejowicz, Richard Nelson, Eric Rechlin,
Jake Schwartz and Gene Wright.
Printing History
Edition 1 September 2005
Edition 2 July 2009
To stop an executing program:
Press −.
Example: Enter a program that takes a radius value from the stack and calculates the volume of a sphere of radius
r using
V=
4
π
3
r3
If you were going to calculate the volume manually after entering the radius on the stack, you might press these
keys:
3Q!ì*4`3/*@ï
Enter the same keystrokes in a program. (@ë just starts a new line.)
@%
3Q!ì*4#3/*
@ë @ï
Put the program on the stack.
`
Store the program in variable VOL. Then put a radius of 4 on the stack and run the VOL program.
OVOL K
4 J %VOL%
The program is
« 3 ^ π * 4 3 / * →NUM »
Example: Replace the program from the previous example with one that’s easier to read. Enter a program that
uses a local variable structure to calculate the volume of a sphere. The program is
« → r '4/3*π*r^3' →NUM »
(You need to include →NUM because π causes a symbolic result, unless Flag –2 or Flag –3 is set)
Enter the program. (@ë just starts a new line.)
@%
@ér #
O4 /3 *!ì*
r Q3 ™@ë@ï
Put the program on the stack, store it in VOL, and calculate the volume for a radius of 4.
OVOLK
4 %VOL%
1-4 RPL Programming
Contents
Contents ............................................................................................................................................................................................... 1
1. RPL Programming.......................................................................................................................................................................1-1
Understanding Programming .................................................................................................................................................1-1
The Contents of a Program.............................................................................................................................................1-1
Calculations in a Program................................................................................................................................................1-2
Entering and Executing Programs ........................................................................................................................................1-3
Viewing and Editing Programs ..............................................................................................................................................1-6
Creating Programs on a Computer........................................................................................................................................1-7
Using Local Variables ..............................................................................................................................................................1-7
Creating Local Variables ..................................................................................................................................................1-7
Evaluating Local Names..................................................................................................................................................1-9
Defining the Scope of Local Variables..........................................................................................................................1-9
Compiled Local Variables..............................................................................................................................................1-10
Creating User-Defined Functions as Programs .........................................................................................................1-10
Using Tests and Conditional Structures .............................................................................................................................1-11
Testing Conditions..........................................................................................................................................................1-11
Using Conditional Structures and Commands...........................................................................................................1-13
Using Loop Structures...........................................................................................................................................................1-17
Using Definite Loop Structures....................................................................................................................................1-17
Using Indefinite Loop Structures.................................................................................................................................1-22
Using Loop Counters.....................................................................................................................................................1-25
Using Summations Instead of Loops ..........................................................................................................................1-26
Using Flags ..............................................................................................................................................................................1-27
Types of Flags..................................................................................................................................................................1-27
Setting, Clearing, and Testing Flags .............................................................................................................................1-27
Recalling and Storing the Flag States...........................................................................................................................1-28
Using Subroutines ..................................................................................................................................................................1-29
Single-Stepping through a Program.....................................................................................................................................1-31
Trapping Errors......................................................................................................................................................................1-33
Causing and Analyzing Errors ......................................................................................................................................1-33
Making an Error Trap ....................................................................................................................................................1-35
Input .........................................................................................................................................................................................1-37
Data Input Commands ..................................................................................................................................................1-37
Using PROMPT, CONT for Input .............................................................................................................................1-37
Using DISP FREEZE HALT, CONT for Input......................................................................................................1-39
Using INPUT, ENTER for Input ...............................................................................................................................1-40
Using INFORM and CHOOSE for Input.................................................................................................................1-45
Beeping to Get Attention ..............................................................................................................................................1-48
Stopping a Program for Keystroke Input...........................................................................................................................1-48
Using WAIT for Keystroke Input................................................................................................................................1-48
Using KEY for Keystroke Input..................................................................................................................................1-49
Output ..............................................................................................................................................................................1-49
Data Output Commands ...............................................................................................................................................1-49
Labeling Output with Tags............................................................................................................................................1-50
Labeling and Displaying Output as Strings ................................................................................................................1-50
Pausing to Display Output ............................................................................................................................................1-51
Using MSGBOX to Display Output ...........................................................................................................................1-51
Using Menus to Run Programs ....................................................................................................................................1-53
Turning Off the Calculator from a Program .....................................................................................................................1-55
2. RPL Programming Examples ....................................................................................................................................................2-1
Contents - 1
Examples of Program Actions
Program
« 1 2 »
Results
2:
1:
« "Hello" { A B } »
2:
1:
"Hello"
{ A B }
« '1+2' »
1:
'1+2'
« '1+2' →NUM »
1:
3
« « 1 2 + » »
1:
« 1 2 + »
« « 1 2 + » EVAL »
1:
3
1
2
Programs can also contain structures. A structure is a program segment with a defined organization. Two basic kinds
of structure are available:
Local variable structure. The → command defines local variable names and a corresponding algebraic or
program object that’s evaluated using those variables.
Branching structures. Structure words (like DO…UNTIL…END) define conditional or loop structures to
control the order of execution within a program.
A local variable structure has one of the following organizations inside a program:
« → name1 … namen 'algebraic ' »
« → name1 … namen « program » »
The → command removes n objects from the stack and stores them in the named local variables. The algebraic or
program object in the structure is automatically evaluated because it’s an element of the structure — even though
algebraic and program objects are put on the stack in other situations. Each time a local variable name appears in
the algebraic or program object, the variable’s contents are substituted.
So the following program takes two numbers from the stack and returns a numeric result:
« → a b 'ABS(a-b)' »
Calculations in a Program
Many calculations in programs take data from the stack. Two typical ways to manipulate stack data are:
Stack commands. Operate directly on the objects on the stack.
Local variable structures. Store the stack objects in temporary local variables, then use the variable names to
represent the data in the following algebraic or program object.
Numeric calculations provide convenient examples of these methods. The following programs use two numbers
2
2
from the stack to calculate the hypotenuse of a right triangle using the formula x + y .
« SQ SWAP SQ + ƒ »
« → x y « x SQ y SQ + ƒ » »
« → x y 'ƒ(x^2+y^2)' »
The first program uses stack commands to manipulate the numbers on the stack — the calculation uses stack
syntax. The second program uses a local variable structure to store and retrieve the numbers — the calculation uses
stack syntax. The third program also uses a local variable structure — the calculation uses algebraic syntax. Note
that the underlying formula is most apparent in the third program. This third method is often the easiest to write,
1-2 RPL Programming
→ARRY...................................................................................................................................................................................3-15
ASIN.........................................................................................................................................................................................3-15
ASIN2C....................................................................................................................................................................................3-17
ASIN2T....................................................................................................................................................................................3-17
ASINH .....................................................................................................................................................................................3-17
ASN ..........................................................................................................................................................................................3-18
ASR...........................................................................................................................................................................................3-19
ASSUME .................................................................................................................................................................................3-19
ATAN ......................................................................................................................................................................................3-20
ATAN2S ..................................................................................................................................................................................3-21
ATANH...................................................................................................................................................................................3-22
ATICK .....................................................................................................................................................................................3-22
ATTACH.................................................................................................................................................................................3-23
AUGMENT............................................................................................................................................................................3-23
AUTO ......................................................................................................................................................................................3-24
AXES........................................................................................................................................................................................3-24
AXL ..........................................................................................................................................................................................3-25
AXM.........................................................................................................................................................................................3-25
AXQ .........................................................................................................................................................................................3-26
BAR ..........................................................................................................................................................................................3-26
BARPLOT...............................................................................................................................................................................3-27
BASIS .......................................................................................................................................................................................3-27
BAUD ......................................................................................................................................................................................3-27
BEEP........................................................................................................................................................................................3-28
BESTFIT .................................................................................................................................................................................3-28
BIN ...........................................................................................................................................................................................3-28
BINS.........................................................................................................................................................................................3-29
BLANK....................................................................................................................................................................................3-29
BOX .........................................................................................................................................................................................3-29
BUFLEN .................................................................................................................................................................................3-30
BYTES .....................................................................................................................................................................................3-30
B→R.........................................................................................................................................................................................3-30
C\$ ..............................................................................................................................................................................................3-31
C2P ...........................................................................................................................................................................................3-31
CASCFG..................................................................................................................................................................................3-31
CASCMD.................................................................................................................................................................................3-32
CASE........................................................................................................................................................................................3-32
CEIL.........................................................................................................................................................................................3-33
CENTR....................................................................................................................................................................................3-33
CF..............................................................................................................................................................................................3-33
%CH.........................................................................................................................................................................................3-33
CHINREM..............................................................................................................................................................................3-34
CHOLESKY...........................................................................................................................................................................3-34
CHOOSE ................................................................................................................................................................................3-35
CHR..........................................................................................................................................................................................3-35
CIRC.........................................................................................................................................................................................3-36
CKSM.......................................................................................................................................................................................3-36
CLEAR.....................................................................................................................................................................................3-37
CLLCD ....................................................................................................................................................................................3-37
CLOSEIO ...............................................................................................................................................................................3-37
CLΣ...........................................................................................................................................................................................3-38
CLUSR .....................................................................................................................................................................................3-38
CLVAR ....................................................................................................................................................................................3-38
CMPLX....................................................................................................................................................................................3-38
CNRM......................................................................................................................................................................................3-38
Contents - 3
E.
F.
G.
H.
I.
J.
K.
ALRMDAT ..............................................................................................................................................................................D-2
βENTER...................................................................................................................................................................................D-3
CST ............................................................................................................................................................................................D-3
EQ .............................................................................................................................................................................................D-4
EXITED...................................................................................................................................................................................D-4
EXPR ........................................................................................................................................................................................D-4
IOPAR ......................................................................................................................................................................................D-4
MASD.INI................................................................................................................................................................................D-6
MHpar.......................................................................................................................................................................................D-6
Mpar ..........................................................................................................................................................................................D-6
n1, n2, … ..................................................................................................................................................................................D-6
Nmines......................................................................................................................................................................................D-6
PPAR.........................................................................................................................................................................................D-6
PRTPAR ...................................................................................................................................................................................D-8
PTPAR ......................................................................................................................................................................................D-8
STARTED................................................................................................................................................................................D-8
STARTEQW............................................................................................................................................................................D-9
STARTERR .............................................................................................................................................................................D-9
STARTOFF .............................................................................................................................................................................D-9
STARTRECV ..........................................................................................................................................................................D-9
STARTSEND..........................................................................................................................................................................D-9
STARTUP ................................................................................................................................................................................D-9
s1, s2, …....................................................................................................................................................................................D-9
TOFF ........................................................................................................................................................................................D-9
TPAR...................................................................................................................................................................................... D-10
VPAR ..................................................................................................................................................................................... D-10
ZPAR ..................................................................................................................................................................................... D-11
ΣDAT..................................................................................................................................................................................... D-11
ΣPAR...................................................................................................................................................................................... D-12
CASDIR Reserved Variables.............................................................................................................................................. D-13
Contents of the CASDIR Reserved Variables................................................................................................................. D-13
CASINFO ............................................................................................................................................................................. D-13
ENVSTACK......................................................................................................................................................................... D-13
EPS ......................................................................................................................................................................................... D-13
IERR....................................................................................................................................................................................... D-13
MODULO............................................................................................................................................................................. D-14
PERIOD................................................................................................................................................................................ D-14
PRIMIT.................................................................................................................................................................................. D-14
REALASSUME.................................................................................................................................................................... D-14
VX........................................................................................................................................................................................... D-14
Technical Reference ........................................................................................................................................................ E-1
Object Sizes.............................................................................................................................................................................. E-1
Symbolic Integration Patterns ............................................................................................................................................... E-2
Trigonometric Expansions .................................................................................................................................................... E-4
Precedence of Operations...................................................................................................................................................... E-5
Source References ................................................................................................................................................................... E-6
Parallel Processing with Lists ......................................................................................................................................... F-1
Keyboard Shortcuts........................................................................................................................................................ G-1
The Command Menu-Path Table .................................................................................................................................. I-1
ASCII Character Codes and Translations..................................................................................................................... J-1
Index ...................................................................................................................................................................................... 1
Contents - 20
DIFF.........................................................................................................................................................................................3-59
DIFFEQ ..................................................................................................................................................................................3-59
DIR ...........................................................................................................................................................................................3-60
DISP .........................................................................................................................................................................................3-60
DISPXY...................................................................................................................................................................................3-61
DISTRIB..................................................................................................................................................................................3-61
DIV...........................................................................................................................................................................................3-62
DIV2.........................................................................................................................................................................................3-62
DIV2MOD..............................................................................................................................................................................3-62
DIVIS.......................................................................................................................................................................................3-63
DIVMOD................................................................................................................................................................................3-63
DIVPC .....................................................................................................................................................................................3-63
dn ..............................................................................................................................................................................................3-64
DO............................................................................................................................................................................................3-64
DOERR ...................................................................................................................................................................................3-65
DOLIST...................................................................................................................................................................................3-65
DOMAIN................................................................................................................................................................................3-66
DOSUBS .................................................................................................................................................................................3-66
DOT .........................................................................................................................................................................................3-67
DRAW .....................................................................................................................................................................................3-68
DRAW3DMATRIX ..............................................................................................................................................................3-68
DRAX ......................................................................................................................................................................................3-68
DROITE..................................................................................................................................................................................3-69
DROP ......................................................................................................................................................................................3-69
DROP2 ....................................................................................................................................................................................3-69
DROPN...................................................................................................................................................................................3-70
DTAG ......................................................................................................................................................................................3-70
DUP..........................................................................................................................................................................................3-70
DUP2........................................................................................................................................................................................3-70
DUPDUP ................................................................................................................................................................................3-71
DUPN ......................................................................................................................................................................................3-71
D→R ........................................................................................................................................................................................3-71
e .................................................................................................................................................................................................3-71
EDIT ........................................................................................................................................................................................3-72
EDITB .....................................................................................................................................................................................3-72
EGCD ......................................................................................................................................................................................3-72
EGV .........................................................................................................................................................................................3-73
EGVL.......................................................................................................................................................................................3-73
ELSE ........................................................................................................................................................................................3-73
END.........................................................................................................................................................................................3-73
ENDSUB.................................................................................................................................................................................3-74
ENG.........................................................................................................................................................................................3-74
EPSX0......................................................................................................................................................................................3-74
EQNLIB..................................................................................................................................................................................3-75
EQW ........................................................................................................................................................................................3-75
EQ→........................................................................................................................................................................................3-75
ERASE.....................................................................................................................................................................................3-75
ERR0 ........................................................................................................................................................................................3-76
ERRM ......................................................................................................................................................................................3-76
ERRN.......................................................................................................................................................................................3-76
EULER ....................................................................................................................................................................................3-76
EVAL .......................................................................................................................................................................................3-77
EXLR .......................................................................................................................................................................................3-77
EXP&LN.................................................................................................................................................................................3-78
EXP ..........................................................................................................................................................................................3-78
EXP2HYP ...............................................................................................................................................................................3-79
Contents - 5
Angular Motion (8, 4).....................................................................................................................................................5-36
Circular Motion (8, 5).....................................................................................................................................................5-36
Terminal Velocity (8, 6) .................................................................................................................................................5-36
Escape Velocity (8, 7).....................................................................................................................................................5-36
Optics (9) .................................................................................................................................................................................5-37
Law of Refraction (9, 1).................................................................................................................................................5-37
Critical Angle (9, 2).........................................................................................................................................................5-38
Brewster’s Law (9, 3) ......................................................................................................................................................5-38
Spherical Reflection (9, 4)..............................................................................................................................................5-39
Spherical Refraction (9, 5) .............................................................................................................................................5-39
Thin Lens (9, 6) ...............................................................................................................................................................5-39
Oscillations (10) ......................................................................................................................................................................5-40
Mass-Spring System (10, 1) ...........................................................................................................................................5-41
Simple Pendulum (10, 2)................................................................................................................................................5-41
Conical Pendulum (10, 3) ..............................................................................................................................................5-42
Torsional Pendulum (10, 4)...........................................................................................................................................5-42
Simple Harmonic (10, 5)................................................................................................................................................5-42
Plane Geometry (11) ..............................................................................................................................................................5-43
Circle (11, 1).....................................................................................................................................................................5-44
Ellipse (11, 2) ...................................................................................................................................................................5-44
Rectangle (11, 3)..............................................................................................................................................................5-45
Regular Polygon (11, 4)..................................................................................................................................................5-45
Circular Ring (11, 5)........................................................................................................................................................5-46
Triangle (11, 6).................................................................................................................................................................5-46
Solid Geometry (12)...............................................................................................................................................................5-47
Cone (12, 1)......................................................................................................................................................................5-47
Cylinder (12, 2) ................................................................................................................................................................5-48
Parallelepiped (12, 3) ......................................................................................................................................................5-48
Sphere (12, 4)...................................................................................................................................................................5-49
Solid State Devices (13).........................................................................................................................................................5-50
PN Step Junctions (13, 1) ..............................................................................................................................................5-52
NMOS Transistors (13, 2) .............................................................................................................................................5-53
Bipolar Transistors (13, 3) .............................................................................................................................................5-54
JFETs (13, 4)....................................................................................................................................................................5-54
Stress Analysis (14).................................................................................................................................................................5-56
Normal Stress (14, 1)......................................................................................................................................................5-57
Shear Stress (14, 2)..........................................................................................................................................................5-57
Stress on an Element (14, 3) .........................................................................................................................................5-57
Mohr’s Circle (14, 4).......................................................................................................................................................5-58
Waves (15) ...............................................................................................................................................................................5-59
Transverse Waves (15,1) ................................................................................................................................................5-59
Longitudinal Waves (15, 2)............................................................................................................................................5-59
Sound Waves (15, 3).......................................................................................................................................................5-60
References................................................................................................................................................................................5-61
6. The Development Library..........................................................................................................................................................6-1
Introduction ..............................................................................................................................................................................6-1
Development Library Command Reference........................................................................................................................6-2
A→......................................................................................................................................................................................6-2
→A......................................................................................................................................................................................6-2
A→H ..................................................................................................................................................................................6-2
→ALG................................................................................................................................................................................6-2
APEEK ..............................................................................................................................................................................6-2
ARM→ ...............................................................................................................................................................................6-3
ASM ....................................................................................................................................................................................6-3
ASM→................................................................................................................................................................................6-3
Contents - 18
GXOR....................................................................................................................................................................................3-101
*H............................................................................................................................................................................................3-102
HALFTAN............................................................................................................................................................................3-102
HALT.....................................................................................................................................................................................3-102
HELP .....................................................................................................................................................................................3-103
HERMITE ............................................................................................................................................................................3-104
HESS ......................................................................................................................................................................................3-104
HEX .......................................................................................................................................................................................3-104
HILBERT..............................................................................................................................................................................3-105
HISTOGRAM......................................................................................................................................................................3-105
HISTPLOT ...........................................................................................................................................................................3-106
HMS– .....................................................................................................................................................................................3-106
HMS+ ....................................................................................................................................................................................3-106
HMS→...................................................................................................................................................................................3-107
→HMS...................................................................................................................................................................................3-107
HOME ...................................................................................................................................................................................3-108
HORNER..............................................................................................................................................................................3-108
i................................................................................................................................................................................................3-108
IABCUV ................................................................................................................................................................................3-108
IBASIS ...................................................................................................................................................................................3-109
IBERNOULLI .....................................................................................................................................................................3-109
IBP ..........................................................................................................................................................................................3-109
ICHINREM ..........................................................................................................................................................................3-110
IDN ........................................................................................................................................................................................3-110
IDIV2.....................................................................................................................................................................................3-111
IEGCD ..................................................................................................................................................................................3-111
IF.............................................................................................................................................................................................3-112
IFERR ....................................................................................................................................................................................3-112
IFFT .......................................................................................................................................................................................3-113
IFT ..........................................................................................................................................................................................3-114
IFTE.......................................................................................................................................................................................3-114
ILAP .......................................................................................................................................................................................3-114
IM............................................................................................................................................................................................3-115
IMAGE..................................................................................................................................................................................3-115
INCR ......................................................................................................................................................................................3-116
INDEP...................................................................................................................................................................................3-116
INFORM ...............................................................................................................................................................................3-116
INPUT ...................................................................................................................................................................................3-117
INT .........................................................................................................................................................................................3-118
INTEGER.............................................................................................................................................................................3-119
INTVX...................................................................................................................................................................................3-119
INV.........................................................................................................................................................................................3-119
INVMOD..............................................................................................................................................................................3-120
IP.............................................................................................................................................................................................3-120
IQUOT ..................................................................................................................................................................................3-120
IREMAINDER ....................................................................................................................................................................3-121
ISOL .......................................................................................................................................................................................3-121
ISOM......................................................................................................................................................................................3-121
ISPRIME?..............................................................................................................................................................................3-122
I→R........................................................................................................................................................................................3-122
JORDAN...............................................................................................................................................................................3-122
Contents - 7
√ (Square Root).................................................................................................................................................................3-286
∫ (Integrate).......................................................................................................................................................................3-288
? (Undefined)....................................................................................................................................................................3-288
∞ (Infinity) ........................................................................................................................................................................3-289
Σ (Summation).................................................................................................................................................................3-289
Σ+
(Sigma Plus)..............................................................................................................................................................3-289
Σ–
(Sigma Minus) ..........................................................................................................................................................3-290
π
(Pi)..................................................................................................................................................................................3-290
∂ (Derivative) ....................................................................................................................................................................3-291
! (Factorial) .......................................................................................................................................................................3-291
% (Percent)........................................................................................................................................................................3-292
_ (Unit attachment)..........................................................................................................................................................3-292
«»
(Program delimiters) ...............................................................................................................................................3-293
< (Less than)......................................................................................................................................................................3-293
≤ (Less than or Equal) .....................................................................................................................................................3-294
> (Greater than) ................................................................................................................................................................3-295
≥ (Greater than or Equal)................................................................................................................................................3-295
≠ (Not equal) .....................................................................................................................................................................3-296
* (Multiply) ........................................................................................................................................................................3-297
– (Subtract) ........................................................................................................................................................................3-299
/ (Divide)...........................................................................................................................................................................3-300
= (Equal) ............................................................................................................................................................................3-301
==
(Logical Equality) ....................................................................................................................................................3-302
(Store)..............................................................................................................................................................................3-303
→
(Create Local)...........................................................................................................................................................3-303
; (Semicolon) ....................................................................................................................................................................3-304
4. Computer Algebra System .........................................................................................................................................................4-1
CAS Settings..............................................................................................................................................................................4-1
Selecting CAS Settings .....................................................................................................................................................4-1
The CAS directory, CASDIR..........................................................................................................................................4-1
Points to note when choosing settings..........................................................................................................................4-1
Using the CAS...........................................................................................................................................................................4-3
Examples and Help ..........................................................................................................................................................4-3
Compatibility with Other Calculators............................................................................................................................4-3
Extending the CAS...........................................................................................................................................................4-3
Dealing with unexpected CAS results or messages .....................................................................................................4-3
5. Equation Reference.....................................................................................................................................................................5-1
Columns and Beams (1) ..........................................................................................................................................................5-3
Elastic Buckling (1, 1).......................................................................................................................................................5-4
Eccentric Columns (1, 2) .................................................................................................................................................5-4
Simple Deflection (1, 3) ...................................................................................................................................................5-5
Simple Slope (1, 4) ............................................................................................................................................................5-5
Simple Moment (1, 5).......................................................................................................................................................5-6
Simple Shear (1, 6) ............................................................................................................................................................5-6
Cantilever Deflection (1, 7) .............................................................................................................................................5-7
Cantilever Slope (1, 8) ......................................................................................................................................................5-7
Cantilever Moment (1, 9).................................................................................................................................................5-7
Cantilever Shear (1, 10) ....................................................................................................................................................5-8
Electricity (2) .............................................................................................................................................................................5-9
Coulomb’s Law (2, 1) .....................................................................................................................................................5-10
Ohm’s Law and Power (2, 2) ........................................................................................................................................5-10
Voltage Divider (2, 3).....................................................................................................................................................5-11
Current Divider (2, 4).....................................................................................................................................................5-11
Wire Resistance (2, 5) .....................................................................................................................................................5-11
Series and Parallel R (2, 6) .............................................................................................................................................5-12
Contents - 16
MATHS..................................................................................................................................................................................3-143
MATR ....................................................................................................................................................................................3-143
MAX.......................................................................................................................................................................................3-143
MAXR ....................................................................................................................................................................................3-144
MAXΣ ....................................................................................................................................................................................3-144
MCALC..................................................................................................................................................................................3-144
MEAN....................................................................................................................................................................................3-145
MEM ......................................................................................................................................................................................3-145
MERGE.................................................................................................................................................................................3-147
MIN ........................................................................................................................................................................................3-147
MINEHUNT........................................................................................................................................................................3-147
MINIFONT→ .....................................................................................................................................................................3-148
→MINIFONT .....................................................................................................................................................................3-148
MINIT....................................................................................................................................................................................3-148
MINR .....................................................................................................................................................................................3-148
MINΣ .....................................................................................................................................................................................3-149
MITM.....................................................................................................................................................................................3-149
MKISOM...............................................................................................................................................................................3-149
MOD ......................................................................................................................................................................................3-150
MODSTO .............................................................................................................................................................................3-150
MODULAR ..........................................................................................................................................................................3-150
MOLWT ................................................................................................................................................................................3-151
MROOT ................................................................................................................................................................................3-151
MSGBOX..............................................................................................................................................................................3-151
MSLV .....................................................................................................................................................................................3-152
MSOLVR...............................................................................................................................................................................3-152
MULTMOD..........................................................................................................................................................................3-153
MUSER..................................................................................................................................................................................3-153
→NDISP...............................................................................................................................................................................3-153
NDIST ...................................................................................................................................................................................3-154
NDUPN.................................................................................................................................................................................3-154
NEG.......................................................................................................................................................................................3-154
NEWOB ................................................................................................................................................................................3-155
NEXT ....................................................................................................................................................................................3-155
NEXT ....................................................................................................................................................................................3-155
NEXTPRIME.......................................................................................................................................................................3-155
NIP .........................................................................................................................................................................................3-156
NOT .......................................................................................................................................................................................3-156
NOVAL .................................................................................................................................................................................3-156
NΣ...........................................................................................................................................................................................3-157
NSUB .....................................................................................................................................................................................3-157
→NUM..................................................................................................................................................................................3-157
NUM ......................................................................................................................................................................................3-157
NUMX ...................................................................................................................................................................................3-158
NUMY ...................................................................................................................................................................................3-158
OBJ→.....................................................................................................................................................................................3-158
OCT........................................................................................................................................................................................3-159
OFF ........................................................................................................................................................................................3-159
OLDPRT ...............................................................................................................................................................................3-159
OPENIO ...............................................................................................................................................................................3-160
OR...........................................................................................................................................................................................3-160
ORDER .................................................................................................................................................................................3-161
OVER ....................................................................................................................................................................................3-161
P2C .........................................................................................................................................................................................3-162
Contents - 9
TABVAR ...............................................................................................................................................................................3-247
→TAG...................................................................................................................................................................................3-247
TAIL.......................................................................................................................................................................................3-247
TAN........................................................................................................................................................................................3-248
TAN2CS2 ..............................................................................................................................................................................3-248
TAN2SC ................................................................................................................................................................................3-248
TAN2SC2 ..............................................................................................................................................................................3-249
TANH ....................................................................................................................................................................................3-249
TAYLOR0.............................................................................................................................................................................3-250
TAYLR...................................................................................................................................................................................3-250
TCHEBYCHEFF ................................................................................................................................................................3-250
TCOLLECT..........................................................................................................................................................................3-251
TDELTA ...............................................................................................................................................................................3-251
TESTS....................................................................................................................................................................................3-251
TEVAL ..................................................................................................................................................................................3-252
TEXPAND ...........................................................................................................................................................................3-252
TEXT .....................................................................................................................................................................................3-252
THEN ....................................................................................................................................................................................3-252
TICKS ....................................................................................................................................................................................3-253
TIME......................................................................................................................................................................................3-253
→TIME .................................................................................................................................................................................3-253
TINC ......................................................................................................................................................................................3-253
TLIN ......................................................................................................................................................................................3-254
TLINE ...................................................................................................................................................................................3-254
TOT........................................................................................................................................................................................3-255
TRACE ..................................................................................................................................................................................3-255
TRAN.....................................................................................................................................................................................3-255
TRANSIO .............................................................................................................................................................................3-256
TRIG ......................................................................................................................................................................................3-256
TRIGCOS .............................................................................................................................................................................3-257
TRIGO...................................................................................................................................................................................3-257
TRIGSIN...............................................................................................................................................................................3-257
TRIGTAN.............................................................................................................................................................................3-257
TRN........................................................................................................................................................................................3-258
TRNC.....................................................................................................................................................................................3-258
TRUNC..................................................................................................................................................................................3-259
TRUTH..................................................................................................................................................................................3-259
TSIMP....................................................................................................................................................................................3-260
TSTR ......................................................................................................................................................................................3-260
TVARS...................................................................................................................................................................................3-261
TVM .......................................................................................................................................................................................3-261
TVMBEG..............................................................................................................................................................................3-261
TVMEND .............................................................................................................................................................................3-261
TVMROOT ..........................................................................................................................................................................3-261
TYPE......................................................................................................................................................................................3-262
UBASE...................................................................................................................................................................................3-262
UFACT ..................................................................................................................................................................................3-263
UFL1→MINIF.....................................................................................................................................................................3-263
UNASSIGN ..........................................................................................................................................................................3-263
UNASSUME.........................................................................................................................................................................3-263
UNBIND...............................................................................................................................................................................3-264
→UNIT .................................................................................................................................................................................3-264
UNPICK................................................................................................................................................................................3-264
UNROT.................................................................................................................................................................................3-265
UNTIL ...................................................................................................................................................................................3-265
Contents - 14
PURGE..................................................................................................................................................................................3-182
PUSH......................................................................................................................................................................................3-183
PUT ........................................................................................................................................................................................3-183
PUTI.......................................................................................................................................................................................3-184
PVAR .....................................................................................................................................................................................3-185
PVARS ...................................................................................................................................................................................3-185
PVIEW...................................................................................................................................................................................3-186
PWRFIT.................................................................................................................................................................................3-186
PX→C....................................................................................................................................................................................3-187
→Q.........................................................................................................................................................................................3-187
→Qπ.......................................................................................................................................................................................3-187
qr .............................................................................................................................................................................................3-188
QR...........................................................................................................................................................................................3-188
QUOT....................................................................................................................................................................................3-189
QUOTE.................................................................................................................................................................................3-189
QXA .......................................................................................................................................................................................3-190
RAND....................................................................................................................................................................................3-190
RANK ....................................................................................................................................................................................3-190
RANM....................................................................................................................................................................................3-191
RATIO ...................................................................................................................................................................................3-191
RCEQ.....................................................................................................................................................................................3-192
RCI..........................................................................................................................................................................................3-192
RCIJ ........................................................................................................................................................................................3-192
RCL.........................................................................................................................................................................................3-193
RCLALARM .........................................................................................................................................................................3-193
RCLF ......................................................................................................................................................................................3-194
RCLKEYS.............................................................................................................................................................................3-194
RCLVX ..................................................................................................................................................................................3-195
RCLΣ......................................................................................................................................................................................3-195
RCWS.....................................................................................................................................................................................3-195
RDM.......................................................................................................................................................................................3-195
RDZ........................................................................................................................................................................................3-196
RE ...........................................................................................................................................................................................3-196
RECN.....................................................................................................................................................................................3-197
RECT .....................................................................................................................................................................................3-197
RECV .....................................................................................................................................................................................3-197
REF.........................................................................................................................................................................................3-198
REMAINDER......................................................................................................................................................................3-198
RENAME..............................................................................................................................................................................3-198
REORDER ...........................................................................................................................................................................3-199
REPEAT................................................................................................................................................................................3-199
REPL......................................................................................................................................................................................3-199
RES.........................................................................................................................................................................................3-200
RESTORE.............................................................................................................................................................................3-201
RESULTANT.......................................................................................................................................................................3-201
REVLIST...............................................................................................................................................................................3-202
REWRITE.............................................................................................................................................................................3-202
RISCH....................................................................................................................................................................................3-202
RKF ........................................................................................................................................................................................3-203
RKFERR ...............................................................................................................................................................................3-203
RKFSTEP..............................................................................................................................................................................3-204
RL............................................................................................................................................................................................3-204
RLB.........................................................................................................................................................................................3-205
Contents - 11
Evaluating Local Names
(The in the previous program is the calculator’s representation for the newline character after you enter a program
on the stack.)
Using INPUT, ENTER for Input
INPUT lets you use the stack area for prompting, lets you supply default input, and prevents the user from using
normal stack operations or altering data on the stack.
To enter INPUT in a program:
1. Enter a string (with "" delimiters) to be displayed as a prompt at the top of the stack area.
2. Enter a string or list (with delimiters) that specifies the command-line content and behavior — see below.
3. Enter the INPUT command (PRG IN menu).
4. Enter OBJ→ (PRG TYPE menu) or other command that processes the input as a string object.
« … "prompt-string" "command-line" INPUT OBJ→ … »
or
« … "prompt-string" {command-line" INPUT OBJ→ … »
INPUT, in its simplest form, takes two strings as arguments — see the list of additional options following. INPUT
blanks the stack area, displays the contents of the level-2 string at the top of the stack area, and displays the contents
of the level-1 string in the command line. It then activates Program-entry mode, puts the insert cursor after the
string in the command line, and suspends execution.
When execution resumes, the input is returned to level 1 as a string object, called the result string.
Local names are evaluated differently from global names. When a global name is evaluated, the object stored in the
corresponding variable is itself evaluated. (You’ve seen how programs stored in global variables are automatically
evaluated when the name is evaluated.)
When a local name is evaluated, the object stored in the corresponding variable is returned to the stack but is not
evaluated. When a local variable contains a number, the effect is identical to evaluation of a global name, since
putting a number on the stack is equivalent to evaluating it. However, if a local variable contains a program,
algebraic expression, or global variable name — and if you want it evaluated — the program should execute EVAL
after the object is put on the stack.
Defining the Scope of Local Variables
Local variables exist only inside the defining procedure.
Example: The following program excerpt illustrates the availability of local variables in nested defining procedures
(procedures within procedures). Because local variables a, b, and c already exist when the defining procedure for
local variables d, e, and f is executed, they’re available for use in that procedure.
Program:
«
.
.
.
→ a b c
To respond to INPUT while running a program
«
a b + c +
1. Enter your input. (You can’t execute commands — they’re simply echoed in the command line.)
2. Optional: To clear the command line and start over, press −.
3. Press `.
If you execute this program segment
→ d e f
'a/(d*e+f)'
« "Variable name?" ":VAR:" INPUT »
the display looks like this:
a c / »
.
No local variables are available.
Defines local variables a, b, c.
Local variables a, b, c are available
in this procedure.
Defines local variables d, e, f.
Local variables a, b, c and d, e, f are
available in this procedure.
Only local variables a, b, c are
available.
No local variables are available.
.
.
»
1-40 RPL Programming
RPL Programming 1-9
If a program begins with a local variable structure and has a program as the defining procedure, the complete
program acts like a user-defined function in two ways: it takes numeric or symbolic arguments, and takes those
arguments either from the stack or in algebraic syntax. However, it does not have a derivative. (The defining
program must, like algebraic defining procedures, return only one result to the stack.)
Example: If you execute this program segment
« "ABC?" PROMPT »
the display looks like this:
There’s an advantage to using a program as the defining procedure for a local variable structure: The program can
contain commands not allowed in algebraic expressions. For example, loop structures are not allowed in algebraic
expressions.
Using Tests and Conditional Structures
Example: The following program, TPROMPT, prompts you for the dimensions of a torus, then calls program
TORSA (from page 1-29) to calculate its surface area. You don’t have to enter data on the stack prior to program
execution.
You can use commands and branching structures that let programs ask questions and make decisions. Comparison
functions and logical functions test whether or not specified conditions exist. Conditional structures and conditional commands
use test results to make decisions.
Testing Conditions
A test is an algebraic or a command sequence that returns a test result to the stack. A test result is either true —
indicated by a value of 1. — or it is false — indicated by a value of 0..
"ENTER a, b IN ORDER:"
Puts the prompting string on the
stack.
PROMPT
Displays the string in the status
area, halts program execution, and
returns calculator control to the
keyboard.
Executes TORSA using the justentered stack arguments.
To include a test in a program:
To use stack syntax, enter the two arguments, then enter the test command.
To use algebraic syntax, enter the test expression (with ‘ delimiters).
Program:
«
TORSA
»
`OTPROMPT ‰
Stores the program in TPROMPT.
You often use test results in conditional structures to determine which clause of the structure to execute.
Conditional structures are described under Using Conditional Structures and Commands, page 1-13.
Example: Test whether or not X is less than Y. To use stack syntax, enter X Y <. To use algebraic syntax, enter
'X<Y'. (For both cases, if X contains 5 and Y contains 10, then the test is true and 1. is returned to the stack.)
Using Comparison Functions
Comparison functions compare two objects, using either stack syntax or algebraic syntax.
Comparison Functions
Key
Execute TPROMPT to calculate the volume of a torus with inner radius a = 8 and outer radius b = 10. Execute
TPROMPT. The program prompts you for data.
@·J %TPROM%
Enter the inner and outer radii. After you press `, the prompt message is cleared from the status area.
8 `10
Programmable
Command
Description
„° %TEST% (pages 1 and 2):
%\$==\$%
%%´%%
%#%<%%
%#%>%%
%#%»%%
#%%¼%%
##SAME##
==
≠
<
>
≤
≥
SAME
Tests equality of two objects.
Not equal.
Less than.
Greater than.
Less than or equal to.
Greater than or equal to.
Identical. Like = =, but doesn’t allow a
comparison between the numerical value of
an algebraic (or name) and a number. Also
considers the wordsize of a binary integer.
The comparison commands return 1. (true) or 0. (false) based on the comparison — or an expression that can
evaluate to 1. or 0.. The order of the comparison is “level 2 test level 1,” where test is the comparison function.
All comparison commands except SAME return the following:
1-38 RPL Programming
RPL Programming 1-11
The IFERR 7 THEN 7 ELSE 7 END Structure
Testing Object Types
The syntax for this structure is
« … IFERR trap-clause
THEN error-clause ELSE normal-clause END … »
The TYPE command (!°%TEST% L %TYPE%) takes any object as its argument and returns the number that
identifies that object type. For example, "HELLO" TYPE returns 2, the value for a string object. See the table of
object types in chapter 3, in the TYPE command, to find calculator objects and their corresponding type numbers.
The commands in the error-clause are executed only if an error is generated during execution of the trap-clause. If
an error occurs in the trap-clause, the error is ignored, the remainder of the trap-clause is skipped, and program
execution jumps to the error-clause. If no errors occur in the trap-clause, execution jumps to the normal-clause at
the completion of the trap-clause.
To enter IFERR 7 THEN 7 ELSE 7 END in a program:
Press !°LL %ERROR% @%IFERR%
Example: The following program prompts for two numbers, then adds them. If only one number is supplied, the
program displays an error message and prompts again.
Program:
«
DO
"KEY IN a AND b" " "
INPUT OBJ→
Begins the main loop.
Prompts for two numbers.
UNTIL
IFERR
+
ELSE
1
Starts the loop test clause.
The error trap contains only the +
command.
If an error occurs, recalls and displays the
Too Few Arguments message for 2
seconds, then puts 0 (false) on the stack for
the main loop.
If no error occurs, puts 1 (true) on the stack
for the main loop.
END
Ends the error trap.
THEN
ERRM 5 DISP
2 WAIT
0
END
Ends the main loop. If the error trap left 0
(false) on the stack, the main loop repeats —
otherwise, the program ends.
Testing Linear Structure
The LININ command (!°%TEST% !«%LININ%) takes an algebraic equation on level 2 and a variable
on level 1 as arguments and returns 1. if the equation is linear for that variable, or 0. if it is not. For example,
'H+Y^2' 'H' LININ returns 1. because the equation is structurally linear for H. See the LININ command in
Using Conditional Structures and Commands
Conditional structures let a program make a decision based on the results of tests.
Conditional commands let you execute a true-clause or a false-clause (each of which are a single command or object).
These conditional structures and commands are contained in the PRG BRCH menu (!°%BRCH%):
IF … THEN … END structure.
IF … THEN … ELSE … END structure.
CASE … END structure.
IFT (if-then) command.
IFTE (if-then-else) function.
The IF 7 THEN 7 END Structure
The syntax for this structure is
« … IF test-clause THEN true-clause
END … »
IF … THEN … END executes the sequence of commands in the true-clause only if the test-clause evaluates to true.
The test-clause can be a command sequence (for example, A B ‰) or an algebraic (for example, 'A‰B'). If the
test-clause is an algebraic, it’s automatically evaluated to a number — you don’t need →NUM or EVAL.
IF begins the test-clause, which leaves a test result on the stack. THEN removes the test result from the stack. If the
value is nonzero, the true-clause is executed — otherwise, program execution resumes following END. See
“Conditional Examples” on page 1-15.
To enter IF 7 THEN 7 END in a program:
»
Press !°%BRCH% !%IF% .
The IFT Command
The IFT command takes two arguments: a test-result in level 2 and a true-clause object in level 1. If the test-result is
true, the true-clause object is executed — otherwise, the two arguments are removed from the stack. See
“Conditional Examples” on page 1-15.
To enter IFT in a program:
Press !°%BRCH% L!%IFT% .
The IF 7 THEN 7 ELSE 7 END Structure
The syntax for this structure is
1-36 RPL Programming
RPL Programming 1-13
To artificially cause a built-in error to occur in a program:
1. Enter the error number (as a binary integer or real number) for the error.
2. Enter the DOERR command (PRG ERROR menu).
If DOERR is trapped in an IFERR structure (described in the next topic), execution continues. If it’s not trapped,
execution is abandoned at the DOERR command and the error message appears.
To analyze an error in a program:
To get the error number for the last error, execute ERRN (PRG ERROR menu).
To get the error message for the last error, execute ERRM (PRG ERROR menu).
To clear the last-error information, execute ERR0 (PRG ERROR menu).
The error number for a user-defined error is #70000h. See the list of built-in error numbers in appendix A, “Error
and Status Messages”.
To enter CASE 7 END in a program:
1. Press !°%BRCH% !%CASE% to enter CASE … THEN …END…END
2. For each additional test-clause, move the cursor after a test-clause END and press @%CASE% to enter THEN
… END.
Conditional Examples
These examples illustrate conditional structures in programs.
Example: One Conditional Action. The programs below test the value in level 1 — if the value is positive, it’s
made negative. The first program uses a command sequence as the test-clause:
« DUP IF 0 > THEN NEG END »
The value on the stack must be duplicated because the > command removes two arguments from the stack (0. and
the copy of the value made by DUP).
The following version uses an algebraic as the test clause:
Example: The following program aborts execution if the list in level 1 contains three objects.
«
OBJ→
« DUP 0 > « NEG » IFT »
Example: One Conditional Action. This program multiplies two numbers if both are nonzero.
IF 3 ==
THEN "3 OBJECTS IN LIST" DOERR
Program:
END
«
→ x y
»
The following table summarizes error trapping commands.
Error Trapping Commands
Key
Programmable
Command
Description
DOERR
Causes an error. For a string in level 1, causes a user-defined error: the
calculator behaves just as if an ordinary error has occurred. For a binary
integer or real number in level 1, causes the corresponding built-in error.
If the error isn’t trapped in an IFERR structure, DOERR displays the
message and abandons program execution. (For 0 in level 1, abandons
execution without updating the error number or message — like −.)
%ERRN%
ERNN
Returns the error number, as a binary integer, of the most recent error.
Returns #0 if the error number was cleared by ERR0.
%ERRM%
ERRM
Returns the error message (a string) for the most recent error. Returns
an empty string if the error number was cleared by ERR0.
%ERR0%
ERR0
1-34 RPL Programming
«
IF
'x‹0'
'y‹0'
!° L L %ERROR% :
%DOERR%
« → x « x IF 'x>0' THEN NEG END » »
The following version uses the IFT command:
Clears the last error number and message.
AND
THEN
x y *
END
»
»
Creates local variables x and y containing
the two numbers from the stack.
Starts the test-clause.
Tests one of the numbers and leaves a test
result on the stack.
Tests the other number, leaving another test
result on the stack.
Tests whether both tests were true.
Ends the test-clause, starts the true-clause.
Multiplies the two numbers together only if
AND returns true.
Ends the true-clause.
The following program accomplishes the same task as the previous program:
« → x y « IF 'x AND y' THEN x y * END » »
The test-clause 'x AND y' returns “true” if both numbers are nonzero.
The following version uses the IFT command:
« → x y « 'x AND y' 'x*y' IFT » »
RPL Programming 1-15
To single-step from the middle of a program:
1. Insert a HALT command in the program where you want to begin single-stepping.
2. Execute the program normally. The program stops when the HALT command is executed, and the HLT
annunciator appears.
3. Take any action:
To see the next program step displayed in the status area and then executed, press %SST%.
To display but not execute the next one or two program steps, press %NEXT%.
To continue with normal execution, press !=.
To abandon further execution, press %KILL%.
4. Repeat the previous step as desired.
When you want the program to run normally again, remove the HALT command from the program.
To single-step when the next step is a subroutine:
To execute the subroutine in one step (“step over”), press %SST%.
To execute the subroutine step-by-step (“step into”), press %SST°%.
%SST% executes the next step in a program — if the next step is a subroutine, %SST% executes the subroutine in one
step. %SST°% works just like %SST% — except if the next program step is a subroutine, it single-steps to the first step
in the subroutine.
Example: In the previous example, you used %SST% to execute subroutine TORSA in one step. Now execute
program TORSV step by step to calculate the volume of a torus of radii a = 10 and b = 12. when you reach
subroutine TORSA, execute it step by step.
Example: Multiple Conditional Actions. The following program stores the level 1 argument in a variable if the
argument is a string, list, or program.
Program:
«
→ y
«
CASE
y TYPE 2 SAME
THEN y 'STR' STO END
y TYPE 5 SAME
THEN y 'LIST' STO END
y TYPE 8 SAME
THEN y 'PROG' STO END
END
»
»
Defines local variable y.
Starts the defining procedure.
Starts the case structure.
Case 1: If the argument is a string, stores
it in STR.
Case 2: If the argument is a list, stores it
in LIST.
Case 3: If the argument is a program,
stores it in PROG.
Ends the case structure.
Ends the defining procedure.
Select the VAR menu and enter the data. Enter the program name and start the debugging. Execute the first four
steps of the program, then check the next step.
Using Loop Structures
@·J 10 `12 O%TORSV%
You can use loop structures to execute a part of a program repeatedly. To specify in advance how many times to
repeat the loop, use a definite loop. To use a test to determine whether or not to repeat the loop, use an indefinite loop.
The next step is TORSA. Single-step into TORSA, then check that you’re at the first step of TORSA.
Loop structures let a program execute a sequence of commands several times. Loop structures are built with
commands — called structure words — that work only when used in proper combination with each other. These
loop structure commands are contained in the PRG BRCH menu (!° %BRCH%):
START … NEXT and START … STEP.
FOR … NEXT and FOR … STEP
DO … UNTIL … END.
WHILE … REPEAT … END.
%SST°% %NEXT%
In addition, the Σ function provides an alternative to definite loop structures for summations.
!°LL%RUN% %DBUG%
%SST°% (4 times)
%NEXT%
Using Definite Loop Structures
Press != != to complete subroutine and program execution. The following table summarizes the
operations for single-stepping through a program.
1-32 RPL Programming
Each of the two definite loop structures has two variations:
NEXT. The counter increases by 1 for each loop.
STEP. The counter increases or decreases by a specified amount for each loop.
RPL Programming 1-17
The START 7 STEP Structure
Program:
The syntax for this structure is
« … start finish START loop-clause increment STEP … »
Creates local variables a and b.
Calculates the surface area.
START … STEP executes the loop-clause sequence just like START … NEXT does — except that the program
specifies the increment value for the counter, rather than incrementing by 1. The loop-clause is always executed at
least once.
«
→ a b
'π^2*(b^2-a^2)'
→NUM
»
Converts algebraic to a number.
`
O TORSA K
Puts the program on the stack.
Stores the program in TORSA.
Here is a stack diagram and program listing for TORSV.
Level 2
Level 1
→
Level 1
a
b
→
volume
Program:
«
→ a b
Creates local variables a and b.
«
a b TORSA
b a - * 4 /
»
»
`
O TORSV K
Syntax
Flowchart
Start
finish
1:Start
2:finish
START
counter=start
Store finish
loop-clause
Body of loop
increment
1:increment
counter = counter +
increment
Starts a program as the defining
procedure.
Puts the numbers stored in a and b
on the stack, then calls TORSA
with those arguments.
Completes the volume calculation
using the surface area.
STEP
Is
counter ≤ finish?
yes
no
Ends the defining procedure.
START 7 STEP Structure
Puts the program on the stack.
Stores the program in TORSV.
START takes two numbers (start and finish) from the stack and stores them as the starting and ending values of the
loop counter. Then the loop-clause is executed. STEP takes the increment value from the stack and increments the
counter by that value. If the argument of STEP is an algebraic or a name, it’s automatically evaluated to a number.
Now use TORSV to calculate the volume of a torus of inner radius a = 6 and outer radius b = 8.
The increment value can be positive or negative. If it’s positive, the loop is executed again if the counter is less than
or equal to finish. If the increment value is negative, the loop is executed if the counter is greater than or equal to
finish. Otherwise, execution resumes following STEP. In the previous flowchart, the increment value is positive.
6 ` 8 J %TORSV%
To enter START 7 STEP in a program:
Press !° %BRCH% … %START%.
Example: The following program takes a number x from the stack and calculates the square of that number several
times (x/3 times):
« DUP → x « x 1 START x SQ -3 STEP » »
1-30 RPL Programming
RPL Programming 1-19
Example: System Flag. The following program sets an alarm for June 6, 2007 at 5:05 PM. It first tests the status
of system flag –42 (Data Format flag) in a conditional structure and then supplies the alarm date in the current date
format, based on the test result.
Example:
Program:
«
THEN
6.152007
Tests the status of flag –42, the Date
Format flag.
If flag –42 is clear, supplies the date in
month/day/year format.
ELSE
15.062007
If flag –42 is set, supplies the date in
day.month.year format.
END
Ends the conditional.
17.05 "TEST COMPLETE"
3 →LIST STOALARM
Sets the alarm: 17.05 is the alarm time
and “TEST COMPLETE” is the
alarm message.
IF
-42 FC?
The FOR 7 STEP Structure
The syntax for this structure is
« … start finish FOR counter loop-clause increment STEP … »
FOR … STEP executes the loop-clause sequence just like FOR … NEXT does — except that the program specifies
the increment value for counter, rather than incrementing by 1. The loop-clause is always executed at least once.
»
Syntax
Flowchart
Start
finish
1:Start
2:finish
FOR
counter=start
Store finish
loop-clause
Body of loop
increment
1:increment
Example: User Flag. The following program returns either the fractional or integer part of the number in level 1,
depending on the state of user flag 10.
Program:
counter = counter +
increment
STEP
«
IF
10 FS?
THEN
IP
ELSE
FP
END
Tests the status of user flag 10.
If flag 10 is set, returns the integer part.
yes
no
If flag 10 is clear, returns the fractional part.
Ends the conditional.
»
To use this program, you enter a number, either set flag 10 (to get the integer part) or clear flag 10 (to get the
fractional part), then run the program.
Recalling and Storing the Flag States
If you have a program that changes the state of a flag during execution, you may want it to save and restore original
flag states.
The RCLF (recall flags) and STOF (store flags) commands let you recall and store the states of the calculator’s flags.
For these commands, a 64-bit binary integer represents the states of 64 flags — each 0 bit corresponds to a flag
that’s clear, each 1 bit corresponds to a flag that’s set. The rightmost (least significant) bit corresponds to system flag
–1 or user flag 1 for the lower groups and system flag –65 or user flag 65 for the upper groups.
1-28 RPL Programming
Is
counter ≤ finish?
Starts the conditional.
FOR 7 STEP Structure
FOR takes start and finish from the stack as the beginning and ending values for the loop counter, then creates the
local variable counter as a loop counter. Next, the loop-clause is executed — counter can appear within the loop-clause.
STEP takes the increment value from the stack and increments counter by that value. If the argument of STEP is an
algebraic or a name, it’s automatically evaluated to a number.
The increment value can be positive or negative. If the increment is positive, the loop is executed again if counter is
less than or equal to finish. If the increment is negative, the loop is executed if counter is greater than or equal to finish.
Otherwise, counter is purged and execution resumes following STEP. In the previous flowchart, the increment value
is positive.
To enter FOR 7 STEP in a program:
Press !° %BRCH% … %FOR%.
Example: The following program places the squares of the integers 1, 3, 5, 7, and 9 on the stack:
« 1 9 FOR x x SQ 2 STEP »
RPL Programming 1-21
For certain calculations that involve summations, you can use the Σ function instead of loops. You can use Σ with
stack syntax or with algebraic syntax. Σ automatically repeats the addition for the specified range of the index
variable — without using a loop structure.
Example: The following programs take an integer upper limit n from the stack, then find the summation. One
program uses a FOR … NEXT loop — the other uses Σ.
n
∑j
2
Program:
j=1
Example: The following program calculates n + 2n +3n + … for a value of n. The program stops when the sum
exceeds 1000, and returns the sum and the coefficient of n.
Program:
«
DUP 1
→ n s c
Duplicates n, stores the value into n and
s, and initializes c to 1.
«
Starts the defining procedure.
«
0 1 ROT
FOR j
j SQ +
NEXT
»
DO
Initializes the summation and puts
the limits in place.
Loops through the calculation.
'c' INCR
n * 's' STO+
UNTIL
s 1000 >
Program:
«
→ n
'Σ(j=1,n,j^2)'
Uses Σ to calculate the summation.
»
Starts the loop-clause.
Increments the counter by 1. (See Using
Loop Counters.)
Calculates c × n and adds the product to
s.
Starts the test-clause.
Repeats loop until s > 1000.
END
Ends the test-clause.
s c
Puts s and c on the stack.
»
Ends the defining procedure.
»
Example: The following program uses ΣLIST to calculate the summation of all elements of a vector or matrix.
The program takes from the stack an array or a name that evaluates to an array, and returns the summation.
Program:
«
œLIST
Finds the dimensions of the array and
leaves it in a list on level 1.
Adds 1 to the list. (If the array is a vector,
the list on level 1 has only one element.
ΠLIST will error if the list has fewer than
two elements.)
Multiplies all of the list elements together.
→LIST
ΣLIST
Converts the array elements into a list, and
sums them.
OBJ→
1
+
»
1-26 RPL Programming
RPL Programming 1-23
!Ü4 *Y+Z ™+
The following program, VSPH, calculates the volume of a sphere. VSPH prompts for the radius of the sphere, then
cubes it and multiplies by 4/3 π. VSPH executes INPUT to prompt for the radius. INPUT sets Program-entry mode
when program execution pauses for data entry.
! Ü 8 *X -5 *Z
™Q2
`
Program:
Select the VAR menu and start the program.
J %EXCO%
Specifies the prompt string.
""
Specifies the command-line string.
In this case, the command line will be
empty.
Displays the prompt, puts the cursor at
the start of the command line, and
suspends the program for data input
Minimum and Maximum Array Elements
INPUT
This section contains two programs that find the minimum or maximum element of an array:
MNX uses a DO…UNTIL…END (indefinite) loop.
MNX2 uses a FOR…NEXT (definite) loop.
MNX (Minimum or Maximum Element—Version 1)
MNX finds the minimum or maximum element of an array on the stack.
Level 1
→
Level2
Level 1
[[ array ]]
→
[[ array ]]
Z min or Z max
OBJ→
Converts the result string into its
component object — a real number.
3 ^
4 * 3 / π * →NUM
Completes the calculation.
»
`OVSPH ‰
Techniques used in MNX
DO…UNTIL…END (indefinite loop). The DO clause contains the sort instructions. The UNTIL clause
contains the system-flag test that determines whether to repeat the sort instructions.
User and system flags for logic control:
User flag 10 defines the sort: When flag 10 is set, MNX finds the maximum element; when flag 10 is clear, it
finds the minimum element. You determine the state of flag 10 at the beginning of the program.
System flag –64, the Index Wrap Indicator flag, determines when to end the sort. While flag –64 is clear, the sort
loop continues. When the index invoked by GETI wraps back to the first array element, flag –64 is automatically
set, and the sort loop ends.
Nested conditional. An IF…THEN…END conditional is nested in the DO…UNTIL…END conditional,
and determines the following:
Whether to maintain the current minimum or maximum element, or make the current element the new
minimum or maximum.
The sense of the comparison of elements (either < or >) based on the status of flag 10.
Custom menu. MNX builds a custom menu that lets you choose whether to sort for the minimum or maximum
element. Key 1, labeled %MAX%, sets flag 10. Key 2, labeled %MIN%, clears flag 10.
Logical function. MNX executes XOR (exclusive OR) to test the combined state of the relative value of the two
elements and the status of flag 10.
2-16 RPL Programming Examples
«
Stores the program in VSPH.
Example:
Execute VSPH to calculate the volume of a sphere of radius 2.5.
J %VSPH%
Key in the radius and continue program execution.
2.5 `
RPL Programming 1-41
To process the result string from INPUT:
MULTI (Multiple Execution)
Given an object and a program that acts on the object, MULTI applies the program to the object repeatedly until
the program no longer changes the object.
Level 2
Level 1
→
Level 1
object
«program»
→
objectresult
Techniques used in MULTI
DO…UNTIL…END (indefinite loop). The DO clause contains the steps to be repeated. The UNTIL clause
contains the test that repeats both clauses again (if false) or exits (if true).
Programs as arguments. Although programs are commonly named and then executed by calling their names,
programs can also be put on the stack and used as arguments to other programs.
Evaluation of local variables. The program argument to be executed repeatedly is stored in a local variable.
It’s convenient to store an object in a local variable when you don’t know beforehand how many copies you’ll
need. An object stored in a local variable is simply put on the stack when the local variable is evaluated. MULTI
uses the local variable name to put the program argument on the stack and then executes EVAL to execute the
program.
MULTI program listing
Program:
«
→ p
«
DO
DUP
p EVAL
DUP
ROT
UNTIL
SAME
END
»
»
`OMULTI K
For simple input, use OBJ→ to convert the string into its corresponding objects.
For sensitive input, use the V option for INPUT to check for valid objects, then use OBJ→ to convert the string
into those objects.
For special input, process the input as a string object, possibly extracting data as substrings.
Example: The program VSPH on page 1-41 uses an empty command-line string.
The program SSEC on page 1-44 uses a command-line string whose characters form a pattern. The program
extracts substrings from the result string.
Example: The command-line string "@UPPER [email protected]" displays @UPPER LIMIT◄ in the command line.
If you press 200 `the return string is "@UPPER [email protected]". When OBJ→ extracts the text from the
string, it strips away the @ characters and the enclosed characters, and it returns the number 200. (See “Creating
Example: The following program, TINPUT, executes INPUT to prompt for the inner and outer radii of a torus,
then calls TORSA (page 1-29) to calculate its surface area. TINPUT prompts for a and b in a two-row command
line. The level 1 argument for INPUT is a list that contains:
The command-line string, which forms the tags and delimiters for two tagged objects.
An embedded list specifying the initial cursor position.
The V parameter to check for invalid syntax in the result string.
Program:
Creates a local variable p that contains the
program from level 1.
Begins the defining procedure.
Begins the DO loop clause.
Makes a copy of the object, now in level 1.
Applies the program to the object,
returning its new version.
Makes a copy of the new object.
Moves the old version to level 1.
Begins the DO test clause.
Tests whether the old version and the new
version are the same.
Ends the DO structure.
Ends the defining procedure.
"Key in a, b"
The level 2 string, displayed at the top of
the stack area.
{ ":a::b:" {1 0} V }
The level 1 list contains a string, a list, and
the verify option. (To key in the string,
press @ Õ ! ê a ™ @
ë ! ê b.
After you press `to put the finished
program on the stack, the string is shown
on one line, with indicating the newline
character.) The embedded list puts the
insert cursor at the end of row 1.
Displays the stack and command-line
strings, positions the cursor, sets
Program-entry mode, and suspends
execution for input.
Converts the string into its component
objects — two tagged objects.
INPUT
OBJ→
TORSA
Stores the program in MULTI.
Checksum: # 22693d
Bytes:
56
«
Calls TORSA to calculate the surface area.
»
`O TINPUT ‰
Stores the program in TINPUT.
MULTI is demonstrated in the next programming example.
2-14 RPL Programming Examples
RPL Programming 1-43
Program:
Techniques used in MEDIAN
Arrays, lists, and stack elements. MEDIAN extracts a column of data from ΣDAT in vector form. To convert
the vector to a list, MEDIAN puts the vector elements on the stack and combines them into a list. From this list
the median is calculated using %TILE.
"Key in S.S. #"
{ "
- " -1 }
The median for the mth column is calculated first, and the median for the first column is calculated last. As each
median is calculated, ROLLD is used to move it to the top of the stack.
After all medians are calculated and positioned on the stack, they’re combined into a vector.
FOR…NEXT (definite loop with counter). MEDIAN uses a loop to calculate the median of each column.
Because the medians are calculated in reverse order (last column first), the counter is used to reverse the order of
the medians.
Required Program
%TILE (page 2-10) sorts a list and returns the value of a specified percentile.
MEDIAN program listing (Note: Use approximate mode for this program and example).
Program:
«
RCLΣ
Puts a copy of the current statistics matrix ΣDAT on
the stack.
DUP SIZE
Puts the list { n m } on the stack, where n is the
number of rows in ΣDAT and m is the number of
columns.
Puts n and m on the stack, and drops the list size.
OBJ→ DROP
→ s n m
«
'ΣDAT' TRN
1 m
FOR j
Σ-
Creates local variables for s, n, and m.
Begins the defining procedure.
Recalls and transposes ΣDAT.
Now n is the number of columns in ΣDAT and m is
the number of rows. (To key in the Σ character, press
@½, then delete the parentheses.)
Specifies the first and last rows.
For each row, does the following: Extracts the last row
in ΣDAT.
Initially this is the mth row, which corresponds to the
mth column in the original ΣDAT.
(To key in the Σ– command, use @µ.)
n →LIST
Puts the row elements on the stack. Drops the index
list { n }.
Makes an n-element list.
50 %TILE
Sorts the list and calculates its median.
j ROLLD
Moves the median to the proper stack level.
OBJ→ DROP
NEXT
2-12 RPL Programming Examples
«
INPUT
DUP 1 3 SUB
SWAP
8 11 SUB
Prompt string.
Command-line string (3 spaces
before the first -, 2 spaces
between, and 4 spaces after the
last -).
Suspends the program for input.
Copies the result string, then
extracts the first three and last
four digits in string form.
»
O SSEC ‰
Stores the program in SSEC.
Using INFORM and CHOOSE for Input
You can use input forms (dialog boxes), and choose boxes for program input. Program that contain input forms or
choose boxes wait until you acknowledge them (%OK% or −) before they continue execution.
If OK is pressed, CHOOSE returns the selected item (or its designated returned value) to level 2 and a 1 to level 1.
INFORM returns a list of field values to level 2 and 1 to level 1.
Both the INFORM and CHOOSE commands return 0 if CANCEL is pressed.
To set up an input form:
1. Enter a title string for the input for the input form (use @Õ).
2. Enter a list of field specifications.
3. Enter a list of format options.
4. Enter a list of reset values (values that appear when RESET is pressed).
5. Enter a list of default values.
6. Execute the INFORM command.
Example: Enter a title "FIRST ONE" `.
Specify a field { "Name:" } `.
Enter format options (one column, tabs stop width five) { 1 5 } `.
Enter reset value for the field { "THERESA" } `.
Enter default value for the field { "WENDY" } `.
Execute INFORM (!°L%IN% %INFOR%).
The screen on the left appears. Press L%RESET% %OK% and the screen on the right appears.
Increments j and repeats the loop.
RPL Programming 1-45
Example: Switch to DEC base, display #100 in all bases, and check that BDISP restored the base to DEC.
Clear the stack and select the MTH BASE menu. Make sure the current base is DEC and enter #100.
‚·
‚ã%DEC%
!â100 `
Execute BDISP.
J %BDISP%
−
‚ã
Program:
Creates an input form that gets
the name and phone number.
The two fields accept only
strings (object type 2).
DUP
IF { NOVAL } HEAD POS
THEN
DROP
"Complete both fields
before pressing OK"
MSGBOX
ELSE 1
→LIST NAMES + SORT
'NAMES' STO
Checks if either field in the
new entry is blank.
END
END
END
Ends the IF structure, the
WHILE loop, and the CASE
statement.
Case 2 (View a Number).
c 2 ==
THEN
IF { } NAMES SAME
THEN
"YOU MUST ADD A NAME FIRST"
MSGBOX
Although the main nested program left the calculator in BIN base,
PRESERVE restored DEC base. To check that BDISP also works for
real numbers, try 144.
J
ELSE
WHILE
"VIEW A NUMBER"
NAMES 1 CHOOSE
REPEAT
→STR MSGBOX
144 %BDISP%
Median of Statistics Data
This section contains two programs:
%TILE returns the value of a specified percentile of a list.
MEDIAN uses %TILE to calculate the median of the current statistics data.
%TILE (Percentile of a list)
%TILE sorts a list, then returns the value of a specified percentile of the list. For example, typing {list} 50 and
pressing %©TILE% returns the median (50th percentile) of the list.
Level 2
Level 1
→
Level 1
{ list }
n
→
n percentile of sorted list
2-10 RPL Programming Examples
{
{ "NAME:" "ENTER NAME" 2 }
{ "PHONE:" "ENTER A PHONE
NUMBER" 2 } }
{ } { } { } INFORM
REPEAT
END
END
END
If either one is, displays a
message.
If neither are, adds the list to
NAMES, sorts it, and stores it
back in NAMES.
Checks if NAMES is an empty
list.
If it is, displays a message.
If NAMES isn’t empty, creates
a choose box using NAMES as
choice items.
When OK is pressed, the
second item in the NAMES
list pairs (the phone number) is
returned. Makes it a string and
displays it.
Ends the WHILE loop, the IF
structure, and the CASE
statement.
END
»
END
»
Ends the CASE structure,
marks the end of the local
variable defining procedure,
ends the WHILE loop, and
marks the end the program.
`OPHONES ‰
Stores the program in
PHONES.
th
RPL Programming 1-47
Techniques used in BDISP
IFERR…THEN…END (error trap). To accommodate real-number arguments, BDISP includes the
command R→B (real-to-binary). However, this command causes an error if the argument is already a binary integer.
To maintain execution if an error occurs, the R→B command is placed inside an IFERR clause. No action is
required when an error occurs (since a binary number is an acceptable argument), so the THEN clause contains
no commands.
Enabling LASTARG. In case an error occurs, the LASTARG recovery feature must be enabled to return the
argument (the binary number) to the stack. BDISP clears flag –55 to enable this.
FOR…NEXT loop (definite loop with counter). BDISP executes a loop from 1 to 4, each time displaying n
(the number) in a different base on a different line. The loop counter (named j in this program) is a local variable
created by the FOR…NEXT program structure (rather than by a → command), and automatically incremented by
NEXT.
Unnamed programs as arguments. A program defined only by its « and » delimiters (not stored in a variable)
is not automatically evaluated, but is placed on the stack and can be used as an argument for a subroutine. BDISP
demonstrates two uses for unnamed program arguments:
BDISP contains a main program argument and a call to PRESERVE. This program argument goes on the
stack and is executed by PRESERVE.
BDISP also contains four program arguments that “customize” the action of the loop. Each of these contains a
command to change the binary base, and each iteration of the loop evaluates one of these arguments.
When BDISP creates a local variable for n, the defining procedure is an unnamed program. However, since this
program is a defining procedure for a local variable structure, it is automatically executed.
Using KEY for Keystroke Input
You can use KEY inside an indefinite loop to “pause” execution until any key — or a certain key — is pressed.
To enter a KEY loop in a program
1. Enter the loop structure.
2. In the test-clause sequence, enter the KEY command (PRG IN menu) plus any necessary test commands.
3. In the loop-clause, enter no commands to give the appearance of a “paused” condition.
KEY returns 0 to level 1 when the loop begins. It continues to return 0 until a key is pressed — then it returns 1 to
level 1 and the two-digit row-column number of the pressed key to level 2. For example, `returns 105, and !
returns 81.)
The test-clause should normally cause the loop to repeat until a key is pressed. If a key is pressed, you can use
comparison tests to check the value of the key number. (See “Using Indefinite Loop Structures” on page 1-22 and
“Using Comparison Functions” on page 1-11.)
To respond to a KEY loop while running a program:
Press any key. (A prefix key such as !or ~is a valid key.)
Example: The following program segment returns 1 to level 1 if + is pressed, or 0 to level 1 if any other key is
pressed:
« … DO UNTIL KEY END 95 == … »
Required Programs
Output
You can determine how a program presents its output. You can make the output more recognizable using the
techniques described in this section.
(Pad with Leading Spaces) expands a string to 22 characters so that DISP shows it right-justified.
PRESERVE
PRESERVE
stores the current status, executes the main nested program, and restores the status.
Data Output Commands
Key
Command
Description
!°L%OUT%:
2-8 RPL Programming Examples
%PVIEW%
PVIEW
Displays PICT starting at the given coordinates.
%TEXT%
TEXT
Displays the stack display.
%CLLCD%
CLLCD
%DISP%
DISP
%FREEZ%
FREEZE
“Freezes” a specified area of the display until a key press.
%MSGBO%
MSGBOX
Creates a user-defined message box.
%BEEP%
BEEP
Blanks the stack display.
Displays an object in the specified line.
Sounds a beep at a specified frequency (in hertz, level 2)
and duration (in seconds, level 1).
RPL Programming 1-49
Example: The following program TSTRING is identical to TINPUT, except that it converts the program result to
a string and appends a labeling string to it.
Program:
Program:
«
→STR
WHILE
DUP SIZE 22 <
REPEAT
" " SWAP +
END
Makes sure the object is in string form. (Strings
are unaffected by this command.)
Repeats if the string contains fewer than 22
characters.
"Key in a, b"
{ ":a::b:" {1 0} V}
INPUT OBJ→
TORSA
→STR
"Area = "
SWAP +
End loop.
»
«
CLLCD 1 DISP
3 FREEZE
Converts the result to a string.
Enters the labeling strings.
Swaps and adds the two strings.
Displays the resultant string,
without its delimiters, in line 1 of
the display.
»
Checksum: # 6577d
Bytes:
57.5
`OTSTRING ‰
Execute TSTRING to calculate the area of the torus with a = 1.5 and b = 1.85. The labeled answer appears in the
status area.
PAD is demonstrated in the program BDISP.
@·J%TSTRI%
PRESERVE (Save and Restore Previous Status)
PRESERVE stores the current calculator (flag) status, executes a program from the stack, and restores the previous
status.
Level 1
→
Level 1
«program»
→
result of program
'program'
→
result of program
1.5 ˜1.85 `
Pausing to Display Output
To pause to display a result:
Techniques used in PRESERVE
Preserving calculator flag status. PRESERVE uses RCLF (recall flags) to record the current status of the
calculator in a binary integer, and STOF (store flags) to restore the status from that binary integer.
Local-variable structure. PRESERVE creates a local variable structure to briefly remove the binary integer
from the stack. Its defining procedure simply evaluates the program argument, then puts the binary integer back
on the stack and executes STOF.
Error trapping. PRESERVE uses IFERR to trap faulty program execution on the stack and to restore flags.
DOERR shows the error if one occurs.
Stores the program in TSTRING.
1. Enter commands to set up the display.
2. Enter the number of seconds you want to pause.
3. Enter the WAIT command (PRG IN menu).
WAIT suspends execution for the number of seconds in level 1. You can use WAIT with DISP to display messages
during program execution — for example, to display intermediate program results. (WAIT interprets arguments 0
and –1 differently — see “Using WAIT for Keystroke Input” on page 1-48.)
Using MSGBOX to Display Output
To set up a message box:
1. Enter a message string.
2. Execute the MSGBOX command.
Example: Enter the string "HELLO, WORLD" `.
Execute MSGBOX (!°L %OUT% %MSGBO%).
The following message appears:
2-6 RPL Programming Examples
RPL Programming 1-51
FIBT (Comparing Program-Execution Time)
FIB1 calculates intermediate values Fi more than once, while FIB2 calculates each intermediate Fi only once.
Consequently, FIB2 is faster. The difference in speed increases with the size of n because the time required for FIB1
grows exponentially with n, while the time required for FIB2 grows only linearly with n.
FIBT executes the TICKS command to record the execution time of FIB1 and FIB2 for a given value of n.
Level 1
→
Level 3
Level 2
Level 1
n
→
Fn
FIB1 TIME: z
FIB2 TIME: z
The program remains halted until it’s resumed by a CONT command, such as by pressing !æ. If you create
a custom menu for input, you can include a CONT command to automatically resume the program when you press
Example: The following program activates page 1 of the MODES ANGL menu and prompts you to set the angle
mode. After you press the menu key, you have to press !æto resume execution.
« 65 MENU "Select Angle Mode" PROMPT »
Example: The PIE program on page 2-34 assigns the CONT command to one key in a temporary menu.
Example: The MNX program on page 2-16 sets up a temporary menu that includes a program containing CONT
to resume execution automatically.
Techniques used in FIBT
Structured programming. FIBT calls both FIB1 and FIB2.
You can use a custom menu to run other programs. That menu can serve as the main interface for an application (a
collection of programs).
Programmatic use of calculator clock. FIBT executes the TICKS command to record the start and finish of
each subprogram.
Labeling output. FIBT tags each execution time with a descriptive message.
Required Programs
FIB1 (page 2-1) calculates Fn using recursion.
Example: The following program, WGT, calculates the mass of an object in either English or SI units given the
weight. WGT displays a temporary custom menu, from which you run the appropriate program. Each program
prompts you to enter the weight in the desired unit system, then calculates the mass. The menu remains active until
you select a new menu, so you can do as many calculations as you want. Enter the following list and store it in LST:
FIB2 (page 2-2) calculates Fn using looping.
FIBT program listing
Program:
1. Create a custom menu list for the application that specifies programs as menu objects.
2. Optional: Create a main program that sets up the application menu — either as the CST menu or as a temporary
{
{ "ENGL" « "ENTER Wt in POUNDS" PROMPT 32.2 / » }
«
DUP TICKS SWAP
FIB1 SWAP TICKS SWAP
- B→R 8192 /
"FIB1 TIME" →TAG
ROT TICKS SWAP FIB2
TICKS
SWAP DROP SWAP
- B→R 8192 /
"FIB2 TIME" →TAG
{ "SI" « "ENTER Wt in NEWTONS" PROMPT 9.81 / » }
Copies n, then executes FIB1, recording the
start and stop time.
Calculates the elapsed time, converts it to a
real number, and converts that number to
seconds.
Leaves the answer returned by FIB1 in level 2.
Tags the execution time.
Executes FIB2, recording the start and stop
time.
Drops the answer returned by FIB2 (FIB1
returned the same answer). Calculates the
elapsed time for FIB2 and converts to seconds.
Tags the execution time.
»
`OFIBT K
Checksum: # 23164d
Bytes:
129
2-4 RPL Programming Examples
Stores the program in FIBT.
}
OLST ‰
Program:
stored in LST.
`OWGT ‰
Stores the program in WGT.
Use WGT to calculate the mass of an object of weight 1.25 N. The program sets up the menu, then completes
execution.
J%WGT%
Select the SI unit system, which starts the program in the menu list.
%SI%
Key in the weight, then resume the program.
RPL Programming 1-53
Store the voltage value. Then key in and store the current value. Solve for the impedance.
Techniques used in FIB1
IFTE (if -then-else function). The defining procedure for FIB1 contains the conditional function IFTE, which
can take its argument either from the stack or in algebraic syntax.
Recursion. The defining procedure for FIB1 is written in terms of FIB1, just as Fn is defined in terms of Fn-1 and
Fn-2.
%%E%% !Ü .37 [email protected] 68 %%I%%
!%%Z%%
FIB1 program listing
Program:
«
→ n
'IFTE(n‰1,
n,
FIB1(n-1)+FIB1(n-2))'
Defines local variable n.
The defining procedure, an
algebraic expression. If n ≤ 1,
Fn = n, else Fn = Fn-1+Fn-2.
Recall the current and double it. Then find the voltage.
@%%I%% 2 *%%I%% !%%E%%
»
Stores the program in FIB1.
`OFIB1 K
Checksum: # 14909d (press O%FIB1% !°#MEM# %BYTES%)
Bytes:
113.5
Press (!&H)%FMT% %STD% and L %MODES %ANGLE %RECT% to restore Standard and Rectangular modes.
Example: Calculate F6. Calculate F10 using algebraic syntax.
Turning Off the Calculator from a Program
First calculate F6.
To turn off the calculator in a program:
Execute the OFF command (PRG RUN menu).
J
6 %FIB1%
The OFF command turns off the calculator. If a program executes OFF, the program resumes when the calculator
is next turned on.
Next, calculate F10 using algebraic syntax.
O%FIB1% !Ü10 N
FIB2 (Fibonacci Numbers, Loop Version
Level 1
→
Level 1
n
→
Fn
Techniques used in FIB2
IF7THEN7ELSE7END. FIB2 uses the program-structure form of the conditional. (FIB1 uses IFTE.)
START7NEXT (definite loop). To calculate Fn, FIB2 starts with F0 and F1 and repeats a loop to calculate
successive values of Fi.
2-2 RPL Programming Examples
RPL Programming 1-55
2
arc cos  --- + arc cos ( x )
3
Command:
Result:
ACOSH
Type:
Description:
Access:
Flags:
Input/Output:
MNX program listing
ACOS2S(ACOS(2/3)+ACOS(X))
Program:
π/2-ASIN(2/3)+π/2-ASIN(X)
ASIN2C, ASIN2T, ATAN2S
Analytic Function
Inverse Hyperbolic Cosine Analytic Function: Returns the inverse hyperbolic cosine of the
argument.
For real arguments x < 1, ACOSH returns the complex result obtained for the argument (x, 0).
The inverse of ACOSH is a relation, not a function, since COSH sends more than one argument to
the same result. The inverse relation for COSH is expressed by ISOL as the general solution:
s1*ACOSH(Z)+2*π*i*n1
The function ACOSH is the inverse of a part of COSH, a part defined by restricting the domain
of COSH such that:
• each argument is sent to a distinct result, and
• each possible result is achieved.
The points in this restricted domain of COSH are called the principal values of the inverse relation.
ACOSH in its entirety is called the principal branch of the inverse relation, and the points sent by
ACOSH to the boundary of the restricted domain of COSH form the branch cuts of ACOSH.
The principal branch used by the calculator for ACOSH was chosen because it is analytic in the
regions where the arguments of the real-valued inverse function are defined. The branch cut for the
complex-valued hyperbolic arc cosine function occurs where the corresponding real-valued
function is undefined. The principal branch also preserves most of the important symmetries.
The graphs below show the domain and range of ACOSH. The graph of the domain shows
where the branch cut occurs: the heavy solid line marks one side of the cut, while the feathered
lines mark the other side of the cut. The graph of the range shows where each side of the cut is
mapped under the function.
These graphs show the inverse relation s1*ACOSH(Z)+2*π*i*n1 for the case s1 = 1 and n1 = 0.
For other values of s1 and n1, the horizontal half-band in the lower graph is rotated to the left and
translated up and down. Taken together, the bands cover the whole complex plane, which is the
domain of COSH.
View these graphs with domain and range reversed to see how the domain of COSH is restricted
to make an inverse function possible. Consider the horizontal half-band in the lower graph as the
restricted domain Z = (x, y). COSH sends this domain onto the whole complex plane in the range
W = (u, v) = COSH(x, y) in the upper graph.
…Ñ HYPERBOLIC ACOSH
(Ñ is the right-shift of the 8key).
Principal Solution (–1), Numerical Results (–3)
Level 1/Argument 1
z
'symb'
ASINH, ATANH, COSH, ISOL
3-8 Full Command and Function Reference
«
Level 1/Item 1
→
acosh z
→
'ACOSH(symb)'
{{
«
{
«
"MAX"
10 SF CONT » }
"MIN"
10 CF CONT » }}
"Sort for MAX or MIN?"
PROMPT
Defines the option menu. %MAX% sets
flag 10 and continues execution.
%MIN% clears flag 10 and continues
execution.
Displays the temporary menu and a
prompt message.
1 GETI
Gets the first element of the array.
DO
Begins the DO loop.
ROT ROT GETI
4 ROLL DUP2
IF
> 10 FS? XOR
Puts the index and the array in levels
1 and 2, then gets the new array
element.
Moves the current minimum or
maximum array element from level 4
below 1, then copies both.
Tests the combined state of the
relative value of the two elements and
the status of flag 10.
THEN
SWAP
END
If the new element is either less than
the current maximum or greater than
the current minimum, swaps the new
element into level 1.
DROP
Drops the other element off the
stack.
Begins the DO test-clause.
Tests if flag –64 is set — if the index
reached the end of the array.
Ends the DO loop.
Swaps the index to level 1 and drops
UNTIL
-64 FS?
END
»
`OMNX K
Stores the program in MNX.
Checksum: # 20991d
Bytes:
194.5
Example: Find the maximum element of the following matrix:
12 56
45 1
9 14
RPL Programming Examples 2-17
ACK has no effect on control alarms. Control alarms that come due are automatically
acknowledged and saved in the system alarm list.
Access:
Flags:
Input/Output:
ACKALL
Type:
Description:
Access:
Flags:
Input/Output:
ACOS
Type:
Description:
(Ó is the right-shift of the 9 key).
…Ó TOOLS ALRM ACK
Repeat Alarms Not Rescheduled (–43), Acknowledged Alarms Saved (–44)
None
ACKALL
Command
Acknowledge All Alarms Command: Acknowledges all past-due alarms.
ACKALL clears the alert annunciator if there are no other active alert sources (such as a low
battery condition).
ACKALL has no effect on control alarms. Control alarms that come due are automatically
acknowledged and saved in the system alarm list.
MNX2 program listing
Program:
«
{{ "MAX"
« 10 SF CONT » }
{ "MIN"
« 10 CF CONT » }}
"Sort for MAX or MIN?"
PROMPT
DUP OBJ→
Defines the temporary option menu. %MAX%
sets flag 10 and continues execution. %MIN%
clears flag 10 and continues execution.
Displays the temporary menu and a
prompting message.
Copies the array. Returns the individual array
elements to levels 2 through nm+1, and
returns the list containing n and m to level 1.
Sets the initial counter value.
Converts the list to individual elements on
the stack.
…Ó TOOLS ALRM ACKALL
( Ó is the right-shift of the 9 key).
Repeat Alarms Not Rescheduled (–43), Acknowledged Alarms Saved (–44)
None
ACK
1
SWAP OBJ→
DROP * 1 -
Drops the list size, then calculates the final
counter value (nm - 1).
Analytic Function
Arc Cosine Analytic Function: Returns the value of the angle having the given cosine.
For a real argument x in the domain –1 ≤x ≤ 1, the result ranges from 0 to 180 degrees (0 to π
A real argument outside of this domain is converted to a complex argument, z = x + 0i, and the
result is complex.
The inverse of COS is a relation, not a function, since COS sends more than one argument to the
same result. The inverse relation for COS is expressed by ISOL as the general solution
s1*ACOS(Z)+2*π*n1
The function ACOS is the inverse of a part of COS, a part defined by restricting the domain of
COS such that:
• each argument is sent to a distinct result, and
• each possible result is achieved.
The points in this restricted domain of COS are called the principal values of the inverse relation.
ACOS in its entirety is called the principal branch of the inverse relation, and the points sent by
ACOS to the boundary of the restricted domain of COS form the branch cuts of ACOS.
The principal branch used by the calculator for ACOS was chosen because it is analytic in the
regions where the arguments of the real-valued inverse function are defined. The branch cut for the
complex-valued arc cosine function occurs where the corresponding real-valued function is
undefined. The principal branch also preserves most of the important symmetries.
The graphs below show the domain and range of ACOS. The graph of the domain shows where
the branch cuts occur: the heavy solid line marks one side of a cut, while the feathered lines mark
the other side of a cut. The graph of the range shows where each side of each cut is mapped
under the function.
These graphs show the inverse relation s1*ACOS(Z)+2*π*n1 for the case s1=1 and n1 = 0. For
other values of s1 and n1, the vertical band in the lower graph is translated to the right or to the
left. Taken together, the bands cover the whole complex plane, which is the domain of COS.
FOR n
Starts the FOR…NEXT loop.
3-6 Full Command and Function Reference
DUP2
IF
> 10 FS? XOR
THEN
SWAP
END
DROP
Saves the array elements to be tested (initially
the last two elements). Uses the last array
element as the current minimum or
maximum.
Tests the combined state of the relative value
of the two elements and the status of flag 10.
If the new element is either less than the
current maximum or greater than the current
minimum, swaps the new element into level
1.
Drops the other element off the stack.
Ends the FOR…NEXT loop.
NEXT
»
`OMNX2 K
Stores the program in MNX2.
Checksum: # 6992d
Bytes:
188.5
Example: Use MNX2 to find the minimum element of the matrix from the previous example:
12 56
45 1
9 14
Enter the matrix (or retrieve it from the previous example).
RPL Programming Examples 2-19
Terms Used in Stack Diagrams
Term
Description
arg
Argument.
[ array ]
Real or complex vector or matrix.
[ C-array ]
Complex vector or matrix.
date
Date in form MM.DDYYYY or DD.MMYYYY.
{ dim }
List of one or two array dimensions (real numbers).
'global'
Global name.
grob
Graphics object.
HMS
A real-number time or angle in hours-minutes-seconds format.
{ list }
List of objects.
local
Local name.
[[ matrix ]]
Real or complex matrix.
n or m
Positive integer real number (rounded if noninteger)
:nport:
Backup identifier.
:nport: nlibrary
Library identifier.
#n
Binary integer.
{ #n #m }
Pixel coordinates. (Uses binary integers.)
'name'
Global or local name.
obj
Any object.
PICT
Current graphics object.
« program »
Program.
[ R-array ]
Real vector or matrix.
"string"
Character string.
'symb'
Expression, equation, or name treated as an algebraic.
T/F
Test result used as an argument: zero (false) or non-zero (true) real number.
0/1
Test result returned by a command: zero (false) or one (true).
time
Time in form HH.MMSSs.
[ vector ]
Real or complex vector.
x or y
Real number.
x_unit
Unit object, or a real number treated as a dimensionless object.
(x,y)
Complex number in rectangular form, or user-unit coordinate.
z
Real or complex number.
3-4 Full Command and Function Reference
Program:
1 CF
a DUP SIZE
DUP SIZE
IF 1 ==
THEN 1 SF 1 +
SWAP OBJ→ OBJ→ DROP
1 + ROLL
ELSE DROP2 a OBJ→
END DUP OBJ→ DROP *
SWAP OVER 2 +
ROLLD →LIST
1 p DOSUBS
OBJ→ 1 + ROLL
IFERR
IF 1 FS?
THEN OBJ→ DROP
→LIST
END →ARRY
THEN
OBJ→
IF 1 FC?C
THEN DROP
END → n m
« 1 n
FOR i
m →LIST
'm*(n-i)+i' EVAL
ROLLD
Make sure the flag 1 is clear to begin the
procedure.
Retrieve the dimensions of the array.
Determine if the array is a vector.
If array is a vector, set flag 1 and add a second
dimension by treating the vector as an n × 1
matrix.
Disassemble the original vector, leaving the
element count, n, in level 1.
Roll the elements up the stack and bring the
“matrix” dimensions of the vector to level 1.
If array is a matrix, clean up the stack and
decompose the matrix into its elements, leaving
its dimension list on level 1.
Duplicate the dimension list and compute the
total number of elements.
Roll up the element count and combine all
elements into a list. Note that the elements in
the list are in row-major order.
Recalls the program and uses it as an argument
for DOSUBS (DOLIST works in this case as
well). Result is a list of transformed elements.
Disassembles the result list and brings the array
dimensions to level 1.
Begins the error-trapping structure. Its purpose
is to find and handle the cases when the result
list contains symbolic elements.
Was original array a vector? If the original array
was a vector, then drop the second dimension
(1) from the dimension list.
Convert the elements into an array with the
given dimensions. If there are symbolic elements
present, an error will be generated and the error
clause which follows will be executed.
Begin the error clause.
Put the array dimensions on levels 2 and 1. If
the array is a vector, level 1 contains a 1.
Is original array a matrix? Clear flag 1 after
performing the test.
Drop the number of matrix elements.
Store the array dimensions in local variables.
Begin local variable structure and initiate
FOR…NEXT loop for each row.
Collect a group of elements into a row (a list).
Computes the number of elements to roll so
that the next row can be collected.
RPL Programming Examples 2-21
first case, it returns the numeric arccosine; in the second, it returns the symbolic arccosine expression of the
argument.
Some commands affect a calculator state — a mode, a reserved variable, a flag, or a display — without taking any
arguments from the stack or returning any results to the stack. No stack diagrams are shown for these commands.
Other commands may have more complicated input or output that is easier to explain in prose. These commands
do not show stack diagrams either and instead have separate Input and Output sections.
Other Provided Details
In addition to the Input/Output and Type, for each operation in the alphabetical list, some or all of the following
details are provided:
Description:
A description of the operation.
Access:
The menu or choose-list on which an operation can be found, and the keys that you press to access
it. If the operation is on a sub-menu, the sub-menu name is in SMALL CAPITALS after the keys.
CAS commands that are not in any of the other menus on the keyboard can be accessed from the
…µ menu. Most CAS commands can also be accessed from the CASCMD choose-list, from
Flags:
Details of which flag settings affect the operation of the function or command. See also the section
below on CAS Settings.
Example:
An example of the function or command. Some examples are also available in the built-in CAS
help on the calculator or in chapters 11 to 16 in the User’s Guide. Most of the examples given here
are shown in Algebraic mode, but can be transferred to RPN mode according to the descriptions
given in “Input” and “Output”.
Related functions or commands.
Parallel Processing with Lists
nBASE program listing
Program:
1 CF 0 RND SWAP 0 RND RCLF
Clear flag 1, round both arguments to
integers and recall flag settings.
→ b n f
Store the base, number and flag settings
in local variables.
Begin the outer local variable structure.
«
STD n LOG b LOG /
Sets “standard” display mode and
computes the ratio of the common
logarithms of number and base.
10 RND
Rounds result to remove imprecision in
last decimal place.
IP n 0
Find the integer part of log ratio, recall
the original number, and initialize the
counter variable k for use in the
DO...UNTIL loop.
Store the values in local variables.
→ i m k
«
""
DO
'm' EVAL b i
'k' EVAL - ^
This feature is discussed in greater detail in Appendix G.
As a rule-of-thumb, a command can use parallel list processing if all the following are true:
The command checks for valid argument types. Commands that apply to all object types, such as DUP, SWAP,
ROT, and so forth, do not use parallel list processing.
The command takes exactly one, two, three, four, or five arguments, none of which may itself be a list.
Commands, such as →LIST, that have an indefinite number of arguments do not use parallel list processing.
The command is not a programming branch command (IF, FOR, CASE, NEXT, and so forth).
There are also a few commands (PURGE, DELKEYS, SF and FS? are examples) that have list processing capability
built into their definitions, and so do not also use the parallel list processing feature.
How Commands Are Alphabetized
Commands appear in alphabetical order. Command names that contain special (non-alphabetic) characters are
organized as follows:
For commands that contain both special and alphabetic characters:
A special character at the start of a command name is ignored. Therefore, the command %CH follows the
command CF and precedes the command CHOOSE.
A special character within or at the end of a command name is considered to follow “Z” at the end of the
alphabet. Therefore, the command R→B follows the command RSWP and precedes the command R→C. The
only exception would be the “Σ” character which, when not the first character in the name, is alphabetized as if
it were the string “SIGMA”. An example is “NΣ”, which falls between NOVAL and NSUB.
Commands that contain only special characters appear at the end of the dictionary.
3-2 Full Command and Function Reference
«
DUP2 MOD
IF DUP 0 ==
'm' EVAL b Š
AND
Begin inner local variable structure,
enter an empty string and begin the
DO...UNTIL...END loop.
Compute the decimal value of the
(i – k) th position in the string.
Makes a copy of the arguments and
computes the decimal value still
remaining that must be accounted for
by other positions.
Is the remainder zero and m ≥ b?
THEN 1 SF
END 'm' STO
/ IP
If the test is true, then set flag 1.
Store the remainder in m. Compute the
number of times the current positionvalue goes into the remaining decimal
value. This is the “digit” that belongs in
the current position.
IF DUP 10 Š
THEN 55
ELSE 48
END + CHR
Is the “digit” ≥ 10?
Then convert the digit into a alphabetic
digit (such as A, B, C, …).
+ 'k' 1 STO+
Append the digit to the current result
string and increment the counter
variable k.
RPL Programming Examples 2-23
Program:
{ # 0d # 25d }
PICT OVER walk GXOR
5 MAXR FOR i
i 131 MOD R→B
# 25d 2 →LIST
PICT OVER walk GXOR
PICT ROT walk GXOR
0.2 WAIT 5 STEP
»
»
`OWALK K
Checksum: # 28684d
Bytes:
250.0
Puts the first position on the
stack and turns on the first
and PICT for the loop.
Starts the loop to generate
horizontal coordinates
indefinitely.
Computes the horizontal
coordinate for the next image.
Specifies a fixed vertical
coordinate. Puts the two
coordinates in a list.
Displays the new image, leaving
its coordinates on the stack.
Turns off the old image,
removing its coordinates from
the stack.
Increments the horizontal
coordinate by 5.
Stores the program in WALK.
NAMES (Check List for Exactly Two Names)
If the argument for a program is a list (as determined by VFY), NAMES verifies that the list contains exactly two
names. If the list does not contain exactly two names, an error message appears in the status area and program
execution is aborted.
Level 1
→
{ valid list }
→
{ invalid list }
→
Press − when you think the walker’s tired.
Logical functions. NAMES uses the AND command in the inner conditional to determine if both objects are
names, and the NOT command to display the error message if they are not both names.
NAMES program listing
Program:
«
IF
OBJ→
DUP 2. SAME
THEN
DROP
IF
TYPE 6. SAME
SWAP TYPE 6. SAME
AND
NOT
THEN
"List needs two names"
DOERR
END
ELSE
DROPN
"Illegal list size"
DOERR
END
»
`ONAMES K
2-40 RPL Programming Examples
(error message in status area)
Techniques used in NAMES
Nested conditionals. The outer conditional verifies that there are two objects in the list. If so, the inner
conditional verifies that both objects are names.
Example: Send the small person out for a walk.
J %WALK%
Level 1
Starts the outer conditional structure.
Returns the n objects in the list to levels
2 through (n + 1), and returns the list
size n to level 1.
Copies the list size and tests if it’s 2.
If the size is 2, moves the objects to
level 1 and 2, and starts the inner
conditional structure.
Tests if the object is a name: returns 1 if
so, otherwise 0.
Moves the second object to level 1, then
tests if it is a name (returns 1 or 0).
Combines test results: Returns 1 if both
tests were true, otherwise returns 0.
Reverses the final test result.
If the objects are not both names,
displays an error message and aborts
execution.
Ends the inner conditional structure.
If the list size is not 2, drops the list size,
displays an error message, and aborts
execution.
Ends the outer conditional.
Stores the program in NAMES.
RPL Programming Examples 2-25
Inverse-Function Solver
Program:
argm TYPE 6. SAME NOT
THEN
"Not name or list"
DOERR
END
END
»
»
This section describes the program ROOTR, which finds the value of x at which f(x) = y. You supply the variable
name for the program that calculates f(x), the value of y, and a guess for x (in case there are multiple solutions).
Level 3
Level 2
Level 1
→
Level 1
'function name'
y
x guess
→
x
Programs as arguments. Although programs are commonly named and then executed by calling their names,
programs can also be put on the stack and used as arguments to other programs.
ROOTR program listing
Program:
→ fname yvalue xguess
Creates local variables.
«
xguess 'XTEMP' STO
« XTEMP fname
yvalue - »
Begins the defining procedure.
Creates variable XTEMP (to be solved for).
Enters program that evaluates f(x) - y.
`OROOTR K
Example: Execute VFY to test the validity of the name argument BEN. (The argument is valid and is simply
returned to the stack.)
J %VFY%
Example: Execute VFY to test the validity of the list argument {BEN JEFF SARAH }. Use the name from the
previous example, then enter the names JEFF and SARAH and convert the three names to a list.
OJEFF `
OSARAH `
Enters name of unknown variable.
Enters guess for XTEMP.
Solves program for XTEMP.
Ends the defining procedure.
Purges the temporary variable.
3 !° %LIST% %²LIST%
Execute VFY. Since the list contains too many names, the error message is displayed and execution is aborted.
J %VFY%
Stores the program in ROOTR.
Checksum: # 4708d
Bytes:
163
Example: Assume you often work with the expression
3.7x3 + 4.5x2 + 3.9x + 5 and have created the program X→FX to calculate the value:
« → x '3.7*x^3+4.5*x^2+3.9*x+5' »
You can use ROOTR to calculate the inverse function.
2-38 RPL Programming Examples
Checksum: # 31403d
Bytes:
139.5
OBEN `
«
'XTEMP'
xguess
ROOT
»
'XTEMP' PURGE
»
Ends the CASE structure.
Ends the defining procedure.
Enters the program, then stores it in VFY.
`OVFYK
Techniques used in ROOTR
Programmatic use of root-finder. ROOTR executes ROOT to find the desired x-value.
Tests if the argument is not a name. If so,
displays an error message and aborts
execution.
Converting Procedures from Algebraic to RPN
This section contains a program, →RPN, that converts an algebraic expression into a series (list) of objects in
equivalent RPN order.
Level 1
→
Level 1
‘symb’
→
{ objects }
RPL Programming Examples 2-27
Program:
prcnts n GET
1 RND
→STR "%" +
Gets the nth value from the
percentage matrix, rounds it to one
decimal place, and converts it to a
string with “%” appended.
1 →GROB
Converts the string to a graphics
object.
GOR DUP PICT STO
Adds the label to the plot and stores
the new plot.
→LCD
NEXT
{ } PVIEW
»
»
flags STOF
Displays the updated plot.
Ends the loop structure.
Displays the finished plot.
Stores the program in PIE.
Example: The inventory at Fruit of the Vroom, a drive-in fruit stand, includes 983 oranges, 416 apples, and 85
bananas. Draw a pie chart to show each fruit’s percentage of total inventory.
Clear the current statistics data. (The prompt is removed
'A*COS(B+ƒ(C/D))-X^3'.
OA *TB +R!Ü
C /D ™™-X Q3 `%²RPN%
Bessel Functions
This section contains a program, BER, that calculates the real part Bern(x) of the Bessel function Jn (xe3πi/4). When n
= 0,
8
(x ⁄ 2 )
(x ⁄ 2 )
Ber ( x ) = 1 – ----------------- + ----------------- – …
2
2
2!
4!
Restores the original flag status.
(You must first press − to clear
the plot.)
Checksum: # 16631d
Bytes:
737
J %PIE%
Example: Convert the following algebraic expression to a series of objects in RPN syntax:
4
»
`OPIE K
Checksum: # 1522d
Bytes:
189.5
Level 1
→
Level 1
z
→
Ber(z)
Techniques used in BER
Local variable structure. At its outer level, BER consists solely of a local variable structure and so has two
properties of a user-defined function: it can take numeric or symbolic arguments from the stack, or it can take
arguments in algebraic syntax. However, because BER uses a DO…UNTIL…END loop, its defining procedure
is a program. (Loop structures are not allowed in algebraic expressions.) Therefore, unlike user-defined functions,
BER is not differentiable.
DO…UNTIL…END loop (indefinite loop with counter). BER calculates successive terms in the series using
a counter variable. When the new term does not differ from the previous term to within the 12-digit precision of
the calculator, the loop ends.
Nested local variable structures. The outer structure is consistent with the requirements of a user-defined
function. The inner structure allows storing and recalling of key parameters.
from the display.) Key in the new data and draw the pie
chart.
CLEAR
983 %SLICE%
416 %SLICE%
85 %SLICE%
%DRAW%
2-36 RPL Programming Examples
RPL Programming Examples 2-29
Programmatic Use of Statistics and Plotting
This section describes a program PIE you can use to draw pie charts. PIE prompts for single variable data, stores
that data in the statistics matrix ΣDAT, then draws a labeled pie chart that shows each data point as a percentage of
the total.
Techniques used in PIE
Programmatic use of PLOT commands. PIE executes XRNG and YRNG to define x- and y-axis display
ranges in user units, and executes ARC and LINE to draw the circle and individual slices.
Programmatic use of matrices and statistics commands.
Manipulating graphics objects. PIE recalls PICT to the stack and executes GOR to merge the label for each
slice with the plot.
FOR…NEXT (definite loop). Each slice is calculated, drawn, and labeled in a definite loop.
CASE…END structure. To avoid overwriting the circle, each label is offset from the midpoint of the arc of the
slice. The offset for each label depends on the position of the slice in the circle. The CASE…END structure
assigns an offset to the label based on the position of the slice.
Preserving calculator flag status. Before specifying Radians mode, PIE saves the current flag status in a local
variable, then restores that status at the end of the program.
Nested local variable structures. At different parts of the process, intermediate results are saved in local
variables for convenient recall as needed.
Animation of Successive Taylor’s Polynomials
This section contains three programs that manipulate graphics objects to display a sequence of Taylor’s polynomials
for the sine function.
SINTP draws a sine curve, and saves the plot in a variable.
SETTS superimposes plots of successive Taylor’s polynomials on the sine curve plot from SINTP, and saves the
resulting graphics objects in a list.
TSA uses the ANIMATE command to display in succession each graphics object from the list built in SETTS.
SINTP (Converting a Plot to a Graphics Object)
SINTP draws a sine curve, returns the plot to the stack as a graphics object, and stores that graphics object in a
Techniques used in SINTP
Programmatic use of PLOT commands. SINTP uses PLOT commands to build and display a graphics object.
SINTP program listing
Program:
PIE program listing
Program:
«
RCLF → flags
«
{{
{
{
{
{
"SLICE" Σ+ }
}
"CLEAR" CLΣ }
} { }
"DRAW" CONT }}
Recalls the current flag status and
stores it in variable flags.
"Key values into
SLICE,DRAW
restarts program."
PROMPT
Prompts for inputs.
represents the newline character
(… ë) after you enter the
program on the stack.
Erases the current PICT and sets plot
parameters.
ERASE 1 131 XRNG
1 64 YRNG CLLCD
Drawing Pie Chart"
1 DISP
2-34 RPL Programming Examples
'SIN(X)' STEQ
Stores the expression for
sin x in EQ.
FUNCTION '-2*π' →NUM
DUP NEG XRNG
-2 2 YRNG
ERASE DRAW
Sets the plot type and xand y-axis display ranges.
PICT RCL 'SINT' STO
Defines the input menu: key 1
executes Σ+ to store each data point
in ΣDAT, key 3 clears ΣDAT, and
key 6 continues program execution
after data entry.
«
Erases PICT, then plots the
expression.
Recalls the resultant
graphics object and stores it
in SINT.
»
`O SINTP K
Stores the program in
SINTP.
Checksum: # 41184d
Bytes:
94
SINTP is demonstrated in the program TSA.
Displays “drawing” message.
RPL Programming Examples 2-31
COL+
Type:
Description:
Access:
Command
Insert Column Command: Inserts an array (vector or matrix) into a matrix (or one or more
elements into a vector) at the position indicated by nindex, and returns the modified array.
The inserted array must have the same number of rows as the target array. nindex is rounded to the
nearest integer. The original array is redimensioned to include the new columns or elements, and
the elements at and to the right of the insertion point are shifted to the right.
( ´ is the left-shift of the Pkey).
!´MATRIX COL COL+
!Ø
CREATE COLUMN COL+
( Ø is the left-shift of the 5key).
Input/Output:
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
[[ matrix ]]1
[[ matrix ]]2
nindex
→
[[ matrix ]]3
[[ matrix ]]1
[ vector ]column
nindex
→
[[ matrix ]]2
nelement
nindex
→
[ vector ]2
[ vector ]1
COL–, CSWP, ROW+, ROW–
Level 1/Item 1
COLCT
Type:
Command
Description:
Factorizes a polynomial or an integer. Almost identical to COLLECT.
Access:
…µCOLCT
Input/Output:
Level 1/Argument 1
Example 1:
Example 2:
Example 3:
Example 4:
COLLECT
Type:
Description:
Type:
Description:
Level 1/Item 1
'symb1'
→
'symb2'
x
→
x
→
(x, y)
(x, y)
COLCT('5+X+9') returns 'X+14'
COLCT('X*1_m+X*9_cm') returns 'X*1.09_m'
COLCT('X^Z*Y*X^T*Y') returns 'Y^2*X^Z*X^T'
COLCT('X+3*X+Y+Y') returns '4*X+2*Y'
Access:
Flags:
Input/Output:
Command
Add List Command: Adds corresponding elements of two lists or adds a number to each of the
elements of a list.
ADD executes the + command once for each of the elements in the list. If two lists are the
arguments, they must have the same number of elements as ADD will execute the + command
once for each corresponding pair of elements. If one argument is a non-list object, ADD will
attempt to execute the + command using the non-list object and each element of the list
argument, returning the result to the corresponding position in the result. (See the + command
entry to see the object combinations that are defined.) If an undefined addition is encountered, a
( ´ is the left-shift of the P key).
Binary Integer Wordsize (–5 through –10)
Level 2/Argument 1
Level 1/Argument 2
Command
{ list1 }
{ list2 }
→
{ listresult }
Factorizes a polynomial or an integer. This command is almost identical to the COLCT command
and similar to the FACTOR command. Unlike FACTOR it does not factorize symbolically into
square roots. It is included to ensure backward-compatibility with earlier calculators.
{ list }
objnon-list
→
{ listresult }
{ list }
→
{ listresult }
Access:
Algebra, …×
Input:
An expression or an integer
Output:
The factorized expression, or the integer expressed as the product of prime numbers.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
If complex inputs are given, complex mode must be set (flag –103 set).
3-40 Full Command and Function Reference
objnon-list
+, ∆LIST, ΠLIST, ΣLIST
Level 1/Item 1
Type:
Function
Description:
Adds two expressions or values, modulo the current modulus.
Access:
Arithmetic, !Þ MODULO
Input:
Level 2/Argument 1: The first expression.
Level 1/Argument 2: The second expression.
Output:
The sum of the two expressions, modulo the current modulus.
Full Command and Function Reference 3-9
Access:
…µCLOSEIO
Input/Output: None
BUFLEN, OPENIO
CLΣ
Type:
Description:
AMORT
Type:
Description:
Command
Purges the current statistics matrix (reserved variable ΣDAT).
Access:
Flags:
Input/Output:
Access:
…µCLΣ
Input/Output: None
RCLΣ, STOΣ, Σ+, Σ–
CLUSR
Type:
Description:
Level 1/Argument 1
Access:
Command
Clear Variables Command: Provided for compatibility with the HP 28 series. CLUSR is the same
as CLVAR. See CLVAR.
None. Must be typed in.
CLVAR
Type:
Description:
Access:
Input/Output:
Command
Clear Variables Command: Purges all variables and empty subdirectories in the current directory.
…µCLVAR
None
PGDIR, PURGE
CMPLX
Type:
Description:
Command
Displays a menu of commands pertaining to complex numbers.
AND
Type:
Description:
2
2
.
Access:
!Ø
Input/Output:
OPERATIONS CNRM
( Ø is the left-shift of the 5key).
Level 1/Argument 1
[ array ]
CROSS, DET, DOT, RNRM
3-38 Full Command and Function Reference
Level 2/Item 2
Level 1/Item 3
interest
balance
→
n
principal
TVM, TVMBEG, TVMEND, TVMROOT
Function
And Function: Returns the logical AND of two arguments.
When the arguments are binary integers or strings, AND does a bit-by-bit (base 2) logical
comparison.
• An argument that is a binary integer is treated as a sequence of bits as long as the current
wordsize. Each bit in the result is determined by comparing the corresponding bits (bit1 and bit2)
in the two arguments as shown in the following table.
bit2
bit1 AND bit2
0
0
0
0
1
0
1
0
0
1
1
1
• An argument that is a string is treated as a sequence of bits, using 8 bits per character (that is,
using the binary version of the character code). The two string arguments must have the same
number of characters.
When the arguments are real numbers or symbolics, AND simply does a true/false test. The
result is 1 (true) if both arguments are non-zero; it is 0 (false) if either or both arguments are
zero. This test is usually done to compare two test results.
If either or both of the arguments are algebraic expressions, then the result is an algebraic of the
form symb1 AND symb2. Execute →NUM (or set flag –3 before executing AND) to produce a
numeric result from the algebraic result.
Command
Column Norm Command: Returns the column norm (one-norm) of the array argument.
The column norm of a matrix is the maximum (over all columns) of the sum of the absolute
values of all elements in each column. For a vector, the column norm is the sum of the absolute
values of the vector elements. For complex arrays, the absolute value of a given element (x, y) is
x +y
Level 3/Item 1
bit1
Access:
…µCMPLX
Input/Output: None
ARIT, DIFF, EXP&LN, SOLVER, TRIGO
CNRM
Type:
Description:
Command
Amortize Command: Amortizes a loan or investment based upon the current amortization
settings.
Values must be stored in the TVM variables (I%YR, PV, PMT, and PYR). The number of
payments n is taken from the input together with flag –14.
@& Î TVM AMORT
(Î is the left-shift of the 7key).
Financial Payment Mode (–14)
Access:
Flags:
…ãL LOGIC AND
(ã is the right-shift of the 3key).
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Level 1/Item 1
→
xcolumnnorm
Full Command and Function Reference 3-11
Access:
Input/Output:
The character codes are an extension of ISO 8859/1. Codes 128 through 160 are unique to the
calculator. See Appendix J for a complete list of characters and character codes.
The default character ā is supplied for all character codes that are not part of the normal
calculator’s display character set.
Character code 0 is used for the special purpose of marking the end of the command line.
Attempting to edit a string containing this character causes the error Can't Edit Null Char.
You can use the CHARS application to find the character code for any character used by the
calculator. See “Additional Character Set” in Appendix D of the HP 50g User’s Guide.
( °is the left-shift of the Nkey).
!°TYPE L CHR
Level 1/Argument 1
n
NUM, POS, REPL, SIZE, SUB
CIRC
Type:
Description:
Command
Composes two permutations.
Access:
Input:
Output:
Example:
Command:
Result:
CKSM
Type:
Description:
Level 1/Item 1
→
“string”
Arithmetic, !ÞPERMUTATION
Two lists, L1 and L2, representing two permutations. The composition L1○L2 is the permutation
equivalent to performing permutation L2 first and L1 second.
Access:
!î
Input/Output:
n
APPLY
Type:
Description:
Access:
Input/Output:
Command
Checksum Command: Specifies the error-detection scheme.
Legal values for nchecksum are as follows:
• 1-digit arithmetic checksum.
• 2-digit arithmetic checksum.
• 3-digit cyclic redundancy check (default).
The CKSM specified is the error-detection scheme that will be requested by KGET, PKT, or
SEND. If the sender and receiver disagree about the request, however, then a 1-digit arithmetic
checksum will be used.
nchecksum
BAUD, PARITY, TRANSIO
3-36 Full Command and Function Reference
ARC
Type:
Description:
objn
Function
Apply to Arguments Function: Creates an expression from the specified function name and
arguments.
A user-defined function f that checks its arguments for special cases often can’t determine
whether a symbolic argument x represents one of the special cases. The function f can use
APPLY to create a new expression f(x). If the user now evaluates f(x), x is evaluated before f, so
the argument to f will be the result obtained by evaluating x.
When evaluated in an algebraic expression, APPLY evaluates the arguments (to resolve local
names in user-defined functions) before creating the new object.
…µAPPLY
Level 2/Argument 1
Level 1/Item 1
→
Level 1/Item 1
→
LAST, LASTARG, PICK
Example:
Level 1/Argument 1
( îis the left-shift of the `key).
Level 1/Argument 1
Level 2/Argument 1: L1
Level 1/Argument 2: L2
A list representing the single equivalent permutation, L = L1○L2
Compose the permutations given by {3,4,5,2,1} and {2,1,4,3,5}
CIRC({3,4,5,2,1},{2,1,4,3,5})
{4,3,2,5,1}
C2P, P2C
Access:
…µCKSM
Input/Output:
characters), as might have been left on the stack by entries when running in algebraic mode, will
be ignored.
Level 1/Argument 2
Level 1/Item 1
→
{ symb1 ... symbn }
'name'
'name(symb1 ... symbn)'
The following user-defined function Asin is a variant of the built-in function ASIN. Asin checks for
special numerical arguments. If the argument on the stack is symbolic (the second case in the case
structure), Asin uses APPLY to return the expression 'Asin(argument)'.
« → argument « CASE -3 FS? THEN argument ASIN END
{ 6 7 9 } argument TYPE POS THEN
'APPLY(Asin,argument)' EVAL END
'argument==1' THEN 'π/2' END
'argument==-1' THEN '-π/2' END
argument ASIN
END » »
`OAsinK
QUOTE, |
Command
Draw Arc Command: Draws an arc in PICT counterclockwise from xθ1 to xθ2, with its center at
the coordinate specified in argument 1 or level 4 and its radius specified in argument 2 or level 3.
ARC always draws an arc of constant radius in pixels, even when the radius and center are
specified in user-units, regardless of the relative scales in user-units of the x- and y-axes. With
user-unit arguments, the arc starts at the pixel specified by (x, y) + (a, b), where (a, b) is the
rectangular conversion of the polar coordinate (xradius, xθ1). The resultant distance in pixels from
the starting point to the center pixel is used as the actual radius, r'. The arc stops at the pixel
specified by (r', xθ2).
If xθ1 = xθ2, ARC plots one point. If |xθ1 – xθ2| >360 degrees, 2π radians, or 400 grads, ARC
draws a complete circle.
Full Command and Function Reference 3-13
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
Level 1/Item 1
x
y
→
100(y – x)/x
x
'symb'
→
'%CH(x,symb)'
ARIT
Type:
Description:
'symb'
x
→
'%CH(symb,x)'
Access:
Catalog, …µ
'symb2'
→
'%CH(symb1, symb2)'
Flags:
x_unit
y_unit
→
100(y_unit – x_unit)/x_unit
If the CHOOSE boxes flag is clear (flag –117 clear), displays the submenus as a numbered list. If
the flag is set, displays the operations as a menu of function keys.
'symb'
→
ALGB, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR, MODULAR,
POLYNOMIAL, REWRITE, TESTS, TRIGO
Example 1:
'%CH(x_unit,symb)'
→
'symb'
x_unit
'%CH(symb,x_unit)'
1_m 500_cm %CH returns 400, because 500 cm represents an increase of 400% over 1 m.
Example 2:
100_K 150_K %CH returns 50.
%, %T
ARRY→
Type:
Description:
CHINREM
Type:
Command
Description:
Chinese Remainder function. Solves a system of simultaneous polynomial congruences in the
ring Z[x].
Access:
Arithmetic, !Þ POLYNOMIAL
Input:
Level 2/Argument 1: A vector of the first congruence (expression and modulus).
Level 1/Argument 2: A vector of the second congruence (expression and modulus).
Output:
A vector of the solution congruence (expression and modulus).
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Solve the following simultaneous congruences for the polynomial u:
2
u≡x +1
Level 1/Argument 1
[ vector ]
[[ matrix ]]
→ARRY
Type:
Description:
CHOLESKY
Type:
Description:
Access:
Input:
Output:
Flags:
CHINREM([X^2+1,X+2],[X-1,X+3])
EGCD, ICHINREM
Lnm+1/A1 ... L2/Anm
Level1/Itemnm+1
→
z1 ... zn
{ nelement }
→
z11 ... znm
{ nrow mcol }
L = Level; I = item
(mod x+2)
[X^3+2*X^2+5,-(X^2+5*X+6)]
Command
Array to Stack Command: Takes an array and returns its elements as separate real or complex
numbers. Also returns a list of the dimensions of the array.
If the argument is an n-element vector, the first element is returned to level n + 1 (not level nm +
1), and the nth element to level 2.
Access:
…µ ARRY→
Input/Output:
u ≡ x – 1 (mod x+3)
Command:
Result:
Displays a menu or list showing the three CAS submenus for arithmetical operations, INTEGER,
MODULAR and POLYNOMIAL.
'symb1'
x_unit
Example:
Command
Access:
Input/Output:
→ARRY, DTAG, EQ→, LIST→, OBJ→, STR→
Command
Stack to Array Command: Returns a vector of n real or complex elements or a matrix of n × m
real or complex elements.
The elements of the result array should be entered in row order. If one or more of the elements is
a complex number, the result array will be complex.
( °is the left-shift of the Nkey).
!°TYPE →ARRY
Levelnm+1/Argument1 7 Level2/Argumentnm Level1/Argumentnm+1
Command
Returns the Cholesky factorization of a square matrix.
A positive square matrix, M
An upper triangular matrix, P, such that tP*P=M. (tP is the transpose of P.)
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
3-34 Full Command and Function Reference
z1 … zn
ASIN
Type:
Description:
nelement
z1 1 … zn m
{ nrow, mcol }
ARRY→, LIST→, →LIST, OBJ→, STR→, →TAG, →UNIT
Level1/Item1
→
[ vector ]
→
[[ matrix ]]
Analytic Function
Arc Sine Analytic Function: Returns the value of the angle having the given sine.
For a real argument x in the domain –1 ≤ x ≤ 1, the result ranges from –90 to +90 degrees (–π/2
A real argument outside of this domain is converted to a complex argument z = x + 0i, and the
result is complex.
Full Command and Function Reference 3-15
CASCMD
Input/Output:
Type:
Command
Description:
Displays a list of CAS operations. Selecting one with OK displays a description, related
operations, an example of the operation, and the option to copy the example to the command
line. More details are given in Appendix C and Appendix H of the User’s Guide. If level 1 of the
stack contains a string, the list of CAS operations will be displayed beginning at this point.
Access:
CASE
Type:
Description:
Level 1/Argument 1
Catalog, …µ, or tools IL
HELP
z
asin z
'symb'
→
'ASIN(symb)'
ACOS, ATAN, ISOL, SIN
ASIN2C
Command
CASE Conditional Structure Command: Starts CASE … END conditional structure.
The CASE … END structure executes a series of cases (tests). The first test that returns a true
result causes execution of the corresponding true-clause, ending the CASE … END structure. A
default clause can also be included: this clause executes if all tests evaluate to false. The CASE
command is available in RPN programming only. You cannot use it in algebraic programming.
The CASE … END structure has this syntax:
CASE
test-clause1 THEN true-clause1 END
test-clause2 THEN true-clause2 END
.
.
test-clausen THEN true-clausen END
Type:
Command
Description:
Transforms an expression by replacing asin(x) subexpressions with π/2–acos(x) subexpressions.
Access:
Trigonometry, …Ñ
Input:
An expression
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
ACOS2S, ASIN2T, ATAN2S
ASIN2T
Type:
Description:
Transforms an expression by replacing asin(x) subexpressions with the following:
Command
default-clause (optional)
 x 
atan  ------------------
 1 – x 2
END
When CASE executes, test-clause1 is evaluated. If the test is true, true-clause1 executes, then
execution skips to END. If test-clause1 is false, test-clause2 executes. Execution within the CASE
structure continues until a true clause is executed, or until all the test clauses evaluate to false. If
the default clause is included, it executes if all test clauses evaluate to false.
Access:
!°BRCH CASE
Input/Output:
( °is the left-shift of the Nkey).
Level 1/Argument 1
THEN
T/F
→
END
→
END
→
The following program takes a numeric argument from the stack:
• if the argument is negative, it is added to itself
• if the argument is positive, it is negated
• if the argument is zero, the program aborts
« → X « CASE
'X>0' THEN X NEG END
'X<0' THEN X DUP + END
'X==0' THEN 0 DOERR END
END » »
END, IF, IFERR, THEN
3-32 Full Command and Function Reference
Access:
Trigonometry, …Ñ
Input:
An expression.
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
ASIN2C, ACOS2S, ATAN2S
Level 1/Item 1
→
CASE
Example:
Level 1/Item 1
→
ASINH
Type:
Description:
Analytic Function
Arc Hyperbolic Sine Analytic Function: Returns the inverse hyperbolic sine of the argument.
The inverse of SINH is a relation, not a function, since SINH sends more than one argument to
the same result. The inverse relation for SINH is expressed by ISOL as the general solution:
ASINH(Z)*(–1)^n1+π*i*n1
The function ASINH is the inverse of a part of SINH, a part defined by restricting the domain of
SINH such that:
• each argument is sent to a distinct result, and
• each possible result is achieved.
The points in this restricted domain of SINH are called the principal values of the inverse relation.
ASINH in its entirety is called the principal branch of the inverse relation, and the points sent by
ASINH to the boundary of the restricted domain of SINH form the branch cuts of ASINH.
Full Command and Function Reference 3-17
Be careful not to reassign or suppress the keys necessary to cancel User mode. If this happens,
exit User mode by doing a system halt (“warm start”): press and hold ‡and C
simultaneously, releasing Cfirst. This cancels User mode.
Input/Output:
Level 2/Argument 1
BUFLEN
Type:
Description:
Access:
Input/Output:
Level 1/Argument 2
Level 1/Item 1
{ #n1 #m1 }
{ #n2 #m2 }
→
(x1, y1)
(x2, y2)
→
ARC, LINE, TLINE
Level 2/Argument 1
Command
Buffer Length Command: Returns the number of characters in the calculator’s serial input buffer
and a single digit indicating whether an error occurred during data reception.
The digit returned is 1 if no framing, UART overrun, or input-buffer overflow errors occurred
during reception, or 0 if one of these errors did occur. (The input buffer holds up to 255 bytes.)
When a framing or overrun error occurs, data reception ceases until the error is cleared (which
BUFLEN does); therefore, n represents the data received before the error.
Use ERRM to see which error has occurred when BUFLEN returns 0 to level 1.
…µBUFLEN
Level 1/Argument 1
Level 2/Item 1
Level 1/Item 2
nchars
0/1
→
BYTES
Type:
Description:
Access:
…µASN OR !&H KEYS ASN
Flags:
User-Mode Lock (–61) and User Mode (–62) affect the status of the user keyboard
Input/Output:
ASR
Type:
Description:
CLOSEIO, OPENIO, SBRK, SRECV, STIME, XMIT
Command
Byte Size Command: Returns the number of bytes and the checksum for the given object.
If the argument is a built-in object, then the size is 2.5 bytes and the checksum is #0.
If the argument is a global name, then the size represents the name and its contents, while the
checksum represents the contents only. The size of the name alone is (3.5 + n), where n is the
number of characters in the name.
Access:
!°MEMORY BYTES
Input/Output:
Level 1/Argument 1
Level 2/Item 1
Level 1/Item 2
B→R
Type:
Description:
Command
Binary to Real Command: Converts a binary integer to its floating-point equivalent.
3-30 Full Command and Function Reference
Access:
Flags:
Input/Output:
Level 1/Item 1
obj
xkey
→
'SKEY'
xkey
→
Executing ASN with GETI in level 2 and 75.3 in level 1 assigns GETI to …Õon the user
keyboard. (…Õ has a location of 75.3 because it is seven rows down, five columns across,
and right-shifted.) When the calculator is in User mode, pressing …Õ now executes GETI
DELKEYS, RCLKEYS, STOKEYS
Command
Arithmetic Shift Right Command: Shifts a binary integer one bit to the right, except for the most
significant bit, which is maintained.
The most significant bit is preserved while the remaining (wordsize –1) bits are shifted right one bit.
The second-most significant bit is replaced with a zero. The least significant bit is shifted out and
lost.
An arithmetic shift is useful for preserving the sign bit of a binary integer that will be shifted.
Although the calculator makes no special provision for signed binary integers, you can still interpret
a number as a signed quantity.
…ãL BIT ASR
( ãis the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1
#n1
( °is the left-shift of the Nkey).
→
obj
#nchecksum
xsize
Objects that decompile identically can have different byte sizes and checksums. For instance,
{1}
and
1 'A' STO A {} +
both produce lists containing the number 1. However, the first list contains the built-in object 1
(for a size of 7.5 bytes), while the second list contains a RAM copy of 1 (for a size of 15.5 bytes).
MEM
Example:
Example:
Level 1/Argument 2
Level 1/Item 1
→
#n2
SL, SLB, SR, SRB
ASSUME
Type:
Function
Description:
Adds global names to the reserved variable REALASSUME, with specific assumptions.
REALASSUME is a list of the global variables that will be considered by some CAS operations to
represent real numbers when complex mode is set. ASSUME adds further assumptions, for
example that a variable is greater than or equal to zero. Assumptions must be of the form
v≤expression, or v≥expression, where v is the variable name. Several assumptions can be
combined.
These assumptions are used by the solve commands; for example if a variable is assumed to be
greater than zero then the solvers will not look for solutions where that variable is negative. Some
of the solvers will give complex solutions for variables even if they are in REALASSUME.
Access:
Catalog, …µ
Full Command and Function Reference 3-19
Input/Output:
Level 1/Argument 1
BEEP
Type:
Description:
Access:
Flags:
Input/Output:
BESTFIT
Type:
Description:
Level 1/Item 1
→
nbaudrate
CKSM, PARITY, TRANSIO
Command
Beep Command: Sounds a tone at n hertz for x seconds.
The frequency of the tone is subject to the resolution of the built-in tone generator. The
minimum frequency is 1 Hz and the maximum frequency in 15000 Hz. An input that doesn’t
round to an integer within this range will cause the BEEP command to be skipped. Durations
greater than 1200 seconds are automatically changed to 1200 seconds.
( °is the left-shift of the Nkey).
!°LOUT L BEEP
Error Beep (–56)
Level 2/Argument 1
Level 1/Argument 2
nfrequency
xduration
Level 1/Item 1
→
HALT, INPUT, PROMPT, WAIT
Command
Best-Fitting Model Command: Executes LR with each of the four curve fitting models, and
selects the model yielding the largest correlation coefficient.
The selected model is stored as the fifth parameter in the reserved variable ΣPAR, and the
associated regression coefficients, intercept and slope, are stored as the third and fourth
parameters, respectively.
Access:
!À
( Àis the left-shift of the Ukey).
Flags:
Principal Solution (–1), Numerical Results (–3), Angle Mode (–17, –18)
Input/Output:
Access:
…µBESTFIT
Input/Output: None
EXPFIT, LINFIT, LOGFIT, LR, PWRFIT
BIN
Type:
Description:
Command
Binary Mode Command: Selects binary base for binary integer operations. (The default base is
decimal.)
Binary integers require the prefix #. Binary integers entered and returned in binary base
automatically show the suffix b. If the current base is not binary, binary numbers can still be
entered by using the suffix b (the numbers are displayed in the current base, however).
The current base does not affect the internal representation of binary integers as unsigned binary
numbers.
Access:
…ãBIN
( ãis the right-shift of the 3key).
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output: None
DEC, HEX, OCT, STWS, RCWS
3-28 Full Command and Function Reference
Level 1/Argument 1
Level 1/Item 1
z
→
atan z
'symb'
→
'ATAN(symb)'
ACOS, ASIN, ISOL, TAN
ATAN2S
Type:
Command
Description:
Transforms an expression by replacing atan(x) subexpressions with the following:
 x 
asin  ------------------
 x 2 + 1
Access:
Trigonometry, …Ñ
Input:
An expression.
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
ASIN2C, ACOS2S, ASIN2T
Full Command and Function Reference 3-21
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
AXL, AXQ
Input/Output:
Level 1/Argument 1
AXQ
Type:
Command
Description:
Converts a square matrix into the associated quadratic form.
Access:
Convert, !Ú
Input:
Level 2/Argument 1: An n×n matrix.
Level 1/Argument 2: A vector containing n variables.
Output:
Level 2/Item 1: The corresponding quadratic form.
Level 1/Item 2: The vector containing the variables.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Find the quadratic form, expressed in terms of x, y, and z, associated with the following matrix:
MATRIX CONVERT,
or matrices !Ø
ATTACH
Type:
Description:
360
241
111
Command:
Result:
BAR
Type:
Description:
Level 1/Item 1
→
→
→
→
x
#n
{xy}
{ #n #m }
AXQ([[3,6,0][2,4,1][1,1,1]],[X,Y,Z])
{3*X^2+(8*Y+Z)*X+(4*Y^2+2*Z*Y+Z^2),[X,Y,Z]}
AXL, AXM, GAUSS, QXA
AXES, DRAX
Command
Attach Library Command: Attaches the library with the specified number to the current directory.
Each library has a unique number. If a port number is specified, it is ignored.
To use a library object, it must be in a port and it must be attached. A library object copied into
RAM (such as through the PC Link) must be stored into a port using STO.
Some libraries require you to ATTACH them.
You can ascertain whether a library is attached to the current directory by executing LIBS.
The number of libraries that can be attached to the HOME directory is limited only by the
available memory. However, only one library at a time can be attached to any other directory. If
you attempt to attach a second library to a non-HOME directory, the new library will overwrite
the old one.
Access:
…µATTACH
Input/Output:
Level 1/Argument 1
Command
Bar Plot Type Command: Sets the plot type to BAR.
When the plot type is BAR, the DRAW command plots a bar chart using data from one column
of the current statistics matrix (reserved variable ΣDAT). The column to be plotted is specified by
the XCOL command, and is stored in the first parameter of the reserved variable ΣPAR. The
plotting parameters are specified in the reserved variable PPAR, which has the following form:
{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }
For plot type BAR, the elements of PPAR are used as follows:
• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left corner
of the display range). The default value is (–6.5,–3.1) for the HP 48gII and (–6.5,–3.9) for the
HP 50g and 49g+.
• (xmax, ymax) is a complex number specifying the upper right corner of PICT (the upper right
corner of the display range). The default value is (6.5,3.2) for the HP 48gII and (6.5,4.0) for the
HP 50g and 49g+.
• indep is either a name specifying a label for the horizontal axis, or a list containing such a name
and two numbers, with the smaller of the numbers specifying the horizontal location of the first
bar. The default value of indep is X.
• res is a real number specifying the bar width in user-unit coordinates, or a binary integer
specifying the bar width in pixels. The default value is 0, which specifies a bar width of 1 in
user-unit coordinates.
• axes is a list containing one or more of the following, in the order listed: a complex number
specifying the user-unit coordinates of the plot origin, a list specifying the tick-mark annotation,
and two strings specifying labels for the horizontal and vertical axes. The default value is (0,0).
3-26 Full Command and Function Reference
AUGMENT
Type:
Description:
Level 1/Item 1
nlibrary
→
:nport :nlibrary
→
DETACH, LIBS
Command
Concatenate two lists, a list and an element, or a vector and an element. Also creates a matrix
from component row vectors.
Access:
Input:
Matrices, !Ø CREATE
Level 2/Argument 1: A vector, a list, a matrix, or a string.
Level 1/Argument 2: A vector, a list, a matrix, or an element.
Output:
The matrix, list or string formed by combining the arguments. In the case of a string in level 2,
AUGMENT acts exactly like “+” or “ADD”.
Append 3 to the list {1,2}:
Example 1:
Command:
Result:
Example 2:
Command:
AUGMENT({1,2},3)
{1,2,3}
Combine the rows [1,2,3] and [4,5,6] into a matrix:
AUGMENT([1,2,3],[4,5,6])
Full Command and Function Reference 3-23
Access:
When evaluated, e returns its numerical representation if flag –2 or –3 is set; otherwise, e returns
its symbolic representation.
The number returned for e is the closest approximation to 12-digit accuracy. For exponentiation,
use the expression 'EXP(x)' rather than e^x, since the function EXP uses a special algorithm to
compute the exponential to greater accuracy. Even though the calculator often displays 'EXP(x)' as
e^x, it’s still 'EXP(x)' internally.
Example:
~!e
COLΣ
Type:
Description:
!´LCONSTANTS e
( ´ is the left-shift of the Pkey).
!´LCONSTANTS 2.718281828…
( ´ is the left-shift of the Pkey).
Flags:
Symbolic Constants (–2), Numerical Results (–3)
Input/Output:
Level 1/Argument 1
'e'
→
2.71828182846
EXP, EXPM, i, LN, LNP1, MAXR, MINR, π
EDIT
Type:
Description:
Access:
Command
Edit Command: Moves specified object to the command line where it can be edited.
!˜
I!EDIT
Input/Output: None
EDITB, VISIT
EDITB
Type:
Description:
2
x + 5x + 6
Command:
Result:
Level 1/Item 1
→
Command
Edit Best Command: Opens the specified object in the most suitable editor. For example, if you
use a matrix as the specified object, the command opens it in Matrix Writer.
˜
IEDIT
Input/Output: None
EDIT, VISIT
Access:
Input/Output:
Example:
COMB
Type:
Description:
Description:
Given two polynomials, a and b, returns polynomials u, v, and c where: au+bv=c
In the equation, c is the greatest common divisor of a and b.
Arithmetic, !ÞPOLYNOMIAL
Input:
Level 2/Argument 1: The expression corresponding to a in the equation.
Level 1/Argument 2: The expression corresponding to b in the equation.
Level 3/Item 1: The result corresponding to c in the equation.
Level 2/Item 2: The result corresponding to u in the equation.
Level 1/Item 3: The result corresponding to v in the equation.
CON
Type:
Description:
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
3-72 Full Command and Function Reference
COLCT, EXPAND, FACTOR
Command
Column Sigma Command: Specifies the independent-variable and dependent-variable columns of
the current statistics matrix (the reserved variable ΣDAT).
COLΣ combines the functionality of XCOL and YCOL. The independent-variable column
number xxcol is stored as the first parameter in the reserved variable ΣPAR (the default is 1). The
dependent-variable column number xycol is stored as the second parameter in the reserved variable
ΣPAR (the default is 2).
COLΣ accepts and stores noninteger values, but subsequent commands that use these two
parameters in ΣPAR will cause errors.
…µCOLΣ
Level 1/Argument 2
Level 1/Item 1
→
xcol
ycol
2 5 COLΣ sets column 2 in ΣDAT as the independent-variable column, sets column 5 as the
dependent-variable column, and stores 2 and 5 as the first and second elements in ΣPAR.
BARPLOT, BESTFIT, CORR, COV, EXPFIT, HISTPLOT, LINFIT, LOGFIT, LR, PREDX,
PREDY, PWRFIT, SCATRPLOT, XCOL, YCOL
Function
Combinations Function: Returns the number of possible combinations of n items taken m at a
time. The following formula is used:
The arguments n and m must each be less than 1012. If n<m, zero is returned.
Access:
!´L PROBABILITY COMB ( ´ is the left-shift of the Pkey).
Flags:
Numerical Results (–3)
Input/Output:
Access:
Output:
(X+2)(X+3)
n!
C n, m = ------------------------------m! ⋅ ( n – m )!
EGCD
Command
COLLECT(X^2+5*X+6)
Level 2/Argument 1
Access:
Type:
Factorize the following:
Level 2/Argument 1
Level 1/Argument 2
n
m
→
Level 1/Item 1
'symbn'
m
→
'COMB(symbn,m)'
n
'symbm'
→
'COMB(n, symbm)'
'symbn'
'symbm'
→
'COMB(symbn,symbm)'
Cn;m
FACT, PERM, !
Command
Constant Array Command: Returns a constant array, defined as an array whose elements all have
the same value.
Full Command and Function Reference 3-41
Input/Output:
Example:
Level 2
DROPN
Type:
Description:
Access:
Level 1
obj1
CLEAR, DROP, DROPN
obj2
Level 1
→
RPL Command
Drop n Objects Command: Removes the first n + 1 objects from the stack (the first n objects
excluding the integer n itself).
!°STACK LL DROPN
( °is the left-shift of the Nkey).
ISTACK LL DROPN
Input/Output:
Leveln+1 ... Level 2
DTAG
Type:
Description:
Access:
Input/Output:
Level 1
obj1 ... objn
CLEAR, DROP, DROP2
n
Level 1
→
Command
Delete Tag Command: DTAG removes all tags (labels) from an object.
The leading colon is not shown for readability when the tagged object is on the stack.
DTAG has no effect on an untagged object.
!°TYPE LDTAG
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 1/Item 1
→
tag:obj
obj
LIST→, →TAG
DUP
Type:
Description:
RPL Command
Duplicate Object Command: DUP returns a copy of the argument (or the object on level 1).
Access:
!°STACK DUP
ISTACK DUP
( °is the left-shift of the Nkey).
` in RPN mode executes DUP when no command line is present.
Input/Output:
Level 1
obj
DUP2
Type:
Description:
Access:
→
Level 2
Level 1
obj
obj
DUPN, DUP2, PICK
RPL Command
Duplicate 2 Objects Command: DUP2 returns copies of the two objects on levels 1 and 2 of the
stack.
!°STACK LL DUP2
( °is the left-shift of the Nkey).
The following program computes the above rule of thumb for the number of accurate digits:
« DUP SIZE 1 GET LOG SWAP COND LOG + 11 SWAP - »
CONIC
Type:
Description:
Command
Conic Plot Type Command: Sets the plot type to CONIC.
When the plot type is CONIC, the DRAW command plots the current equation as a secondorder polynomial of two real variables. The current equation is specified in the reserved variable
EQ. The plotting parameters are specified in the reserved variable PPAR, which has this form:
{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }
For plot type CONIC, the elements of PPAR are used as follows:
• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left corner
of the display range). The default value is (–6.5,–3.1) for the HP 48gII and (–6.5,–3.9) for the
HP 50g and 49g+.
• (xmax, ymax) is a complex number specifying the upper right corner of PICT (the upper right
corner of the display range). The default value is (6.5,3.2) for the HP 48gII and (6.5,4.0) for the
HP 50g and 49g+.
• indep is a name specifying the independent variable, or a list containing such a name and two
numbers specifying the minimum and maximum values for the independent variable (the
plotting range). The default value is X.
• res is a real number specifying the interval (in user-unit coordinates) between plotted values of
the independent variable, or a binary integer specifying the interval in pixels. The default value is
0, which specifies an interval of 1 pixel.
• axes is a complex number specifying the user-unit coordinates of the intersection of the
horizontal and vertical axes, or a list containing such a number and two strings specifying labels
for the horizontal and vertical axes. The default value is (0,0).
• ptype is a command name specifying the plot type. Executing the command CONIC places the
command name CONIC in PPAR.
• depend is a name specifying the dependent variable. The default value is Y.
The current equation is used to define a pair of functions of the independent variable. These
functions are derived from the second-order Taylor’s approximation to the current equation. The
minimum and maximum values of the independent variable (the plotting range) can be specified
in indep; otherwise, the values in (xmin, ymin) and (xmax, ymax) (the display range) are used. Lines are
drawn between plotted points unless flag –31 is set.
Access:
…µCONIC
Input/Output: None
BAR, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC, PARSURFACE,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
CONJ
Type:
Description:
Access:
Flags:
Function
Conjugate Analytic Function: Conjugates a complex number or a complex array.
Conjugation is the negation (sign reversal) of the imaginary part of a complex number. For real
numbers and real arrays, the conjugate is identical to the original argument.
…ßCONJ
(ßis the right-shift of the 1key).
Numerical Results (–3)
ISTACK LL DUP2
3-70 Full Command and Function Reference
Full Command and Function Reference 3-43
DRAW
Type:
Description:
Access:
Flags:
Input/Output:
Command Operation
Draw Plot Command: Plots the mathematical data in the reserved variable EQ or the statistical
data in the reserved variable ΣDAT, using the specified x- and y-axis display ranges.
The plot type determines if the data in the reserved variable EQ or the data in the reserved
variable ΣDAT is plotted.
DRAW does not erase PICT before plotting; execute ERASE to do so. DRAW does not draw
axes; execute DRAX to do so.
When DRAW is executed from a program, the graphics display, which shows the resultant plot,
does not persist unless PICTURE, PVIEW (with an empty list argument), or FREEZE is
subsequently executed.
…µDRAW
Simultaneous or Sequential Plot (–28), Curve Filling (–31)
None
AUTO, AXES, DRAX, ERASE, FREEZE, PICTURE, LABEL, PVIEW
Level 2/Argument 2
[[ matrix ]]
DRAX
Type:
Description:
vmin
Level 1/Argument 3
vmax
Command
Continue Program Execution Command: Resumes execution of a halted program.
Since CONT is a command, it can be assigned to a key or to a custom menu.
Access:
!æ
( æis the left-shift of the ‡key).
Input/Output: None
Example:
The program
« "Enter A, press { CONT }" { CONT } MENU PROMPT »
displays a prompt message, builds a menu with the CONT command assigned to the first menu
key, and halts the program for data input. After entering data, pressing %CONT% resumes program
execution. (Note that pressing !æ is equivalent to pressing %CONT%.)
HALT, KILL, PROMPT
CONVERT
Type:
Description:
DRAW3DMATRIX
Type:
Command
Description:
Draws a 3D plot from the values in a specified matrix.
The number of rows indicates the number of units along the x axis, the number of columns
indicates the number of units along the y axis, and the values in the matrix give the magnitudes of
the plotted points along the z axis. In other words, the coordinates of a plotted point are (r, c, v)
where r is the row number, c the column number and v the value in the corresponding cell of the
matrix.
You can limit the points that are plotted by specifying a minimum value (vmin) and a maximum
value (vmax). Values in the matrix outside this range are not plotted. If all values are included, the
total number of points plotted is r × c.
Once the plot has been drawn, you can rotate it in various ways by pressing the following keys:
™ and š rotate the plot around the x axis (in different directions)
— and ˜ rotate the plot around the y axis (in different directions)
Iand L rotate the plot around the z axis (in different directions)
Access:
…µDRAW3DMATRIX
Input/Output:
Level 3/Argument 1
CONT
Type:
Description:
Command
Convert Units Command: Converts a source unit object to the dimensions of a target unit.
The source and target units must be compatible. The number part x2 of the target unit object is
ignored.
Access:
!Ú
Input/Output:
Level 2/Argument 1
CORR
Type:
Description:
3-68 Full Command and Function Reference
Level 1/Argument 2
Level 1/Item 1
→
x3_unitstarget
Command
Correlation Command: Returns the correlation coefficient of the independent and dependent data
columns in the current statistics matrix (reserved variable ΣDAT).
The columns are specified by the first two elements in the reserved variable ΣPAR, set by XCOL
and YCOL, respectively. If ΣPAR does not exist, CORR creates it and sets the elements to their
default values (1 and 2).
The correlation is computed with the following formula:
n
∑
i=1
( x in 1 – xn1 ) ( xin2 – x n2 )
-----------------------------------------------------------------------------------
→
n
∑
FAST3D
Access:
…µDRAX
Input/Output: None
AXES, DRAW, LABEL
( Ú is the left-shift of the 6key).
x1_unitssource
x2_unitstarget
UBASE, UFACT, →UNIT, UVAL
Level 1/Item 1
Command
Draw Axes Command: Draws axes in PICT.
The coordinates of the axes intersection are specified by AXES. Axes tick-marks are specified in
PPAR with the ATICK, or AXES command. DRAX does not draw axes labels; execute LABEL
to do so.
UNITS TOOLS CONVERT
i=1
where
x in 1
( x in – xn 1 )
1
2 n
( x in – xn 2 )
n2 ,
is the mean of the data in column n1,
number of data points.
…µCORR
2
2
is the ith coordinate value in column n1,
x n1
Access:
Input/Output:
∑
i=1
x n2
x in 2
is the ith coordinate value in the column
is the mean of the data in column n2, and n is the
Level 1/Argument 1
Level 1/Item 1
→
xcorrelation
COLΣ, COV, PREDX, PREDY, XCOL, YCOL
Full Command and Function Reference 3-45
Input/Output:
Input/Output:
Level 1/Argument 1
Ln+2/A1 ... L3/An–2
L2/An+1
L1/An+2
{ list }1 ... { list }n
n
« program »
→
{ results }
{ list }1 ... { list }n
n
command
→
{ results }
{ list }1 ... { list }n
n
name
→
{ results }
{ list }1 ...
{ list }n+1
« program »
→
{ results }
CR
Type:
Description:
{ list }1 ...
{ list }n+1
command
→
{ results }
name
→
{ results }
{ list }1 ...
{ list }n+1
Level 1/Item 1
L = Level; A = Argument
Example:
{ 1 2 3 } { 4 5 6 } { 7 8 9 } 3 « + * » DOLIST returns
{ 11 26 45 }.
DOSUBS, ENDSUB, NSUB, STREAM
Level 1/Item 1
→
COLΣ, CORR, PCOV, PREDX, PREDY, XCOL, YCOL
xcovariance
Command
Carriage Right Command: Prints the contents, if any, of the printer buffer.
When printing to the serial port (flag –34 set), CR sends to the printer a string that encodes the
line termination method. The default termination method is carriage-return/linefeed. The string is
the fourth parameter in the reserved variable PRTPAR.
When using the HP 82240B Infrared Printer (flag –34 clear), CR leaves the printhead on the right
end of the just printed line.
Type:
Command
…µCR
I/O Device (–33), Printing Device (–34), Double-Spaced Printing (–37), I/O Device for Wire (–
78)
Input/Output: None
DELAY, OLDPRT, PRLCD, PRST, PRSTC, PRVAR, PR1
Description:
For a function of the current variable, lists the domains of real numbers for which the function is
defined and for which it is undefined. DOMAIN works for functions of more than one
argument, for example DOMAIN (X*X), and for user defined functions, as in the example below.
For functions which it does not recognize, DOMAIN returns the message “Unknown operator”.
CRDIR
Type:
Description:
DOMAIN
Access:
Catalog, …µ
Input:
Level 1/Item 1: A function, or an expression, in terms of the current variable.
Output:
Level 1/Item 1: A list with regions where the function is undefined marked by '?' and regions
where the function is defined marked by +. Rational singularities, such as 0 in 1/x, are not listed.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
DOSUBS
Type:
Description:
Define a function f =√(a+1) by typing DEF(F(A)=√(A+1)). Then tabulate the domain over which
it is defined and undefined.
DOMAIN(F(X))
{'-∞' '?' –1 + '+∞'}, showing that the function f is undefined for values from –∞ to –1 and is
defined from –1 to +∞.
Access:
Flags:
Access:
!°MEMORY DIRECTORY CRDIR ( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1
CROSS
Type:
Description:
SIGNTAB, TABVAR
Command
Do to Sublist Command: Applies a program or command to groups of elements in a list.
The real number n can be omitted when the first argument is one of the following:
• A command.
• A user program containing a single command.
• A program with a user-defined function structure.
• A global or local name that refers to one of the above.
The first iteration uses elements 1 through n from the list; the second iteration uses elements 2
through n + 1; and so on. In general, the mth iteration uses the elements from the list
corresponding to positions m through m + n – 1.
During an iteration, the position of the first element used in that iteration is available to the user
using the command NSUB, and the number of groups of elements is available using the
3-66 Full Command and Function Reference
Command
Create Directory Command: Creates an empty subdirectory with the specified name in the current
directory.
CRDIR does not change the current directory; evaluate the name of the new subdirectory to make
it the current directory.
Access:
Input/Output:
Command
Cross Product Command: CROSS returns the cross product C = A × B of vectors A and B.
The arguments must be vectors having two or three elements, and need not have the same
number of elements. (The calculator automatically converts a two-element argument [ d1 d2 ] to a
three-element argument [ d1 d2 0 ].)
!´VECTOR CROSS
( ´ is the left-shift of the Pkey).
Level 2/Argument 1
CSWP
Type:
Description:
Level 1/Item 1
→
'global'
HOME, PATH, PGDIR, UPDIR
[ vector ]A
CNRM, DET, DOT, RNRM
Level 1/Argument 2
[ vector ]B
Level 1/Item 1
→
[ vector ]A × B
Command
Column Swap Command: Swaps columns i and j of the argument matrix and returns the modified
matrix, or swaps elements i and j of the argument vector and returns the modified vector.
Column numbers are rounded to the nearest integer. Vector arguments are treated as row vectors.
Full Command and Function Reference 3-47
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear). Radians mode must be set (flag –17 set).
Incremental power mode must be set (flag –114 set).
Example:
Find the fourth degree Taylor polynomial for the following:
3
x + 4x + 12
----------------------------11
11x + 1
Command:
Result:
DIVPC(X^3+4*X+12,11*X^11+1,4)
TAYLOR0, TAYLR, SERIES
dn
Type:
Description:
Function
Differential of a function with respect to its argument n. For example d1f(x,y) is the differential of
f(x,y) with respect to x and d3g(y,z,t) is the differential of g(y,z,t) with respect to t. The secondorder derivative of f(x,y) with respect to x is written d1d1f(x,y). The dn function is an alternative
to the ∂ function; d1f(x,y) is the same as ∂x(f(x,y)). dn does not require brackets after it, it must be
followed immediately by the function name, with no spaces. dn differentiates with respect to the
whole of argument n, see the example. dn is mainly used for formal arguments, see the example in
DESOLVE, but can be used to differentiate expressions, as in the example.
Access:
Access is by typing the letter “d” from the alpha keyboard, followed by the number n, before the
function whose differential is required.
Output:
dn does not change its argument, it works like the negative sign placed before a number or an
expression. If the argument can be differentiated, N will carry out the differentiation.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Access:
C→R
Type:
Description:
Access:
Input/Output:
Level 1/Item 1
→
DERIV, DERVX, DESOLVE, ∂
{ #n, #m }
PX→C
Command
Complex to Real Command: Separates the real and imaginary parts of a complex number or
complex array. The result in item 1/level 2 represents the real part of the complex argument. The
result in item 2/ level 1 represents the imaginary part of the complex argument.
!°TYPE LC→R
( °is the left-shift of the Nkey).
Level 1/Argument 1
DARCY
Type:
Description:
Level 2/Item 1
Level 1/Item 2
(x, y)
→
x
y
[ C-array ]
→
[R-array ]1
[R-array ]2
R→C, RE, IM
Function
Darcy Friction Factor Function: Calculates the Darcy friction factor of certain fluid flows.
DARCY calculates the Fanning friction factor and multiplies it by 4. xe/D is the relative roughness
— the ratio of the conduit roughness to its diameter. yRe is the Reynolds number. The function
uses different computation routines for laminar flow (Re ≤ 2100) and turbulent flow (Re > 2100).
xe/D and yRe must be real numbers or unit objects that reduce to dimensionless numbers, and both
numbers must be greater than 0.
Access:
…µ DARCY
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
xe / D
yRe
FANNING
DATE
Type:
Description:
Command
Date Command: Returns the system date.
Access:
3-64 Full Command and Function Reference
( °is the left-shift of the Nkey).
(x, y)
Command
DO Indefinite Loop Structure Command: Starts DO…UNTIL…END indefinite loop structure.
DO … UNTIL … END executes a loop repeatedly until a test returns a true (nonzero) result.
Since the test clause is executed after the loop clause, the loop is always executed at least once.
The syntax is: DO loop-clause UNTIL test-clause END
DO starts execution of the loop clause. UNTIL ends the loop clause and begins the test clause.
The test clause must return a test result to the stack. END removes the test result from the stack.
If its value is zero, the loop clause is executed again; otherwise execution resumes following
END.
!°BRANCH DO
( °is the left-shift of the Nkey).
Command
Complex to Pixel Command: Converts the specified user-unit coordinates to pixel coordinates.
The user-unit coordinates are derived from the (xmin, ymin) and (xmax, ymax) parameters in the
reserved variable PPAR.
Level 1/Argument 1
EVAL(d1SIN(2*X))
COS(2*X)
( ´ is the left-shift of the Pkey).
Access:
!°LPICT LC→PX
Input/Output:
Differentiate the function sin(2x) with respect to its argument:
(Note that the function was differentiated with respect to its argument 2x, not with respect to the
variable x.)
DO
Type:
Description:
C→PX
Type:
Description:
12+4*X+X^3
Example:
Command:
Result:
Access:
!´VECTOR L CYLIN
Input/Output: None
RECT, SPHERE
…ÓTOOLS DATE
…&9 DATE
Level 1/Item 1
→
xDarcy
(Ó is the right-shift of the 9 key).
Full Command and Function Reference 3-49
DIV
Type:
Input/Output:
Command
Level 1/Argument 1
Description:
Returns the divergence of a vector function.
Access:
Calculus, !ÖDERIV. & INTEG.
Input:
Level 2/Argument 1: An array representing a vector function.
Level 1/Argument 2: An array containing the variables.
Output:
The divergence of the vector function with respect to the specified variables.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Find the divergence of the following vector function:
2
Command:
Result:
2
2
v = x y i + x yj + y zk
˜
˜
˜
DIV([X^2*Y, X^2*Y, Y^2*Z],[X,Y,Z])
Y*(2*X)+(X^2+Y^2)
Command
Access:
Arithmetic, !ÞPOLYNOMIAL
Input:
Level 2/Argument 1: The dividend.
Level 1/Argument 2: The divisor.
Output:
Level 2/Item 1: The quotient.
Level 1/Item 2: The remainder.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Step-by-step mode can be set (flag –100 set).
Radians mode must be set (flag –17 set).
Example:
Performs Euclidean division on two expressions. Step-by-step mode is available with this
command.
Perform the following division:
2
x +x+1
----------------------2x + 4
Command:
Result:
« program » or 'program name'
DDAYS
Type:
Description:
Access:
DIV2(X^2+X+1,2*X+4)
{1/2(X-1),3}
DIV2MOD
Type:
Description:
Command
Access:
Arithmetic, !Þ MODULO
Input:
Level 2/Argument 1: The dividend.
Level 1/Argument 2: The divisor.
Output:
Level 2/Item 1: The quotient.
Level 1/Item 2: The remainder.
Performs Euclidean division on two expressions modulo the current modulus.
DEC
Type:
Description:
Access:
Command
Delta Days Command: Returns the number of days between two dates.
If the argument 1/level 2 date is chronologically later than the argument 2/ level 1 date, the result
is negative. The range of allowable dates is October 15, 1582, to December 31, 9999.
…ÓTOOLS LDDAYS
( Ó is the right-shift of the 9 key).
Level 2/Argument 1
Level 1/Argument 2
date1
date2
Level 1/Item 1
→
xdays
DATE, DATE+
Command
Decimal Mode Command: Selects decimal base for binary integer operations. (The default base is
decimal.)
Binary integers require the prefix #. Binary integers entered and returned in decimal base
automatically show the suffix d. If the current base is not decimal, then you can enter a decimal
number by ending it with d. It will be displayed in the current base when it is entered.
The current base does not affect the internal representation of binary integers as unsigned binary
numbers.
( ´ is the left-shift of the Pkey).
!´BASE DEC
!Ú BASE DEC
( Ú is the left-shift of the 6key).
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output: None
BIN, HEX, OCT, RCWS, STWS
DECR
Type:
Description:
Access:
Input/Output:
Command
Decrement Command: Takes a variable, subtracts 1, stores the new value back into the original
variable, and returns the new value. The contents of name must be a real number or an integer.
!°MEMORY ARITHMETIC DECR( °is the left-shift of the Nkey).
Level 1/Argument 1
Example 1:
Example 2:
3-62 Full Command and Function Reference
→
HALT, NEXT
…&9 LDDAYS
Flags:
Date Format (–42)
Input/Output:
CURL, HESS
DIV2
Type:
Description:
Level 1/Item 1
Level 1/Item 1
→
'name'
xnew
If 35.7 is stored in A, 'A' DECR returns 34.7.
The following program counts down from 100 to 0 and leaves the integers 100 to 0 on the stack:
« 100 'A' STO WHILE A REPEAT 'A' DECR END 'A' PURGE »
INCR, STO+, STO–
Full Command and Function Reference 3-51
– If axes contains any strings other than 0, 1 or n, the DIFFEQ plotter uses the default strings 0
and 1, and plots the independent variable on the horizontal axis and the dependent variable
on the vertical.
• ptype is a command name specifying the plot type. Executing the command DIFFEQ places the
command name DIFFEQ in PPAR.
• depend is a list, { Y y0 xErrTol }, containing a name that specifies the dependent variable (the
solution), and two numbers that specify the initial value of Y and the global absolute error
tolerance in the solution Y. The default values for these elements are { Y 0 .0001 }
EQ must define the right-hand side of the initial value problem Y'(XF(X,Y). Y can return a real
value or real vector when evaluated.
The DIFFEQ-plotter attempts to make the interval between values of the independent variable as
large as possible, while keeping the computed solution within the specified error tolerance xErrTol.
This tolerance may hold only at the computed points. Straight lines are drawn between computed
step endpoints, and these lines may not accurately represent the actual shape of the solution. res
limits the maximum interval size to provide higher plot resolution.
On exit from DIFFEQ plot, the first elements of indep and depnd (identifiers) contain the final
values of X and Y, respectively.
If EQ contains a list, the initial value problem is solved and plotted using a combination of
Rosenbrock (3,4) and Runge-Kutta-Fehlberg (4,5) methods. In this case DIFFEQ uses
RRKSTEP to calculate yf, and EQ must contain two additional elements:
• The second element of EQ must evaluate to the partial derivative of Y' with respect to X, and
can return a real value or real vector when evaluated.
• The third element of EQ must evaluate to the partial derivative of Y' with respect to Y, and can
return a real value or a real matrix when evaluated.
Access:
…µDIFFEQ
Input/Output: None
AXES, CONIC, FUNCTION, PARAMETRIC, POLAR, RKFSTEP, RRKSTEP, TRUTH
DIR
Type:
Description:
Access:
Input/Output:
Function
Creates an empty directory structure in run mode. Can be used as an alternative to CRDIR to
create an empty directory by typing DIR 'NAME' STO, which will create an empty directory
'NAME' if it does not already exist in the current directory.
…µDIR
Level 1/Argument 1
DISP
Type:
Description:
DIR …END
CRDIR
Command
Display Command: Displays obj in the nth display line.
n ≤ 1 indicates the top line of the display.
To facilitate the display of messages, strings are displayed without the surrounding " " delimiters.
All other objects are displayed in the same form as would be used if the object were in level 1 in
the multiline display format. If the object display requires more than one display line, the display
starts in line n, and continues down the display either to the end of the object or the bottom of
the display. The object displayed by DISP persists in the display only until the keyboard is ready
3-60 Full Command and Function Reference
Level 1/Argument 1
Level 1/Item 1
→
'name=exp'
Example 1:
Example 2:
DEG
Type:
Description:
Access:
→
'name(name1 ... namen)=exp(name1 ... namen)'
'A=2*X' DEFINE stores '2*X' in variable A.
'A(X,Y)=2*X+3/Y' DEFINE creates a user-defined function A. The contents of A is
the program « → X Y '2*X+3/Y' »
DEF, STO, UNASSIGN
Command
Degrees Command: Sets Degrees angle mode.
DEG clears flags –17 and –18, and displays the DEG annunciator.
In Degrees angle mode, real-number arguments that represent angles are interpreted as degrees,
and real-number results that represent angles are expressed in degrees.
!&H ANGLE DEG
!°L MODES ANGLE DEG
Input/Output: None
( °is the left-shift of the Nkey).
DEGREE
Type:
Function
Description:
Returns the degree of a polynomial expression. Returns 0 for a constant expression, but –1 if the
expression is zero.
Access:
Catalog, …µ
Input:
Level 1/Argument 1: A polynomial expression or equation; all powers must be integers or real
numbers with no fractional part.
Output:
Level 1/Item 1: An integer representing the highest power in the polynomial. If the input
contains powers of more than one variable, including the current variable, returns the highest
power of the current variable. If the input contains powers of more than one variable, not
including the current variable, returns the highest power of the first symbolic variable (one that is
not stored in the current directory path). If the input contains powers of more than one variable,
and all the variables are stored in the current directory path, returns the highest power of any of
the variables.
Flags:
If exact mode is set (flag –105 clear), the result is returned as an integer, otherwise it is returned as
a real number.
Example 1:
Find the degree of the polynomial represented by:
x2-17=x3+2x
Level 1/Item 1
→
Input/Output:
Command:
Result:
DELALARM
Type:
Description:
Access:
DEGREE(x^2-17=x^3+2*X)
3
Command
Delete Alarm Command: Deletes the specified alarm.
If nindex is 0, all alarms in the system alarm list are deleted.
…ÓTOOLS ALRM DELALARM ( Ó is the right-shift of the 9 key).
Full Command and Function Reference 3-53
DIAG→
Type:
Description:
Access:
Input/Output:
Command
Vector to Matrix Diagonal Command: Takes an array and a specified dimension and returns a
matrix whose major diagonal elements are the elements of the array.
Real number dimensions are rounded to integers. If a single dimension is given, a square matrix is
returned. If two dimensions are given, the proper order is { number of rows, number of columns }. No
more than two dimensions can be specified.
If the main diagonal of the resulting matrix has more elements than the array, additional diagonal
elements are set to zero. If the main diagonal of the resulting matrix has fewer elements than the
array, extra array elements are dropped.
!Ø
CREATEL DIAG→
( Ø is the left-shift of the 5key).
!´MATRIX L DIAG→
!´MATRIX MAKELL DIAG→
Level 1/Argument 1
DEPND
Type:
Description:
( ´ is the left-shift of the Pkey).
( ´ is the left-shift of the Pkey).
Input/Output:
→DIAG
Type:
Description:
Access:
Level 2/Argument 1
Level 1/Argument 2
[ array ]diagonals
{ dim }
Level 1/Item 1
→
[[ matrix ]]
→DIAG
Command
Matrix Diagonal to Array Command: Returns a vector that contains the major diagonal elements
of a matrix.
The input matrix does not have to be square.
!Ø
( Ø is the left-shift of the 5 key).
CREATE →DIAG
!´MATRIX L →DIAG
( ´ is the left-shift of the P key).
!´MATRIX MAKE LL →DIAG
( ´ is the left-shift of the P key).
Input/Output:
Level 1/Argument 1
[[ matrix ]]
DIAGMAP
Type:
Description:
Access:
Input:
Output:
Flags:
Example:
Access:
Input/Output:
Apply the operator ex to the matrix
3-58 Full Command and Function Reference
11
02
→
'S'
→
Level 2/Argument 1
Level 1/Argument 2
'global'
[ vector ]diagonals
Matrices, !Ø L EIGENVECTORS.
Level 2/Argument 1: A diagonalizable matrix.
Level 1/Argument 2: An operator, expressed as a function. The function can be stored in a
variable with DEF, or can be a program, or a single expression.
The matrix that results from applying the operator to the matrix.
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
→
0
Command
Dependent Variable Command: Specifies the dependent variable (and its plotting range for
TRUTH plots).
The specification for the dependent variable name and its plotting range is stored in the reserved
variable PPAR as follows:
• If the argument is a global variable name, that name replaces the dependent variable entry in
PPAR.
• If the argument is a list containing a global name, that name replaces the dependent variable
name but leaves unchanged any existing plotting range.
• If the argument is a list containing a global name and two real numbers, or a list containing a
name, array, and real number, that list replaces the dependent variable entry.
• If the argument is a list containing two real numbers, or two real numbers from levels 1 and 2,
those two numbers specify a new plotting range, leaving the dependent variable name
unchanged. (LASTARG returns a list, even if the two numbers were entered separately.)
The default entry is Y.
The plotting range for the dependent variable is meaningful only for plot type TRUTH, where it
restricts the region for which the equation is tested, and for plot type DIFFEQ, where it specifies
the initial solution value and absolute error tolerance.
…µDEPND
DIAG→
Command
Applies a holomorphic operator to a diagonalizable matrix.
{ xkey1, ... ,xkey n }
ASN, RCLKEYS, STOKEYS
Level 1/Item 1
→
Level 1/Item 1
→
xkey
{ global }
→
{ global, ystart, yend }
→
{ystart, yend }
→
yend
→
ystart
DEPTH
Type:
Description:
Access:
Level 1/Item 1
→
INDEP
RPL Command
Depth Command: Returns a real number representing the number of objects present on the stack
(before DEPTH was executed).
!°STACK LDEPTH
( °is the left-shift of the Nkey).
I STACK LDEPTH
Input/Output:
Level n7Level 1
Level 1
→
n
Full Command and Function Reference 3-55
Example:
HERMITE
Type:
Function
Description:
Returns the nth Hermite polynomial.
Access:
Arithmetic, !ÞPOLY L
Input:
A non-negative integer.
Output:
The corresponding polynomial expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
HESS
Type:
2
u(x + 1) + v(x – 1) = c
Command:
Result:
EGV
Type:
Description:
Find the Hermite polynomial with degree 4.
HERMITE(4)
16*X^4-48*X^2+12
IEGCD, ABCUV
Command
Eigenvalues and Eigenvectors Command: Computes the eigenvalues and right eigenvectors for a
square matrix.
The resulting vector EVal contains the computed eigenvalues. The columns of matrix EVec
contain the right eigenvectors corresponding to the elements of vector EVal.
The computed results should minimize (within computational precision):
where diag (EVal) denotes the n × n diagonal matrix containing the eigenvalues EVal.
Command
Access:
Access:
Calculus !ÖDERIV & INTEG
Input/Output:
Input:
Level 2/Argument 1: An expression.
Level 1/Argument 2: A vector of the variables.
Output:
Level 3/Item 1: The Hessian matrix with respect to the specified variables.
Level 2/Item 2: The gradient with respect to the variables.
Level 1/Item 3: The vector of the variables.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Find the Hessian matrix, and the gradient with respect to each variable, of the expression:
t2 + 2tu2.
HEX
Type:
Description:
{2,1,-(X+1)}
A ⋅ EVec – EVec ⋅ diag ( EVal )
------------------------------------------------------------------------------n⋅ A
Returns the Hessian matrix and the gradient of an expression with respect to the specified
variables.
EGCD(X^2+1,X-1)
LEGENDRE, TCHEBYCHEFF
Description:
Command:
Result:
Find the polynomials for u, v, and c, where c is the greatest common divisor of a and b such that:
HESS(T^2+2*T*U^2, [T, U])
!Ø LEIGENVECTOR EGV
( Ø is the left-shift of the 5key).
!´MATRIX LEGV
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
[[matrix ]]A
EGVL
Type:
Description:
Access:
Flags:
!Ú BASE HEX
( Ú is the left-shift of the 6key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
3-104 Full Command and Function Reference
Level 1/Item 2
[[matrix ]]EVec
[vector ]EVal
Command
Eigenvalues Command: Computes the eigenvalues of a square matrix.
The resulting vector L contains the computed eigenvalues.
!Ø LEIGENVECTOR EGVL
( Ø is the left-shift of the 5key).
!´MATRIX LEGVL
( ´ is the left-shift of the Pkey).
Input/Output:
Level 1/Argument 1
CURL, DIV
Access:
Level 2/Item 1
EGVL
{[[2, 2*(2*U)], [2*(2*U), 2*(2*T)]], [2*T+2*U^2, 2*T*(2*U)], [T, U]}
Command
default base is decimal.)
Binary integers require the prefix #. Binary integers entered and returned in hexadecimal base
automatically show the suffix h. If the current base is not hexadecimal, then you can enter a
hexadecimal number by ending it with h. It will be displayed in the current base when it is
entered.
The current base does not affect the internal representation of binary integers as unsigned binary
numbers.
!´BASE HEX
( ´ is the left-shift of the Pkey).
→
[[matrix ]]A
ELSE
Type:
Description:
Level 1/Item 1
→
[vector ]EVal
EGV
Command
ELSE Command: Starts false clause in conditional or error-trapping structure.
Access:
!°BRANCH IF ELSE
( °is the left-shift of the Nkey).
Input/Output: None
IF, CASE, DO, ELSE, IFERR, REPEAT, THEN, UNTIL, WHILE
END
Type:
Description:
Command
END Command: Ends conditional, error-trapping, and indefinite loop structures.
Full Command and Function Reference 3-73
GROB 5 x 5 11A040A011 GXOR LASTARG GXOR »
turns on (makes dark) every pixel in PICT, then superimposes a 5 x 5 graphics object on PICT at
pixel coordinates { # 0d # 0d }. Each on-pixel in the 5 by 5 graphics object turns off (makes
light) the corresponding pixel in PICT. Then, the original picture is restored by executing GXOR
again with the same arguments.
*H
Type:
Description:
GOR, REPL, SUB
Command
Multiply Height Command: Multiplies the vertical plot scale by xfactor. *H is provided for
compatibility with the HP 48. *H is the same as SCALEH; see its listing for details.
Description:
Performs an element by element multiplication of two matrices (Hadamard product).
Access:
Matrices, !Ø
Input:
Level 2/Argument 1: Matrix 1.
Level 1/Argument 2: Matrix 2.
The matrices must have the same order.
Output:
The matrix representing the result of the multiplication.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Command:
Result:
OPERATIONS L
Find the Hadamard product of the following two matrices:
3 –1 2
0 1 4
and
2 3 0
1 5 2
Description:
[[6,-3,0][0,5,8]]
Input:
An expression
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
HALT
Type:
Description:
TAN2CS2, TAN2SC2
Command
Halt Program Command: Halts program execution.
Program execution is halted at the location of the HALT command in the program. The HLT
annunciator is turned on. Program execution is resumed by executing CONT (that is, by pressing
!æ). Executing KILL cancels all halted programs.
3-102 Full Command and Function Reference
EPSX0(1E-13*X+.01)
0*X+.01
Command
Starts the Equation Library application.
GEQUATION LIBRARY
None
MSOLVR, SOLVEQN
Command
Opens Equation Writer, where you can edit an expression.
Puts an object into the Equation Writer.
…µEQW
Input/Output:
Level 1/Argument 1
EQ→
Type:
Description:
Level 1/Item 1
→
exp1
EDIT, EDITB, VISIT, VISITB
exp2
Command
Equation to Stack Command: Separates an equation into its left and right sides.
If the argument is an expression, it is treated as an equation whose right side equals zero.
Access:
!°TYPE LEQ→
Input/Output:
( °is the left-shift of the N key).
Level 1/Argument 1
Transforms an expression by replacing sin(x), cos(x) and tan(x) subexpressions with tan(x/2)
terms.
Trigonometry, …Ñor P TRIG
Replace with zero the terms smaller than EPS in the expression: 10-13x + 10-2
(Non-programmable access is via ˜ when there is an algebraic object on the stack. To start a
new equation when not entering a program object, press …³)
Command
Access:
Access:
HALFTAN
Type:
EQNLIB
Type:
Description:
Access:
Input/Output:
EQW
Type:
Description:
Type:
Command
Example:
Example:
Command:
Result:
Level 2/Item 1
Level 1/Item 2
'symb1=symb2'
→
'symb1'
'symb2'
z
→
z
0
'name'
→
'name'
0
'x_unit'
→
'x_unit'
0
'symb'
0
→
'symb'
ARRY→, DTAG, LIST→, OBJ→, STR→
ERASE
Type:
Description:
Access:
Input/Output:
Command
Erase PICT Command: Erases PICT, leaving a blank PICT of the same dimensions.
…µ ERASE
None
DRAW
Full Command and Function Reference 3-75
Result:
-1
Note this is the remainder of the input polynomial modulo the term x in the Grœbner basis
GBASIS
EVAL
Type:
Description:
GRIDMAP
Type:
Description:
Command
GRIDMAP Plot Type Command: Sets the plot type to GRIDMAP.
When plot type is set GRIDMAP, the DRAW command plots a mapping grid representation of a
2-vector-valued function of two variables. GRIDMAP requires values in the reserved variables
EQ, VPAR, and PPAR.
VPAR has the following form:
{xleft, xright, ynear, yfar, zlow, zhigh, xmin, xmax, ymin, ymax, xeye, yeye, zeye, xstep, ystep}
For plot type GRIDMAP, the elements of VPAR are used as follows:
• xleft and xright are real numbers that specify the width of the view space.
• ynear and yfar are real numbers that specify the depth of the view space.
• zlow and zhigh are real numbers that specify the height of the view space.
• xmin and xmax are real numbers that specify the input region’s width. The default value is (–1,1).
• ymin and ymax are real numbers that specify the input region’s depth. The default value is (–1,1).
• xeye, yeye, and zeye are real numbers that specify the point in space from which you view the
graph.
• xstep and ystep are real numbers that set the number of x-coordinates versus the number of ycoordinates plotted. These can be used instead of (or in combination with) RES.
The plotting parameters are specified in the reserved variable PPAR, which has the following
form:
{ (xmin, ymin), (xmax, ymax), indep, res, axes, ptype, depend }
For plot type GRIDMAP, the elements of PPAR are used as follows:
• (xmin, ymin) is not used.
• (xmax, ymax) is not used.
• indep is a name specifying the independent variable. The default value of indep is X.
• res is a real number specifying the interval (in user-unit coordinates) between plotted values of
the independent variable, or a binary integer specifying the interval in pixels. The default value is
0, which specifies an interval of 1 pixel.
• axes is not used.
• ptype is a command name specifying the plot type. Executing the command GRIDMAP places
the command name GRIDMAP in PPAR.
• depend is a name specifying the dependent variable. The default value is Y.
Access:
…µ GRIDMAP
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, HISTOGRAM, PARAMETRIC, PARSURFACE,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
→GROB
Type:
Description:
Access:
Command
Stack to Graphics Object Command: Creates a graphics object from a specified object, where the
argument nchar size specifies the character size of the object.
nchar size can be 0, 1 (small), 2 (medium), or 3 (large). nchar size = 0 is the same as nchar size = 3, except
for unit objects and algebraic objects, where 0 specifies the Equation Writer application picture.
…µ→GROB
!°LGROB →GROB
( °is the left-shift of the Nkey).
3-100 Full Command and Function Reference
Command
Evaluate Object Command: Evaluates the object.
The following table describes the effect of the evaluation on different object types.
Effect of Evaluation
Object Type
Local Name
Recalls the contents of the variable.
Global Name
Calls the contents of the variable:
• A name is evaluated.
• A program is evaluated.
• A directory becomes the current directory.
• Other objects are put on the stack.
If no variable exists for a given name, evaluating the
name returns the name to the stack.
Program
Enters each object in the program:
• Names are evaluated (unless quoted).
• Commands are evaluated.
• Other objects are put on the stack.
List
Enters each object in the list:
• Names are evaluated.
• Commands are evaluated
• Programs are evaluated.
• Other objects are put on the stack.
Tagged
If the tag specifies a port, recalls and evaluates the
specified object. Otherwise, puts the untagged
object on the stack.
Algebraic
Enters each object in the algebraic expression:
• Names are evaluated.
• Commands are evaluated.
• Other objects are put on the stack.
Command, Function, XLIB Name
Other Objects
Evaluates the specified object.
Puts the object on the stack.
To evaluate a symbolic argument to a numerical result, evaluate the argument in Numerical
Results mode (flag –3 set) or execute →NUM on that argument.
Access:
N
Flags:
Numerical Results (–3)
Input/Output:
Level 1/Argument 1
obj
Level 1/Item 1
→
(see above)
→NUM, SYSEVAL
EXLR
Type:
Command
Description:
Returns the left- and right-hand sides of an equation as discrete expressions.
Full Command and Function Reference 3-77
Input/Output:
Input/Output:
L2/A1
L1/A2
L3/I1
[[ matrix ]]
nposition1
→
[[ matrix ]]
{ nrow, mcolumn }1
'namematrix'
'namematrix'
L2/I2
[[ matrix ]]
nposition2
zget
→
[[ matrix ]]
{ nrow, mcolumn }2
zget
nposition1
→
'namematrix'
nposition2
zget
{ nrow, mcolumn }1
→
'namematrix'
{ nrow, mcolumn }2
zget
[ vector ]
nposition
[ vector ]
{nposition1 }
→
[ vector ]
GOR
Type:
Description:
Access:
Input/Output:
Type:
Description:
Access:
→
ez
'symb'
→
'EXP(symb)'
ALOG, EXPM, LN, LOG
EXP2HYP
zget
Function
{nposition2 }
zget
Description:
Converts expressions involving the exponential function into expressions with hyperbolic
functions.
nposition2
'namevector'
nposition1
→
'namevector
nposition2
zget
{nposition1 }
→
Access:
'namevector'
'namevector
{nposition2 }
zget
Catalog, …µ
Input:
{ list }
nposition1
→
An expression
{ list }
nposition2
objget
Output:
The rewritten expression.
{ list }
{nposition1 }
→
{ list }
{nposition2 }
objget
Flags:
'namelist'
nposition1
→
'namelist'
nposition2
objget
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
'namelist'
{nposition1 }
→
'namelist'
{nposition2 }
objget
Example:
Command:
Result:
Rewrite in terms of hyperbolic functions the expression e
L = Level; A = Argument; I = Item
Level 1/Item 1
z
Type:
[ vector ]
→
Level 1/Argument 1
L1/I3
GET, PUT, PUTI
Command
Graphics OR Command: Superimposes grob1 onto grobtarget or PICT, with the upper left corner
pixel of grob1 positioned at the specified coordinate in grobtarget or PICT.
GOR uses a logical OR to determine the state (on or off) of each pixel in the overlapping portion
of the argument graphics object.
If the first argument (stack level 3) is any graphics object other than PICT, then grobresult is
returned to the stack. If the first argument (level 3) is PICT, no result is returned to the stack.
Any portion of grob1 that extends past grobtarget or PICT is truncated.
!°L GROB GOR
( °is the left-shift of the Nkey).
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
grobtarget
{ #n #m }
grob1
grobtarget
(x, y)
grob1
→
PICT
{ #n #m }
grob1
→
(x, y)
grob1
→
PICT
GXOR, REPL, SUB
grobresult
grobresult
3-98 Full Command and Function Reference
SINH(5*LN(X))+COSH(5*LN(X))
EXP2POW
Function
Description:
Simplifies expressions involving the composition of the exponential and logarithmic functions.
Compare this to LNCOLLECT which combines logarithmic terms; the difference is shown in the
results of the second example used here and for LNCOLLECT.
Access:
!Ú
Input:
An expression
Output:
The simplified expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example 1:
Command:
Result:
Example 2:
Command:
Result:
Command
GRAD clears flag –17 and sets flag –18, and displays the GRD annunciator.
In Grads angle mode, real-number arguments that represent angles are interpreted as grads, and
real-number results that represent angles are expressed in grads.
EXP2HYP(EXP(5*LN(X)))
Type:
Level 1/Item 1
→
5 ⋅ ln ( x )
EXPAN
Type:
Description:
Access:
REWRITE
Simplify the expression e 5·ln(x)
EXP2POW(EXP(5*LN(X)))
X
5
Simplify the expression e n·ln(x)
EXP2POW(EXP(N*LN(X)))
X
N
LNCOLLECT
Command
Expand Products Command: Rewrites an algebraic expression or equation by expanding products
and powers. This command is similar to the old HP 48G series command, with minor
modifications (such as adding RISCH for integration).
…µEXPAN
Full Command and Function Reference 3-79
Flags:
Example:
Command:
Result:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Find a Grœbner basis of the ideal polynomial generated by the polynomials:
x2 + 2xy2, xy + 2y3 – 1
GBASIS([X^2 + 2*X*Y^2, X*Y + 2*Y^3 – 1], [X,Y])
[X, 2*Y^3-1]
Note this is not the minimal Grœbner basis, as the leading coefficient of the second term is not 1;
the algorithm used avoids giving results with fractions.
GREDUCE
EXPFIT
Type:
Description:
Command
Exponential Curve Fit Command: Stores EXPFIT as the fifth parameter in the reserved variable
ΣPAR, indicating that subsequent executions of LR are to use the exponential curve fitting model.
LINFIT is the default specification in ΣPAR.
Access:
…µ EXPFIT
Input/Output: None
BESTFIT, LR, LINFIT, LOGFIT, PWRFIT
EXPLN
Type:
Command
Transforms the trigonometric terms in an expression to exponential and logarithmic terms.
GCD
Type:
Function
Description:
Description:
Returns the greatest common divisor of two objects.
Access:
!Ð or Convert, !Ú
Access:
Arithmetic, !ÞPOLY L
Input:
An expression
Input:
Level 2/Argument 1: An expression, or an object that evaluates to a number.
Level 1/Argument 2: An expression, or an object that evaluates to a number.
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Complex mode must be set (flag –103 set).
Example:
Transform the following expression and simplify the result using the EXPAND command:
Output:
The greatest common divisor of the two objects.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
Find the greatest common divisor of 2805 and 99.
GCD(2805,99)
GCDMOD, EGCD, IEGCD, LCM
Function
Access:
Arithmetic, !ÞMODULO
Input:
Level 2/Argument 1: A polynomial expression.
Level 1/Argument 2: A polynomial expression.
Output:
The greatest common divisor of the two expressions modulo the current modulus.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Find the greatest common divisor of 2x^2+5 and 4x^2-5x, modulo 13.
Example:
Command:
Result:
GCDMOD(2X^2+5,4X^2-5X)
GCD
GET
Type:
Description:
2
Command:
Result:
Finds the greatest common divisor of two polynomials modulo the current modulus.
EXPM
Type:
Description:
Access:
EXPLN(2*COS(X^2))
EXPAND(ANS(1))
(EXP(i*X^2)^2+1)/EXP(i*X^2)
SINCOS
Analytic Function
Exponential Minus 1 Analytic Function: Returns ex – 1.
For values of x close to zero, EXPM(x) returns a more accurate result than does EXP(x)–1.
(Using EXPM allows both the argument and the result to be near zero, and avoids an
intermediate result near 1. The calculator can express numbers within 10–449 of zero, but within
only 10–11 of 1.)
!´HYPERBOLIC L EXPM
( ´ is the left-shift of the Pkey).
!Ð EXPM
Flags:
Numerical Results (–3)
Input/Output:
3-96 Full Command and Function Reference
(Ð is the left-shift of the 8key).
Level 1/Argument 1
-(4X-5)
Command
Get Element Command: Returns from the argument 1/level 2 array or list (or named array or list)
the real or complex number zget or object objget whose position is specified in argument 2/level 1.
For matrices, nposition is incremented in row order.
or PLEXP & LN
2 cos ( x )
33
GCDMOD
Type:
Description:
REWRITE
Level 1/Item 1
x
→
ex – 1
'symb'
→
'EXPM(symb)'
EXP, LNP1
EYEPT
Type:
Description:
Command
Eye Point Command: Specifies the coordinates of the eye point in a perspective plot.
Full Command and Function Reference 3-81
otherwise, the values in (xmin, ymin) and (xmax, ymax)(the display range) are used. Lines are drawn
between plotted points unless flag –31 is set.
If EQ contains an expression or program, the expression or program is evaluated in Numerical
Results mode for each value of the independent variable to give the values of the dependent
variable. If EQ contains an equation, the plotting action depends on the form of the equation, as
shown in the following table.
Form of Current Equation
expr = expr
Plotting Action
Each expression is plotted separately. The intersection of
the two graphs shows where the expressions are equal.
name = expr
Only the expression is plotted.
indep = constant
A vertical line is plotted.
If flag –28 is set, all equations are plotted simultaneously.
If the independent variable in the current equation represents a unit object, you must specify the
units by storing a unit object in the corresponding variable in the current directory. For example,
if the current equation is X+3_m, and you want X to represent some number of inches, you
would store 1_in (the number part of the unit object is ignored) in X. For each plotted point, the
numerical value of the independent variable is combined with the specified unit (inches in this
example) before the current equation is evaluated. If the result is a unit object, only the number
part is plotted.
Access:
…µFUNCTION
Flags:
Simultaneous Plotting (–28), Curve Filling (–31)
Input/Output: None
BAR, CONIC, DIFFEQ, FAST3D, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,
YSLICE
Description:
Access:
An expression or an integer.
Output:
The factorized expression, or the integer expressed as the product of prime numbers.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Results including complex terms are returned if complex mode is set (flag –103 set).
Example:
Factorize the following:
2
x + 5x + 6
Command:
Result:
Command
Splits an object into a numerator and a denominator.
Catalog, …µ
FACTOR(X^2+5*X+6)
(X+2)(X+3)
EXPAN, EXPAND
FACTORMOD
Type:
Function
Description:
Factorizes a polynomial modulo the current modulus. The modulus must be less than 100, and a
prime number, it can be changed by MODSTO.
Access:
Arithmetic, !Þ MODULO
Input:
The expression to be factorized.
Output:
The factorized expression modulo the current modulus.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Factorize the following expression modulo 3.
x2+2
Command:
Result:
FXND
Type:
Input:
FACTORMOD(X^2+2)
(X+1)*(X-1)
MODSTO
FACTORS
Type:
Command
Description:
For a value or expression, returns a list of prime factors and their multiplicities.
Access:
Arithmetic, !Þ
Input:
A fraction, or an object that evaluates to a fraction.
Output:
The object split into numerator and denominator.
Level 2/Item 1: The numerator.
Level 1/Item 2: The denominator.
Input:
A value or expression.
Output:
A list of prime factors of the value or expression, with each factor followed by its multiplicity
expressed as a real number.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Flags:
Example:
Return the numerator and the denominator of the following expression:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example 1:
Command:
Result:
Find the prime factors of 100.
2
(x – 3)
------------------z+4
Command:
Result:
FXND((X-3)^2/(Z+4))
{(X-3)^2, Z+4}
EXLR
3-94 Full Command and Function Reference
Example 2:
Command:
Result:
FACTORS(100)
{5 2. 2 2.}
2
Find the irreducible factors of: x + 4x + 4
FACTORS(X^2+4*X+4)
{X+2,2.}
Full Command and Function Reference 3-83
Display Area
Access:
Input/Output:
Status area
1
History/Stack/Command-line area
2
4
So, for example, 2 FREEZE freezes the history/stack/command-line area, 3 FREEZE freezes
the status area and the history/stack/command-line area, and 7 FREEZE freezes all three areas.
Values of ndisplay area ≥ 7 or ≤ 0 freeze the entire display (are equivalent to value 7). To freeze the
graphics display, you must freeze the status and stack/command-line areas (by entering 3), or the
entire display (by entering 7).
( °is the left-shift of the Nkey).
!°LOUT FREEZE
Level 1/Argument 1
ndisplayarea
Example 1:
Example 2:
Flags:
Access:
…µFAST3D
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,
YSLICE
Value Code
This program:
« "Ready for data" 1 DISP 1 FREEZE HALT »
displays the contents of the string in the top line of the display, then freezes the status area so that
the string contents persist in the display after HALT is executed.
This program:
« { # 0d # 0d } PVIEW 7 FREEZE »
selects the graphics display and then freezes the entire display so that the graphics display persists
after the program ends. (If FREEZE was not executed, the stack display would be selected after
the program ends.) To use FREEZE with PVIEW (or any graphics display), you must enter 3 or
7.
None
CLLCD, DISP, HALT
Command
Access:
Arithmetic, !ÞPOLY L
Input:
A rational polynomial.
Output:
An array of the form [Root 1, Multiplicity 1, Root 2, Multiplicity 2, . . .]
A negative multiplicity indicates a pole.
Flags:
Exact mode must be set (flag –105 clear). Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
If complex mode is set (flag –103 set), FROOTS looks for complex solutions as well as real
solutions.
For a rational polynomial, returns an array of its roots and poles, with their corresponding
multiplicities. This is the inverse of FCOEF and uses the same notation for roots and poles.
If approximate mode is set (flag –105 set) FROOTS searches for numeric roots.
FS?
Type:
Description:
Access:
Command
Description:
From an array of roots and multiplicities/poles, returns a rational polynomial with a leading
coefficient of 1, with the specified set of roots or poles, and with the specified multiplicities.
Access:
Arithmetic, !ÞPOLY L
Input:
An array of the form [Root 1, multiplicity/pole 1, Root 2, multiplicity/pole 2, . . .] The
multiplicity/pole must be an integer. A positive number signifies a multiplicity. A negative
number signifies a pole.
Output:
The rational polynomial with the specified roots and multiplicities/poles. The polynomial is
written using the current independent variable.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Find the rational polynomial corresponding to the following set of roots and poles:
1, 2, 3, –1
Level 1/Item 1
→
FROOTS
Type:
Description:
FCOEF
Type:
Command:
Result:
FC?
Type:
Description:
Access:
FROOTS
Command
Flag Clear? Command: Tests whether the system or user flag specified by nflag number is clear, and
returns a corresponding test result: 1 (true) if the flag is clear or 0 (false) if the flag is set.
!°TEST LLFC?
( °is the left-shift of the Nkey).
!° LMODES FLAG FC?
!&H FLAG FC?
( °is the left-shift of the Nkey).
Level 1/Argument 1
nflag number
FC?C
Type:
Description:
Access:
3-92 Full Command and Function Reference
(X-1)^2/(X-3)
Input/Output:
FCOEF
Command
Flag Set? Command: Tests whether the system or user flag specified by nflag number is set, and
returns a corresponding test result: 1 (true) if the flag is set or 0 (false) if the flag is clear.
!°TEST LLFS?
( °is the left-shift of the Nkey).
FCOEF([1,2,3,-1])
Level 1/Item 1
→
0/1
CF, FC?C, FS? FS?C, SF
Command
Flag Clear? Clear Command: Tests whether the system or user flag specified by nflag number is clear,
and returns a corresponding test result: 1 (true) if the flag is clear or 0 (false) if the flag is set. After
testing, clears the flag.
!°TEST LLFC?C
( °is the left-shift of the Nkey).
!° LMODES FLAG FC?C
( °is the left-shift of the Nkey).
!&H FLAG FC?C
Full Command and Function Reference 3-85
FOR
Type:
Description:
Access:
Input/Output:
Command Operation
FOR Definite Loop Structure Command: Starts FOR … NEXT and FOR … STEP definite loop
structures.
Definite loop structures execute a command or sequence of commands a specified number of
times.
• A FOR … NEXT loop executes a program segment a specified number of times using a local
variable as the loop counter. You can use this variable within the loop. The RPL syntax is this:
xstart xfinish FOR counter loop-clause NEXT
The algebraic syntax is this:
FOR(counter, xstart, xfinish) loop-clause NEXT
FOR takes xstart and xfinish as the beginning and ending values for the loop counter, then creates
the local variable counter as a loop counter. Then, the loop clause is executed; counter can be
referenced or have its value changed within the loop clause. NEXT increments counter by one,
and then tests whether counter is less than or equal to xfinish. If so, the loop clause is repeated
(with the new value of counter).
When the loop is exited, counter is purged.
• FOR … STEP works just like FOR … NEXT, except that it lets you specify an increment
value other than 1. The syntax RPL is:
xstart xfinish FOR counter loop-clause xincrement STEP
The algebraic syntax is:
FOR(counter, xstart, xfinish) loop-clause, STEP (xincrement)
FOR takes xstart and xfinish as the beginning and ending values for the loop counter, then creates
the local variable counter as a loop counter. Next, the loop clause is executed; counter can be
referenced or have its value changed within the loop clause. STEP takes xincrement and increments
counter by that value. If the argument of STEP is an algebraic expression or a name, it is
automatically evaluated to a number.
The increment value can be positive or negative. If the increment is positive, the loop is
executed again when counter is less than or equal to xfinish. If the increment is negative, the loop
is executed when counter is greater than or equal to xfinish.
When the loop is exited, counter is purged.
!°BRANCH FOR
( °is the left-shift of the Nkey).
Level 2/
FOR xstart
Level 1
xfinish
NEXT
Note:
Example:
[ array ]1
IFFT
FILER
Type:
Description:
Command
Opens File Manager.
Access:
!¡
Flags:
Input/Output:
→
→
STEP
'symbincrement'
It should be noted that FOR inputs may also be integers (object type 28) and binary integers (type
10). FOR actually runs fastest on binary integers, runs “normally” on reals and slightly slower on
integers.
The following program sums all odd integers in the range 1 to 100:
« 0 1 100 FOR I I + 2 STEP »
NEXT, START, STEP
!°LL TIME ALRM FINDALARM
Date Format (–42)
( °is the left-shift of the Nkey).
Level 1/Argument 1
FINISH
Type:
Description:
xincrement
( ¡ is the left-shift of the Gkey).
…&9 ALRM FINDALARM
→
STEP
[ array ]2
FINDALARM
Type:
Command
Description:
Find Alarm Command: Returns the alarm index nindex of the first alarm due after the specified
time.
If the input is a real number date, FINDALARM returns the index of the first alarm due after
12:00 AM on that date. If the input is a list { date time }, it returns the index of the first alarm due
after that date and time. If the input is the real number 0, FINDALARM returns the first past-due
alarm. For any of the three arguments, FINDALARM returns 0 if no alarm is found.
Access:
…ÓTOOLS ALRM FINDALARM
( Ó is the right-shift of the 9 key).
→
→
Level 1/Item 1
→
…µFILER
Input/Output: None
xfinish
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
Level 1/Item 1
FOR xstart
3-90 Full Command and Function Reference
Access:
!´L FFT FFT
Input/Output:
Access:
Flags:
Input/Output:
FIX
Type:
Description:
Level 1/Item 1
date
→
nindex
{ date time }
→
nindex
→
nindex
0
DELALARM, RCLALARM, STOALARM
Command
Finish Server Mode Command: Terminates Kermit Server mode in a device connected to the
calculator.
FINISH is used by a local Kermit device to tell a server Kermit (connected via the serial port or
the IR port) to exit Server mode.
…µFINISH
I/O Device flag (–33), I/O Messages (–39), I/O Device for Wire (–78)
None
BAUD, CKSM, KGET, PARITY, PKT, RECN, RECV, SEND, SERVER
Command
Fix Mode Command: Sets the number display format to fix mode, which rounds the display to n
decimal places.
Full Command and Function Reference 3-87
Input/Output:
Level 1/Argument 1
z
LNAME
Type:
Description:
Access:
Input:
Output:
Flags:
Example:
Command:
Result:
'symb'
ALOG, EXP, ISOL, LNP1, LOG
Level 1/Item 1
→
ln z
→
'LN(symb)'
Command
Returns the variable names contained in a symbolic expression.
Catalog, …µ
A symbolic expression.
Level 2/Argument 1: The original expression.
Level 1/Argument 2: A vector containing the variable names. The variable names are sorted by
length, longest first, and ones of equal length are sorted alphabetically.
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
List the variables in the expression COS(B)/2*A + MYFUNC(PQ) + 1/T.
Access:
HILBERT
Type:
Returns a square Hilbert matrix of the specified order.
Access:
Matrices, !Ø CREATE Lor !´ MATRX
Input:
A positive integer, representing the order.
Output:
The Hilbert matrix of the specified order.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Find the order 3 Hilbert matrix.
Command:
HILBERT(3)
LVAR
Analytic function
Natural Log of x Plus 1 Analytic Function: Returns ln(x + 1).
For values of x close to zero, LNP1(x) returns a more accurate result than does LN(x+1). Using
LNP1 allows both the argument and the result to be near zero, and it avoids an intermediate
result near 1. The calculator can express numbers within 10-449 of zero, but within only 10–11 of 1.
For values of x < –1, an Undefined Result error results. For x=–1, an Infinite Result exception
occurs, or, if flag –22 is set, LNP1 returns –MAXR.
!´ HYPERBOLIC LNP1
3-136 Full Command and Function Reference
( ´ is the left-shift of the Pkey).
Command
Description:
LNAME(COS(B)/2*A + MYFUNC(PQ) + INV(T))
{COS(B)/2*A + MYFUNC(PQ) + 1/T, [MYFUNC,PQ,A,B,T]}
LNCOLLECT
Type:
Command
Description:
Simplifies an expression by collecting logarithmic terms. For symbolic powers does not perform
the same simplification as EXP2POW; compare example 2 here with example 2 for EXP2POW.
Access:
Algebra, …×, !Ð, or PLEXP & LN, or !Ú REWRITE L
Input:
An expression.
Output:
The simplified expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example 1:
Simplify the following expression:
2(ln(x)+ln(y))
Command:
LNCOLLECT(2(LN(X)+LN(Y))
Result:
LN(X^2*Y)
Example 2:
Compare the effect of LNCOLLECT with the effect of EXP2POW on the expression e n·ln(x)
Command:
LNCOLLECT(EXP(N*LN(X))
Result:
EXP(N*LN(X))
EXP2POW, TEXPAND
LNP1
Type:
Description:
Input/Output: None
BIN, DEC, OCT, RCWS, STWS
Result:
1
1 --2
1 1
--- --2 3
1 1
--- --3 4
MAKE
LL
1
--3
1
--4
1
--5
CON, IDN, RANM, VANDERMONDE
HISTOGRAM
Type:
Command
Description:
Histogram Plot Type Command: Sets the plot type to HISTOGRAM.
When the plot type is HISTOGRAM, the DRAW command creates a histogram using data from
one column of the current statistics matrix (reserved variable ΣDAT). The column is specified by
the first parameter in the reserved variable ΣPAR (using the XCOL command). The plotting
parameters are specified in the reserved variable PPAR, which has the form:
{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }
For plot type HISTOGRAM, the elements of PPAR are used as follows:
• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left corner
of the display range). The default value is (–6.5,–3.1) for the HP 48gII and (–6.5,–3.9) for the
HP 50g and 49g+.
• (xmax, ymax) is a complex number specifying the upper right corner of PICT (the upper right
corner of the display range). The default value is (6.5,3.2) for the HP 48gII and (6.5,4.0) for the
HP 50g and 49g+.
• indep is either a name specifying a label for the horizontal axis, or a list containing such a name
and two numbers that specify the minimum and maximum values of the data to be plotted. The
default value of indep is X.
• res is a real number specifying the bin size, in user-unit coordinates, or a binary integer
specifying the bin size in pixels. The default value is 0, which specifies the bin size to be 1/13 of
the difference between the specified minimum and maximum values of the data.
• axes is a list containing one or more of the following, in the order listed: a complex number
specifying the user-unit coordinates of the plot origin, a list specifying the tick-mark annotation,
and two strings specifying labels for the horizontal and vertical axes. The default value is (0,0).
• ptype is a command name specifying the plot type. Executing the command HISTOGRAM
places the command name HISTOGRAM in PPAR.
Full Command and Function Reference 3-105
Input/Output:
Leveln+1/Argument1 7Level2/Argumentn
Level1/Argumentn+1
Level 1/Item 1
Example:
→
obj1 … objn
n
{ obj1, … ,objn }
The program « DEPTH →LIST 'A' STO » combines the entire contents of the stack
into a list that is stored in variable A.
→ARRY, LIST→, →STR, →TAG, →UNIT
Access:
Command
List Differences Command: Returns the first differences of the elements in a list.
Adjacent elements in the list must be suitable for mutual subtraction.
( ´ is the left-shift of the Pkey).
!´ LIST ∆LIST
Input/Output:
∆LIST
Type:
Description:
Access:
Input/Output:
…& 9LHMS+
Level 1/Argument 1
Level 1/Item 1
Example 1:
→
{ list }
{ differences }
{ 4 20 1 17 60 91 } ›LIST returns { 16 -19 16 43 31 }.
Example 2:
{ A B C 1 2 3 } ›LIST returns { 'B-A' 'C-B' '1-C' 1 1 }.
Example 3:
{ 'A+3' 'X/5' 'Y^4' } ›LIST returns { 'X/5-(A+3)' 'Y^4-X/5' }.
ΣLIST, ΠLIST, STREAM
ΠLIST
Type:
Description:
Access:
Input/Output:
Command
List Product Command: Returns the product of the elements in a list.
The elements in the list must be suitable for mutual multiplication.
!´ LIST ΠLIST
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
Example 1:
{ list }
{ 5 8 2 } œLIST returns 80.
Example 2:
{ A B C 1 } œLIST returns 'A*B*C'.
ΣLIST, ∆LIST, STREAM
ΣLIST
Type:
Description:
Access:
Input/Output:
→
Level 2/Argument 1
HMS→
Type:
Description:
Access:
Level 1/Argument 1
product
HMS
Level 1/Item 1
Example 1:
Example 2:
{ A B C 1 } ΣLIST returns 'A+B+C+1'.
ΠLIST, ∆LIST, STREAM
sum
Analytic function
Natural Logarithm Analytic Function: Returns the natural (base e) logarithm of the argument.
3-134 Full Command and Function Reference
Level 1/Item 1
→
HMS1 + HMS2
Command
Hours-Minutes-Seconds to Decimal Command: Converts a real number in hours-minutesseconds format to its decimal form (hours or degrees with a decimal fraction).
The format for HMS (a time or an angle) is H.MMSSs, where:
• H is zero or more digits representing the integer part of the number (hours or degrees).
• MM are two digits representing the number of minutes.
• SS are two digits representing the number of seconds.
• s is zero or more digits (as many as allowed by the current display mode) representing the
decimal fractional part of seconds.
…ÓTools L HMS→
( Ó is the right-shift of the 9 key).
Level 1/Item 1
Command
List Sum Command: Returns the sum of the elements in a list.
The elements in the list must be suitable for mutual addition.
!´LIST ΣLIST
( ´ is the left-shift of the Pkey).
→
HMS2
…&9L HMS→
→HMS
Type:
Description:
{ list }
{ 5 8 2 } ΣLIST returns 15.
Level 1/Argument 2
HMS1
HMS→, →HMS, HMS–
Input/Output:
Level 1/Argument 1
LN
Type:
Description:
The format for HMS (a time or an angle) is H.MMSSs, where:
• H is zero or more digits representing the integer part of the number (hours or degrees).
• MM are two digits representing the number of minutes.
• SS are two digits representing the number of seconds.
• s is zero or more digits (as many as allowed by the current display mode) representing the
decimal fractional part of seconds.
…ÓTools LHMS+
( Ó is the right-shift of the 9 key).
Access:
Level 1/Item 1
→
x
→HMS, HMS+, HMS–
Command
Decimal to Hours-Minutes-Seconds Command: Converts a real number representing hours or
degrees with a decimal fraction to hours-minutes-seconds format.
The format for HMS (a time or an angle) is H.MMSSs, where:
• H is zero or more digits representing the integer part of the number.
• MM are two digits representing the number of minutes.
• SS are two digits representing the number of seconds.
• s is zero or more digits (as many as allowed by the current display mode) representing the
decimal fractional part of seconds.
…ÓTools L→HMS
( Ó is the right-shift of the 9 key).
…&9L→HMS
Input/Output:
Level 1/Argument 1
x
Level 1/Item 1
→
HMS
HMS→, HMS+, HMS–
Full Command and Function Reference 3-107
Example:
Linearize the following expression:
Output:
Level 2/Item 1: The value for u.
Level 1/Item 2: The value for v.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Find a solution in integers of the equation:
6a + 11b = 3
x y 4
x(e e )
Command:
Result:
LIN(X*(EXP(X)*EXP(Y))^4)
X*EXP(4X+4Y)
TEXPAND
LINE
Type:
Command Operation
Description:
Draw Line Command: Draws a line in PICT between the input coordinates.
Access:
!°LPICT LINE
( °is the left-shift of the Nkey).
Input/Output:
Example:
ΣLINE
Type:
Description:
Level 1/Item 1
{6,-3}
ABCUV, IEGCD
IBASIS
Level 1/Argument 2
(x1, y1)
(x2, y2)
→
Type:
Command
{ #n1, #m1}
{ #n2, #m2}
→
Description:
Determines the basis of the intersection between two vector spaces.
This program:
« (0,0) (2,3) LINE { # 0d # 0d } PVIEW 7 FREEZE »
draws a line in PICT between two user-unit coordinates, displays PICT with pixel coordinate { #
0d # 0d } at the upper left corner of the picture display, and freezes the display.
ARC, BOX, TLINE
Command
Regression Model Formula Command: Returns an expression representing the best fit line
according to the current statistical model, using X as the independent variable name, and explicit
values of the slope and intercept taken from the reserved variable ΣPAR.
For each curve fitting model, the following table indicates the form of the expression returned by
ΣLINE, where m is the slope, x is the independent variable, and b is the intercept.
Form of Expression
LINFIT
LOGFIT
mx + b
m ln(x) + b
EXPFIT
bemx
PWRFIT
bxm
Level 1/Argument 1
Level 1/Item 1
→
Example:
'symbformula'
If the current model is EXPFIT, and if the slope is 5 and the intercept 3, ΣLINE returns
'3*EXP(5*X)'.
BESTFIT, COLΣ, CORR, COV, EXPFIT, LINFIT, LOGFIT, LR, PREDX, PREDY, PWRFIT,
XCOL, YCOL
Command
Linear Curve Fit Command: Stores LINFIT as the fifth parameter in the reserved variable ΣPAR,
indicating that subsequent executions of LR are to use the linear curve fitting model.
LINFIT is the default specification in ΣPAR.
…µ LINFIT
3-132 Full Command and Function Reference
Access:
Matrices, !Ø L VECTOR
Input:
Two lists of vectors
Output:
A list of vectors.
Flags:
Exact mode must be set (flag –105 clear).
Example:
Command:
Result:
Find a vector of a basis of the intersection of the vector sub-spaces defined by [1, 2] and [2, 4]
IBASIS({[1,2]}, {[2,4]})
{[1,2]}
BASIS
IBERNOULLI
Type:
Access:
…µ ΣLINE
Input/Output:
Access:
IABCUV(6,11,3)
Level 2/Argument 1
Model
LINFIT
Type:
Description:
Command:
Result:
Function
Description:
Returns the nth Bernoulli number for a given integer n.
Access:
Arithmetic, !ÞINTEGER
Input:
Level 1/Argument 1: an integer.
Output:
Level 1/Item 1: The corresponding nth Bernoulli number for the integer. For numbers greater
than about 40 the calculation can take a long time.
Flags:
Numeric mode must not be set (flag –3 clear).
IBP
Type:
Command
Description:
Performs integration by parts on a function. The function must be able to be represented as a
product of two functions, where the antiderivative of one of the functions is known:
f(x) = u(x).v’(x)
Note that the command is designed for use in RPN mode only.
Access:
PCALC or Calculus, !ÖDERIV & INTEG L
Input:
Level 2: The integrand expressed as a product of two functions, u(x).v’(x)
Level 1: The antiderivative of one of the component functions, v(x).
Output:
Level 2: u(x)v(x)
Level 1: -u'(x)v(x)
Full Command and Function Reference 3-109
Result:
• If the argument is a name, the name must identify a variable containing a square matrix. In this
case, the elements of the matrix are replaced by those of the identity matrix (complex if the
original matrix is complex).
COS(X)*(cC0 -X)+(cC1 — -1)*SIN(X)
DESOLVE
LEGENDRE
Access:
Type:
Function
Description:
Returns the nth degree Legendre polynomial.
!Ø
( Ø is the left-shift of the 5key).
CREATE IDN
!´MATRIX MAKE IDN
Access:
Arithmetic, !Þ POLYNOMIAL LL
Input:
An integer, n.
Output:
The nth Legendre polynomial.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
( ´ is the left-shift of the Pkey).
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
→
→
n
[[ matrix ]]
'name'
CON
IDIV2
Type:
Command
[[ R-matrixidentity ]]
[[ matrixidentity ]]
[[ matrixidentity ]]
Example:
Command:
Result:
Find the Legendre polynomial with degree 4.
(35*X^4-30*X^2+3)/8
Description:
For two integers, a and b, returns the integer part of a/b, and the remainder, r.
HERMITE, TCHEBYCHEFF
Access:
Arithmetic, !ÞINTEGER
Input:
Level 2/Argument 1: a.
Level 1/Argument 2: b.
Output:
Level 2/Item 1: The integer part of a/b.
Level 1/Item 2: The remainder.
Flags:
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
LEGENDRE(4)
LGCD
Type:
Function
Description:
Returns the greatest common divisor of a list of expressions or values.
Access:
Arithmetic, !Þ L
Input:
A list of expressions or values.
Output:
Level 2/Item 1: The list of elements.
Level 1/Item 2: The greatest common divisor of the elements.
Flags:
Example:
Command:
Result:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
GCD
LIBEVAL
Type:
Description:
Command
Evaluate Library Function Command: Evaluates unnamed library functions.
Access:
Input/Output:
LIBS
Type:
Description:
{13,400}
DIV2, IQUOT
Command
Given two integers x and y, returns three integers, a, b, and c, such that:
ax+by=c
where c is the GCD of x and y.
WARNING: Use extreme care when executing this function. Using LIBEVAL
with random addresses will almost always cause a memory loss. Do not use this
function unless you know what you are doing.
Access:
PARITH or Arithmetic, !ÞINTEGER
Input:
#nfunction is of the form lllfffh, where lll is the library number, and fff the function number.
…µ LIBEVAL
Level 2/Argument 1: x.
Level 1/Argument 2: y.
Output:
Level 3/Item 1: c.
Level 2/Item 2: a.
Level 1/Item 3: b.
Note the order, c is first.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Command:
Result:
Find a, b and c such that a18 + b24 = c, where c is the GCD of 18 and 24.
Level 1/Argument 1
IEGCD
Type:
Description:
Return the integer part and the remainder of 11632/864.
IDIV2(11632,864)
#nfunction
EVAL, FLASHEVAL, SYSEVAL
Level 1/Item 1
→
Command
Libraries Command: Lists the title, number, and port of each library attached to the current
directory. The title of a library often takes the form LIBRARY-NAME : Description. A library
without a title is displayed as " ".
3-130 Full Command and Function Reference
IEGCD(18,24)
{6,-1,1}
Full Command and Function Reference 3-111
LASTARG
Type:
Description:
Access:
3 The key buffer is cleared.
Command
Returns copies of the arguments of the most recently executed command.
The objects return to the same stack levels that they originally occupied. Commands that take no
arguments leave the current saved arguments unchanged. When LASTARG follows a command
that evaluates an algebraic expression or program, the last arguments saved are from the evaluated
algebraic expression or program, not from the original command.
…µ LASTARG
!°LLERROR
Flags:
Input/Output:
Level n
7
Level 1
objn
…
obj1
ANS, LAST
Command
LCD to Graphics Object Command: Returns the current stack and menu display as a 131 × 80
(on the HP 50g and 49g+) or 131 × 64 (on the HP 48gII) graphics object.
Access:
!°LGROB LLCD→
Input/Output:
( °is the left-shift of the Nkey).
Level 1/Argument 1
Example:
→LCD
Type:
Description:
Level 1/Item 1
→
grob
LCD→ PICT STO PICTURE returns the current display to level 1 as a graphics object,
stores it in PICT, then shows the image in the Picture environment.
→GROB, →LCD
Command
Graphics Object to LCD Command: Displays the specified graphics object with its upper left
pixel in the upper left corner of the display. If the graphics object is larger than 131 × 72 (on the
HP 50g and 49g+) or 131 × 56 (on the HP 48gII), it is truncated.
Access:
!°LGROB L→LCD
Input/Output:
( °is the left-shift of the Nkey).
Level 1/Argument 1
grob
returned to the stack.
6 Program execution jumps to the error clause.
The commands in the error clause are executed only if an error is generated during execution of
the trap clause.
• IFERR … THEN … ELSE … END executes one sequence of commands if an error occurs
or another sequence of commands if an error does not occur. The syntax of IFERR … THEN
… ELSE … END is:
IFERR trap-clause THEN error-clause ELSE normal-clause END
→
LCD→
Type:
Description:
5 If Last Arguments is enabled, the arguments to the command that caused the error are
( °is the left-shift of the Nkey).
(îis the left-shift of the`key).
LASTA
!îin RPN mode.
Last Arguments (–55)
Level 1
4 If any or all of the display is “frozen” (by FREEZE), that state is cancelled.
Level 1/Item 1
→
BLANK, →GROB, LCD→
LCM
Type:
Function
Description:
Returns the least common multiple of two objects.
Access:
Arithmetic, !ÞPOLYNOMIAL LL
Input:
Level 2/Argument 1: An expression, a number, or object that evaluates to a number.
Level 1/Argument 2: An expression, a number, or object that evaluates to a number.
3-128 Full Command and Function Reference
If an error occurs during execution of the trap clause, the same six events listed above occur.
If no error occurs, execution jumps to the normal clause at the completion of the trap clause.
Access:
Flags:
Input/Output:
Example:
IFFT
Type:
Description:
!°LLERROR [IFERR] IFERR
( °is the left-shift of the Nkey).
Last Arguments (–55)
None
The following program uses IFERR much like the built-in linear system of equations solver. The
program takes a result vector and a matrix of coefficients and returns a least-squares solution to
the equations.
« → a b « IFERR a b / THEN LSQ END » »
CASE, ELSE, END, IF, THEN
Command
Inverse Discrete Fourier Transform Command: Computes the one- or two-dimensional inverse
discrete Fourier transform of an array.
If the argument is an N-vector or an N × 1 or 1 × N matrix, IFFT computes the one-dimensional
inverse transform. If the argument is an M × N matrix, IFFT computes the two-dimensional
inverse transform. M and N must be integral powers of 2.
The one-dimensional inverse discrete Fourier transform of an N-vector Y is the N-vector X
where:
1
X n = ---
–1
∑
Yk e
2πik n
--------------
,i =
–1
k=0
for n = 0, 1, …, N – 1.
The two-dimensional inverse discrete Fourier transform of an M × N matrix Y is the M × N
matrix X where:
M – 1 – 1
2πi km 2πi ln
---------------- -----------------1
X mn = --------- ∑ ∑ Y kl e M e , i =
M k = 0 l = 0
–1
for m = 0, 1, …, M – 1 and n = 0, 1, …, N – 1.
The discrete Fourier transform and its inverse are defined for any positive sequence length.
However, the calculation can be performed very rapidly when the sequence length is a power of
two, and the resulting algorithms are called the fast Fourier transform (FFT) and inverse fast
Fourier transform (IFFT).
The IFFT command uses truncated 15-digit arithmetic and intermediate storage, then rounds the
result to 12-digit precision.
Full Command and Function Reference 3-113
2. If axes parameter is not a list, then the independent variable name in PPAR is used.
The vertical axis name is chosen in the following priority order:
1. If the axes parameter in PPAR is a list, then the y-axis element from that list is used.
2. If axes is not a list, then the dependent variable name from PPAR is used.
Access:
…µ LABEL
Input/Output: None
AXES, DRAW, DRAX
Access:
LAGRANGE
Type:
Description:
Command
Returns the interpolating polynomial of minimum degree for a set of pairs of values. For two
pairs, DROITE will fit a straight line.
Access:
Arithmetic, !ÞPOLY L
Input:
A two × n matrix of the n pairs of values.
Output:
The polynomial that results from the Lagrange interpolation of the data.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Command:
The inverse Laplace transformation of the expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Find the inverse Laplace transform of:------------------2-
Command:
Result:
ILAP(1/(X-5)^2)
IM
Type:
Description:
1
(x – 5 )
X*EXP(5*X)
LAP, LAPL
Function
Imaginary Part Function: Returns the imaginary part of its complex argument.
If the argument is an array, IM returns a real array, the elements of which are equal to the
imaginary parts of the corresponding elements of the argument array. If the argument array is real,
all of the elements of the result array are zero.
…ß IM
(ßis the right-shift of the 1key).
Numerical Results (–3)
Level 1/Argument 1
DROITE
Level 1/Argument 1
Level 1/Item 1
→
value
→LANGUAGE
→LANGUAGE
Type:
Command
Description:
Language: Sets the language for things such as error messages: 0 for English, 1 for French, and 2
for Spanish.
Level 1/Argument 1
value
LANGUAGE→
3-126 Full Command and Function Reference
Level 1/Item 1
→
x
→
0
(x, y)
→
y
[ R-array ]
→
[ R-array ]
[ C-array ]
→
[ R-array ]
'symb'
→
'IM(symb)'
C→R, RE, R→C
IMAGE
Type:
Command
Description:
Computes the basis of the image (also called the range) of a linear application f.
Access:
Matrices, !Ø
Input:
A matrix representing a linear application f in terms of the standard basis.
Output:
A list of vectors representing a basis of the image of f.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Access:
…µ →LANGUAGE
Input/Output:
Level 1/Item 1
2
8x – 63x + 151 x – 60
-------------------------------------------------------6
LANGUAGE→
Type:
Command
Description:
Language: Returns the language that is currently set. 0 for English, 1 for French, and 2 for
Spanish.
Access:
…µ LANGUAGE→
Input/Output:
A rational expression.
Output:
LAGRANGE([[1,3,4,2][6,7,8,9]])
3
Result:
Input:
Access:
Flags:
Input/Output:
Find an interpolating polynomial for the data (1,6), (3,7), (4,8), (2,9)
Calculus, !ÖDIFFERENTIAL EQNS
Find the image of
LINEAR APPL
112
213
314
Example:
Command:
Result:
IMAGE([1,1,2] [2,1,3] [3,1,4])
BASIS, KER
{[1,0,-1] [0,1,2]}
Full Command and Function Reference 3-115
Access:
Input/Output:
Unlike WAIT, which returns a three-digit number that identifies alpha and shifted keyboard
planes, KEY returns the row-column location of any key pressed, including !, …, and ~.
!°LIN KEY
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 2/Item 1
Level 1/Item 2
xn m
1
→
Variable
Field definitions. A field definition (sx) can have two formats: “label”, a field
label, or { “label” “helpInfo” type0 type1 … typen }, a field label with optional help
text that appears near the bottom of the screen, and an optional list of valid
object types for that field. If object types aren’t specified, all object types are
valid. For information about object types, see the TYPE command.
When creating a multi-column dialog box, you can span columns by using an
empty list as a field definition. A field that appears to the left of an empty
field automatically expands to fill the empty space.
format
Field format information. This is the number col or a list of the form { col tabs
}: col is the number of columns the dialog box has, and tabs optionally
specifies the number of tab stops between the labels and the highlighted
fields. This list can be empty. col defaults to 1 and tabs defaults to 3.
{ resets }
Default values displayed when RESET is selected. Specify reset values in the
list in the same order as the fields were specified. To specify no value, use the
NOVAL command as a place holder. This list can be empty.
{ init }
Initial values displayed when the dialog box appears. Specify initial values in
the list in the same order as the fields were specified. To specify no value, use
the NOVAL command as a place holder. This list can be empty.
→
Example:
KEYEVAL
Type:
Description:
Access:
Input/Output:
0
The program « DO UNTIL KEY END 81 SAME » returns 1 to the stack if the !
key is pressed while the indefinite loop is running.
WAIT, KEYEVAL
Command
Actions the specified key press.
You input a number, in the format ab.c, that represents the key. In the number ab.c:
• a is the row coordinate number, where row 1 is the top-most row.
• b is the column number, where column 1 is the left-most column.
• c is the shift state of the key, i.e., whether it is normal, alpha-shifted, left shifted, etc.
The shift state representations are as follows:
1: Normal function.
2: Left-shift function.
21: Left shift-and-hold function.
3. Right-shift function.
31: Right shift-and-hold function.
4. Alpha-function.
41: Alpha shift-and-hold function.
5. Alpha-left-shift function.
51: Alpha-left-shift-and-hold function.
6. Alpha-right-shift function.
61: Alpha-right-shift-and-hold function.
The sign of the input controls whether USER mode key assignments are used. Positive inputs
specify the USER mode key definition. Negative inputs specify the default system keyboard.
…µ KEYEVAL
Level 1/Argument 1
nn.n
Example:
Command:
Result:
→KEYTIME
Type:
Description:
Access:
Input/Output:
Access:
!°LIN INFORM
Input/Output:
→
Example:
KEYEVAL(101.3)
The calculator is turned off.
Command
Sets a new keytime value.
Keytime is the time after a keypress during which further keypresses will not be actioned. It is
measured in ticks, with valid values between 0 and 4096 ticks. If you experience key bounce, you
can increase the value of keytime. If you experience lost keystrokes when rapidly hitting the same
key in succession, you can decrease the value of keytime. The default is 1138 ticks.
…µ →KEYTIME
KEYTIME→
3-124 Full Command and Function Reference
Level 1/Item 1
→
( °is the left-shift of the Nkey).
L5/A1
L4/A2
L 3 A3
L2/A4
L1/A5
“title”
{s1 s2 ... sn }
format
{resets }
{init }
→ { vals }
L2/I1
L1/I2
1
“title”
{s1 s2 ... sn }
format
{resets }
{init }
→
0
L = Level; A = Argument; I = item
Turn the calculator off using a command.
time
If you exit the dialog box by selecting OK or `, INFORM returns the field values { vals } in
item 1 or level 2, and puts a 1 in item 2 or level 1. (If a field is empty, NOVAL is returned as a
place holder.) If you exit the dialog box by selecting CANCEL or B, INFORM returns 0.
Level 1/Item 1
Level 1/Argument 1
Function
{s1 s2 … sn}
INPUT
Type:
Description:
Place the following five lines on the stack and run INFORM:
"The Title"
{ { "ONE" "Name?" 2 } { } { "TWO" "Age?" }
{ "THREE" "Lucky numbers?" 5 } }
{ 2 }
{ NOVAL NOVAL { 1 2 3 } }
{ "Charlotte" NOVAL { 4 5 6 } }
CHOOSE, INPUT, NOVAL, TYPE
Command
Input Command: Prompts for data input to the command line and prevents the user access to
stack operations.
When INPUT is executed, the stack or history area is blanked and program execution is
suspended for data input to the command line. The contents of “stack prompt” are displayed at the
top of the screen. Depending on the second argument (level 1), the command line may also
contain the contents of a string, or it may be empty. Pressing ` resumes program execution
and returns the contents of the command line in string form.
Full Command and Function Reference 3-117
Example 1:
Analyze the isometry given by the matrix
0 –1
–1 0
Command:
ISOM([[0,-1] [-1,0]])
Result:
{ [1, 1] –1}, meaning the matrix represents a symmetry in the line y = –x, and this is an indirect
isometry.
1 – 3
--- ---------2 2
Example 2:
Command:
Result:
ISPRIME?
Type:
Description:
Analyze the isometry given by the matrix
3
------2
1
--2
ISOM([[1/2, -√3/2][√3/2, 1/2]])
{ π/3, 1 }, meaning the matrix represents a rotation of π/3 radians, and this is a direct isometry.
MKISOM
Example:
Command:
Result:
Find the integral of sin(x) with respect to x, at the point where x=y.
INTVX, RISCH
INT(SIN(X),X,Y)
-COS(Y)
INTEGER
Type:
Command
Description:
Displays a menu or list of CAS integer operations.
Access:
Catalog, …µ
Flags:
If the CHOOSE boxes flag is clear (flag –117 clear), displays the operations as a numbered list. If
the flag is set, displays the operations as a menu of function keys.
ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, MAIN, MATHS, MATR, MODULAR,
POLYNOMIAL, REWRITE, TESTS, TRIGO
INTVX
Type:
Function
Function
Description:
Finds the antiderivative of a function symbolically, with respect to the current default variable.
Tests if a number is prime. For numbers of the order of 1014 or greater (to be exact, greater than
341550071728321), tests if the number is a pseudoprime; this has a chance of less than 1 in 1012
of wrongly identifying a number as a prime.
Access:
Calculus, !Öor P CALC or !Ö DERIV. & INTEG L
Input:
An expression.
Access:
PARITH or Arithmetic, !ÞINTEGER L
Output:
The antiderivative of the expression.
Input:
An object that evaluates to an integer or a whole real number.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Find the antiderivative of the following:
Output:
1 (True) if the number is prime, 0 (False) if it is not.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
I→R
Type:
Description:
Access:
Flags:
NEXTPRIME, PREVPRIME
Input:
Output:
Function
Converts an integer into a real number.
…Ú REWRITE
Exact mode must be set (flag –105 clear). Numeric mode must not be set (flag –3 clear). The flags
affect the output only if the input is not an integer.
Level 1/Argument 1: An integer or real number.
Level 1/Item 1: The integer converted to a real number.
→NUM, R→I, XNUM
JORDAN
Type:
Description:
Command
Diagonalization, or Jordan cycle decomposition, of a matrix. Computes the eigenvalues,
eigenvectors, minimum polynomial, and characteristic polynomial of a matrix.
Access:
Matrices, !Ø LEIGENVECTORS
Input:
An n × n matrix.
Output:
Level 4/Item 1: The minimum polynomial.
Level 3/Item 2: The characteristic polynomial.
Level 2/Item 3: A list of characteristic spaces tagged by the corresponding eigenvalue (either a
3-122 Full Command and Function Reference
2
x ln x
Command:
Result:
INV
Type:
Description:
INTVX(X^2*LN(X))
1/3*X^3*LN(X)+(-1/9)*X^3
IBP, RISCH, PREVAL
Analytic function
Inverse (1/x) Analytic Function: Returns the reciprocal or the matrix inverse.
For a complex argument (x, y), the inverse is the complex number:
 x
–y 
----------------2 
 ---------------2
2, 2
x +y x +y 
Access:
Flags:
Matrix arguments must be square (real or complex). The computed inverse matrix A-1 satisfies A
× A-1 = In, where In is the n × n identity matrix.
Y
Numerical Results (–3)
Full Command and Function Reference 3-119
PERTBL
Type:
Description:
Access:
Flags:
Input/Output:
PEVAL
Type:
Description:
Access:
Input/Output:
Flags:
Numerical Results (–3), Infinite Result Exception (–22)
Input/Output:
Command
Starts the Periodic Table. It doesn’t affect the stack.
G PERIODIC TABLE PERTBL
Units Usage (61), Units Type (60)
None
MOLWT, PERINFO, PTPROP
Level 1/Argument 1
Level 1/Argument 2
p(x)
PCOEF, PROOT
PGDIR
Type:
Description:
Command
Purge Directory Command: Purges the named directory (whether empty or not).
[ 1 2 –25 –26 120 ] 8 PEVAL
3432
Level 1/Argument 1
obj1
Level 1/Item 1
L1
n
Access:
Catalog, …µ
Input:
Level 1/Argument 1: A list of one or more local variable names (names beginning with the local
variable identifier ←), each one followed by an equals sign and the value to be stored in it. Any
variable not followed by an equal sign and a value is set equal to zero.
Output:
Level 1/Item 1: The input list.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
→
Ln+1
L2
L1
objn ...
obj1
obji
DUP, DUPN, DUP2, OVER, ROLL, ROLLD, ROT, SWAP
PICK3
Type:
Description:
Access:
RPL Command
Duplicates the object on level 3 of the stack.
!°STACK L PICK3
( °is the left-shift of the Nkey).
Create local variables ←A and ←B and store the values 0 in the first and 2 in the second.
Example:
Command:
Result:
LOCAL({←A,←B=2})
DEF, STORE, UNBIND
L = Level
3-168 Full Command and Function Reference
EXPM, LN
Creates one or more local variables. This command is intended mainly for use in Algebraic mode;
it can not be single stepped when a program containing it is being debugged in Algebraic mode.
PICK
Type:
RPL Command
Description:
Pick Object Command: Copies the contents of a specified stack level to level 1.
Access:
!°STACK PICK
( °is the left-shift of the Nkey).
Input/Output:
objn ...
'LNP1(symb)'
Command
→
'global'
CLVAR, CRDIR, HOME, PATH, PURGE, UPDIR
L2
→
Description:
LOG
Type:
Description:
Access:
!°MEMORY DIRECTORY PGDIR( °is the left-shift of the Nkey).
Input/Output:
Ln+1...
ln (x + 1)
'symb'
Type:
Level 1/Item 1
→
[ array ]coefficients
x
Find the polynomial x4 + 2x3 - 25x2 - 26x + 120 at x = 8:
Example:
Command:
Result:
→
LOCAL
Command
Polynomial Evaluation Command: Evaluates an n-degree polynomial at x.
The arguments must be an array of length n + 1 containing the polynomial’s coefficients listed
from highest order to lowest, and the value x at which the polynomial is to be evaluated.
…µ PEVAL
Level 2/Argument 1
Level 1/Item 1
x
Access:
Flags:
{←A,←B=2}
Analytic function
Common Logarithm Analytic Function: Returns the common logarithm (base 10) of the
argument.
For x=0 or (0, 0), an Infinite Result exception occurs, or, if flag –22 is set (no error), LOG
returns –MAXR.
The inverse of ALOG is a relation, not a function, since ALOG sends more than one argument to
the same result. The inverse relation for ALOG is the general solution:
LOG(Z)+2*π*i*n1/2.30258509299
The function LOG is the inverse of a part of ALOG, a part defined by restricting the domain of
ALOG such that 1) each argument is sent to a distinct result, and 2) each possible result is
achieved. The points in this restricted domain of ALOG are called the principal values of the
inverse relation. LOG in its entirety is called the principal branch of the inverse relation, and the
points sent by LOG to the boundary of the restricted domain of ALOG form the branch cuts of
LOG.
The principal branch used by the calculator for LOG(z) was chosen because it is analytic in the
regions where the arguments of the real-valued function are defined. The branch cut for the
complex-valued LOG function occurs where the corresponding real-valued function is undefined.
The principal branch also preserves most of the important symmetries.
You can determine the graph for LOG(z) from the graph for LN (see LN) and the relationship
log z = ln z / ln 10.
…Ã
( Ã is the right-shift of the Vkey).
Principal Solution (–1), Numerical Results (–3), Infinite Result Exception (–22)
Full Command and Function Reference 3-137
Model
PCONTOUR
Type:
Description:
Command
PCONTOUR Plot Type Command: Sets the plot type to PCONTOUR.
When plot type is set PCONTOUR, the DRAW command plots a contour-map view of a scalar
function of two variables. PCONTOUR requires values in the reserved variables EQ, VPAR, and
PPAR.
VPAR is made up of the following elements:
{ xleft xright ynear yfar zlow zhigh xmin xmax ymin ymax xeye yeye zeye xstep ystep }
For plot type PCONTOUR, the elements of VPAR are used as follows:
• xleft and xright are real numbers that specify the width of the view space.
• ynear and yfar are real numbers that specify the depth of the view space.
• zlow and zhigh are real numbers that specify the height of the view space.
• xmin and xmax are not used.
• ymin and ymax are not used.
• xeye, yeye, and zeye are real numbers that specify the point in space from which the graph is
viewed.
• xstep and ystep are real numbers that set the number of x-coordinates versus the number of ycoordinates plotted.
The plotting parameters are specified in the reserved variable PPAR, which has this form:
{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }
For plot type PCONTOUR, the elements of PPAR are used as follows:
• (xmin, ymin) and (xmax, ymax) are not used.
• indep is a name specifying the independent variable. The default value of indep is X.
• res is not used.
• axes is not used.
• ptype is a command name specifying the plot type. Executing the command PCONTOUR places
the name PCONTOUR in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:
…µ PCONTOUR
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
PCOV
Type:
Description:
Command
Population Covariance Command: Returns the population covariance of the independent and
dependent data columns in the current statistics matrix (reserved variable ΣDAT).
The columns are specified by the first two elements in reserved variable ΣPAR, set by XCOL and
YCOL respectively. If ΣPAR does not exist, PCOV creates it and sets the elements to their
default values (1 and 2).
The population covariance is calculated with the following formula:
x kn 1
n
is the kth coordinate value in column
x
column 2 , n1 is the mean of the data in column
and n is the number of data points.
3-166 Full Command and Function Reference
n 1 x kn 2
,
n1 xn
,
2
n2
,
y = b + m ln(x)
Exponential
ln(y) = ln(b) + mx
Power
ln(y) = ln(b) + m ln(x)
Level 1/Argument 1
Level 2/Item 1
Level 1/Item 2
→
LSQ
Type:
Description:
Access:
Flags:
Input/Output:
LU
Type:
Description:
is the kth coordinate value in the
is the mean of the data in column
Logarithmic
Access:
…µ LR
Input/Output:
1 n
--- ∑ ( xkn1 – x n 1 ) ( x kn2 – x n2 )
nk = 1
where
Transformation
Access:
Intercept: x1
Slope: x2
BESTFIT, COLΣ, CORR, COV, EXPFIT, ΣLINE, LINFIT, LOGFIT, PREDX, PREDY,
PWRFIT, XCOL, YCOL
Command
Least Squares Solution Command: Returns the minimum norm least squares solution to any
system of linear equations where A × X = B.
If B is a vector, the resulting vector has a minimum Euclidean norm ||X|| over all vector
solutions that minimize the residual Euclidean norm ||A × X – B||. If B is a matrix, each
column of the resulting matrix, Xi, has a minimum Euclidean norm ||Xi|| over all vector
solutions that minimize the residual Euclidean norm ||A × Xi – Bi||.
If A has less than full row rank (the system of equations is underdetermined), an infinite number
of solutions exist. LSQ returns the solution with the minimum Euclidean length.
If A has less than full column rank (the system of equations is overdetermined), a solution that
satisfies all the equations may not exist. LSQ returns the solution with the minimum residuals of
A × X – B.
!Ø OPERATIONS L LSQ
!´ MATRIX LSQ
Singular Values (–54)
( Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).
Level 2/Argument 1
Level 1/Argument 2
[ array ]B
[[ matrix ]]A
→
[ array ]x
[[ matrix ]]A
→
[[ matrix ]]x
[[ matrix ]]B
LQ, RANK, QR, /
Level 1/Item 1
Command
LU Decomposition of a Square Matrix Command: Returns the LU decomposition of a square
matrix.
When solving an exactly determined system of equations, inverting a square matrix, or computing
the determinant of a matrix, the calculator factors a square matrix into its Crout LU
decomposition using partial pivoting.
The Crout LU decomposition of A is a lower-triangular matrix L, an upper-triangular matrix U
with ones on its diagonal, and a permutation matrix P, such that P × A = L × U. The results
satisfy P × A ≅ L × U.
!Ø FACTORIZATION LU
( Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).
!´ MATRIX FACTOR LU
Full Command and Function Reference 3-139
PARSURFACE
Type:
Command
Description:
PARSURFACE Plot Type Command: Sets plot type to PARSURFACE.
When plot type is set to PARSURFACE, the DRAW command plots an image graph of a 3vector-valued function of two variables. PARSURFACE requires values in the reserved variables
EQ, VPAR, and PPAR.
VPAR is made up of the following elements:
{ xleft, xright, ynear, yfar, zlow, zhigh, xmin, xmax, ymin, ymax, xeye, yeye, zeye, xstep, ystep }
For plot type PARSURFACE, the elements of VPAR are used as follows:
• xleft and xright are real numbers that specify the width of the view space.
• ynear and yfar are real numbers that specify the depth of the view space.
• zlow and zhigh are real numbers that specify the height of the view space.
• xmin and xmax are real numbers that specify the input region’s width. The default value is (–1,1).
• ymin and ymax are real numbers that specify the input region’s depth. The default value is (–1,1).
• xeye, yeye, and zeye are real numbers that specify the point in space from which the graph is
viewed.
• xstep and ystep are real numbers that set the number of x-coordinates versus the number of ycoordinates plotted.
The plotting parameters are specified in the reserved variable PPAR, which has this form:
{ (xmin, ymin), (xmax, ymax), indep, res, axes, ptype, depend }
For plot type PARSURFACE, the elements of PPAR are used as follows:
• (xmin, ymin) is not used.
• (xmax, ymax) is not used.
• indep is a name specifying the independent variable. The default value of indep is X.
• res is not used.
• axes is not used.
• ptype is a command name specifying the plot type. Executing the command PARSURFACE
places the name PARSURFACE in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:
…µ PARSURFACE
Input/Output: None
BAR, CONIC, DIFFEQ, FAST3D, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
PARTFRAC
Type:
Command
Description:
Performs partial fraction decomposition on a partial fraction.
Access:
Algebra …× or Arithmetic, !Þ POLYNOMIAL LL
Input:
An algebraic expression.
Output:
The partial fraction decomposition of the expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Perform a partial fraction decomposition of the following expression:
1
------------2
x –1
Command:
PARTFRAC(1/(X^2-1))
3-164 Full Command and Function Reference
MAIN
Type:
Command
Description:
Displays the main menu (or list) of CAS operations. This displays the CASCFG command, the
ALGB, ARIT, DIFF, EXP&LN, MATHS MATR, REWRITE and TRIGO menu commands
described in this part of the Command Reference, and the CMPLX and SOLVER menu
commands described in the Full Command and Function Reference (Chapter 3). Other menus are
not shown because they are within the submenus given by MAIN. More details are given in
Appendix K of the User’s Guide.
Access:
Catalog, …µ
Flags:
If the CHOOSE boxes flag is clear (flag –117 clear), displays the operations as a list. If the flag is
set, displays the operations as a menu of function keys.
ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MATHS, MATR, MODULAR,
POLYNOMIAL, REWRITE, TESTS, TRIGO
MANT
Type:
Description:
Access:
Flags:
Input/Output:
Function
Mantissa Function: Returns the mantissa of the argument.
!´REAL LMANT
( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 1/Argument 1
MAP
Type:
Description:
Access:
Input/Output:
x
→
ymant
'symb'
→
'MANT(symb)'
SIGN, XPON
Command
Applies a specified program to a list of objects or values. If one of the objects is a list, MAP will
apply the program recursively to the items in the inner list.
• Level 1/Argument 2 contains the program to apply to the objects or values.
• Level 2/Argument 1 contains the list, matrix, or vector.
…µMAP
Level 2/Argument 1
Example:
↓MATCH
Type:
Description:
Level 1/Item 1
Level 1/Argument 2
→
{list}1
«program»
{ 1 2 { 3 4 } } « →STR » MAP returns
{ "1" "2" { "3" "4" } }.
Level 1/Item 1
{list}2
Command
Match Pattern Down Command: Rewrites an expression that matches a specified pattern.
↓MATCH rewrites expressions or subexpressions that match a specified pattern 'symbpat'. An
optional condition, 'symbcond', can further restrict whether a rewrite occurs. A test result is also
returned to indicate if command execution produced a rewrite; 1 if it did, 0 if it did not.
Full Command and Function Reference 3-141
Access:
!°STACK OVER
Input/Output:
Level 2
( °is the left-shift of the Nkey).
Level 1
→
obj1
obj2
PICK, ROLL, ROLLD, ROT, SWAP
Input/Output:
Level 3
Level 2
Level 1
obj1
obj2
obj1
Level 2/Argument 1
Level 1/Argument 2
'symb1'
{ 'symbpat', 'symbrepl' }
→
Level 2/Item 1
Level 1/Item 2
'symb2'
0/1
Example 1:
→
'symb1'
{ 'symbpat', 'symbrepl', 'symbcond' }
'symb2'
0/1
This sequence: 'SIN(π/6)' { 'SIN(π/6)' '1/2' } ↑MATCH returns
'1/2' to level 2 and 1 (indicating a replacement was made) to level 1.
P2C
Type:
Command
Example 2:
Description:
Takes a list representing a permutation as an argument, and returns the permutation decomposed
into lists that represent cycles.
This sequence: 'SIN(X+π)' { 'SIN(&A+π)' '-SIN(&A)' } ↑MATCH
returns '-SIN(X)' to level 2 and 1 to level 1.
Example 3:
Access:
!Þ PERM
This sequence: 'W+ƒ(SQ(5))' { 'ƒ(SQ(&A))' '&A' '&AŠ0' } ↑MATCH
returns 'W+5' to level 2 and 1 to level 1.
A list representing a permutation. For example, the list {3,1,2,5,4} defines a permutation P, such
that P(1)=3, P(2)=1, P(3)=2, P(4)=5, and P(5)=4
↓MATCH
Input:
Output:
Level 2/Item 1:A list of cycles equivalent to the permutation. For example, the list {3,1,2,5,4}
defines a cycle C, such that C(3)=1, C(1)=2, C(2)=5, C(5)=4, and C(4)=3
Level 1, Item 2: The signature of the permutation, 1 or –1.
MATHS
Type:
Description:
Command
Displays a menu or list of CAS mathematics submenus. Details are given in Appendix J of the
User’s Guide.
Example:
Command:
Result:
Convert the permutation given by {3,4,5,2,1} into cycles:
Access:
Catalog, …µ
P2C({3,4,5,2,1})
Flags:
If the CHOOSE boxes flag is clear (flag –117 clear), displays the submenus as a list. If the flag is
C2P, CIRC
PA2B2
Type:
Description:
ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATR, MODULAR,
POLYNOMIAL, REWRITE, TESTS, TRIGO
Function
MATR
Takes a prime number, p, such that p=2 orp ≡ 1 modulo 4, and returns a Gaussian integer a + ib
Type:
Command
such that p = a2 + b2. This function is useful for factorizing Gaussian integers.
Description:
Displays a menu or list containing the CAS commands for matrix operations.
Access:
Arithmetic, !Þ INTEGER L
Access:
Catalog, …µ
Input:
A prime number, p, such that p=2 orp ≡ 1
Flags:
If the CHOOSE boxes flag is clear (flag –117 clear), displays the operations as a numbered list. If
the flag is set, displays the operations as a menu of function keys.
ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MODULAR,
POLYNOMIAL, REWRITE, TESTS, TRIGO
{{{1,3,5},{2,4}},-1}
modulo 4
Output:
A Gaussian integer a+ib such that p=a2+b2
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Complex mode must be set (flag –103 set).
GAUSS
PARAMETRIC
Type:
Command
Description:
Parametric Plot Type Command: Sets the plot type to PARAMETRIC.
When the plot type is PARAMETRIC, the DRAW command plots the current equation as a
complex-valued function of one real variable. The current equation is specified in the reserved
variable EQ. The plotting parameters are specified in the reserved variable PPAR, which has the
following form:
{ (xmin, ymin), (xmax, ymax), indep, res, axes, ptype, depend }
For plot type PARAMETRIC, the elements of PPAR are used as follows:
• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left corner
of the display range). The default value is (–6.5,–3.1) for the HP 48gII and (–6.5,–3.9) for the
HP 50g and 49g+.
3-162 Full Command and Function Reference
MAX
Type:
Description:
Function
Maximum Function: Returns the greater of two inputs.
Access:
!´REAL MAX
Flags:
Numerical Results (–3)
Input/Output:
Level 2/Argument 1
( ´ is the left-shift of the Pkey).
Level 1/Argument 2
Level 1/Item 1
x
y
→
max(x,y)
x
'symb'
→
'MAX(x, symb)'
'symb'
x
→
'MAX(symb, x)'
'symb1'
'symb2'
→
'MAX(symb1, symb2)'
x_unit1
y_unit2
→
max(x_unit1, y_unit2)
Full Command and Function Reference 3-143
Access:
OPENIO
Type:
Description:
Access:
Flags:
Input/Output:
OR
Type:
Description:
The character set in the HP 82240A Infrared Printer does not match the character set of the
calculator:
• 24 characters in the calculator’s character set are not available in the HP 82240A Infrared
Printer. (From the table in Appendix J, these characters are numbers 129, 130, 143-157, 159,
166, 169, 172, 174, 184, and 185.) The HP 82240A prints a  in substitution.
• Many characters in the extended character table (character codes 128 through 255) do not have
the same character code. For example, the « character has code 171 in the calculator and code
146 in the HP 82240A Infrared Printer.
To use the CHR command to print extended characters with an HP 82240A Infrared Printer, first
execute OLDPRT. The remapping string modified by OLDPRT is the second parameter in
PRTPAR. This string (which is empty in the default state) changes the character code of each byte
to match the codes in the HP 82240A Infrared Printer character table.
To cancel OLDPRT character mapping in order to print to an HP 82240B Infrared Printer, purge
the PRTPAR variable. To print a string containing graphics data, disable OLDPRT.
…µ OLDPRT
CR, DELAY, PRLCD, PRST, PRSTC, PRVAR, PR1
Command
Open I/O Port Command: Opens a serial port using the I/O parameters in the reserved variable
IOPAR.
Since all Kermit-protocol commands automatically effect an OPENIO first, OPENIO is not
normally needed, but can be used if an I/O transmission does not work. OPENIO is necessary
for interaction with devices that interpret a closed port as a break.
OPENIO is also necessary for the automatic reception of data into the input buffer using nonKermit commands. If the port is closed, incoming characters are ignored. If the port is open,
incoming characters are automatically placed in the input buffer (up to 255 characters). These
characters can be detected with BUFLEN, and can be read out of the input buffer using SRECV.
If the port is already open, OPENIO does not affect the data in the input buffer. However, if the
port is closed, executing OPENIO clears the data in the input buffer.
For more information, refer to the reserved variable IOPAR in appendix D, “Reserved
Variables”.
…µ OPENIO
I/O Device (–33), I/O Device for Wire (–78)
None
BUFLEN, CLOSEIO, SBRK, SRECV, STIME, XMIT
Function
OR Function: Returns the logical OR of two arguments.
When the arguments are binary integers or strings, OR does a bit-by-bit (base 2) logical
comparison.
• An argument that is a binary integer is treated as a sequence of bits as long as the current
wordsize. Each bit in the result is determined by comparing the corresponding bits (bit1 and bit2)
in the two arguments as shown in the following table:
3-160 Full Command and Function Reference
MEAN
Type:
Description:
Command
Mean Command: Returns the mean of each of the m columns of coordinate values in the current
statistics matrix (reserved variable ΣDAT).
The mean is returned as a vector of m real numbers, or as a single real number if m = 1. The mean
is computed from the formula:
1 n
--- ∑ x i
ni = 1
Access:
where xi is the ith coordinate value in a column, and n is the number of data points.
…µ MEAN OR
…ÙSingle-variable statistics, Mean
(Ùis the right-shift of the 5key and always invokes a choose box).
Input/Output:
Level 1/Argument 1
MEM
Type:
Description:
Level 1/Item 1
→
xmean
→
[xmean1, xmean2, ..., xmeanm ]
BINS, MAXΣ, MINΣ, SDEV, TOT, VAR
Command
Memory Available Command: Returns the number of bytes of available RAM.
The number returned is only a rough indicator of usable available memory, since recovery features
(LASTARG= !î, …¯, and !®) consume or release varying amounts of
memory with each operation.
Before it can assess the amount of memory available, MEM must remove objects in temporary
memory that are no longer being used. This clean-up process (also called “garbage collection”)
also occurs automatically at other times when memory is full. Since this process can slow down
calculator operation at undesired times, you can force it to occur at a desired time by executing
MEM. In a program, execute MEM DROP.
Access:
!°MEMORY MEM
Input/Output:
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 1/Item 1
→
Type:
Description:
x
BYTES
Command Operation
A built-in menu is specified by a real number xmenu. The format of xmenu is mm.pp, where mm is the
menu number and pp is the page of the menu. If pp doesn’t correspond to a page of the specified
menu, the first page is displayed.
Library menus are specified in the same way as built-in menus, with the library number serving as
Custom menus are specified by a list of the form { "label-object" action-object } or a name containing
a list (namedefinition). Either argument is stored in reserved variable CST, and the custom menu is
subsequently displayed.
MENU takes any object as a valid argument and stores it in CST. However, the calculator can
build a custom menu only if CST contains a list or a name containing a list. Thus, if an object other
Full Command and Function Reference 3-145
The number of a character can be found by accessing the Characters tool (…±) and
highlighting that character. The number appears near the bottom of the screen. These are also
listed in Appendix J of this manual.
Access:
!°TYPE LNUM
!° LCHARS NUM
…&N NUM
( °is the left-shift of the Nkey).
( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1
NUMX
Type:
Description:
Access:
Input/Output:
“string”
CHR, POS, REPL, SIZE, SUB
Level 1/Item 1
→
Command
Number of X-Steps Command: Sets the number of x-steps for each y-step in 3D perspective
plots.
The number of x-steps is the number of independent variable points plotted for each dependent
variable point plotted. This number must be 2 or more. This value is stored in the reserved
variable VPAR. YSLICE is the only 3D plot type that does not use this value.
…µ NUMX
Level 1/Argument 1
nx
NUMY
Type:
Description:
n
Level 1/Item 1
→
LNAME
POWMOD
MODSTO
MAIN
ARIT
PROMPTSTO
Level 1/Item 1
→
NUMX
Command
Object to Stack Command: Separates an object into its components. For some object types, the
number of components is returned as item n+1 (stack level 1).
If the argument is a complex number, list, array, or string, OBJ→ provides the same functions as
C→R, LIST→, ARRY→, and STR→, respectively. For lists, OBJ→ also returns the number of
list elements. If the argument is an array, OBJ→ also returns the dimensions { m n } of the array,
where m is the number of rows and n is the number of columns.
For algebraic objects, OBJ→ returns the arguments of the top-level (least-nested) function (arg1
… argn), the number of arguments of the top-level function (n), and the name of the top-level
function (function).
If the argument is a string, the object sequence defined by the string is executed.
!°TYPE OBJ→
( °is the left-shift of the Nkey).
3-158 Full Command and Function Reference
INVMOD
ALGB
SOLVER
VER
SUBTMOD
GCDMOD
KEYEVAL
CMPLX
EXP&LN
MULTMOD
EXPANDMOD
TRIGO
EPSX0
DIVMOD
FACTORMOD
SCROLL
MATR
?
Display a menu containing ATAN2S, ASIN2T, ASIN2C and ACOS2S.
The four functions are displayed above the A to D keys. In Algebraic mode, NOVAL is
returned as item 1.
MERGE
Type:
Description:
Access:
Command
Do not use this command, a carry-over from the HP 48SX for handling plug-in RAM cards.
…µ MERGE
MIN
Type:
Description:
Access:
Flags:
Input/Output:
Command
Number of Y-Steps Command: Sets the number of y-steps across the view volume in 3D
perspective plots.
The number of y-steps is the number of dependent variable points plotted across the view
volume. This number must be 2 or more. This value is stored in the reserved variable VPAR.
ny
Access:
Result:
EXLR
DIV2MOD
RREFMOD
CASCFG
DIFF
∞
Function
Minimum Function: Returns the lesser of two inputs.
!´REAL MIN
( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 2/Argument 1
Level 1/Argument 1
OBJ→
Type:
Description:
Example:
Command:
NUMY
Access:
…µ NUMY
Input/Output:
108-113
114-119
120-125
126-131
132-137
138-140
Example 1:
Example 2:
Example 3:
MINEHUNT
Type:
Description:
Level 1/Argument 2
Level 1/Item 1
x
y
→
x
'symb'
→
'symb'
x
→
'MIN(symb, x)'
'symb1'
'symb2'
→
'MIN(symb1, symb2)'
x_unit1
y_unit2
10 23 MIN returns 10.
-10 -23 MIN returns -23.
1_m 9_cm MIN returns 9_cm.
MAX
→
min(x_unit1, y_unit2)
min(x,y)
'MIN(x, symb)'
Command
Starts the MINEHUNT game.
In this game, you are standing in the upper-left corner of an 8x16 battlefield grid. Your mission is
to travel safely to the lower-right corner, avoiding invisible mines along the way. The game tells
you how many mines are under the eight squares adjacent to your position.
Full Command and Function Reference 3-147
Command:
Result:
NIP
Type:
Description:
Access:
Input/Output:
NEXTPRIME(145)
149
Level 1/Argument 1
RPL command
Drops the (n–1)th argument, where n is the number of arguments or items on the stack. (that is,
the object on level 2 of the stack). This is equivalent to executing SWAP followed by DROP in
RPN mode.
!° STACK LLNIP
( °is the left-shift of the Nkey).
MINΣ
Type:
Description:
I STACK LLNIP
Input/Output:
Level 2
Example:
NOT
Type:
Description:
Access:
Flags:
Input/Output:
Level 1
obj1
obj2
333 222 1 NIP returns 333 1
DUP, DUPDUP, DUPN, DUP2
Level 1
→
NOVAL
Type:
Description:
obj2
Function
NOT Command: Returns the one’s complement or logical inverse of the argument.
When the argument is a binary integer or string, NOT complements each bit in the argument to
produce the result.
• A binary integer is treated as a sequence of bits as long as the current wordsize.
• A string is treated as a sequence of bits, using 8 bits per character (that is, using the binary
version of the character code).
When the argument is a real number or symbolic, NOT does a true/false test. The result is 1
(true) if the argument is zero; it is 0 (false) if the argument is nonzero. This test is usually done on
a test result (T/F).
If the argument is an algebraic object, then the result is an algebraic of the form NOT symb.
Execute →NUM (or set flag –3 before executing NOT) to produce a numeric result from the
algebraic result.
!° TEST LNOT
( °is the left-shift of the Nkey).
…ãL LOGIC NOT
(ã is the right-shift of the 3key).
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Level 1/Argument 1
Level 1/Item 1
ISPRIME?, PREVPRIME
Level 1/Item 1
#n1
→
#n2
T/F
→
0/1
“string1”
→
“string2”
'symb'
→
'NOT symb'
Access:
Input/Output:
MITM
Type:
Description:
Access:
Input/Output:
1.00000000000E–499
e, i, MAXR, π
Command
Minimum Sigma Command: Finds the minimum coordinate value in each of the m columns of
the current statistics matrix (reserved variable ΣDAT).
The minima are returned as a vector of m real numbers, or as a single real number if m = 1.
…µ MINΣ
Level 1/Item 1
→
xmin
→
{ xmin 1 xmin 2 … xmin m }
BINS, MAXΣ, MEAN, SDEV, TOT, VAR
Command
Multiple-equation Menu Item Order Command. Changes multiple equation menu titles and order.
The argument list contains the variable names in the order you want. Use "" to indicate a blank
label. You must include all variables in the original menu and no others.
…µMITM
Level 2/Argument 1
Level 1/Argument 2
"title"
{ list }
Level 1/Item 1
→
MINIT
MKISOM
Type:
Description:
Command
Access:
Matrices, !Ø
Input:
Level 2/Argument 1: For a 3-d isometry, a list of the characteristic elements of the isometry. For
a 2-d isometry, the characteristic element of the isometry (either an angle or a vector).
Level 1/Argument 2: +1 for a direct isometry or –1 for an indirect isometry.
Output:
The matrix that represents the given isometry.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example 1:
Command:
Result:
3-156 Full Command and Function Reference
'MINR'
→
Level 1/Argument 1
AND, OR, XOR
Command
INFORM Place Holder/Result Command: Place holder for reset and initial values in user-defined
dialog boxes. NOVAL is returned when a field is empty.
→
Returns the matrix representation for a given isometry.
LINEAR APPL
Find the matrix for a rotation of π/2 radians in two dimensions
MKISOM(π/2, 1)
0 –1
1 0
Full Command and Function Reference 3-149
NDIST
Type:
Description:
Command
Normal Distribution Command: Returns the normal probability distribution (bell curve) at x
based on the mean m and variance v of the normal distribution.
NDIST is calculated using this formula:
MOLWT
Type:
Description:
2
(x – m)
– -------------------
e 2v
ndist ( m, v, x ) = --------------------2πv
Access:
!´LPROBABILITY L NDIST
Input/Output:
Level 3/Argument 1
( ´ is the left-shift of the Pkey).
Level 2/Argument 2
m
v
UTPN
NDUPN
Type:
Description:
RPL command
Duplicates an object n times, and returns n.
Access:
Level 1/Argument 3
!°STACK !«NDUPN
ISTACK !«NDUPN
x
Level 1/Item 1
→
ndist(m, v, x)
Access:
G PERIODIC TABLE
Flags:
Units Usage (61)
Input/Output:
Example:
NEG
Type:
Description:
Access:
'name'
( °is the left-shift of the Nkey).
Example 1:
Leveln+1 … Level2
Level 1
Level1
→
obj
n
obj … obj
To make a list of 100 “X”s, run "X" 100 NDUPN →LIST.
DUP, DUPDUP, DUPN, DUP2
n
… ß NEG
( ß is the right-shift of the 1key).
!´L COMPLEX L NEG
( ´ is the left-shift of the Pkey).
W
Flags:
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Input/Output:
Level 1/Argument 1
Example 2:
Analytic function
Negate Analytic Function: Changes the sign or negates an object.
Negating an array creates a new array containing the negative of each of the original elements.
Negating a binary number takes its two’s complement (complements each bit and adds 1).
Negating a graphics object “inverts” it (toggles each pixel from on to off, or vice-versa). If the
argument is PICT, the graphics object stored in PICT is inverted.
MROOT
Type:
Description:
Access:
Input/Output:
Level 1/Item 1
→
#n1
→
#n2
[ array ]
→
[ –array ]
–z
'symb'
→
'–(symb)'
x_unit
→
–x_unit
grob1
→
grob2
PICT1
→
PICT2
Level 1/Item 1
→
MSGBOX
Type:
Description:
Access:
x or x_unit
→
“string”
x or x_unit
The command sequence "CH3C6H2(NO2)3" MOLWT returns
'227.133_g/gmol' when flag 61 is clear.
The command sequence 'C12H17ClN4OS' MOLWT returns 300.8055 when flag 61
is set.
PERINFO, PERTBL, PTPROP
Command
Multiple Roots Command: Uses the multiple-equation solver to solve for one or more variables
using the equations in EQ. Given a variable name, MROOT returns the found value; with "ALL"
MROOT stores a found value for each variable but returns nothing.
…µ MROOT
Level 1/Argument 1
z
3-154 Full Command and Function Reference
MOLWT
Level 1/Argument 1
Input/Output:
Level 2
Function
Returns the molecular weight for the specified molecular formula. It takes the formula as a string
(such as "H2O") or name (with certain restrictions, such as 'H2O'). It returns the molecular
weight. It chooses to use or not use units according to the Units Usage flag (flag 61: SI units if
clear, no units if set).
You can store a molecular formula in a variable, then use the variable name with MOLWT. You
should do this when you want to use MOLWT in an expression and the formula contains
parentheses or matches a command name. You must take care when naming a variable that
contains a formula string or name. Make sure the variable name isn’t a valid formula — for
example, start the variable name with a lowercase letter. (If the variable name is a valid formula,
using MOLWT with the variable name returns the molecular weight for the variable name, not for
the formula it contains.)
Level 1/Item 1
'name'
→
"ALL"
→
x
MCALC, MUSER
Command
Message Box Command: Creates a user-defined message box.
MSGBOX displays “message” in the form of a standard message box. Message text too long to
appear on the screen is truncated. You can use spaces and new-line characters (…ë) to
control word-wrapping and line breaks within the message.
Program execution resumes when the message box is exited by selecting OK or CANCL.
!°LOUT MSGBOX
( °is the left-shift of the Nkey).
Full Command and Function Reference 3-151
Input/Output:
Input/Output:
Level 3/Argument 1
Example 1:
Example 2:
Example 3:
RES
Type:
Description:
Level 1/Item 1
L3
L2
L1
→
[[ matrix ]]3
obj1
obj2
obj3
→
[[ matrix ]]3
[ vector ]2
→
[ vector ]3
{ listresult }
Level 2/Argument 2
Level 1/Argument 3
[[ matrix ]]1
nposition
[[ matrix ]]2
[[ matrix ]]1
{ nrow, ncolumn }
[[ matrix ]]2
[ vector ]1
nposition
{ listtarget }
nposition
{ list1 }
→
“stringtarget”
nposition
“string1”
→
“stringresult”
grobtarget
(#n, #m)
grob1
→
grobresult
grobtarget
(x,y)
grob1
→
grobresult
PICT
(#n, #m)
grob1
→
→
PICT
(x,y)
grob1
[[ 1 1 1 1 ][ 1 1 1 1 ][ 1 1 1 1 ]] 6 [[ 2 2 ][ 2 2 ]]
REPL
returns [[ 1 1 1 1 ][ 1 2 2 1 ][ 1 2 2 1 ]].
{ A B C D E } 2 { F G } REPL returns { A F G D E }.
ERASE PICT (0,0) # 5d # 5d BLANK NEG REPL replaces a portion of
PICT with a 5 x 5 graphics object, each of whose pixels is on (dark), and whose upper left corner
is positioned at (0,0) in PICT.
CHR, GOR, GXOR, NUM, POS, SIZE, SUB
Command
Resolution Command: Specifies the resolution of mathematical and statistical plots, where the
resolution is the interval between values of the independent variable used to generate the plot.
A real number ninterval specifies the interval in user units. A binary integer #ninterval specifies the
interval in pixels.
The resolution is stored as the fourth item in PPAR, with default value 0. The interpretation of
the default value is summarized in the following table.
Plot Type
Default Interval
BAR
10 pixels (bar width = 10 pixel columns)
DIFFEQ
unlimited: step size is not constrained
FUNCTION
2 pixels (plots a point in every other column of pixels)
CONIC
2 pixels (plots a point in every other column of pixels)
TRUTH
2 pixels (plots a point in every other column of pixels)
GRIDMAP
RES does not apply
HISTOGRAM
10 pixels (bin width = 10 pixel columns)
PARAMETRIC
[independent variable range in user units]/130
PARSURFACE
RES does not apply
L3
L2
L1
obj1
obj2
obj3
obj1
L = Level; A = Argument; I =Item
Example:
PICT
Type:
Description:
333 22 1 PICK3 returns 333 22 1 333.
PICK, OVER, DUP
Command
PICT Command: Puts the name PICT on the stack.
PICT is the name of a storage location in calculator memory containing the current graphics
object. The command PICT enables access to the contents of that memory location as if it were a
variable. Note, however, that PICT is not a variable as defined in the calculator: its name cannot be
quoted, and only graphics objects may be stored in it.
If a graphics object smaller than 131 wide × 80 pixels high is stored in PICT, it is enlarged to 131
× 80. (These values are 131 x 64 on the HP 48gII). A graphics object of unlimited pixel height
and up to 2048 pixels wide can be stored in PICT.
Access:
!° L[PICT] PICT
Input/Output:
Level 1/Argument 1
Example:
PICTURE
Type:
Description:
Access:
( °is the left-shift of the Nkey).
Level 1/Item 1
→
PICT
PICT RCL returns the current graphics object to the stack.
GOR, GXOR, NEG, PICTURE, PVIEW, RCL, REPL, SIZE, STO, SUB
Command
Picture Environment Command: Selects the Picture environment (that is, selects the graphics
display and activates the graphics cursor and Picture menu).
When executed from a program, PICTURE suspends program execution until −is pressed.
…µ PICTURE
š
Input/Output: None
Example:
This program:
« "Press CANCEL to returnto stack"
1 DISP 3 WAIT PICTURE »
displays a message for 3 seconds, then selects the Picture environment. (The character in the
program indicates a linefeed.)
PICT, PVIEW, TEXT
PINIT
Type:
Description:
Access:
3-200 Full Command and Function Reference
→
L4
Command
Port Initialize Command: Initializes all currently active ports. It may affect data already stored in a
port.
PINIT is particularly useful when a third-party library has corrupted memory. It stores and then
purges an object in each internal port. This has the effect of initializing each port without
disturbing any previous-stored data, while removing any invalid objects.
…µ PINIT
Full Command and Function Reference 3-169
I/O Device flag (–33), I/O Data Format (–35), RECV Overwrite (–36), I/O Messages (–39), I/O
Device for Wire (–78)
Input/Output: None
BAUD, CKSM, FINISH, KGET, PARITY, RECN, SEND, SERVER, TRANSIO
Flags:
REF
Type:
Command
Description:
Reduces a matrix to echelon form. This is a subdiagonal reduction (Gauss, not Gauss-Jordan).
Flags:
Input/Output:
Level 2/Argument 1
Example 1:
Example 2:
Access:
Matrices, !Ø
Input:
A real or complex matrix.
Output:
The equivalent matrix in echelon form.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Complex mode must be set (flag –103 set) if the input is complex.
rref, RREFMOD
PLOT
Type:
Description:
Access:
Input:
Output:
Example:
Command:
Result:
LINEAR SYSTEMS
REMAINDER
Type:
Function
Description:
Returns the remainder of the Euclidean division of two polynomials.
Access:
Arithmetic, !ÞPOLYNOMIAL !«
Input:
Level 2/Argument 1: The numerator polynomial.
Level 1/Argument 2: The denominator polynomial.
Output:
The remainder resulting from the Euclidean division.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Complex mode must be set (flag –103 set) if either input is complex.
Example:
Command:
Result:
Find the remainder of the division of
QUOT
3
2
x + 6 x + 11 x + 6
by
Level 1/Argument 2
Level 1/Item 1
→
“data”
“type”
“response”
A PKT command to send a generic directory request is "D" "G" PKT.
To send a host command packet, use a command from the server’s operating system for the data
string and "C" for the type string. For example, "'ABC' PURGE" "C" PKT on a local
calculator would instructor a server calculator to purge variable ABC.
CLOSEIO, KERRM, SERVER
Command
Stores its argument in EQ and opens the PLOT SETUP screen.
P GRAPH PLOT
An expression.
The input expression.
Store SIN(X) in EQ and open the PLOT SETUP screen:
PLOT(SIN(X))
PLOT SETUP screen is open with SIN(X) in EQ. SIN(X) is copied to history (LASTARG in RPN
mode).
Type:
Function
Description:
Adds a function to the existing plot function list, and opens the Plot Setup screen.
Access:
P GRAPH PLOTA
Input/Output:
Level 1/Argument 1
2
x + 5x + 6 .
(symb)
Level 1/Item 1
→
REMAINDER(X^3+6*X^2+11*X+6, X^2+5*X+6)
0
RENAME
Type:
Command
Description:
Rename Object Command: Renames an object to the name that you specify.
Access:
…µ RENAME
Input/Output:
I/O Device (–33), I/O Messages (–39), I/O Device for Wire (–78). The I/O Data Format flag (–
35) can be significant if the server sends back more than one packet.
Level 2/Argument 1
Level 1/Argument 2
new 'name'
old 'name'
COPY
PMAX
Type:
Description:
Access:
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
PMIN
Type:
Description:
3-198 Full Command and Function Reference
Command
PICT Maximum Command: Specifies (x, y) as the coordinates at the upper right corner of the
display.
The complex number (x, y) is stored as the second element in the reserved variable PPAR.
…µ PMAX
(x,y)
PDIM, PMIN, XRNG, YRNG
Level 1/Item 1
→
Command
PICT Minimum Command: Specifies (x, y) as the coordinates at the lower left corner of the
display. The complex number (x, y) is stored as the first element in the reserved variable PPAR.
Full Command and Function Reference 3-171
Access:
If the list contains a single number nelements, the result is an n-element vector. If the list contains
two numbers nrows and mcols, the result is an n × m matrix.
Elements taken from the argument vector or matrix preserve the same row order in the resulting
vector or matrix. If the result is dimensioned to contain fewer elements than the argument vector
or matrix, excess elements from the argument vector or matrix at the end of the row order are
discarded. If the result is dimensioned to contain more elements than the argument vector or
matrix, the additional elements in the result at the end of the row order are filled with zeros.
If the argument vector or matrix is specified by global, the result replaces the argument as the
contents of the variable.
!Ø CREATE LLRDM
( Ø is the left-shift of the 5key).
!´MATRIX MAKE RDM
• res is a real number specifying the interval, in user-unit coordinates, between values of the
independent variable. The default value is 0, which specifies an interval of 2 degrees, 2 grads, or
• axes is a list containing one or more of the following, in the order listed: a complex number
specifying the user-unit coordinates of the plot origin, a list specifying the tick-mark annotation,
and two strings specifying labels for the horizontal and vertical axes. The default value is (0,0).
• ptype is a command name specifying the plot type. Executing the command POLAR places the
name POLAR in ptype.
• depend is a name specifying a label for the vertical axis. The default value is Y.
The current equation is plotted as a function of the variable specified in indep. The minimum and
maximum values of the independent variable (the plotting range) can be specified in indep;
otherwise, the default minimum value is 0 and the default maximum value corresponds to one full
circle in the current angle mode (360 degrees, 400 grads, or 2π radians). Lines are drawn between
plotted points unless flag –31 is set.
If flag –28 is set, all equations are plotted simultaneously.
If EQ contains an expression or program, the expression or program is evaluated in Numerical
Results mode for each value of the independent variable to give the values of the dependent
variable. If EQ contains an equation, the plotting action depends on the form of the equation.
Form of Current
Plotting Action
Equation
( ´ is the left-shift of the Pkey).
Input/Output:
Example 1:
Example 2:
RDZ
Type:
Description:
Level 2/Argument 1
Level 1/Argument 2
[ vector ]1
{ nelements }
→
Level 1/Item 1
[ vector ]2
[ vector ]
{ nrows, mcols }
→
[[ matrix ]]
[[ matrix ]]
{ nelements }
→
[ vector ]
[[ matrix ]]1
{ nrows, mcols }
→
[[ matrix ]]2
'global'
{ nelements }
→
→
'global'
{ nrows, mcols }
[ 2 4 6 8 ] { 2 2 } RDM returns [[ 2 4 ][ 6 8 ]].
[[ 2 3 4][ 1 6 9 ]] 8 RDM returns [ 2 3 4 1 6 9 0 0 ].
TRN
Command
Randomize Command: Uses a real number xseed as a seed for the RAND command.
If the argument is 0, a random value based on the system clock is used as the seed.
Access:
!´LPROBABILITY RDZ
Input/Output:
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
xseed
RE
Type:
Description:
Access:
Flags:
Level 1/Item 1
→
COMB, PERM, RAND, !
Function
Real Part Function: Returns the real part of the argument.
If the argument is a vector or matrix, RE returns a real array, the elements of which are equal to
the real parts of the corresponding elements of the argument array.
…ßL RE
(ßis the right-shift of the 1key).
Numerical Results (–3)
3-196 Full Command and Function Reference
Access:
Flags:
Input/Output:
expr = expr
Each expression is plotted separately. The intersection of the
two graphs shows where the expressions are equal
name = expr
Only the expression is plotted
…µ POLAR
Simultaneous Plotting (–28), Curve Filling (–31)
None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
POLYNOMIAL
Type:
Command
Description:
Displays a menu or list of CAS operations with polynomials.
Access:
Catalog, …µ
Flags:
If the CHOOSE boxes flag is clear (flag –117 clear), displays the operations as a numbered list. If
the flag is set, displays the operations as a menu of function keys.
ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
MODULAR, REWRITE, TESTS, TRIGO
POP
Type:
Command
Access:
Input:
Output:
Restores the flags and current directory saved by the most recent execution of PUSH. If no
PUSH saves are left, the command has no effect.
…µ POP
None
In Algebraic mode the command returns NOVAL to level 1 of the stack.
PUSH, RCLF, STOF
Description:
Full Command and Function Reference 3-173
Access:
…ÓTools ALRM RCLALARM
( Ó is the right-shift of the 9 key).
…&9ALRM RCLALARM
„°LLTIME ALRM RCLALARM
Level 1/Argument 1
RCLF
Type:
Description:
Access:
Level 1/Item 1
→
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 1/Item 1
→
RCLKEYS
Type:
Description:
Access:
Flags:
Input/Output:
Type:
Description:
{ #nsystem #nuser #nsystem2 #nuser2 }
STOF, PUSH, POP
Command
Recall Key Assignments Command: Returns the current user key assignments. This includes an S
if the standard definitions are active (not suppressed) for those keys without user key assignments.
The argument xkey is a real number of the form rc.p specifying the key by its row number r, its
column number c, and its plane (shift) p. (For a definition of plane, see the entry for ASN.)
„&HKEYS RCLKEYS
„°LMODES KEYS RCLKEYS
( °is the left-shift of the Nkey).
User-Mode Lock (–61) and User Mode (–62) affect the status of the user keyboard
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
Expand (X+1)3.
POWEXPAND((X+1)^3)
(X+1)·(X+1)·(X+1)
POWMOD
Type:
Function
Description:
Raises an object (number or expression) to the specified power, and expresses the result modulo
the current modulus.
Access:
Arithmetic, !Þ MODULO L
Input:
Level 2/Argument 1: The object.
Level 1/Argument 2: The exponent.
Output:
The result of the object raised to the exponent, modulo the current modulus.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
PR1
Type:
Description:
Command
Print Level 1 Command: Prints an object in multiline printer format.
All objects except strings are printed with their identifying delimiters. Strings are printed without
the leading and trailing " delimiters.
If flag –34 is set (printer output directed to the serial port), flag –33 must be clear.
Multiline printer format is similar to multiline display format, with the following exceptions:
• Strings and names that are more than 24 characters long are continued on the next printer line.
• The real and imaginary parts of complex numbers are printed on separate lines if they don’t fit
on the same line.
• Grobs are printed graphically.
• Arrays are printed with a numbered heading for each row and with a column number before
each element.
For example, the 2 × 3 array
1 2 3
4 5 6
would be printed as follows:
Level 1/Argument 1
{ date time objaction xrepeat }
Command
Recall Flags Command: Returns a list of integers representing the states of the system and user
flags, respectively.
A bit with value 1 indicates that the corresponding flag is set; a bit with value 0 indicates that the
corresponding flag is clear. The rightmost (least significant) bit of #nsystem and #nuser indicate the
states of system flag –1 and user flag +1, respectively.
Used with STOF, RCLF lets a program that alters the state of a flag or flags during program
execution preserve the pre-program-execution flag status.
„&HFLAG L RCLF
„°LMODES FLAG L RCLF
Flags:
Binary Integer Wordsize (–5 through –10)
Input/Output:
The result from applying the distributive property of exponentiation over multiplication.
( °is the left-shift of the Nkey).
Input/Output:
nindex
DELALARM, FINDALARM, STOALARM
Output:
Flags:
Level 1/Item 1
→
{ obj1, xkey 1, ... ,objn, xkey n }
→
{ S, obj1, xkey 1, ... objn, xkey n }
ASN, DELKEYS, STOKEYS
Command
xmenu has the form mm.pp, where mm is the menu number and pp is the page of the menu.
Array { 2 3 }
Row 1
1] 1
2] 2
3] 3
Row 2
1] 4
2] 5
3] 6
3-194 Full Command and Function Reference
Full Command and Function Reference 3-175
Input/Output:
RCEQ
Type:
Description:
Access:
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
z1
[ array ]
[ array ]
z
'symb'
'symb1'
#n1
n1
#n1
x_unit1
x
x_unit
'symb'
x_unit
z2
{[ matrix ]]
z
'symb'
z
'symb2'
n2
#n2
#n2
y_unit2
y_unit
y
x_unit
'symb'
Level 1/Item 1
→
→
→
→
→
→
→
→
→
→
→
→
→
→
z1/z2
[[ array × matrix–1]]
[ array/z ]
'z/symb'
'symb/z'
'symb1/symb2'
#n3
#n3
#n3
(x/y)_unit1/unit2
(x/y)_1/unit
(x/y)_unit
'symb/x_unit'
'x_unit/symb'
Command
Recall from EQ Command: Returns the unevaluated contents of the reserved variable EQ from
the current directory.
To recall the contents of EQ from a parent directory (when EQ doesn’t exist in the current
directory) evaluate the name EQ.
…µ RCEQ (or …EQ after pressing J)
Level 1/Item 1
→
RCI
Type:
Description:
Access:
objEQ
STEQ
Command
Multiply Row by Constant Command: Multiplies row n of a matrix (or element n of a vector) by a
constant xfactor, and returns the modified matrix.
RCI rounds the row number to the nearest integer, and treats vector arguments as column
vectors.
!Ø CREATE ROW RCI
( Ø is the left-shift of the 5key).
!´ MATRIX ROW RCI
ydependent = (mxindependent) + b
Access:
…µ PREDY
Input/Output:
Level 1/Argument 1
Example:
PREVAL
Function
Description:
With respect to the current default variable, returns the difference between the values of a
function at two specified values of the variable.
PREVAL can be used in conjunction with INTVX to evaluate definite integrals. See the example
below.
Access:
Calculus, !Ö DERIV. & INTEG L.
Input:
Level 3/Argument 1: A function.
Level 2/Argument 2: The lower bound.
Level 3/Argument 1: The upper bound.
The bounds can be expressions.
Output:
The result of the evaluation.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Evaluate the following:
( ´ is the left-shift of the Pkey).
RCIJ
Type:
Description:
Level 2/Argument 2
Level 1/Argument 3
[[ matrix ]]1
xfactor
nrow number
→
Level 1/Item 1
[[ matrix ]]3
[ vector ]1
xfactor
nelement number
→
[ vector ]2
RCIJ
Command
Add Multiplied Row Command: Multiplies row i of a matrix by a constant xfactor, adds this
product to row j of the matrix, and returns the modified matrix; or multiplies element i of a vector
3-192 Full Command and Function Reference
Level 1/Item 1
→
xindependent
ydependent
Given four columns of data in ΣDAT, the command sequence:
2 XCOL 4 YCOL PWRFIT LR 11 PREDY
sets column 2 as the independent variable column, sets column 4 as the dependent variable
column, and sets the power statistical model. It then executes LR, generating intercept and slope
regression coefficients, and storing them in ΣPAR. Then, given an independent value of 11, it
returns a predicted dependent value based on the regression coefficients and the statistical model.
COLΣ, CORR, COV, EXPFIT, ΣLINE, LINFIT, LOGFIT, LR, PREDX, PWRFIT, XCOL,
YCOL
Type:
Input/Output:
Level 3/Argument 1
Command
Predicted y-Value Command: Returns the predicted dependent-variable value ydependent, based on
the independent-variable value xindependent, the currently selected statistical model, and the current
regression coefficients in the reserved variable ΣPAR.
The value is predicted using the regression coefficients most recently computed with LR and
stored in the reserved variable ΣPAR. For the linear statistical model, the equation used is this:
where m is the slope (the third element in ΣPAR) and b is the intercept (the fourth element in
ΣPAR).
For the other statistical models, the equations used by PREDY are listed in the LR entry.
If PREDY is executed without having previously generated regression coefficients in ΣPAR, a
default value of zero is used for both regression coefficients–in this case PREDY will return 0 for
statistical models LINFIT and LOGFIT, and error for statistical models EXPFIT and PWRFIT.
/
Level 1/Argument 1
PREDY
Type:
Description:
3
∫0 ( x
Command:
3
+ 3 x ) dx
PREVAL(INTVX(X^3+3*X),0,3)
Full Command and Function Reference 3-177
QXA
Type:
Input/Output:
Command
Level 1/Argument 1
Description:
Expresses a quadratic form in matrix form.
Access:
!Ø
Input:
Level 2/Argument 1: A quadratic form.
Level 1/Argument 2: A vector containing the variables.
Output:
Level 2/Item 1: The quadratic form expressed in matrix form.
Level 1/Item 2: The vector containing the variables.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Express the following quadratic form in matrix form:
2
x + xy + y
!Ú
QXA(X^2+X*Y+Y^2, [X,Y])
AXQ, GAUSS, SYLVESTER
Type:
Description:
Access:
RAND
Type:
Description:
Access:
Input/Output:
Command
RAD sets flag –17 and clears flag –18, and displays the RAD annunciator.
In Radians angle mode, real-number arguments that represent angles are interpreted as radians,
and real-number results that represent angles are expressed in radians.
( °is the left-shift of the Nkey).
Command
Random Number Command: Returns a pseudo-random number generated using a seed value,
The calculator uses a linear congruential method and a seed value to generate a random number
xrandom in the range 0 ≤ x < 1. Each succeeding execution of RAND returns a value computed
from a seed value based upon the previous RAND value. (Use RDZ to change the seed.)
!´L PROBABILITY RAND
( ´ is the left-shift of the Pkey).
COMB, PERM RDZ, !
Command
Matrix Rank Command: Returns the rank of a rectangular matrix.
3-190 Full Command and Function Reference
Command
Polynomial Roots Command: Returns all roots of an n-degree polynomial having real or complex
coefficients.
For an nth-order polynomial, the argument must be a real or complex array of length n + 1
containing the coefficients listed from highest order to lowest. The result is a real or complex
vector of length n containing the computed roots.
PROOT interprets leading coefficients of zero in a limiting sense. As a leading coefficient
approaches zero, a root of the polynomial approaches infinity: therefore, if flag –22 is clear (the
default), PROOT reports an Infinite Result error if a leading coefficient is zero. If flag –22 is set,
PROOT returns a root of (MAXREAL,0) for each leading zero in an array containing real
coefficients, and a root of (MAXREAL,MAXREAL) for each leading zero in an array containing
complex coefficients.
Access:
!ÞPOLYNOMIAL LLPROOT
Flags:
Infinite Result Exception (–22)
Input/Output:
(Þis the left-shift of the 1key).
Level 1/Argument 1
Level 1/Item 1
→
[ array ]coefficients
Find the roots of the polynomial x4 + 2x3 - 25x2 - 26x + 120:
[ array ]roots
Example:
Command:
[ 1 2 –25 –26 120 ] PROOT
Result:
[ 2 –3 4 –5 ]
PCOEF, PEVAL
Type:
Command
Description:
Toggles between an improper fraction and its corresponding integer and fractional part.
Access:
PARITH or Arithmetic, !ÞL
Input:
An improper fraction, or an object that evaluates to an improper fraction. It must not contain real
numbers. Alternately, the input may be an integer part plus a proper fraction.
Output:
An integer part plus a proper fraction; or alternately, if the input was an integer part plus a proper
fraction, an improper fraction.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Express the following as a proper fraction:
Level 1/Item 1
→
RANK
Type:
Description:
PROMPT, STO
PROPFRAC
Level 1/Argument 1
PROOT
Type:
Description:
{[[1,1/2][1/2,1]],[X,Y]}
Input/Output: None
→
“global”
MATRX
2
Command:
Result:
Level 1/Item 1
xrandom
3
x +4
------------2
x
Command:
Result:
PROPFRAC((X^3+4)/X^2))
X+(4/X^2)
Full Command and Function Reference 3-179
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
x
Example:
qr
Type:
Description:
Access:
Input/Output:
x
→
'a/b'
'symb1'
→
'symb2'
(x,y)
→
'a/b*̟ + c/d*̟*i'
→
(x,y)
'a/b + c/d*i'
In Fix mode to three decimal places, 6.2832 →Qπ returns '44/7'. In Standard mode,
however, 6.2832 →Qπ returns '3927/625'.
→Q, /, XQ, π
Command
qr Factorization of a square Matrix Command: Returns the qr factorization of an n × n matrix.
qr factors an n × n matrix A into two matrices:
• Q is an n × m orthogonal matrix.
• R is an n × n triangular matrix.
Where A = Q × R.
!Ø FACTORIZATION qr
(Ø is the left-shift of the 5key).
Level 1/Argument 1
[[ matrix ]]A
QR
Type:
Description:
Access:
'a/b*̟'
→
Level 2/Item 1
Level 1/Item 2
[[ matrix ]]Q
[[ matrix ]]R
PSDEV
Type:
Description:
n
2
1
--- ∑ ( x k – x )
nk = 1
where xk is the kth coordinate value in a column, x is the mean of the data in this column, and n
is the number of data points.
Access:
…µ PSDEV
Input/Output:
Level 1/Argument 1
PSI
Type:
Description:
LQ, LSQ
Access:
Input:
Command
QR Factorization of a Matrix Command: Returns the QR factorization of an m × n matrix.
QR factors an m × n matrix A into three matrices:
• Q is an m × m orthogonal matrix.
• R is an m × n upper trapezoidal matrix.
• P is a n × n permutation matrix.
Where A × P = Q × R.
Output:
Flags:
!Ø FACTORIZATION QR
( Ø is the left-shift of the 5key).
!´ MATRIX FACTORS QR
( ´ is the left-shift of the Pkey).
Psi
Type:
Description:
[[ matrix ]]A
Type:
Description:
Access:
Flags:
→
Level 3/Item 1
Level 2/Item 2
Level 1/Item 3
[[ matrix ]]Q
[[ matrix ]]R
[[ matrix ]]P
LQ, LSQ
Command
Solve Quadratic Equation Command: This command is identical to the computer algebra
command SOLVE, and is included for backward compatibility with the HP 48G series.
Principal Solution (–1)
3-188 Full Command and Function Reference
Level 1/Item 1
→
xpsdev
→
[ xpsdev1 xpsdev2 ... xpsdevm }
MEAN, PCOV, PVAR, SDEV, TOT, VAR
Function
Calculates the polygamma function, the nth derivative of the digamma function, at a point a.
PSI(a, 0) is equivalent to Psi(a).
!´L SPECIAL
Level 2/Argument 1: A real or complex expression specifying the point a.
Level 1/Argument 2: A non-negative integer, n.
The value of the polygamma function PSI(a, n).
Exact mode must be set (flag –105 clear), and
numeric mode must not be set (flag –3 clear), if symbolic results are wanted.
Complex mode must be set (flag –103 set) if a complex value is used for point a.
Psi
Function
Calculates the digamma function at a point a. The digamma function is the derivative of the
natural logarithm (ln) of the gamma function. The function can be represented as follows:
′
Γ (z )
d
Ψ ( z ) = ----- ( ln Γ ( z )) = -----------Γ (z)
dz
Input/Output:
Level 1/Argument 1
Command
Population Standard Deviation Command: Calculates the population standard deviation of each
of the m columns of coordinate values in the current statistics matrix (reserved variable ΣDAT).
PSDEV returns a vector of m real numbers, or a single real number if m = 1. The population
standard deviation is computed using this formula:
Access:
Input:
Output:
Flags:
!´ L SPECIAL
A real or complex expression specifying the point a.
The digamma function at the specified point.
Exact mode must be set (flag –105 clear), and
numeric mode must not be set (flag –3 clear), if symbolic results are wanted. For example, with
these settings, Psi(3) evaluates to the symbolic value Psi(3).
Complex mode must be set (flag –103 set) if a complex value is used for point a.
PSI
Full Command and Function Reference 3-181
number can be replaced with the wildcard character &, in which case the calculator will search
ports 0 through 2, and then main memory for the named backup object.
A library object must be detached before it can be purged from the HOME directory.
Neither a library object nor a backup object can be purged if it is currently “referenced” internally
by stack pointers (such as an object on the stack, in a local variable, on the LAST stack, or on an
internal return stack). This produces the error Object in Use. To avoid these restrictions, use
NEWOB before purging. (See NEWOB.)
If nport = 0, then memory is bytes of available main RAM; otherwise memory is bytes of available
RAM in the specified port.
Access:
…µPVARS
Input/Output:
Level 1/Argument 1
PVIEW
Type:
Description:
Access:
Level 2/Item 1
Level 1/Item 2
nport
→
{ :nport :namebackup ... }
memory
nport
→
{ :nport :nlibrary ... }
memory
PVARS, VARS
Access:
Input/Output:
Command
PICT View Command: Displays PICT with the specified coordinate at the upper left corner of
the graphics display.
PICT must fill the entire display on execution of PVIEW. Thus, if a position other than the upper
left corner of PICT is specified, PICT must be large enough to fill a rectangle that extends 131
pixels to the right and 80 pixels down on the HP 50g and 49g+ (64 pixels down on the HP 48gII).
If PVIEW is executed from a program with a coordinate argument (versus an empty list), the
graphics display persists only until the keyboard is ready for input (for example, until the end of
program execution). However, the FREEZE command freezes the display until a key is pressed.
If PVIEW is executed with an empty list argument, PICT is centered in the graphics display with
scrolling mode activated. In this case, the graphics display persists until −is pressed.
PVIEW does not activate the graphics cursor or the Picture menu. To activate the graphics cursor
( °is the left-shift of the Nkey).
!°LPICT L PVIEW
!°LOUT PVIEW
Level 1/Argument 1
PUSH
Type:
Description:
( °is the left-shift of the Nkey).
Level 1/Argument 1
(x,y)
{ #n, #m }
{}
( °is the left-shift of the Nkey).
I PURGE
Input/Output:
Example:
!°MEMORY PURGE
Level 1/Item 1
→
→
→
The program
« { # 0d # 0d } PVIEW 7 FREEZE »
displays PICT in the graphics display with coordinates { # 0d # 0d } in the upper left
corner of the display, then freezes the full display until a key is pressed.
FREEZE, PICTURE, TEXT
PWRFIT
Type:
Description:
Command
Power Curve Fit Command: Stores PWRFIT as the fifth parameter in the reserved variable
ΣPAR, indicating that subsequent executions of LR are to use the power curve fitting model.
LINFIT is the default specification in ΣPAR.
Access:
…µPWRFIT
Input/Output: None
BESTFIT, EXPFIT, LINFIT, LOGFIT, LR
3-186 Full Command and Function Reference
Access:
Input:
Output:
PUT
Type:
Description:
Access:
Level 1/Item 1
'global'
→
{ global1 ... globaln }
→
PICT
→
:nport :namebackup
→
:nport :nlibrary
CLEAR, CLVAR, NEWOB, PGDIR
→
Command
Saves the current status of the flags, and the current directory path. This allows the user to change
the flags or the directory path, then restore them all with the command POP. PUSH is equivalent
to saving the results of the commands RCLF and PATH, but it saves them in a stack from which
the most recently saved values are recovered by POP, with no need to use named variables. The
flags and the path are stored in the CASDIR directory, as a list of lists, in the variable
ENVSTACK.
…µPUSH
None.
Item 1: In Algebraic mode the command returns NOVAL.
POP, RCLF, STOF
Command
Put Element Command: Replaces the object at a specified position (second input) in a specified
array or list (first input) with a specified object (third input). If the array or list is unnamed, returns
the new array or list.
For matrices, nposition counts in row order.
!°LIST ELEMENTS PUT
( °is the left-shift of the Nkey).
Full Command and Function Reference 3-183
The spectral radius of a matrix is a measure of the size of the matrix, and is equal to the absolute
value of the largest eigenvalue of the matrix.
Access:
!Ø
Plot Type
(Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).
Input/Output:
Level 1/Argument 1
[[ matrix ]]n×n
SRB
Type:
Description:
Access:
Level 1/Item 1
→
COND, SNRM, TRACE
Command
Shift Right Byte Command: Shifts a binary integer one byte to the right.
The least significant byte is shifted out to the right and lost, while the most significant byte is
regenerated as zero. SRB is equivalent to binary division by 28 (or executing SR eight times).
!´ BASE L BYTE SRB
( ´ is the left-shift of the Pkey).
…ã L BYTE SRB
(ã is the right-shift of the 3key).
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output:
Level 1/Argument 1
#n1
SRECV
Type:
Description:
#n2
ASR, SL, SLB, SR
Command
Serial Receive Command: Reads up to n characters from the serial input buffer and returns them
as a string, along with a digit indicating whether errors occurred.
SRECV does not use Kermit protocol.
If n characters are not received within the time specified by STIME (default is 10 seconds),
SRECV “times out”, returning a 0 to level 1 and as many characters as were received to level 2.
If the level 2 output from BUFLEN is used as the input for SRECV, SRECV will not have to
buffer.
If you want to accumulate bytes in the input buffer before executing SRECV, you must first open
the port using OPENIO (if the port isn’t already open).
SRECV can detect three types of error when reading the input buffer:
• Framing errors and UART overruns (both causing "Receive Error" in ERRM).
• Input-buffer overflows (causing "Receive Buffer Overflow" in ERRM).
• Parity errors (causing "Parity Error" in ERRM).
SRECV returns 0 if an error is detected when reading the input buffer, or 1 if no error is detected.
Parity errors do not stop data flow into the input buffer. However, if a parity error occurs,
SRECV stops reading data after encountering a character with an error.
Framing, overrun, and overflow errors cause all subsequently received characters to be ignored
until the error is cleared. SRECV does not detect and clear any of these types of errors until it
tries to read the byte where the error occurred. Since these three errors cause the byte where the
error occurred and all subsequent bytes to be ignored, the input buffer will be empty after all
previously received good bytes have been read. Therefore, SRECV detects and clears these errors
when it tries to read a byte from an empty input buffer.
3-232 Full Command and Function Reference
PCONTOUR
RES does not apply
POLAR
SCATTER
RES does not apply
SLOPEFIELD
RES does not apply
WIREFRAME
RES does not apply
YSLICE
2 pixels (plots a point in every other column of pixels)
Access:
…µ RES
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
ninterval
Level 1/Item 1
→
Default Interval
RESTORE
Type:
Description:
Access:
Input/Output:
→
#ninterval
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,
YSLICE
Command
Restore HOME Command: Replaces the current HOME directory with the specified backup
copy (:nport:namebackup) previously created by ARCHIVE.
The specified port number must be in the range 0 to 3.
To restore a HOME directory that was saved on a remote system using :IO:name ARCHIVE, put
the backup object itself on the stack, execute RESTORE and then execute a warm start.
„°MEM LRESTORE
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 1/Item 1
→
:nport :namebackup
Example:
→
backup
To restore a HOME directory that was saved as the file AUG1 on a remote system, execute
'AUG1' SEND on the remote system, then execute the following on the local calculator:
RECV 'AUG1' RCL RESTORE
ARCHIVE
RESULTANT
Type:
Function
Description:
Returns the resultant of two polynomials of the current variable. That is, it returns the
determinant of the Sylvester matrix of the two polynomials.
Access:
!ÞPOLY !«
Input:
Level 2/Argument 1: The first polynomial.
Level 1/Argument 2: The second polynomial.
Output:
The determinant of the two matrices that correspond to the polynomials.
Full Command and Function Reference 3-201
Input/Output:
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
n
m
0/1
EQNLIB, MSOLVR
SOLVER
Type:
Description:
Access:
Command
Displays a menu of commands used in solving equations.
…µ SOLVER
Level 1/Item 1
→
If the CHOOSE boxes flag is clear (flag –117 clear), displays the operations as a numbered list. If
the flag is set, displays the operations as a menu of function keys.
Input/Output: None
RKF
Type:
Description:
Flags:
SOLVEVX
Type:
Description:
Access:
Input/Output:
Command
Finds zeros of an expression with respect to the current variable, or solves an equation with
respect to the current variable. (You use the CAS modes input form to set the current variable.)
Access:
Symbolic solve, !Î, P SOLVE
Input:
An expression or equation in the current variable. A list of equations and expressions can be given
too, each will be solved for the current variable.
Output:
A zero or solution, or a list of zeros or solutions.
Radians mode must be set (flag –17 set).
For a symbolic result, clear the CAS modes numeric option (flag –3 clear).
If Exact mode is set (flag –105 clear) and there are no exact solutions, the command returns a null
list even when there are approximate solutions.
If complex mode is set (flag –103 set) then SOLVE will search for complex roots as well as real
ones. Complex roots are displayed according to the coordinate system selected.
Example:
Solve the following expression for 0, where X is the default variable on the calculator:
Example:
3
SORT
Type:
Description:
Access:
SOLVEVX(X^3-X-9)
Note that if exact mode is set, this example returns a null list as there are no exact solutions to the
equation.
LINSOLVE, SOLVE
Command
Ascending Order Sort Command: Sorts the elements in a list in ascending order.
The elements in the list can be real numbers, strings, lists, names, binary integers, or unit objects.
However, all elements in the list must all be of the same type. Strings and names are sorted by
character code number. Lists of lists are sorted by the first element in each list.
To sort in reverse order, use SORT REVLIST.
!´ LIST SORT
( ´ is the left-shift of the Pkey).
3-230 Full Command and Function Reference
L1/A3
L2/I1
L1/I2
xtol
xT final
→
{ list }
xtol
xT final
→
{ list }
xtol
{ xtol xhstep }
Solve the following initial value problem for y(8), given that y(0) = 0:
1
y′ =
− 2 y 2 = f (t , y )
1+ t 2
1. Store the independent variable’s initial value, 0, in T.
2. Store the dependent variable’s initial value, 0, in Y.
1
3. Store the expression,
− 2 y 2 , in F.
1+ t 2
4. Enter a list containing these three items: { T Y F }.
5. Enter the tolerance. Use estimated decimal place accuracy as a guideline for choosing a
tolerance: 0.00001.
6. Enter the final value for the independent variable: 8.
The stack should look like this:
{ T Y F }
X=2.24004098747
!° LIST PROCEDURES L SORT
L2/A2
{ list }
x –x–9
L3/A1
{ list }
L = Level; A = Argument; I = item
Flags:
Command:
Result:
Command
Solve for Initial Values (Runge–Kutta–Fehlberg) Command: Computes the solution to an initial
value problem for a differential equation, using the Runge-Kutta-Fehlberg (4,5) method.
RKF solves y'(t) = f(t,y), where y(t0) = y0. The arguments and results are as follows:
• { list } contains three items in this order: the independent (t) and solution (y) variables, and the
right-hand side of the differential equation (or a variable where the expression is stored).
• xtol sets the absolute error tolerance. If a list is used, the first value is the absolute error
tolerance and the second value is the initial candidate step size.
• xTfinal specifies the final value of the independent variable.
RKF repeatedly calls RKFSTEP as it steps from the initial value to xTfinal.
…µ RKF
( °is the left-shift of the Nkey).
RKFERR
Type:
Description:
.00001
8
7. Press RKF. The variable T now contains 8, and Y now contains the value .123077277659.
The actual answer is .123076923077, so the calculated answer has an error of approximately
.00000035, well within the specified tolerance.
RKFERR, RKFSTEP, RRK, RRKSTEP, RSBERR
Command
Error Estimate for Runge–Kutta–Fehlberg Method Command: Returns the absolute error
estimate for a given step h when solving an initial value problem for a differential equation.
The arguments and results are as follows:
• { list } contains three items in this order: the independent (t) and solution (y) variables, and the
right-hand side of the differential equation (or a variable where the expression is stored).
• h is a real number that specifies the step.
• ydelta displays the change in solution for the specified step.
Full Command and Function Reference 3-203
When plot type is set to SLOPEFIELD, the DRAW command plots a slope representation of a
scalar function with two variables. SLOPEFIELD requires values in the reserved variables EQ,
VPAR, and PPAR.
VPAR has the following form:
{ xleft xright ynear yfar zlow zhigh xmin xmax ymin ymax xeye yeye zeye xstep ystep }
For plot type SLOPEFIELD, the elements of VPAR are used as follows:
• xleft and xright are real numbers that specify the width of the view space.
• ynear and yfar are real numbers that specify the depth of the view space.
• zlow and zhigh are real numbers that specify the height of the view space.
• xmin and xmax are not used.
• ymin and ymax are not used.
• xeye, yeye, and zeye are real numbers that specify the point in space from which the graph is
viewed.
• xstep and ystep are real numbers that set the number of x-coordinates versus the number of ycoordinates plotted.
The plotting parameters are specified in the reserved variable PPAR, which has this form:
{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }
For plot type SLOPEFIELD, the elements of PPAR are used as follows:
• (xmin, ymin) is not used.
• (xmax, ymax) is not used.
• indep is a name specifying the independent variable. The default value of indep is X.
• res is not used.
• axes is not used.
• ptype is a command name specifying the plot type. Executing the command SLOPEFIELD
places the command name SLOPEFIELD in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:
…µ SLOPEFIELD
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER, TRUTH, WIREFRAME, YSLICE
SNEG
Type:
Description:
Access:
Input/Output:
Command
Store Negate Command: Replaces the contents of a variable with its negative.
The named object must be a number, an array, an algebraic object, a unit object, or a graphics
object. For information on negation, see NEG.
!°MEMORY ARITHMETIC L SNEG ( °is the left-shift of the Nkey).
Level 1/Argument 1
'name'
SNRM
Type:
Description:
Access:
Input/Output:
Level 1/Argument 1
RLB
Type:
Description:
Access:
Flags:
Input/Output:
3-228 Full Command and Function Reference
Command
Rotate Left Byte Command: Rotates a binary integer one byte to the left.
The leftmost byte of #n1 becomes the rightmost byte of #n2. RLB is equivalent to executing RL
eight times.
… ã L BYTE RLB
(ã is the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Item 1
→
#n1
RND
Type:
Description:
#n2
RL, RR, RRB
Function
Round Function: Rounds an object to a specified number of decimal places or significant digits,
or to fit the current display format.
nround (or symbround if flag –3 is set) controls how the level 2 argument is rounded, as follows:
nround or symbround
0 through 11
–1 through –11
12
Effect on Level 2 Argument
Rounded to n decimal places.
Rounded to n significant digits.
Rounded to the current display format.
For complex numbers and arrays, each real number element is rounded. For unit objects, the
numerical part of the object is rounded.
Access:
!´ REAL LL RND
Flags:
Numerical Results (–3)
Input/Output:
→
( ´ is the left-shift of the Pkey).
#n2
RLB, RR, RRB
Level 1/Argument 1
NEG, SCONJ, SINV
!´ MATRIX NORMALIZE SNRM
→
#n1
Level 1/Item 1
Command
Spectral Norm Command: Returns the spectral norm of an array.
The spectral norm of a vector is its Euclidean length, and is equal to the largest singular value of a
matrix.
!Ø OPERATIONS L L SNRM
( Ø is the left-shift of the 5key).
Level 1/Item 1
Level 2/Argument 1
Level 1/Argument 2
z1
nround
→
z2
z
'symbround'
→
'RND(symbround)'
Level 1/Item 1
'symb'
nround
→
'RND(symb,nround)'
'symb1'
'symbround'
→
'RND('symb1, symbround)'
[ array1 ]
nround
→
[ array2 ]
nround
→
y_unit
x_unit
Example 1:
Example 2:
( ´ is the left-shift of the Pkey).
→
x_unit
'symbround'
'RND(x_unit, symbround)'
(4.5792,8.1275) 2 RND returns (4.58,8.13).
[ 2.34907 3.96351 2.73453 ] -2 RND returns [ 2.3 4 2.7 ].
Full Command and Function Reference 3-205
Radians mode must be set (flag –17 set).
Must be in complex mode (flag –103 set).
Example:
Command:
Result:
Express eix in trigonometric terms.
EXPLN
SINH
Type:
Description:
Access:
ROOT
Type:
Description:
SINCOS(EXP(i*X))
COS(X)+iSIN(X)
Analytic function
Hyperbolic Sine Analytic Function: Returns the hyperbolic sine of the argument.
For complex arguments, sinh(x + iy) = sinhx cosy + i coshx siny.
…Ñ HYPERBOLIC SINH
(Ñ is the right-shift of the 8key).
!´ HYPERBOLIC SINH
Flags:
Numerical Results (–3)
Input/Output:
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
SINV
Type:
Description:
Access:
Input/Output:
Level 1/Item 1
z
→
sinh z
'symb'
→
'SINH(symb)'
ASINH, COSH, TANH
Command
Store Inverse Command: Replaces the contents of the named variable with its inverse.
The named object must be a number, a matrix, an algebraic object, or a unit object. For
information on reciprocals, see INV.
!°MEMORY ARITHMETIC L SINV
( °is the left-shift of the Nkey).
Level 1/Argument 1
'name'
SIZE
Type:
Description:
Access:
Access:
Input/Output:
Level 1/Item 1
ROT
Type:
Description:
Command
Root-Finder Command: Returns a real number xroot that is a value of the specified variable global
for which the specified program or algebraic object most nearly evaluates to zero or a local
extremum.
ROOT is the programmable form of the HP Solve application.
guess is an initial estimate of the solution. ROOT produces an error if it cannot find a solution,
returning the message Bad Guess(es) if one or more of the guesses lie outside the domain of the
equation, or returns the message Constant? if the equation returns the same value at every sample
point. ROOT does not return interpretive messages when a root is found.
…µ ROOT
Level 3/Argument 1
Level 2/Argument 2
«program»
'global'
guess
→
xroot
«program»
'global'
{ guesses }
→
INV, SCONJ, SNEG
Level 1/Item 1
xroot
xroot
xroot
'symb'
'global'
guess
→
'symb'
'global'
{ guesses }
→
RPL Command
Rotate Objects Command: Rotates the first three objects on the stack, moving the object on level
3 to level 1.
In RPN mode, ROT is equivalent to 3 ROLL.
Access:
!°STACK ROT
Input/Output:
→
Level 1/Argument 3
( °is the left-shift of the Nkey).
L3
L2
obj3
obj2
L1
→
obj1
L3
L2
L1
obj2
obj1
obj3
L = Level
Command Operation
Size Command: Returns the number of characters in a string, the number of digits in an integer,
the number of elements in a list, the dimensions of an array, the number of objects in a unit
object or algebraic object, or the dimensions of a graphics object.
The size of a unit is computed as follows: the scalar (+1), the underscore (+1), each unit name
(+1), operator or exponent (+1), and each prefix (+2).
Any object type not listed above returns a value of 1.
( °is the left-shift of the Nkey).
!° LCHARS SIZE
ROW–
Type:
Description:
Access:
OVER, PICK, ROLL, ROLLD, SWAP, UNROT
Command
Delete Row Command: Deletes row n of a matrix (or element n of a vector), and returns the
modified matrix (or vector) and the deleted row (or element).
nrow or nelement is rounded to the nearest integer.
!Ø CRREATE ROW ROW–
!´ MATRIX ROW ROW–
( Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).
Input/Output:
Level 2/Argument 1
[[ matrix ]]1
3-226 Full Command and Function Reference
[ vector ]1
COL–, COL+, ROW+, RSWP
Level 1/Argument 2
Level 2/Item 1
Level 1/Item 2
nrow
→
[[ matrix ]]2
[ vector ]row
nelement
→
[ vector ]2
elementn
Full Command and Function Reference 3-207
Access:
Flags:
Input/Output:
!´ REAL LSIGN
( ´ is the left-shift of the Pkey).
…ßL SIGN
Numerical Results (–3)
( ß is the right-shift of the 1key).
Level 1/Argument 1
Example 1:
Example 2:
RPL>
Type:
Description:
Level 1/Item 1
z1
→
z2
x_unit
→
xsign
→
'symb'
'SIGN(symb)'
32_ft SIGN returns 1.
(1,1) SIGN returns (.707106781187,.707106781187).
ABS, MANT, XPON
Access:
Input/Output:
Command
User RPL program function. This function allows for the entry and execution of User RPL
programs while in algebraic mode. While RPL programs can be written in algebraic mode without
the use of this function, some RPL constructs, such as FOR…NEXT loops, will produce an error
message if not preceded by the RPL> function. As an algebraic function, it will be placed on the
command line with a pair of parentheses attached, which must be removed before its use.
For example, to enter the user RPL program of « 1 5 + » in algebraic mode, choose the
RPL> function from the catalog and press `. Remove the parentheses by pressing ™ƒƒ.
Then enter the program by pressing …å1#5#+`. The program object will
now be on the first command line. It can be evaluated by pressing N!î`.
… µ RPL>
SIGNTAB
Level 1/Argument 1
Type:
Command
Description:
Tabulates the sign of a rational function of the current CAS variable.
Access:
PGRAPH, !ÖGRAPH
Input:
An algebraic expression.
Output:
A list containing, the points where the expression changes sign, and between each pair of points,
the sign of the expression between those points.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Access:
Show the ranges of values of x for which the expression 2-x2 is positive and negative.
Flags:
Input/Output:
Example:
Command:
Result:
SIGNTAB(2 – X^2)
RR
Type:
Description:
!´ BASE L BIT RR
Command
Description:
Simplifies two objects by dividing them by their greatest common divisor.
Access:
Arithmetic, !Þ L
Input:
Level 2/Argument 1: The first object.
Level 1/Argument 2: The second object.
Output:
Level 2/Item 1: The first object divided by the greatest common divisor.
Level 1/Item 2: The second object divided by the greatest common divisor.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Divide the following expressions by their greatest common divisor:
3
RRB
Type:
Description:
Access:
Command
Rotate Right Byte Command: Rotates a binary integer one byte to the right.
The rightmost byte of #n1 becomes the leftmost byte of #n2. RRB is equivalent to doing RR eight
times.
…ãL BYTE RRB
(ã is the right-shift of the 3key).
Level 1/Argument 1
#n1
x + 6 x + 11 x + 6
3
Command:
Result:
( ´ is the left-shift of the Pkey).
!Ú BASE L BYTE RRB
( Ú is the left-shift of the 6key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
2
x – 7x – 6
#n2
RL, RLB, RRB
!´BASE L BYTE RRB
Flags:
Input/Output:
Level 1/Item 1
→
#n1
TABVAR
SIMP2
( ´ is the left-shift of the Pkey).
!Ú BASE L BIT RR
( Ú is the left-shift of the 6key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1
obj
Command
Rotate Right Command: Rotates a binary integer one bit to the right.
The rightmost bit of #n1 becomes the leftmost bit of #n2.
…ãL BIT RR
(ã is the right-shift of the 3key).
{ '-∞' – '-√2' + '√2' – '+∞' }
Type:
Level 1/Item 1
→
Level 1/Item 1
→
#n2
RL, RLB, RR
SIMP2(X^3+6*X^2+11*X+6, X^3-7*X-6)
{X+3,X-3}
3-224 Full Command and Function Reference
Full Command and Function Reference 3-209
Access:
Input/Output:
User flags are numbered 1 through 128. System flags are numbered –1 through –128. See
Appendix C for a listing of system flags and their flag numbers.
( °is the left-shift of the Nkey).
!°TEST LLSF
Level 1/Argument 1
→
nflagnumber
SHOW
Type:
Description:
Access:
Flags:
Input/Output:
Example:
Command:
Result:
SIDENS
Type:
Description:
Access:
Flags:
Input/Output:
Level 1/Item 1
CF, FC?, FC?C, FS?, FS?C
Command
Show Variable Command: Returns symb2, which is equivalent to symb1 except that all implicit
references to a variable name are made explicit. If the level 1 argument is a list, SHOW evaluates
all global variables in symb1 not contained in the list.
…µSHOW
Numerical Results (–3)
Level 2/Argument 1
Level 1/Argument 2
'symb1'
'name'
Level 1/Item 1
→
'symb2'
'symb1'
{ name1 name2 ... } →
If 7 is stored in C and 5 is stored in D:
'symb2'
Command
Description:
Performs modular row-reduction to echelon form on a matrix, modulo the current modulus.
Access:
Catalog, …µ
Input:
A matrix.
Output:
The modular row-reduced matrix. The modulo value is set using the Modes CAS input form.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
If flag –126 is clear (the default), row reduction is done with the last column. If the flag is set, row
reduction is done without reducing the last column, but the last column will be modified by the
reduction of the rest of the matrix.
Example:
Reduce to row-reduced echelon form, modulo 3, the matrix:
2 1
3 4
Command:
Result:
RRK
Type:
Description:
'X-Y+2*C+3*D' { X Y } SHOW
'X-Y+14+15'
Function
Silicon Intrinsic Density Command: Calculates the intrinsic density of silicon as a function of
temperature, xT.
If xT is a unit object, it must reduce to a pure temperature, and the density is returned as a unit
object with units of 1/cm3.
If xT is a real number, its units are assumed to be K, and the density is returned as a real number
with implied units of 1/cm3.
xT must be between 0 and 1685 K.
…µ SIDENS
Numerical Results (–3)
Level 1/Argument 1
SIGMA
Type:
Description:
RREFMOD
Type:
Level 1/Item 1
xT
→
xdensity
x_unit
→
x_1/cm3
'symb'
→
rref[[2,1][3,4]]
[[-1,0][0,1]]
rref
Command
Solve for Initial Values (Rosenbrock, Runge–Kutta) Command: Computes the solution to an
initial value problem for a differential equation with known partial derivatives.
RRK solves y'(t) = f(t,y), where y(t0) = y0. The arguments and results are as follows:
• { list } contains five items in this order:
– The independent variable (t).
– The solution variable (y).
– The right-hand side of the differential equation (or a variable where the expression is stored).
– The partial derivative of y'(t) with respect to the solution variable (or a variable where the
expression is stored).
– The partial derivative of y'(t) with respect to the independent variable (or a variable where the
expression is stored).
• xtol sets the tolerance value. If a list is used, the first value is the tolerance and the second value
is the initial candidate step size.
• xTfinal specifies the final value of the independent variable.
RRK repeatedly calls RKFSTEP as its steps from the initial value to xTfinal.
Access:
…µ RRK
Input/Output:
L3/A1
'SIDENS(symb)'
L2/A2
L1/A3
{ list }
xtol
xT final
{ list }
{ xtol xhstep }
xT final
→
L2/I1
L1/I2
{ list }
xtol
{ list }
xtol
L = Level; A = Argument; I = item
Function
Calculates the discrete antiderivative of a function f with respect to a specified variable. This is a
function G such that:
3-222 Full Command and Function Reference
Example:
Solve the following initial value problem for y(8), given that y(0) = 0:
1
y′ =
− 2 y 2 = f (t , y )
1+ t 2
Full Command and Function Reference 3-211
Access:
Flags:
Data is always sent from a local Kermit, but can be sent either to another local Kermit (which
must execute RECV or RECN) or to a server Kermit.
To rename an object when sending it, include the old and new names in an embedded list.
…µ SEND
I/O Device flag (–33), I/O Data Format (–35), I/O Messages (–39), I/O Device for Wire (–78)
If flag –35 is clear (ASCII transfer), the translation setting also has an effect.
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
'name'
→
{ name1 ... namen }
Example 2:
SEQ
Type:
Description:
Access:
Input/Output:
{{ nameold namenew } name ... }
Executing {{ AAA BBB }} SEND sends the variable named AAA but changes its name
to BBB.
Executing {{ AAA BBB } CCC } SEND sends AAA as BBB and sends CCC under its
own name. (If the new name is not legal on the calculator, just enter it as a string.)
BAUD, CLOSEIO, CKSM, FINISH, KERRM, KGET, PARITY, RECN, RECV, SERVER,
TRANSIO
RSBERR
Type:
Description:
Command
Sequential Calculation Command: Returns a list of results generated by repeatedly executing objexec
using index over the range xstart to xend, in increments of xincr.
objexec is a program or algebraic object that is a function of index. index must be a global or local
name. The remaining objects can be anything that will evaluate to real numbers.
The action of SEQ for arbitrary inputs can be predicted exactly from this equivalent program.
xstart xend FOR index objexec EVAL xincr STEP n → LIST
where n is the number of new objects left on the stack by the FOR … STEP loop. Notice that
index becomes a local variable regardless of its original type.
!° LIST PROCEDURES LSEQ
( °is the left-shift of the Nkey).
L5/A1
L4/A2
L3/A3
L2/A4
L1/A5
objexec
index
xstart
xend
xincr
Li/I1
→
{ list }
Access:
Input/Output:
L = Level; A = Argument; I = item
'n^2' 'n' 1 4 1 returns { 1 4 9 16 }.
« n SQ » 'n' 2 4 1 returns { 4 9 16 }.
DOSUBS, STREAM
SERIES
Type:
Description:
Command
RSD
Type:
Description:
Access:
Calculus, PCALC, or Limits and series, !Ö LIMITS & SERIES
Input:
Level 3/Argument 1: The function f(x)
Level 2/Argument 2: The variable if the limit point is 0, or an equation x = a if the limit point is
a. If the function is in terms of the current variable, this can be given as just the value a.
Example 1:
Example 2:
For a given function, computes Taylor series, asymptotic development and limit at finite or
infinite points.
3-220 Full Command and Function Reference
L4/A1
L3/A2
L2/A3
L1/A4
{ list }
xtol
h
last
L4/I1
→ { list }
L3/I2
L2/I3
L1/I4
xtol
hnext
current
L = Level; A = Argument; I = item
→
Example 1:
Access:
Input/Output:
RRKSTEP will use the Euler method to compute the next solution step and will consider the
error tolerance satisfied. The Rosenbrock method will fail if the current independent variable is
zero and the stepsize ≤ 2.5 × 10-499 or if the variable is nonzero and the stepsize is 2.5 × 10-11
times its magnitude. The Runge–Kutta–Fehlberg method will fail if the current independent
variable is zero and the stepsize ≤ 1.3 × 10-498 or if the variable is nonzero and the stepsize is 1.3
× 10-10 times its magnitude.
…µ RRKS
RKF, RKFERR, RKFSTEP, RRK, RSBERR
Command
Error Estimate for Rosenbrock Method Command: Returns an error estimate for a given step h
when solving an initial values problem for a differential equation.
The arguments and results are as follows:
• { list } contains five items in this order:
– The independent variable (t).
– The solution variable (y).
– The right-hand side of the differential equation (or a variable where the expression is stored).
– The partial derivative of y'(t) with respect to the solution variable (or a variable where the
expression is stored).
– The partial derivative of y'(t) with respect to the independent variable (or a variable where the
expression is stored).
• h is a real number that specifies the initial step.
• ydelta displays the change in solution.
• error displays the absolute error for that step. The absolute error is the absolute value of the
estimated error for a scalar problem, and the row (infinity) norm of the estimated error vector
for a vector problem. (The latter is a bound on the maximum error of any component of the
solution.) A zero error indicates that the Rosenbrock method failed and Euler’s method was
…µ RSBER
L2/A1
L1/A2
{ list }
h
→
L4/I1
L3/I2
L2/I3
L1/I4
{ list }
h
ydelta
error
L = Level; A = Argument; I = item
RKF, RKFERR, RKFSTEP, RRK, RRKSTEP
Command
Residual Command: Computes the residual B – AZ of the arrays B, A, and Z.
A, B, and Z are restricted as follows:
• A must be a matrix.
• The number of columns of A must equal the number of elements of Z if Z is a vector, or the
number of rows of Z if Z is a matrix.
• The number of rows of A must equal the number of elements of B if B is a vector, or the
number of rows of B if B is a matrix.
Full Command and Function Reference 3-213
• ptype is a command name specifying the plot type. Executing the command SCATTER places
the name SCATTER in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:
…µ SCATTER
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE
R→C
Type:
Description:
SCHUR
Type:
Description:
Access:
!°TYPE L R→C
Input/Output:
Access:
Command
Schur Decomposition of a Square Matrix Command: Returns the Schur decomposition of a
square matrix. SCHUR decomposes A into two matrices Q and T:
• If A is a complex matrix, Q is a unitary matrix, and T is an upper-triangular matrix.
• If A is a real matrix, Q is an orthogonal matrix, and T is an upper quasi-triangular matrix (T is
upper block triangular with 1 × 1 or 2 × 2 diagonal blocks where the 2 × 2 blocks have
complex conjugate eigenvalues).
In either case, A ≅ Q × T × TRN(Q)
!Ø FACTORIZATION SCHUR
( Ø is the left-shift of the 5key).
!´ MATRIX FACTORS SCHUR
( ´ is the left-shift of the Pkey).
R→D
Type:
Description:
Input/Output:
Level 1/Argument 1
[[ matrix ]]A
SCI
Type:
Description:
Access:
→
Level 2/Item 1
Level 1/Item 2
[[ matrix ]]Q
[[ matrix ]]T
LQ, LU, QR, SVD, SVL, TRN
Input/Output:
Example:
SCLΣ
Type:
Description:
Level 2/Argument 1
Level 1/Argument 2
x
y
→
(x,y)
[ R-array1 ]
[ R-array2 ]
→
[ C-array ]
Level 1/Item 1
C→R, IM, RE
Function
Radians to Degrees Function: Converts a real number expressed in radians to its equivalent in
degrees.
This function operates independently of the angle mode.
Access:
!´REAL LLR→D
Flags:
Numerical Results (–3)
Input/Output:
( ´ is the left-shift of the Pkey).
Level 1/Item 1
Level 1/Item 1
x
→
(180/̟)x
'symb'
→
'R→D(symb)'
D→R
R→I
Type:
Description:
Function
Converts a real number to an integer.
Access:
Flags:
Input:
Output:
!Ú REWRITE LL
Numeric mode must not be set (flag –3 clear).
Level 1/Argument 1: An integral real number or an expression that evaluates to an integral real.
Level 1/Item 1: The real value converted to an integer.
I→R
→
n
The number 103.6 in Scientific mode to four decimal places appears as 1.0360E2.
ENG, FIX, STD
SAME
Type:
Description:
Command
Scale Sigma Command: Adjusts (xmin, y min) and (xmax, ymax) in PPAR so that a subsequent scatter
plot exactly fills PICT.
When the plot type is SCATTER, the command AUTO incorporates the functions of SCLΣ. In
addition, the command SCATRPLOT automatically executes AUTO to achieve the same result.
SCLΣ is included for compatibility with the HP 28.
Access:
3-218 Full Command and Function Reference
( °is the left-shift of the Nkey).
Level 1/Argument 1
Command
Scientific Mode Command: Sets the number display format to scientific mode, which displays one
digit to the left of the fraction mark and n significant digits to the right.
Scientific mode is equivalent to scientific notation using n + 1 significant digits, where 0 ≤ n ≤ 11.
(Values for n outside this range are rounded to the nearest integer.) In scientific mode, numbers
are displayed and printed like this:
(sign) mantissa E (sign) exponent
where the mantissa has the form n.(n … ) and has zero to 11 decimal places, and the exponent has
one to three digits.
„ & H FMT SCI
„°L MODES FMT SCI
( °is the left-shift of the Nkey).
Level 1/Argument 1
Command
Real to Complex Command: Combines two real numbers or real arrays into a single complex
number or complex array.
The first input represents the real element(s) of the complex result. The second input represents
the imaginary element(s) of the complex result.
Array arguments must have the same dimensions.
Command
Same Object Command: Compares two objects, and returns a true result (1) if they are identical,
and a false result (0) if they are not.
SAME is identical in effect to == for all object types except algebraics, names, and some units.
(For algebraics and names, == returns an expression that can be evaluated to produce a test result
based on numerical values.
!° TEST LSAME
( °is the left-shift of the Nkey).
Full Command and Function Reference 3-215
Input:
Level 1/Item 1: The name of a global variable, or a list of global names, to be removed from the
REALASSUME list.
Output:
Level 1/Item 1: The same name or list of names as was input, even if any of the named variables
were not in REALASSUME.
Remove the variables S1 and S2 which are include in the REALASSUME list by default.
Example:
Command:
Result:
UNASSUME({S1, S2})
ADDTOREAL, ASSUME, DEF, LOCAL, UNASSIGN, UNBIND
Access:
Flags:
Input/Output:
{S1, S2}
UNBIND
Level 1/Argument 1
Type:
Command
Description:
Removes all local variables created by the LOCAL command, and returns their values. This is
useful only if a program needs to remove local variables created earlier in the same program.
Example:
Access:
Catalog, …µ
Input:
None
Output:
Level 1/Item 1: A list of the local variables that have been removed, with their values.
Example:
Command:
Result:
Remove the local variables ←A and ←B created by the example for LOCAL.
SREPL
Type:
Description:
DEF, LOCAL, STORE, UNASSIGN, UNASSUME
→UNIT
Type:
Description:
Access:
Input/Output:
UNBIND
{←B=2, ←A=0}
Command
Stack to Unit Object Command: Creates a unit object from a real number and the unit part of a
unit object. →UNIT adds units to a real number, combining the number and the unit part of a
unit object (the numerical part of the unit object is ignored). →UNIT is the reverse of OBJ→
applied to a unit object.
…µ →UNIT
Level 2/Argument 1
UNPICK
Type:
Description:
Level 1/Argument 2
x
→ARRY, →LIST, →STR, →TAG
Ln+1
( °is the left-shift of the Nkey).
L3
L2
L1
Ln
Ln–1
L1
→
objn
objn-1
obj1
obj
n
obj
objn-1
obj1
Replace the fourth object with an "X":
55555 4444 333 22 1 "X" 4 UNPICK returns 55555 "X" 333 22 1.
OVER, PICK, ROLL, ROLLD, SWAP, ROT
3-264 Full Command and Function Reference
Level 2/Item 1
Level 1/Item 2
→
n
'string'
0/1
If 10 good bytes were received followed by a framing error, then an SRECV command told to
read 10 bytes would not indicate an error. Only when SRECV tries to read the byte that caused the
framing error does it return a 0. Similarly, if the input buffer overflowed, SRECV would not
indicate an error until it tried to read the first byte that was lost due to the overflow.
BUFLEN, CLOSEIO, OPENIO, SBRK, STIME, XMIT
Command
Find and replace: Finds and replaces a string in a given text object. You supply the following
inputs:
Level 3/argument 1: the string to search.
Level 2/argument 2: the string to find.
Level 1/argument 3: the string to replace it with.
…&NLSREPL
„°LCHARS LSREPL
( °is the left-shift of the Nkey).
Input/Output:
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
'string'
'string'
'string'
Level 1/Item 1
→
'string'
REPL
SST
Type:
Description:
x_unit
RPL Command
Replaces the object at level n+2 with the object at level 2 and deletes the objects at levels 1 and 2.
Can be though of as a “stack poke”.
Ln+2
Access:
Level 1/Item 1
→
y_unit
Access:
!° STACK L UNPICK
Input/Output:
Example:
Note that BUFLEN also clears the above-mentioned framing, overrun, and overflow errors.
Therefore, SRECV cannot detect an input-buffer overflow after BUFLEN is executed, unless
more characters were received after BUFLEN was executed (causing the input buffer to overflow
again). SRECV also cannot detect framing and UART overrun errors cleared by BUFLEN. To
find where the data error occurred, save the number of characters returned by BUFLEN (which
gives the number of “good” characters received), because as soon as the error is cleared, new
characters can enter the input buffer.
…µSRECV
I/O Device (–33), I/O Device for Wire (–78)
Operation
Execute Program Step Operation: Returns and executes the next step of a program. If the next
step is a subroutine, executes the subroutine in a single step.
SST is not programmable.
Access:
„°LLRUN SST
( °is the left-shift of the Nkey).
Input/Output: None
NEXT, SST↓
SST↓
Type:
Description:
Operation
Execute Subroutine Step Operation: Returns and executes the next step of a program or
subroutine. If the next step is a subroutine, returns and executes the first step of the subroutine.
SST↓ is not programmable.
Access:
„°LLRUN SST↓
( °is the left-shift of the Nkey).
Input/Output: None
Full Command and Function Reference 3-233
Access:
…µ STD
Input/Output: None
Example:
The following table provides examples of numbers displayed in Standard mode:
Input/Output:
Level 1/Argument 1
'TVM variable'
Level 1/Item 1
→
TYPE
Type:
Description:
Number
Command
Type Command: Returns the type number of an object, as shown in the following table:
Object Type:
Number:
User objects:
Real number
Complex number
Character string
Real array
Complex array
List
Global name
Local name
Program
Algebraic object
Binary integer
Graphics object
Tagged object
Unit object
XLIB name
Directory object
Library
Object Type:
obj
UBASE
Type:
Description:
17
28
29
18
19
20
21
22
23
24
25
26
27
30
31
( °is the left-shift of the Nkey).
Level 1/Argument 1
Number:
User objects (continued):
Backup object
Real integer
Symbolic vector/matrix
Built-in Commands:
Built-in function
Built-in command
System Objects:
System binary
Extended real
Extended complex
Character
Code object
Library data
Mini font
Font
Extended object
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Access:
!° TEST LTYPE
Input/Output:
STEP
Type:
Description:
3-262 Full Command and Function Reference
1.E12
No
10-11
.000000000001
Yes
1.2 x 10-11
1.23E-11
No
12.345
12.345
Yes
ENG, FIX, SCI
Command Operation
STEP Command: Defines the increment (step) value, and ends definite loop structure.
obj
( Ú is the left-shift of the 6key).
Level 1/Item 1
→
'symb'
30_knot UBASE returns 15.4333333333_m/s.
CONVERT, UFACT, →UNIT, UVAL
1012
Level 1/Argument 1
Function
Convert to SI Base Units Function: Converts a unit object to SI base units.
→
Yes (integer)
ntype
STIME
Type:
Description:
x_unit
100000000000
STEQ
Type:
Command
Description:
Store in EQ Command: Stores an object into the reserved variable EQ in the current directory.
Access:
…µ STEQ
Input/Output:
Level 1/Argument 1
1011
Level 1/Item 1
→
y_base-units
Representable With
12 Digits?
Displayed As
Access:
!°BRANCH START/FOR STEP ( °is the left-shift of the Nkey).
Input/Output: None
FOR, NEXT, START
SAME, TVARS, VTYPE, ==
Access:
!Ú UNITS TOOLS UBASE
Flags:
Numerical Results (–3)
Input/Output:
Example:
xTVM variable
AMORT, TVM, TVMBEG, TVMEND
Access:
Level 1/Item 1
→
RCEQ
Command
Serial Time-Out Command: Specifies the period that SRECV (serial reception) and XMIT (serial
transmission) wait before timing out.
The value for x is interpreted as a positive value from 0 to 25.4 seconds. If no value is given, the
default is 10 seconds. If x is 0, there is no time-out; that is, the device waits indefinitely, which can
drain the batteries.
STIME is not used for Kermit time-out.
…µ STIME
'UBASE(symb)'
Full Command and Function Reference 3-235
• indep is a name specifying the independent variable on the horizontal axis, or a list containing
such a name and two numbers specifying the minimum and maximum values for the
independent variable (the horizontal plotting range). The default value is X.
• res is a real number specifying the interval (in user-unit coordinates) between plotted values of
the independent variable on the horizontal axis, or a binary integer specifying that interval in
pixels. The default value is 0, which specifies an interval of 1 pixel.
• axes is a list containing one or more of the following, in the order listed: a complex number
specifying the user-unit coordinates of the plot origin, a list specifying the tick-mark annotation,
and two strings specifying labels for the horizontal and vertical axes. The default value is (0,0).
• ptype is a command name specifying the plot type. Executing the command TRUTH places the
name TRUTH in ptype.
• depend is a name specifying the independent variable on the vertical axis, or a list containing such
a name and two numbers specifying the minimum and maximum values for the independent
variable on the vertical axis (the vertical plotting range). The default value is Y.
The contents of EQ must be an expression or program, and cannot be an equation. It is evaluated
for each pixel in the plot region. The minimum and maximum values of the independent variables
(the plotting ranges) can be specified in indep and depend; otherwise, the values in (xmin, ymin) and
(xmax, ymax)(the display range) are used. The result of each evaluation must be a real number. If the
result is zero, the state of the pixel is unchanged. If the result is nonzero, the pixel is turned on
Access:
…µ TRUTH
Input/Output: None
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, WIREFRAME, YSLICE
nindex is a real integer identifying the alarm based on its chronological position in the system alarm
list.
(Ó is the right-shift of the 9 key).
Access:
…ÓTOOLS ALRM STOALARM
Flags:
Date Format (–42), Repeat Alarms Not Rescheduled (–43), Acknowledged Alarms Saved (–44)
Input/Output:
Level 1/Argument 1
Command
Description:
Performs simplifications on expressions involving exponentials and logarithms. Converts base 10
logarithms to natural logarithms
Access:
Exponential and logarithms, !Ð L, or …ÑLL
Example:
STOF
Type:
Description:
An expression
Output:
The simplified expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
Simplify log(x+x)
TSIMP(LOG(X+X))
TEXPAND, TLIN
STOKEYS
Type:
Description:
TSTR
Type:
Description:
Access:
Flags:
Command
Date and Time String Command: Returns a string derived from the date and time.
The string has the form "DOW DATE TIME", where DOW is a three-letter abbreviation of the
day of the week corresponding to the argument date and time, DATE is the argument date in the
current date format, and TIME is the argument time in the current time format.
…ÓTOOLS LLTSTR
( Ó is the right-shift of the 9 key).
Time Format (–41), Date Format (–42)
3-260 Full Command and Function Reference
nindex
{ date time }
→
nindex
{ date time objaction }
nindex
→
{ date time objaction xrepeat }
nindex
With flag –42 clear, this command:
{ 11.06 15.2530 RUN 491520 } STOALARM
sets a repeating alarm for November 6 of the currently specified year, at 3:25:30 pm. The alarm
action is to execute variable RUN. The repeat interval is 491520 clock ticks (1 minute).
DELALARM, FINDALARM, RCLALARM
Command
Store Flags Command: Sets the states of the system flags or the system and user flags.
With argument #nsystem, STOF sets the states of the system flags (–1 through –128) only. With
argument { #nsystem, #nuser, #nsystem2 #nuser2 }, STOF sets the states of both the system and user flags.
A bit with value 1 sets the corresponding flag; a bit with value 0 clears the corresponding flag. The
rightmost (least significant) bit of #nsystem and #nuser correspond to the states of system flag –1 and
user flag +1, respectively.
STOF can preserve the states of flags before a program executes and changes the states. RCLF
can then recall the flag’s states after the program is executed.
Access:
…µ STOF
Flags:
Binary Integer Wordsize (–5 through –10)
Input/Output:
Input:
(LN(2)+LN(X))/(LN(5)+LN(2))
→
→
TSIMP
Type:
Level 1/Item 1
xtime
Level 1/Argument 1
Level 1/Item 1
→
#nsystem
Access:
Flags:
{ #nsystem #nuser #nsystem2 #nuser2 }
RCLF, PUSH, POP, STWS, RCWS
→
Command
Store Key Assignments Command: Defines multiple keys on the user keyboard by assigning
objects to specified keys.
xkey is a real number of the form rc.p specifying the key by its row number r, its column number c,
and its plane (shift) p. (For a definition of plane, see the entry for ASN).
The optional initial list parameter or argument S restores all keys without user assignments to their
standard key assignments on the user keyboard. This is meaningful only when all standard key
assignments had been suppressed (for the user keyboard) by the command S DELKEYS.
If the argument obj is the name SKEY, the specified key is restored to its standard key assignment.
…µ STOKEYS
User-Mode Lock (–61) and User Mode (–62) affect the status of the user keyboard
Full Command and Function Reference 3-237
Access:
Trigonometry, …ÑLL
Input:
An expression with trigonometric terms.
Output:
The transformed expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Express the following in tan terms:
2
( sinx)
Command:
Result:
TRIGTAN(SIN(X)^2)
TRIG, TRIGCOS, TRIGSIN
TRN
Type:
Description:
Access:
Input/Output:
Input/Output:
Level 2/Argument 1
STO–
Type:
Description:
TAN(X)^2/(TAN(X)^2+1)
Command
Transpose Matrix Command: Returns the (conjugate) transpose of a matrix.
TRN replaces an n × m matrix A with an m × n matrix AT, where:
AijT = Aji for real matrices and AijT = CONJ(Aji) for complex matrices
If the matrix is specified by name, AT replaces A in name.
!´ MATRIX MAKE TRN
( ´ is the left-shift of the Pkey).
Level 1/Argument 1
[[ matrix ]]
Example:
TRNC
Type:
Description:
Access:
Flags:
Access:
Input/Output:
Level 1/Item 1
→
[[ matrix ]]transpose
→
'name'
[[ 2 3 1 ][ 4 6 9]] TRN returns [[ 2 4 ][ 3 6 ][ 1 9 ]].
CONJ, TRAN
Function
Truncate Function: Truncates an object to a specified number of decimal places or significant
digits, or to fit the current display format.
ntruncate (or symbtruncate if flag –3 is set) controls how the level 2 argument is truncated, as follows:
Effect on Level 2 Argument
ntruncate
0 through 11
truncated to n decimal places
–1 through –11 truncated to n significant digits
12
truncated to the current display format
For complex numbers and arrays, each real number element is truncated. For unit objects, the
number part of the object is truncated.
!´ REAL LLTRNC
( ´ is the left-shift of the Pkey).
Numerical Results (–3)
3-258 Full Command and Function Reference
STO*
Type:
Description:
Access:
Input/Output:
obj
'name'
STO–, STO*, STO/, +
Level 1/Item 1
→
→
Level 2/Argument 1
Level 1/Argument 2
obj
'name'
→
obj
→
'name'
STO+, STO*, STO/, –
Level 1/Item 1
Command
Store Times Command: Multiplies the contents of a specified variable by a number or other
object.
The object on the stack and the object in the variable must be suitable for multiplication with
each other. When multiplying two arrays, the result depends on the order of the arguments. The
new object of the named variable is the level 2 array times the level 1 array. The arrays must be
conformable for multiplication.
Using STO* to multiply two arrays or to multiply a number and an array (where obj is an array or a
number and name is the global name of an array) requires less memory than using the stack to
multiply them.
!°MEMORY ARITHMETIC STO* ( °is the left-shift of the Nkey).
obj
STO/
Type:
Description:
'name'
obj
Command
Store Minus Command: Calculates the difference between a number (or other object) and the
contents of a specified variable, and stores the new value in the specified variable.
The object on the stack and the object in the variable must be suitable for subtraction with each
other. STO– can subtract any combination of objects suitable for stack subtraction.
Using STO– to subtract two arrays (where obj is an array and name is the global name of an array)
requires less memory than using the stack to subtract them.
!°MEMORY ARITHMETIC STO– ( °is the left-shift of the Nkey).
Level 2/Argument 1
Level 1/Argument 2
'name'
STO+, STO–, STO/, *
Level 1/Argument 2
Level 1/Item 1
'name'
→
obj
→
Command
Store Divide Command: Calculates the quotient of a number (or other object) and the contents of
a specified variable, and stores the new value in the specified variable.
The new object of the specified variable is the level 2 object divided by the level 1 object.
The object on the stack and the object in the variable must be suitable for division with each
other. If both objects are arrays, the divisor (level 1) must be a square matrix, and the dividend
(level 2) must have the same number of columns as the divisor.
Full Command and Function Reference 3-239
Access:
!Ø OPERATIONS LLTRAN
Input/Output:
( Ø is the left-shift of the 5key).
Level 1/Argument 1
Level 1/Argument 1
TRANSIO
Type:
Description:
[[ matrix ]]
→
'name'
→
[[ matrix ]]transpose
Example:
CONJ, TRN
Command
I/O Translation Command: Specifies the character translation option. These translations affect
only ASCII Kermit transfers and files printed to the serial port.
Legal values for n are as follows:
n
Effect
0
No translation
1
Translate character 10 (line feed only) to /from characters 10 and 13 (line feed
with carriage return, the Kermit protocol) (the default value)
2
Translate characters 128 through 159 (80 through 9F hexadecimal)
3
Translate all characters (128 through 255)
Level 1/Argument 1
noption
BAUD, CKSM, PARITY
TRIG
Type:
Description:
Command
Level 1/Item 1
Converts complex logarithmic and exponential subexpressions into their equivalent trigonometric
2
STREAM
Type:
Description:
Access:
Input/Output:
2
expressions. It also simplifies trigonometric expressions by using: ( sin x ) + ( cos x ) = 1
PTRIG, Trigonometry, …ÑLL
“obj”
→STR can create special displays to label program output or provide prompts for input. The
sequence
"Result = " SWAP →STR + 1 DISP 1 FREEZE
displays Result = object in line 1 of the display, where object is a string form of an object taken
from level 1.
→ARRY, →LIST, STR→, →TAG, →UNIT
Command
Stream Execution Command: Moves the first two elements from the list onto the stack, and
executes obj. Then moves the next element (if any) onto the stack, and executes obj again using the
previous result and the new element. Repeats this until the list is exhausted, and returns the final
result.
STREAM is nominally designed for obj to be a program or command that requires two arguments
and returns one result.
!°LIST PROCEDURES STREAM ( °is the left-shift of the Nkey).
Level 2/Argument 1
→
Level 1/Item 1
→
obj
Level 1/Item 1
Access:
…µ TRANSIO
Input/Output:
Access:
Input/Output:
Level 1/Argument 2
Example 1:
Example 2:
→
{ list }
obj
{ 1 2 3 4 5 } « * » STREAM returns 120.
« + » STREAM is equivalent to ΣLIST.
DOSUBS
STRM
Type:
Description:
Command
Starts the StreamSmart application.
Level 1/Item 1
result
Access:
GSTREAMSMART
Input/Output: None
STURM
A complex expression with logarithmic and/or exponential terms, or a trigonometric expression.
Type:
Command
Output:
The transformed expression.
Description:
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Prefers cosine terms if “prefer cos” is selected (flag –116 clear), prefers sine terms if flag –116 is
set.
Must be in Complex mode (flag –103 set) if a complex expression is being simplified.
For a polynomial P, STURM returns a list containing Sturm’s sequences of P and their
multiplicities
Input:
Example:
Command:
Access:
Arithmetic, !Þ POLYNOMIAL !«
Input:
A polynomial P
Output:
A list containing the Sturm’s sequences for P, and the multiplicity for each (as a real number).
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Find the Sturm sequences and their multiplicities for the polynomial:
Express the following in trigonometric terms:
ln ( x + i )
TRIG(LN(X+i))
3
x +1
Command:
Result:
3-256 Full Command and Function Reference
STURM(X^3+1)
{[1],-1.,[1],1.,[X^3+1,-(3*X^2),-1],1.}
Full Command and Function Reference 3-241
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
Level 1/Item 1
xinitial
ydelta
→
xfinal
x_unit1
y_unit2delta
→
x_unit1final
x_unit
'symb'
→
'TINC(x_unit, symb)'
'symb'
y_unitdelta
→
'symb1'
'symb2'
→
Access:
!°LIST SUB
Input/Output:
'TINC(symb, y_unitdelta)'
'TINC(symb1, symb2)'
TDELTA
( °is the left-shift of the Nkey).
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
[[ matrix ]]1
nstartposition
nendposition
→
Level 1/Item 1
[[ matrix ]]2
[[ matrix ]]2
[[ matrix ]]1
{nrow, ncolumn }
nendposition
→
[[ matrix ]]1
nstartposition
{nrow,, ncolumn }
→
[[ matrix ]]2
[[ matrix ]]1
{nrow, ncolumn }
{nrow,, ncolumn }
→
[[ matrix ]]2
“stringtarget”
nstartposition
nendposition
→
“stringresult”
{ listresult }
{ listtarget }
nstartposition
nendposition
→
Command
grobtarget
{ #n1, #m1 }
{ #n2 #m2 }
→
grobresult
Linearizes and simplifies trigonometric expressions. Note that this function does not collect sin
and cos terms of the same angle.
grobtarget
( x 1 , y1 )
( x 2 , y2 )
→
grobresult
PICT
{ #n1, #m1 }
{ #n2 #m2 }
→
grobresult
Access:
PTRIG, Trigonometry, …ÑL
PICT
( x 1 , y1 )
( x 2 , y2 )
→
grobresult
Input:
An expression.
Output:
The transformation of the expression.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
TLIN
Type:
Description:
( cos ( x ) )
Command:
Result:
TLINE
Type:
Description:
Access:
Input/Output:
TLIN(COS(X)^4)
Type:
Function
Description:
Substitutes a value for a variable in an expression. The value can be numeric or an expression.
This is similar to the Where function, denoted by the symbol |, but SUBST substitutes without
evaluating the resulting expression.
Access:
Algebra, …×L, PALG
Input:
Level 2/Argument 1: An expression.
Level 1/Argument 2: The value or expression to be substituted.
Output:
The expression with the substitution made.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Substitute x = z+1 for x in the following expression, and apply the EXPAND command to
simplify the result:
(1/8)*COS(4X)+(1/2)*COS(2X)+(3/8)
Command
Toggle Line Command: For each pixel along the line in PICT defined by the specified
coordinates, TLINE turns off every pixel that is on, and turns on every pixel that is off.
!°L PICT TLINE
( °is the left-shift of the Nkey).
Level 2/Argument 1
Level 1/Argument 2
(x1,y1)
(x2,y2)
Level 1/Item 1
→
→
{ #n1 #m1 }
{ #n2 #m2 }
The following program toggles on and off 10 times the pixels on the line defined by user-unit
coordinates (1,1) and (9,9). Each state is maintained for .25 seconds.
« ERASE 0 10 XRNG 0 10 YRNG
{ # 0d # 0d } PVIEW
« 1 10 START
(1,1) (9,9) TLINE .25 WAIT
NEXT
»
»
ARC, BOX, LINE
3-254 Full Command and Function Reference
{ A B C D E } 2 4 SUB returns { B C D }.
"ABCDE" 0 10 SUB returns "ABCDE".
PICT { # 10d #20d } { # 20d # 40d } SUB returns
Graphic 11 x 21.
CHR, GOR, GXOR, NUM, POS, REPL, SIZE
SUBST
4
SIMPLIFY, TCOLLECT, TEXPAND
Linearize and simplify the following:
Example:
Example:
Example 1:
Example 2:
Example 3:
2
x + 3x + 7
Command:
SUBST(X^2+3*X+7,X=Z+1)
EXPAND(ANS(1))
Result:
Z^2+5*Z+11
| (where command)
SUBTMOD
Type:
Description:
Function
Access:
Arithmetic, !Þ MODULO L
Performs a subtraction, modulo the current modulus.
Full Command and Function Reference 3-243
TEVAL
Type:
Description:
Access:
Input/Output:
Function
For the specified operation, performs the same function as EVAL, and returns the time taken to
perform the evaluation as well as the result.
…µ TEVAL
Level 1/Argument 1
Object
→
Level 2/Item 2
Level 1/Item 1
result
time taken
EVAL
TEXPAND
Type:
DUP, DUPN, DUP2, OVER, PICK, ROLL, ROLLD, ROT
SYSEVAL
Type:
Description:
Command
Evaluate System Object Command: Evaluates unnamed operating system objects specified by
WARNING: Use extreme care when executing this function. Using SYSEVAL with
random addresses will almost always cause a memory loss. Do not use this function
unless you know what you are doing.
Access:
…µ SYSEVAL
Input/Output:
Level 1/Argument 1
Command
Level 1/Item 1
→
Display the version string of a calculator by executing #2F389h SYSEVAL. This should
display "HPHP49-C".
EVAL, LIBEVAL, FLASHEVAL
Description:
Expands transcendental functions.
Access:
!Ð, PALG, PTRIG, …×L, …ÑL, PLEXPLN
Input:
An expression.
Output:
The transformation of the expression.
SYLVESTER
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Type:
Command
Description:
For a symmetric matrix A, returns D and P where D is a diagonal matrix and
A = PTDP
Access:
!Ø
Input:
A symmetric matrix.
Output:
Level 2/Item 1: the diagonal matrix, D.
Level 1/Item 2: The matrix P.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Rewrite in PTDP form the matrix:
Flags:
Example:
Command:
Result:
TEXT
Type:
Description:
Expand the following expression:
ln(sin(x+y))
TEXPAND(LN(SIN(X+Y)))
LN(COS(Y)*SIN(X)+SIN(Y)* COS(X))
TCOLLECT, TLIN
Command
Show Stack Display Command: Displays the stack display.
TEXT switches from the graphics display to the stack display. TEXT does not update the stack
display.
Access:
!° LOUT TEXT
( °is the left-shift of the Nkey).
Input/Output: None
Example:
The command sequence DRAW 5 WAIT TEXT selects the graphics display and plots the
contents of the reserved variable EQ (or reserved variable ΣDAT). It subsequently waits for 5
seconds, and then switches back from the graphics display to the stack display.
PICTURE, PVIEW
THEN
Type:
Description:
Command
THEN Command: Starts the true-clause in conditional or error-trapping structure.
Access:
!° BRANCH IF/CASE THEN ( °is the left-shift of the Nkey).
Input/Output: None
CASE, ELSE, END, IF IFERR
3-252 Full Command and Function Reference
Example:
12
24
Command:
Result:
SYLVESTER([1, 2][2, 4])
{[1, 0], [[1, 2][0, 1]]}
SYST2MAT
Type:
Command
Description:
Converts a system of linear equations in algebraic form to matrix form.
Access:
!Ú
Input:
Level 2/Argument 1: A vector containing a system of linear equations. An expression with no
equal sign is treated as an equation setting the expression equal to zero.
Level 1/Argument 2: A vector whose elements are the system’s variables. The variables must not
exist in the current path.
Output:
A matrix that represents the system of linear equations.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
MATRX,
Matrices, !Ø
LINEAR SYSTEMS
Full Command and Function Reference 3-245
TAYLOR0
Result:
{ X^2+1,{{1, 2, 3},{2, 5, 10}}}
Type:
Function
TABVAR
Description:
Performs a fourth-order Taylor expansion of an expression at x = 0.
Type:
Command
Access:
Calculus, !Ö LIMITS & SERIES, PCALC L
Description:
Input:
An expression
For a function of the current variable, with a rational derivative, computes the variation table, that
is the turning points of the function and where the function is increasing or decreasing.
Output:
The Taylor expansion of the expression.
Access:
PGRAPH L, !ÖGRAPH L
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Input:
An expression in terms of the current variable, which has a rational derivative.
Output:
Level 3/Item 1: The original rational function.
Level 2/Item 2: A list of two lists. The first list indicates the variation of the function (where it is
increasing or decreasing) in terms of the independent variable. The second list indicates the
variation in terms of the dependent variable, the function value.
Level 1/Item 3: A graphic object that shows how the variation table was computed.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example:
Tabulate the variation of the function:
2
x –1
Flags:
Example:
Command:
Result:
Obtain the fourth-order Taylor series expansion of cos(x) at x=0.
DIVPC, lim, TAYLR, SERIES
TAYLR
Type:
Description:
Access:
Input/Output:
TAYLOR0(COS(X))
1/24*X^4+-1/2*X^2+1
Command
Taylor Polynomial Command: Calculates the nth order Taylor polynomial of symb in the variable
global.
The polynomial is calculated at the point global = 0. The expression symb may have a removable
singularity at 0. The order, n, is the relative order of the Taylor polynomial — the difference in
order between the largest and smallest power of global in the polynomial.
TAYLR always returns a symbolic result, regardless of the state of the Numeric Results flag (–3).
!Ö LIMITS & SERIES TAYLR
( Öis the left-shift of the 4key).
Level 3/Argument 1
Example:
Level 2/Argument 2
'symb'
'global'
norder
The command sequence '1+SIN(X)^2' 'X' 5 TAYLR
returns '1+X^2-8/4!*X^4'.
∂, ∫, Σ
TCHEBYCHEFF
Type:
Function
Description:
Level 1/Argument 3
Level 1/Item 1
→
'symbTaylor'
Command:
TABVAR(X^2-1)
Result:
{'X^2-1' {{ '-∞' – 0 + '∞' }{ '+∞' ↓ '-1' ↑ '+∞' }} Graphic 96 × 55 }
Viewing the graphic, one sees the original function F and its derivative, as functions of X, and the
variation table for X and F, shown as a matrix
→TAG
Type:
Description:
Catalog, …µ
Input:
A non-negative integer, n.
Output:
The nth Tchebycheff polynomial.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Command:
Result:
Obtain the fourth Tchebycheff polynomial.
HERMITE, LEGENDRE
TCHEBYCHEFF(4)
( °is the left-shift of the Nkey).
Level 2/Argument 1
Level 1/Argument 2
Level 1/Item 1
obj
“tag”
→
obj
'name'
→
→
obj
x
→ARRY, DTAG, →LIST, OBJ→, →STR, →UNIT
:tag:obj
:name:obj
:x:obj
TAIL
Type:
Command
Description:
Last Listed Elements Command: Returns all but the first element of a list or string.
Access:
!°LCHARS LTAIL
( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1
8*X^4-8*X^2+1
{ obj1 ... objn }
Example:
3-250 Full Command and Function Reference
Command
Stack to Tag Command: Combines objects in levels 1 and 2 to create tagged (labeled) object.
The “tag” argument is a string of fewer than 256 characters.
Access:
„°TYPE →TAG
Input/Output:
Returns the nth Tchebycheff polynomial.
Access:
SIGNTAB
“string1”
"tall" TAIL returns "all".
Level 1/Item 1
→
{ obj2 ... objn }
→
“string2”
Full Command and Function Reference 3-247
Access:
Flags:
Input/Output:
example, that “a” is greater than or equal to “B”, since “B” is character code 66, and “a” is
character code 97.
For unit objects, the two objects must be dimensionally consistent and are converted to common
units for comparison. If you use simple temperature units, the calculator assumes the values
represent temperatures and not differences in temperatures. For compound temperature units, the
using temperature units with arithmetic functions, refer to the entry for +.
!È
( Èis the left-shift of the Ykey).
Numerical Results (–3)
Level 2/Argument 1
Level 1/Argument 2
y
0/1
#n1
#n2
→
0/1
“string1”
“string2”
→
0/1
x
'symb'
→
'x ≥ symb'
x
Level 1/Item 1
→
'symb'
x
→
'symb ≥ x'
'symb1'
'symb2'
→
'symb1 ≥ symb2'
x_unit1
y_unit2
→
0/1
x_unit
'symb'
→
'x_unit ≥ symb'
'symb'
x_unit
→
'symb ≥ x_unit'
<, ≤, >, ==, ≠
≠
(Not equal)
Type:
Function
Description:
Not Equal Function: Tests if two objects are not equal.
The function ≠ returns a true result (1) if the two objects have different values, or a false result (0)
otherwise. (Lists and programs are considered to have the same values if the objects they contain
are identical.)
If one object is algebraic or a name, and the other is a number, a name, or algebraic, ≠ returns a
symbolic comparison expression that can be evaluated to return a test result.
If the imaginary part of a complex number is 0, it is ignored when the complex number is
compared to a real number, so, for example, 6 and (6,0) and considered to be equal.
For unit objects, the two objects must be dimensionally consistent and are converted to common
units for comparison. If you use simple temperature units, the calculator assumes the values
represent temperatures and not differences in temperatures. For compound temperature units, the
using temperature units with arithmetic functions, refer to the entry for +.
Access:
Flags:
!Ä
Numerical Results (–3)
UNROT
Type:
Description:
RPL Command
Changes the order of the first three objects on the stack. The order of the change is the opposite
to that of the ROT command.
( °is the left-shift of the Nkey).
Access:
!° STACK UNROT
Input/Output:
L3
Example:
L2
L1
obj3
obj2
obj1
333 22 1 UNROT returns 1 333 22.
OVER, PICK, ROLL, ROLLD, SWAP, ROT
→
L3
L2
L1
obj1
obj3
obj2
UNTIL
Type:
Description:
Command
UNTIL Command: Starts the test clause in a DO … UNTIL … END indefinite loop structure.
( °is the left-shift of the Nkey).
Access:
!° BRANCH DO UNTIL
Input/Output: None
DO, END
UPDIR
Type:
Description:
Command
Up Directory Command: Makes the parent of the current directory the new current directory.
UPDIR has no effect if the current directory is HOME.
Access:
!§
( §is the left-shift of the Jkey).
Input/Output: None
CRDIR, HOME, PATH, PGDIR
UTPC
Type:
Description:
Command
Upper Chi-Square Distribution Command: Returns the probability utpc(n, x) that a chi-square
random variable is greater than x, where n is the number of degrees of freedom of the
distribution.
The defining equations are these:
• For x ≥ 0:
1
utpc ( n, x ) = --------------n
--2 2 Γ ( n--2- )
∞
∫t
n
--- – 1
2
– --t-
⋅ e 2 dt
x
• For x < 0:
( Äis the left-shift of the Wkey).
utpc ( n, x ) ) = 1
For any value z,
z
z
Γ  --- =  --- – 1 !
2
2
, where ! is the factorial command.
The value n is rounded to the nearest integer and, when rounded, must be positive.
Access:
3-296 Full Command and Function Reference
!´ L PROBABILITY L UTPC
( ´ is the left-shift of the Pkey).
Full Command and Function Reference 3-265
Input/Output:
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
x
#n1
“string1”
x
'symb'
'symb1'
x_unit1
x_unit
'symb'
y
#n2
“string2”
'symb'
x
'symb2'
y_unit2
'symb'
x_unit
Level 1/Item 1
→
→
→
→
→
→
→
→
→
0/1
0/1
0/1
'x < symb'
'symb < x'
'symb1 < symb2'
0/1
'x_unit < symb'
'symb < x_unit'
UTPT
Type:
Description:
Level 2/Argument 1
Level 1/Argument 2
x
#n1
“string1”
x
'symb'
'symb1'
x_unit1
x_unit
'symb'
y
#n2
“string2”
'symb'
x
'symb2'
y_unit2
'symb'
x_unit
<, >, ≥, ==, ≠
3-294 Full Command and Function Reference
0/1
0/1
0/1
'x ≤symb'
'symb ≤x'
'symb1 ≤symb2'
0/1
'x_unit ≤symb'
'symb ≤x_unit'
Level 1/Argument 3
v
x
Level 1/Item 1
→
utpn(m,v,x)
Command
Upper Student’s t Distribution Command: Returns the probability utpt(n, x) that a Student’s t
random variable is greater than x, where n is the number of degrees of freedom of the
distribution.
The following is the defining equation for all x:
n+1
Γ  ------------
2
utpt ( n, x ) = ----------------------n

Γ  --- nπ
2
For any value z,
z
z
Γ  --- =  --- – 1 !
2
2
∞
2
t 

∫  1 + ---n- 
n+1
– -----------2
dt
x
, where ! is the factorial command.
The value n is rounded to the nearest integer and, when rounded, must be positive.
Access:
!´ L PROBABILITY L UTPT
( ´ is the left-shift of the Pkey).
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
x
Level 1/Item 1
→
n
UTPC, UTPF, UTPN
UVAL
Type:
Description:
Function
Unit Value Function: Returns the numerical part of a unit object.
Access:
…Û TOOLS UVAL
Flags:
Numerical Results (–3)
Input/Output:
V→
Type:
Description:
Access:
Flags:
x_unit
'symb'
CONVERT, UBASE, UFACT, →UNIT
utpt(n,x)
(Û is the right-shift of the 6key).
Level 1/Argument 1
Level 1/Item 1
→
→
→
→
→
→
→
→
→
Level 2/Argument 2
m
UTPC, UTPF, UTPT
≤, >, ≥, ==, ≠
≤
(Less than or Equal)
Type:
Function
Description:
Less Than or Equal Function: Tests whether one object is less than or equal to another object.
The function ≤ returns a true test result (1) if the first argument is less than or equal to the second
argument, or a false test result (0) otherwise. If one object is a symbolic (an algebraic or a name),
and the other is a number or symbolic or unit object, ≤ returns a symbolic comparison expression
that can be evaluated to return a test result.
For real numbers and binary integers, “less than or equal” means numerically equal or smaller (1 is
less than 2). For real numbers, “less than or equal” also means equally or more negative (–2 is less
than –1). For strings, “less than or equal” means alphabetically equal or previous (“ABC” is less
than or equal to “DEF”; “AAA” is less than or equal to “AAB”; “A” is less than or equal to
“AA”). In general, characters are ordered according to their character codes. This means, for
example, that “B” is less than “a”, since “B” is character code 66, and “a” is character code 97.
For unit objects, the two objects must be dimensionally consistent and are converted to common
units for comparison. If you use simple temperature units, the calculator assumes the values
represent temperature and not differences in temperatures. For compound temperature units, the
using temperature units with arithmetic functions, refer to the entry for +.
Access:
!Æ
( Æis the left-shift of the Xkey above the 8).
Flags:
Numerical Results (–3)
Input/Output:
Level 3/Argument 1
Level 1/Item 1
→
→
x
'UVAL(symb)'
Command
Vector/Complex Number to Stack Command: Separates a vector or complex number into its
component elements.
For vectors with four or more elements, V→ executes independently of the coordinate system
mode, and always returns the elements of the vector to the stack as they are stored internally (in
rectangular form). Thus, V→ is equivalent to OBJ→ for vectors with four or more elements.
!´ VECTOR V→
( ´ is the left-shift of the Pkey).
Coordinate System (–15 and –16)
Full Command and Function Reference 3-267
∞
Γ(x + 1) =
∫e
–t x
Mode
t dt
Result
0
and defined for other values of x by analytic continuation: Γ(x + 1) = n Γ(x)
Access:
!´ L PROBABILITY !
( ´ is the left-shift of the Pkey).
Flags:
Numerical Results (–3), Underflow Exception (–20), Overflow Exception (–21)
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
n
n!
x
→
Γ(x + 1)
'symb'
→
'(symb!)'
[ x1 x2 x3 ]
Polar/Cylindrical (flag –15 clear and –16 set)
[ x1 xtheta xz ]
Polar/Spherical (flag –15 and –16 set)
[ x1 xtheta xphi ]
Access:
!´ VECTOR →V3
Flags:
Coordinate System (–15 and –16)
Input/Output:
COMB, PERM
%
(Percent)
Type:
Function
Description:
Percent Function: Returns x percent of y.
Common usage is ambiguous about some units of temperature. When ºC or ºF represents a
thermometer reading, then the temperature is a unit with an additive constant: 0 ºC=273.15 K,
and 0 ºF=459.67 ºR. But when ºC or ºF represents a difference in thermometer readings, then the
temperature is a unit with no additive constant: 1 ºC=1 K and 1 ºF=1 ºR.
The arithmetic operators +, –, %, %CH, and %T treat temperatures as differences, without any
additive constant. However, +, –, %CH, and %T require both arguments to be either absolute (K
and ºR), both ºC, or both ºF. No other combinations are allowed.
For more information on using temperature units with arithmetic functions, see the entry for +.
( ´ is the left-shift of the Pkey).
Access:
!´ REAL %
Input/Output:
Example 1:
Example 2:
Example 3:
Rectangular (flag –16 clear)
Level 2/Argument 1
Level 1/Argument 2
x
y
→
Level 1/Item 1
xy/100
'%(x,symb)'
x
'symb'
→
'symb'
x
→
'%(symb,x)'
'symb1'
'symb2'
→
'%(symb1, symb2)'
x
y_unit
→
(xy/100)_unit
x_unit
y
→
(xy/100)_unit
'symb'
x_unit
→
'%(symb,x_unit)'
x_unit
'symb'
23.7 995 % returns 235.815.
15 176_kg % returns 26.4_kg.
100_°C 50 % returns 50_°C.
+, %CH, %T
→
'%(x_unit,symb)'
_
(Unit attachment)
Type:
Unit attachment
Description:
Unit attachment symbol: Attaches a unit type to a numeric value.
3-292 Full Command and Function Reference
Example 1:
Example 2:
Example 3:
( ´ is the left-shift of the Pkey).
Level 3/Argument 1
Level 2/Argument 2
Level 1/Argument 3
x1
x2
x3
→
Level 1/Item 1
[ x1 xtheta xz ]
[ x1 xtheta xphi ]
x1
xtheta
xz
→
x1
xtheta
xphi
→
[ x1 x2 x3 ]
With flag –16 clear (Rectangular mode), 1 2 3 →V3 returns [ 1 2 3 ].
With flag –15 clear and –16 set (Polar/Cylindrical mode), 1 2 3 →V3 returns
[ 1 2 3 ].
With flags –15 and –16 set (Polar/Spherical mode), 1 2 3 →V3 returns [ 1 2 3 ].
V→, →V2
VANDERMONDE
Type:
Command
Description:
Builds the Vandermonde matrix (also called the alternant matrix) from a list of objects. That is,
for a list of n objects, the command creates an n × n matrix. The ith column in the matrix consists
of the list items raised to the power of (i–1). Sometimes the Vandermonde matrix is defined with
the ith row containing the items raised to the power of (i–1); to obtain this, transpose the result
with the command TRAN.
Access:
Matrices, !Ø
Input:
A list of objects. A vector is allowed too.
Output:
The corresponding Vandermonde matrix.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Example:
Build the row version of the Vandermonde matrix from the following list of objects:
{x, y, z}
Command:
CREATELL,
!´ MATRX MAKE LL
TRAN(VANDERMONDE({x,y,z}))
1 1 1
x y z
2
Result:
VAR
Type:
Description:
2
x y z
2
CON, HILBERT, IDN, RANM
Command
Variance Command: Calculates the sample variance of the coordinate values in each of the m
columns in the current statistics matrix (ΣDAT).
Full Command and Function Reference 3-269
Access:
Input/Output:
• To enter one data point with a single coordinate value, the argument for Σ+ must be a real
number.
• To enter one data point with multiple coordinate values, the argument for Σ+ must be a vector
with m real coordinate values.
• To enter several data points, the argument for Σ+ must be a matrix of n rows of m real
coordinate values.
In each case, the coordinate values of the data point(s) are added as new rows to the current
statistics matrix (reserved variable ΣDAT). If ΣDAT does not exist, Σ+ creates an n x m matrix
and stores the matrix in ΣDAT. If ΣDAT does exist, an error occurs if it does not contain a real
matrix, or if the number of coordinate values in each data point entered with Σ+ does not match
the number of columns in the current statistics matrix.
Once ΣDAT exists, individual data points of m coordinates can be entered as m separate real
numbers or an m-element vector. LASTARG returns the m-element vector in either case.
…µΣ+
Lm/A1 … L2/Am–1
L1/Am
x
→
[ x1, x2, …, xm ]
→
→
xm
→
π
(Pi)
Type:
Description:
VISITB
Type:
Description:
Level 1/Item 1
→
x
→
[ x1 x2 … xm ]
Function
π Function: Returns the symbolic constant ' π ' or its numerical representation, 3.14159265359.
The number returned for π is the closest approximation of the constant π to 12-digit accuracy.
In Radians mode with flag –2 and –3 clear (to return symbolic results), trigonometric functions of
π and π/2 are automatically simplified. For example, evaluating 'SIN(π)' returns zero. However, if
The contents opened in the most suitable
editor.
VISIT, EDIT, EDITB
Access:
Catalog, …µ
Input:
Level 2/Argument 1: A vector V of expressions.
Level 1/Argument 2: A vector of the names of the variables.
Output:
Level 1/Item 1: A vector U of the variables that is the potential from which V is obtained. An
arbitrary constant can be added, the command does not do this.
Flags:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Step-by-step mode can be set (flag –100 set).
Example:
To see if this command is the opposite of CURL, use the output of the example in CURL as
input to VPOTENTIAL. Find a vector in the spatial variables x, y, and z whose curl is:
(2yz)i + (0)j + (2xy – x2)k
CLΣ, RCLΣ, STOΣ, Σ+
3-290 Full Command and Function Reference
Command
For a specified variable, opens the contents in the most suitable editor for the object type. For
example, if the specified variable holds an equation, the equation is opened in Equation Writer.
…µ VISITB
VPOTENTIAL
Type:
Command
Description:
Find a vector potential function describing a field whose curl (or “rot”) is the input. This
command is the opposite of CURL. Given a vector V it attempts to return a function U such that
curl U is equal to V; ∇ × U = V . For this to be possible, DIV(V) must be zero, otherwise the
command reports a “Bad Argument Value” error. Step-by-step mode is available with this
command.
Level 1/Item 1
→
The contents opened in the command line
editor.
VISITB, EDIT, EDITB
A variable name
Σ–
(Sigma Minus)
Type:
Command
Description:
Sigma Minus Command: Returns a vector of m real numbers (or one number x if m = 1)
corresponding to the coordinate values of the last data point entered by Σ+ into the current
statistics matrix (reserved variable ΣDAT).
The last row of the statistics matrix is deleted.
The vector returned by Σ– can be edited or replaced, then restored to the statistics matrix by Σ+.
Access:
…µΣ–
Input/Output:
Level 1/Argument 1
The sequence CLΣ [ 2 3 4 ] Σ+ 3 1 7 Σ+ creates the matrix
[[ 2 3 4 ][ 3 1 7 ]] in ΣDAT.
CLΣ, RCLΣ, STOΣ, Σ–
Level 1/Argument 1
Level 1/Item 1
→
A variable name
Access:
Input/Output:
L = Level; A = Argument; I = Item
Example:
Level 1/Argument 1
L1/I1
[[ x1 1, …, x1 m ] [ xn 1, … ,xn m ]]
x1 … xm–1
VISIT
Type:
Command
Description:
For a specified variable, opens the contents in the command-line editor.
Access:
…µ VISIT or „˜
Input/Output:
Command:
Result:
VPOTENTIAL([2*Y*Z, 0, 2*X*Y-X^2], [X,Y,Z])
EXPAND(ANS(1))
[0, -((X^3-3*Y*X^2)/3), Z*Y^2]
This shows that the reversal is not unique – more than one vector can have the same curl.
Full Command and Function Reference 3-271
∫
(Integrate)
Type:
Function
Description:
Integral Function: Integrates an integrand from lower limit to upper limit with respect to a specified
variable of integration.
The algebraic syntax for ∫ parallels its stack syntax:
∫ (lower limit, upper limit, integrand, name)
where lower limit, upper limit, and integrand can be real or complex numbers, unit objects, names, or
algebraic expressions.
Evaluating ∫ in Symbolic Results mode (flag –3 clear) returns a symbolic result. Some functions
that the calculator can integrate include the following:
• All built-in functions whose antiderivatives can be expressed in terms of other built-in functions
— for example, SIN can be integrated since its antiderivative, COS, is a built-in function. The
arguments for these functions must be linear.
• Sums, differences, and negations of built-in functions whose antiderivatives can be expressed in
terms of other built-in functions — for example, 'SIN(X)–COS(X)'.
• Derivatives of all built-in functions — for example, 'INV(1+X^2)' can be integrated because it
is the derivative of the built-in function ATAN.
• Polynomials whose base term is linear — for example, 'X^3+X^2–2*X+6' can be integrated
since X is a linear term. '(X^2–6)^3+(X^2–6)^2' cannot be integrated since X^2–6 is not linear.
• Selected patterns composed of functions whose antiderivatives can be expressed in terms of
other built-in functions — for example, '1/(COS(X)*SIN(X))' returns 'LN(TAN(X))'.
If the result of the integration is an expression with no integral sign in the result, the symbolic
integration was successful. If, however, the result still contains an integral sign, try rearranging the
expression and evaluating again, or estimate the answer using numerical integration.
Evaluating ∫ in Numerical Results mode (flag –3 set) returns a numerical approximation, and stores
the error of integration in variable IERR. ∫ consults the number format setting to determine how
accurately to compute the result.
Input/Output:
Level 1/Argument 1
Example 1:
Example 2:
WHILE
Type:
Description:
Access:
…Á
(Á is the right-shift of the Ukey).
Flags:
Numerical Result (–3), Number Format (–45 to –50)
Input/Output:
L4/A1
L3/A2
L2/A3
L1/A4
lower limit
upper limit
integrand
'name'
L1/I1
→
'symbintegral'
L = Level; A = Argument; I = Item
Example:
In Symbolic Results mode (flag –3 clear) this command sequence:
1 2 '10*X' 'X' „
returns 15.
In Numeric Results mode (flag –3 set) the above command sequence returns the numeric
approximation 15.. In addition, the variable IERR is created, and contains the error of integration
.00000000015.
TAYLR, ∂, Σ
?
(Undefined)
Type:
Function
Description:
The “undefined” symbol. Used to signify a numeric result that is not defined by the rules of
arithmetic, such as the result of dividing zero by zero, or infinity by infinity. Mathematical
operations on ? return ? as a result. Can be used in programs to check for an earlier undefined
operation.
This use of ? is unrelated to the use of ? as a spare unit in the units system. The unit ? can be used
to create new units based on it, units that can not be expressed in terms of other base units. For
3-288 Full Command and Function Reference
Access:
Input/Output:
Level 1/Item 1
x
→
0
→
–1
→
xkey
xkey
This program:
« "Press [1] to addPress any other key to subtract"
1 DISP 0 WAIT IF 92.1 SAME THEN + ELSE - END »
displays a prompting message and halts program execution until a key is pressed. If the 1 key
(location 92.1) is pressed, two numbers on the stack are added. If any other key is pressed, two
numbers on the stack are subtracted.
This program:
« { ADD { } { } { } { } SUB } MENU
1 DISP -1 WAIT IF 11.1 SAME THEN + ELSE - END »
builds a custom menu with labels ADD and SUB and a prompting message. Executing -1 WAIT
displays the custom menu (note that it’s not active) and suspends execution for keyboard input. If
the ADD menu key (location 11.1) is pressed, two numbers on the stack are added. If any other
key is pressed, two numbers on the stack are subtracted.
KEY
Command Operation
WHILE Indefinite Loop Structure Command: Starts the WHILE … REPEAT … END
indefinite loop structure.
WHILE … REPEAT … END repeatedly evaluates a test and executes a loop clause if the test is
true. Since the test clause occurs before the loop-clause, the loop clause is never executed if the
test is initially false. The syntax is this:
WHILE test-clause REPEAT loop-clause END
The test clause is executed and must return a test result to the stack. REPEAT takes the value
from the stack. If the value is not zero, execution continues with the loop clause; otherwise,
execution resumes following END.
!° BRANCH WHILE
( °is the left-shift of the Nkey).
Level 1/Argument 1
Level 1/Item 1
→
WHILE
REPEAT
END
T/F
→
→
DO, END, REPEAT
WIREFRAME
Type:
Command
Description:
WIREFRAME Plot Type Command: Sets the plot type to WIREFRAME.
When the plot type is set to WIREFRAME, the DRAW command plots a perspective view of the
graph of a scalar function of two variables. WIREFRAME requires values in the reserved
variables EQ, VPAR, and PPAR.
Full Command and Function Reference 3-273
Input/Output:
Code
Level 2/Argument 1
Level 1/Argument 2
w
z
'symb'
'symb1'
x_unit
x_unit
EXP, ISOL, LN, XROOT
z
'symb'
z
'symb2'
y
'symb'
Level 1/Item 1
→
→
→
→
→
→
wz
'z^(symb)'
'(symb)^z'
'symb1^('symb2)'
xy_unity
'(x_unit)^(symb)'
|
(Where)
Type:
Function
Description:
Where Function: Substitutes values for names in an expression.
| is used primarily in algebraic objects, where its syntax is:
'symbold | (name1 = symb1, name2 = symb2 …)'
It enables algebraics to include variable-like substitution information about names. Symbolic
functions that delay name evaluation (such as ∫ and ∂) can then extract substitution information
from local variables and include that information in the expression, avoiding the problem that
would occur if the local variables no longer existed when the local names were finally evaluated.
Access:
@¦
Flags:
Numerical Results (–3)
Input/Output:
5
A Deep Sleep wakeup (for example, \$, Alarm).
6
Not used
7
A 5-nibble word (CMOS test word) in RAM was corrupt. (This word is checked
on every interrupt, but it is used only as an indicator of potentially corrupt RAM.)
8
Not used
9
The alarm list is corrupt.
A
B
The card module was removed (or card bounce).
C
Hardware reset occurred (for example, an electrostatic discharge or user reset)
D
(¦is the right-shift of the Ikey).
Level 2/Argument 1
Level 1/Argument 2
Level 1/Item 1
'symbold'
{ name1, 'symb1', name2, 'symb2' … }
→
'symbnew'
x
{ name1, 'symb1', name2, 'symb2' … }
→
x
(x,y)
{ name1, 'symb1', name2, 'symb2' … }
→
(x,y)
Description
Access:
Flags:
Input/Output:
The date and time stamp (date time) part of the log may be displayed as 00…0000 for one of three
reasons:
• The system time was corrupt when the stamp was recorded.
• The date and time stamp itself is corrupt (bad checksum).
• Fewer than four warmstarts have occurred since the log was last cleared.
…µ WSLOG
Date Format (–42)
Level 1/Argument 1
Level 4/Item 1 ... Level 1/Item 4
→
“log4” ... “log1”
APPLY, QUOTE
√
(Square Root)
Type:
Function
Description:
Square Root Analytic Function: Returns the (positive) square root of the argument.
For a complex number (x1, y1), the square root is this complex number:
θ
θ
( x 2, y 2 ) =  r cos ---, r sin ---
2
2
where r = ABS (x1, y1), and θ = ARG (x1, y1).
If (x1, y1) = (0,0), then the square root is (0, 0).
The inverse of SQ is a relation, not a function, since SQ sends more than one argument to the
same result. The inverse relation for SQ is expressed by ISOL as this general solution:
's1*√Z'
The function √ is the inverse of a part of SQ, a part defined by restricting the domain of SQ such
that:
1. each argument is sent to a distinct result, and
2. each possible result is achieved. The points in this restricted domain of SQ are called the
principal values of the inverse relation. The √ function in its entirety is called the principal branch of
the inverse relation, and the points sent by √ to the boundary of the restricted domain of SQ
form the branch cuts of √.
3-286 Full Command and Function Reference
ΣX
Type:
Description:
Command
Sum of x-Values Command: Sums the values in the independent-variable column of the current
statistical matrix (reserved variable ΣDAT).
The independent-variable column is specified by XCOL and is stored as the first parameter in the
reserved variable ΣPAR. The default independent-variable column number is 1.
Access:
…µΣX
Input/Output:
Level 1/Argument 1
Level 1/Item 1
→
ΣX2
Type:
Description:
xsum
NΣ, XCOL, ΣXY, ΣX2, ΣY, ΣY2
Command
Sum of Squares of x-Values Command: Sums the squares of the values in the independentvariable column of the current statistical matrix (reserved variable ΣDAT).
The independent-variable column is specified by XCOL and is stored as the first parameter in the
reserved variable ΣPAR. The default independent-variable column number is 1.
Full Command and Function Reference 3-275
YVOL
Type:
Description:
Access:
Input/Output:
Command
Y Volume Coordinates Command: Sets the depth of the view volume in the reserved variable
VPAR.
The variables ynear and yfar are real numbers that set the y-coordinates for the view volume used in
3D plots. ynear must be less than yfar. These values are stored in the reserved variable VPAR.
…µ YVOL
Level 2/Argument 1
YYRNG
Type:
Description:
Level 1/Argument 2
ynear
yfar
EYEPT, XVOL, XXRNG, YYRNG, ZVOL
→
Level 2/Item 1
→
“string”
→
“string”
BUFLEN, SBRK, SRECV, STIME
Level 1/Item 2
1
“substringunsent”
0
XNUM
Command
Y Range of an Input Plane (Domain) Command: Specifies the y range of an input plane (domain)
for GRIDMAP and PARSURFACE plots.
The variables yy near and yy far are real numbers that set the y-coordinates for the input plane. These
values are stored in the reserved variable VPAR.
Level 2/Argument 1
ZEROS
Type:
Description:
Level 1/Argument 1
Level 1/Item 1
Access:
…µ YYRNG
Input/Output:
Access:
Flags:
Input/Output:
After receiving an XOFF command (with transmit pacing in the reserved variable IOPAR set),
XMIT stops transmitting and waits for an XON command. XMIT resumes transmitting if an
XON is received before the time-out set by STIME elapses; otherwise, XMIT terminates, returns
a 0, and stores "Timeout" in ERRM.
…µ XMIT
I/O Device (–33), I/O Device for Wire (–78)
Level 1/Argument 2
ynear
yfar
EYEPT, XVOL, XXRNG, YVOL, ZVOL
Level 1/Item 1
→
Command
Returns the zeros of a function of one variable, without multiplicity.
Access:
PSOLVE, Symbolic solve, !ÎL
Input:
Level 2/Argument 1: An expression.
Level 1/Argument 2: The variable to solve for.
Output:
The solution, or a list of solutions, for the expression equated to 0.
Flags:
Radians mode must be set (flag –17 set).
For a symbolic result, clear the CAS modes Numeric option (flag –3 clear).
The following flag settings affect the result:
Type:
Command
Description:
Converts an object or a list of objects to 12-digit decimal numeric format. Similar to →NUM
except that →NUM does not work with lists, nor in programs in algebraic mode.
Access:
Catalog, …µ
Input:
An object or list of objects.
Output:
The objects in numeric format.
Example:
Command:
Results:
Find the 12-digit numeric values of π/2, 3e, and 4cos(2).
XNUM({π/2,3*e,4*COS(2})
I→R, →NUM
XOR
Type:
Description:
• If Approximate mode is set (flag –105 set), finds numeric roots.
• If Complex mode is set (flag –103 set), searches for real and complex roots.
Find the roots of the following equation in x, without specifying that x=2 is a root twice.
x3 – x2 – 8x + 12 = 0:
Command:
Results:
ZEROS(X^3-X^2-8*X+12)
{-3, 2}
Access:
3-284 Full Command and Function Reference
Function
Exclusive OR Function: Returns the logical exclusive OR of two arguments.
When the arguments are binary integers or strings, XOR does a bit-by-bit (base 2) logical
comparison:
• Binary integer arguments are treated as sequences of bits with length equal to the current
wordsize. Each bit in the result is determined by comparing the corresponding bits (bit1 and bit2)
in the two arguments, as shown in the following table:
bit1
• If Exact mode is set (flag –105 is clear), attempts to find exact solutions only. This may return a
null list, even if approximate solutions exist.
Example:
{1.5707963268 8.15484548538 -1.66458734619}
bit2
bit1 XOR bit2
0
0
0
0
1
1
1
0
1
1
1
0
• String arguments are treated as sequences of bits, using 8 bits per character (that is, using the
binary version of the character code). The two string arguments must be the same length.
When the arguments are real numbers or symbolics, XOR simply does a true/false test. The result
is 1 (true) if either, but not both, arguments are nonzero; it is 0 (false) if both arguments are
nonzero or zero. This test is usually done to compare two test results.
If either or both of the arguments are algebraic objects, then the result is an algebraic of the form
symb1 XOR symb2. Execute →NUM (or set flag –3 before executing XOR) to produce a numeric
result from the algebraic result.
…ã L LOGIC XOR
(ã is the right-shift of the 3key).
Full Command and Function Reference 3-277
ΣY
Type:
Description:
Access:
Input/Output:
Command
Sum of y-Values Command: Sums the values in the dependent variable column of the current
statistical matrix (reserved variable ΣDAT).
The dependent variable column is specified by YCOL, and is stored as the second parameter in
the reserved variable ΣPAR. The default dependent variable column number is 2.
…µΣY
Level 1/Argument 1
Level 1/Item 1
→
ΣY2
Type:
Description:
Access:
Input/Output:
NΣ, ΣX, XCOL, ΣXY, ΣX2, YCOL, ΣY2
Command
Sum of Squares of y-Values Command: Sums the squares of the values in the dependent-variable
columns of the current statistical matrix (reserved variable ΣDAT). The dependent column is the
column designated as YCOL
…µΣY2
Level 1/Argument 1
Level 1/Item 1
→
ΣY^2
Type:
Description:
Sum of Y
Sum of Y2
NΣ, ΣX, XCOL, ΣXY, ΣX2, YCOL
Access:
Input/Output:
Command
Sum of Squares of y-Values Command: Sums the squares of the values in the dependent-variable
columns of the current statistical matrix. ΣY^2 is provided for compatibility with the HP 28.
ΣY^2 is the same as ΣY2; see its listing for details.
Command
Dependent Column Command: Specifies the dependent variable column of the current statistics
matrix (reserved variable ΣDAT).
The dependent variable column number is stored as the second parameter in the reserved variable
ΣPAR. The default dependent variable column number is 2.
YCOL will accept a noninteger real number and store it in ΣPAR, but subsequent commands that
utilize the YCOL specification in ΣPAR will cause an error.
…µ YCOL
Level 1/Argument 1
Level 1/Item 1
→
ncol
BARPLOT, BESTFIT, COLΣ, CORR, COV, EXPFIT, HISTPLOT, LINFIT, LOGFIT, LR,
PREDX, PREDY, PWRFIT, SCATRPLOT, XCOL
3-282 Full Command and Function Reference
Express .3658 in rational format, in Std mode:
Example 2:
Command:
Results:
Express .3658 in rational format, in Fix 4 mode:
Example 3:
Command:
Results:
Express 1.04719755120 in rational format, in Eng 11 mode:
→Q, →Qπ
XRECV
Type:
Description:
Access:
Flags:
Input/Output:
XQ(.3658)
1829/5000
XQ(.3658)
√(19/142)
XQ(1.04719755120)
1/3*π
Command
XModem Receive Command: Prepares the calculator to receive an object via XModem. The
received object is stored in the given variable name.
The transfer will start more quickly if you start the XModem sender before executing XRECV.
Invalid object names cause an error. If flag –36 is clear, object names that are already in use also
cause an error.
If you are transferring data between two calculators, executing {AAA BBB CCC} XRECV
receives AAA, BBB, and CCC. You also need to use a list on the sending end ({AAA BBB
CCC} XSEND, for example).
…µ XRECV
I/O Device (–33), RECV Overwrite (–36), I/O Device for Wire (–78)
Level 1/Argument 1
Access:
YCOL
Type:
Description:
Example 1:
Command:
Results:
XRNG
Type:
Description:
Access:
Input/Output:
Command
x-Axis Display Range Command: Specifies the x-axis display range.
The x-axis display range is stored in the reserved variable PPAR as xmin and xmax in the complex
numbers (xmin, ymin) and (xmax, ymax). These complex numbers are the first two elements of PPAR
and specify the coordinates of the lower left and upper right corners of the display ranges.
The default values of xmin and xmax are –6.5 and 6.5, respectively.
…µ XRNG
Level 2/Argument 1
XROOT
Type:
Description:
Access:
Flags:
Level 1/Item 1
→
'name'
BAUD, RECV, RECN, SEND, XSEND
Level 1/Argument 2
xmin
xmax
AUTO, PDIM, PMAX, PMIN, YRNG
Level 1/Item 1
→
Analytic function
xth Root of y Command: Computes the xth root of a real number.
XROOT is equivalent to y1/x, but with greater accuracy.
If y < 0, x must be an integer.
…»
(» is the right-shift of the Rkey).
Numerical Results (–3)
Full Command and Function Reference 3-279
Example:
Input/Output:
Given: ρ=0.0035_Ω∗cm, L=50_cm, A=1_cm^2.
Level 2/Argument 1
Solution: R=0.175_Ω.
Series and Parallel R (2, 6)
Equation:
1
1
1
------- = ------- + ------Rp
R1 R2
R s = R1 + R2
Example:
Given: R1=2_Ω, R2=3_Ω.
Solution: Rs=5_Ω, Rp=1.2000_Ω.
Series and Parallel C (2, 7)
Level 1/Item 1
obj1
obj2
→
(x,0)
x
→
x
(x,0)
→
0/1
z
'symb'
→
'z ≠ symb'
z
→
'symb ≠ z'
'symb2'
→
'symb1 ≠symb2'
'symb'
Level 1/Argument 2
'symb1'
SAME, TYPE, <, ≤, >,≥, ==, =
0/1
0/1
*
(Multiply)
Type:
Function
Description:
Multiply Analytic Function: Returns the product of the arguments.
The product of a real number a and a complex number (x, y) is the complex number (xa, ya).
The product of two complex numbers (x1, y1) and (x2, y2) is the complex number (x1 x2 – y1 y2, x1
y2 + x2 y1).
The product of a real array and a complex array or number is a complex array. Each element x of
the real array is treated as a complex element (x, 0).
Multiplying a matrix by an array returns a matrix product. The matrix must have the same number
of columns as the array has rows (or elements, if it is a vector).
Although a vector is entered and displayed as a row of numbers, the calculator treats a vector as an
n × 1 matrix when multiplying matrices or computing matrix norms.
Multiplying a binary integer by a real number returns a binary integer that is the product of the
two arguments, truncated to the current wordsize. (The real number is converted to a binary
integer before the multiplication.)
The product of two binary integers is truncated to the current binary integer wordsize.
When multiplying two unit objects, the scalar parts and the unit parts are multiplied separately.
Access:
*
Flags:
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Equations:
1
1
1
------ = ------- + ------Cs
C1 C2
Cp = C1 + C2
Example:
Given: C1=2_µF, C2=3_µF.
Solution: Cs=1.2000_µF, Cp=5_µF.
5-12 Equation Reference
Full Command and Function Reference 3-297
Variable
Qp,Qs
r
R,R1,R2
ri,ro
Rp,Rs
t
ti,tf
V
V1
Description
Parallel and series quality factors
Access:
Flags:
Input/Output:
Charge distance
Resistance
Level 2/Argument 1
Parallel and series resistances
Time
Initial and final times
Voltage, or Total voltage (Voltage Divider)
Voltage across R1
Vi,Vf
Initial and final voltages
Vmax
Maximum voltage
XC
Reactance of capacitor
XL
Reactance of inductor
Reference: 3.
Coulomb’s Law (2, 1)
This equation describes the electrostatic force between two charged particles.
Equation:
1
q1 ⋅ q2
F = ------------------------------- ⋅  ---------2------- 
4 ⋅ π ⋅ ∈0 ⋅ ∈r  r 
Example:
Given: q1=1.6E-19_C, q2=1.6E-19_C, r=4.00E-13_cm, ∈ r=1.00.
Solution: F=14.3801_N.
Ohm’s Law and Power (2, 2)
P = V⋅I
Example:
Given: V=24_V, I=16_A.
Solution: R=1.5_Ω, P=384_W.
5-10 Equation Reference
2
P = I ⋅R
Example 1:
Example 2:
Example 3:
Example 4:
Equations:
V = I⋅R
and %T treat temperatures as differences, without any additive constant, but require both
arguments to be either absolute (K and ºR), both ºC, or both ºF. No other combinations are
allowed.
+
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
2
V
P = -----R
Level 1/Argument 2
Level 1/Item 1
z1
z2
→
[ array ]1
[ array ]2
→
[ array ]3
'z +symb'
z1 + z2
z
'symb'
→
'symb'
z
→
'symb +z'
'symb1'
'symb2'
→
'symb1 + symb2'
{ list1 }
{ list2
→
{ list1 list2 }
objA
{ obj1 … objn }
→
{ objA obj1 … objn }
{ obj1 … objn }
objA
→
{obj1 … objn objA }
“string1”
“string2”
→
“string1 string2”
“obj string”
obj
“string”
→
“string”
obj
→
“string obj”
#n1
n2
→
#n3
n1
#n2
→
#n3
#n1
#n2
→
#n3
x1_unit1
y_unit2
→
(x2 + y)_unit2
'symb'
x_unit
→
'symb + x_unit'
x_unit
'symb'
→
'x_unit + symb'
→
grob1
grob2
{ 1 2 3 } { A B C } + returns { 1 2 3 A B C }.
5_ft 9_in + returns 69_in.
[[ 0 1 ][ 1 3 ]] [[ 2 1 ][ 0 1 ]] + returns
[[ 2 2 ][ 1 4 ]].
'FIRST' 'SECOND' + returns 'FIRST+SECOND'.
grob3
–
(Subtract)
Type:
Function
Description:
Subtract Analytic Function: Returns the difference of the arguments.
The difference of a real number a and a complex number (x, y) is (x–a, y) or (a–x, –y). The
difference of two complex numbers (x1, y1) and (x2, y2) is (x1 – x2, y1 – y2).
The difference of a real array and a complex array is a complex array, where each element x of the
real array is treated as a complex element (x, 0). The two array arguments must have the same
dimensions.
The difference of a binary integer and a real number is a binary integer that is the sum of the first
argument and the two’s complement of the second argument. (The real number is converted to a
binary integer before the subtraction.)
Full Command and Function Reference 3-299
Equation:
ax
ay
 ---------------, ----------------
 2
2 2
2
x +y x +y
2
2
W
Mx = P ⋅ ( x – a ) + M – ----- ⋅ ( L – 2 ⋅ L ⋅ x + x )
2
A complex number (x, y) divided by a real number a returns the complex number (x/a, y/a).
A complex number (x1, y1) divided by another complex number (x2, y2) returns this complex
quotient:
Example:
Given: L=10_ft, P=500lbf, M=800_ft∗lbf, a=3_ft, c=6_ft, w=100_lbf/ft, x=8_ft.
 x 1 x 2 + y 1 y 2 y 1 x 2 – x 1 y 2
- , -------------------------- --------------------------
2
2
 x2 + y2
x +y 
Solution: Mx= -200_ft∗lbf
2
2
2
2
An array B divided by a matrix A solves the system of equations AX=B for X; that is, X = A–1 B.
This operation uses 15-digit internal precision, providing a more precise result than the calculation
INV(A)*B. The matrix must be square, and must have the same number of columns as the array
has rows (or elements, if the array is a vector).
A binary integer divided by a real or binary number returns a binary integer that is the integral part
of the quotient. (The real number is converted to a binary integer before the division.) A divisor
of zero returns # 0.
When dividing two unit objects, the scalar parts and the unit parts are divided separately.
Cantilever Shear (1, 10)
Access:
/
Flags:
Numerical Results (–3)
Input/Output:
Equation:
Level 2/Argument 1
V = P + w ⋅ (L – x )
Example:
Given: L=10_ft, P=500lbf, a=3_ft, x=8_ft, w=100_lbf/ft.
Solution: V=200_lbf
Level 1/Argument 2
Level 1/Item 1
z1
z2
→
[ array ]
[[ matrix ]]
→
[[ matrix–1 ×array ]]
'z /symb'
z1 / z2
z
'symb'
→
'symb'
z
→
'symb /z'
'symb1'
'symb2'
→
'symb1 / symb2'
#n1
n2
→
#n3
n1
#n2
→
#n3
#n1
#n2
→
#n3
x_unit1
y_unit2
→
(x / y)_unit1/unit2
x
y_unit
→
(x / y)_1/unit
x_unit
y
→
(x / y)_unit
'symb'
x_unit
→
'symb / x_unit'
x_unit
'symb'
→
'x_unit / symb'
+, –, *, =
=
(Equal)
Type:
Function
Description:
Equals Analytic Function: Returns an equation formed from the two arguments.
The equals sign equates two expressions such that the difference between them is zero.
In Symbolic Results mode, the result is an algebraic equation. In Numerical Results mode, the
result is the difference of the two arguments because = acts equivalent to –. This allows
expressions and equations to be used interchangeably as arguments for symbolic and numerical
rootfinders.
5-8 Equation Reference
Full Command and Function Reference 3-301
Input/Output:
Example:
Given: L=20_ft, E=29000000_psi, I=40_in^4, a=10_ft, P=674.427_lbf, c=17_ft, M=3687.81_ft∗lbf,
w=102.783_lbf/ft, x=9_ft.
Solution: Θ= -0.0876_°.
Simple Moment (1, 5)
Equation:
P ⋅ ( L – a) ⋅ x M ⋅ x w ⋅ x
Mx = -------------------------------- + ------------ + ----------- ⋅ ( L – x )
L
L
2
Solution: Mx=9782.1945_ft∗lbf
Simple Shear (1, 6)
Equation:
Level 1/Argument 2
obj1
obj2
→
0/1
(x,0)
x
→
0/1
x
(x,0)
→
0/1
z
'symb'
→
'z == symb'
'symb'
z
→
'symb == z'
'symb2'
→
'symb1 == symb2'
'symb1'
SAME, TYPE, <, ≤, >, ≥, ≠
Level 2/Argument 1
Level 1/Argument 2
obj
'name'
→
obj
:nport :namebackup
→
obj
obj
DEFINE, RCL, →, STO
Leveln/Argument1 7 Level1/Argumentn
Example 1:
Given: L=20_ft, a=10_ft, P=674.427_lbf, M=3687.81_ft∗lbf, w=102.783_lbf/ft, x=9_ft.
Solution: V=624.387_lbf.
Example 2:
5-6 Equation Reference
Level 1/Item 1
→
(Create Local)
Type:
Command
Description:
Create Local Variables Command: Creates local variables.
Local variable structures specify one or more local variables and a defining procedure.
A local variable structure consists of the → command, followed by one or more names, followed
by a defining procedure — either a program or an algebraic. The → command stores objects into
local variables with the specified names. The resultant local variables exist only while the defining
procedure is being executed. The syntax of a local variable structure is one of the following:
• → name1 name2 … namen « program »
• → name1 name2 … namen 'algebraic expression'
Access:
…é
(é is the right-shift of the 0key).
Input/Output:
P ⋅ (L – a ) M w
V = ------------------------- + ----- + ---- ⋅ ( L – 2 ⋅ x )
L
L 2
Example:
Level 1/Item 1
(Store)
Type:
Command
Description:
Store Command: Stores an object into a specified variable. To create a backup object, store the obj
into the desired backup location (identified as :nport:namebackup). will not overwrite an existing
backup object. To replace an element of an array or list, use STO. Also use STO to store a
graphic object into PICT or a library or backup object into a port.
Access:
K
Input/Output:
Example:
Given: L=20_ft, a=10_ft, P=674.427_lbf, c=17_ft, M=3687.81_ft∗lbf, w=102.783_lbf / ft, x=9_ft.
Level 2/Argument 1
Level 1/Item 1
→
obj1 … objn
This program:
« → x y « x y * x y - + » »
takes an object from level 2 and stores it in local variable x, takes an object from level 1 and stores
it in local variable y, and executes calculations with x and y in the defining procedure (in this case a
program). When the defining procedure ends, local variables x and y disappear.
A user-defined function is a variable containing a program that consists solely of a local variable
structure.
For example, the variable A, containing this program:
Full Command and Function Reference 3-303
4
Elastic Buckling (1, 1)
These equations apply to a slender column (K  L / r > 100) with length factor K.
4.Computer Algebra System
CAS Settings
Selecting CAS Settings
CAS settings are selected using the CAS MODES input form, described in Chapter 1 of the User’s Manual.
Selecting a mode is equivalent to setting or clearing one of the system flags, the flag numbers are given in the
“Flags” part of the operation descriptions.
Equations:
2
2
π ⋅E⋅A
Pc r = --------------------2-⋅L
K
----------- 
 r 
π ⋅E⋅I
Pc r = -------------------2(K ⋅ L )
Pcr
A
σ c r = --------
r =
I
--A
Example:
Given: L=7.3152_m, r=4.1148_cm, E=199947961.502_kPa, A=53.0967_cm^2, K=0.7, I=8990598.7930_mm^4.
Solution: Pcr=676.6019_kN, σcr=127428.2444_kPa.
Pressing the L key in the CAS MODES input form displays a menu that allows the user to calculate settings. For
example, if the Modulo field is selected in the CAS MODES form, and L is pressed, the following menu keys are
available.
!TYPES lists the types of object that can be chosen for this setting. For the modulo, this can be a real number or an
integer. For checked mode settings, this can only be a real number; if it is zero the mode is unchecked, if it is
anything else the mode is checked.
!CALC lets the user calculate a value for the setting, for example a new value for the modulo setting can be calculated.
The !STS! menu key allows the user to switch the heading lines between the “CAS MODES” heading and the normal
heading lines, so that the user can see what the current settings are while carrying out a calculation.
!RESET allows the setting to be reset to its default value, or all CAS settings to be reset to their default values.
Eccentric Columns (1, 2)
These equations apply to a slender column (K  L / r > 100) with length factor K.
See Appendix C in the User’s Guide for further details of the CAS settings, and for other information about the
CAS. Information on the Help system of the CAS is provided in Appendix C and also in Appendix H of the User’s
Guide.
The CAS directory, CASDIR
Equations:




P 
1
∈⋅ c 
σ ma x = --- ⋅  1 + ------2--- ⋅  ----------------------------------------------------- 
A 

r
P 

K⋅L
--  
 C OS  --2-----⋅---r- ⋅ --E----⋅---A

r =
I
--A
Example:
Given: L=6.6542_m, A=187.9351_cm^2, r=8.4836_cm, E=206842718.795_kPa, I=135259652.16_mm^4, K=1,
P=1908.2571_kN, c=15.24_cm, ∈ =1.1806_cm.
Solution: σmax=140853.0970_kPa.
5-4 Equation Reference
CAS settings are stored as flag settings, and as variables in the CASDIR directory, which is automatically created as a
subdirectory of the HOME directory. Variables in this directory include:
VX:
A name or list of names of the current CAS variable or variables. Default value is X
MODULO:
The current modulus used for CAS modulo operations. Default value is 13, but is reset to 3 by
the !RESET key in the CAS menu.
PERIOD:
The period for CAS periodic operations, 2π by default.
EPS:
The value chosen such that coefficients in a polynomial smaller than this value are replaced with
0 by the EPSX0 command. 1E-10 by default.
REALASSUME: A list of the names of variables that some CAS operations treat as real numbers when complex
mode is set. If additional assumptions are made on any variables, these are included here. By
default the list is {X, Y, t, S1, S2}.
PRIMIT:
Temporary storage of anti-derivative expressions used during CAS operations.
MATRIX:
Temporary storage of a matrix used during CAS operations.
CASINFO:
Temporary storage of graphic display during step-by-step operations.
See Appendix D for a complete list of CASDIR variables.
Points to note when choosing settings
The CAS is a powerful tool, and part of that power lies in the many modes and settings available. This means that if
a setting is wrong then the CAS can give unexpected results or error messages. The following points should be
observed. If an unexpected error occurs, or an unexpected message is seen, check this list.
Computer Algebra System 4-1
Subject, var (subj, title) Pic EQ Pg
COLUMNS AND BEAMS, 22 **********(1)*****
Elastic Buckling (1,1)
Y
4 5-4
Eccentric Columns (1,2)
Y
2 5-4
Simple Deflection (1,3)
Y
1 5-5
Simple Slope (1,4)
Y
1 5-5
Simple Moment (1,5)
Y
1 5-6
Simple Shear (1,6)
Y
1 5-6
Cantilever Deflection (1,7) Y
1 5-7
Cantilever Slope (1,8)
Y
1 5-7
Cantilever Moment (1,9)
Y
1 5-7
Cantilever Shear (1,10)
Y
1 5-8
ELECTRICITY, 47 ****************(2)*****
Coulomb's Law (2,1)
N
1 5-10
Ohm's Law and Power (2,2)
N
4 5-10
Voltage Divider (2,3)
Y
1 5-11
Current Divider (2,4)
Y
1 5-11
Wire Resistance (2,5)
Y
2 5-11
Series and Parallel R (2,6) Y
2 5-12
Series and Parallel C (2,7) Y
2 5-12
Series and Parallel L (2,8) Y
2 5-13
Capacitive Energy (2,9)
N
1 5-13
Inductive Energy (2,10)
N
1 5-13
RLC Current Delay (2,11)
Y
5 5-14
DC Capacitor Current (2,12) N
3 5-14
Capacitor Charge (2,13)
N
1 5-14
DC Inductor Voltage (2,14) N
3 5-15
RC Transient (2,15)
Y
1 5-15
RL Transient (2,16)
N
1 5-15
Resonant Frequency (2,17)
N
4 5-16
Plate Capacitor (2,18)
Y
1 5-16
Cylindrical Capacitor (2,19)Y
1 5-16
Solenoid Inductance (2,20) Y
1 5-17
Toroid Inductance (2,21)
Y
1 5-17
Sinusoidal Voltage (2,22)
N
2 5-18
Sinusoidal Current (2,23)
N
2 5-18
FLUIDS, 24 *********************(3)*****
Pressure at Depth (3,1)
Y
1 5-19
Bernoulli Equation (3,2)
Y 10 5-19
Flow with Losses (3,3)
Y 10 5-20
Flow in Full Pipes (3,4)
Y
8 5-21
FORCES AND ENERGY, 32 **********(4)*****
Linear Mechanics (4,1)
N
8 5-22
Angular Mechanics (4,2)
N 12 5-23
Centripetal Force (4,3)
N
4 5-23
Hooke’s Law (4,4)
Y
2 5-23
1D Elastic Collisions (4,5) Y
2 5-24
Drag Force (4,6)
N
1 5-24
Law of Gravitation (4,7)
N
1 5-24
Mass-Energy Relation (4,8) N
1 5-24
GASES, 26 **********************(5)*****
Ideal Gas Law (5,1)
N
2 5-25
Ideal Gas State Change (5,2)N
1 5-26
Isothermal Expansion (5,3) N
2 5-26
Polytropic Processes (5,4) N
2 5-26
Isentropic Flow (5,5)
Y
4 5-26
Real Gas Law (5,6)
N
2 5-27
Real Gas State Change (5,7) N
1 5-27
Kinetic Theory (5,8)
N
4 5-28
5-2 Equation Reference
Subject, var (subj, title) Pic EQ Pg
HEAT TRANSFER, 23 *************(6)*****
Heat Capacity (6,1)
N
2 5-29
Thermal Expansion (6,2)
Y
2 5-29
Conduction (6,3)
Y
2 5-29
Convection (6,4)
Y
2 5-30
Conduction+Convection (6,5)Y
4 5-30
5 5-31
MAGNETISM, 11 *****************(7)*****
Straight Wire (7,1)
Y
1 5-32
Force between Wires (7,2) Y
1 5-32
Magnetic (B) Field
in Solenoid (7,3)
Y
1 5-33
Magnetic (B) Field
in Toroid (7,4)
Y
1 5-33
MOTION, 30 ********************(8)*****
Linear Motion (8,1)
N
4 5-35
Object in Free Fall (8,2) N
4 5-35
Projectile Motion (8,3)
Y
5 5-35
Angular Motion (8,4)
N
4 5-36
Circular Motion (8,5)
N
3 5-36
Terminal Velocity (8,6)
N
1 5-36
Escape Velocity (8,7)
N
1 5-36
OPTICS, 10 ********************(9)*****
Law of Refraction (9,1)
Y
1 5-37
Critical Angle (9,2)
Y
1 5-38
Brewster’s Law (9,3)
Y
2 5-38
Spherical Reflection (9,4) Y
3 5-39
Spherical Refraction (9,5) Y
1 5-39
Thin Lens (9,6)
Y
3 5-39
OSCILLATIONS, 17 *************(10)*****
Mass-Spring System (10,1) Y
3 5-41
Simple Pendulum (10,2)
Y
3 5-41
Conical Pendulum (10,3)
Y
4 5-42
Torsional Pendulum (10,4) Y
3 5-42
Simple Harmonic (10,5)
N
4 5-42
PLANE GEOMETRY, 21 ***********(11)*****
Circle (11,1)
Y
5 5-44
Ellipse (11,2)
Y
5 5-44
Rectangle (11,3)
Y
5 5-45
Regular Polygon (11,4)
Y
6 5-45
Circular Ring (11,5)
Y
4 5-46
Triangle (11,6)
Y
5 5-46
SOLID GEOMETRY, 12 ***********(12)*****
Cone (12,1)
Y
5 5-47
Cylinder (12,2)
Y
5 5-48
Parallelpiped (12,3)
Y
4 5-48
Sphere (12,4)
Y
4 5-49
SOLID STATE DEVICES, 60 ******(13)*****
PN Step Junctions (13,1)
Y
8 5-52
NMOS Transistors (13,2)
Y 10 5-53
Bipolar Transistors (13,3) Y
8 5-54
JFETs (13,4)
Y
7 5-54
STRESS ANALYSIS, 28 **********(14)*****
Normal Stress (14,1)
Y
3 5-57
Shear Stress (14,2)
Y
3 5-57
Stress on an Element (14,3)Y
3 5-57
Mohr’s Circle (14,4)
Y
7 5-58
WAVES, 16 ********************(15)***
Transverse Waves (15,1)
Y
4 5-59
Longitudinal Waves (15,2) N
4 5-59
Sound Waves (15,3)
N
4 5-60
Using the CAS
Examples and Help
In addition to the examples in this Command Reference, the built-in CAS help provides examples of CAS
operations.
• If an operation is selected from the operations catalog, …µ, and if help is available, then pressing the
!HELP key shows help information. Pressing the %OK% menu key copies the operation to the command line,
• If an operation is selected from the CASCMD list, IL CASCMD, the same help information is available,
but instead of %OK%, there is an !ECHO key to copy the name and example to the command line. Evaluating
the example and comparing it with the result shown in the help text is a quick way to check if the CAS
settings are correct.
Compatibility with Other Calculators
Some CAS operations replace similar operations that were available on older HP calculators. The older operation
names have been kept on the HP 50g, HP 49g+, and HP 48gII so that programs written for the older calculators
will work on the new models without being rewritten. This means that some commands and functions have more
than one name; these are indicated as such within the Command Reference in Chapter 3.
The older models whose programs can be run on the HP 50g, HP 49g+, and HP 48gII are the HP 28C and HP 28S,
the HP 48S and the HP 48SX, and the HP 48G, HP 48GX and HP 48G+. These models only had the RPL
programming language, so programs written for them should be used in RPN mode. The HP 49G is a more recent
model which does have the CAS, and Algebraic mode, so programs written for it in either RPL or in Algebraic
mode can be used on the HP 50g, HP 49g+, and HP 48gII. The CAS of the HP 50g, HP 49g+, and HP 48gII is
also very similar to the CAS of the HP 40G and HP 40gs models, so programs and books written for them may be
Extending the CAS
Users can extend the CAS by writing their own functions or commands. Functions can be written as UDFs (User
Defined Functions); see the description of DEFINE in Chapter 3 of the calculator User’s Guide and the
descriptions of DEFINE and DEF in the Command Reference in Chapter 3 of this reference. The pattern
matching commands ↑MATCH and ↓MATCH allow the user to write programs to edit algebraic expressions. Here
is an example of an RPL program using ↑MATCH to replace the square root of a square of a symbol with the
symbol itself. The wildcard &A means that any symbol or expression squared can be replaced. The conditional
expression &A≥0 means that the replacement is only carried out if the square root is not of a negative value.
« { 'ƒ(&A^2)' &A '&AŠ0' } ↑MATCH »
Dealing with unexpected CAS results or messages
If a CAS operation gives an unexpected result or message, check the list of points given in the section on CAS
settings. Some problems can be caused by unexpected settings, so it can be helpful to reset all CAS settings to their
default values, with the CASCFG command, or with the !RESET key in the CAS settings menu.
Computer Algebra System 4-3
These commands display menus or lists of CAS operations.
ALGB
..........................3-10
ARIT
..........................3-15
CONSTANTS ..........................3-44
DIFF
..........................3-59
EXP&LN
..........................3-81
INTEGER
..........................3-119
MAIN
..........................3-141
MATHS
..........................3-143
MATR
..........................3-143
..........................3-146
MODULAR ..........................3-150
POLYNOMIAL .......................3-173
REWRITE
..........................3-202
TESTS
..........................3-251
TRIGO
..........................3-257
CAS utility operations
ASSUME
..........................3-19
CASCFG
..........................3-31
CASCMD
..........................3-32
DEDICACE ..........................3-52
DEF
..........................3-52
HELP
..........................3-103
LOCAL
..........................3-137
RCLVX
..........................3-195
STORE
..........................3-236
STOVX
..........................3-238
UNASSIGN ..........................3-263
UNASSUME ..........................3-263
UNBIND
..........................3-264
VER
..........................3-270
4-12 Computer Algebra System
HERMITE .......................... 3-103
HORNER
.......................... 3-108
LAGRANGE .......................... 3-126
LCM
.......................... 3-128
LEGENDRE .......................... 3-130
PARTFRAC .......................... 3-164
PCOEF
.......................... 3-165
PROOT
.......................... 3-179
PTAYL
.......................... 3-182
QUOT
.......................... 3-189
RESULTANT .......................... 3-201
REMAINDER.......................... 3-198
STURM
.......................... 3-241
STURMAB .......................... 3-242
Arithmetic Modulo commands, !ÞMODULO
DIVMOD
.......................... 3-63
DIV2MOD .......................... 3-62
EXPANDMOD ....................... 3-80
FACTORMOD ........................ 3-83
GCDMOD .......................... 3-96
INVMOD
.......................... 3-120
MOD
.......................... 3-150
MODSTO
.......................... 3-150
MULTMOD .......................... 3-153
POWMOD .......................... 3-175
SUBTMOD .......................... 3-243
Arithmetic Permutation commands, !ÞPERMUTATION
C2P
.......................... 3-31
CIRC
.......................... 3-36
P2C
.......................... 3-162
Other Arithmetic commands, !Þ
DIVIS
.......................... 3-63
FACTORS
.......................... 3-83
LGCD
.......................... 3-130
PROPFRAC .......................... 3-179
SIMP2
.......................... 3-224
Computer Algebra System 4-5
Convert commands, !Ú
Exp and Lin commands, !Ð
Unit conversion tools, !Ú
CONVERT ..........................3-45
UBASE
..........................3-262
UVAL
..........................3-267
UFACT
..........................3-263
→UNIT
..........................3-264
EXPLN
.......................... 3-81
EXPM
.......................... 3-81
LIN
.......................... 3-131
LNCOLLECT .......................... 3-136
LNP1
.......................... 3-136
TEXPAND .......................... 3-252
TSIMP
.......................... 3-260
Base conversion tools, !Ú
UNITS TOOLS
BASE
All operations in the BASE submenus are described in Chapter 3.
Trigonometric conversions, !Ú
ACOS2S
..........................3-7
ASIN2C
..........................3-17
ASIN2T
..........................3-17
ATAN2S
..........................3-21
HALFTAN ..........................3-102
SINCOS
..........................3-225
TAN2SC
..........................3-248
TAN2SC2
..........................3-249
TLIN
..........................3-254
TRIG
..........................3-256
TRIGCOS
..........................3-257
TRIGSIN
..........................3-257
TSIMP
..........................3-260
Rewrite expression, !Ú
DISTRIB
..........................3-61
EXPLN
..........................3-81
EXP2POW ..........................3-79
FDISTRIB
..........................3-86
I→R
..........................3-122
LIN
..........................3-131
LNCOLLECT ..........................3-136
POWEXPAND ........................3-174
SIMPLIFY
..........................3-225
→NUM
..........................3-157
→Q
..........................3-187
→Qπ
..........................3-187
R→I
..........................3-190
4-10 Computer Algebra System
REWRITE
TRIG CONV
Matrix-related commands
Create, !Ø CREATE
AUGMENT .......................... 3-23
IDN
.......................... 3-110
CON
.......................... 3-41
→DIAG
.......................... 3-58
DIAG→
.......................... 3-58
GET
.......................... 3-96
GETI
.......................... 3-97
HILBERT
.......................... 3-105
PUT
.......................... 3-183
PUTI
.......................... 3-184
RANM
.......................... 3-191
RDM
.......................... 3-195
REPL
.......................... 3-199
SUB
.......................... 3-242
VANDERMONDE ................ 3-269
Operations, !Ø OPERATIONS
ABS
.......................... 3-5
AXL
.......................... 3-25
AXM
.......................... 3-25
CNRM
.......................... 3-38
COND
.......................... 3-42
DET
.......................... 3-57
LSQ
.......................... 3-139
.......................... 3-140
RANK
.......................... 3-190
RNRM
.......................... 3-206
RSD
.......................... 3-213
SIZE
.......................... 3-226
SNRM
.......................... 3-228
.......................... 3-231
Computer Algebra System 4-7
Series and Parallel L (2, 8)
Circle (11, 1)
Equations:
Equations:
1
1
1
------- = ------- + ------Lp
L1 L2
Ls = L1 + L2
A = π⋅r
4
2
π⋅r
I = -----------4
C = 2⋅π⋅r
4
π⋅r
J = -----------2
Id = I + A ⋅ d
Example:
2
Given: L1=17_mH, L2=16.5_mH,
Solution: Ls=33.5000_mH, Lp=8.3731_mH.
Example:
Given: r=5_cm, d=1.5_cm.
Solution: C=31.4159_cm, A=78.5398_cm^2, I=4908738.5_mm^4, J=9817477.0_mm^4, Id=6675884.4_mm^4.
Capacitive Energy (2, 9)
Equation:
Ellipse (11, 2)
2
C⋅V
E = --------------2
Example:
Given: E=0.025_J, C=20_µF.
Solution: V=50_V.
Inductive Energy (2, 10)
Equation:
Equations:
2
2
A = π⋅b⋅h
2
b +h
C = 2 ⋅ π ⋅ ----------------2
π⋅b⋅h
2
2
J = ------------------ ⋅ ( b + h )
4
L⋅I
E = -----------2
3
π⋅b⋅h
I = -------------------4
Id = I + A ⋅ d
2
Equations: Example:
Given: b=17.85_µm, h=78.9725_µin, d=.00000012_ft.
Solution: A=1.1249E–6_cm^2, C=7.9805E–3_cm, I=1.1315E–10_mm^4, J=9.0733E–9_mm^4,
Example:
Given: E= 4_J, L=15_mH.
Solution: I=23.0940_A.
Id=1.1330E–10_mm^4.
5-44 Equation Reference
Equation Reference 5-13
Conical Pendulum (10, 3)
DC Inductor Voltage (2, 14)
These equations approximate the dc voltage induced in an inductor by a change in current in a certain time interval.
Equations:
∆I
V = –V ⋅  ----- 
∆t
∆V = – If – Ii
∆t = tf – ti
Example:
Given: L=100_mH, V=52_V, ∆t=32_µs, Ii=23_A, ti=0_s.
Solution: ∆I= -0.0166_A, If=22.9834_A, tf=32_µs.
Equations:
ω =
g
-h
h = L ⋅ C OS ( θ )
2⋅π
T = ----------
ω
RC Transient (2, 15)
ω = 2⋅π⋅f
Example:
Given: L=25_cm, h=20_cm.
Solution: θ=36.899_°, T= 0.8973_s, ω=7.0024 r/s, f=1.1145_Hz.
Torsional Pendulum (10, 4)
Equation:
V = Vf – ( Vf – Vi ) ⋅ e
–t
-----------R⋅C
Example:
Given: Vi=0_V, C=50_µF, Vf=10_V, R=100_ω, t=2_ms.
Solution: V=3.2968_V.
RL Transient (2, 16)
Equations:
w =
G⋅J
----------L⋅I
2⋅π
T = ----------
ω
ω = 2⋅π⋅f
Example:
Given: G=1000_kPa, J=17_mm^4, L=26_cm, I=50_kg∗m^2.
Solution: ω=1.1435E°–3_r/s, f=1.8200E–4_Hz, T=5494.4862_s.
Simple Harmonic (10, 5)
Equation:
Equations:
x = x m ⋅ C OS ( ω ⋅ t + φ )
2
a = – ω ⋅ x m ⋅ C OS ( ω ⋅ t + φ )
–t ⋅ R
------------- 
1 
L
I = ---- ⋅  Vf – ( Vf – Vi ) ⋅ e

R 

v = –ω ⋅ x m ⋅ S IN( ω ⋅ t + φ )
ω = 2⋅π⋅f
Example:
Given: Vi=0_V, Vf=5_V, R=50_ω, L=50_mH, t=75_µs.
5-42 Equation Reference
Equation Reference 5-15
Example:
Given: ∈r=1, ro=1_cm, ri=.999_cm, L=10_cm.
Solution: C=0.0056_µF.
Solenoid Inductance (2, 20)
Equations:
1 1
1
--- + --- = --u v
f
1
1 1
--- = ( n – 1 ) ⋅  ----- – ----- 
 r1 r2 
f
–v
m = -----u
Example:
Given: r1=5_cm, r2=20_cm, n=1.5, u=50_cm.
Solution: f=13.3333_cm, v=18.1818_cm, m= -0.3636.
Equation:
2
L = µ0 ⋅ µr ⋅ n ⋅ A ⋅ h
Oscillations (10)
Variable
Description
ω
Angular frequency
φ
Phase angle
θ
Cone angle
a
Acceleration at t
f
Frequency
G
Shear modulus of elasticity
h
Cone height
I
Moment of inertia
J
Polar moment of inertia
k
Spring constant
L
Length of pendulum
m
Mass
t
Time
T
Period
v
Velocity at t
x
Displacement at t
xm
Displace amplitude
Example:
Given: µr=2.5, n=40_1/cm, A= .2_cm^2, h=3_cm.
Solution: L=0.0302_mH.
Toroid Inductance (2, 21)
Equation:
2
µ0 ⋅ µr ⋅ N ⋅ h
ro
L = ------------------------------------ ⋅ LN ---- 
 ri 
2⋅π
Example:
Given: µr=1, N=5000, h=2_cm, ri= .2_cm, ro=4_cm.
Solution: L=69.3147_mH.
Reference: 3.
5-40 Equation Reference
Equation Reference 5-17
Critical Angle (9, 2)
Variable
Re
v1, v2
Description
Reynolds number
Initial and final velocities
vavg
Average velocity
W
Power input
y1, y2
Initial and final heights
References: 3,6,9.
Equation:
n1
S IN( θ c ) = ----n2
Pressure at Depth (3, 1)
This equation describes hydrostatic pressure for an incompressible fluid. Depth h is positive downwards from the
reference.
Example:
Given: n1=1, n2=1.5.
Solution: θc=41.8103_°.
Brewster’s Law (9, 3)
The Brewster angle is the angle of incidence at which the reflected wave is completely polarized.
Equation:
P = P0 + ρ ⋅ g ⋅ h
Example:
Given: h=100_m, ρ=1025.1817_kg/m^3, P0=1_atm.
Equations:
n2
TA N( θ B ) = ----n1
θ B + θ 2 = 90
Solution: P=1106.6848_kPa.
Bernoulli Equation (3, 2)
Example:
Given: n1=1, n2=1.5.
These equations represent the streamlined flow of an incompressible fluid.
Solution: θ B=56.3099_°, θ 2=33.6901_°.
5-38 Equation Reference
Equation Reference 5-19
Angular Motion (8, 4)
Example:
Equations:
2
1
θ = θ 0 + ω 0 ⋅ t + -- ⋅ α ⋅ t
2
1
θ = θ 0 + -- ⋅ ( ω 0 + ω ) ⋅ t
2
2
1
θ = θ 0 + ω ⋅ t + -- ⋅ α ⋅ t
2
ω = ω 0 +α ⋅ t
Example:
Given: P2=30_psi, P1=65_psi, y2=100_ft, y1=0_ft, ρ=64_lb/ft^3, D1=24_in, hL=2.0_ft^2/s^2, W=25_hp,
v1=100_ft / s.
Solution: Q=18849.5559_ft^3/min, M=1206371.5790_lb/min, ∆P=-35_psi, ∆y=100_ft, v2=93.1269_ft /s,
A1=452.3893_in^2, A2=485.7773_in^2, D2=24.8699_in.
Flow in Full Pipes (3, 4)
Given: Θ 0=0_°, ω0=0_r/min, α=1.5_r/min^2, t=30_s.
Solution: Θ =10.7430_°, ω= 0.7500_r/min.
These equations adapt Bernoulli’s equation for flow in a round, full pipe, including power input (or output) and
frictional losses. (See “FANNING” in Chapter 3.)
Circular Motion (8, 5)
Equations:
2
v
a r = ---r
v
r
ω = --
ω = 2⋅π⋅N
Example:
Given: r=25_in, v=2500_ft/s
Solution: ω=72000_r/min, ar=3000000_ft/s^2, N=11459.1559_rpm.
Equations:
2
Terminal Velocity (8, 6)
Equation:
2
L
⋅D
∆P
ΣK
ρ ⋅ π
-------------- ⋅ v a vg ⋅  ------ + g ⋅ ∆y + v a v g ⋅  2 ⋅ f ⋅  ---  + -------   = W
 4 
ρ

 D
2 
∆P = P2 – P1
v =
2⋅m⋅g
----------------------Cd ⋅ ρ ⋅ A
Example:
Given: Cd=0.15, ρ=0.025lb/ft^3, A=100000_in^2, m=1250_lb.
∆y = y 2 – y 1
2
Q = A ⋅ va vg
π⋅D
A = -------------4
M =ρ ⋅Q
D ⋅ va vg ⋅ ρ
R e = ----------------------------
µ
n = -µ-
ρ
Example:
Solution: v=1757.4709_ft/s.
Given: ρ=62.4_lb/ft^3, D=12_in, vavg= 8_ft/s, P2=15_psi, P1=20_psi, y2=40_ft, y1=0_ft,
µ=0.00002_lbf∗s/ft^2, ΣK=2.25, ∈=0.02_in, L=250_ft.
Escape Velocity (8, 7)
Solution: ∆P=-5_psi, ∆y=40_ft, A=113.0973_in^2, n=1.0312_ft^2/s, Q=376.9911_ft^3/min,
M=23524.2358_lb/min, W=25.8897_hp, Re=775780.5.
Equation:
v =
2⋅G⋅M
--------------------R
Forces and Energy (4)
Variable
Example:
Given: M=1.5E23_lb, R=5000_mi.
Solution: v=3485.1106_ft/s.
Angular acceleration
ω
Angular acceleration
ωi,ωf
5-36 Equation Reference
Description
α
Initial and final angular velocities
ρ
Fluid density
τ
Torque
Θ
Angular displacement
α
Acceleration
Equation Reference 5-21
Angular Mechanics (4, 2)
Motion (8)
Variable
Equations:
Description
2
1
Ki = --- ⋅ I ⋅ ω i
2
τ = I⋅α
W = Kf – Ki
P =τ ⋅ ω
2
1
Kf = -- ⋅ I ⋅ ω f
2
W
Pa v g = ----t
W = r ⋅Θ
ω f = ω i +α ⋅ t
α
Angular acceleration
ω
Angular velocity (Circular Motion), or
Angular velocity at t (Angular Motion)
ω0
Initial angular velocity
ρ
Fluid density
Solution: r=1.1017E–3_ft_∗lbf, Ki=0_ft∗lbf, W=6.9221E–3_ft∗lbf, Kf=6.9221E–3_ft∗lbf,
θ
Angular position at t
at=8.5069E–4_ft/s^2, Ni=0_rpm, ωf=11.4868_r/min, t=1.0940_min, Nf=1.8282_rpm, Pavg=1.9174E–7_hp.
Initial angular position (Angular Motion), or
Initial vertical angel (Projectile Motion)
Centripetal Force (4, 3)
a
Acceleration
Equations:
A
Projected horizontal area
θ0
ω = 2⋅π⋅N
at = α ⋅ r
ω i = 2 ⋅ π ⋅ Ni
Example:
Given: I=1750_lb∗in^2, Θ =360_°, r=3.5_in, α=10.5_r/min^2, ωi=0_r / s.
2
F = m ⋅ω ⋅ r
v
ω = -r
2
v
a r = ---r
ar
Centripetal acceleration at r
Cd
Drag coefficient
m
Mass
M
Planet mass
N
Rotational speed
Hooke’s Law (4, 4)
R
Horizontal range (Projectile Motion), or
The force is that exerted by the spring.
r
t
Time
v
Velocity at t (linear Motion), or
Tangential velocity at r (Circular Motion), or
Terminal velocity (Terminal Velocity), or
Escape velocity (Escape Velocity)
v0
Initial velocity
vx
Horizontal component of velocity at t
vy
Vertical component of velocity at t
ω f = 2 ⋅ π ⋅ Nf
ω = 2⋅π⋅N
Example:
Given: m=1_kg, r=5_cm, N=2000_Hz.
Solution: ω=12566.3706_r/s, ar=7895683.5209_m/s, F=7895683.5209_N, v=628.3185_m/s.
Equations:
F = –k ⋅ x
–1
2
W = ------ ⋅ k ⋅ x
2
x
Horizontal position at t
x0
Initial horizontal position
Given: k=1725_lbf/in, x=125_in.
y
Vertical position at t
Solution: F=-2156.25_lbf, W=-112.3047_ft∗lbf.
y0
Initial vertical position
Example:
Reference: 3.
5-34 Equation Reference
Equation Reference 5-23
Straight Wire (7, 1)
Gases (5)
The magnetic field calculation differs depending upon whether the point is inside or outside the wire.
Variable
Equation:
0⋅ r⋅I
----------B = -µ-----------µ
2⋅π⋅r
λ
Mean free path
ρ
Flow density
ρ0
Stagnation density
A
Flow area
At
Throat area
d
Molecular diameter
k
Specific heat ratio
M
Mach number
m
Mass
MW
Example:
Given: µr=1, rw= 0.25_cm, r=0.2_cm, I=25_A.
Solution: B= 0.0016_T.
Description
Molecular weight
n
Number of moles, or
Polytropic constant (Polytropic Processes)
P
Force between Wires (7, 2)
Pressure, or Flow pressure (Isentropic Flow)
P0
Stagnation pressure
The force between wires is positive for an attractive force (for currents having the same sign).
Pc
Pi, Pf
T
Stagnation temperature
Tc
Pseudocritical temperature
V
Vi, Vf
0 ⋅ r ⋅ L ⋅ Ib ⋅ Ia
------------µ
-------------------------------Fba = µ
2⋅π⋅d
Example:
Given: Ia=10_A, Ib=20_A, µr=1, L=50_cm, d=1_cm.
Solution: Fba=2.0000E–3_N.
Temperature, or Flow temperature (Isentropic Flow)
T0
Ti, Tf
Equation:
Pseudocritical pressure
Initial and final pressures
vrms
W
Initial and final temperature
Volume
Initial and final volumes
Root-mean-square (rms) velocity
Work
References:1, 3.
Ideal Gas Law (5, 1)
Equations:
P⋅V = n⋅R⋅T
5-32 Equation Reference
m = n ⋅ MW
Equation Reference 5-25
Convection (6, 4)
Equations:
Equations:
q = h ⋅ A ⋅ ∆T
k
-----------
q = h ⋅ A ⋅ ( Th – Tc )
P
T k–1
------ =  ------ 
P0
T0
T
2
------ = -------------------------------------2T0
2 + (k – 1 ) ⋅ M
1
-----------
Example:
T k–1
--ρ
---- =  ------ 
 T0 
ρ0
Given: Tc= 300_K, A=200_m^2, h=0.005_W/(m^2∗K), q=10_W.
Solution: ∆T=10_°C, Th=36.8500_°C.
Conduction + Convection (6, 5)
If you have fewer than three layers, give the extra layers a zero thickness and any nonzero conductivity. The two
temperatures are fluid temperatures – if instead you know a surface temperature, set the corresponding convective
coefficient to 10499.
k+1
-----------------------
2 ⋅ (k – 1)
2
A
1
2
k–1
----- = ---- ⋅  ----------- ⋅  1 + ----------- ⋅ M  

At
M k+1 
2
Example:
Given: k=2, M=.9, T0=26.85_°C, T=373.15_K, ρ0=100_kg/m^3, P0=100_kPa, A=1_cm^2.
Solution: P=464.1152_kPa, At=0.9928_cm^2, ρ=215.4333_kg/m^3.
Real Gas Law (5, 6)
These equations adapt the ideal gas law to emulate real-gas behavior. (See “ZFACTOR” in Chapter 3.)
Equations:
P⋅V = n⋅Z⋅R⋅T
m = n ⋅ MW
Example:
Given: Pc=48_atm, Tc=298_K, P=5_kPa, V=10_1, MW=64_g/gmol, T=75_°C.
Equations:
A ⋅ ∆T
q = -----------------------------------------------------------1 L1 L2 L3 1
------ + ------- + ------- + ------- + -----h1 k1 k2 k3 h3
q
U = ---------------A ⋅ ∆T
A ⋅ ( Th – Tc )
q = -----------------------------------------------------------1 L1 L2 L3 1
------ + ------- + ------- + ------- + -----h1 k1 k2 k3 h3
q
U = --------------------------------A ⋅ ( Th – Tc )
Solution: n=0.0173_gmol, m=1.1057E–3_kg.
Real Gas State Change (5, 7)
This equation adapts the ideal gas state-change equation to emulate real-gas behavior. (See “ZFACTOR” in Chapter
3.)
Equation:
Example:
Given: ∆T=35_°C, Th=55_°C, A=10_m^2, h1=0.05_W/(m^2∗K), h3=0.05_W/(m^2∗K), L1=3_cm,
L2=5_cm, L3=3_cm, k1=0.1_W/ (m∗K), k2=.5_W/ (m∗K), k3=0.1_W/ (m∗K).
Solution: Tc=20_°C, U=0.0246_W/ (m^2∗K), q=8.5995_W.
Pf ⋅ Vf
Pi ⋅ Vi
---------------- = ---------------Zf ⋅ Tf
Zi ⋅ Ti
Example:
Given: Pc=48_atm, Pi=100_kPa, Pf=50_kPa, Ti=75_°C, Tc=298_K, Vi=10_1, Tf=250_°C.
(Remember Zf and Zi are automatically calculated using these variables)
Solution: Vf=30.1703_l.
5-30 Equation Reference
Equation Reference 5-27
•
A Local label is a label that is only accessible in a local section like local variables in Pascal or C.
A local section starts at the beginning of a source, after a global label or after a link (see link section).
A local section finishes at the end of a source, before a link or before a global label.
A local label is identified by a ‘.’ as the first character.
A link label is a label that exists only in the link where it is declared, like a private clause in Object Pascal.
A link label is identified by a ‘…’ as the first character.
Rectangle (11, 3)
Notes:
1. In projects, using fewer global labels is better because a global label takes longer to compile and because it gives
a better program structure. A good habit is to use global labels to cut the program in subroutines, and to use
local labels inside these subroutines.
2. The command line editor is able to find labels in a source. See the GOTO selection in the command line TOOL
Equations:
3
A = b⋅h
3. Labels in System RPL should only be used by people who know what they are doing. They are only used for
4. Labels can not be given the same name as constants.
“extable”
“extable” is an external library that contains a list of constants. This list can be used by MASD as a basic list of
constants and is especially useful to the System RPL programmer as most entry points are defined there (like
TURNMENUOFF for example). In addition, it also contains a set of supported constants and ASM entry points
library.
P = 2⋅b+2⋅h
b⋅h
2
2
J = ---------- ⋅ ( b + h )
12
b⋅h
I = ------------12
Id = I + A ⋅ d
2
Example:
Given: b=4_chain, h=7_rd, d=39.26_in. Set guesses for I, J, and Id in km^4.
Solution: A=28328108.2691_cm^2, P=23134.3662_cm, I=2.9257E–7_km^4, J=1.8211E–6_km^4, Id=2.9539E–
7_km^4.
Regular Polygon (11, 4)
Constants
Constants are a way for the user to associate a value to an alphanumerical name. This is extremely useful as it makes
programs much easier to read and makes them more portable. One of the most popular ways to use constants is to
represent memory address for storage of variables.
For example, instead of typing D1=80100 every time it is needed, it is better to declare DC Result
80100 at the beginning of the project and then to type D1=(5)Result when needed (it is more portable,
more readable and less likely to cause errors).
You can create a constant in ASM or ARM mode by doing:
DC CstName ExpressionHex or
DEFINE CstName ExpressionHex or
EQU CstName ExpressionHex
In RPL mode, the only valid way to define a constant is:
EQU CstName ExpressionHex
ExpressionHex is either a hexadecimal number or an expression (starting with a char that can not be
confused with the start of a hex number (0…9, A…F). An expression starting with a hexadecimal number can be
typed with a leading \$, an expression starting with a decimal number can be typed with a leading # character. For
an expression starting with a constant that starts with a A...9 or A...F character, you should put the constant in
brackets.
Equations:
2
1
-- ⋅ n ⋅ L
4
A = ----------------------------180
T A N  -------- 
n
L
--2
r v = -------------------------180

S I N  -------- 
n
P = n⋅L
n–2
θ = ----------- ⋅ 180
n
L
--2
r s = ---------------------------180
T A N  -------- 
n
360
β = -------n
Example:
Given: n=8, L= 0.5_yd.
Solution: A=10092.9501_cm^2, P=365.7600_cm, rs=55.1889_cm, rv=59.7361, θ=135_°, β =45_°.
Notes:
1. A constant cannot be given the same name as a label.
2. The name of a constant follows the same rules as the name of a label.
6-14 The Development Library
Equation Reference 5-45
Directives change the way MASD interprets your source. Theses directives begin with a ! and will be explained
later.
Solid Geometry (12)
Errors
If MASD detects one or more syntax error, it will push a list describing all errors on the stack. The ER command
can help you make sense of that list, point you on the errors and let you correct them.
Variable
Description
A
Total surface area
The ER command takes 2 objects as arguments:
The original source code (level 2)
The error list generated by MASD (level 1)
b
Base length
d
Distance to rotation axis in z direction
Normally, you should compile using a process similar to: IFERR ASM THEN ER END (this is what the
ASM2 command does, by the way). Most people will just type the ASM command followed, if error, by the ER
command.
h
Height in z direction (Cone, Cylinder), or
Height in y direction (Parallelepiped)
MASD will report a maximum of 16 errors before stopping compilation.
Format of the error list
It’s a list of at most 16 sub-lists. Each sub-list contains 3 system-binary and 1 global-name. The first system binary is
an error message number. The second is an extra system binary used to indicate how ‘too long’ a jump is. The third
one is the position in the source where the error is. The global name is either a NULLNAME if the error was in the
main source or the filename of the buggy source.
Error messages
Message
Invalid File
Too many
Unknown Instruction
Invalid Field
Val betw 0-15 expected
Val betw 1-16 expected
Val betw 1-8 expected
Label Expected
Hexa Expected
Decimal Expected
Can't find
{ expected
} expected
( expected
[ or ] expected
Forbidden
Insuffisant Memory
Matrix Error
6-12 The Development Library
Description
The file is not a valid source or macro. (must end with a @)
You can not do this operation as you are limited to a certain
amount of them (for example, you can not have more than 64
simultaneous skips)
Unknown instruction
Incorrect field
An integer between 0 and 15 is expected
An integer between 1 and 16 is expected
An integer between 1 and 8 is expected
A label is expected
An decimal number is expected
This object can not be located
This name is already in use
A { character was expected
A } character was expected (this can happen if you do not
close all the open skips for example)
A ( character was expected
A [ or ] character was expected
This can not be done
This expression is invalid
This jump is above the limit of the instruction (use a different
type of jump)
There is not enough memory to compile
You can not do this thing here because you are creating a
matrix object
I, Ixx
Moment of inertia about x axis
Id
Moment of inertia in x direction at d
Izz
Moment of inertia about z axis
m
Mass
r
t
Thickness in z direction
V
Volume
Reference: 4.
Cone (12, 1)
Equations:
2
2
2
π 2
A = π⋅r +π⋅r⋅ r +h
V = --- ⋅ r ⋅ h
3
3
2
3
2
3
2
Izz = ------ ⋅ m ⋅ r
Ixx = ------ ⋅ m ⋅ r + ------ ⋅ m ⋅ h
10
20
80
Id = Ixx + m ⋅ d
2
Example:
Given: r=7_cm, h=12.5_cm, m=12.25_kg, d=3.5_cm.
Solution: V=641.4085_cm^3, A=468.9953_cm^2, Izz=0.0162_kg∗m^2, Izz=0.0180_ kg∗m^2,
Id=0.0312_ kg∗m^2.
Equation Reference 5-47
Extension program
Sphere (12, 4)
It is possible to enhance some of the statistics menus using a user library. The calculator does not provide every
possible function in every area, but they let you customize the built in menu in order to add your functions as if they
were built in.
Example: Customize the main statistic menu.
Ensure you are in RPL mode (H, W, `) and attach the development library (256 ATTACH).
In a directory, create the following variables:
\$ROMID 1324
\$CONFIG 1
\$TITLE "Statistic enhancements"
\$HIDDEN { MessageHandler }
\$EXTPRG 'MessageHandler'
ABOUT "This library is a statistic enhancement example"
MessageHandler
«
»
Equations:
3
4
V = --- ⋅ π ⋅ r
3
A = 4⋅π⋅r
2
2
2
I = --- ⋅ m ⋅ r
5
Id = I + m ⋅ d
2
Example:
Given: d=14_cm, m=3.75_kg, Id=486.5_lb∗in^2.
Solution: r=21.4273_cm, V=41208.7268_cm^3, A=5769.5719_cm^2, I=0.0689_kg∗m^2.
IF DUP 1 R~SB ==
THEN
SWAP
{ { "7.New entry" « "My Stats" 1 DISP 7 * FREEZE » } } +
SWAP
END
Create the library (CRLIB) and store it in an extension port (0 K). Now, run the statistic menu (@ 5)!
How does it work? Each time the stat menu pops up, the calculator executes every extension program of every
library in the system. This extension program takes on the stack a message number (and leaves it on the stack!).
Each message number has a specific meaning as described below.
Here are the expected inputs and outputs for the extension program for different menus:
Input:
Output:
{ { "String" Action } ... } ZERO
Modified list ZERO
Input:
{ { "String" Action } ... } ONE
Output:
Modified list ONE
Input:
{ { "String" Action } ... } TWO
Output:
Modified list TWO
Input:
{ { "String" Action } ... } THREE
Output:
Modified list THREE
Input:
{ { "String" Action } ... } FOUR
Output:
Modified list FOUR
Input:
{ { "String" Action } ... } FIVE
Output:
Modified list FIVE
6-10 The Development Library
Equation Reference 5-49
Input/Output:
Level 1/Item 1
Variable
→
¤n
Js
→
#n
Level 1/Argument 1
#n
Example:
SERIAL
Description:
¤n
#EC2Ah SB~B returns ¤ EC2Ah.
Serial number command: Retrieves the calculator serial number. This is the software serial
number and does not match the hardware serial number printed on the back of the calculator, but
it is typically similar.
Input/Output:
Level 1/Argument 1
Example:
Level 1/Item 1
→
“string”
SERIAL may return "HP50 Serial Number: CNA6110007".
S→
→H
Description:
String to hex command: Returns the hex representation of the characters of a string.
Input/Output:
Level 1/Argument 1
“string1”
Example:
S~N
Description:
Level 1/Item 1
→
“string2”
"A" S→H returns "14".
String to name conversion command: Converts a string to a name and a name to a string. This
command allows you to create invalid names, such as a null name.
Do not purge or move the null directory in HOME. Do not modify data in this directory.
Level 1/Argument 1
Level 1/Item 1
“string”
→
'global'
'global'
→
“string”
Description:
String reverse command: Gives the mirror image of a string.
Input/Output:
Level 1/Argument 1
→S2
Description:
P-side doping (PN Step Junctions), or
Substrate doping (NMOS Transistors)
ND
N-side doping (PN Step Junctions), or
N-channel doping (JFETs)
T
“string1”
"ABC" SREV returns "CBA".
→
“string2”
Temperature
tox
Gate silicon dioxide thickness
Va
Applied voltage
VBC
Base-to-collector voltage
VBE
Base-to-emitter voltage
Vbi
VBS
Built-in voltage
Substrate voltage
Collector-to-emitter saturation voltage
VDS
Applied drain voltage
VDsat
Saturation voltage
VGS
Applied gate voltage
Vt
Threshold voltage
Vt0
Threshold voltage (at zero substrate voltage)
W
Drawn mask width (PN Step Junctions), or
Drawn width (NMOS Transistors), or
Channel width (JFETs)
We
Effective width
xd
Depletion-region width
xdmax
Level 1/Item 1
Drawn mask length (PN Step Junctions), or
Drawn gate length (NMOS Transistors), or
Channel length (JFETs)
Effectives gate length
NA
"" S~N returns ''.
SREV
Example:
Le
VCEsat
Input/Output:
Example:
L
Description
Saturation current density
xj
Depletion-layer width
Junction depth
References: 5, 8.
Decompilation command: Decompiles an object in System RPL mode. If the “extable” library is
installed, it will use the table to lookup the proper mnemonics for all known System RPL
commands.
Input/Output:
Level 1/Argument 1
obj
6-8 The Development Library
Level 1/Item 1
→
“string”
Equation Reference 5-51
Example:
32.5 LR~R returns 3.25E1.
NMOS Transistors (13, 2)
→LST
Description:
Create symbolic command: This is equivalent to the RPL →LIST command, but it can also
convert a program or symbolic to a list.
Input/Output:
Example:
Leveln+1/Argument1 7Level2/Argumentn
Level1/Argumentn+1
obj1 … objn
n
→
{obj1, ...,objn}
obj1, ...,objn
→
{obj1, ...,objn}
Level 1/Item 1
These equations for a silicon NMOS transistor use a two-port network model. They include linear and nonlinear
regions in the device characteristics and are based on a gradual-channel approximation (the electric fields in the
direction of current flow are small compared to those perpendicular to the flow). The drain current and
transconductance calculations differ depending on whether the transistor is in the linear, saturated, or cutoff region.
The equations assume the physical geometry of the device is a rectangle, second-order length-parameter effects are
negligible, shot-channel, hot-carrier, and velocity-saturation effects are negligible, and subthreshold currents are
negligible. ( See “SIDENS” in Chapter 3.)
« 3 2 + » →LST returns { « 3 2 + » }.
MAKESTR
Description:
String creation command: Creates a test string of the given size.
Input/Output:
Level 1/Argument 1
Example:
PEEK
Description:
n
10 MAKESTR returns "ABCDEFGAB".
Level 1/Item 1
→
“string”
Equations:
Due to bank switching, the data read from address #40000h to #7FFFFh may not be accurate.
Level 2 must contain the address to read and level 1 must contain the number of nibbles to read.
Input/Output:
Level 2/Argument 1
Example:
PEEKARM
Description:
Level 1/Argument 2
space.
Level 2 must contain the address to read and level 1 must contain the number of bytes to read.
Input/Output:
Example:
POKE
Description:
Level 1/Argument 2
Level 1/Item 1
→
#n1
#n2
“string”
#7300000h #4h PEEKARM returns a string with eight hex characters.
L e = L – 2 ⋅ ∆L
2 ⋅ si ⋅ 0 ⋅ q ⋅ NA
γ = ------------ε------------ε-------------------------Cox
Level 1/Item 1
→
#n1
#n2
“string”
#80711h #10h PEEK returns a string with sixteen hex characters.
Level 2/Argument 1
ε ox ⋅ ε 0
C o x = -------------------to x
2
We
VDS
I D S = C o x ⋅ µ n ⋅  -------- ⋅  ( V G S – V t ) ⋅ V D S – --------------  ⋅ ( 1 + λ ⋅ V D S )
Le
2
W e = W – 2 ⋅ ∆W
Vt = Vt0 + γ ⋅ ( 2 ⋅ ABS( φ p ) – A BS(VBS ) – 2 ⋅ ABS( φ p ))
⋅
q
–k T
NA
φ p = ------------- ⋅ L N  --------
gm =
ni
gd s = IDS ⋅ λ
We
C o x ⋅ µ m ⋅  -------- ⋅ ( 1 + λ ⋅ V D S ) ⋅ 2 ⋅ I D S
Le
VDsat = VGS – V t
Example:
Given: tox=700_Å, NA=1E15_1/cm^3, µn=600_cm^2/ (V∗s), T=26.85_°C, Vt0=0.75_V, VGS=5_V,
VBS=0_V, VDS=5_V, W=25_µ, ∆W=1_µ, L=4_m, ∆L=0.75_µ, λ=0.05_1/V.
Solution: We=23_µ, Le=2.5_µ, Cox=49330.4750_pF/cm^2, γ =0.3725_V^.5, φp= -.2898_V, Vt=0.75_V,
VDsat=4.25_V, IDS=3.0741_mA, gds=1.5370E–4_S, gm=1.4466_mA/V.
Memory write command: Writes nibbles to a specified address in memory.
You can not write data in the Flash ROM using this command.
Writing data in memory randomly can cause all memory to be lost.
Input/Output:
Level 2/Argument 1
Level 1/Argument 2
Level 1/Item 1
→
Example:
“string”
#n
"8" #100h POKE writes the hex digit 8 to memory address 0x100.
6-6 The Development Library
Equation Reference 5-53
→CD
Description:
Hex to code command: Returns the code (Assembly program) object represented by an hex
string.
A hex string is a string that only contains the characters ‘0’ to ‘9’ and ‘A’ to ‘F’.
Input/Output:
Level 1/Argument 1
Example:
Level 1/Item 1
→
Code
"8F507621301641468…" →CD returns Code.
“string”
COMP→
→
Description:
Composite out command: This is equivalent to the RPL LIST→ command, but it also works on
Program and Symbolic objects.
Equations:
k⋅T
ND
V b i = ---------- ⋅ L N  --------
q
ni
Input/Output:
Level 1/Argument 1
Example:
CRC
Description:
Leveln+1/Item1 ...
Level2/Itemn
Level1/Itemn+1
objn
n
→
obj1, ...,objn
obj1 ...
« 3 2 + » COMP→ returns «, 3, 2, +, », 5.
CRC computation command: Gives the CRC of a library or a string as a system binary.
This command gives you the CRC of the data in a library object or string (the CRC computation
starts on the size of the object and finishes 4 nibbles before the end of the object).
Input/Output:
Description:
Level 1/Item 1
→
¤n
→
“string”
"D9D20003621113" CRC returns ¤ 8B63h.
¤n
Library Object
CRLIB
Level 1/Item 1
→
Description:

 2 2 ⋅ s i ⋅ 0
I D = G 0 ⋅  V D S –  -- ⋅ --------ε------------ε-----2

 3 q ⋅ ND ⋅ a 
3
3
---

2
2
( Vbi – VGS + VD S ) – ( Vb i – VG S) 


q ⋅ ND ⋅ a
V D s a t = -------------------------- – ( V b i – V G S )
2 ⋅ ε si ⋅ ε 0
2
q ⋅ ND ⋅ a
V t = V b i – ------------------------2 ⋅ ε si ⋅ ε 0
Example:
Create library command: Creates a library based on the variables in the current directory.
See the next section for details on the variables that must exist.
Level 1/Argument 1
ER
a⋅W
G 0 = q ⋅ N D ⋅ µ n ⋅  ------------
L


2 ⋅ ε si ⋅ ε 0
g m = G 0 ⋅  1 – -------------------------2- ⋅ ( V b i – V G S )


q ⋅ ND ⋅ a
Input/Output:
Example:
2 ⋅ ε si ⋅ ε 0
------------------------- ⋅ ( V b i – V G S + V D S )
q ⋅ ND
2
Level 1/Argument 1
Example:
xdm ax =
Given: ND=1E16_1/cm^3, W=6_µ, a=1_µ, L=2_µ, µn= 1248_cm^2/ (V∗s), VGS= -4_V, VDS=4_V,
T=26.85°C.
Solution: Vbi=0.3493_V, xdmax=1.0479_µ, G0=5.9986E–4_S, ID=0.2268_mA, VDsat=3.2537_V,
Vt= -7.2537_V, gm=0.1462_mA/V.
Library n
CRLIB may return Library 902: LONGFLOAT.
Error checker command: Starts an interactive error-checking session. Takes the output of a failed
run of ASM as input.
Input/Output:
H→
→
Description:
Level 2/Argument 1
Level 1/Argument 2
"string"
{error list}
Level 1/Item 1
→
"edited string"
Hex to object command: Returns the object represented by a hex string.
A hex string is a string that only contains the characters ‘0’ to ‘9’ and ‘A’ to ‘F’.
If the string does not represent a valid object, this can corrupt your memory.
6-4 The Development Library
Equation Reference 5-55
Normal Stress (14, 1)
Development Library Command Reference
A→
→
Description:
Input/Output:
Level 1/Argument 1
Example:
#n
#3A57Ch A→ returns SIN.
Level 1/Item 1
→
obj
→A
Description:
Input/Output:
Equations:
Level 1/Argument 1
→
Example:
A→
→H
Description:
σ = E⋅∈
Level 1/Item 1
obj
{ SIN } OBJ→ DROP →A returns #3A57Ch.
#n
δ
∈ = -L--
P
σ = --A
Example:
Given: P=40000_lbf, L=1_ft, A=3.14159265359_in^2, E=10E6_psi,
Solution: δ=0.0153_in, ∈ =0.0013, σ=12732.3954_psi.
Address to string command: Returns the hex representation of an address (you can then use this
with the POKE command).
The hex representation of an address is a 5 character string where the address is written
backwards.
Shear Stress (14, 2)
Input/Output:
Level 1/Argument 1
Example:
obj
#3A57Ch A→H returns "C75A3".
Level 1/Item 1
→
“string”
→ALG
Description:
Create symbolic command: This is equivalent to the RPL →LIST command, but it creates a
symbolic object.
This command will also convert a program or a list to a symbolic object.
Equations:
τ = G⋅γ
Input/Output:
Example 1:
Example 2:
Leveln+1/Argument1 7Level2/Argumentn
Level1/Argumentn+1
obj1 … objn
n
→
'symb'
{obj1, ...,objn}
→
'symb'
obj1, ...,objn
→
'symb'
Level 1/Item 1
'X' 2 ^ 4 + 5. →ALG returns 'X^2+4'.
{ 5 'A' * } →ALG returns '5*A'.
r⋅
γ = -------φ-L
T⋅r
τ = -----J----
Example:
Given: L=6_ft, r=2_in, J=10.4003897419_in^4, G=12000000_psi, τ =12000_psi.
Solution: T=5200.1949_ft∗lbf, φ=2.0626_°, γ =5.7296E–2_°.
Stress on an Element (14, 3)
Stresses and strains are positive in the directions shown.
APEEK
Description:
Input/Output:
Example:
Level 1/Argument 1
Level 1/Item 1
→
#n
#80711h APEEK returns the address of the home directory.
#n
6-2 The Development Library
Equation Reference 5-57
Waves (15)
Variable
Description
β
Sound level
λ
Wavelength
ω
Angular frequency
ρ
Density of medium
B
Bulk modulus of elasticity
f
Frequency
I
Sound intensity
k
Angular wave number
s
Longitudinal displacement at x and t
sm
Longitudinal amplitude
t
Time
v
Speed of sound in medium (Sound Waves), or
Wave speed (Transverse Waves, Longitudinal
Waves)
x
Position
y
Transverse displacement at x and t
ym
Transverse amplitude
Reference: 3.
Transverse Waves (15,1)
Equations:
y = y m ⋅ S IN( k ⋅ x – ω ⋅ t )
v = λ⋅f
2⋅π
k = ---------λ
ω = 2⋅π⋅f
Example:
Given: ym=6.37_cm, k=32.11_r/cm, x=.03_cm, ω=7000_r/s, t=1_s.
Solution: f= 1114.0846_Hz, λ=0.0020_cm, y=2.6655_cm, v=218.0006_cm/s.
Longitudinal Waves (15, 2)
Equations:
s = s m ⋅ C OS ( k ⋅ x – ω ⋅ t )
v = λ⋅f
2⋅π
k = ---------λ
ω = 2⋅π⋅f
Example:
Given: sm=6.37_cm, k=32.11_r/cm, x=0.03_cm, ω=7000_r/s, t=1_s.
Solution: s=5.7855_cm, v=2.1800_m/s, λ=0.1957_cm, f=1114.08456_Hz.
Equation Reference 5-59
Messages Listed Alphabetically (continued)
Message
Meaning
3. A constant value is stored in 16 nibbles.
# (hex)
Invalid N
Attempted to calculate I%YR with N < 1 or
N ≥ 1010.
E604
Invalid Name
send illegal filename.
C17
Invalid PPAR
PPAR not a list, or one or more objects in
list missing or invalid.
12E
Invalid PRTPAR
PRTPAR not a list, or one or more objects
in list missing or invalid.
C13
Invalid PTYPE
Plot type invalid for current equation.
620
Invalid PYR
PYR must be a positive real number.
E605
Invalid Repeat
Alarm repeat interval out of range.
D03
Invalid Server Cmd.
Invalid command received while in Server
mode.
C08
Invalid Syntax
Unable execute `, OBJ→, or STR→ due
to invalid object syntax.
106
Invalid Time
Time argument not real number in correct
format or out of range.
D02
Invalid Unit
Unit operation attempted with invalid or
undefined user unit.
B01
Invalid User Function
Type or structure of object executed as userdefined function was incorrect.
103
Invalid Σ Data
Statistics command executed with invalid
object stored in ΣDAT.
601
Invalid Σ Data LN(Neg)
Non-linear curve fit attempted when ΣDAT
matrix contained a negative element.
605
Invalid Σ Data LN(0)
Non-linear curve fit attempted when ΣDAT
matrix contained a 0 element.
606
Invalid ΣPAR
ΣPAR not list, or one or more objects in list
missing or invalid.
604
Invalid #Periods
AMRT requires a positive integer number of
periods.
E606
4. Having constants starting with something that can be interpreted as a hex number, or an ARM register is not a
good idea as the compiler might get confused. For example: DC SPFOO 4 MOV R4 SPFOO will
generate an error on FOO as the compiler will interpret the mov as a mov from SP to R4.
MASD introduces a ‘constant pointer’ called CP which helps to define constants. CP is defined by:
CP=ExpressionHex
CP is defined by 5 nibbles; its default value is 80100 (an area of memory that can be used freely by programmers).
To declare a constant with the current CP value and then increase CP by Increment:
EQUCP Increment ConstantName
Notes:
1. In ASM and ARM mode, DCCP Increment ConstantName is also valid
A-4 Error and Status Messages
2. Increment is a hexadecimal value, to use a decimal value, put a leading #.
For example, if CP equals to \$10, the following defines a Foo constant with a value of \$10 and then changes the
value of CP to \$15:
EQUCP 5 Foo
Several constants can be defined at once using CP.
: Inc CstName0 CstName1 ... CstNameN-1 :
The above defines N constants CstNamex with a value of CP+x*Inc and then changes the CP value to
CP+N*Inc. By default, Inc is a decimal number or an expression that can be immediately evaluated.
These features are extremely useful to define areas of memory for storage of ASM program variables.
Notes:
1. If the entry point library (see related section) is installed on your calculator, all the values in the constant library
will be available in your programs the same way than constants are.
2. You can define a constant in your program to override the value of an entry in the equation library.
Expressions
An expression is a mathematical operation that is calculated at compilation time. Terms of this operation are
hexadecimal or decimal values, constants or labels. An expression stops on a separation character or a ‘]’.
DCCP 5 @Data
...
D1=(5)@Data+\$10/#2
D0=(5)\$5+DUP
LC(5)"DUP"+#5
The above are correct expressions (provided that the entry point library is installed).
Notes:
•
•
•
•
A hexadecimal value must begin with a \$.
A decimal value may begin with a # or a number directly.
A & or (*) equals the offset of the current instruction in the program (This value has no meaning in
itself, but may be used to calculate the distance between a label and the current instruction). In absolute
mode, this represents the final address of the instruction.
The value of a label is the offset of the label in the program (This value has no meaning in itself, but may
be used to calculate the distance between a label and the current instruction). In absolute mode, this
represents the final address of the instruction.
The Development Library 6-15
-
Messages Listed Alphabetically (continued)
Message
Meaning
copied selected equation to stack.
# (hex)
In case of a list, only the first object of the list will be included following the previous rules
The syntax in ASM or ARM mode is: /FileName
Note: To know how MASD looks for the FileName file, see the following section.
Copied to stack
%²STK%
Current equation:
Identifies current equation.
608
Deleting Column
Matrix Writer application is deleting a row.
504
Deleting Row
Name of existing directory variable used as
argument.
MASD sometimes needs to find a file in the calculator’s memory. The file can be found either by specifying the file
name and location, or only the file name to be search in the directory search list.
503
The initial directory search list contains the current directory, and all parents directory up to the HOME directory.
Directory Not Allowed
Name of existing directory variable used as
argument.
12A
You can add a directory in the directory search list using !PATH+ RepName where RepName identifies a
directory name using filename rules.
Directory Recursion
Attempted to store a directory into itself.
002
Empty catalog
No data in current catalog (Equation,
Statistics, Alarm)
60D
Empty stack
The stack contains no data.
This root is followed by a list of directories, ending with the name of the file.
2/FOO/BAR/BRA specifies the BRA file in the BAR directory, stored in the FOO backup of port 2.
H/ME/YOU specifies the YOU file in the ME directory, in the HOMEDIR.
C15
Note: You cannot have more than 16 entries in the directory search path.
Enter alarm, press SET
Alarm entry prompt.
61A
623
Enter eqn, press NEW
Store new equation in EQ.
60A
Enter value (zoom out if
>1), press ENTER
Zoom operations prompt.
622
EQ Invalid for MINIT
EQ must contain at least two equations (or
programs) and two variables.
E403
Extremum
Result returned by HP Solve application or
ROOT is an extremum rather than a root.
A06
HALT Not Allowed
A program containing HALT executed
while Matrix Writer application, DRAW, or
HP Solve application active.
126
I%YR/PYR ‰ -100
Interest per period must be greater than
-100%
E603
Illegal During MROOT
Multiple-Equation Solver command
attempted during MROOT execution.
E406
A-2 Error and Status Messages
You can also include a complete object (prologue included) using INCLUDE or INCLOB. In ASM or ARM
mode, use INCLUDE or INCLOB followed by a filename to include an object, in RPL mode, use INCLOB.
Filename conventions
To specify a full path, use
H/ to specify HOMEDIR as the root.
x/ where x is a port number, to specify a port as root. Note: you cannot use 3 (SD card) here.
Compilation directive
The following instruction modifies the way MASD reacts and compiles things. They are valid in all modes:
Directive
Description
!PATH+ DirName
Add the specified directory in the search path list.
!NO CODE
MASD will not generate a \$02DCC prologue but will directly
output the data. If the generated file is not a valid object, an error
will be generated.
!DBGON
MASD will generate code when DISP or DISPKEY are found
in the source.
!DBGOFF
MASD will not generate code when DISP or DISPKEY are
found in the source.
!1-16
Switch to 1-16 mode.
!1-15
Switch to 0-15 mode.
!RPL
Switch to RPL mode.
!ASM
Switch to ASM mode.
!ARM
Switch to ARM mode.
!FL=0.a
Clear the a compilation flag.
!FL=1.a
Set the a compilation flag.
!?FL=0.a
Compile the end of the line if flag a is set.
!?FL=1.a
Compile the end of the line if flag a is clear.
Switch to absolute mode. The program begins at the address
Addr. Note: MASD always considers the prolog \$02DCC and
code length to be the beginning of the program even if !NO
CODE is set.
If in absolute mode, add blank nibbles to continue at the
specified address. If not possible, errors.
The Development Library 6-17
The Entry Point Library: Extable
Saturn ASM mode
The entry point library is an external library (you can get it from the HP web site) that contains a table of entry point
names and addresses. This is used by the MASD compiler to get the value of System RPL entry points or assembler
This section is only applicable to the Saturn ASM mode.
This library should be stored in port 0, 1 or 2. If you want to program in System RPL, you must install this library.
This library also contains 4 functions:
nop
This function is here for internal purposes and should not be used. Running this function does
nothing.
Input/Output: None
Description:
GETNAME
Description:
Looks up the name of an entry from its address.
As multiple entries might have the same address, GETNAME is not a bijective (one-to-one)
function.
Level 1/Argument 1
Description:
→
#n
#054AFh GETNAME returns "INNERCOMP".
Level 1/Item 1
“string”
Looks up the address of an entry from its name.
As multiple entries might have the same address, GETNAME is not a bijective (one-to-one)
function.
Level 1/Argument 1
GETNAMES
Description:
→
“string”
Level 1/Item 1
#n
64 bit registers
Giving a null string as an input will return a list of all the entry points.
Level 1/Argument 1
Level 1/Item 1
→
“string”
{“string1”, ...,“stringn”}
"COMP" GETNAMES returns { "COMPCONFCRC" "COMPEVAL" }.
Library 257
Library 257 is used by the development library but is also not attached by default. It provides three commands. asm
is identical to ASM in library 256 (ASM is a stub that calls asm), er is identical to ER in library 256 (ER is a stub that
calls er), and ASM2 calls asm and automatically calls er if there are errors.
6-42 The Development Library
If this represents the 16 nibbles of a 64 bit register, the fields cover the register as follows:
E
D
C
B
P
A
S
9
8
M
7
6
5
WP
4
3
2
XS
A
1
0
B
X
The P field location depends of the value of the 4 bit P register (i.e. you can move it), and so does the WP field.
Please look at the instruction set to see what instructions are available to the programmer. We will usually write “Rf”
to indicate a register (uppercase) and a field (lowercase), as in Am.
In addition, in the new simulated Saturn architecture, 7 new fields F1 to F7 have been introduced. You can define
the field mask by using the SETFLDn where n is a number between 1 and 7 to define the field Fn using the mask
in Cw as in this example:
Input/Output:
Example:
In addition, there are 16 flags ST0 to ST15 (12-15 being reserved for the system) that are 1 bit registers that are
accessible separately, a carry that is set when operation overflow or tests are validated and can be tested using the
GOC (Go On Carry) and GONC (Go On No Carry) jump instruction, a decimal/hexadecimal mode (SETHEX
and SETDEC) that affects the way + and – instructions on the A, B, C and D register works (default Is HEX), and
a 8 level return stack for GOSUBs (and RTN).
F
Input/Output:
Example:
The Saturn CPU has 12 main registers:
A, B, C, D, R0, R1, R2, R3 and R4 are 64 bits register (see description below),
D0 and D1 are 20 bits pointers (you can only access memory through them, the Saturn is a little endian),
PC, 20 bit program counter.
Most operations on 64 bit registers will act on a specific “field”. A field is a division in a 64 bit register.
Input/Output:
Example:
CPU architecture
This section’s purpose is to make experienced ASM programmers familiar with the Saturn architecture, not to teach
anyone to program in Saturn ASM.
LC FF000000000000FF SETFLD1
LA 123456789ABCDEF0
LC 0FEDCBA987654321
A=A!C.F1
A is now equal to:
1F3456789ABCDEF1
ie: the instruction on F fields equate to:
These new fields are available for all instructions that previously used the so called ‘f’ encoding and includes the
following instructions:
Reg=Reg&Reg.f, Reg=Reg!Reg.f, DATx=Reg.f, Reg=DATx.f, Reg=Reg+Cte.f, Reg=Reg-Cte.f, RegSRB.f,
RReg=Reg.f, Reg=RReg.f and RegRRegEX.f.
The Development Library 6-19
LDRB R6 [R1 2408]
ORR R6 R6 1
STRB R6 [R1 2408]
LDMIA sp! {R4 R5 R6 R7 R8 PC}
!ASM
*end
}
C=RSTK D0=C
D1=80100
% set the flag ST0
% restore all registers and return
% back in ASM mode
LC(5) end-start MOVEDN
C=0.B SETLNED
D0 points to ARM instruction
D1 points at a place where
I can copy the program
copy n nibbles
D1=8229E
% point on 2Kb free memory
LC A9 A=0.W A-1.W { DAT1=A.W D1+16 C-1.B UPNC } % paint it in black
D0=00120 LC 8229E DAT0=C.A
% point the screen to that memory
D0=C
% D0 points to that memory
A+A.S SKNC { D0+1 A+1.S }
C=0.W LC 40 B+C.W
C=RSTK C-1.B UPNC
}
D0+2
C=0.W LC 66 D+C.W
C=R3.W C-1.B R3=C.W UPNC
}
LC FF OUT=C { C=IN2 ?C=0.B UP }
{ C=IN2 ?C#0.B UP }
INTON
LC 10 SETLNED
SCREEN CD0EX D0=00120 DAT0=C.A
ENDCODE
;
@"
SKIPS instructions
{ ... }
%
%
%
%
LC FFFFEFFF D=C.W
LC 4F R3=C.B
{
C=0.W LC 1800 C=-C.W B=C.W
LC 82
A=0.S A+1.S
{
RSTK=C
LC 80100 ARMSAT
?ST=0.0
{
C=DAT0.S C-A.S DAT0=C.S
}
The foundation of Skips is the Block structure. A block is enclosed in { and }, and can be nested within another
block. The following instructions deal with blocks.
% D=Y=-1
% loop 80 times
% B=X=-1.5
% loop 131 times
% set bit 0 in As
% save loop counter in RSTK
% evaluate the ARM code
% if point is in the set, do nothing
SKIP { ... }
SKIPL { ... }
SKIPC { ... }
SKC {... }
SKIPNC {... }
SKNC { ... }
Test SKIPYES {... }
Test { ... }
Test { ... }
Test -> { ... }
SKUB { ... }
SKUBL { ... }
STRING { ... }
CODE { ... }
STROBJ \$PROLOG { ... }
% else, turn the pixel off
% next pixel
% increment X
% count down and loop
% next graphic line
% increment Y
% count down and loop
%
%
%
%
%
%
(
(
wait for no key down
Wait for 1 key down
restore the keyboard interrupt
restore the screen pointer
end of ASM program )
end of RPL program )
Equivalents
Defines a block (generates no code)
GOTO .S ... *.S
GOTOL .S ... *.S
GOC .S ... *.S
GOC .S ... *.S
GONC .S ... *.S
GONC .S ... *.S
Test GOYES .S ... *.S
Test GOYES .S ... *.S
/Test GOYES .S... *.S
/Test GOYES .S ... *.S
GOSUB .S ... *.S
GOSUBL .S ... *.S
\$/02A2C GOIN5 *.S ... *.S (to create a character string)
\$/02DCC GOIN5 *.S ... *.S (to create a code object)
\$(5)PROLOG GOIN5 .S ... *.S (to create a ‘prolog – length’
object)
/Test is the opposite of Test. For example if Test is ?A<C.A, /Test is ?A>=C.A. The test instructions dealing
with the hardware register (?HST=0, ?MP=0, ?SR=0, ?XM=0, ?SB=1, ?HST=1, ?MP=1,
?SR=1, ?XM=1 and ?SB=1) cannot be inverted.
Once blocks are defined, special instructions can be used in them. The instructions called EXIT and UP allow
jumping to the end or to the beginning of a block.
These instructions
are equivalent to
{
*.Beginning
GOTO.End
GOC.End
GONC.End
?A=0.A ¨.End
GOTO.Beginning
GOC.Beginning
GONC.Beginning
?A=0.A ¨.Beginning
*.End
EXIT
EXITC
EXITNC
?A=0.A EXIT
UP
UPC
UPNC
?A=0.A UP
}
Note: In Saturn mode do not be confused between EXIT and UP instructions, which are GOTOs, and EXIT and
UP after a test, which are GOYES’s. EXIT and UP can jump to the beginning or to the end of an upper-level block
by specifying the number of blocks to exit, after the UP or EXIT instructions.
6-40 The Development Library
The Development Library 6-21
Example of a Saturn assembly language program using the MASD compiler
"!NO CODE !RPL
* This program display a 131*64 graphic in a pretty way :-)
* DO LCD->, run it, and enjoy!
* This program has been created by Philippe Pamart
::
* remove the menu and test for a grob
CK1&Dispatch grob
::
CODE
% R0a: X
% R1a: Y
% R2a: @ grob
SAVE GOSBVL DisableIntr
% No interrupts
A=DAT1.A D0=A LC 00014 A+C.A R2=A.A
% adr 1st pixels of the grob
D0+10 A=0.W A=DAT0.10 C=0.W LC 8300040 ?A=C.W % test the size
{ *.End GOSBVL AllowIntr LOADRPL }
GOSBVL "D0->Row1" D1=A D0-15 C=DAT0.A C-15.A GOSBVL WIPEOUT % erase screen
LC 0003F R1=C.W
% initial position in Z
{
LC 00082
% we are ready to scan right to left
{
R0=C.A
% save the counter
LC 001 GOSBVL OUTCINRTN ?CBIT=1.6 -> .End % If backspace, then stop
GOSUB .PointAndLine
% test the current point
C=R0.A C-1.A UPNC
% go one pixel on the right
}
A=R1.W A-1.A R1=A.A
% go one line higher
{
% ready to scan from right to left
LC 001 GOSBVL OUTCINRTN ?CBIT=1.6 -> .End % If backspace, then stop
GOSUB .PointAndLine
% test the current point
A=R0.A A+1.A R0=A.A LC 83 ?A#C.B UP % go one pixel on the left
}
A=R1.A A-1.A R1=A.A UPNC
% go one line higher (if not finish)
}
GOTO .End
*.PointAndLine
%
%
%
A=R1.A A+A.A C=R2.A C+A.A ASL.A A+C.A %
C=R0.A P=C.0 CSRB.A CSRB.A A+C.A D0=A %
%
%
LC 2481248124812481 P=0
%
A=DAT0.B A&C.P ?A=0.P RTY
%
GOSUB LIGNE GOSUB LIGNE
%
GOSBVL "D0->Row1" D0-20
%
A=R0.A C=R1.A GOVLNG aPixonB
*LIGNE
GOSBVL
A=R0.A
C=R1.A
GOVLNG
"D0->Row1" D0-20
B=A.A LA 00041
D=C.A C=0.A
aLineXor
This tests the current pix, returns
if the pixel is white, draw a line
if it is black
Aa: @ line of pixel in the grob
D0: point on the pixel to test,
P = number of the pixel to test in
nibble (in Z/4Z)
test the pixel. if white, return
else, draw line twice in Xor mode
and draw the pixel in black.
Saturn instructions syntax
In this section:
x is a decimal number between 1 and 16. An expression can be used if its value can be determined at the first
encounter.
a is a decimal number ranging from 1 to 16 or a 0 to 15 number depending of the current mode (0-15 or 1-16).
An expression can be used, if its value can be determined at the first encounter.
f is a field A, B, X, XS, P, WP, M, S, F1, F2, F3, F4, F5, F6 or F7.
Reg is a working register A, B, C or D.
RReg is a scratch register R0, R1, R2, R3 or R4.
Exp is an expression.
Cst is a decimal constant. An expression can be used if its value can be determined at the first encounter.
DReg is a pointer register D0 or D1.
Data is memory data pointed by D0 or D1. It means DAT0 or DAT1.
Note: For instructions that use two working registers, instruction using the pairs A-B, B-C, C-D and A-C are
smaller and faster (if the Fn fields are not used).
For instructions like Reg1=Reg1… you can write only Reg1… Example: A=A+C.A is the same as A+C.A.
Syntax
Reg=0.f
Reg=1.f
LC hhh..hhh
LA hhh..hhh
Example
A=0.M
A=1.M
LC 80100
LA #1024
LCASC(x) chrs
LAASC(x) chrs
LC(x) Exp
LA(x) Exp
Reg1=Reg2.f
LCASC(4) MASD
LAASC(5) ROCKS
Reg1Reg2EX.f
ABEX.W
Reg1=Reg1+Reg2.f
Reg1+Reg2.f
A=A+B.A
C+D.A
Reg1=Reg1-Reg2.f
Reg1-Reg2.f
A=A-B.A
C-D.A
LC(5)@Buf+Off
A=B.X
Notes
Sets the specific field of the register to 0
Sets the specific field of the register to 1
The number of nibbles loaded in the register is the number of characters
necessary to write the value. So LC #12 will be equivalent to LC 00C.
Note: the less significant nibble is loaded in the nibble P (as in the value of
the register P) of the register, the next one into nibble p+1 mod 16, and
etcetera.
x must be between 1 and 8. See note on LC instruction
Loads the result of an expression into C or A, using x nibbles.
See note on LC instruction
Copies the value of a specific field of a register into the same field of
another register
Exchanges the value of 2 registers on the given field. Note: this is not valid
for the Fn fields
Adds the value of the specific field of one register to the other register.
Note: If Reg1 and Reg2 are the same, this is a multiply by 2 instruction
Note: This instruction is affected by the DEC/HEX mode only if the field
is not a F field and the registers are AB, BC, CD or AC.
The following instructions are also available (but not on the Fn fields):
A=B-A.f
B=C-B.f
C=A-C.f
D=C-D.f
see note on Reg1=Reg1+Reg2.f
% D0 point on the screen
% A/B: X coordinates
% C/D: Y coordinates
% draw the line!
ENDCODE
;
;
@"
6-38 The Development Library
The Development Library 6-23
Defines
If the instruction matches a define, the correct code is inserted (see the DEFINE instruction)
Labels
If the instruction matches the name of a constant or a label, the value of the said constant or label is inserted (if you
insert a label, be sure to know what you are doing and to be in absolute mode).
extable
If the instruction matches an entry in the extable (see appropriate section at the end of this document) the value
associated with this entry is used.
DUP
Will produce
88130
Note: Using an external table is much faster than using constants. On the other hand, constants are project
dependent, which is not the case of an external table.
Tokens
Then, the following instructions are tested:
Token
Description
::
Program prologue \$02D9D
; or END
List, Program or Algebraic end \$0312B
{
List prologue \$02A74
}
List end \$0312B
MATRIX
Algebraic matrix object
SYMBOLIC
Algebraic prologue \$02AB8
UNIT
FPTR2 ^constant
Flash pointer from constant
FPTR bank value
Flash pointer from value
# cst
System Binary of cst value, given in hexadecimal. If there is no space
between the # and the cst, MASD will try, if possible, to use the
internally defined system binary
PTR cst
ACPTR cst1 cst2
ROMPTR2 ~xlib_name
XLIB object from constant
ROMPTR LibN ObjN
XLIB object from value
% real
Real number
%% real
Long real number
C% real1 real2
Complex number
C%% real1 real2
Long complex number
"..."
Character string. Special characters can be included by typing \ and
the ASCII value on two hexadecimal characters. \ can be inserted by
typing \\
ZINT decimalvalue
Integer
ID name
Global name (see " for info on character encoding)
LAM name
Local name (see " for info on character encoding)
TAG chrs
Tagged object
6-36 The Development Library
Syntax
DReg=hh
DReg=hhhh
DReg=hhhhh
DReg=(2)Exp
DReg=(4)Exp
DReg=(5)Exp
Dreg=Reg
Dreg=RegS
Example
D0=0100
D0=80100
D0=(2)label
D0=(4)lab+\$10
D1=(5)Variable
Notes
Change the first 2, 4 or all nibbles of the Data register with the given value
Reg can only be A or C
Sets the first 4 nibbles of Dreg with the 4 first nibbles of Reg
Reg can only be A or C
RegDRegEX
Reg can only be A or C
RegDRexXS
Exchange the first 4 nibbles of Dreg with the 4 first nibbles of Reg
Reg can only be A or C
DReg=DReg+Cst
Note 1: The Saturn processor is not able to add a constant greater than 16
D0=D0+12
D1+25
DReg+Cst
to a register, but if cst is greater than 16, MASD will generate as many
D1=D1-12
DReg=DReg-Cst
instructions as needed.
D1-5
DReg-Cst
Note 2: Even if adding constants to a register is very useful, big constants
should be avoided because they will slow down execution, and generate a
big program.
Note 3: After adding a constant greater than 16, the carry should not be
tested.
Note 4: You can put an expression instead of the constant (MASD must be
able to evaluate the expression right away). If the expression is negative,
MASD will invert the addition to a subtraction and vice versa.
Note 5: Be careful when using subtraction; it’s easy to be misled. D0-5-6.A
is equivalent to D0+1.A, not D0-11.A
f can NOT be a Fn field.
?Reg1=Reg2.f
?A=C.B
?Reg1#Reg2.f
The HP ≠ character can also be used
?A#C.A
?Reg=0.f
?A=0.B
?Reg#0.f
The HP ≠ character can also be used
?A#0.A
?Reg1<Reg2.f
?A<B.X
?Reg1>Reg2.f
?C>D.W
?Reg1<=Reg2.f
The HP ≤ character can be used
?A<=B.X
?Reg1>=Reg2.f
The HP ≥ character can be used
?C>=D.W
?RegBIT=0.a
Test if a specific bit of A or C register is 0 or 1
?ABIT=0.5
?ABIT=1.number
?RegBIT=1.a
Reg must be A or C
Sets Aa or Ca to the address of the next instruction
A=PC
C=PC
PC=A
Set PC to the value contained in Aa or Ca
PC=C
Exchange the value of PC with register Aa or Ca
APCEX
CPCEX
Sets PC to the value read at the address contained in Aa or Ca
PC=(A)
PC=(C)
SB, XM, SR and MP are 4 bits in the HST register. They can be set to 0 by
SB=0
XM=0
the specific instruction and tested.
SR=0
SB is set to 1 by RegSR and RegSRB instruction, XM by RTNSXM
MP=0
instruction and SR and MP should always be 0 (hardware related stuff).
HST=0.a
HST=a sets all bits set to 1 in a to 0 in the HST register.
?SB=0
?HST=a test that all bits set to 1 in a are 0 in the HST register
?XM=0
?SR=0
?MP=0
?HST=0.a
D0=A
D0=CS
The Development Library 6-25
2332
2340
2348
2356
2364
2372
2380
2388
2392
2396
2408
2412
2416
3420
REG C;
REG D;
REG R0;
REG R1;
REG R2;
REG R3;
REG R4;
U32 D0
U32 D1;
U32 P, P4, P4_32; // P4 = 4*P, P4_32 = 4*P-32, use setP() to modify P.
U32 ST;
U32 HST;
U32 carry; // 0 or !0
BOOL dec; // 0→hex or 1→dec
U32 RSTK[NB_RSTK];
U32 RSTK_i; // Index for next push.
U32 FIELD_START[32]; // Lowest nibble of the field.
U32 FIELD_LENGTH[32]; // Length of the field.
Therefore, LDR R2 [R1 2316] allows you to read the lower 32 bits of the Saturn register A.
LDR R2 [R1 1]
LDR R3 [R2 1]
allows you to read the first 8 nibbles at Saturn address 01008
The following file can be used to declare your Saturn chipset structure.
"!ASM
CP=0
DCCP #1028 SWRITE
DCCP #260 SPRIORITY
DCCP 8 SRA
DCCP 8 SRB
DCCP 8 SRC
DCCP 8 SRD
DCCP 8 SR0
DCCP 8 SR1
DCCP 8 SR2
DCCP 8 SR3
DCCP 8 SR4
DCCP 4 SD0
DCCP 4 SD1
DCCP 4 SRP
DCCP 4 SRP4
DCCP 4 SRP32
DCCP 4 SST
DCCP 4 SHST
DCCP 4 SCARRY
DCCP 4 SDEC
DCCP #32 SRSCK
DCCP 4 SRSTKP
DCCP #128 SFSTART
DCCP #128 SFLENGTH
@"
6-34 The Development Library
Syntax
Example
\$(x)Exp
CON(x)Exp
EXP(x)Exp
¢Ascii
"Ascii"
GOIN5 lab
G5 lab
GOIN4 lab
G4 lab
GOIN3 lab
G3 lab
GOIN2 lab
G2 lab
SAVE
RPL or LOOP
INTOFF2
INTON2
ERROR_C
A=IN2
C=IN2
OUT=C=IN
RES.STR
RES.ROOM
RESRAM
SHRINK\$
COPY<- COPY←
COPYDN
COPY-> COPY→
COPYUP
DISP
DISPKEY
SRKLST
SCREEN
ZEROMEM
MULT.A
MULT
DIV.A
DIV
BEEP
NATIVE? \$hex
HST=1.x
?HST=1.x { }
SETFLD(1-7)
OFF
Notes
Places the value of Exp in the code, on x nibbles.
Includes ASCII data. The end of the string is the next ¢ or carriage return.
Example: ¢Hello¢. To output a ¢ character, put it twice. To put an char
from its number, use \xx where xx is an hex number. To put a \, put the \
chr twice.
Same as \$(x)label-& with x=5, 4, 3 or 2. Useful to create a jump
table.
Equivalent to GOSBVL SAVPTR
Equivalent to GOSBVL GETPTR
Equivalent to A=DAT0.A D0+5 PC=(A)
Equivalent to GOVLNG GETPTRLOOP
Equivalent to GOSBVL DisableIntr
Equivalent to GOSBVL AllowIntr
Equivalent to GOSBVL ErrjmpC
Equivalent to GOSBVL AINRTN
Equivalent to GOSBVL CINRTN
Equivalent to GOSBVL OUTCINRTN
Equivalent to GOSBVL MAKE\$N
Equivalent to GOSBVL GETTEMP
Equivalent to GOSBVL MAKERAM\$
Equivalent to GOSBVL SHRINK\$
Equivalent to GOSBVL MOVEDOWN
Equivalent to GOSBVL MOVEUP
Equivalent to GOSBVL DBUG (only if debug is on)
Equivalent to GOSBVL DBUG.KEY (only if debug is on)
Equivalent to GOSBVL SHRINKLIST
Equivalent to GOSBVL D0->Row1
Equivalent to GOSBVL D0->Sft1
Equivalent to GOSBVL WIPEOUT
Equivalent to GOSBVL MULTBAC
Equivalent to GOSBVL MPY
Equivalent to GOSBVL IntDiv
Equivalent to GOSBVL IDIV
Equivalent to GOSBVL makebeep
Set carry if native function hex is undefined, clear it if defined.
Sets bits in the HST register (XM=1, SB=1, SR=1 and MP=1 are also
available). Note: the program ST=0.0 SB=1 ?SB=0 { ST=1.0
} will set ST0 to 0 if the calculator is non-emulated and to 1 if it is
emulated.
Test for HST bits. See HST=1.x comments
See the section on SETFLDn above.
Turns the calculator off.
The Development Library 6-27
Syntax
Operation
Copy and shift
Not
Sub
Sub with carry
Reverse Sub
Rev sub with carry
Multiply
Compare
Cmp Negative
Test
Test equivalence
And
Xor
Or
BitClear (~And)
Branch
Gosub
Inc Before
Inc After
Dec Before
Dec After
Store Int
Store Byte
Multiple Store
Inc Before
Inc After
Dec Before
Dec After
Multiplication
Assembler
MOV{cond}{S} Rd, <Oprnd>
MVN{cond}{S} Rd, <Oprnd>
SUB{cond}{S} Rd, Rn, <Oprnd>
SBC{cond}{S} Rd, Rn, <Oprnd>
RSB{cond}{S} Rd, Rn, <Oprnd>
RSC{cond}{S} Rd, Rn, <Oprnd>
MUL{cond}{S} Rd, Rm, Rs
MLA{cond}{S} Rd, Rm, Rs, Rn
CMP{cond} Rd, <Oprnd>
CMN{cond} Rd, <Oprnd>
TST{cond} Rn, <Oprnd>
TEQ{cond} Rn, <Oprnd>
AND{cond}{S} Rd, Rn, <Oprnd>
EOR{cond}{S} Rd, Rn, <Oprnd>
XOR{cond}{S} Rd, Rn, <Oprnd>
ORR{cond}{S} Rd, Rn, <Oprnd>
BIC{cond}{S} Rd, Rn, <Oprnd>
B{cond} label
BL{cond} label
LDR{cond} Rd, <a_mode>
LDR{cond} Rd, Label
LDR{cond}B Rd, <a_mode>
LDRB{cond} Rd, Label
LDM{cond}IB Rd{!}, {reg
LDM{cond}IA Rd{!}, {reg
LDM{cond}DB Rd{!}, {reg
LDM{cond}DA Rd{!}, {reg
STR{cond} Rd, <a_mode>
STR{cond} Rd, Label
list}
list}
list}
list}
STRB{cond} Rd, <a_mode>
STRB{cond} Rd, Label
STM{cond}IB Rd{!}, {reg
STM{cond}IA Rd{!}, {reg
STM{cond}DB Rd{!}, {reg
STM{cond}DA Rd{!}, {reg
MUL rd, r1 r2
MLA rd, r1, r2, r3
SMULL rd1, rd2, r1, r2
SMLAL rd1, rd2, r1, r2
UMULL rd1, rd2, r1, r2
UMLAL rd1, rd2, r1, r2
*labelName
\$
“, ¢
6-32 The Development Library
list}
list}
list}
list}
Action
S flags
d:= <Oprnd>
NZCR
d:= ~<Oprnd>
NZCR
d:= Rn + <Oprnd>
NZCVR
d:= Rn + <Oprnd> + Carry
NZCVR
d:= Rn - <Oprnd>
NZCVR
d:= Rn - <Oprnd> - Not(Carry)
NZCVR
d:= <Oprnd> - Rn
NZCVR
d:= <Oprnd> - Rn – Not(Carry)
NZCVR
d:= Rm * Rs
NZR
d:= (Rm * Rs) + Rn
NZR
flags:= Rn - <Oprnd>
NZCV
flags:= Rn + <Oprnd>
NZCV
flags:= Rn And <Oprnd>
NZC
flags:= Rn Xor <Oprnd>
NZC
Rd:= Rn And <Oprnd>
NZC
Rd:= Rn Xor <Oprnd>
NZC
Rd:= Rn Xor <Oprnd>
NZC
Rd:= Rn Or <Oprnd>
NZC
Rd:= Rn And Not <Oprnd>
NZC
Rd:= data at label. The label address is calculated
relative to the PC. This does not work with
constants
Rd:= [byte at address] 0 extended
Rd:= data at label. The label address is calculated
relative to the PC. This does not work with
constants
Stack operations (Pop)
! sets the W bit (updates the base
register after the transfer)
data at label:= Rd. The label address is calculated
relative to the PC. This does not work with
constants
data at label:= Rd. The label address is calculated
relative to the PC. This does not work with
constants
Stack operations (Push)
! sets the W bit (updates the base
register after the transfer)
Example
SETOFFD
HSCREEN
UNCNFGD
GETTIME
MIDAPP?
CONFIGD
BIGAPP?
RESETOS
REFRESHD
AUTOTEST
ACCESSSD
PORTTAG?
Notes
Set offset of display inside disp0 in bytes from C[X]&7FF.
Return how many lines the screen contains to Ca.
Unconfigure the 4KB block containing the top 16-line header.
This will refresh the header on the display.
Emulates gettime function in ROM, and also updates the 8192Hz timer
accordingly.
Purpose: Get current time: (=NEXTIRQ)-Timer2
Return CS iff time appears corrupt.
Entry: Timer2 Running
Exit: Timer2 Running
CC - A:NEXTIRQ (ticks)
C:Time (ticks)
D:Timer2 (sign extended ticks)
P:0, HEX
CS - Same as the non-error case but the time system
is corrupt because of one of:
(1) TIMESUM # CRC(NEXTIRQ) -- CheckSum Error
(2) TIMER2 was not running on entry.
(3) Time not in range: [BegofTime, EndofTime)
Carry=1 on HP 48gII, 0 otherwise.
Configure a 4KB block containing the top 16-line header.
C.A = Start address of the block (must be multiple of 4KB).
If already configured, unconfig, refresh and re-config.
Carry=1 on HP 49g+ or 50g, 0 otherwise.
Reset the calculator (including the OS).
This code doesn’t return, the calculator restarts at 00000000.
Force to refresh the header on the display.
- 003AA: AUTO_USER_TEST
- 003A3: MANU_USER_TEST
- 0039C: MANUFACTURE_TEST
- Other: signed index, OS-specific, see OS_API.doc.
SD Card functions (depending on P, see HP’s vgeraccess for more details.
Return port number depending on tag name.
Entry: D1: name (size+chars)
Exit: A[A]: port number (0-3)
D1: after name
Carry: clear if ok, set if wrong name
rd=r1*r2
rd=r1*r2+r3
Signed mul rd1=low r1*r2, rd2=high r1*r2
Signed mul add rd1+=low r1*r2, rd2+=high r1*r2
rd1=low r1*r2, rd2=high r1*r2
mul add rd1+=low r1*r2, rd2+=high r1*r2
Creates a label
See \$ in ASM mode
See ASM mode
The Development Library 6-29
Messages Listed Numerically (continued)
# (hex)
Message
BB22
BB23
BB24
BB25
BB26
BB27
BB28
BB29
BB2A
BB2B
BB2C
BB2D
BB2E
BB2F
BB30
BB31
BB32
BB33
BB34
BB35
BB36
BB37
BB38
BB39
BB3A
BB3B
BB3C
BB3D
BB3E
BB3F
BB40
BB41
Y-Col:
BC01
BC02
BC03
BC04
1.Browse alarms…
Model:
Enter indep column number
Messages Listed Alphabetically (continued)
Message
Meaning
LAST CMD Disabled
Enter dependent column number
Choose statistical model
while that recovery feature
LASTARG Disabled
…Ëpressed
while that recovery feature
SUMMARY STATISTICS
Calculate:
ΣX
NΣ
Calculate sum of X column?
Calculate sum of Y column?
Many or No Solutions
A value for I%YR cannot be calculated.
Check the values stored in PV, PMT, and
FV. Check for correct signs.
E602
Memory Clear
Memory was cleared.
005
Name Conflict
Execution of | (where) attempted to assign
value to variable of integration or
summation index.
13C
Name the equation, press
ENTER
Name equation and store it in EQ.
60B
Name the stat data, press
ENTER
Name statistics data and store it in ΣDAT.
621
Negative Underflow
Math exception: Calculation returned
negative, non-zero result greater than
–MINR.
302
No Current Equation
Solver, DRAW, or RCEQ executed with
nonexistent EQ.
104
Calculate sum of squares of X?
Calculate sum of squares of Y?
Calculate sum of products?
Calculate number of data points?
Linear Fit
Logarithmic Fit
Exponential Fit
Power Fit
Best Fit
Plot and HP Solve application status
message.
Insufficient free memory in the specified
port.
Not enough free memory to save copy of
the stack. LAST STACK is automatically
disabled.
00B
Stack objects displayed by type only due to
low memory condition.
131
No stat data to plot
No data stored in ΣDAT.
60F
No Solution
A value for I%YR cannot be calculated.
Check the values stored in PV, PMT, and
FV. Check for correct signs.
E601
No current equation.
No Room in Port
5.Hypoth. tests…
6.Conf. interval…
No Room to Save Stack
Time and Alarm Prompts
No Room to Show Stack
2.Set alarm…
3.Set time, date…
SET ALARM
A-36 Error and Status Messages
205
C14
ΣY2
ΣXY
disabled.
124
Low Battery
ΣY
ΣX2
disabled.
125
System batteries too low to safely print or
perform I/O.
Enter indep value or press PRED
Enter dep value or press PRED
pressed while that recovery feature
…¯pressed
PREDICT VALUES
Y:
disabled.
LAST STACK Disabled
Correlation
Covariance
„®
# (hex)
609
101
Error and Status Messages A-5
Wire
Messages Listed Alphabetically (continued)
Message
Meaning
Received a packet whose length was shorter
than a null packet.
Protocol Error
Maximum packet length parameter from
other machine is illegal.
Kermit: More than 255 bytes of retries sent
SRECV: Incoming data overflowed the
buffer.
Kermit
UART overrun of framing error.
C03
XModem
Receiving
Identifies object name while receiving.
C0E
Even
Retry #
Indicates number of retries while retrying
packet exchange.
C0B
Mark
Select a model
Select statistics curve fitting model.
614
Select plot type
Select plot type.
60C
Select repeat interval
Select alarm repeat interval.
61B
Sending
Identifies object name while sending.
C0D
Sign Reversal
HP Solve application or ROOT unable to
find point at which current equation
evaluates to zero, but did find two
neighboring points at which equation
changed sign.
A05
Single Equation
Only one equation supplied to MultipleEquation Solver. Use HP Solve application.
E402
Timeout
Printing to serial port: Received XOFF and
timed out waiting for XON.
C02
Too Few Arguments
Command required more arguments than
were available on stack.
201
Too Many Unknowns
Multiple Equation Solver can’t calculate a
value given the current knowns. Supply
another value or add an equation.
E404
Transfer Failed
Ten successive attempts to receive a good
packet were unsuccessful.
C06
Unable to find root
PROOT is unable to determine all roots of
the polynomial.
C001
Unable to Isolate
ISOL failed because specified name absent
or contained in argument a function with no
inverse.
130
Messages Listed Numerically (continued)
# (hex)
BA28
BA29
BA2A
BA2B
BA2C
BA2D
BA2E
BA2F
BA30
BA31
BA32
BA33
BA34
BA35
BA36
BA37
BA38
BA39
BA3A
BA3B
BA3C
BA3D
BA3E
BA3F
BA40
BA41
BA42
BA43
BA44
BA45
BA46
BA47
BA48
BA49
BA4A
BA4B
BA4C
Message
Remote PC files
Files in
Enter name of dir to change to
Choose Remote Directory
Infrared
IR
Odd
Space
Spc
ASCII
ASC
Binary
Bin
None
Newline (Ch 10)
Newl
Chr 128-159
→159
→255
# (hex)
C07
C04
Chr 128-255
One-digit arith
Two-digit arith
Three-digit CRC
HP-IR
IrDA
14K
19K
38K
57K
115K
15K
1200
A-34 Error and Status Messages
Error and Status Messages A-7
Messages Listed Numerically (continued)
# (hex)
B9BF
B9C0
B9C1
B9C2
B9C3
B9C4
B9C5
B9C6
B9C7
B9C8
B9C9
B9CA
B9CB
B9CC
B9CD
B9CE
B9CF
B9D0
B9D1
B9D2
B9D3
B9D4
B9D5
B9D6
B9D7
B9D8
B9D9
B9DA
B9DB
B9DC
B9DD
Message
Message
General Messages
82 EQW edit mini fnt
83 Display grobs off
85 SysRPL stk disp
90 CHOOSE:mini font
91 MTRW:list of list
92 MASD SysRPL mode
94 Result <> LASTCMD
95 Algebraic mode
97 List:vert disp
98 Vector:vert disp
99 CAS:verbose
100 Step by step on
103 Complex on
105 Approx. mode on
106 !Simp. in series
109 Num. factorize
110 Large matrices
111 !Simp non rat.
112 i not simplified
113 Linear simp off
114 Disp x+1 → 1+x
115 SQRT !simplified
116 Prefer sin()
119 Rigorous off
120 Silent mode on
123 Forb. Switch Mode
125 FastSign-no Sturm
126 rref w/o last col
127 HP-IR mode
128 Vars are reals
I/O Prompts
B9DE
B9DF
B9E0
BA01
BA02
Messages Listed Numerically
# (hex)
Object:
Obs in
Name:
1.Send to Calculator…
2.Get from Calculator
A-32 Error and Status Messages
001
002
003
004
005
006
007
008
009
00A
00B
00C
00D
00E
00F
010
011
012
013
014
015
016
017
018
019
01A
01B
01C
01D
01E
01F
020
021
022
023
024
025
Insufficient Memory
Directory Recursion
Undefined Local Name
Undefined XLIB Name
Memory Clear
Power Lost
Warning:
Invalid Card Data
Object In use
Port Not Available
No Room in Port
Object Not in Port
Recovering Memory
Try To Recover Memory?
Replace RAM, Press ON
No Mem To Config All
Undefined FPTR Name
Invalid Bank Data
Cmprs: not a user bank
No or 2 system bank
Invalid bank
Invalid bank number
Inexisting pack
Pack twice
Ins. Mem.
Erase Fail, Rom faulty
Erase Fail, Low bats
Erase Fail, Locked Block
Write Fail, Rom Faulty
Write Fail, Low bats
Write Fail, Locked Block
Invalid DOS Name
Invalid File Handle
Invalid File Index
Error and Status Messages A-9
Messages Listed Numerically (continued)
# (hex)
B976
B977
B978
B979
B97A
B97B
B97C
B97D
B97E
B97F
B980
B981
B982
B983
B984
B985
B986
B987
B988
B989
B98A
B98B
B98C
B98D
B98E
B98F
B990
B991
B992
B993
B994
B995
B996
B997
B998
B999
B99A
Message
100 Step by step off
103 Complex off
105 Exact mode on
106 Simp. in series
109 Sym. factorize
110 Normal matrices
111 Simp non rat.
112 i simplified
113 Linear simp on
114 Disp 1+x → x+1
115 SQRT simplified
116 Prefer cos()
117 CHOOSE boxes
119 Rigorous on
120 Silent mode off
123 Allow Switch Mode
125 Accur. Sign-Sturm
126 rref w/ last col
127 IrDA mode
128 Cmplx var allowed
01 Principal value
02 Constant → num
03 Function → num
Messages Listed Numerically (continued)
# (hex)
11D
11E
11F
120
121
122
123
124
125
126
127
128
129
12A
12B
12C
12D
12E
12F
130
131
132
133
Message
Long Complex
Character
Code
Library Data
External
(#123h DOERR is equivalent to KILL)
LAST STACK Disabled
LAST CMD Disabled
HALT Not Allowed
Array
Wrong Argument Count
Circular Reference
Directory Not Allowed
Non-Empty Directory
Invalid Definition
Missing Library
Invalid PPAR
Non-Real Result
Unable to Isolate
No Room to Show Stack
Warning:
Error:
14 Payment at begin
19
V2 → complex
20 Underflow → error
21 Overflow → error
22 Infinite → ±9E499
27 'X+Y*i' → 'X+Y*i'
28 Simultaneous plot
29 Don't draw axes
31 Plot points only
32 Inverse cursor
33 Transfer via IR
34 Print via wire
35 Binary transfer
36 RECV overwrites
A-30 Error and Status Messages
Out-of-Memory Prompts
134
135
136
137
138
139
13A
13B
13C
13D
13E
13F
140
Purge?
Out of Memory
Stack
Last Stack
Last Commands
Key Assignments
Alarms
Last Arguments
Name Conflict
Command Line
(#13Eh DOERR is equivalent to CONT)
Interrupted
Integer
Error and Status Messages A-11
Messages Listed Numerically (continued)
# (hex)
B92C
B92D
B92E
B92F
B930
B931
B932
B933
B934
Message
Message
Floating-Point Errors
Degrees
Deg
301
302
303
304
305
Positive Underflow
501
502
503
504
505
506
Invalid Dimension
601
602
603
604
605
606
Invalid Σ Data
Negative Underflow
Overflow
Undefined Result
Infinite Result
Array Messages
Rectangular
Polar
Spherical
System Flags Choose Box Prompts
B935
B936
B937
B938
B939
B93A
B93B
B93C
B93D
B93E
B93F
B940
B941
B942
B943
B944
B945
B946
B947
B948
B949
B94A
B94B
B94C
B94D
B94E
B94F
B950
Messages Listed Numerically (continued)
# (hex)
SYSTEM FLAGS
01 General solutions
02 Constant → symb
03 Function → symb
14 Payment at end
19 →V2 → vector
20 Underflow → 0
21 Overflow → ±9E499
22 Infinite → error
29 Draw axes too
31 Connect points
32 Solid cursor
33 Transfer via wire
34 Print via IR
35 ASCII transfer
36 RECV renames
37 Single-space prnt
39 Show I/O messages
40 Don't show clock
41 12-hour clock
42 mm/dd/yy format
43 Reschedule alarm
44 Delete alarm
51 Fraction mark: .
52 Show many lines
A-28 Error and Status Messages
Deleting Row
Deleting Column
Inserting Row
Inserting Column
Statistics Messages
27 'X+Y*i' → '(X,Y)'
28 Sequential plot
Invalid Array Element
Nonexistent ΣDAT
Insufficient Σ Data
Invalid ΣPAR
Invalid Σ Data LN(Neg)
Invalid Σ Data LN(0)
Plot, I/O, Time and HP Solve Application Messages
607
608
609
60A
60B
60C
60D
60E
60F
610
611
612
613
614
615
616
617
618
619
Invalid EQ
Current equation:
No current equation.
Enter eqn, press NEW
Name the equation,
press ENTER
Select plot type
Empty catalog
undefined
No stat data to plot
Autoscaling
Solving for
No current data. Enter
data point, press Σ+
Select a model
No alarms pending.
Press ALRM to create
Next alarm:
Past due alarm:
Acknowledged
Error and Status Messages A-13
Messages Listed Numerically (continued)
# (hex)
Message
Unit Management
B01
B02
Invalid Unit
Inconsistent Units
I/O and Printing
C01
C02
C03
C04
C05
C06
C07
C08
C09
C0A
C0B
C0C
C0D
C0E
C0F
C10
C11
C12
C13
C14
C15
C16
C17
Timeout
Parity Error
Transfer Failed
Protocol Error
Invalid Server Cmd.
Port Closed
Connecting
Retry #
Awaiting Server Cmd.
Sending
Receiving
Packet #
Processing Command
Invalid IOPAR
Invalid PRTPAR
Low Battery
Empty Stack
Row
Invalid Name
Time Messages
D01
D02
D03
D04
DFF
Invalid Date
Invalid Time
Invalid Repeat
Nonexistent Alarm
A Programmer’s DOERR
(Causes silent interruption, leaving all pending HALTs intact.
This is the action performed before control alarms are executed)
Input Form Prompts
B901
B902
B903
B904
reset/delete this field
Messages Listed Numerically (continued)
# (hex)
70F
710
711
712
713
714
715
716
717
718
719
71A
71B
71C
71D
71E
71F
720
721
722
723
724
725
726
727
728
729
72A
72B
72C
72D
72E
72F
730
731
732
733
734
Message
Polar
Spherical
Operating Mode…
Number Format……
Angle Measure……
Coord System………
FM,
Beep
Key Click
Last Stack
Choose calculator operating mode
Choose number display format
Choose decimal places to display
Choose angle measure
Choose coordinate system
Use comma as fraction mark?
Enable standard beep?
Enable key click?
Save last stk for UNDO and ANS?
CALCULATOR MODES
Font:
Stack:
Small
Textbook
Edit:
Small
Full Page
Indent
EQW:
Small
Small Stack Disp
Clock
Analog
Choose system font
Display stack using small font?
Use pretty print in the stack?
Edit using small font?
Reset value
Delete value
A-26 Error and Status Messages
Error and Status Messages A-15
Messages Listed Numerically (continued)
# (hex)
876
877
878
879
87A
87B
87C
87D
87E
87F
880
881
882
883
884
885
886
887
888
889
88A
88B
88C
88D
88E
88F
890
891
Message
Confidence level
CONF. INT.: 2 P
:
Sx:
N:
C:
Sample mean
Sample standard deviation
Sample size
Confidence level
CONF. INT.: 1 µ, UNKNOWN ˜
1:
S1:
N1:
C:
2:
S2:
N2:
Pooled
Sample 1 mean
Std deviation for sample 1
Sample 1 size
Sample 2 mean
Std deviation for sample 2
Sample 2 size
Confidence level
Pooled if checked
CONF. INT.: 2 µ, UNKNOWN ˜
Object Editing Messages
892
893
894
895
896
897
898
899
Search for:
Replace by:
Case Sensitive
Search For:
Enter search pattern
Enter replace pattern
Case sensitive search?
Enter search pattern
A-24 Error and Status Messages
Messages Listed Numerically (continued)
# (hex)
75B
75C
75D
75E
75F
760
761
762
763
764
765
766
767
768
769
76A
76B
76C
76D
76E
76F
770
771
772
773
774
775
776
777
778
779
77A
77B
77C
77D
77E
77F
780
Message
Zoom:
Small Font
File:
Enter starting value
Enter increment value
Choose table format
Enter zoom factor
Display table using small font?
Enter a filename to save data
TABLE SETUP
Automatic
Function
Polar
Parametric
Diff Eq
Conic
Truth
Histogram
Bar
Scatter
Slopefield
Fast3D
Wireframe
Ps-Contour
Y-Slice
Gridmap
Pr-Surface
Deg
Type:
:
EQ:
Indep:
Connect
Simult
H-Tick:
Error and Status Messages A-17
Messages Listed Numerically (continued)
# (hex)
82A
82B
82C
82D
82E
82F
830
831
832
833
834
835
836
837
838
839
83A
83B
83C
83D
83E
83F
840
841
842
843
844
845
846
847
848
849
84A
84B
84C
84D
84E
84F
Message
X2:
N2:
Success count for sample 1
Size of sample 1
Significance level
Success count for sample 2
Size of sample 2
Z-TEST: 2 P
:
Sx:
µ0:
Œ:
N:
Null hypothesis population mean
Sample Standard deviation
Sample Mean
Significance level
Sample size
T-TEST: 1 µ, UNKNOWN ˜
1:
S1:
N1:
Œ:
2:
S2:
N2:
Pooled?
Sample mean for population 1
Std deviation for sample 1
Sample size for population 1
Significance level
Sample mean for population2
Std deviation for sample 2
Sample size for population 2
"Pooled" if checked
T-TEST: 2 µ, UNKNOWN ˜
:
Messages Listed Numerically (continued)
# (hex)
7A8
7A9
7AA
7AB
7AC
7AE
7AF
7B0
7B1
7B2
7B3
7B4
7B5
7B6
7B7
7B8
7B9
7BA
7BB
7BC
7BD
7BE
7BF
7C0
7C1
7C2
7C3
7C4
7C5
7C6
7C7
7C8
7C9
7CA
7CB
7CC
Message
Depnd Low:
High:
X-Left:
X-Right:
Y-Near:
Y-Far:
Step Indep:
Depnd:
Bar Width:
Z-Low:
Z-High:
XE:
YE:
ZE:
Init:
Final:
Init-Soln:
Tol:
XXLeft:
XXRight:
YYNear:
YYFar:
Enter minimum horizontal value
Enter maximum horizontal value
Enter minimum vertical value
Enter maximum vertical value
Enter minimum indep var value
Enter maximum indep var value
Enter indep var increment
Indep step units are pixels?
Enter minimum depend var value
Enter maximum depend var value
Enter bar width
Enter minimum Z view-volume val
Enter maximum Z view-volume val
Enter X eyepoint coordinate
Enter Y eyepoint coordinate
˜:
A-22 Error and Status Messages
Error and Status Messages A-19
Messages Listed Numerically (continued)
# (hex)
BC05
BC06
BC07
BC08
BC09
BC0A
BC0B
BC0C
BC0D
BC0E
BC0F
BC10
BC11
BC12
BC13
BC14
BC15
BC16
BC17
BC18
BC19
BC1A
BC1B
BC1C
BC1D
BC1E
BC1F
BC20
BC21
BC22
BC23
BC24
BC25
BC26
BC27
BC28
BC29
Message
Message:
Time:
Date:
Repeat:
Enter "message" or « action »
Enter hour
Enter minute
Enter second
Choose AM, PM, or 24-hour time
Enter month
Enter day
Enter year
Enter alarm repeat multiple
Enter alarm repeat unit
SET TIME AND DATE
Choose date display format
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
None
AM
PM
24-hour time
24-hr
1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
Error and Status Messages A-37
Flag
–112
–113
–114
–115
–116
–117
–118
–119
–120
–121
–122
–123
–124
–125
–126
–127
–128
C-8 System Flags
System Flags (continued)
Description
Simplifying ‘i’.
Clear: ‘i’ can be simplified (i.e. i2 = –1)
Set: ‘i’ cannot be simplified.
Linear Simplification Mode.
Clear: Apply linearity simplification when using integration CAS commands.
Set: Do not apply linearity simplification when using integration CAS commands.
Polynomial Term Order.
Clear: Polynomial expressed in decreasing power order.
Set: Polynomial expressed in increasing power order.
SQRT Simplification.
Clear: Square roots can be simplified.
Set: Square roots cannot be simplified.
Trigonometric Manipulations.
Clear: Simplification to cosine terms.
Set: Simplification to sine terms.
Clear: Menus displayed as choose boxes.
Set: Menus displayed as softkeys, like the HP 48GX calculator.
INT Simplification.
Clear: INT is simplified.
Set: INT is not simplified.
Rigorous Mode.
Clear: Rigorous mode on: |X| is not simplified to X.
Set: Rigorous mode off: |X| is simplified to X.
Silent Mode Switch.
Clear: Calculator prompts when it needs to change modes.
Set: Calculator changes modes when necessary without prompting.
Internal use only. (LN returns LN[ABS()] if set).
Internal use only. (0/0 occurred).
Mode Switch.
Clear: Mode switch allowed.
Set: Mode switch not allowed.
CAS Object Evaluation.
Clear: Non-algebraic CASCOMPEVAL is allowed.
Set: Non-algebraic CASCOMPEVAL is not allowed.
Sign Determination Mode.
Clear: Accurate sign determination using polynomial Sturm sequences.
Set: Fast sign determination. Polynomial Sturm sequences are not used. Autosimplification of square roots canceled.
Row Reduction Mode.
Clear: RREF done with last column.
Set: RREF done without last column.
Not used.
Clear: Complex variables allowed.
Set (default): All variables are real.
Messages Listed Numerically (continued)
# (hex)
Message
BD13
BD14
BD15
BD16
BD17
BD18
BD19
BD1A
BD1B
BD1C
BD1D
BD1E
BD1F
BD20
BD21
BD22
BD23
BD24
BD25
BD26
BD27
Enter variable value
BE01
BE02
BE03
BE04
BE05
BE06
BE07
BE08
BE09
BE0A
BE0B
BE0C
BE0D
BE0E
BE0F
Plot
Expression
TAYLOR POLYNOMIAL
Order:
Enter Taylor polynomial order
ISOLATE A VARIABLE
Principal
Get principal solution only?
MANIPULATE EXPRESSION
MATCH EXPRESSION
Pattern:
Replacement:
Subexpr First
Cond:
Enter pattern to search for
Enter replacement object
Search subexpressions first?
Enter conditional expression
Symbolic
Numeric
Plot Application Prompts
Type:
:
H-View:
Autoscale
V-View:
Choose type of plot
Choose angle measure
Enter function(s) to plot
Enter minimum horizontal value
Enter maximum horizontal value
Autoscale vertical plot range?
Enter minimum vertical value
Enter maximum vertical value
Plot (x(t), y(t))
Error and Status Messages A-39
Flag
–79
–80
–81
–82
–83
–84
–85
–86
–87
–88
–89
–90
–91
–92
–93
C-6 System Flags
System Flags (continued)
Description
Pretty Print Mode.
Clear: Algebraic objects appear on the stack in textbook (EQW) form. (Only in
multi-line levels, see flag –65).
Set: Algebraic objects appear on the stack in linear form.
Font used to show algebraics on stack if flag –79 is clear.
Clear: Textbook stack display uses the current system font.
Set: Textbook stack display uses mini-font.
Font used by →GROB on algebraics.
Clear: Editing a textbook grob uses current font.
Set: Editing a textbook grob uses mini-font.
Equation Writer Font.
Clear: Current font used to edit algebraics in textbook mode.
Set: Mini-font used to edit algebraics in textbook mode.
Grob Display.
Clear: Grob contents (picture) displayed on the stack.
Set: Grob description (dimensions) displayed on the stack.
Not used. (Originally intended to control the menu font size in the HP 49G,
though it was never implemented.)
Stack Display.
Clear: Standard stack display.
Set: System-RPL stack display.
In textbook mode (see flag –79), objects displayed on multiple lines (see flag –65)
are always shown in standard form.
Program Prefix.
Clear: Program prefix off.
Set: Program prefix on.
Recursive Stack Display.
Clear: Non-recursive stack display.
Set: In System-RPL stack display (see flag –85), unsupported (unnamed) entry
points are exploded into their elements.
Not used. (Originally intended to control recursive editing in the 49G, though it
was never implemented.)
Not used. (Originally intended to control extable library usage editing in the HP
49G, though it was never implemented.)
Choose Box Font.
Clear: Choose boxes displayed in current font.
Set (default): Choose boxes displayed in mini-font.
Matrix Writer Object Type.
Clear: Matrix Writer returns arrays only, like the HP 48GX calculator.
Set: Matrix Writer returns a list of lists.
Assembler Mode.
Clear: Assembler defaults to making code objects.
Set: Assembler defaults to making System-RPL programs.
Messages Listed Numerically (continued)
# (hex)
BE35
BE36
BE37
BE38
BE39
BE3A
BE3B
BE3C
BE3D
BE3E
BE3F
BE40
BE41
BE42
BE43
BE44
BE45
BE46
BE47
BE48
BE49
BE4A
BE4B
BE4C
BE4D
BE4E
BE4F
BE50
BE51
BE52
BE53
BE54
BE55
BE56
BE57
BE58
BE59
Message
Tick spacing units are pixels?
Depnd:
Enter dependent var name
Enter minimum dep var value
Enter maximum dep var value
H-Var:
V-Var:
Enter max indep var increment
Choose horizontal variable
Choose vertical variable
0 INDEP
1 SOLN
SOLN(
X-Left:
X-Right:
Y-Near:
Y-Far:
Z-Low:
Z-High:
Enter minimum X view-volume val
Enter maximum X view-volume val
Enter minimum Y view-volume val
Enter maximum Y view-volume val
Enter minimum Z view-volume val
Enter maximum Z view-volume val
XE:
YE:
ZE:
Enter X eyepoint coordinate
Enter Y eyepoint coordinate
Enter Z eyepoint coordinate
Save Animation
Save animation data after plot?
XX-Left:
XX-Rght:
YY-Near:
YY-Far:
Error and Status Messages A-41
Flag
–53
–54
System Flags (continued)
Description
Precedence.
Clear: Certain parentheses in algebraic expressions suppressed to improve
legibility.
Set: All parentheses in algebraic expressions displayed.
Tiny Array Elements.
Clear: Singular values computed by RANK (and other commands that compute
the rank of a matrix) that are more than 1 × 10-14 times smaller than the largest
computed singular value in the matrix are converted to zero.
Automatic rounding for DET is enabled.
Set: Small computed singular values (see above) not converted. Automatic
rounding for DET is disabled.
–55
–56
–57
–58
–59
–60
–61
–62
–63
–64
C-4 System Flags
Last Arguments.
Clear: Command arguments saved.
Set: Command arguments not saved.
Error Beep.
Clear: Error, key click and BEEP-command beeps enabled.
Set: Error, key click and BEEP-command beeps suppressed.
Alarm Beep.
Clear: Alarm beep enabled.
Set: Alarm beep suppressed.
Verbose Messages.
Clear: Parameter variable data automatically displayed.
Set: Automatic display of parameter variable data is suppressed.
No longer used. (It was the Fast Catalog/Browser Display flag in the HP 48SX/GX).
Alpha Lock.
Clear: Single-Alpha activated by pressing ~once. Alpha lock activated by
pressing ~ twice.
Set: Alpha lock activated by pressing ~once. (Single-Alpha not available.)
User-Mode Lock.
Clear: 1-User mode activated by pressing „Ìonce. User mode activated by
pressing „Ìtwice.
Set: User mode activated by pressing „Ìonce.
(1-User mode not available.)
User Mode.
Clear: User mode not active.
Set: User mode active.
Vectored `.
Clear: ` evaluates command line.
Set: User-defined ` activated.
Index Wrap Indicator.
Clear: Last execution of GETI or PUTI did not increment index to first element.
Set: Last execution of GETI or PUTI did increment index to first element.
Messages Listed Numerically (continued)
# (hex)
BF07
BF08
BF09
BF0A
BF0B
BF0C
BF0D
BF0E
BF0F
BF10
BF11
BF12
BF13
BF14
BF15
BF16
BF17
BF18
BF19
BF1A
BF1B
BF1C
BF1D
BF1E
BF1F
BF20
BF21
BF22
BF23
BF24
BF25
BF26
BF27
BF28
BF29
BF2A
BF2B
Message
Enter value or press SOLVE
Eq:
Enter function to solve
Funcs in
Solver Variable Order
Variables:
Enter order of vars to display
SOLVE Y'(T)=F(T,Y)
f:
ˆfˆy:
ˆfˆt:
Indep:
Init:
Final:
Soln:
Tol:
Step:
Stiff
Enter function of INDEP and SOLN
Enter derivative w.r.t. SOLN
Enter derivative w.r.t. INDEP
Enter independent var name
Enter initial indep var value
Enter final indep var value
Enter solution var name
Enter initial solution var value
Press SOLVE for final soln value
Enter absolute error tolerance
Enter initial step size
Calculate stiff differential?
f
Tolerance
Solution
SOLVE AN·X^N+…+A1·X+A0
Coefficients [ an … a1 a0 ]:
Roots:
Enter coefficients or press SOLVE
Error and Status Messages A-43
Flag
–20
–21
–22
–23
–24
–25
–26
–27
–28
–29
–30
–31
–32
–33
–34
–35
C-2 System Flags
System Flags (continued)
Description
Underflow Exception.
Clear: Underflow exception returns 0, sets flag –23 or –24.
Set: Underflow exception treated as an error.
Overflow Exception.
Clear: Overflow exception returns ± 9.99999999999E499 and sets flag –25.
Set: Overflow exception treated as an error.
Infinite Result Exception.
Clear: Infinite result exception treated as an error.
Set: Infinite result exception returns ± 9.99999999999E499 and sets flag –26.
Negative Underflow Indicator.
Positive Underflow Indicator.
Overflow Indicator.
Infinite Result Indicator.
When an exception occurs, corresponding flag (–23 through –26) is set only if
the exception is not treated as an error.
Display of symbolic complex numbers.
Clear: Displays symbolic complex numbers in coordinate form (i.e. '(x,y)').
Set (default): Displays symbolic complex numbers using 'i' (i.e. 'x+y*i').
Simultaneous Plotting of Multiple Functions.
Clear: Multiple equations are plotted serially.
Set: Multiple equations are plotted simultaneously.
Draw Axes.
Clear: Axes are drawn for two-dimensional and statistical plots.
Set: Axes are not drawn for two-dimensional and statistical plots.
Not used.
Curve Filling.
Clear: Curve filling between plotted points enabled.
Set: Curve filling between plotted points suppressed.
Graphics Cursor.
Clear: Graphics cursor always dark.
Set: Graphics cursor dark on light background and light on dark background.
I/O Device.
Clear: I/O directed to USB/serial port.
Set: I/O directed to IrDA port.
Printing Device.
Clear: Prints via IR to the HP 82240 printer. Flag –33 is ignored.
Set (default): Printer output directed to USB/serial port if flag –33 is clear, or to
IrDA compatible printer otherwise.
Kermit I/O Data Format.
Clear: Objects transmitted in ASCII form.
Set: Objects transmitted in binary (memory image) form.
Messages Listed Numerically (continued)
# (hex)
BF51
BF52
BF53
BF54
BF55
BF56
C001
Message
Interest:
Balance:
Enter no. of payments to amort
Principal
Interest
Balance
Unable to find root
CAS Messages
DE01
DE02
DE03
DE04
DE05
DE06
DE07
DE08
DE09
DE0A
DE0B
DE0C
DE0D
DE0E
DE0F
DE10
DE11
DE12
DE13
DE14
DE15
DE16
DE17
DE18
DE19
DE1A
DE1B
DE1C
DE1D
denominator(s)
root(s)
last
obvious
factorizing
value
test(s)
searching
TAYLR of ↓ at
nth
is
numerator(s)
Less than
multiplicity
list of
at
factor(s)
Eigenvalues
Computing for
Root mult <
Numerical to symbolic
Invalid operator
Result:
Pivots
Press CONT to go on
Test
To be implemented
Unable to factor
Z is not = 1 mod 4
Error and Status Messages A-45
Properties of Elements
Property
Type of
Object *
Messages Listed Numerically (continued)
Property
Number
Atomic Number
Real
1
Mass Number †
Real
2
Atomic Weight
Unit
3
Density †
Unit
4
Oxidation States †
String
5
Electron Configuration
String
6
State
String
7
Melting Point
Unit
8
Boiling Point
Unit
9
Heat of Vaporization
Unit
10
Heat of Fusion
Unit
11
Specific Heat
Unit
12
Group (U.S. Customary)
String
13
Family
String
14
Crystal Structure
String
15
Atomic Volume †
Unit
16
Unit
17
Unit
18
Thermal Conductivity †
Unit
19
Electrical Conductivity †
Unit
20
First Ionization Potential
Unit
21
Electronegativity (Pauling’s number)
Unit
22
Oxide Behavior
String
23
Element Name ‡
String
24
Element Symbol ‡
Name
25
* Properties returning unit objects return real objects if units aren’t used.
Unknown values are returned as the string "-".
† See the notes that follow this table.
‡ Not included in catalog of properties, but listed in the title of the catalog.
Notes about properties: Mass number for a stable element is based on the isotope with the highest percent
abundance; for a radioactive element, it’s based on the longest half-life. Density for a gas is at 273 K with units of
g/l; for others, it’s at 300 K with units of g/cm3. Oxidation states are in order of most stable to least stable. Atomic
volume for a gas is for its liquid state at the boiling point; for others, it’s dervied from the density at 300 K. Thermal
conductivity is measured at 300 K. Electrical conductivity is measured at 293 K.
# (hex)
DE43
DE44
DE45
DE46
DE47
DE48
DE49
DE4A
DE4B
DE4C
DE4D
DE4E
DE4F
DE50
DE51
DE52
DE53
DE54
DE55
DE56
DE57
DE58
DE59
DE5A
DE5B
DE5C
DE5D
DE5E
DE5F
DE60
DE61
DE62
DE63
DE64
DE65
DE66
Message
Numeric input
Singularity! Continue?
Cancelled
Negative integer
Parameter is cur. var. dependent
Unsimplified sqrt
Non polynomial system
Unable to solve ODE
Array dimension too large
Unable to reduce system
Complex number not allowed
Polyn. valuation must be 0
Mode switch not allowed here
Non algebraic in expression
Purge current variable
Reduction result
Matrix not diagonalizable
Int[u'*F(u)] with u=
Int. by part u'*v, u=
Square root
Rational fraction
Linearizing
Risch alg. of tower
Trig. fraction, u=
Unknown operator (DOMAIN)
Same points
Unsigned inf. Solve?
CAS not available
Can not store current var
Not available on the HP40G
Not available on the HP49G
SERIES remainder is O(1) at order 3
Delta/Heaviside not available fromHOME
Warning, integrating in approx mode
Function is constant
Can not unbind local vars
Data in the Periodic Table application is based on the “Periodic Table of the Elements” published by Sargent-Welch
Scientific Company, a VWR Company, and is used by permission.
B-6 Tables of Units and Constants
Error and Status Messages A-47
Units (continued)
Unit (Full Name)
Messages Listed Numerically (continued)
Value in SI Units
rd (rod)
5.02921005842 m
rem (rem)
.01 m2 / s2
rpm (revolutions per minute)
60 1 / s
s (second)
1s
S (siemens)
1 A2•s3 / kg•m2
sb (stilb)
10000 cd / m2
slug (slug)
14.5939029372 kg
1 sr
st (stere)
1 m3
St (stokes)
.0001 m2 / s
Sv (sievert)
1 m2 / s2
t (metric ton)
1000 kg
T (tesla)
1 kg / A•s2
tbsp (tablespoon)
1.47867647813 x 10-5 m3
therm (EEC therm)
105506000 kg•m2 / s2
ton (short ton)
907.18474 kg
tonUk (long ton (UK))
1016.0469088 kg
torr (torr (mmHg))
133.322368421 kg / m•s2
tsp (teaspoon)
4.92892159375 x 10-6 m3
u (unified atomic mass)
1.6605402 x 10-27 kg
V (volt)
1 kg•m2 / A•s3
W (watt)
1 kg•m / s3
Wb (weber)
1 kg•m2 / A•s2
yd (international yard)
.9144 m
yr (year)
31556925.9747 s
? (undefined)
undefined unit
B-4 Tables of Units and Constants
# (hex)
DF23
DF24
DF25
DF26
DF27
DF28
DF29
DF2A
DF2B
DF2C
DF2D
DF2E
DF2F
DF30
DF31
DF32
Message
RECV
HALT
VIEW
EDITB
LIST
SORT
XSEND
CHDIR
CANCL
OK
CHECK
WARNING: Formatting
will erase the SD card
Do you want to continue?
FORMAT
Constants Library Messages
E101
E102
E103
E104
E105
E106
E107
E108
E109
E10A
E10B
E10C
E10D
E10E
E10F
E110
E111
E112
E113
E114
E115
E116
Boltzmann
molar volume
universal gas
std temperature
std pressure
Stefan-Boltzmann
speed of light
permittivity
permeability
accel of gravity
gravitation
Planck's
Dirac's
electronic charge
electron mass
q/me ratio
proton mass
mp/me ratio
fine structure
mag flux quantum
Error and Status Messages A-49
Units (continued)
Unit (Full Name)
oF
(degrees Fahrenheit)
Value in SI Units
0.555555555556 K or
255.927777778 K
1.82880365761 m
fbm (board foot)
.002359737216 m3
fc (footcandle)
10.7639104167 cd•sr / m2
96487 A•s
fermi (fermi)
1 x 10-15 m
3.42625909964 cd / m2
ft (international foot)
.3048 m
ftUS (survey foot))
.304800609601 m
g (gram)
.001 kg
ga (standard freefall)
9.80665 m / s2
gal (US gallon)
.003785411784 m3
.00454609 m3
galUK (UK gallon)
.004546092 m3
gf (gram-force)
.00980665 kg•m / s2
gmol (gram-mole)
1 mol
1.57079632679 x 10-2 r
grain (grain)
.00006479891 kg
Searching
E501
E502
E503
E601
E602
E603
E604
E605
E606
E607
E608
E609
E60A
E60B
E60C
E60D
No Solution
Undefined Element
Undefined Property
Financial Solver Messages
Many or No Solutions
I%YR/PYR ‰ -100
Invalid N
Invalid PYR
Invalid #Periods
Undefined TVM Variable
END mode
BEGIN mode
payments/year
Principal
Interest
Balance
Development Library and Miscellaneous Messages
Gy (gray)
1 m2 / s2
H (henry)
1 kg•m2 / A2•s2
h (Hour)
3600 s
hp (horsepower)
745.699871582 kg•m2 / s3
Hz (hertz)
1/s
in (inch)
.0254 m
inHg (inches of mercury, 0 oC)
3386.38815789 kg / m•s2
inH2O (inches of water, 60 oF)
248.84 kg / m•s2
J (joule)
1 kg•m2 / s2
K (kelvins)
1K
kg (kilogram)
1 kg
kip (kilopound-force)
4448.22161526 kg•m /
knot (nautical miles per hour)
.514444444444 m / s
kph (kilometers per hour)
.277777777778 m / s
l (liter)
.001 m3
lam (lambert)
3183.09886184 cd / m2
lb (avoirdupois pound)
.45359237 kg
lbf (pound -force)
4.44822161526 kg•m / s2
B-2 Tables of Units and Constants
Message
E408
Periodic Table Messages
fath (fathom)
flam (footlambert)
Messages Listed Numerically (continued)
# (hex)
s2
10001
10002
10003
10004
10005
10006
10101
10102
10103
10104
10105
10106
10107
10108
10109
1010A
1010B
1010C
1010D
1010E
Invalid \$ROMID
Invalid \$TITLE
Invalid \$MESSAGE
Invalid \$VISIBLE
Invalid \$HIDDEN
Invalid \$EXTPRG
Invalid File
Too Many
Unknown Instruction
Invalid Field
Val betw 0-15 expected
Val betw 1-16 expected
Label Expected
Hexa Expected
Decimal Expected
Can't Find
{ expected
} expected
( expected
Error and Status Messages A-51
*104
*105
*106
*107
*108
*109
*110
111
112
113
114
115
116
117
old soft-menu I/O IOPAR (no choose-box version available)
old soft-menu I/O PRINT PRTPAR (no choose-box version available)
same result as LIB (no choose-box version available)
same result as LIB (no choose-box version available)
APPS 12 ("EQN LIBRARY")
APPS 12 EQLIB (APPS 12 1: "EQN LIB")
APPS 12 COLIB (APPS 12 2: "CON LIB")
APPS 12 MES (APPS 12 3: "MES LIB")
APPS 12 UTILS (APPS 12 4: "UTIL LIB")
These menus were first introduced in the HP 49G calculator.
*118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
*133
134
*135
*136
*137
*138
139
140
*141
*142
143
*144
*145
146
*147
148
*149
*150
151
152
153
abandoned UNITS TOOLS (see menu #59; "TOOLS")
APPS CAS (APPS 11: "CAS")
S.SLV (S.SLV: "S.SLV")
EXP&LN (EXP&LN: "EXP&LN")
TRIG (TRIG: "TRIG")
CALC (CALC: "CALC")
ALG (ALG: "ALG")
ARITH (ARITH: "ARITH")
ARITH POLY (ARITH 2: "POLYNOMIAL")
ARITH INTEG (ARITH 1: "INTEGER")
ARITH MODUL (ARITH 3: "MODULAR")
MATRICES (MATRICES: "MATRICES")
CMPLX (CMPLX: "COMPLEX")
CONVERT (CONVERT: "CONVERT")
RS&NUM.SLV (NUM.SLV: "NUM.SLV")
SYMB ARITH (SYMB 2: "SYMBOLIC ARITH")
abandoned SYMB CONV ("SYMBOLIC CONV")
abandoned SYMB DIFF or SYMB CALC ("SYMBOLIC CALC")
abandoned SYMB MATRX ("SYMBOLIC MAT")
abandoned SYMB MOD ("SYMBOLIC MOD")
SYMB TRIG (SYMB 6: "SYMBOLIC TRIG")
CONVERT TRIG (CONVERT 3: "TRIG CONVERT")
abandoned SYMB UNARY ("SYMBOLIC UNARY")
abandoned SYMB BASE (meaning basic, not binary; "SYMBOLIC BASE")
SYMB (SYMB: "SYMBOLIC")
abandoned PRG (the MODES menu is missing; "PROG")
abandoned PRG BRCH (like PRG BRCH but flat; "BRANCH")
MATRICES CREAT (MATRICES 1: "MATRIX CREATE")
abandoned MATRICES NORM menu (a subset of MATRICES OPER; "MATRIX NORM")
MATRICES FACT (MATRICES 3: "MATRIX FACTOR.")
abandoned MATRICES COL ("CREATE COL")
abandoned MATRICES ROW ("CREATE ROW")
SYMB ALG (SYMB 1: "SYMBOLIC ALGEBRA")
SYMB CALC (SYMB 3: "SYMBOLIC CALC")
SYMB GRAPH (SYMB 4: "SYMBOLIC GRAPH")
D
D. Reserved Variables
The calculator uses the following reserved variables. These have specific purposes, and their names are used as implicit
arguments for certain commands. Avoid using these variables’ names for other purposes, or you may interfere with
the execution of the commands that use these variables.
You can change some of the values in these variables with programmable commands, while others require you to
store new values into the appropriate place.
System Reserved Variables
Most system reserved variables (except ALRMDAT, IOPAR and PRTPAR ) can be stored with different contents
in different directories. This allows you, for example, to save several sets of statistical data in different directories.
Reserved Variable
What It Contains
Used By
αENTER
Program run on ENTER.
Vectored ENTER
ALRMDAT
Alarm parameters.
TIME ALRM operations
βENTER
Program run after ENTER.
Vectored ENTER
CASDIR (directory)
Directory containing reserved Computer Algebra System
CAS variables.
CST
List defining the CST
“der”- names
User-defined derivative.
∂
EQ
Current equation.
ROOT, DRAW
EXITED
Program run after EDIT.
EDIT
EXPR
Current expression.
SYMBOLIC
IOPAR
I/O parameters.
I/O commands
MASD.INI
Valid source code.
Compiler
MHpar
Minehunt game status.
MINEHUNT
Mpar
Multiple-Equation Solver
equations.
EQ LIB
n1, n2, …
Arbitrary integers.
Nmines
Minehunt game data.
MINEHUNT
Reserved Variables D-1
These menus are mostly compatible with the menus in the HP 48G series.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
* 30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CUSTOM (no choose-box version available)
VAR (no choose-box version available)
MTH (or APPS 10: "MATH")
MTH VECTR (MTH 1: "VECTOR")
MTH MATRX (MTH 2: "MATRIX")
MTH MATRX MAKE (MTH 2 1: "MATRIX MAKE")
MTH MATRX NORM (MTH 2 2: "MATRIX NORM")
MTH MATRX FACTR (MTH 2 3: "MATRIX FACTOR.")
MTH MATRX COL (MTH 2 4: "CREATE COL")
MTH MATRX ROW (MTH 2 5: "CREATE ROW")
MTH LIST (MTH 3: "LIST")
MTH HYP (MTH 4: "HYPERBOLIC")
MTH NXT PROB (MTH 7: "PROBABILITY")
MTH REAL (MTH 5: "REAL")
[MTH] BASE (MTH 6 or BASE: "BASE")
[MTH] BASE NXT LOGIC (MTH 6 7 or BASE 7: "LOGIC")
[MTH] BASE NXT BIT (MTH 6 8 or BASE 8: "BIT")
[MTH] BASE NXT BYTE (MTH 6 9 or BASE 9: "BYTE")
MTH NXT FFT (MTH 8: "FFT")
MTH NXT CMPLX (MTH 9: "COMPLEX")
MTH NXT CONST (MTH 10: "CONSTANTS")
PRG (PRG: "PROG")
PRG BRCH (PRG 3: "BRANCH")
PRG BRCH IF (PRG 3 1: "IF")
PRG BRCH CASE (PRG 3 2: "CASE")
PRG BRCH START (PRG 3 3: "START")
PRG BRCH FOR (PRG 3 4: "FOR")
TOOL EDIT (no choose-box version available)
PRG BRCH DO (PRG 3 5: "DO")
old soft-menu solver (no choose-box version available)
PRG BRCH WHILE (PRG 3 6: "WHILE")
PRG TEST (PRG 4: "TEST")
PRG TYPE (PRG 5: "TYPE")
PRG LIST (PRG 6: "LIST")
PRG LIST ELEM (PRG 6 1: "ELEMENT")
PRG LIST PROC (PRG 6 2: "PROC")
PRG NXT GROB (PRG 7: "GROB")
PRG NXT PICT (PRG 8: "PICTURE")
PRG NXT IN (PRG 11: "INPUT")
PRG NXT OUT (PRG 12: "OUTPUT")
PRG NXT NXT RUN (no choose-box version available)
[CONVERT] UNITS (CONVERT 1 or UNITS: "UNITS")
[CONVERT] UNITS LENG (CONVERT 1 2 or UNITS 2: "LENGTH")
[CONVERT] UNITS AREA (CONVERT 1 3 or UNITS 3: "AREA")
[CONVERT] UNITS VOL (CONVERT 1 4 or UNITS 4: "VOLUME")
[CONVERT] UNITS TIME (CONVERT 1 5 or UNITS 5: "TIME")
[CONVERT] UNITS SPEED (CONVERT 1 6 or UNITS 6: "SPEED")
[CONVERT] UNITS NXT MASS (CONVERT 1 7 or UNITS 7: "MASS")
[CONVERT] UNITS NXT FORCE (CONVERT 1 8 or UNITS 8: "FORCE")
[CONVERT] UNITS NXT ENRG (CONVERT 1 9 or UNITS 9: "ENERGY")
Parameter (Command)
date (→DATE)
Time (→TIME)
action
Repeat
Description
A real number specifying the
date of the alarm:
MM.DDYYYY (or DD.
MMYYYY if flag –42 is set).
If YYYY is not included, the
current year is used.
A real number specifying the
time of the alarm:
HH. MMSS.
A string or object:
a string creates an
appointment alarm, which
beeps and displays the
string
any other object creates a
control alarm, which executes
the object
A real number specifying the
interval between automatic
recurrences of the alarm,
given in ticks (a tick is 1/8192 of
a second).
Default Value
Current date.
00.0000
Empty string (appointment
alarm).
0
Parameters without commands can be modified with a program by storing new values in the list contained in
ALRMDAT (use the PUT command).
βENTER
This is the vectored ENTER post-processor. If flags –62 and –63 are set and ENTER is pressed, the command that
triggered the command-line processing is put on the stack as a string and ßENTER is evaluated.
CST
CST contains a list (or a name specifying a list) of the objects that define the CST (custom) menu. Objects in the
Names behave like the VAR menu keys. Thus, if ABC is a variable name, %ABC% evaluates ABC, … %ABC%
recalls its contents, and „ %ABC% stores new contents in ABC.
The menu label for the name of a directory has a bar over the left side of the label; pressing the menu key
switches to that directory.
Unit objects act like unit catalog entries (and have left-shifted conversion capabilities, for example).
String keys echo the string.
You can include backup objects in the list defining a custom menu by tagging the name of the backup object with
its port location.
Reserved Variables D-3
In the first page of the PRG BRCH menu, pressing the shift keys before pressing any menu key provides a handy
typing shortcut for programmers. In all these cases, the cursor is placed at the end of the first command. Thus these
shifted keys can be thought of as “program structure delimiters”. While entering a program,
! IF
@ IF
! CASE
@ CASE
! START
@ START
! FOR
@ FOR
! DO
! WHILE
! IFERR
@ IFERR
types
types
types
types
types
types
types
types
types
types
types
types
IF THEN END
IF THEN ELSE END
CASE THEN END END
THEN END
START NEXT
START STEP
FOR NEXT
FOR STEP
DO UNTIL END
WHILE REPEAT END
IFERR THEN END
IFERR THEN ELSE END
Parameter (Command)
Default Value
The baud rate: 2400, 4800, 9600, 14400,
19200, 38400 or 115200.
parity (PARITY)
The parity used: 0=none, 1=odd, 2=even,
0
3=mark, 4=space. The value can be positive
or negative: a positive parity is used upon
both transmit and receive; a negative parity
is used only upon transmit.
Controls whether receive pacing is used: a
nonzero real value enables pacing, while
zero disables it. Receive pacing sends an
XOFF signal when the receive buffer is
almost full, and sends an XON signal when
it can take more data again. Pacing is not
used for Kermit I/O, but is used for other
serial I/O transfers.
transmit pacing
Controls whether transmit pacing is used: a 0 (no pacing)
nonzero real value enables pacing, while
zero disables it. Transmit pacing stops
transmission upon receipt of XOFF, and
resumes transmission upon receipt of XON.
Pacing is not used for Kermit I/O, but is
used for other serial I/O transfers.
checksum (CKSM)
Error-detection scheme requested when
initiating SEND:
1=1-digit arithmetic checksum
2=2-digit arithmetic checksum
3=3-digit cyclic redundancy check.
3
translation code (TRANSIO)
Controls which characters are translated:
0=none
1=translate character 10 (line feed only)
to / from characters 10 and 13 (line feed
and carriage return)
2=translate characters with numbers 128
through 159 (80-9F hex)
3=translate characters with numbers 128
through 255.
1
In the EDIT menu, @ %±SKIP% and @ %SKIP²% perform skip-to-beginning and skip-to-end of line,
respectively, and @ %±DEL% and @ %DEL²% perform delete-to-beginning and delete-to-end of line, respectively.
@%GOTO% is a shortcut for GOTO LABEL.
In the units menus, pressing a unit menu key multiplies by that unit, whereas @%UNIT% divides by that unit.
! %UNIT% converts to that unit, if possible.
Description
baud (BAUD)
In program mode, @%UNIT% returns '1_unit' /, while ! %UNIT% returns '1_unit' CONVERT,
where “unit” is the unit corresponding to the menu key.
115200
0 (no pacing)
Parameters without commands can be modified with a program by storing new values in the list contained in
IOPAR (use the PUT command), or by editing IOPAR directly.
G-4 Keyboard Shortcuts
Reserved Variables D-5
Other keyboard shortcuts
Keycode
Keystroke
Definition
11.21
through
22.21
! & A through F
Accesses the graphing input forms
!&£
(!& H)
23.21
!&¥
(!&I)
Toggles real/complex mode (flag –103)
25.1
—
31.21
!& §
(!& J)
HOME
33.21
!&«
(!& L)
34.1
š
PICTURE
35.1
˜
EDITB
35.2
!˜
VISIT for variables, EDIT for everything else.
35.21
!& ˜
VISITB for variables, EDITB for everything else.
35.3
@˜
If the current menu has a special info-screen, this
displays it; otherwise, the menu itself is displayed fullscreen, with the VAR menu also showing the beginning
of each object.
36.1
™
If no command line, performs SWAP in RPN mode
36.3
@™
If no command line, XSERV
36.31
@& ™
If no command line, SERVER
42.31
@&±
(@& N)
43.31
@& ³
(
43.61
If no command line, interactive stack (same as M
key)
@ & O)
Ω (omega)
ƒ
If no command line, performs DROP in RPN mode
45.2
!¶
(!ƒ)
If no command line, clears the stack
45.3
@·
(@ƒ)
If no command line, clears the stack
62.1
W
Toggles through available values when cursor is on a
choose field. For example, HW will change
operating modes from RPN to algebraic, or algebraic to
RPN.
72.5
through
74.5
72.31
~! 7, 8, or 9
Modifies the most recent letter on the command line to
add a diacritical mark to the character.
@&Ï
(@& 7)
74.31
@& Ó
(@& 9)
84.61
[email protected]& 6
Default Value
A complex number specifying the lower left corner of
PICT (the lower left corner of the display range).
(xmax, ymax) (XRNG,
YRNG)
A complex number specifying the upper right corner of
PICT (the upper right corner of the display range).
indep (INDEP)
A name specifying the independent variable, or a list
containing that name and two numbers that specify the
minimum and maximum values for the independent
variable (the plotting range).
res (RES)
Resolution. A real number specifying the interval
0
between values of the independent variable. For plots of
equations, this determines the plotting interval along the
x-axis. A binary number specifies the pixel resolution
(how many columns of pixels between points). An
integer specifies the resolution in user units (how many
user units between points). Resolution for statistical
plots is different (see below).
axes (AXES)
A complex number specifying the user-unit coordinates
of the plot origin, or a list containing the following:
the complex number specifying the origin
a real number, binary integer, or list containing two
real numbers or binary integers specifying the tickmark annotation (see ATICK)
two strings specifying labels for the horizontal and
vertical axes
(0, 0)
ptype
(BAR, etc.)
A command name specifying the plot type (BAR,
CONIC, DIFFEQ, FAST3D, FUNCTION,
GRIDMAP, HISTOGRAM, PARAMETRIC,
PARSURFACE, PCONTOUR, POLAR, SCATTER,
SLOPEFIELD, TRUTH, WIREFRAME, or YSLICE).
FUNCTION
depend (DEPND)
A name specifying the dependent variable, or a list
containing the name and two numbers that specify
vertical plotting range. For DIFFEQ, the second
element of the list may also be a real vector that
represents the initial value.
Y
` ` (places back-tics on the command line)
[email protected]& O
Description
(xmin, ymin) (XRNG,
YRNG)
45.1
G-2 Keyboard Shortcuts
Parameter
(Command)
(–6.5, –3.1) 48gII
(–6.5, –3.9) 49g+
(–6.5, –3.9) 50g
(6.5, 3.2) 48gII
(6.5, 4.0) 49g+
(6.5, 4.0) 50g
X
Parameters without commands can be modified with a program by storing new values in the list contained in PPAR
(use the PUT command).
° (degree symbol)
Reserved Variables D-7
_ (Attach Unit). This command will create unit objects in parallel only if level 1 contains a list. Thus 1 { ft
in m } _ produces { 1_ft 1_in 1_m } while { 1 2 3 } 'm' _ produces an error.
STO+. STO+ performs parallel list addition only if both arguments are lists. If one argument is a list and the
other is not, STO+ appends the non-list argument to each element in the list.
STO-, STO*, STO/. These commands perform parallel processing if both arguments are lists, but fail otherwise.
Using DOLIST for Parallel Processing
Almost any command or user program can be made to work in parallel over a list or lists of data y using the
DOLIST command. Use DOLIST as follows.
Level 1 must contain a command, a program object, or the name of a variable that contains a command or
program object.
Level 2 must contain an argument count unless the level 1 object is a command that accepts parallel processing,
or a user-defined function. In these special cases, Level 2 contains the first of the list arguments.
If level 2 was the argument count, then level 3 is the first of the argument lists. Otherwise, levels 2 through are the
argument lists.
As an example, the following program takes three objects from the stack, tags them with the names a, b, and c,
and displays them one after the other in line 1 of the display.
« → a b c
« { a b c } DUP « EVAL » DOLIST
SWAP « →TAG » DOLIST
CLLCD 1 « 1 DISP 1 WAIT » DOLIST
»
»
STARTEQW
If it exists, the STARTEQW variable is evaluated whenver an element in the Equation Writer is selected.
STARTERR
If it exists, the STARTERR variable is evaluated whenever an error message is displayed.
STARTOFF
If it exists, the STARTOFF variable is evaluated when the calculator turnsoff automatically.
STARTRECV
If it exists, the STARTRECV variable is evaluated when the user presses RECV from inside the Filer. It takes as an
argument, the selected argument’s name.
STARTSEND
If it exists, the STARTSEND variable is evaluated when the user presses SEND from inside the Filer. It takes as
arguments the selected object and its name.
STARTUP
If it exists, the STARTUP variable is evaluated when the calculator warm starts. Objects placed on the stack in the
STARTUP routine cannot be expected to remain on the stack after the calculator starts.
s1, s2, 7
The ISOL and QUAD commands return general solutions (as opposed to principal solutions) for operations. A
general solution contains variables for arbitrary integers or arbitrary signs or both.
The variable s1 represents an arbitrary + or – sign. Additional arbitrary signs are represented by s2, s3, etc.
If flag –1 is set, the ISOL and QUAD return principal solutions, in which case the arbitrary sign is always +1.
TOFF
TOFF contains a binary integer #xxxxh that defines the number of clock ticks until the next calculator auto shutoff
(with a default of 5 minutes or 6*60*8192 ticks)
F-4 Parallel Processing with Lists
Reserved Variables D-9
integer matrix having 3 rows and 4 columns. Since these commands can normally use lists as arguments, they
cannot perform parallel processing, except by using DOLIST.
Program control commands. Program control structures and commands do no perform parallel processing
and cannot be forced to do so. However, programs containing these structures can be made to parallel process by
using DOLIST. For example, { 1 2 3 4 5 6 } 4 « IF DUP 3 ‰ THEN DROP END »
DOLIST returns { 3 4 5 6 }.
Group 3: commands that sometimes work with parallel processing
Graphics commands that can take pixel coordinates as arguments expect those coordinates to be presented as
two-element lists of binary integers. Since these commands can normally use lists as arguments, they cannot
parallel process, except by using DOLIST.
For the two-argument graphics commands (BOX, LINE, TLINE), if either argument is not a list (a complex
number, for example), then the commands will parallel process, taking the list argument to be multiple complex
number coordinates. For example, (0,0) {(1,1) (3,2)} LINE will draw two lines — between (0,0)
and (1,1) and between (0,0) and (3,2).
On HP 48S and HP 48SX calculators, the + command has been used to append lists or to append elements to
lists. Thus { 1 2 3 } 4 + returns { 1 2 3 4 }. With the advent of parallel processing in the HP 48G
This has several ramifications:
To add two lists in parallel, you must do one of the following:
Assign the ADD command to a user-defined key.
User programs must be written using ADD instead of + if the program is to be able to perform direct parallel
processing, or written with + and applied to their arguments by using DOLIST. For example, programs such as «
→x 'x+2' » will produce list concatenation when x is a list rather than parallel addition, unless rewritten as «
→ x 'x ADD 2' »
Algebraic expressions capable of calculating with variables containing lists (including those intended to become
user-defined functions) cannot be created in RPN syntax since using ADD to add two symbolic arguments
concatenates the arguments with + rather than with ADD. For example, 'X' DUP 2 ^ SWAP 4 * ADD
'F(X)' SWAP = produces 'F(X)=X^2+4*X' rather than 'F(X)=X^2 ADD 4*X'.
Use
Create
Group 5: Commands that set modes / states
Commands that store values in system-specific locations so as to control certain modes and machine states can
generally be used to parallel process data. The problem is that each successive parameter in the list cancels the
setting established by the previous parameter. For example, { 1 2 3 4 5 } FIX is effectively the same as 5
FIX.
ZPAR
ZPAR is a variable in the current directory. It contains a list of zooming parameters used by the DRAW command
for all 2-D mathematical and statistical plots.
Parameter
(Command)
Description
Default Value
h-factor
Real number that specifies the horizontal zoom factor.
4
v-factor
Real number that specifies the vertical zoom factor.
4
recenter flag
0 or 1 depending on whether the recenter at crosshairs
option was selected in the set zoom factors input form.
0
{ list }
An empty list, or a copy of the last PPAR.
Use the set zoom factors input form ( ZFACT ) to modify ZPAR.
ΣDAT
ΣDAT is a variable in the current directory that contains either the current statistical matrix or the name of the
variable containing this matrix. This matrix contains the data used by the Statistics applications.
var1
var2
…
varm
x11
x21
…
xm1
x12
x22
…
xm2
x1n
x2n
…
xmn
Statistical Matrix for Variables 1 to m
You can designate a new current statistical matrix by entering new data, editing the current data, or selecting another
matrix.
The command CLΣ clears the current statistical matrix.
Group 6: One-argument, one-result commands
These commands are the easiest to use with parallel processing. Simply provide the command with a list of
arguments instead of the expected single argument. Some examples:
{ 1 -2 3 -4 }returns { 1 2 3 4 }
DEG { 0. 30. 60. 90. } SIN returns { 0. .5 .866025403784 1. }
{ 1 A 'SIN(Z)'} INV returns { 1 'INV(A)' 'INV(SIN(Z))' }
F-2 Parallel Processing with Lists
Reserved Variables D-11
Source References
CASDIR Reserved Variables
The following references were used as sources for many of the constants and equations used in the calculator. (See
“References” in chapter 5, “Equation Reference,” for the references used as sources for the Equation Library.)
The Computer Algebra System stored its reserved variables in a special directory called CASDIR.
Reserved Variable
1. E.A. Mechtly. The International System of Units, Physical Constants and Conversion Factors, Second Revision. National
Aeronautics and Space Administration, Washington DC, 1973.
2. The American Heritage Dictionary. Houghton Mifflin Company, Boston, MA, 1979.
3. American National Standard Metric Practice ANSI/IEEE Std 268-1982. The Institute of Electrical and Electronics
Engineers, Inc., New York, 1982.
4. ASTM Standard Practice for Use of the International System of Units (SI) E380-89a. American Society for Testing and
5. Handbook of Chemistry and Physics, 64th Edition, 1983-1984. CRC Press, Inc, Boca Raton, FL, 1983.
6. International Standard publication No. ISO 31/l-1978 (E).
7. The International System of Units (SI), Fourth Edition. The National Bureau of Standards Special Publication 330,
Washington D.C., 1981.
8. National Aerospace Standard. Aerospace Industries Association of America, Inc., Washington D.C., 1977.
9. Physics Letters B, vol 204, 14 April 1988 (ISSN 0370-2693).
What It Contains
Used By
CASINFO
Graphic display temporary
storage.
Step-by-step operations
ENVSTACK
Flags and current path.
PUSH, POP
EPS
Maximum coefficient to
round to zero.
EPSX0
IERR
Error of integration
Numerical integration
operations
MODULO
The current modulus.
MOD functions
PERIOD
Period for periodic
operations.
Various CAS operations
PRIMIT
Anti-derivative temporary
storage.
Various CAS operations
REALASSUME
List of variables to treat as
real numbers in complex
mode.
Various CAS operations
VX
Default variable for symbolic
operations.
Various CAS operations
Contents of the CASDIR Reserved Variables
CASINFO
CASINFO provides temporary storage for the graphic display during step-by-step operations.
ENVSTACK
ENVSTACK is a variable stored in the CAS directory. It is used by PUSH and POP to save the status of flags and
the current directory. (PUSH saves the data in ENVSTACK; POP restores it.)
EPS
EPS contains a real number specifying that coefficients in a polynomial smaller than this value are replaced with 0.
It is used by the EPSX0 command. The default value is 1E-10.
IERR
IERR contains the error tolerance of integration during numeric integration.
E-6 Technical Reference
Reserved Variables D-13
E
Trigonometric Expansions
The following tables list expansions for trigonometric functions in Radians mode when using the →DEF, TRG*,
and →TRG operations. These operations appear in the Equation Writer RULES menu.
→DEF Expansions
Function
Expansion
SIN (x)
EXP ( x × i ) – EXP ( – ( x × i ) )
--------------------------------------------------------------------2×i
COS (x)
EXP ( x × i ) + EXP ( – ( x × i ) )
--------------------------------------------------------------------2×i
EXP ( x × i × 2 ) – 1
----------------------------------------------------------( E XP ( x × i × 2 ) + 1 ) × i
TAN (x)
SINH(x)
COSH(x)
TANH(x)
ASIN(x)
CO S ( x × i )
TA ( x × i ) × – i
2
– i × L ( 1 – x + i × x )
π
2
--- + i × L ( 1 – x + i × x )
2
ATAN(x)
 ( 1 + i × x )
– i × L  ------------------------
 1 + x2 
ACOSH(x)
ATANH(x)
2
– L ( 1 + x – x )
2
π
2
–  --- + i × L ( 1 – x + i × x )
2
 ( 1 – x) 
– L  ------------------
 1 – x 2
TRG* Expansions
Function
SIN (x + y)
COS (x + y)
TAN (x + y)
SINH(x + y)
COSH(x + y)
TANH(x + y)
Expansion
SI ( x ) × COS ( y ) + COS ( x ) × SI ( x )
Function
E-4 Technical Reference
Object Sizes
The following table lists object types and their size in bytes. (Note that characters in names, strings, and tags use 1
byte each.)
Object Size
Object Type
Algebraic
Backup Object
Binary Integer
Command
Complex matrix
Complex number
Complex vector
Directory
Graphics Object
COS ( x ) × COS ( y ) + SI ( x ) × SI ( y )
TA ( x ) + TA ( y )
-----------------------------------------------------1 – TA ( x ) × TA ( y )
SI H ( x ) × CO S H ( y ) + COSH ( x ) × SIH ( x )
COSH ( x ) × CO S H ( y ) + SIH ( x ) × SIH ( y )
TA H ( x ) + TAH ( y )
---------------------------------------------------------------1 + TAH ( x ) × TAH ( y )
→TRG Expansions
EXP (x)
This appendix contains the following information:
Object sizes.
Symbolic integration patterns used by the calculator.
Trigonometric expansions used by the calculator.
Precedence of operations.
References and as sources for constants and equations in the calculator
(other than those in the Equation Library).
– ( SI ( x × i ) × i )
ACOS(x)
ASINH(x)
E. Technical Reference
Expansion
x
x
C OS  -- + SI  -- × i
 i
 i
Integer
List
Matrix
Program
Quoted global or local
name
Real number
String
Tagged Object
Size (bytes)
5 + size of included objects
12 + number of name characters + size of
included object
13
2.5
15 + 16 × number of elements
18.5
12.5 + 16 × number of elements
6.5 + size of included variables + size of
variable names + 2.5 bytes for header
10 + number of rows × CEIL
(columns/8)
2.5 or (5 + 0.5 × number of digits)
5 + size of included objects
15 + 8 × number of elements
10 + size of included objects
8.5 + number of characters
2.5 or 10.5
5 + number of characters
3.5 + number of tag characters + size of
untagged object
Technical Reference E-1
Command
YSLICE
Type Library
C 171-11
Size Keys
YVOL
C
171-1
YYRNG
C
171-4
ZEROS
C
788-64
ZFACTOR
F
171-95
ZVOL
C
171-2
5.5 SYMB SOLVE
S.SLV NXT
«SOLVER»
5.5 APPS 12 UTILS
^
_
dB
A
F
F
2-73
2-267
171-105
e
F
2-66
gmol
F
171-102
i
F
2-67
lbmol
F
171-103
lim
F
788-5
qr
rpm
C
F
222-8
171-104
rref
C
788-71
|
F
2-255
2-256
√
∫
A
F
Σ
Σ+
F
C
2-79
2-252
2-253
2-254
2-286
Σ-
C
2-287
2.5 key 51.1: y^x
2.5 key 85.3
5.5 APPS 12 UTILS NXT
2.5 ALPHA-LS-E
MTH NXT CONST
«CONSTANTS»
5.5 APPS 12 UTILS NXT
2.5 key 23.2
CMPLX
MTH NXT CONST
«CMPLX»
«CONSTANTS»
5.5 APPS 12 UTILS NXT
5.5 SYMB CALC
CALC LIMIT
«DIFF» NXT
5.5 MATRICES FACT
5.5 APPS 12 UTILS NXT
5.5 SYMB SOLVE
MATRICES LIN-S
«MATR»
2.5 key 23.3
«ALGB» NXT
2.5 key 52.1
2.5 key 55.3
2.5 key 53.3
? First
85
48GX
2219.02
86
48GX
2219
86
48GX
2219
120.02 H 1.05
142.03
154
117
48GX
2219.16
86
48GX
2219
28C
28C
117.02
48GX
2219.18
21
28C
117.02
2219.18
21
130
48GX
28C
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
SYMB SOLVE (SYMB 5: "SYMBOLIC SOLVER")
SYMB NXT EXPLN (SYMB 7: "SYMBOLIC EXP & LN")
MATRICES OPER (MATRICES 2: "MATRIX OPERATIONS")
MATRICES LIN-S (MATRICES 5: "MATRIX LINEAR SYS.")
MATRICES NXT EIGEN (MATRICES 7: "MATRIX EIGENVECT.")
MATRICES NXT VECT (MATRICES 8: "MATRIX VECTOR")
TRIG HYP (TRIG 1: "TRIG HYPERBOLIC")
CALC DERIV (CALC 1: "DERIV. & INTEG.")
CALC LIMIT (CALC 2: "LIMITS & SERIES")
CALC DIFF (CALC 3: "DIFFERENTIAL EQNS")
MATRICES CREAT COL (MATRICES 1 1: "CREATE COL")
MATRICES CREAT ROW (MATRICES 1 2: "CREATE ROW")
APPS TIME TOOLS (APPS 5 4: "TIME")
CONVERT BASE (CONVERT 2: "BASE")
CONVERT BASE NXT LOGIC (CONVERT 2 3: "LOGIC")
CONVERT BASE NXT BIT (CONVERT 2 4: "BIT")
CONVERT BASE NXT BYTE (CONVERT 2 5: "BYTE")
CONVERT REWRITE (CONVERT 4: "REWRITE")
CONVERT MATRIX (CONVERT 5: "MATRIX CONVERT")
ARITH PERM (ARITH 4: "PERMUTATION")
MATRICES LINAP (MATRICES 6: "LINEAR APPL")
MTH SPECIAL (MTH 11: "SPECIAL FUNCTIONS")
CALC GRAPH (CALC 4: "SYMBOLIC GRAPH")
These menus do not exist and are available for future use by the operating system.
117.02
48GX
2219.18
136.03 H 1.20
152
163
148
H 1.20
117.02
48GX
2219.18
154
H 1.05
158
93.02
28C
28C
28C
91
97
91
97
28C
28C
The menus for built-in libraries with library numbers of 256 and higher can be accessed directly with their library
number. Libraries with library numbers under 256 can be accessed by adding 2048 to the library number.
256 Library 256: Development Library (not attached by default)
Note: Warmstart with B C and D held down forces "smart" mode, in which library 256
is attached and RPN mode is the default. When library 256 is attached, it is added
to the bottom of the APPS menu.
257 Library 257: MASD V5.2 Assembler (used internally by library 256; do not use)
258 Library 256: extable (not installed by default)
and installed separately.
788 Library 788: Computer Algebra System, an improved version of the Erable library
1792 Library 1792: Program structure commands (same as in 48S/G)
2050 Library 2: 48S command set + new ones
2057 Library 9: Statistical test functions (do not use)
2219 Library 171: 48G command set + new ones
2269 Library 221: Meta Kernel commands (not in any menus)
2270 Library 222: New commands & CAS messages
2275 Library 227: Equation Library + MINEHUNT (new in Version 2.00)
2277 Library 229: Periodic Table Library (new in Version 2.15)
2289 Library 241: Statistics commands
28C
Command
TRIGSIN
Type Library
C 788-29
Size Keys
5.5 TRIG NXT NXT
CONVERT TRIG NXT
«TRIGO» NXT NXT
5.5 TRIG NXT NXT
«TRIGO» NXT NXT
2.5 MTH MATRX MAKE
2.5 MTH REAL NXT NXT
5.5 «DIFF» NXT NXT
5.5 EXP&LN NXT
TRIG NXT NXT
CONVERT TRIG NXT NXT
«EXP&LN»
2.5 RS&TIME NXT NXT
PRG NXT NXT TIME NXT NXT
APPS 5 4 NXT NXT
2.5 PRG MEM DIR NXT
5.5 RS&NUM.SLV TVM SOLVR
TRIGTAN
C
788-30
TRN
TRNC
TRUNC
C
F
F
2-175
2-109
788-99
TRUTH
TSIMP
C
C
2-224
788-21
TSTR
C
2-29
TVARS
TVM
C
C
2-37
171-71
TVMBEG
C
171-72
TVMEND
C
171-73
TVMROOT
C
171-74
TYPE
C
2-166
UBASE
F
2-14
2.5 PRG TEST NXT
PRG TYPE NXT NXT
2.5 [CONVERT] UNITS TOOLS
UFACT
C
2-15
2.5 [CONVERT] UNITS TOOLS
UFL1→MINIF
UNASSIGN
UNASSUME
UNBIND
UNPICK
UNROT
UNTIL
C
F
F
C
C
C
C
221-20
222-49
222-39
222-61
2-395
2-394
1792-8
5.5
5.5
5.5
5.5
2.5
2.5
2.5
CAT
«ALGB» NXT
«TESTS»
CAT
PRG/TOOL STACK NXT
PRG/TOOL STACK
PRG BRCH DO
UPDIR
UTPC
UTPF
UTPN
UTPT
UVAL
C
C
C
C
C
F
2-35
2-308
2-310
2-309
2-311
2-12
2.5
2.5
2.5
2.5
2.5
2.5
key 31.2
MTH NXT PROB NXT
MTH NXT PROB NXT
MTH NXT PROB NXT
MTH NXT PROB NXT
[CONVERT] UNITS TOOLS
5.5 CAT
RS&NUM.SLV TVM LS-BEG
5.5 CAT
RS&NUM.SLV TVM RS-BEG
5.5 RS&NUM.SLV TVM
I
122.03
140.02
?
H
First
1.05
122.03
H
1.05
6
14.03
28C
48SX
H 1.05
This lists the calculator’s programmable commands in CAT order. Of the 818 commands, 808 are shown by CAT.
This list assumes that library 256 is attached, flag –95 is off, and flag –117 is set.
82
121.02
122.03
140.03
48SX
H 1.05
Each command identifies its menu path or key sequence (if any) with alternatives on additional lines. “/” means
“either”. The most efficient key sequence is shown first if several exist, assuming that NXT NXT is better than
PREV, etc. “[]” = optional.
94.03
167.03
48SX
71.02
80
2219.12
2219.13
48SX
48GX
2219.13
48GX
79
2219.13
32.02
33.03
59
118
59
118
2269.04
48GX
59
118
“Keys” column:
!
key ALPHA-RS-2; MTH NXT PROB
This means that you can either press [ALPHA] [RIGHT-SHIFT] [2] or press
[MTH] [NXT] [PROB] [!] to get the ! function.
+
key 95.1
This means that [+] is on the keyboard in row 9, column 5. The
.1 means unshifted;
.2 means left-shifted;
.3 means right-shifted;
.4 means alpha-shifted;
.5 means alpha-left-shifted; and
.6 means alpha-right-shifted.
.01 added means hold down the shift key while pressing the key, e.g. key 22.21 is MODE with
the left-shift key held down, also called LS&MODE.
48GX
28C
48SX
48SX
H
H
H
73.02
73
29
145.02
1.05
1.20
1.20
1.20
1.05
1.05
28C
48SX
28C
28C
28C
28C
48SX
AMORT
This means that AMORT is not in any keyboard menu, but you can find it in numbered menu 79
QUOT
«POLYNOMIAL» NXT; ARITH POLY PREV
This means that QUOT is in the POLYNOMIAL menu, a special menu which is neither a
numbered menu, nor on the keyboard, but is seen by executing the «programmable» command
POLYNOMIAL. QUOT can also be found in the ARITH POLY PREV menu.
Other columns:
Type: “F” is function, “C” is command, and “A” is analytic function.
Library: The internal library number and command number identifying the command. If there are multiple,
they are listed one per line.
Size: Amount of memory taken in a program by this command, in bytes
they are listed one per line.
?: An “H” means this command has a HELP screen. An “-” means “not shown in the CATalog”.
First: For identifying backwards compatibility, this is the first calculator model (28C, 28S, 48SX, 48GX) or
ROM version (49G through the 50g) with the command.
Command
SUBTMOD
Type Library
F 788-111
Size Keys
5.5 ARITH MODUL NXT
«MODULAR» NXT
5.5 MATRICES FACT
MTH MATRX FACTR
SVD
C
171-46
SVL
C
171-47
5.5 MATRICES FACT NXT
MTH MATRX FACTR NXT
SWAP
SYLVESTER
C
C
2-271
788-78
SYSEVAL
SYST2MAT
C
C
2-49
222-10
S~N
S→H
TABVAL
C
C
C
256-22
256-8
788-97
2.5 PRG/TOOL STACK
«MATR» NXT
2.5 CAT
5.5 CONVERT MATRX
MATRICES LIN-S
5.5 SYMB GRAPH NXT
CALC GRAPH NXT
TABVAR
C
788-96
TAIL
C
171-82
TAN
TAN2CS2
TAN2SC
A
C
C
2-83
222-28
788-31
TAN2SC2
C
788-33
TANH
TAYLOR0
A
F
2-86
788-6
TAYLR
C
2-339
TCHEBYCHEFF
F
788-91
TCOLLECT
C
788-26
TDELTA
F
171-100
5.5 SYMB GRAPH NXT
CALC GRAPH NXT
«DIFF» NXT
5.5 RS&CHARS NXT
PRG LIST ELEM NXT
PRG NXT CHARS NXT
2.5 key 55.1
5.5 «TRIGO» NXT
5.5 SYMB TRIG
TRIG NXT
CONVERT TRIG NXT
«TRIGO» NXT
5.5 SYMB TRIG
TRIG NXT
CONVERT TRIG NXT
«TRIGO» NXT
2.5 MTH HYP
TRIG HYP
«HYPERBOLIC»
5.5 CALC LIMIT
SYMB CALC NXT
«DIFF» NXT
2.5 CALC LIMIT
5.5 «POLYNOMIAL» NXT
5.5 TRIG NXT
«TRIGO» NXT
5.5 APPS 12 UTILS NXT
128.02
?
H
First
1.05
8
48GX
148
2219.08
8.02
48GX
148.02
2219.08
73
28C
157
H 1.05
28C
1.20
158
H
173
256.04
1.05
256.02
1.05
142.02 H 1.05
153.02
177.02
142.02 H 1.05
153.02
177.02
35.02
48GX
62.02
2219.14
28C
H 1.20
122.02 H 1.05
139
140.02
122.02
139
140.02
H
12
161
136.04
152.02
163
93
163
122.02
117
2219.17
1.05
Command
Type Library
C 171-92
F
788-110
ALGB
ALOG
AMORT
C
C
A
C
222-0
788-128
2-96
171-75
AND
F
2-229
ANIMATE
C
171-20
ANS
C
2-387
APEEK
APPLY
C
F
ARC
ARCHIVE
ARG
C
C
F
256-18
2-258
2-259
2-216
2-353
2-77
ARIT
ARM→
ARRY→
ASIN
ASIN2C
C
C
C
A
C
788-133
256-34
2-171
2-87
788-36
ASIN2T
C
788-35
ASINH
A
2-90
ASM
ASM→
ASN
C
C
C
256-30
256-24
2-380
ASR
C
2-0
2.5 PRG NXT PICT
2.5 PRG MEM NXT
2.5 key 65.3
CMPLX
MTH NXT CMPLX
«CMPLX»
5.5 «MAIN» NXT
2.5 CAT
2.5 key 53.2
5.5 TRIG
CONVERT TRIG
«TRIGO»
5.5 TRIG
CONVERT TRIG
«TRIGO»
2.5 MTH HYP
TRIG HYP
«HYPERBOLIC»
2.5 LS&MODE KEYS
PRG NXT MODES KEYS
2.5 [MTH/CONVERT] BASE NXT BIT
ASSUME
ATAN
F
A
222-38
2-89
5.5 «TESTS»
2.5 key 55.2
1.05
28C
H
1.05
H
1.05
48GX
11
2219.16
128
28C
H
Size Keys
5.5 MTH LIST
5.5 ARITH MODUL
«MODULAR»
5.5 CAT
5.5 «MAIN»
2.5 key 61.2: 10^x
5.5 RS&NUM.SLV TVM
2.5 PRG TEST NXT
[MTH/CONVERT] BASE NXT LOGIC
«TESTS» NXT
5.5 PRG NXT GROB NXT
2.5 key 105.2 in ALG mode
CAT in RPL mode
?
First
48GX
H
1.05
H
H
1.05
1.20
28C
48GX
79
80
2219.13
16
32.02
169
37.02
2219.04
28C
48GX
1.05
256.04
93.02
1.05
48SX
38
70.02
20
130
48SX
48SX
48SX
H
122
140
H
1.05
2.00
28C
28C
1.05
122
140
H
1.05
256.06
12
161
28C
256.06
256.05
67
1.16
1.05
48SX
17
170
28C
H
1.20
28C
Command
SIN
SINCOS
SINH
SINV
SIZE
Type Library
A 2-81
C 788-24
A
C
C
2-84
2-324
2-160
Size Keys
2.5 key 53
5.5 TRIG NXT
CONVERT TRIG
SYMB NXT EXPLN
«TRIGO»
«REWRITE»
2.5 MTH HYP
TRIG HYP
«HYPERBOLIC»
2.5 PRG MEM ARITH NXT
2.5 RS&CHARS
MTH MATRX MAKE
PRG LIST ELEM
PRG NXT CHARS
PRG NXT GROB NXT
MATRICES OPER NXT NXT
2.5 [MTH/CONVERT] BASE NXT BIT
SL
C
2-5
SLB
C
2-6
2.5 [MTH/CONVERT] BASE NXT BYTE
SLOPEFIELD
C
171-12
SNEG
SNRM
C
C
2-325
171-41
2.5 PRG MEM ARITH NXT
5.5 MTH MATRX NORM
MATRICES OPER NXT NXT
SOLVE
C
788-63
SOLVEQN
C
227-1
SOLVER
SOLVEVX
C
C
788-134
788-8
SORT
C
171-94
SPHERE
C
171-19
SQ
SR
A
C
2-80
2-7
C
171-40
5.5 S.SLV
SYMB SOLVE
ALG NXT
«SOLVER»
5.5 APPS 12 EQLIB
5.5 «MAIN»
5.5 S.SLV
SYMB SOLVE
«SOLVER»
5.5 MTH LIST
PRG LIST PROC NXT
5.5 LS&MODE ANGLE
MTH VECTR NXT
PRG NXT MODES ANGLE
2.5 key 52.2: x^2
2.5 [MTH/CONVERT] BASE NXT BIT
5.5 MTH MATRX NORM
MATRICES OPER NXT NXT
?
122.02
140
155
H
First
28C
1.05
788-58
222-11
171-77
CHR
C
2-165
CIRC
CKSM
CLEAR
C
C
C
C
222-29
2-370
2-282
2-24
CLLCD
CLOSEIO
CLUSR
CLVAR
CLΣ
C
C
C
C
C
2-56
2-363
2-347
2-347
2-284
CMPLX
C
788-129
CNRM
C
2-119
COL+
C
171-63
5.5 MTH MATRX COL
MATRICES CREAT COL
COL-
C
171-62
5.5 MTH MATRX COL
MATRICES CREAT COL
48GX
COLCT
COLLECT
C
F
2-333
222-48
48GX
COLΣ
COL→
C
C
2-312
171-57
5.5 ALG
«ALGB»
2.5 CAT
5.5 MTH MATRX COL
MATRICES CREAT COL
COMB
COMP→
CON
F
C
C
2-129
256-13
2-173
72.02
6
35
37.02
62
156.03
28C
28C
17
28C
170
18
28C
171
85
48GX
2219.03
72.02
28C
7
48GX
147.02
156.03
2219.07
120
H 1.05
124.02
142.02
154
2275.01
48GX
17
170
7
147.02
156.03
2219.07
Size Keys
2.5 LS&MODE FLAG
PRG TEST NXT NXT
PRG NXT MODES FLAG
5.5 ARITH POLY
5.5 PRG NXT IN
C
C
C
28C
120
142.02
154
11
36.02
2219.16
4.02
65
2219.04
Type Library
C 2-132
CHINREM
CHOLESKY
CHOOSE
12
161
H
H
Command
CF
1.05
1.05
28C
28C
48GX
2.5 RS&CHARS
PRG TYPE NXT
PRG NXT CHARS
5.5 ARITH PERM
2.5 key 45.3
2.5 RS&TIME NXT NXT
PRG NXT NXT TIME NXT NXT
APPS 5 4 NXT NXT
2.5 PRG NXT OUT
2.5 alias for CLVAR
2.5 CAT
5.5 «MATHS»
«MAIN» NXT
2.5 MATRICES OPER
MTH MATRX NORM
2.5 MTH NXT PROB
2.5 MATRICES CREAT
MTH MATRX MAKE
32.03
66
?
First
28C
126
157
39
2219.13
33.02
62
H
H
1.05
1.20
48GX
174
106
H
28C
94.03
167.03
40
104.02
-
28C
48SX
28C
48SX
28C
H
1.05
91
97
7
147
156
9
149
165
2219.11
9
149
165
2219.11
93
124
9
149
165
2219.1
13
256.03
6
146
1.20
48SX
28C
48SX
28C
48GX
48GX
H
28C
1.20
28C
48GX
28S
1.05
28C
Command
RNRM
ROLL
ROLLD
ROOT
ROT
ROW+
Type Library
C 2-118
C
C
C
C
C
C
2-280
2-281
171-111
2-251
2-274
171-61
Size Keys
2.5 MTH MATRX NORM
MATRICES OPER NXT
2.5
2.5
5.5
2.5
2.5
5.5
PRG/TOOL STACK NXT
PRG/TOOL STACK NXT
CAT – do not use
RS&NUM.SLV ROOT
PRG/TOOL STACK
MTH MATRX ROW
MATRICES CREAT ROW
ROW-
C
171-60
5.5 MTH MATRX ROW
MATRICES CREAT ROW
ROW→
C
171-55
5.5 MTH MATRX ROW
MATRICES CREAT ROW
RPL>
RR
C
C
2-393
2-3
2.5 CAT
2.5 [MTH/CONVERT] BASE NXT BIT
RRB
C
2-4
2.5 [MTH/CONVERT] BASE NXT BYTE
RREF
C
171-52
5.5 MATRICES LIN-S
MTH MATRX FACTR
RREFMOD
RRK
C
C
788-120
171-35
5.5 RS&NUM.SLV DIFFEQ
RRKSTEP
C
171-36
5.5 RS&NUM.SLV DIFFEQ
RSBERR
C
171-37
5.5 RS&NUM.SLV DIFFEQ
RSD
C
2-123
2.5 MTH MATRX NXT
RS&NUM.SLV SYS
MATRICES OPER NXT
5.5 MTH MATRX ROW NXT
MATRICES CREAT ROW NXT
RSWP
C
171-64
RULES
R~SB
R→B
C
C
C
2-335
256-19
2-9
2.5 CAT
2.5 [MTH/CONVERT] BASE
R→C
C
2-153
2.5 PRG TYPE NXT
MTH NXT CMPLX
2.5 MTH REAL NXT NXT
R→D
F
2-113
7
147
156.02
73.02
73.02
2219.19
75
73
10
150
166
2219.11
10
150
166
2219.11
10
150
166
2219.1
?
28C
28C
1.16
28C
28C
48GX
DBUG
C
221-21
DDAYS
C
2-30
DEC
C
2-145
2.5 RS&TIME NXT
PRG NXT NXT TIME NXT
APPS 5 4 NXT
2.5 [MTH/CONVERT] BASE
DECR
DEDICACE
DEF
DEFINE
C
C
F
C
2-332
222-55
222-37
2-343
2.5
5.5
5.5
2.5
DEG
C
2-135
2.5
DEGREE
DELALARM
F
C
222-54
39872
5.5
2.5
DELAY
DELKEYS
C
C
2-245
2-382
2.5
2.5
DEPND
DEPTH
DERIV
C
C
F
2-196
2-276
788-14
2.5
2.5
5.5
DERVX
F
788-3
5.5
DESOLVE
C
788-15
5.5
DET
F
2-120
2.5
DETACH
DIAGMAP
DIAG→
C
C
C
2-359
222-12
171-59
5.5 MATRICES NXT EIGEN
5.5 MATRICES CREAT NXT
MTH MATRX NXT
MTH MATRX MAKE NXT NXT
DIFF
DIFFEQ
C
C
788-132
171-14
5.5 «MAIN»
48GX
1.05
28C
28C
48GX
H
256.04
15
168
20
33.02
14.03
Command
DATE+
48GX
17
170
18
171
8
158
2219.09
76
2219.06
76
2219.07
76
2219.07
5.02
78
156.02
10.02
150.02
166.02
2219.11
First
28C
1.05
48GX
Type Library
C 2-31
Size Keys
2.5 RS&TIME NXT
PRG NXT NXT TIME NXT
APPS 5 4 NXT
5.5 CAT
48GX
48GX
28C
48GX
48SX
1.05
28C
28C
28C
PRG MEM ARITH
CAT
«ALGB»
key 93.2
SYMB GRAPH
CALC GRAPH
LS&MODE ANGLE
PRG NXT MODES ANGLE
CAT
RS&TIME ALRM
PRG NXT NXT TIME ALRM
LS&MODE KEYS
PRG NXT MODES KEYS
PRG/TOOL STACK NXT
SYMB CALC
CALC DERIV
«DIFF»
CALC
SYMB CALC
CALC DERIV
«DIFF»
S.SLV
CALC DIFF
«SOLVER»
MATRICES OPER
MTH MATRX NORM NXT
94.02
167.02
?
41
2269.04
94.02
167.02
15
168
72
153
177
First
48SX
1.10
48SX
28C
48SX
1.20
H 1.20
48SX
65
28C
95
H
1.20
48SX
108
67
48SX
48SX
83
73.02
136
152
162
123
136
152
162
120
136
164
7.02
137
147
156
110
159
5.02
6.03
146.02
2219.1
48SX
28C
H 1.05
H
1.05
H
1.05
28C
H
H
82
2219-03
48SX
1.20
48GX
1.05
48GX
Command
PVIEW
Type Library
C 2-202
Size Keys
2.5 PRG NXT OUT
PRG NXT PICT NXT
PWRFIT
C
2-322
PX→C
Psi
QR
C
F
C
2-198
222-3
171-49
2.5 PRG NXT PICT NXT
5.5 MTH NXT SPECIAL
5.5 MATRICES FACT
MTH MATRX FACTR
QUOT
C
F
2-337
788-40
QUOTE
F
2-257
QXA
C
788-75
C
2-136
RAND
RANK
C
C
2-127
171-42
5.5 ARITH POLY PREV
«POLYNOMIAL» NXT
2.5 «ALGB»
CONVERT MATRX
«MATR» NXT
2.5 LS&MODE ANGLE
PRG NXT MODES ANGLE
2.5 MTH NXT PROB
5.5 MATRICES OPER NXT
MTH MATRX NORM NXT
RANM
C
171-53
5.5 MTH MATRX MAKE
MATRICES CREAT NXT NXT
RATIO
RCEQ
RCI
F
C
C
2-268
2-249
171-66
2.5 CAT
2.5 RS&NUM.SLV ROOT RS-EQ
5.5 MTH MATRX ROW
MATRICES CREAT ROW
RCIJ
C
171-67
5.5 MTH MATRX ROW
MATRICES CREAT ROW
RCL
C
2-340
RCLALARM
C
2-26
RCLF
C
2-150
RCLKEYS
C
2-383
C
2-350
RCLVX
C
222-63
2.5 key 32.2
TOOL
PRG MEM DIR
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 LS&MODE FLAG NXT
PRG NXT MODES FLAG NXT
2.5 LS&MODE KEYS
PRG NXT MODES KEYS
5.5 CAT
38.02
40
90
99
38.02
?
H
8
148
2219.09
93
126.04 H
93.03
157
173
First
48SX
Command
EGCD
48SX
EGV
C
171-44
48SX
1.16
48GX
EGVL
C
171-45
5.5 MATRICES NXT EIGEN
MTH MATRX NXT
28C
1.05
ELSE
C
1792-2
2.5 PRG BRCH IF
PRG NXT NXT ERROR IFERR
END
C
1792-23
1792-3
1792-22
2.5 PRG BRCH IF/CASE/DO/WHILE
PRG NXT NXT ERROR IFERR
ENDSUB
F
171-87
5.5 PRG LIST PROC
ENG
C
2-140
EPSX0
EQNLIB
C
C
788-136
227-0
2.5 LS&MODE FMT
PRG NXT MODES FMT
5.5 «REWRITE»
5.5 APPS 12 EQLIB
5.5 CAT (not the same as the EQW key)
key 43.3
2.5 PRG TYPE NXT
2.5 PRG NXT NXT ERROR
2.5 PRG NXT NXT ERROR
2.5 PRG NXT NXT ERROR
5.5 ARITH INTEG
«INTEGER»
2.5 key 41.1
in EQW
in FILER
2.5 key 51.2: e^x
5.5 «MAIN» NXT
5.5 CAT
5.5 CONVERT REWRITE
«REWRITE»
48SX
H
65
Type Library
C 788-46
1.05
Size Keys
5.5 ARITH POLY
«POLYNOMIAL»
5.5 MATRICES NXT EIGEN
MTH MATRX NXT
28C
13
7.02
147
156.02
2219.08
6
146.03
2219.09
28C
48GX
48GX
75
10
150
166
2219.12
10
150
166
2219.12
71
EQW
C
221-11
48SX
28C
48GX
EQ→
ER
C
C
2-168
256-31
48GX
ERASE
ERR0
ERRM
ERRN
EULER
C
C
C
C
F
2-197
2-43
2-45
2-44
788-56
EVAL
C
2-46
EXLR
EXP
C
A
788-108
2-93
EXP&LN
EXP2HYP
EXP2POW
C
F
F
788-135
222-62
222-26
28C
95
48SX
66.02
28C
67
48SX
68
48SX
H
1.20
126
?
H
5.02
137
159
2219.08
5.02
137
159
2219.08
24
60
145
24
25
29
31
60
145
36
2219.15
64
First
1.05
48GX
48GX
28C
28C
48GX
28C
H
2275
1.05
48GX
2269.02
1.05
33.02
256.06
48SX
1.16
81
61
61
61
127
48SX
48SX
28C
28C
H 1.05
142
28C
H
1.05
28C
H
H
H
1.05
1.20
1.20
141
172
Command
PARSURFACE
Type Library
C 171-9
Size Keys
PARTFRAC
C
788-52
5.5 ALG
ARITH POLY NXT NXT
«ALGB»
«POLYNOMIAL» NXT
2.5 PRG MEM DIR
5.5 MATRICES NXT EIGEN
«MATR» NXT
5.5 RS&NUM.SLV POLY
ARITH POLY NXT NXT
PATH
PCAR
C
C
2-33
788-79
PCOEF
C
171-69
PCONTOUR
C
171-13
PCOV
C
171-31
PDIM
PEEK
PEEKARM
PERINFO
PERM
PERTBL
PEVAL
C
C
C
C
F
C
C
2-195
256-17
256-36
229-3
2-130
229-0
171-70
2.5
5.5
5.5
5.5
2.5
5.5
5.5
PGDIR
PICK
PICK3
PICT
PICTURE
C
C
C
C
C
2-352
2-279
2-397
2-210
2-200
2.5
2.5
2.5
2.5
2.5
PINIT
C
171-106
PRG MEM DIR
PRG/TOOL STACK NXT
PRG/TOOL STACK NXT
PRG NXT PICT
CAT
key leftarrow when not editing
PIX?
PIXOFF
PIXON
PKT
PLOT
C
C
C
C
C
2-205
2-204
2-203
2-378
788-9
2.5
2.5
2.5
2.5
5.5
C
788-10
5.5
PMAX
PMIN
PMINI
POKE
POKEARM
POLAR
POLYNOMIAL
C
C
C
C
C
C
C
2-185
2-184
222-20
256-16
256-35
2-222
222-45
2.5
2.5
5.5
5.5
5.5
2.5
5.5
PRG NXT PICT
APPS 13
MTH NXT PROB
APPS 13
RS&NUM.SLV POLY
PRG NXT PICT NXT
PRG NXT PICT NXT
PRG NXT PICT NXT
SYMB GRAPH
CALC GRAPH
SYMB GRAPH
CALC GRAPH
CAT
CAT
MATRICES NXT EIGEN
«ARIT»
«MATHS»
? First
85
48GX
2219.02
124
H 1.05
126.03
159
256.03
256.06
82
Type Library
C 2-27
FINISH
FIX
C
C
2-368
2-138
FLASHEVAL
FLOOR
F
F
171-23
2-103
FONT6
FONT7
FONT8
FONT→
FOR
C
C
C
C
C
221-15
221-14
221-13
221-3
1792-10
FOURIER
F
788-94
FP
FREE
FREEZE
FROOTS
F
C
C
C
2-102
2-356
2-51
788-66
FS?
C
2-133
FS?C
C
2-142
FUNCTION
FXND
GAMMA
GAUSS
C
C
F
C
2-220
788-107
222-7
788-77
48SX
48SX
48SX
48SX
1.05
GBASIS
GCD
C
F
222-58
788-44
GCDMOD
F
788-117
1.05
GET
C
2-178
GETI
C
2-179
GOR
C
C
2-211
2-137
GRAMSCHMIDT
C
222-9
71
28S
137.03 H 1.05
159
77
48GX
126.03
2219.12
85
48GX
2219.03
102.02
48GX
2219.06
38
48SX
256.03
1.05
256.07
2.00
2.15
13
28S
2.15
77
48GX
2219.12
71
48SX
73.02
28C
73.02
1.05
38
48SX
48GX
110
2219.18
38.02
38.02
38.02
105
153
H
177
153
H
177
Command
FINDALARM
48GX
28C
28C
H 1.20
1.05
2.00
48SX
H 1.20
Size Keys
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 LS&MODE FMT
PRG NXT MODES FMT
5.5 CAT
2.5 MTH REAL NXT NXT
«CMPLX»
5.5 CAT
5.5 CAT
5.5 CAT
5.5 CAT
2.5 PRG BRCH [FOR]
5.5 CALC DERIV
«DIFF»
2.5 MTH REAL NXT
2.5 CAT – do not use
2.5 PRG NXT OUT
5.5 ARITH POLY NXT
«SOLVER»
2.5 LS&MODE FLAG
PRG TEST NXT NXT
PRG NXT MODES FLAG
2.5 LS&MODE FLAG
PRG TEST NXT NXT
PRG NXT MODES FLAG
5.5 MTH NXT SPECIAL
«MATR» NXT
5.5 CAT
5.5 ARITH POLY NXT
«INTEGER»
«POLYNOMIAL»
5.5 ARITH MODUL
«MODULAR»
2.5 PRG LIST ELEM
MATRICES CREAT NXT
MTH MATRX MAKE NXT
2.5 PRG LIST ELEM
MATRICES CREAT NXT
MTH MATRX MAKE NXT
2.5 PRG NXT GROB
2.5 LS&MODE ANGLE
PRG NXT MODES ANGLE
5.5 MATRICES NXT VECT
95
?
First
48SX
105
64
48SX
28C
2219.04
14.03
1.05
28C
2269.03
2269.03
2269.03
2269
27
145
136.02 H
162
14.02
1.05
1.05
1.05
1.05
28C
40
126.02
1.05
28C
48SX
48SX
H 1.05
32.03
66
28C
32.03
66
28C
82
176
157
H
H
H
48SX
1.05
1.16
1.05
126.02
H
H
1.20
1.05
128
138
6.02
35
146.02
6.02
35
146.02
37
65
H
1.05
160
H
28C
28C
48SX
48SX
1.20
Command
Type Library
C 788-81
MAIN
MAKESTR
MANT
MAP
MATHS
MATR
MAX
MAXR
MAXΣ
MCALC
C
C
F
C
C
C
F
F
C
C
788-127
256-28
2-111
788-102
222-47
788-131
2-106
2-64
2-296
171-118
MEAN
MEM
C
C
C
2-297
2-345
2-349
MERGE
MIN
MINEHUNT
C
C
F
C
788-122
2-355
2-107
227-3
MINIFONT→
MINIT
C
C
221-18
171-115
MINR
MINΣ
MITM
F
C
C
2-65
2-298
171-116
MKISOM
MOD
C
F
222-14
2-110
MODSTO
C
788-121
MODULAR
C
222-44
MOLWT
MROOT
F
C
229-2
171-119
MSGBOX
C
171-78
MSLV
C
222-32
MSOLVR
C
171-114
MSOLVR2
C
227-2
Size Keys
5.5 MATRICES OPER NXT
«MATR» NXT NXT
5.5 «ARIT», «CONSTANTS»
2.5 MTH REAL NXT
5.5 «MAIN»
5.5 «MAIN» NXT
2.5 MTH REAL
2.5 MTH NXT CONST NXT
5.5 APPS 12 MES
2.5 PRG MEM
2.5 CAT – do not use
2.5 MTH REAL
5.5 APPS 12 UTILS
5.5 CAT
5.5 APPS 12 MES
2.5 MTH NXT CONST NXT
5.5 APPS 12 MES
5.5 MATRICES LINAP
2.5 MTH REAL
ARITH MODUL NXT
«CMPLX» NXT
5.5 ARITH MODUL NXT
«MODULAR» NXT
5.5 «ARIT»
«MATHS»
5.5 APPS 13
5.5 APPS 12 MES
5.5 PRG NXT OUT
5.5 NUM.SLV 6
5.5 APPS 12 EQLIB/MES
5.5 CAT
137.02
156.02
?
H
First
1.05
H
256.05
14.02
14
21.02
100
116
2219.2
100
70
68
788.21
1.05
1.16
28C
H 1.05
H 1.20
H 1.05
28C
28C
28C
48GX
28C
28C
28S
H
14
2275
1.05
48SX
28C
48GX
2269.04
1.05
116
48GX
2219.2
21.02
28C
100
28C
116
48GX
2219.2
175
H 1.20
14
28C
128.02
128.02
138.02
Type
C
F
C
Library
222-18
222-6
788-11
ICHINREM
IDIV2
IDN
C
C
C
788-59
788-39
2-174
IEGCD
C
788-47
IF
C
1792-0
5.5 SYMB ARITH
ARITH INTEG
«INTEGER»
2.5 PRG BRCH [IF]
IFERR
IFFT
C
C
1792-13
171-27
2.5 PRG NXT NXT ERROR [IFERR]
5.5 MTH NXT FFT
IFT
C
2-48
2.5 PRG BRCH NXT
IFTE
F
2-47
ILAP
F
788-17
IM
F
2-155
IMAGE
INCR
INDEP
INFORM
C
C
C
C
222-16
2-331
2-183
171-76
2.5 PRG BRCH NXT
«TESTS» NXT
5.5 CALC DIFF
«DIFF» NXT NXT
2.5 CMPLX
MTH NXT CMPLX
«CMPLX» NXT
5.5 MATRICES LINAP
2.5 PRG MEM ARITH
5.5 PRG NXT IN
C
F
C
2-379
2-386
222-41
H
1.05
INPUT
INT
INTEGER
H
1.20
INTVX
F
788-4
INV
INVMOD
A
F
2-76
788-116
IP
IQUOT
F
F
2-101
788-41
2.15
116
48GX
2219.2
40
48GX
2219.14
132
H 1.20
116
2219.2
2275
Command
IBASIS
IBERNOULLI
IBP
48GX
Size
5.5
5.5
5.5
Keys
MATRICES NXT VECT
ARITH INTEG
SYMB CALC
CALC DERIV NXT
«DIFF»
5.5 ARITH INTEG
5.5 ARITH INTEG
2.5 MATRICES CREAT
MTH MATRX MAKE
2.5 PRG NXT IN
2.5 CAT
5.5 «ARIT»
«MATHS»
5.5 CALC
SYMB CALC
CALC DERIV NXT
«DIFF»
2.5 key 64.1: 1/x
5.5 ARITH MODUL NXT
«MODULAR»
2.5 MTH REAL NXT
5.5 SYMB ARITH
ARITH INTEG NXT
«INTEGER»
160
127
136.02
152
162.02
127
127
6
137.02
146
127
134
?
H
H
H
First
1.20
1.16
1.05
H
H
1.05
1.05
28C
H
1.05
24
28C
145
60
28C
19
48GX
2219.05
23.02
28C
145.03
23.02
28C
145.03
136.02 H 1.05
164
20
28C
130
141
175
H 1.20
72
48SX
83
28C
39
48GX
2219.13
39
48SX
1.05
H 1.20
123
136.02
152
162.02
H
1.05
128.02
138
14.02
127.02
134
H
28C
1.05
H
28C
1.05
2.00
Command
ΣLINE
ΣLIST
Type Library
C 2-314
C 171-89
ΣX
ΣX^2
ΣX2
ΣX*Y
ΣXY
ΣY
ΣY^2
ΣY2
►
π
C
C
C
C
C
C
C
C
F
F
2-291
2-295
2-293
2-295
2-293
2-292
2-294
2-294
2-342
2-63
∂
F
≤
F
2-247
2-248
2-237
≥
F
2-238
≠
F
2-234
→
C
→A
→ALG
→ARRY
→CD
→COL
C
C
C
C
C
1792-4
1792-16
256-2
256-11
2-170
256-6
171-56
→DATE
C
2-22
→DIAG
C
171-58
→FONT
→GROB
→H
C
C
C
C
221-2
2-215
256-0
221-4
Size Keys
5.5 MTH LIST
102
11
2219.15
103
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
alias for ΣX2
alias for ΣXY
alias for ΣY2
key 32.1: STO
key 104.2
MTH NXT CONST
«CONSTANTS»
2.5 key 54.3
?
103
103
-
103
103
-
21
First
48SX
48GX
28C
28C
1.05
28C
1.05
28C
28C
1.05
1.05
28C
28C
2.5 key 63.2
PRG TEST
«TESTS»
2.5 key 64.2
PRG TEST
«TESTS»
2.5 key 62.2
PRG TEST
«TESTS» NXT
2.5 key 102.3
32
28C
32
28C
32
28C
5.5
5.5
2.5
5.5
5.5
256
256.02
33
256.02
9
149
165
2219.1
94
167
1.05
1.05
28C
1.05
48GX
5.02
6.03
146
2219.1
2269
37
256
2269
48GX
28C
PRG TYPE
MTH MATRX COL
MATRICES CREAT COL
2.5 RS&TIME
PRG NXT NXT TIME
APPS 5 4
5.5 MATRICES CREAT
MTH MATRX NXT
MTH MATRX MAKE NXT NXT
5.5
2.5
5.5
5.5
CAT
PRG NXT GROB
CAT
48SX
1.05
48SX
1.05
1.05
J
J. ASCII Character Codes and Translations
The following table shows the relation between character codes (results of NUM, arguments to CHR) and
characters (results of CHR, arguments to NUM) for the lower half of the character set.
Code
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
ā
◄
█
…
…
!
"
#
\$
%
&
'
(
)
*
Description
null
start of text
end of text
end of transmission
enquiry
acknowledge
bell
backspace
tab
linefeed
vertical tab
form feed
carriage return
shift out
shift in
device escape
device control 1
device control 2
device control 3
device control 4
neg. acknowledge
synchronous idle
end trans. block
cancel
end of medium
substitute
escape
cursor (insert)
cursor (overtype)
ellipsis (left)
ellipsis (right)
space
exclamation mark
quotation
number
dollars
percent
ampersand
apostrophe
left parenthesis
right parenthesis
asterisk
Character Codes (0-127)
Code
Description
43
+ plus
44
, comma
45
- hyphen
46
. period
47
/ forward slash
48
0 0
49
1 1
50
2 2
51
3 3
52
4 4
53
5 5
54
6 6
55
7 7
56
8 8
57
9 9
58
: colon
59
; semicolon
60
< less than
61
= equal to
62
> greater than
63
? question mark
64
@ at sign
65
A A
66
B B
67
C C
68
D D
69
E E
70
F F
71
G G
72
H H
73
I I
74
J J
75
K K
76
L L
77
M M
78
N N
79
O O
80
P P
81
Q Q
82
R R
83
S S
84
T T
85
U U
Code
Description
86
V V
87
W W
88
X X
89
Y Y
90
Z Z
91
[ left bracket
92
\ backslash
93
] right bracket
94
^ caret
95
_ underscore
96
` grave accent
97
a a
98
b b
99
c c
100 d d
101 e e
102 f f
103 g g
104 h h
105 i i
106 j j
107 k k
108 l l
109 m m
110 n n
111 o o
112 p p
113 q q
114 r r
115 s s
116 t t
117 u u
118 v v
119 w w
120 x x
121 y y
122 z z
123 { left brace
124 | pipe
125 } right brace
126 ~ tilde
ASCII Character Codes and Translations J-1
K. Index
!
! (Factorial) .....................................................................3-291
!Directives ........................................................................6-17
!PATH...............................................................................6-17
!RPL ..................................................................................6-35
%
% (Percent) ....................................................................3-292
%CH .................................................................................3-33
%T...................................................................................3-246
%TILE..............................................................................2-10
→RAM................................................................................6-7
→ROW.......................................................................... 3-208
→RPN ............................................................................. 2-27
→S2 .....................................................................................6-8
→STR............................................................................. 3-240
→TIME ......................................................................... 3-253
→UNIT ......................................................................... 3-264
→V2 ............................................................................... 3-268
→V3 ............................................................................... 3-268
↓
↓MATCH....................................................................... 3-142
*
A
*H ....................................................................................3-102
*W....................................................................................3-272
A→ ......................................................................................6-2
A→H...................................................................................6-2
ABCUV...............................................................................3-5
ABS......................................................................................3-5
ACK.....................................................................................3-5
ACKALL ............................................................................3-6
ACOS ..................................................................................3-6
ACOS2S..............................................................................3-7
ACOSH...............................................................................3-8
alarms
acknowledging .......................................................3-5, 3-6
deleting......................................................................... 3-53
finding .......................................................................... 3-87
recalling ...................................................................... 3-193
storing......................................................................... 3-236
ALG annunciator ..............................................................1-6
ALGB............................................................................... 3-10
algebraic
liner structure .............................................................. 1-13
algebraic syntax
conditional testing ...................................................... 1-14
in local variable structures............................................1-2
test commands............................................................ 1-11
Algebraic/Program-entry mode............................1-6, 1-42
algebraics
action in programs.................................................1-1, 1-2
comparing.................................................................... 1-12
conditional testing ...................................................... 1-14
editing in programs .......................................................1-6
in local variable structure .....................................1-2, 1-7
rearranging programmatically................................... 2-13
tests in .......................................................................... 1-12
ALOG .............................................................................. 3-10
@
@ character ........................................................................ 1-7
∆
∆LIST .............................................................................3-134
↑
↑MATCH .......................................................................3-143
→
→ (Create Local)...........................................................3-303
→A...................................................................................... 6-2
→ALG................................................................................ 6-2
→ARRY ...........................................................................3-15
→CD .................................................................................. 6-4
→COL..............................................................................3-39
→DATE ..........................................................................3-50
→DIAG ...........................................................................3-58
→FONT ..........................................................................3-89
→GROB ........................................................................3-100
→H ..................................................................................... 6-5
→HMS ...........................................................................3-107
→KEYTIME ................................................................3-124
→LANGUAGE ...........................................................3-126
→LCD............................................................................3-128
→LIST............................................................................3-134
→LST ................................................................................. 6-6
→MINIFONT..............................................................3-149
→NDISP .......................................................................3-154
→NUM ..........................................................................3-158
→PRG................................................................................ 6-7
→Q .................................................................................3-187
→Qπ ...............................................................................3-188
Index - 1
calculator
turning off ....................................................................1-55
calculator clock.................................................................. 2-4
cantilevers........................................................................... 5-3
capacitor .................................................................5-14, 5-16
CASCFG ..........................................................................3-31
CASCMD .........................................................................3-32
CASDIR ..........................................................................D-13
CASE ................................................................................3-32
case branching .............................................1-14, 2-26, 2-34
case structures..................................................................2-34
CASINFO.......................................................................D-13
CD→ .................................................................................. 6-3
CEIL .................................................................................3-33
CENTR ............................................................................3-33
centripetal force...............................................................5-23
CF ......................................................................................3-33
Checksum...............................................................3-30, 3-36
checksums
verify programs ............................................................. 2-1
CHINREM ......................................................................3-34
CHOLESKY ...................................................................3-34
CHOOSE.........................................................................3-35
choose boxes
custom ..........................................................................1-46
in programs ..................................................................1-45
CHR ..................................................................................3-35
CIRC .................................................................................3-36
circle ........................................................................5-44, 5-58
circular motion ................................................................5-36
CKSM ...............................................................................3-36
CLEAR .............................................................................3-37
clearing
display ...........................................................................1-49
flags ...............................................................................1-27
CLLCD.............................................................................3-37
clock
current date..................................................................3-49
set date..........................................................................3-50
CLOSEIO........................................................................3-37
CLUSR..............................................................................3-38
CLVAR.............................................................................3-38
CLΣ ...................................................................................3-38
CMPLX ............................................................................3-38
CNRM ..............................................................................3-38
CODE ..............................................................................6-21
COL-.................................................................................3-39
COL+ ...............................................................................3-40
COL→..............................................................................3-39
COLCT.............................................................................3-40
COLLECT .......................................................................3-40
collisions ...........................................................................5-24
columns .............................................................................. 5-3
COLΣ............................................................................... 3-41
COMB.............................................................................. 3-41
command line
during program input................................................. 1-42
commands
in programs ....................................................................1-1
COMP→.............................................................................6-4
comparison functions .......................................... 1-11, 1-12
compiled local variable structures
defining procedure ..................................................... 1-10
Compiler directives ........................................................ 6-17
computer
creating programs on ....................................................1-7
CON ................................................................................. 3-41
COND ............................................................................. 3-42
conditional commands ........................................ 1-13, 1-14
test commands in ....................................................... 1-13
conditional structures
case branching............................................................. 1-14
conditional commands .............................................. 1-13
error branching ........................................................... 1-35
examples ...................................................................... 1-15
if branching ............................................. 1-13, 1-14, 1-36
program element............................................................1-2
test commands in ....................................................... 1-11
conditionals
nested ....................................................... 2-16, 2-18, 2-25
conduction............................................................. 5-29, 5-30
cone................................................................................... 5-47
CONIC ............................................................................ 3-43
CONJ ............................................................................... 3-43
CONLIB.......................................................................... 3-44
CONST............................................................................ 3-44
CONSTANTS ................................................................ 3-44
CONT .............................................................................. 3-45
Contents of a Program .....................................................1-1
continuing execution.................................. 1-31, 1-32, 1-39
convection ....................................................................... 5-30
CONVERT ..................................................................... 3-45
CORR............................................................................... 3-45
COS .................................................................................. 3-46
COSH............................................................................... 3-46
Coulomb’s law ................................................................ 5-10
counters
loop structures .............................. 1-18, 1-19, 1-20, 1-21
negative steps .......................................... 1-19, 1-21, 1-25
stepping........................................................................ 1-24
COV ................................................................................. 3-46
CR ..................................................................................... 3-47
CRC .....................................................................................6-4
CRDIR ............................................................................. 3-47
Create Local................................................................... 3-303
critical angle..................................................................... 5-38
CRLIB .................................................................................6-4
Index - 3
energy......................................................................5-13, 5-24
ENG .................................................................................3-74
ENVSTACK ..................................................................D-13
EPS...................................................................................D-13
EPSX0 ..............................................................................3-74
EQ ......................................................................................D-4
EQ→ ................................................................................3-75
EQNLIB ..............................................................3-75, 3-241
Equal ...............................................................................3-301
Equation Library
references ....................................................................... 5-1
subjects ........................................................................... 5-1
titles ................................................................................. 5-1
EQW.................................................................................3-75
ER........................................................................................ 6-4
er (internal).......................................................................6-42
ERASE .............................................................................3-75
ERR0.................................................................................3-76
ERRM...............................................................................3-76
ERRN ...............................................................................3-76
error
generation.....................................................................3-65
error trapping................................................... 2-6, 2-8, 2-20
errors
actions in programs ....................................................1-33
analyzing.......................................................................1-33
causing ..........................................................................1-33
clearing last...................................................................1-34
conditional structures.......................................1-35, 1-36
display messages..........................................................1-34
numbers for .................................................................1-34
recalling messages .......................................................1-34
trapping...............................................................1-35, 1-36
user-defined .................................................................1-33
escape velocity .................................................................5-36
EULER.............................................................................3-76
EVAL................................................................................3-77
evaluation
of local variables............................................................ 1-9
of test clauses.................................1-13, 1-14, 1-22, 1-24
example program
UNMIX..........................................................................F-3
example programs
animating graphics ..................................2-31, 2-32, 2-39
applying programs repeatedly ...................................2-14
Bessel functions ..........................................................2-29
calculating median.......................................................2-10
converting from algebraic to RPN...........................2-27
converting plots to grobs...........................................2-31
displaying binary integers............................................. 2-7
execution times.............................................................. 2-4
Fibonacci numbers ....................................................... 2-1
input forms...................................................................1-45
input routines.................................1-37, 1-40, 1-43, 1-45
inverse functions ........................................................ 2-38
manipulating math curves ......................................... 2-32
mass of an object........................................................ 1-53
maximum and minimum elements .......................... 2-16
percentile of a list ....................................................... 2-10
phone list ..................................................................... 1-45
plotting pie charts....................................................... 2-34
preserving calculator status..........................................2-6
rearranging algebraics ................................................ 2-13
right-justifying strings .........................................................2-5
summations ................................................................. 1-26
surface area of a torus................................................ 1-29
system flags.................................................................. 1-28
Taylor’s polynomials .................................................. 2-31
trace mode ................................................................... 2-37
using conditionals............................................. 1-15, 1-16
using loops........................... 1-18, 1-19, 1-20, 1-21, 1-26
verifying arguments.................................................... 2-24
volume of a sphere........................................................1-4
volume of a spherical cap.............................1-5, 1-6, 1-8
EXCO .............................................................................. 2-15
EXITED........................................................................... D-4
EXITs..................................................................... 6-21, 6-30
EXLR ............................................................................... 3-77
EXP .................................................................................. 3-78
EXP&LN......................................................................... 3-78
EXP2HYP ....................................................................... 3-79
EXP2POW...................................................................... 3-79
EXPAN............................................................................ 3-79
EXPAND ........................................................................ 3-80
EXPANDMOD ............................................................. 3-80
EXPFIT ........................................................................... 3-81
EXPLN ............................................................................ 3-81
EXPM .............................................................................. 3-81
EXPR ................................................................................ D-4
Expressions ..................................................................... 6-15
EYEPT............................................................................. 3-81
F
F0λ .................................................................................... 3-82
FACT................................................................................ 3-82
FACTOR ......................................................................... 3-82
Factorial.......................................................................... 3-291
FACTORMOD .............................................................. 3-83
FACTORS....................................................................... 3-83
false (test result) .................................................... 1-11, 1-12
FANNING...................................................................... 3-84
FAST3D........................................................................... 3-84
FC?.................................................................................... 3-85
FC?C................................................................................. 3-85
FCOEF ............................................................................ 3-85
FDISTRIB....................................................................... 3-86
FFT ................................................................................... 3-86
FIB1.....................................................................................2-1
FIB2.....................................................................................2-2
Index - 5
H
H→ ..................................................................................... 6-4
H→A .................................................................................. 6-5
H→S ................................................................................... 6-5
HALFTAN ....................................................................3-102
HALT .............................................................................3-102
HALT annunciator .........................................................1-31
halting programs .............................................................1-32
harmonic motion.............................................................5-40
heat capacity.....................................................................5-29
heat transfer .....................................................................5-28
HELP..............................................................................3-103
HERMITE.....................................................................3-104
HESS...............................................................................3-104
HEX................................................................................3-104
HILBERT ......................................................................3-105
HISTOGRAM ..............................................................3-105
HISTPLOT....................................................................3-106
HMS-...............................................................................3-106
HMS+.............................................................................3-107
HMS→ ...........................................................................3-107
HOME............................................................................3-108
Hooke’s law......................................................................5-23
HORNER ......................................................................3-108
hour-minute-seconds....................................................3-107
I
i ... ....................................................................................3-108
I→R ................................................................................3-122
IABCUV.........................................................................3-108
IBASIS............................................................................3-109
IBERNOULLI..............................................................3-109
IBP...................................................................................3-109
ICHINREM...................................................................3-110
ideal gases .........................................................................5-25
IDIV2 .............................................................................3-111
IDN.................................................................................3-110
IEGCD...........................................................................3-111
IERR ................................................................................D-13
IF .....................................................................................3-112
if branching ............1-13, 1-14, 1-36, 2-2, 2-16, 2-18, 2-25
IFERR.............................................................................3-112
iferror branching .............................................................2-20
IFFT................................................................................3-113
IFT...................................................................................3-114
IFTE ...............................................................................3-114
ILAP................................................................................3-115
IM ....................................................................................3-115
IMAGE ..........................................................................3-115
INCR...............................................................................3-116
indefinite loops..............................................2-5, 2-14, 2-16
with counters............................................................... 2-29
INDEP........................................................................... 3-116
index of refraction.......................................................... 5-37
inductor.................................................................. 5-15, 5-17
Infinity............................................................................ 3-289
INFORM ....................................................................... 3-116
INPUT ........................................................................... 3-117
input form...................................................................... 3-116
input forms
custom.......................................................................... 1-45
for program input....................................................... 1-45
in programs.................................................................. 1-45
INT ................................................................................. 3-118
INTEGER..................................................................... 3-119
Integrate ......................................................................... 3-288
integration by parts....................................................... 3-109
INTVX........................................................................... 3-119
INV................................................................................. 3-119
INVMOD...................................................................... 3-120
IOPAR .............................................................................. D-4
IP..................................................................................... 3-120
IQUOT .......................................................................... 3-120
IREMAINDER ............................................................ 3-121
ISOL ............................................................................... 3-121
ISOM.............................................................................. 3-121
isothermal expansion ..................................................... 5-26
ISPRIME?...................................................................... 3-122
J
JORDAN....................................................................... 3-122
junction field-effect transistors..................................... 5-54
K
KER................................................................................ 3-123
kernel .............................................................................. 3-123
KERRM ......................................................................... 3-123
KEY................................................................................ 3-123
key bounce......................................................... 3-124, 3-125
key location numbers..................................................... 1-48
keyboard
customizing ................................................................. 3-18
in programs ....................................................... 1-48, 1-49
recall user keys .......................................................... 3-194
reset keys...................................................................... 3-54
storing multiple keys ................................................ 3-237
KEYEVAL.................................................................... 3-124
keypress, simulating...................................................... 3-124
keystrokes
as program input............................................... 1-48, 1-49
KEYTIME→................................................................ 3-125
KGET ............................................................................ 3-125
KILL............................................................................... 3-125
killing programs .................................................... 1-31, 1-32
Index - 7
SYST2MAT ...................................................................3-245
System RPL......................................................................6-35
T
TABVAL........................................................................3-246
TABVAR........................................................................3-247
TAG→ ...........................................................................3-247
tagged objects
as program output.......................................................1-49
TAIL ...............................................................................3-247
TAN ................................................................................3-248
TAN2CS2.......................................................................3-248
TAN2SC.........................................................................3-249
TAN2SC2.......................................................................3-249
TANH.............................................................................3-249
TAYLOR0 .....................................................................3-250
TAYLR ...........................................................................3-250
TCHEBYCHEFF.........................................................3-250
TCOLLECT ..................................................................3-251
TDELTA........................................................................3-251
temperature
delta.............................................................................3-251
increment....................................................................3-253
terminal velocity ..............................................................5-36
test commands
algebraic syntax ...........................................................1-11
combining results........................................................1-12
comparison functions.................................................1-11
flag tests........................................................................1-27
in conditional structures ..................................1-11, 1-13
in loop structures ..............................................1-22, 1-24
logical functions ..........................................................1-13
results of.............................................................1-11, 1-12
stack syntax ..................................................................1-11
testing
algebraics ......................................................................1-12
binary integers .............................................................1-12
flag states......................................................................1-27
testing linear structure ....................................................1-13
TESTS ............................................................................3-251
TEVAL...........................................................................3-252
TEXPAND....................................................................3-252
TEXT..............................................................................3-252
THEN.............................................................................3-252
thermal expansion...........................................................5-29
TICKS.............................................................................3-253
time
as ticks.........................................................................3-253
current.........................................................................3-253
difference in days ........................................................3-51
setting..........................................................................3-253
subtracting..................................................................3-106
TIME ..............................................................................3-253
Index - 16
timing program ............................................................. 3-252
TINC .............................................................................. 3-253
TINPUT .......................................................................... 1-43
TLIN .............................................................................. 3-254
TLINE ........................................................................... 3-254
TOFF ................................................................................ D-9
toroid ...................................................................... 5-17, 5-33
TORSA ............................................................................ 1-29
TORSV ............................................................................ 1-30
TOT................................................................................ 3-255
TPROMPT...................................................................... 1-38
TRACE .......................................................................... 3-255
trace mode ....................................................................... 2-37
TRAN............................................................................. 3-256
TRANSIO ..................................................................... 3-256
transistors......................................................................... 5-50
transverse waves ............................................................. 5-59
trapping errors................................................................. 1-34
triangle.............................................................................. 5-46
TRIG .............................................................................. 3-256
TRIGCOS ..................................................................... 3-257
TRIGO........................................................................... 3-257
TRIGSIN....................................................................... 3-257
TRIGTAN..................................................................... 3-258
TRN................................................................................ 3-258
TRNC............................................................................. 3-258
true (test result) ..................................................... 1-11, 1-12
TRUNC.......................................................................... 3-259
TRUTH.......................................................................... 3-259
TSA................................................................................... 2-33
TSIMP............................................................................ 3-260
TST ................................................................................... 1-16
TSTR .............................................................................. 3-260
TSTRING........................................................................ 1-51
TTAG............................................................................... 1-50
TVARS........................................................................... 3-261
TVM ............................................................................... 3-261
TVMBEG...................................................................... 3-261
TVMEND ..................................................................... 3-261
TVMROOT .................................................................. 3-261
TYPE.............................................................................. 3-262
U
UBASE........................................................................... 3-262
UFACT .......................................................................... 3-263
UFL1→MINIF............................................................. 3-263
UNASSIGN .................................................................. 3-263
UNASSUME................................................................. 3-263
UNBIND....................................................................... 3-264
Undefined ...................................................................... 3-288
Understanding Programming ..........................................1-1
Unit attachment ............................................................ 3-292
UNPICK........................................................................ 3-264
UNROT......................................................................... 3-265
MAIN .............................................................................3-141
MAKESTR ........................................................................ 6-6
MANT ............................................................................3-141
MAP ................................................................................3-142
MASD...............................................................................6-11
MASD syntax...................................................................6-11
MASD.INI ........................................................................D-6
mass
related to energy..........................................................5-24
MATHS ..........................................................................3-143
MATR.............................................................................3-144
matrix
transpose ....................................................................3-258
MAX ...............................................................................3-144
MAXR.............................................................................3-144
MAXΣ ............................................................................3-145
MCALC ..........................................................................3-145
MEAN ............................................................................3-145
linear mechanics ..............................................................5-22
mechanics .........................................................................5-23
MEDIAN.........................................................................2-11
MEM...............................................................................3-146
memory
attach library ................................................................3-23
available ......................................................................3-146
backup...........................................................................3-14
clear variables...............................................................3-38
copy object.................................................................3-155
create directory............................................................3-47
current path................................................................3-165
detaching libraries .......................................................3-57
file management ..........................................................3-87
fixing corruption .......................................................3-170
HOME directory.......................................................3-108
listing libraries............................................................3-131
listing port variables..................................................3-186
purge directory ..........................................................3-169
purging variables .......................................................3-183
rename object ............................................................3-198
restoring backup........................................................3-201
size of object................................................................3-30
sort variables..............................................................3-162
storing variable ..........................................................3-236
up directory................................................................3-265
variable list .................................................................3-270
variable types .............................................................3-262
variables of type ........................................................3-261
PRG BRCH .................................................................1-13
PRG TEST ..................................................................1-11
custom ......................................................1-52, 1-53, 2-16
delayed display...................................................1-48, 1-52
displaying in programs........................... 1-48, 1-51, 1-52
for libraries .................................................................. 1-52
for program input....................................................... 1-53
numbers for................................................................. 1-52
pages in......................................................................... 1-52
programmatic uses ..................................................... 1-52
recalling numbers ....................................................... 1-52
resuming programs..................................................... 1-53
running programs....................................................... 1-53
temporary..................................................................... 2-34
MERGE......................................................................... 3-147
message boxes
custom.......................................................................... 1-51
in programs ....................................................... 1-51, 1-52
messages................................................................. 1-51, 1-52
prompting.................................................................... 1-37
meta-object manipulation.............................................. 2-20
meta-objects .................................................................... 2-20
MHpar............................................................................... D-6
MIN ................................................................................ 3-148
MINEHUNT................................................................ 3-148
MINIFONT→ ............................................................. 3-148
MINIT............................................................................ 3-149
MINR ............................................................................. 3-149
MINΣ ............................................................................. 3-149
MITM............................................................................. 3-150
MKISOM....................................................................... 3-150
MNX ................................................................................ 2-16
MNX2 .............................................................................. 2-18
MOD .............................................................................. 3-150
mode names
Algebraic/Program-entry.............................................1-6
Programs-entry ..............................................................1-6
Programs-entry ..............................................................1-3
modes
program entry.........................................................1-3, 1-6
setting ..............................................................................1-6
MODSTO ..................................................................... 3-151
MODULAR .................................................................. 3-151
MODULO...................................................................... D-14
Mohr’s circle.................................................................... 5-58
molecular weight........................................................... 3-151
MOLWT ........................................................................ 3-151
motion .............................................................................. 5-34
Mpar .................................................................................. D-6
MROOT ........................................................................ 3-152
MSGBOX...................................................................... 3-152
MSLV ............................................................................. 3-152
MSOLVR....................................................................... 3-153
MULTI............................................................................. 2-14
Multiply .......................................................................... 3-297
MULTMOD.................................................................. 3-153
MUSER.......................................................................... 3-154
Index - 9
SCROLL.........................................................................3-219
SDEV..............................................................................3-219
SEND .............................................................................3-219
SEQ.................................................................................3-220
SERIAL .............................................................................. 6-8
serial communications
bitrate............................................................................3-27
break............................................................................3-216
buffer length ................................................................3-30
character translation .................................................3-256
checksum......................................................................3-36
closing...........................................................................3-37
end Kermit server .......................................................3-87
Kermit error...............................................................3-123
Kermit get ..................................................................3-125
Kermit server.............................................................3-221
opening.......................................................................3-161
packet..........................................................................3-171
parity ...........................................................................3-164
send .................................................................3-219, 3-276
timeout........................................................................3-235
XMODEM send ...........................................3-278, 3-280
XMODEM server.....................................................3-280
SERIES...........................................................................3-220
SERVER ........................................................................3-221
SETTS ..............................................................................2-32
SEVAL ...........................................................................3-221
SF.....................................................................................3-221
SHOW ............................................................................3-222
SIDENS .........................................................................3-222
SIGMA ...........................................................................3-222
Sigma Minus...................................................................3-290
Sigma Plus ......................................................................3-289
SIGMAVX.....................................................................3-223
SIGN...............................................................................3-223
SIGNTAB......................................................................3-224
silicon density ................................................................3-222
silicon devices ..................................................................5-50
SIMP2 .............................................................................3-224
SIMPLIFY .....................................................................3-225
SIN ..................................................................................3-225
SINCOS .........................................................................3-225
single-step execution ............................................1-31, 1-32
SINH...............................................................................3-226
SINTP...............................................................................2-31
sinusoidal signal...............................................................5-18
SINV ...............................................................................3-226
size
of programs.................................................................... 2-1
SIZE................................................................................3-226
SKIPs ......................................................................6-20, 6-30
SL.....................................................................................3-227
SLOPEFIELD ..............................................................3-227
Index - 14
SNEG............................................................................. 3-228
SNRM............................................................................. 3-228
solenoid.................................................................. 5-17, 5-33
solid geometry................................................................. 5-47
solid state devices ........................................................... 5-50
SOLVE........................................................................... 3-229
SOLVEQN ................................................................... 3-229
SOLVER........................................................................ 3-230
SOLVEVX .................................................................... 3-230
solving
differential equations ................................................. 3-56
finding zeros.............................................................. 3-229
linear equations......................................................... 3-133
multiple equations .................................................... 3-153
system......................................................................... 3-152
SORT.............................................................................. 3-230
sound
beep .............................................................................. 3-28
sound waves .................................................................... 5-60
Special characters
- (Subtract)................................................................. 3-299
(Store) ..................................................................... 3-303
* (Multiply) ................................................................ 3-297
/ (Divide)................................................................... 3-300
? (Undefined)............................................................. 3-288
^ (Power) ................................................................... 3-285
_ (Unit attachment).................................................. 3-292
| (Where) ................................................................... 3-286
< (Less than) ............................................................. 3-293
= (Equal).................................................................... 3-301
== (Logical Equality) .............................................. 3-302
> (Greater than) ....................................................... 3-295
« » (Program delimiters)........................................... 3-293
∂ (Derivative) ............................................................ 3-291
√ (Square Root)......................................................... 3-286
∫ (Integrate)................................................................ 3-288
≠ (Not equal) ............................................................ 3-296
≤ (Less than or Equal)............................................. 3-294
≥ (Greater than or Equal)....................................... 3-295
∞ (Infinity)................................................................. 3-289
π (Pi) ........................................................................... 3-290
SPH......................................................................................1-5
sphere ............................................................................... 5-49
SPHERE........................................................................ 3-231
SPHLV................................................................................1-8
spring............................................................ 5-23, 5-40, 5-41
SQ ................................................................................... 3-231
Square Root ................................................................... 3-286
SR........................................................................ 3-227, 3-231
SRB ................................................................................. 3-232
SRECV........................................................................... 3-232
SREPL............................................................................ 3-233
SREV...................................................................................6-8
differential equations..................................................3-59
draw graph ...................................................................3-68
fast 3D ..........................................................................3-84
function ........................................................................3-93
histogram....................................................................3-105
label axes ....................................................................3-126
parametric...................................................................3-163
parametric surface.....................................................3-164
polar ............................................................................3-173
resolution....................................................................3-200
scaling .........................................................................3-216
scatter plot..................................................................3-217
slopefield ....................................................................3-227
truth.............................................................................3-259
wireframe....................................................................3-273
Y-slice .........................................................................3-283
PMAX.............................................................................3-172
PMIN..............................................................................3-172
PMINI ............................................................................3-173
PN step-junction devices...............................................5-52
POKE................................................................................. 6-6
POKEARM ....................................................................... 6-7
POLAR...........................................................................3-173
polarization ......................................................................5-38
polygon .............................................................................5-45
POLYNOMIAL ...........................................................3-174
polytropic processes .......................................................5-26
POP.................................................................................3-174
POS .................................................................................3-174
POTENTIAL................................................................3-175
Power ..............................................................................3-285
power-off timeout............................................................D-9
POWEXPAND ............................................................3-175
POWMOD ....................................................................3-176
PPAR .................................................................................D-6
PR1..................................................................................3-176
PREDV ..........................................................................3-177
PREDX ..........................................................................3-177
PREDY...........................................................................3-177
PRESERVE....................................................................... 2-6
pressure
hydrostatic....................................................................5-19
PREVAL ........................................................................3-178
PREVPRIME ................................................................3-178
PRG annunciator ...................................................... 1-3, 1-6
PRIMIT ...........................................................................D-14
printing
buffer ............................................................................3-47
delay ..............................................................................3-54
entire screen...............................................................3-179
entire stack .................................................................3-180
entire stack, compact................................................3-181
old printer...................................................................3-160
print level 1................................................................ 3-176
trace mode ................................................................... 2-37
variable ....................................................................... 3-181
PRLCD........................................................................... 3-179
Program delimiters ....................................................... 3-293
program examples
arbitrary number bases .............................................. 2-22
Program-entry mode.................................................1-3, 1-6
programming techniques
applied list processing................................................ 2-20
case branches .............................................................. 2-26
case branching............................................................. 2-34
case structures............................................................. 2-34
controlling logic with flags.............................. 2-16, 2-18
custom graphics.......................................................... 2-39
definite loops......................... 2-1, 2-18, 2-32, 2-34, 2-39
definite loops with counters ..............................2-8, 2-12
do loops ................................................... 2-14, 2-16, 2-29
error trapping ...............................................2-6, 2-8, 2-20
evaluating local variables ........................................... 2-14
for loops....................... 2-8, 2-12, 2-18, 2-32, 2-34, 2-39
if branching ....................................................... 2-16, 2-18
indefinite looping ....................................................... 2-22
indefinite loops ......................................... 2-5, 2-14, 2-16
indefinite loops with counters.................................. 2-29
interpolation ................................................................ 2-10
labeling output ...............................................................2-4
list concatenation........................................................ 2-28
local variables ........................ 2-6, 2-26, 2-29, 2-33, 2-34
logic control ................................................................ 2-18
logical functions............................ 2-16, 2-18, 2-25, 2-26
manipulating grobs....................... 2-32, 2-33, 2-34, 2-39
meta-object manipulation ......................................... 2-20
nested conditionals................................. 2-16, 2-18, 2-25
nested structures............................................... 2-28, 2-29
object type-checking .................................................. 2-28
plot commands ....................................... 2-31, 2-32, 2-34
preserving flag status...........................................2-6, 2-34
programs as arguments.......................................2-8, 2-14
recursion ...............................................................2-2, 2-28
restoring flag status .............................................2-6, 2-34
root-finder ................................................................... 2-38
setting flags...................................... 2-8, 2-16, 2-18, 2-37
simulating new object types...................................... 2-20
sorting array elements................................................ 2-16
sorting lists................................................................... 2-11
start loops .......................................................................2-2
string and character manipulation ........................... 2-22
string operations ............................................................2-5
structures ........................................................................2-4
subroutines .........................................2-4, 2-7, 2-15, 2-26
tagged output .............................................................. 2-22