HP 50g / 49g+ / 48gII graphing calculator
advanced user’s reference manual

H
Edition 2
HP part number F2228-90010

Printed Date: 2009/7/14

Notice
REGISTER YOUR PRODUCT AT: www.register.hp.com
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 LIMITEDTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESSFOR 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.
© Copyright 1993–1998, 2005, 2009 Hewlett-Packard Development Company, L.P.
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

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 with Programs ................................................................................................................................................1-52
Using Menus for Input...................................................................................................................................................1-52
Using Menus to Run Programs ....................................................................................................................................1-53
Turning Off the Calculator from a Program .....................................................................................................................1-55
2. RPL Programming Examples ....................................................................................................................................................2-1
Contents - 1

Fibonacci Numbers..................................................................................................................................................................2-1
FIB1 (Fibonacci Numbers, Recursive Version)...........................................................................................................2-1
FIB2 (Fibonacci Numbers, Loop Version....................................................................................................................2-2
FIBT (Comparing Program-Execution Time) .............................................................................................................2-4
Displaying a Binary Integer.....................................................................................................................................................2-5
PAD (Pad with Leading Spaces).....................................................................................................................................2-5
PRESERVE (Save and Restore Previous Status) ........................................................................................................2-6
BDISP (Binary Display)...................................................................................................................................................2-7
Median of Statistics Data ......................................................................................................................................................2-10%TILE (Percentile of a list) ..........................................................................................................................................2-10
MEDIAN (Median of Statistics Data).........................................................................................................................2-11
Expanding and Collecting Completely................................................................................................................................2-13
MULTI (Multiple Execution) .......................................................................................................................................2-14
EXCO (Expand and Collect Completely) ..................................................................................................................2-15
Minimum and Maximum Array Elements..........................................................................................................................2-16
MNX (Minimum or Maximum Element—Version 1) .............................................................................................2-16
MNX2 (Minimum or Maximum Element—Version 2) ...........................................................................................2-18
Applying a Program to an Array..........................................................................................................................................2-20
Converting Between Number Bases ...................................................................................................................................2-22
Verifying Program Arguments .............................................................................................................................................2-24
NAMES (Check List for Exactly Two Names) .........................................................................................................2-25
NAMES...................................................................................................................................................................................2-26
Converting Procedures from Algebraic to RPN ...............................................................................................................2-27
Bessel Functions .....................................................................................................................................................................2-29
Animation of Successive Taylor’s Polynomials .................................................................................................................2-31
SINTP (Converting a Plot to a Graphics Object) .....................................................................................................2-31
Techniques used in SINTP ...........................................................................................................................................2-31
SETTS (Superimposing Taylor’s polynomials) ..........................................................................................................2-32
TSA (Animating Taylor’s Polynomials).......................................................................................................................2-33
Programmatic Use of Statistics and Plotting......................................................................................................................2-34
Trace Mode .............................................................................................................................................................................2-37
Inverse-Function Solver ........................................................................................................................................................2-38
Animating a Graphical Image...............................................................................................................................................2-39
3. Full Command and Function Reference..................................................................................................................................3-1
ABCUV......................................................................................................................................................................................3-5
ABS.............................................................................................................................................................................................3-5
ACK............................................................................................................................................................................................3-5
ACKALL ...................................................................................................................................................................................3-6
ACOS .........................................................................................................................................................................................3-6
ACOS2S.....................................................................................................................................................................................3-7
ACOSH......................................................................................................................................................................................3-8
ADD...........................................................................................................................................................................................3-9
ADDTMOD .............................................................................................................................................................................3-9
ADDTOREAL.......................................................................................................................................................................3-10
ALGB.......................................................................................................................................................................................3-10
ALOG ......................................................................................................................................................................................3-10
AMORT...................................................................................................................................................................................3-11
AND.........................................................................................................................................................................................3-11
ANIMATE..............................................................................................................................................................................3-12
ANS ..........................................................................................................................................................................................3-12
APPLY .....................................................................................................................................................................................3-13
ARC ..........................................................................................................................................................................................3-13
ARCHIVE...............................................................................................................................................................................3-14
ARG..........................................................................................................................................................................................3-14
ARIT.........................................................................................................................................................................................3-15
ARRY→...................................................................................................................................................................................3-15
Contents - 2

→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
CLKADJ..................................................................................................................................................................................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

→COL .....................................................................................................................................................................................3-39
COL→ .....................................................................................................................................................................................3-39
COL–........................................................................................................................................................................................3-39
COL+.......................................................................................................................................................................................3-40
COLCT ....................................................................................................................................................................................3-40
COLLECT...............................................................................................................................................................................3-40
COLΣ.......................................................................................................................................................................................3-41
COMB......................................................................................................................................................................................3-41
CON .........................................................................................................................................................................................3-41
COND .....................................................................................................................................................................................3-42
CONIC ....................................................................................................................................................................................3-43
CONJ .......................................................................................................................................................................................3-43
CONLIB..................................................................................................................................................................................3-44
CONST....................................................................................................................................................................................3-44
CONSTANTS ........................................................................................................................................................................3-44
CONT ......................................................................................................................................................................................3-45
CONVERT .............................................................................................................................................................................3-45
CORR.......................................................................................................................................................................................3-45
COS ..........................................................................................................................................................................................3-46
COSH.......................................................................................................................................................................................3-46
COV .........................................................................................................................................................................................3-46
CR .............................................................................................................................................................................................3-47
CRDIR .....................................................................................................................................................................................3-47
CROSS .....................................................................................................................................................................................3-47
CSWP .......................................................................................................................................................................................3-47
CURL .......................................................................................................................................................................................3-48
CYCLOTOMIC .....................................................................................................................................................................3-48
CYLIN .....................................................................................................................................................................................3-48
C→PX......................................................................................................................................................................................3-49
C→R.........................................................................................................................................................................................3-49
DARCY....................................................................................................................................................................................3-49
DATE.......................................................................................................................................................................................3-49→DATE..................................................................................................................................................................................3-50
DATE+....................................................................................................................................................................................3-50
DBUG......................................................................................................................................................................................3-50
DDAYS....................................................................................................................................................................................3-51
DEC..........................................................................................................................................................................................3-51
DECR.......................................................................................................................................................................................3-51
DEDICACE ...........................................................................................................................................................................3-52
DEF..........................................................................................................................................................................................3-52
DEFINE..................................................................................................................................................................................3-52
DEG.........................................................................................................................................................................................3-53
DEGREE ................................................................................................................................................................................3-53
DELALARM ..........................................................................................................................................................................3-53
DELAY....................................................................................................................................................................................3-54
DELKEYS ..............................................................................................................................................................................3-54
DEPND...................................................................................................................................................................................3-55
DEPTH....................................................................................................................................................................................3-55
DERIV.....................................................................................................................................................................................3-56
DERVX ...................................................................................................................................................................................3-56
DESOLVE..............................................................................................................................................................................3-56
DET..........................................................................................................................................................................................3-57
DETACH ................................................................................................................................................................................3-57
DIAG→...................................................................................................................................................................................3-58→DIAG...................................................................................................................................................................................3-58
DIAGMAP..............................................................................................................................................................................3-58
Contents - 4

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

EXP2POW..............................................................................................................................................................................3-79
EXPAN....................................................................................................................................................................................3-79
EXPAND ................................................................................................................................................................................3-80
EXPANDMOD .....................................................................................................................................................................3-80
EXPFIT ...................................................................................................................................................................................3-81
EXPLN ....................................................................................................................................................................................3-81
EXPM ......................................................................................................................................................................................3-81
EYEPT.....................................................................................................................................................................................3-81
F0λ ............................................................................................................................................................................................3-82
FACT........................................................................................................................................................................................3-82
FACTOR .................................................................................................................................................................................3-82
FACTORMOD ......................................................................................................................................................................3-83
FACTORS...............................................................................................................................................................................3-83
FANNING..............................................................................................................................................................................3-84
FAST3D...................................................................................................................................................................................3-84
FCOEF ....................................................................................................................................................................................3-85
FC?............................................................................................................................................................................................3-85
FC?C.........................................................................................................................................................................................3-85
FDISTRIB...............................................................................................................................................................................3-86
FFT ...........................................................................................................................................................................................3-86
FILER ......................................................................................................................................................................................3-87
FINDALARM ........................................................................................................................................................................3-87
FINISH....................................................................................................................................................................................3-87
FIX............................................................................................................................................................................................3-87
FLASHEVAL .........................................................................................................................................................................3-88
FLOOR....................................................................................................................................................................................3-88
FONT6 ....................................................................................................................................................................................3-88
FONT7 ....................................................................................................................................................................................3-89
FONT8 ....................................................................................................................................................................................3-89
FONT→..................................................................................................................................................................................3-89→FONT..................................................................................................................................................................................3-89
FOR ..........................................................................................................................................................................................3-90
FOURIER ...............................................................................................................................................................................3-91
FP..............................................................................................................................................................................................3-91
FREE........................................................................................................................................................................................3-91
FREEZE..................................................................................................................................................................................3-91
FROOTS .................................................................................................................................................................................3-92
FS?.............................................................................................................................................................................................3-92
FS?C..........................................................................................................................................................................................3-93
FUNCTION ...........................................................................................................................................................................3-93
FXND ......................................................................................................................................................................................3-94
GAMMA..................................................................................................................................................................................3-95
GAUSS.....................................................................................................................................................................................3-95
GBASIS....................................................................................................................................................................................3-95
GCD .........................................................................................................................................................................................3-96
GCDMOD ..............................................................................................................................................................................3-96
GET..........................................................................................................................................................................................3-96
GETI ........................................................................................................................................................................................3-97
GOR .........................................................................................................................................................................................3-98
GRAD......................................................................................................................................................................................3-98
GRAMSCHMIDT .................................................................................................................................................................3-99
GRAPH ...................................................................................................................................................................................3-99
GREDUCE.............................................................................................................................................................................3-99
GRIDMAP............................................................................................................................................................................3-100→GROB................................................................................................................................................................................3-100
GROB ....................................................................................................................................................................................3-101
Contents - 6

GROBADD ..........................................................................................................................................................................3-101
GXOR....................................................................................................................................................................................3-101*H............................................................................................................................................................................................3-102
HADAMARD ......................................................................................................................................................................3-102
HALFTAN............................................................................................................................................................................3-102
HALT.....................................................................................................................................................................................3-102
HEAD....................................................................................................................................................................................3-103
HEADER→ .........................................................................................................................................................................3-103→HEADER .........................................................................................................................................................................3-103
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

KER........................................................................................................................................................................................3-123
KERRM .................................................................................................................................................................................3-123
KEY........................................................................................................................................................................................3-123
KEYEVAL............................................................................................................................................................................3-124→KEYTIME........................................................................................................................................................................3-124
KEYTIME→........................................................................................................................................................................3-125
KGET ....................................................................................................................................................................................3-125
KILL.......................................................................................................................................................................................3-125
LABEL...................................................................................................................................................................................3-125
LAGRANGE........................................................................................................................................................................3-126
LANGUAGE→...................................................................................................................................................................3-126→LANGUAGE...................................................................................................................................................................3-126
LAP.........................................................................................................................................................................................3-127
LAPL ......................................................................................................................................................................................3-127
LAST ......................................................................................................................................................................................3-127
LASTARG.............................................................................................................................................................................3-128
LCD→ ...................................................................................................................................................................................3-128→LCD ...................................................................................................................................................................................3-128
LCM........................................................................................................................................................................................3-128
LCXM ....................................................................................................................................................................................3-129
LDEC.....................................................................................................................................................................................3-129
LEGENDRE........................................................................................................................................................................3-130
LGCD ....................................................................................................................................................................................3-130
LIBEVAL ..............................................................................................................................................................................3-130
LIBS........................................................................................................................................................................................3-130
lim ...........................................................................................................................................................................................3-131
LIMIT.....................................................................................................................................................................................3-131
LIN .........................................................................................................................................................................................3-131
LINE ......................................................................................................................................................................................3-132
ΣLINE....................................................................................................................................................................................3-132
LINFIT ..................................................................................................................................................................................3-132
LININ ....................................................................................................................................................................................3-133
LINSOLVE...........................................................................................................................................................................3-133
LIST→ ...................................................................................................................................................................................3-133→LIST ...................................................................................................................................................................................3-133∆LIST.....................................................................................................................................................................................3-134
ΠLIST ....................................................................................................................................................................................3-134
ΣLIST.....................................................................................................................................................................................3-134
LN...........................................................................................................................................................................................3-134
LNAME.................................................................................................................................................................................3-136
LNCOLLECT ......................................................................................................................................................................3-136
LNP1 ......................................................................................................................................................................................3-136
LOCAL ..................................................................................................................................................................................3-137
LOG .......................................................................................................................................................................................3-137
LOGFIT ................................................................................................................................................................................3-138
LQ...........................................................................................................................................................................................3-138
LR............................................................................................................................................................................................3-138
LSQ.........................................................................................................................................................................................3-139
LU ...........................................................................................................................................................................................3-139
LVAR .....................................................................................................................................................................................3-140
MAD.......................................................................................................................................................................................3-140
MAIN.....................................................................................................................................................................................3-141
MANT....................................................................................................................................................................................3-141
MAP........................................................................................................................................................................................3-141↓MATCH...............................................................................................................................................................................3-141↑MATCH...............................................................................................................................................................................3-142
Contents - 8

MATHS..................................................................................................................................................................................3-143
MATR ....................................................................................................................................................................................3-143
MAX.......................................................................................................................................................................................3-143
MAXR ....................................................................................................................................................................................3-144
MAXΣ ....................................................................................................................................................................................3-144
MCALC..................................................................................................................................................................................3-144
MEAN....................................................................................................................................................................................3-145
MEM ......................................................................................................................................................................................3-145
MENU ...................................................................................................................................................................................3-145
MENUXY .............................................................................................................................................................................3-146
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

PA2B2 ....................................................................................................................................................................................3-162
PARAMETRIC ....................................................................................................................................................................3-162
PARITY.................................................................................................................................................................................3-163
PARSURFACE.....................................................................................................................................................................3-164
PARTFRAC ..........................................................................................................................................................................3-164
PATH.....................................................................................................................................................................................3-165
PCAR......................................................................................................................................................................................3-165
PCOEF ..................................................................................................................................................................................3-165
PCONTOUR........................................................................................................................................................................3-166
PCOV.....................................................................................................................................................................................3-166
PDIM .....................................................................................................................................................................................3-167
PERINFO .............................................................................................................................................................................3-167
PERM.....................................................................................................................................................................................3-167
PERTBL ................................................................................................................................................................................3-168
PEVAL...................................................................................................................................................................................3-168
PGDIR...................................................................................................................................................................................3-168
PICK.......................................................................................................................................................................................3-168
PICK3 ....................................................................................................................................................................................3-168
PICT .......................................................................................................................................................................................3-169
PICTURE..............................................................................................................................................................................3-169
PINIT.....................................................................................................................................................................................3-169
PIX?........................................................................................................................................................................................3-170
PIXOFF.................................................................................................................................................................................3-170
PIXON...................................................................................................................................................................................3-170
PKT ........................................................................................................................................................................................3-170
PLOT .....................................................................................................................................................................................3-171
PLOTADD ...........................................................................................................................................................................3-171
PMAX ....................................................................................................................................................................................3-171
PMIN .....................................................................................................................................................................................3-171
PMINI....................................................................................................................................................................................3-172
POLAR ..................................................................................................................................................................................3-172
POLYNOMIAL...................................................................................................................................................................3-173
POP ........................................................................................................................................................................................3-173
POS.........................................................................................................................................................................................3-174
POTENTIAL .......................................................................................................................................................................3-174
POWEXPAND....................................................................................................................................................................3-174
POWMOD............................................................................................................................................................................3-175
PR1 .........................................................................................................................................................................................3-175
PREDV..................................................................................................................................................................................3-176
PREDX..................................................................................................................................................................................3-176
PREDY..................................................................................................................................................................................3-177
PREVAL................................................................................................................................................................................3-177
PREVPRIME........................................................................................................................................................................3-178
PRLCD...................................................................................................................................................................................3-178
PROMPT...............................................................................................................................................................................3-178
PROMPTSTO ......................................................................................................................................................................3-178
PROOT..................................................................................................................................................................................3-179
PROPFRAC..........................................................................................................................................................................3-179
PRST.......................................................................................................................................................................................3-180
PRSTC....................................................................................................................................................................................3-180
PRVAR...................................................................................................................................................................................3-180
PSDEV...................................................................................................................................................................................3-181
PSI...........................................................................................................................................................................................3-181
Psi............................................................................................................................................................................................3-181
PTAYL...................................................................................................................................................................................3-182
PTPROP ................................................................................................................................................................................3-182
Contents - 10

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
QUAD....................................................................................................................................................................................3-188
QUOT....................................................................................................................................................................................3-189
QUOTE.................................................................................................................................................................................3-189
QXA .......................................................................................................................................................................................3-190
RAD........................................................................................................................................................................................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
RCLMENU...........................................................................................................................................................................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

RND .......................................................................................................................................................................................3-205
RNRM....................................................................................................................................................................................3-206
ROLL .....................................................................................................................................................................................3-206
ROLLD..................................................................................................................................................................................3-206
ROMUPLOAD ....................................................................................................................................................................3-206
ROOT ....................................................................................................................................................................................3-207
ROT........................................................................................................................................................................................3-207
ROW– ....................................................................................................................................................................................3-207
ROW+ ...................................................................................................................................................................................3-208
ROW→..................................................................................................................................................................................3-208→ROW..................................................................................................................................................................................3-208
RPL>......................................................................................................................................................................................3-209
RR ...........................................................................................................................................................................................3-209
RRB ........................................................................................................................................................................................3-209
rref...........................................................................................................................................................................................3-210
RREF......................................................................................................................................................................................3-210
RREFMOD...........................................................................................................................................................................3-211
RRK........................................................................................................................................................................................3-211
RRKSTEP .............................................................................................................................................................................3-212
RSBERR ................................................................................................................................................................................3-213
RSD ........................................................................................................................................................................................3-213
RSWP .....................................................................................................................................................................................3-214
RULES ...................................................................................................................................................................................3-214
R→B.......................................................................................................................................................................................3-214
R→C.......................................................................................................................................................................................3-215
R→D ......................................................................................................................................................................................3-215
R→I........................................................................................................................................................................................3-215
SAME.....................................................................................................................................................................................3-215
SBRK......................................................................................................................................................................................3-216
SCALE ...................................................................................................................................................................................3-216
SCALEH................................................................................................................................................................................3-216
SCALEW ...............................................................................................................................................................................3-216
SCATRPLOT........................................................................................................................................................................3-217
SCATTER .............................................................................................................................................................................3-217
SCHUR ..................................................................................................................................................................................3-218
SCI ..........................................................................................................................................................................................3-218
SCLΣ ......................................................................................................................................................................................3-218
SCONJ ...................................................................................................................................................................................3-219
SCROLL ................................................................................................................................................................................3-219
SDEV .....................................................................................................................................................................................3-219
SEND.....................................................................................................................................................................................3-219
SEQ ........................................................................................................................................................................................3-220
SERIES ..................................................................................................................................................................................3-220
SERVER................................................................................................................................................................................3-221
SEVAL ...................................................................................................................................................................................3-221
SF ............................................................................................................................................................................................3-221
SHOW....................................................................................................................................................................................3-222
SIDENS.................................................................................................................................................................................3-222
SIGMA...................................................................................................................................................................................3-222
SIGMAVX ............................................................................................................................................................................3-223
SIGN ......................................................................................................................................................................................3-223
SIGNTAB .............................................................................................................................................................................3-224
SIMP2.....................................................................................................................................................................................3-224
SIMPLIFY.............................................................................................................................................................................3-225
SIN..........................................................................................................................................................................................3-225
SINCOS.................................................................................................................................................................................3-225
Contents - 12

SINH ......................................................................................................................................................................................3-226
SINV.......................................................................................................................................................................................3-226
SIZE .......................................................................................................................................................................................3-226
SL ............................................................................................................................................................................................3-227
SLB .........................................................................................................................................................................................3-227
SLOPEFIELD......................................................................................................................................................................3-227
SNEG.....................................................................................................................................................................................3-228
SNRM.....................................................................................................................................................................................3-228
SOLVE...................................................................................................................................................................................3-229
SOLVEQN ...........................................................................................................................................................................3-229
SOLVER................................................................................................................................................................................3-230
SOLVEVX ............................................................................................................................................................................3-230
SORT......................................................................................................................................................................................3-230
SPHERE................................................................................................................................................................................3-231
SQ ...........................................................................................................................................................................................3-231
SR............................................................................................................................................................................................3-231
SRAD .....................................................................................................................................................................................3-231
SRB .........................................................................................................................................................................................3-232
SRECV...................................................................................................................................................................................3-232
SREPL....................................................................................................................................................................................3-233
SST..........................................................................................................................................................................................3-233
SST↓........................................................................................................................................................................................3-233
START ...................................................................................................................................................................................3-234
STD ........................................................................................................................................................................................3-234
STEP ......................................................................................................................................................................................3-235
STEQ .....................................................................................................................................................................................3-235
STIME....................................................................................................................................................................................3-235
STO ........................................................................................................................................................................................3-236
STOALARM.........................................................................................................................................................................3-236
STOF......................................................................................................................................................................................3-237
STOKEYS.............................................................................................................................................................................3-237
STORE...................................................................................................................................................................................3-238
STOVX ..................................................................................................................................................................................3-238
STO+ .....................................................................................................................................................................................3-238
STO– ......................................................................................................................................................................................3-239
STO* ......................................................................................................................................................................................3-239
STO/ ......................................................................................................................................................................................3-239
STOΣ......................................................................................................................................................................................3-240
STR→.....................................................................................................................................................................................3-240→STR.....................................................................................................................................................................................3-240
STREAM ...............................................................................................................................................................................3-241
STRM .....................................................................................................................................................................................3-241
STURM ..................................................................................................................................................................................3-241
STURMAB ............................................................................................................................................................................3-242
STWS......................................................................................................................................................................................3-242
SUB.........................................................................................................................................................................................3-242
SUBST....................................................................................................................................................................................3-243
SUBTMOD ...........................................................................................................................................................................3-243
SVD ........................................................................................................................................................................................3-244
SVL .........................................................................................................................................................................................3-244
SWAP .....................................................................................................................................................................................3-244
SYSEVAL..............................................................................................................................................................................3-245
SYLVESTER ........................................................................................................................................................................3-245
SYST2MAT...........................................................................................................................................................................3-245%T ..........................................................................................................................................................................................3-246
TABVAL ...............................................................................................................................................................................3-246
Contents - 13

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
TMENU.................................................................................................................................................................................3-255
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

UPDIR ...................................................................................................................................................................................3-265
UTPC .....................................................................................................................................................................................3-265
UTPF......................................................................................................................................................................................3-266
UTPN.....................................................................................................................................................................................3-266
UTPT......................................................................................................................................................................................3-267
UVAL.....................................................................................................................................................................................3-267
V→ .........................................................................................................................................................................................3-267→V2 .......................................................................................................................................................................................3-268→V3 .......................................................................................................................................................................................3-268
VANDERMONDE ............................................................................................................................................................3-269
VAR........................................................................................................................................................................................3-269
VARS......................................................................................................................................................................................3-270
VER ........................................................................................................................................................................................3-270
VERSION .............................................................................................................................................................................3-270
VISIT......................................................................................................................................................................................3-271
VISITB...................................................................................................................................................................................3-271
VPOTENTIAL ....................................................................................................................................................................3-271
VTYPE...................................................................................................................................................................................3-272*W ...........................................................................................................................................................................................3-272
WAIT .....................................................................................................................................................................................3-272
WHILE ..................................................................................................................................................................................3-273
WIREFRAME ......................................................................................................................................................................3-273
WSLOG .................................................................................................................................................................................3-274
ΣX...........................................................................................................................................................................................3-275
ΣX2.........................................................................................................................................................................................3-275
ΣX^2 ......................................................................................................................................................................................3-276
XCOL.....................................................................................................................................................................................3-276
XGET ....................................................................................................................................................................................3-276
XMIT......................................................................................................................................................................................3-276
XNUM ...................................................................................................................................................................................3-277
XOR .......................................................................................................................................................................................3-277
XPON ....................................................................................................................................................................................3-278
XPUT .....................................................................................................................................................................................3-278
XQ ..........................................................................................................................................................................................3-278
XRECV..................................................................................................................................................................................3-279
XRNG....................................................................................................................................................................................3-279
XROOT.................................................................................................................................................................................3-279
XSEND..................................................................................................................................................................................3-280
XSERV...................................................................................................................................................................................3-280
XVOL.....................................................................................................................................................................................3-281
XXRNG.................................................................................................................................................................................3-281
ΣXY........................................................................................................................................................................................3-281
ΣX*Y......................................................................................................................................................................................3-281
ΣY ...........................................................................................................................................................................................3-282
ΣY2.........................................................................................................................................................................................3-282
ΣY^2.......................................................................................................................................................................................3-282
YCOL.....................................................................................................................................................................................3-282
YRNG ....................................................................................................................................................................................3-283
YSLICE..................................................................................................................................................................................3-283
YVOL.....................................................................................................................................................................................3-284
YYRNG .................................................................................................................................................................................3-284
ZEROS ..................................................................................................................................................................................3-284
ZFACTOR ............................................................................................................................................................................3-285
ZVOL.....................................................................................................................................................................................3-285^ (Power) ...........................................................................................................................................................................3-285| (Where) ...........................................................................................................................................................................3-286
Contents - 15

√ (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+ (Add) ...............................................................................................................................................................................3-298– (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

Series and Parallel C (2, 7) .............................................................................................................................................5-12
Series and Parallel L (2, 8)..............................................................................................................................................5-13
Capacitive Energy (2, 9) .................................................................................................................................................5-13
Inductive Energy (2, 10) ................................................................................................................................................5-13
RLC Current Delay (2, 11) ............................................................................................................................................5-14
DC Capacitor Current (2, 12) .......................................................................................................................................5-14
Capacitor Charge (2, 13) ................................................................................................................................................5-14
DC Inductor Voltage (2, 14) .........................................................................................................................................5-15
RC Transient (2, 15) .......................................................................................................................................................5-15
RL Transient (2, 16)........................................................................................................................................................5-15
Resonant Frequency (2, 17)...........................................................................................................................................5-16
Plate Capacitor (2, 18) ....................................................................................................................................................5-16
Cylindrical Capacitor (2,19) ...........................................................................................................................................5-16
Solenoid Inductance (2, 20)...........................................................................................................................................5-17
Toroid Inductance (2, 21)..............................................................................................................................................5-17
Sinusoidal Voltage (2, 22) ..............................................................................................................................................5-18
Sinusoidal Current (2, 23) ..............................................................................................................................................5-18
Fluids (3) ..................................................................................................................................................................................5-18
Pressure at Depth (3, 1) .................................................................................................................................................5-19
Bernoulli Equation (3, 2) ...............................................................................................................................................5-19
Flow with Losses (3, 3) ..................................................................................................................................................5-20
Flow in Full Pipes (3, 4).................................................................................................................................................5-21
Forces and Energy (4)............................................................................................................................................................5-21
Linear Mechanics (4, 1)..................................................................................................................................................5-22
Angular Mechanics (4, 2) ...............................................................................................................................................5-23
Centripetal Force (4, 3) ..................................................................................................................................................5-23
Hooke’s Law (4, 4)..........................................................................................................................................................5-23
1D Elastic Collisions (4, 5)............................................................................................................................................5-24
Drag Force (4, 6).............................................................................................................................................................5-24
Law of Gravitation (4, 7) ...............................................................................................................................................5-24
Mass-Energy Relation (4, 8) ..........................................................................................................................................5-24
Gases (5) ..................................................................................................................................................................................5-25
Ideal Gas Law (5, 1)........................................................................................................................................................5-25
Ideal Gas State Change (5, 2) ........................................................................................................................................5-26
Isothermal Expansion (5, 3)..........................................................................................................................................5-26
Polytropic Processes (5, 4).............................................................................................................................................5-26
Isentropic Flow (5, 5) .....................................................................................................................................................5-26
Real Gas Law (5, 6).........................................................................................................................................................5-27
Real Gas State Change (5, 7) .........................................................................................................................................5-27
Kinetic Theory (5, 8) ......................................................................................................................................................5-28
Heat Transfer (6) ....................................................................................................................................................................5-28
Heat Capacity (6, 1) ........................................................................................................................................................5-29
Thermal Expansion (6, 2) ..............................................................................................................................................5-29
Conduction (6, 3) ............................................................................................................................................................5-29
Convection (6, 4).............................................................................................................................................................5-30
Conduction + Convection (6, 5) ..................................................................................................................................5-30
Black Body Radiation (6, 6)...........................................................................................................................................5-31
Magnetism (7) .........................................................................................................................................................................5-31
Straight Wire (7, 1)..........................................................................................................................................................5-32
Force between Wires (7, 2)............................................................................................................................................5-32
Magnetic (B) Field in Solenoid (7, 3) ...........................................................................................................................5-33
Magnetic (B) Field in Toroid (7, 4) ..............................................................................................................................5-33
Motion (8)................................................................................................................................................................................5-34
Linear Motion (8, 1)........................................................................................................................................................5-35
Object in Free Fall (8, 2)................................................................................................................................................5-35
Projectile Motion (8, 3) ..................................................................................................................................................5-35
Contents - 17

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

BetaTesting ........................................................................................................................................................................6-3
CD→...................................................................................................................................................................................6-3→CD...................................................................................................................................................................................6-4
COMP→ ............................................................................................................................................................................6-4
CRC.....................................................................................................................................................................................6-4
CRLIB.................................................................................................................................................................................6-4
ER........................................................................................................................................................................................6-4
H→......................................................................................................................................................................................6-4→H......................................................................................................................................................................................6-5
H→A ..................................................................................................................................................................................6-5
H→S ...................................................................................................................................................................................6-5
LC~C ..................................................................................................................................................................................6-5
LR~R ..................................................................................................................................................................................6-5→LST .................................................................................................................................................................................6-6
MAKESTR ........................................................................................................................................................................6-6
PEEK..................................................................................................................................................................................6-6
PEEKARM........................................................................................................................................................................6-6
POKE.................................................................................................................................................................................6-6
POKEARM .......................................................................................................................................................................6-7→PRG ................................................................................................................................................................................6-7→RAM ...............................................................................................................................................................................6-7
R~SB...................................................................................................................................................................................6-7
SB~B...................................................................................................................................................................................6-7
SERIAL ..............................................................................................................................................................................6-8
S→H ...................................................................................................................................................................................6-8
S~N.....................................................................................................................................................................................6-8
SREV ..................................................................................................................................................................................6-8→S2.....................................................................................................................................................................................6-8
XLIB~ ................................................................................................................................................................................6-9
CRLIB – Create Library Command ......................................................................................................................................6-9
Extension program .........................................................................................................................................................6-10
MASD – The Machine Language and System RPL Compiler........................................................................................6-11
Introduction.....................................................................................................................................................................6-11
Saturn ASM mode...........................................................................................................................................................6-19
ARM mode.......................................................................................................................................................................6-30
System RPL mode...........................................................................................................................................................6-35
Example of a Saturn assembly language program using the MASD compiler.............................................................6-38
Example of an ARM assembly language program using the MASD compiler ............................................................6-39
Disassemblers..........................................................................................................................................................................6-41
ASM→..............................................................................................................................................................................6-41
ARM→ .............................................................................................................................................................................6-41
The Entry Point Library: Extable ........................................................................................................................................6-42
nop.....................................................................................................................................................................................6-42
GETNAME.....................................................................................................................................................................6-42
GETADR.........................................................................................................................................................................6-42
GETNAMES...................................................................................................................................................................6-42
Library 257...............................................................................................................................................................................6-42
A.
Error and Status Messages .............................................................................................................................................A-1
B.
Tables of Units and Constants....................................................................................................................................... B-1
C.
System Flags...................................................................................................................................................................... C-1
D.
Reserved Variables.......................................................................................................................................................... D-1
System Reserved Variables.....................................................................................................................................................D-1
Contents of the System Reserved Variables........................................................................................................................D-2
αENTER...................................................................................................................................................................................D-2
Contents - 19

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
E.
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
F.
Parallel Processing with Lists ......................................................................................................................................... F-1
G.
Keyboard Shortcuts........................................................................................................................................................ G-1
H.
The Menu-Number Table ..............................................................................................................................................H-1
I.
The Command Menu-Path Table .................................................................................................................................. I-1
J.
ASCII Character Codes and Translations..................................................................................................................... J-1
K.
Index ...................................................................................................................................................................................... 1

Contents - 20

1
1.RPL Programming
If you’ve used a calculator or computer before, you’re probably familiar with the idea of programs. Generally
speaking, a program is something that gets the calculator or computer to do certain tasks for you — more than abuilt-in command might do. In the HP 48gII, HP 49g+, and HP 50g calculators, a program is an object that does thesame thing.

Understanding Programming
A calculator program is an object with « » delimiters containing a sequence of numbers, commands, and otherobjects you want to execute automatically to perform a task.
For example, a program that takes a number from the stack, finds its factorial, and divides the result by 2 would
look like this: « ! 2 / » or
«
!
2
/
»

The Contents of a Program
As mentioned above, a program contains a sequence of objects. As each object is processed in a program, the action
depends on the type of object, as summarized below.
Actions for Certain Objects in Programs

ObjectCommandNumberAlgebraic or `Algebraic`
String
List
ProgramGlobal name (quoted)
Global name (unquoted)

Local name (quoted)
Local name (unquoted)

ActionExecuted.
Put on the stack.
Algebraic put on the stack.
Put on the stack.
Put on the stack.
Put on the stack.
Put on the stack.
 Program executed.
 Name evaluated.
 Directory becomes current.
 Other object put on the stack.
Put on the stack.
Contents put on the stackAs you can see from this table, most types of objects are simply put on the stack — but built-in commands andprograms called by name cause execution. The following examples show the results of executing programs containing
different sequences of objects.
RPL Programming 1-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 kindsof structure are available: Local variable structure. The → command defines local variable names and a corresponding algebraic orprogram object that’s evaluated using those variables.
 Branching structures. Structure words (like DO…UNTIL…END) define conditional or loop structures tocontrol 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 orprogram object in the structure is automatically evaluated because it’s an element of the structure — even thoughalgebraic 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 torepresent the data in the following algebraic or program object.
Numeric calculations provide convenient examples of these methods. The following programs use two numbers
22from 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. Notethat the underlying formula is most apparent in the third program. This third method is often the easiest to write,
read, and debug.

1-2 RPL Programming

Entering and Executing Programs
A program is an object — it occupies one level on the stack, and you can store it in a variable.
To enter a program:
1. Press @%.The PRG annunciator appears, indicating program-entry mode is active.
2. Enter the commands and other objects (with appropriate delimiters) in order for the operations you want the
program to execute.
 Press # to separate consecutive numbers.
 Press ™ to move past closing delimiters.
3. Optional: Press @ë (newline) to start a new line in the command line at any time.
4. Press ` to put the program on the stack.

In Program-entry mode (PRG annunciator on), command keys aren’t executed — they’re entered in the commandline instead. Only nonprogrammable operations such as ƒ and J are executed.
Line breaks are discarded when you press `.
To enter commands and other objects in a program: Press the keyboard or menu key for the command or object.

All commands can also be selected from the@µ list.
This guide assumes that Flag –117 is clear, so that you see menus rather than choose boxes wherever possible. Also RPN mode should
be set.
or Type the characters using the alpha keyboard.
Refer to the calculator’s User’s Guide for how to use the alpha keyboard.
In this guide an abbreviated convention is used whereby invocations of the alpha keyboard are not always shown. In the next example weshow:
OVOLK where the alpha “VOL” can be entered as shown:
O~~VOL ~K (assuming Flag –60 is clear).
To store or name a program:
1. Enter the program on the stack.
2. Enter the variable name (with ' delimiters) and press K.

You can choose descriptive names for programs. Here are some ideas of what the name can describe:
 The calculation or action. Examples: SPH (spherical-cap volume), SORTLIST (sort a list).
 The input and output. Examples: X→FX (x to f (x)), RH→V (radius-and -height to volume).
 The technique. Example: SPHLV (spherical-cap volume using local variables).
To execute a program: Press J then the menu key for the program name.

or Enter the program name (with no delimiters) and press `.
or Put the program name in level 1 and press N.
or Put the program object in level 1 and press N.

RPL Programming 1-3

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 radiusr using
V=

4
π r3
3

If you were going to calculate the volume manually after entering the radius on the stack, you might press thesekeys:
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 thatuses 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Example: Enter a program SPH that calculates the volume of a spherical cap of height h within a sphere of radius
R using values stored in variables H and R.

1 2
V = --- πh ( 3r – h )3

In this and following chapters on programming, “stack diagrams” show what arguments must be on the stack
before a program is executed and what results the program leaves on the stack. Here’s the stack diagram for SPH.
Level 1→

Level 1→volumeThe diagram indicates that SPH takes no arguments from the stack and returns the volume of the spherical cap tolevel 1. (SPH assumes that you’ve stored the numerical value for the radius in variable R and the numerical value forthe height in variable H. These are global variables — they exist outside the program.)
Program listings are shown with program steps in the left column and associated comments in the right column.
Remember, you can either press the command keys or type in the command names to key in the program. In thisfirst listing, the keystrokes are also shown.
Program:

Keys:

Comments:«@%

Begins the program.

'1/3

O1 /3

Begins the algebraic expression
to calculate the volume.

*π*H^2*!ì Multiplies by ̟h2.
*H Q2*(3*R-H)'*!Ü Multiplies by 3r - h, completing3 * R - the calculation and ending theexpression.
H ™™

→NUM

@ï

»
`
OSPH K

Converts the expression with π
to a number.
Ends the program.
Puts the program on the stack.
Stores the program in variable
SPH.

RPL Programming 1-5

This is the program:« '1/3*π*H^2*(3*R-H)' →NUM »Now use SPH to calculate the volume of a spherical cap of radiusr = 10 and height h = 3.
First, store the data in the appropriate variables. Then select the VAR menu and execute the program. The answer isreturned 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! (‘), orpress J, then @ and the variable’s menu key (a shortcut to recall a variable’s contents to level 1), followedby ˜. 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 thenumber 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 ™KOR ™K

1-6 RPL Programming

Save the edited version of SPH in the variable. Then, to verify that the changes were saved, view SPH in thecommand line.
`J!%SPH%@%SPH% ˜

Press − to stop viewing.

Creating Programs on a Computer
It is convenient to create programs and other objects on a computer and then load them into the calculator.
If you are creating programs on a computer, you can include “comments” in the computer version of the program.
To include a comment in a program: Enclose the comment text between two @ characters.
or Enclose the comment text between one @ character and the end of the line.

Whenever the calculator processes text entered in the command line — either from keyboard entry or transferredfrom a computer — it strips away the @ characters and the text they surround. However, @ characters are notaffected if they’re inside a string.

Using Local Variables
The program SPH in the previous example uses global variables for data storage and recall. There are disadvantages
to using global variables in programs:
 After program execution, global variables that you no longer need to use must be purged if you want to clear the
VAR menu and free user memory.
 You must explicitly store data in global variables prior to program execution, or have the program execute STO.
Local variables address the disadvantages of global variables in programs. Local variables are temporary variables
created by a program. They exist only while the program is being executed and cannot be used outside the program.
They never appear in the VAR menu. In addition, local variables are accessed faster than global variables. (Byconvention, this manual uses lowercase names for local variables.) A compiled local variable is a form of local
variable that can be used outside of the program that creates it. See “Compiled Local Variables” on page 1-10 for
more information.

Creating Local Variables
In a program, a local variable structure creates local variables.
To enter a local variable structure in a program:
1. Enter the → command (press @é).
2. Enter one or more variable names.
3. Enter a defining procedure (an algebraic or program object) that uses the names.
« → name1 name2 … namen ' algebraic ' »or« → name1 name2 … namen « program » »When the → command is executed in a program, n values are taken from the stack and assigned to variables name1
name2, …. namen.

RPL Programming 1-7

For example, if the stack looks like this:then→ a creates local variable a = 20.
→ ab creates local variables a = 6 and b = 20.
→ 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 1rh→volumeProgram:Comments:«→ r hCreates local variables r and h for the radiusof the sphere and height of the cap.

'1/3*π*h^2*(3*r-h)'

Expresses the defining procedure. In thisprogram, the defining procedure for the local
variable structure is an algebraic expression.

→NUM

Converts expression to a number.

»`OSPHLVKStores 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 thestack in the correct order, then execute the program.
10 `3
J%SPHLV%

1-8 RPL Programming

Evaluating Local Names
Local names are evaluated differently from global names. When a global name is evaluated, the object stored in thecorresponding variable is itself evaluated. (You’ve seen how programs stored in global variables are automaticallyevaluated 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 notevaluated. 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:Comments:«.
.
.

→ a b c«a b + c +→ d e f

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.

'a/(d*e+f)'

Local variables a, b, c and d, e, f areavailable in this procedure.

a c / »

Only local variables a, b, c areavailable.

.

No local variables are available.

.
.

»

RPL Programming 1-9

Example: In the following program excerpt, the defining procedure for local variables d, e, and f calls a programthat you previously created and stored in global variable P1.

Program:Comments:«:→ a b c«a b + c +→ d e f
'P1+a/(d*e+f)'

Defines local variables d, e, f.
Local variables a, b, c and d, e, f are available
in this procedure. The defining procedure
executes the program stored in variable P1.

a c / »:»The six local variables are not available in program P1 because they didn’t exist when you created P1. The objects
stored in the local variables are available to program P1 only if you put those objects on the stack for P1 to use orstore those objects in global variables.
Conversely, program P1 can create its own local variable structure (with any names, such as a, c, and f, for example)
without conflicting with the local variables of the same name in the procedure that calls P1. It is possible to create a
special type of local variable that can be used in other programs or subroutines. This type of local variable is called acompiled local variable.

Compiled Local Variables
Global variables use up memory, and local variables can’t be used outside of the program they were created in.
Compiled local variables bridge the gap between these two variable types. To programs, compiled local variables
look like global variables, but to the calculator they act like local variables. This means you can create a compiled
local variable in a local variable structure, use it in any other program that is called within that structure, and when
the program finishes, the variable is gone.
Compiled local variables have a special naming convention: they must begin with a ←. For example,«→ ←y'IFTE(←y<0,BELOW,ABOVE)'»

The variable ←y is a compiled local variable that can be used in the two programs BELOW and ABOVE.

Creating User-Defined Functions as Programs
The defining procedure for a local variable structure can be either an algebraic or program object.
A program that consists solely of a local variable structure whose defining procedure is an algebraic expression is auser-defined function.

1-10 RPL Programming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 thosearguments 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.)
There’s an advantage to using a program as the defining procedure for a local variable structure: The program cancontain commands not allowed in algebraic expressions. For example, loop structures are not allowed in algebraic
expressions.

Using Tests and Conditional Structures
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..
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).

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

ProgrammableCommand

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 ofan 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 canevaluate 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:
RPL Programming 1-11

 If neither object is an algebraic or a name, returns 1. if the two objects are the same type and have the same value,

or 0. otherwise. For example, if 6 is stored in X, X 5 < puts 6 and 5 on the stack, then removes them andreturns 0.. (Lists and programs are considered to have same value if the objects they contain are identical. For
strings, “less than” means “alphabetically previous.”) If one object is an algebraic (or name) and the other object is an algebraic (or name) ora number, returns an
expression that must be evaluated to get a test result based on numeric values. For example, if 6 is stored in X,'X' 5 < returns 'X<5', then →NUM returns 0..

(Note that == is used for comparisons, while = separates two sides of an equation.)
SAME returns 1. (true) if two objects are identical. For example, 'X+3' 4 SAME returns 0. regardless of the valueof X because the algebraic 'X+3' is not identical to the real number 4. Binary integers must have the samewordsize and the same value to be identical. For all object types other than algebraics, names, and binary integers,
SAME works just like ==.
You can use any comparison function (except SAME) in an algebraic by putting it between its two arguments. For
example, if 6 is stored in X, 'X<5' →NUM returns 0..
Using Logical Functions

Logical functions return a test result based on the outcomes of one or two previously executed tests. Note thatthese four functions interpret any nonzero argument as a true result.
Logical Functions

Keys

ProgrammableCommand

Description!°%TEST% L
%AND%

AND

%OR%

OR

%XOR%

XOR

%NOT%

NOT

Returns 1. (true) only if botharguments are true (0. otherwise).
Returns 1. (true) if either or botharguments are true (0. otherwise).
Returns 1. (true) if either argument,
but not both, is true (0. otherwise).
Returns 1. (true) if the argument is 0
(false); otherwise, returns 0. (false).

AND, OR, and XOR combine two test results. For example, if 4 is stored in Y, Y 8 < 5 AND returns 1.. First,
Y 8 < returns 1. to the stack. AND removes 1. and 5 from the stack, interpreting both as true results, and returns
1. to the stack.
NOT returns the logical inverse of a test result. For example, if 1 is stored in X and 2 is stored in Y, X Y < NOT
returns 0.
You can use AND, OR, and XOR in algebraics as infix functions. For example, '3<5 XOR 4>7'
returns 1.

NUM

You can use NOT as a prefix function in algebraics. For example, 'NOT Z‰4' →NUM returns 0. if Z = 2.

1-12 RPL ProgrammingTesting Object Types

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 ofobject types in chapter 3, in the TYPE command, to find calculator objects and their corresponding type numbers.
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 inchapter 3 for more information.

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 thetest-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 thevalue 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 istrue, 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

RPL Programming 1-13

« … IF test-clause
THEN true-clause ELSE false-clause END … »IF … THEN … ELSE … END executes either the true-clause sequence of commands if the test-clause is true, or thefalse-clause sequence of commands if the test-clause is false. If the test-clause is an algebraic, it’s automatically evaluatedto 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 thevalue is nonzero, the true-clause is executed — otherwise, the false-clause is executed. After the appropriate clause is
executed, execution resumes following END. See “Conditional Examples” on page 1-15.
To enter IF 7 THEN 7 ELSE 7 END in a program: Press !°%BRCH% @%#IF#% .
The IFTE Function

The algebraic syntax for this function is 'IFTE( test, true-clause, false-clause)'
If test evaluates true, the true-clause algebraic is evaluated — otherwise, the false-clause algebraic is evaluated.
You can also use the IFTE function with stack syntax. It takes three arguments: a test-result in level 3, a true-clauseobject in level 2, and a false-clause object in level 1. See “Conditional Examples” on page 1-15.
To enter IFTE in a program or in an algebraic: Press!°%BRCH% L!%IFTE% .

The CASE 7 END Structure

The syntax for this structure is« … CASE
test-clause1 THEN true-clause1 END
test-clause2 THEN truet-clause2 END...
test-clausen THEN true-clausen END
default-clause (optional)
END … »The CASE … END structure lets you execute a series of test-clause commands, then execute the appropriate trueclause sequence of commands. The first test that returns a true result causes execution of the corresponding trueclause, ending the CASE … END structure. Optionally, you can include after the last test a default-clause that’s
executed if all the tests evaluate to false. If a test-clause is an algebraic, it’s automatically evaluated to a number —you don’t need →NUM or EVAL.
When CASE is executed, test-clause1 is evaluated. If the test is true, true-clause1 is executed, and execution skips to
END. If test-clause1 is false, execution proceeds to test-clause2. Execution within the CASE structure continues
until a true-clause is executed, or until all the test-clauses evaluate to false. If a default clause is included, it’s
executed if all the test-clauses evaluate to false. See “Conditional Examples” below.

1-14 RPL Programming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’smade 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. andthe copy of the value made by DUP).
The following version uses an algebraic as the test clause:« → x « x IF 'x>0' THEN NEG END » »The following version uses the IFT command:« DUP 0 > « NEG » IFT »Example: One Conditional Action. This program multiplies two numbers if both are nonzero.

Program:
«
→ x y
«
IF
'x‹0'
'y‹0'
AND
THEN
x y *
END
»
»

Comments:
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

Example: Two Conditional Actions. This program takes a value x from the stack and calculates (sin x)/x. At x
= 0 the division would error, so the program returns the limit value 1 in this case.
« → x « IF 'x‹0' THEN x SIN x / ELSE 1 END » »The following version uses IFTE algebraic syntax:« → x 'IFTE(x‹0,SIN(x)/x,1' »Example: Two Conditional Actions. This program multiplies two numbers together if they’re both nonzero —otherwise, it returns the string “ZERO”.

Program:Comments:«→ n1 n2Creates the local variables.

«IF'n1‹0 AND n2‹0'THEN
n1 n2 *Starts the defining procedure.
Starts the test clause.
Tests n1 and n2.
If both numbers are nonzero, multiplies the twovalues.
Otherwise, returns the string ZERO.

ELSE"ZERO"
END»»

Ends the conditional.
Ends the defining procedure.

Example: Two Conditional Actions. This program tests if two numbers on the stack have the same value. If
so, it drops one of the numbers and stores the other in variable V1 — otherwise, it stores the number from level 1
in V1 and the number from level 2 in V2.

Program:Comments:

«
IF
DUP2
SAME
THEN
DROP
'V1' STO
ELSE'V1' STO'V2' STO
END

For the test clause, copies the numbers in levels 1 and
2 and tests if they have the same value.
For the true clause, drops one of the numbers andstores the other in V1.
For the false clause, stores the level 1 number in V1
and the level 2 number in V2.
Ends the conditional structure.

»`

Puts the program on the stack.

OTST KStores it in TST.

Enter the numbers 26 and 52, then execute TST to compare their values. Because the two numbers aren’t equal, theVAR menu now contains two new variables V1 and V2.
26 `52 J %TST%
1-16 RPL ProgrammingExample: Multiple Conditional Actions. The following program stores the level 1 argument in a variable if theargument is a string, list, or program.

Program:
«
→ y
«
CASE
y TYPE 2 SAMETHEN y 'STR' STO END
y TYPE 5 SAMETHEN y 'LIST' STO END
y TYPE 8 SAMETHEN y 'PROG' STO END
END»»Comments:
Defines local variable y.
Starts the defining procedure.
Starts the case structure.
Case 1: If the argument is a string, storesit 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.

Using Loop Structures
You can use loop structures to execute a part of a program repeatedly. To specify in advance how many times torepeat the loop, use a definite loop. To use a test to determine whether or not to repeat the loop, use an indefinite loop.
Loop structures let a program execute a sequence of commands several times. Loop structures are built withcommands — called structure words — that work only when used in proper combination with each other. Theseloop 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.
In addition, the Σ function provides an alternative to definite loop structures for summations.

Using Definite Loop Structures
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 NEXT Structure

The syntax for this structure is« … start finish START loop-clause NEXT … »START … NEXT executes the loop-clause sequence of commands one time for each number in the range start tofinish. The loop-clause is always executed at least once.
SyntaxFlowchartStartfinish1:Start
2:finish

START

counter=startStore finish

loop-clause

Body of loop
counter = counter + 1

NEXTIscounter ≤ finish?

yesno
START 7 NEXT Structure

START takes two numbers (start and finish) from the stack and stores them as the starting and ending values for aloop counter. Then, the loop-clause is executed. NEXT increments the counter by 1 and tests to see if its value isless than or equal to finish. If so, the loop-clause is executed again — otherwise, execution resumes following
NEXT.
To enter START 7 NEXT in a program: Press !°%BRCH% !%START%.

Example: The following program creates a list containing 10 copies of the string "ABC":« 1 10 START "ABC" NEXT 10 →LIST »1-18 RPL Programming

The START 7 STEP Structure

The syntax for this structure is« … start finish START loop-clause increment STEP … »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 atleast once.
SyntaxFlowchartStartfinish1:Start
2:finish

START

counter=startStore finish

loop-clause

Body of loop

increment

1:increment
counter = counter +increment

STEP
Is
counter ≤ finish?

yes

no

START 7 STEP Structure

START takes two numbers (start and finish) from the stack and stores them as the starting and ending values of theloop counter. Then the loop-clause is executed. STEP takes the increment value from the stack and increments thecounter 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 it’s positive, the loop is executed again if the counter is less thanor equal to finish. If the increment value is negative, the loop is executed if the counter is greater than or equal tofinish. Otherwise, execution resumes following STEP. In the previous flowchart, the increment value is positive.
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 » »RPL Programming 1-19

The FOR 7 NEXT Structure

The syntax for this structure is« … start finish FOR counter loop-clause NEXT … »FOR … NEXT executes the loop-clause program segment one time for each number in the range start to finish,using local variable counter as the loop counter. You can use this variable in the loop-clause. The loop-clause isalways executed at least once.

SyntaxFlowchartStartfinish1:Start
2:finishFOR

counter=startStore finish

loop-clause

Body of loop
counter = counter + 1

NEXTIscounter ≤ finish?

yes

no

FOR 7 NEXT 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. Then the loop-clause is executed — counter can appear within the loop-clause.
NEXT increments counter by one, and then tests whether its value is less than or equal to finish. If so, the loop-clause isrepeated (with the new value of counter) — otherwise, execution resumes following NEXT. When the loop is exited,counter is purged.
To enter FOR 7 NEXT in a program: Press!°%BRCH% ! %FOR%.

Example: The following program places the squares of the integers 1 through 5 on the stack:« 1 5 FOR j j SQ NEXT »Example: The following program takes the value x from the stack and computes the integer powers i of x. For
example, when x =12 and start and finish are 3 and 5 respectively, the program returns 123, 124 and 125. It requires as
inputs start and finish in level 3 and 2, and x in level 1. (→ x removes x from the stack, leaving start and finish there
as arguments for FOR.)« → x « FOR n 'x^n' EVAL NEXT » »1-20 RPL Programming

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.
SyntaxFlowchartStartfinish1:Start
2:finishFOR

counter=startStore finish

loop-clause

Body of loop

increment

1:increment
counter = counter +increment

STEP
Is
counter ≤ finish?

yesnoFOR 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 analgebraic 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 isless 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

Example: The following program takes n from the stack, and returns the series of numbers 1, 2, 4, 8, 16, …, n. If n
isn’t in the series, the program stops at the last value less than n.
« 1 SWAP FOR n n n STEP »The first n is the local variable declaration for the FOR loop. The second n is put on the stack each iteration of theloop. The third n is used by STEP as the step increment.

Using Indefinite Loop Structures
The DO 7 UNTIL 7 END Structure

The syntax for this structure is« … DO loop-clause UNTIL test-clause END … »DO… UNTIL… END executes the loop-clause sequence repeatedly until test-clause returns a true (nonzero) result.
Because the test-clause is executed after the loop-clause, the loop-clause is always executed at least once.
SyntaxFlowchartDOloop-clause

Body of loop

UNTIL

TEST

test-clause

1: test result

END

Is testresult non-zero?

noyes
DO 7 UNTIL 7 END Structure

DO starts execution of the loop-clause. UNTIL marks the end of the loop-clause. The test-clause leaves a test
result on 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. If the argument of END is an algebraic or a name, it’sautomatically evaluated to a number.
To enter DO 7 UNTIL 7 END in a program: Press!°%BRCH% ! %DO%.

1-22 RPL Programming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:Comments:«
DUP 1→ n s cDuplicates n, stores the value into n ands, and initializes c to 1.

«

Starts the defining procedure.

DO

Starts the loop-clause.

'c' INCR

Increments the counter by 1. (See Using
Loop Counters.)
Calculates c × n and adds the product tos.

n * 's' STO+
UNTIL

Starts the test-clause.

s 1000 >Repeats loop until s > 1000.

END

Ends the test-clause.

s cPuts s and c on the stack.

»Ends the defining procedure.

»

RPL Programming 1-23

The WHILE 7 REPEAT 7 END Structure

The syntax for this structure is« … WHILE test-clause REPEAT loop-clause END … »WHILE … REPEAT … END repeatedly evaluates test-clause and executes the loop-clause sequence if the test is true.
Because the test-clause is executed before the loop-clause, the loop-clause is not executed if the test is initially false.
SyntaxFlowchart

WHILE
TEST
test-clause
1: test result
REPEATno

Is testresult non-zero?

yes
loop-clause

Body of loop

END
WHILE 7 REPEAT 7 END Structure

WHILE starts execution of the test-clause, which returns a test result to the stack. REPEAT takes the value fromthe stack. If the value is nonzero, execution continues with the loop-clause-otherwise, execution resumes following
END. If the argument of REPEAT is an algebraic or a name, it’s automatically evaluated to a number.
To enter WHILE 7 REPEAT 7 END in a program: Press!°%BRCH% ! %WHILE%.

Example: The following program starts with a number on the stack, and repeatedly performs a division by 2 aslong as the result is evenly divisible. For example, starting with the number 24, the program computes 12, then 6,
then 3.
« WHILE DUP 2 MOD 0 == REPEAT 2 / DUP END DROP »Example: The following program takes any number of vectors or arrays from the stack and adds them to thestatistics matrix. (The vectors and arrays must have the same number of columns.)
WHILE … REPEAT … END is used instead of DO … UNTIL … END because the test must be done before
the addition. (If only vectors or arrays with the same number of columns are on the stack, the program errors after
the last vector or array is added to the statistics matrix.)« WHILE DUP TYPE 3 == REPEAT Σ+ END »1-24 RPL Programming

Using Loop Counters
For certain problems you may need a counter inside a loop structure to keep track of the number of loops. (Thiscounter isn’t related to the counter variable in a FOR … NEXT/STEP structure.) You can use any global or local
variable as a counter. You can use the INCR or DECR command to increment or decrement the counter value andput its new value on the stack.
The syntax for INCR and DECR is« … 'variable' INCR … »or« … 'variable' DECR … »To enter INCR or DECR in a program: Press!° #MEM# %ARITH% %INCR% or %DECR%.

The INCR and DECR commands take a global or local variable name (with ' delimiters) as their argument — thevariable must contain a real number. The command does the following:
1. Changes the value stored in the variable by +1 or -1.
2. Returns the new value to the stack.
Example: If c contains the value 5, then 'c' INCR stores 6 in c and returns 6 to the stack.
Example: The following program takes a maximum of five vectors from the stack and adds them to the current
statistics matrix.

Program:Comments:«
0 → c

Stores 0 in local variable c.

«
WHILE
DUP TYPE 3 ==Starts the defining procedure.
Starts the test clause.
Returns true if level 1 contains a vector.

'c' INCR
5 ‰AND
REPEATΣ+
END»»

Increments and returns the value in c.
Returns true if the counter c≤5.
Returns true if the two previous test
results are true.
Adds the vector to ΣDAT.
Ends the structure.
Ends the defining procedure.

RPL Programming 1-25

Using Summations Instead of Loops
For certain calculations that involve summations, you can use the Σ function instead of loops. You can use Σ withstack 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

Comments:«
0 1 ROT
FOR j
j SQ +
NEXT»

Program:

Initializes the summation and puts
the limits in place.
Loops through the calculation.

Comments:«→ n'Σ(j=1,n,j^2)'

Uses Σ to calculate the summation.

»
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:Comments:

«

œLIST

Finds the dimensions of the array andleaves 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, andsums them.

OBJ→
1
+

»

1-26 RPL Programming

Using Flags
You can use flags to control calculator behavior and program execution. You can think of a flag as a switch that iseither on (set) or off (clear). You can test a flag’s state within a conditional or loop structure to make a decision.
Because certain flags have unique meanings for the calculator, flag tests expand a program’s decision-making
capabilities beyond that available with comparison and logical functions.

Types of Flags
The calculator has two types of flags:
 System flags. Flags –1 through –128. These flags have predefined meanings for the calculator.
 User flags. Flags 1 through 128. User flags are, for the most part, not used by any built-in operations. What theymean depends entirely on how the program uses them.
Appendix C lists the 128 system flags and their definitions. For example, system flag –40 controls the clock display— when this flag is clear (the default state), the clock is not displayed — when this flag is set, the clock is displayed.
(When you press %CLK% in the H%MISC% menu, you are setting or clearing flag –40.)
Note that for these calculators, there are no display annunciators to indicate that user flags 1 through 5 are set, likethe older HP 48S-series and HP 48G-series calculators.

Setting, Clearing, and Testing Flags
Flag commands take a flag number from the stack — an integer 1 through 128 (for user flags) or –1 through –128(for system flags).
To set, clear, or test a flag:
1. Enter the flag number (positive or negative).
2. Execute the flag command — see the table below.
Flag Commands

Key

ProgrammableCommand

Description!°%TEST% LL:
%SF%

SF

Sets the flag.

%CF%

CF

Clears the flag.

%FS?%

FS?

Returns 1. (true) if the flag is set, or
0. (false) if the flag is clear.

%FC?%

FC?

Returns 1. (true) if the flag is clear,or 0. (false) if the flag is set.

%FS?C%FS?C

Tests the flag (returns true if theflag is set), then clears the flag.

%FC?C%FC?C

Tests the flag (returns true if theflag is clear), then clears the flag.

RPL Programming 1-27

Example: System Flag. The following program sets an alarm for June 6, 2007 at 5:05 PM. It first tests the statusof system flag –42 (Data Format flag) in a conditional structure and then supplies the alarm date in the current dateformat, based on the test result.
Example:Program:Comments:«

THEN
6.152007

Tests the status of flag –42, the Date
Format flag.
If flag –42 is clear, supplies the date inmonth/day/year format.

ELSE
15.062007

If flag –42 is set, supplies the date inday.month.year format.

END

Ends the conditional.

17.05 "TEST COMPLETE"
3 →LIST STOALARM

Sets the alarm: 17.05 is the alarm timeand “TEST COMPLETE” is thealarm message.

IF-42 FC?

»
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:Comments:«
IF

Starts the conditional.

10 FS?

Tests the status of user flag 10.
If flag 10 is set, returns the integer part.

THEN
IP
ELSE
FP
END

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 thefractional 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To recall the current flag states:
 Execute RCLF (!°L %MODES% %FLAG% L%RCLF% ).

RCLF returns a list containing four 64-bit binary integers representing the current states of the lower and uppergroups of system and user flags:{ #nsystem-lower #nuser-lower #nsystem-upper #nuser-upper }To change the current flag states:
1. Enter the flag-state argument — see below
2. Execute STOF (!°L %MODES% %FLAG% L%STOF% ).

STOF sets the current states of flags based on the flag-state argument:# ns

Changes the states of only the system flags.

{ #ns-lower #nu-lower #ns-upper #nu-upper} Changes the states of the system and user flags.
Example: The program PRESERVE on page 2-6 uses RCLF and STOF.

Using Subroutines
Because a program is itself an object, it can be used in another program as a subroutine. When program B is used byprogram A, program A calls program B, and program B is a subroutine in program A.
Example: The program TORSA calculates the surface area of a torus of inner radius a and outer radius b. TORSA
is used as a subroutine in a second program TORSV, which calculates the volume of a torus.

The surface area and volume are calculated by22

2

A = π (b – a )1 2 2
2
V = --- π ( b – a ) ( b – a )4(The quantity π 2 ( b2 – a 2 ) in the second equation is the surface area of a torus calculated by TORSA.)
Here are the stack diagram and program listing for TORSA.

Level 2

Level 1→

Level 1ab→surface area

RPL Programming 1-29

Program:Comments:«→ a b'π^2*(b^2-a^2)'Creates local variables a and b.
Calculates the surface area.

→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 1ab→

volumeProgram:Comments:«→ a b

Creates local variables a and b.

«
a b TORSA

b a - * 4 /Starts a program as the defining
procedure.
Puts the numbers stored in a and bon the stack, then calls TORSA
with those arguments.
Completes the volume calculation
using the surface area.

»»

Ends the defining procedure.

`
O TORSV K

Puts the program on the stack.
Stores the program in TORSV.

Now use TORSV to calculate the volume of a torus of inner radius a = 6 and outer radius b = 8.
6 ` 8 J %TORSV%

1-30 RPL Programming

Single-Stepping through a Program
It’s easier to understand how a program works if you execute it step by step, observing the effect of each step.
Doing this can help you debug your own programs or understand programs written by others.
To single-step from the start of a program:
1. Put the program or program name in level 1 (or the command line).
2. Press !°LL%RUN% %DBUG% to start and immediately suspend execution. HLT appears in the status area.
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.
To turn off the HALT annunciator at any time: Press !°LL %RUN% %KILL%.

Example: Execute program TORSV step by step. Use a = 6 and b = 8.

Select the VAR menu and enter the data. Enter the program name and start the debugging. HLT indicates program
execution is suspended.
@· J6 `8 `O%TORSV%!°LL%RUN% %DBUG%

Display and execute the first program step. Notice that it takes the two arguments from the stack and stored
them in local variables a and b.
%SST%Continue single-stepping until the status area shows the current directory. Watch the stack and status area
as you single-step through the program.
%SST% … %SST%.

RPL Programming 1-31

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 HLTannunciator 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 stepin the subroutine.
Example: In the previous example, you used %SST% to execute subroutine TORSA in one step. Now executeprogram TORSV step by step to calculate the volume of a torus of radii a = 10 and b = 12. when you reachsubroutine TORSA, execute it step by step.

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.
@·J 10 `12 O%TORSV%!°LL%RUN% %DBUG%%SST°% (4 times)%NEXT%The next step is TORSA. Single-step into TORSA, then check that you’re at the first step of TORSA.
%SST°% %NEXT%

Press != != to complete subroutine and program execution. The following table summarizes theoperations for single-stepping through a program.

1-32 RPL Programming

Single-Step Operations
Key

ProgrammableCommand

Description!°LL%RUN% :%DBUG%DBUG

Starts program execution, then suspends it as if HALT were the firstprogram command. Takes as its argument the program or program namein level 1.

%SST%

Executes the next object or command in the suspended program.

%SST°%

Same as %SST%, except if the next program step is a subroutine, single-steps
to the first step in that subroutine.

%NEXT%

Displays the next one or two objects, but does not execute them. The
display persists until the next keystroke.

%HALT%

HALT

Suspends program execution at the location of the HALT command in
the program.

%KILL%KILL

Cancels all suspended programs and turns off the HLT annunciator.

!=

CONT

Resumes execution of a halted program.

Trapping Errors
If you attempt an invalid operation from the keyboard, the operation is not executed and an error message appears.
For example, if you execute + with a vector and a real number on the stack, the calculator returns the message +Error: Bad Argument Type and returns the arguments to the stack (if Last Arguments is enabled).
In a program, the same thing happens, but program execution is also aborted. If you anticipate error conditions,
your program can process them without interrupting execution.
For simple programs, you can run the program again if it stops with an error. For other programs, you can design
them to trap errors and continue executing. You can also create user-defined errors to trap certain conditions inprograms. The error trapping commands are located in the PRG ERROR menu.

Causing and Analyzing Errors
Many conditions are automatically recognized by the calculator as error conditions — and they’re automaticallytreated as errors in programs.
You can also define conditions that cause errors. You can cause a user-defined error (with a user-defined error message)— or you can cause a built-in error. Normally, you’ll include a conditional or loop structure with a test for the error
condition — and if it occurs, you’ll cause the user-defined or built-in error to occur.
To cause a user-defined error to occur in a program:
1. Enter a string (with "" delimiters) containing the desired error message.
2. Enter the DOERR command (PRG ERROR menu).

RPL Programming 1-33

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”.
Example: The following program aborts execution if the list in level 1 contains three objects.
«
OBJ→
IF 3 ==
THEN "3 OBJECTS IN LIST" DOERR
END»

The following table summarizes error trapping commands.
Error Trapping Commands
Key

ProgrammableCommand

Description!° L L %ERROR% :%DOERR%

DOERR

Causes an error. For a string in level 1, causes a user-defined error: thecalculator 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 themessage 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

Clears the last error number and message.

1-34 RPL Programming

Making an Error Trap
You can construct an error trap with one of the following conditional structures:
 IFERR … THEN … END.
 IFERR … THEN … ELSE … END.
The IFERR 7 THEN 7 END Structure

The syntax for this structure is« … IFERR trap-clause THEN error-clause END … »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, the error-clause is skipped and execution
resumes after the END command.
To enter IFERR 7 THEN 7 END in a program: Press !°LL %ERROR% !%IFERR%.

Example: The following program takes any number of vectors or arrays from the stack and adds them to thestatistics matrix. However, the program stops with an error if a vector or array with a different number of columns
is encountered. In addition, if only vectors or arrays with the same number of columns are on the stack, theprogram stops with an error after the last vector or array has been removed from the stack.
« WHILE DUP TYPE 3 == REPEAT Σ+ END »In the following revised version, the program simply attempts to add the level 1 object to the statistics matrix until
an error occurs. Then, it ends by displaying the message DONE.

Program:Comments:«
IFERR

Starts the trap-clause.

WHILE
1
REPEAT
Σ+
END
THEN"DONE" 1 DISP
1 FREEZE

The WHILE structure repeats
indefinitely, adding the vectors
and arrays to the statistics matrix
until an error occurs.

END»

Starts the error clause. If an error
occurs in the WHILE structure,displays the message DONE in
the status area.
Ends the error structure.

RPL Programming 1-35

The IFERR 7 THEN 7 ELSE 7 END Structure

The syntax for this structure is« … IFERR trap-clause
THEN error-clause ELSE normal-clause END … »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, theprogram displays an error message and prompts again.

Program:Comments:«
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 theToo Few Arguments message for 2
seconds, then puts 0 (false) on the stack forthe main loop.
If no error occurs, puts 1 (true) on the stack
for the main loop.

END

Ends the error trap.

END

Ends the main loop. If the error trap left 0(false) on the stack, the main loop repeats —otherwise, the program ends.

THEN
ERRM 5 DISP
2 WAIT0»

1-36 RPL Programming

InputA program can stop for user input, then resume execution, or can use choose boxes or input forms (dialog boxes)
for input. You can use several commands to get input:
 PROMPT (!=to resume).
 DISP FREEZE HALT (!=to resume).
 INPUT (`to resume).
 INFORM

 CHOOSE

Data Input Commands
Key

Command

Description!°L %IN% :%INFOR%INFORM

Creates a user-defined input form.

%NOVAL%NOVAL

Place holder for the INFORM command. Returned when a value is not present in
an input form field.

%CHOOS%CHOOSE

Creates a user-defined choose box.

%KEY%

KEY

Returns a test result to level 1 and, if a key is pressed, the location of that key (level
2).

%WAIT%

WAIT

Suspends program execution for a specified duration (in seconds, level 1).

%INPUT%

INPUT

Suspends program execution for data input.

%PROMP%

PROMPT

Halts program execution for data input.

Using PROMPT, CONT for Input
PROMPT uses the status area for prompting, and allows the user to use normal keyboard operations during input.
To enter PROMPT in a program:
1. Enter a string ( with "" delimiters) to be displayed as a prompt in the status area.
2. Enter the PROMPT command (PRG IN menu).
« … "prompt-string" PROMPT … »PROMPT takes a string argument from level 1, displays the string (without the "" delimiters) in the status area, andhalts program execution. Calculator control is returned to the keyboard.
When execution resumes, the input is left on the stack as entered.
To respond to PROMPT while running a program:
1. Enter your input — you can use keyboard operations to calculate the input.
2. Press !=.

The message remains until you press `or − or until you update the status area.
RPL Programming 1-37

Example: If you execute this program segment« "ABC?" PROMPT »the display looks like this:Example: The following program, TPROMPT, prompts you for the dimensions of a torus, then calls programTORSA (from page 1-29) to calculate its surface area. You don’t have to enter data on the stack prior to program
execution.

Program:Comments:«"ENTER a, b IN ORDER:"

Puts the prompting string on thestack.

PROMPT

Displays the string in the statusarea, halts program execution, andreturns calculator control to the
keyboard.
Executes TORSA using the justentered stack arguments.

TORSA»`OTPROMPT ‰Stores the program in TPROMPT.

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

1-38 RPL Programming

Continue the program.
!=

Note that when program execution is suspended by PROMPT, you can execute calculator operations just as you did
before you started the program. If the outer radius b of the torus in the previous example is measured as 0.83 feet,
you can convert that value to inches while the program is suspended for data input by pressing .83 `12 *, then!=.

Using DISP FREEZE HALT, CONT for Input
DISP FREEZE HALT lets you control the entire display during input, and allows the user to use normal keyboard
operations during input.
To enter DISP FREEZE HALT in a program:
1. Enter a string or other object to be displayed as a prompt.
2. Enter a number specifying the line to display it on.
3. Enter the DISP command (PRG OUT menu).
4. Enter a number specifying the areas of the display to “freeze.”
5. Enter the FREEZE command (PRG OUT menu).
6. Enter the HALT command (PRG OUT menu).
« … prompt-object display-line DISP

freeze-area FREEZE HALT … »DISP displays an object in a specified line of the display. DISP takes two arguments from the stack: an object fromlevel 2, and a display-line number 1 through 7 from level 1. If the object is a string, it’s displayed without the ""delimiters. The display created by DISP persists only as long as the program continues execution — if the program
ends or is suspended by HALT, the calculator returns to the normal stack environment and updates the display.
However, you can use FREEZE to retain the prompt display.
FREEZE “freezes” display areas so they aren’t updated until a key press. Argument n in level 1 is the sum of thecodes for the areas to be frozen: 1 for the status area, 2 for the stack/command line area, 4 for the menu area.
HALT suspends program execution at the location of the HALT command and turns on the HALT annunciator.
Calculator control is returned to the keyboard for normal operations.
When execution resumes, the input remains on the stack as entered.
To respond to HALT while running a program:
1. Enter your input — you can use keyboard operations to calculate the input.
2. Press !=.
Example: If you execute this program segment« "ABC DEF GHI" CLLCD 3 DISP 2 FREEZE HALT »The display looks like this:

RPL Programming 1-39

(The in the previous program is the calculator’s representation for the newline character after you enter a programon 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 contentsof the level-1 string in the command line. It then activates Program-entry mode, puts the insert cursor after thestring 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.
To respond to INPUT while running a program
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« "Variable name?" ":VAR:" INPUT »the display looks like this:1-40 RPL Programming

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.

Program:Comments:«"Key in radius"

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, andsuspends the program for data input(the radius of the sphere).

INPUT

OBJ→

Converts the result string into its
component object — a real number.

3 ^Cubes the radius.

4 * 3 / π * →NUM

Completes the calculation.

»`OVSPH ‰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 include INPUT options: Use a list (with {} delimiters) as the command-line argument for INPUT. The list can contain one more of thefollowing: Command-line string (with "" delimiters).
 Cursor position as a real number or as a list containing two real numbers.
 Operating options ALG, Œ, or V.

In its general form, the level 1 argument for INPUT is a list that specifies the content and interpretation of thecommand line. The list can contain one or more of the following parameters in any order:{ "command-line" cursor-position operating-options }“Command-line”

Specifies the content of the command line when the program pauses. Embedded
newline characters produce multiple lines in the display. (If not included, thecommand line is blank.)

Cursor-position

Specifies the position of the cursor in the command line and its type. (If notincluded, an insert cursor is at the end of the command line.) A real number n specifies the nth character in the first row (line) of the commandline. Zero specifies the end of the command-line string. A positive number
specifies the insert cursor — a negative number specifies the replace cursor.
 A list {row character} specifies the row and character position. Row 1 is the firstrow (line) of the command line. Characters count fromthe left end of each row — character 0 specifies the end of the row. A positive row
number specifies the insert cursor — a negative row number specifies the replacecursor.

operating-options

Specify the input setup and processing using zero or more of these unquoted names: ALG activates Algebraic/Program-entry mode (for algebraic syntax). (If notincluded, Program-entry mode is active.) Œ (~…a) specifies alpha lock. (If not included, alpha is inactive.) V verifies whether the result string (without the "" delimiters) is a valid object orsequence of objects. If the result string isn’t valid, INPUT displays the Invalid
Syntax message and prompts again for data. (if not included, syntax isn’t
checked.)To design the command-line string for INPUT:
 For simple input, use a string that produces a valid object:
 Use an empty string Use a :label : tag.

 Use a @ text @ comment.

 For special input, use a string that produces a recognizable pattern.

After the user enters input in the command line and presses ` to resume execution, the contents of thecommand line are returned to level 1 as the result string. The result string normally contains the original commandline string, too. If you design the command-line string carefully, you can ease the process of extracting the input
data.
1-42 RPL ProgrammingTo process the result string from INPUT:
 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 LIMIT@" displays @UPPER LIMIT◄ in the command line.
If you press 200 `the return string is "@UPPER LIMIT@200". When OBJ→ extracts the text from thestring, it strips away the @ characters and the enclosed characters, and it returns the number 200. (See “Creating
Programs on a computer” on page 1-7 for more information about @ comments.)
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 commandline. 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:Comments:«"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, andthe verify option. (To key in the string,press @ Õ ! ê a ™ @ë ! ê b.
After you press `to put the finishedprogram on the stack, the string is shownon one line, with indicating the newline
character.) The embedded list puts theinsert 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

Calls TORSA to calculate the surface area.

`O TINPUT ‰Stores the program in TINPUT.

»

RPL Programming 1-43

Execute TINPUT to calculate the surface area of a torus of inner radius a = 10 and outer radius b = 20.
J %TINPU%

Key in the value for a, press ˜ to move the cursor to the next prompt, then key in the value for b.
10 ˜20Continue program execution.
`
Example: The following program executes INPUT to prompt for a social security number, then extracts two
strings: the first three digits and last four digits. The level 1 argument for INPUT specifies:
 A command-line string with dashes.
 The replace cursor positioned at the start of the prompt string ( –1). This lets the user “fill in” the command line
string, using ™to skip over the dashes in the pattern.
 By default, no verification of object syntax — the dashes make the content invalid as objects
Level 1

1-44 RPL Programming→

Level 2

Level 1→“last four digits““first three digits“Program:Comments:«"Key in S.S. #"{ "- " -1 }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 thelast -).
Suspends the program for input.
Copies the result string, thenextracts 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.

RPL Programming 1-45

You can specify a help message and the type of data that must be entered in field by entering field specifications aslists. For example, { { "Name:" "Enter your name" 2 } } defines the Name field, displays
Enter your name across the bottom of the input form, and accepts only object type 2 (strings) as input.
To set up a choose box:
1. Enter a title string for the choose box.
2. Enter a list of items. If this is a list of two-element lists, the first element is displayed in the choose box, and thesecond element is returned to level 2 when OK is pressed.
3. Enter a position number for the default highlighted item. (0 makes a view-only choose box.)
4. Execute the CHOOSE command.
Example: Enter a title "FIRST ONE" `.
Enter a list of items { ONE TWO THREE } `.
Enter a position number for default highlighted value 3 `.
Execute CHOOSE (!°L%IN% %CHOOS%).
Example: The following choose box appears:

Example: The following program uses input forms, choose boxes, and message boxes to create a simple phone list
database.

Program:Comments:«'NAMES' VTYPE
IF -1 ==
THEN { } 'NAMES' STO
END
WHILE
"PHONELIST OPTIONS:"{{ "ADD A NAME" 1 }{ "VIEW A NUMBER" 2 }} 1 CHOOSE

Checks if the name list
(NAMES) exists, if not, creates
an empty one.
While cancel is not pressed,
creates a choose box that lists
the database options. When
OK is pressed, the second
item in the list pair is returnedto the stack.

REPEAT → c «Stores the returned value in c.

CASE c 1 ==
THEN
WHILE

Case 1 (ADD name), whilecancel is not pressed, do thefollowing:

1-46 RPL Programming

Program:Comments:"ADD A NAME"{{ "NAME:" "ENTER NAME" 2 }{ "PHONE:" "ENTER A PHONENUMBER" 2 } }{ } { } { } INFORM
REPEAT

Creates an input form that getsthe 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"
MSGBOXELSE 1→LIST NAMES + SORT'NAMES' STO

Checks if either field in the
new entry is blank.

END
END
END

Ends the IF structure, theWHILE loop, and the CASE
statement.
Case 2 (View a Number).

c 2 ==

If either one is, displays amessage.
If neither are, adds the list to
NAMES, sorts it, and stores itback in NAMES.

THEN
IF { } NAMES SAMETHEN"YOU MUST ADD A NAME FIRST"MSGBOX

Checks if NAMES is an empty
list.

ELSE
WHILE
"VIEW A NUMBER"
NAMES 1 CHOOSE
REPEAT→STR MSGBOX

If NAMES isn’t empty, createsa choose box using NAMES as
choice items.

END
END
END

If it is, displays a message.

When OK is pressed, thesecond item in the NAMES
list pairs (the phone number) is
returned. Makes it a string anddisplays 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, andmarks the end the program.

`OPHONES ‰Stores the program in
PHONES.

RPL Programming 1-47

You can delete names and numbers by editing the NAMES variable.
To improve upon this program, create a delete name routine.

Beeping to Get Attention
To enter BEEP in a program:
1. Enter a number that specifies the tone frequency in hertz.
2. Enter a number that specifies the tone duration in seconds.
3. Enter the BEEP command (!°L%OUT% L menu).
« … frequency duration BEEP … »BEEP takes two arguments from the stack: the tone frequency from level 2 and the tone duration from level 1.
Example: The following edited version of TPROMPT sounds a 440-hertz, one-half-second tone at the prompt fordata input.

Program:Comments:«"ENTER a, b IN ORDER:"
440 .5 BEEP
PROMPTTORSASounds a tone justbefore the prompt fordata input.

»

Stopping a Program for Keystroke Input
A program can stop for keystroke input — it can wait for the user to press a key. You can do this with the WAIT
and KEY commands.

Using WAIT for Keystroke Input
The WAIT command normally suspends execution for a specified number of seconds. However, you can specify
that it wait indefinitely until a key is pressed.
To enter WAIT in a program To stop without changing the display, enter 0 and the WAIT command (PRG IN menu).
 To stop and display the current menu, enter –1 and the WAIT command (PRG IN menu).

WAIT takes the 0 or –1 from level 1, then suspends execution until a valid keystroke is executed.
For an argument of –1, WAIT displays the currently specified menu. This lets you build and display a menu of user
choices while the program is paused. (A menu built with MENU or TMENU is not normally displayed until the
program ends or is halted.)
When execution resumes, the three-digit key location number of the pressed key is left on the stack. This number
indicates the row, column, and shift level of the key.
To respond to WAIT while running a program: Press any valid keystroke. (A prefix key such as !or ~ by itself is not a valid keystroke.)1-48 RPL Programming

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 tolevel 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 ispressed:« … DO UNTIL KEY END 95 == … »OutputYou can determine how a program presents its output. You can make the output more recognizable using thetechniques described in this section.

Data Output Commands
Key

Command

Description!°L%OUT%:%PVIEW%

PVIEW

Displays PICT starting at the given coordinates.

%TEXT%TEXT

Displays the stack display.

%CLLCD%

CLLCD

Blanks the stack display.

%DISP%DISP

Displays an object in the specified line.

%FREEZ%

FREEZE“Freezes” a specified area of the display until a key press.

%MSGBO%MSGBOXCreates a user-defined message box.

%BEEP%BEEP

Sounds a beep at a specified frequency (in hertz, level 2)
and duration (in seconds, level 1).

RPL Programming 1-49

Labeling Output with Tags
To label a result with a tag:
1. Put the output object on the stack.
2. Enter a tag — a string, a quoted name, or a number.
3. Enter the →TAG command (PRG TYPE menu).
« … object tag →TAG … »→TAG takes two arguments — an object and a tag — from the stack and return a tagged object.
Example: The following program TTAG is identical to TINPUT, except that it returns the result as AREA: value.

Program:Comments:«"Key in a, b"{ ":a: :b:" {1 0} V }INPUT OBJ→TORSA"AREA"

Enters the tag (a string).

→TAG

Uses the program result
and string to create thetagged object.

»`OTTAG ‰Stores the program in
TTAG.

Execute TTAG to calculate the area of a torus of inner radius a = 1.5 and outer radius b = 1.85. The answer isreturned as a tagged object.
J %TTAG% 1.5 ˜1.85 `Labeling and Displaying Output as Strings
To label and display a result as a string:
1. Put the output object on the stack.
2. Enter the →STR command (PRG TYPE menu).
3. Enter a string to label the object (with "" delimiters).
4. Enter the SWAP + commands to swap and concatenate the strings.
5. Enter a number specifying the line to display the string on.
6. Enter the DISP command (PRG OUT menu).
« … object →STR label SWAP + line DISP … »DISP displays a string without its "" delimiters.

1-50 RPL ProgrammingExample: The following program TSTRING is identical to TINPUT, except that it converts the program result toa string and appends a labeling string to it.

Program:Comments:«"Key in a, b"{ ":a: :b:" {1 0} V}
INPUT OBJ→
TORSA
→STR
"Area = "SWAP +
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 ofthe display.

»`OTSTRING ‰Stores the program in TSTRING.

Execute TSTRING to calculate the area of the torus with a = 1.5 and b = 1.85. The labeled answer appears in thestatus area.
@·J%TSTRI%

1.5 ˜1.85 `Pausing to Display Output
To pause to display a result:
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:

RPL Programming 1-51

You must acknowledge a message box by pressing %OK% or −.

Using Menus with Programs
You can use menus with programs for different purposes:
 Menu-based input. A program can set up a menu to get input during a halt in a program and then resume
executing the same program.
 Menu-based application. A program can set up a menu and finish executing, leaving the menu to start
executing other related programs.
To set up a built-in or library menu:
1. Enter the menu number.
2. Enter the MENU command (MODES MENU menu).
To set up a custom menu:
1. Enter a list (with { } delimiters) or the name of a list defining the menu actions. If a list of two element lists isgiven, the first element appears in the menu, but it is the second element that is returned to the stack when themenu key is pressed. This second element can itself be a list with up to 3 objects, one for the menu key, one for theleft shift menu key and one for the right shift menu key.
2. Activate the menu:
 To save the menu as the CST menu, enter the MENU command (MODES MENU menu).
 To make the menu temporary, enter the TMENU command (MODES MENU menu).

The menu isn’t displayed until program execution halts.
Menu numbers for built-in menus are listed in Appendix H. Library menus also have numbers — the library
number serves as the menu number. So you can activate applications menus (such as the SOLVE and PLOT
menus) and other menus (such as the VAR and CST menus) in programs. The menus behave just as they do during
normal keyboard operations.
You create a custom menu to cause the behavior you need in your program — see the topics that follow. You cansave the menu as the CST menu, so the user can get it again by pressing !£. Or you can make it temporary —it remains active (even after execution stops), but only until a new menu is selected — and it doesn’t affect thecontents of variable CST.
To specify a particular page of a menu, enter the number as m.pp, where m is the menu number and pp is the page
number (such as 94.02 for page 2 of the TIME menu). If page pp doesn’t exist, page 1 is displayed (94 gives page 1of the TIME menu).
Example: Enter 69 MENU to get page 1 of the MODES MISC menu.
Enter 69.02 MENU to get page 2 of the MODES MISC menu.
To restore the previous menu: Execute 0 MENU.

To recall the menu number for the current menu: Execute the RCLMENU command (MODES MENU menu).

Using Menus for Input
To display a menu for input in a program:
1. Set up the menu — see the previous section.
2. Enter a command sequence that halts execution (such as DISP, PROMPT, or HALT).
1-52 RPL Programming

The program remains halted until it’s resumed by a CONT command, such as by pressing !æ. If you createa custom menu for input, you can include a CONT command to automatically resume the program when you press
the menu key.
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.

Using Menus to Run Programs
You can use a custom menu to run other programs. That menu can serve as the main interface for an application (acollection of programs).
To create a menu-based application:
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
menu.
Example: The following program, WGT, calculates the mass of an object in either English or SI units given theweight. 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:{{ "ENGL" « "ENTER Wt in POUNDS" PROMPT 32.2 / » }{ "SI" « "ENTER Wt in NEWTONS" PROMPT 9.81 / » }}OLST ‰

Program:Comments:« LST TMENU »Displays the custom menu
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

1.25 !æExample: The following program, EIZ, constructs a custom menu to emulate the HP Solve application for acapacitive electrical circuit. The program uses the equation E = IZ, where E is the voltage, I is the current, and Z is
the impedance.

Because the voltage, current, and impedance are complex numbers, you can’t use the HP Solve application to findsolutions. The custom menu in EIZ assigns a direct solution to the left-shifted menu key for each variable, andassigns store and recall functions to the unshifted and right-shifted keys — the actions are analogous to the HP Solveapplication. The custom menu is automatically stored in CST, replacing the previous custom menu — you can press!£ to restore the menu.

Program:Comments:«
DEG -15 SF -16 SF
2 FIX{{ "E" { « 'E' STO »« I Z * DUP 'E' STO"E: " SWAP + CLLCD
1 DISP 3 FREEZE »« E » } }Sets Degrees mode. Sets flags –15 and –16 todisplay complex numbers in polar form. Sets
the display mode to 2 Fix.
Starts the custom menu list.
Builds menu key 1 for E.
Unshifted action: stores the object in E. Leftshift action: calculates I × Z, stores it in E, anddisplays it with a label. Right-shift action: recalls
the object in E.

{ "I" { « 'I' STO »« E Z / DUP 'I' STO"I:"SWAP + CLLCD
1 DISP 3 FREEZE »« I » } }Builds menu key 2.

{ "Z"{ « 'Z' STO »« E I / DUP 'Z' STO"Z:" SWAP + CLLCD
1 DISP 3 FREEZE »« Z » } }Builds menu key 3.

}Ends the list.

MENU

Displays the custom menu.

»`OEIZ ‰Stores the program in EIZ.

For a 10-volt power supply at phase angle 0°, you measure a current of 0.37-amp at phase angle 68°. Find theimpedance of the circuit using EIZ.
@·J%EIZ%

Key in the voltage value.
!Ü10 ~@6 0

1-54 RPL ProgrammingStore the voltage value. Then key in and store the current value. Solve for the impedance.
%%E%% !Ü .37 ~@6 68 %%I%%!%%Z%%

Recall the current and double it. Then find the voltage.
@%%I%% 2 *%%I%% !%%E%%

Press (!&H)%FMT% %STD% and L %MODES %ANGLE %RECT% to restore Standard and Rectangular modes.

Turning Off the Calculator from a Program
To turn off the calculator in a program: Execute the OFF command (PRG RUN menu).

The OFF command turns off the calculator. If a program executes OFF, the program resumes when the calculator
is next turned on.

RPL Programming 1-55

2
2.RPL Programming Examples
The programs in this chapter demonstrate basic programming concepts. These programs are intended to improveyour programming skills, and to provide supplementary functions for your calculator.
At the end of each program, the program’s checksum and size in bytes are listed to help make sure you typed theprogram in correctly. (The checksum is a binary integer that uniquely identifies the program based on its contents).
To make sure you’ve keyed the program in correctly, store it in its name, put the name in level 1, then execute the
BYTES command (!°#MEM# %BYTES%). This returns the program’s checksum to level 2, and its size in bytes
to level 1. (If you execute BYTES with the program object in level 1, you’ll get a different byte count.)
The examples in this chapter assume the calculator is in its initial, default condition — they assume you haven’tchanged any of the calculator’s operating modes, with the exception of selecting RPN mode. (To reset the calculator
to this condition, see “Memory Reset” in chapter 5 of the HP 48G Series User's Guide.)
Each program listing in this chapter gives the following information:
 A brief description of the program.
 A syntax diagram (where needed) showing the program’s required inputs and resulting outputs.
 Discussion of special programming techniques in the program.
 Any other programs needed.
 The program listing.
 The program’s checksum and byte size.

Fibonacci Numbers
This section includes three programs that calculate Fibonacci numbers:
 FIB1 is a user-defined function that is defined recursively (that is, its defining procedure contains its own name).
FIB1 is short.
 FIB2 is a user-defined function with a definite loop. It’s longer and more complicated than FIB1, but faster.
 FIBT calls both FIB1 and FIB2 and calculates the execution time of each subprogram.
FIB1 and FIB2 demonstrate an approach to calculating the nth Fibonacci number Fn, where:
F0 = 0, F1 = 1, Fn = Fn-1 + Fn-2

FIB1 (Fibonacci Numbers, Recursive Version)Level 1→

Level 1n→Fn

RPL Programming Examples 2-1

Techniques used in FIB1

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 andFn-2.
 IFTE (if -then-else function).

FIB1 program listing

Program:Comments:«→ n'IFTE(n‰1,n,FIB1(n-1)+FIB1(n-2))'

Defines local variable n.
The defining procedure, analgebraic expression. If n ≤ 1,
Fn = n, else Fn = Fn-1+Fn-2.

»

Stores the program in FIB1.

`OFIB1 K

Checksum: # 14909d (press O%FIB1% !°#MEM# %BYTES%)
Bytes:
113.5
Example: Calculate F6. Calculate F10 using algebraic syntax.

First calculate F6.
J

6 %FIB1%
Next, calculate F10 using algebraic syntax.
O%FIB1% !Ü10 N

FIB2 (Fibonacci Numbers, Loop Version
Level 1→

Level 1n→

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

FIB2 program listing

Program:Comments:«→ n«
IF n 1 ‰THEN nELSECreates a local variable structure.
If n ≤ 1,then Fn = n;otherwise …

0 1

Puts F0 and F1 on the stack.

2 n
START
DUP

From 2 to n does the following loop:

ROT

Gets the previous F (initially F0)+

Calculates the next F (initially F2)

NEXT

Repeats the loop.

SWAP DROP

Drops Fn-1.

END

Ends the ELSE clause.

»»`O FIB2 K

Copies the latest F (initially F1)Ends the defining procedure.
Stores the program in FIB2.

Checksum: # 23902d (press O%FIB2% !°#MEM# %BYTES%)
Bytes:
89
Example: Calculate F6 and F10.

Calculate F6.
J

6 %FIB2%
Calculate F10.
10 %FIB2%

RPL Programming Examples 2-3

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 1n→Fn

FIB1 TIME: z

FIB2 TIME: z

Techniques used in FIBT Structured programming. FIBT calls both FIB1 and FIB2.
 Programmatic use of calculator clock. FIBT executes the TICKS command to record the start and finish ofeach subprogram.
 Labeling output. FIBT tags each execution time with a descriptive message.
Required Programs
 FIB1 (page 2-1) calculates Fn using recursion.
 FIB2 (page 2-2) calculates Fn using looping.

FIBT program listing

Program:Comments:«
DUP TICKS SWAP
FIB1 SWAP TICKS SWAP
- B→R 8192 /"FIB1 TIME" →TAGROT TICKS SWAP FIB2
TICKS
SWAP DROP SWAP
- B→R 8192 /"FIB2 TIME" →TAG

Copies n, then executes FIB1, recording thestart and stop time.
Calculates the elapsed time, converts it to areal number, and converts that number toseconds.
Leaves the answer returned by FIB1 in level 2.
Tags the execution time.
Executes FIB2, recording the start and stoptime.
Drops the answer returned by FIB2 (FIB1
returned the same answer). Calculates theelapsed 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.

Example: Calculate F13 and compare the execution time for the two methods.

Select the VAR menu and do the calculation.
J

13 %FIBT%F13 is 233. FIB2 takes fewer seconds to execute than FIB1 (far fewer if n is large). (The times required for the
calculations depend on the contents of memory and other factors, so you may not get the exact times shown above.)

Displaying a Binary Integer
This section contains three programs:
 PAD is a utility program that converts an object to a string for right-justified display.
 PRESERVE is a utility program for use in programs that change the calculator’s status (angle mode, binary base,and so on).
 BDISP displays a binary integer in HEX, DEC, OCT, and BIN bases. It calls PAD to show the displayed
numbers right-justified, and it calls PRESERVE to preserve the binary base.

PAD (Pad with Leading Spaces)
PAD converts an object to a string, and if the string contains fewer than 22 characters, adds spaces to the beginningof the string till the string reaches 22 characters.
When a short string is displayed with DISP, it appears left-justified: its first character appears at the left end of thedisplay. By adding spaces to the beginning of a short string, PAD moves the string to the right. When the string(including leading spaces) reaches 22 characters, it appears right-justified: its last character appears at the right end of
the display. PAD has no effect on longer strings.

Level 1→

Level 1

object→"object"

Techniques used in PAD
 WHILE…REPEAT…END (indefinite loop). The WHILE clause contains a test that executes the REPEAT
clause and tests again (if true) or skips the REPEAT clause and exits (if false).
 String operations. PAD demonstrates how to convert an object to string form, count the number of characters,

and combine two strings.

RPL Programming Examples 2-5

PAD program listing

Program:Comments:

«
→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.
Loop-clause adds a leading space.
End loop.

»`OPAD KStores the program in PAD.

Checksum: # 6577d
Bytes:
57.5
PAD is demonstrated in the program BDISP.

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

Techniques used in PRESERVE Preserving calculator flag status. PRESERVE uses RCLF (recall flags) to record the current status of thecalculator in a binary integer, and STOF (store flags) to restore the status from that binary integer.

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 backon 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.
 Local-variable structure.

2-6 RPL Programming Examples

PRESERVE program listing

Program:Comments:«
RCLF

Recalls the list of four 64-bit
binary integers representing thestatus of the 128 system flags and
128 user flags.

→ fStores the list in local variable f.

«

Begins the defining procedure.

IFERR
EVAL

Starts the error trap.
Executes the program placed on
the stack as the level 1 argument.
If the program caused an error,
restores flags, shows the error, andaborts execution.
Ends the error routine.

THEN
f STOF ERRN DOERR
END

Puts the list back on the stack,then restores the status of all flags.
Ends the defining procedure.

f STOF»»Stores the program in
PRESERVE.

`OPRESERVE K

Checksum: # 26834d
Bytes:
71
PRESERVE is demonstrated in the program BDISP.

BDISP (Binary Display)
BDISP displays a real or binary number in HEX, DEC, OCT, and BIN bases.
Level 1→

Level 1

#n

→

#n

n

→

n

RPL Programming Examples 2-7

Techniques used in BDISP IFERR…THEN…END (error trap). To accommodate real-number arguments, BDISP includes thecommand 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 isrequired when an error occurs (since a binary number is an acceptable argument), so the THEN clause contains
no commands.

In case an error occurs, the LASTARG recovery feature must be enabled to return theargument (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 byNEXT.
 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 thestack and is executed by PRESERVE.
 BDISP also contains four program arguments that “customize” the action of the loop. Each of these contains acommand 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 thisprogram is a defining procedure for a local variable structure, it is automatically executed.
 Enabling LASTARG.

Required Programs

PAD
 PAD (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.

2-8 RPL Programming Examples

BDISP program listing

Program:Comments:««

Begins the main nested program.

DUP

Makes a copy of n.

-55 CF

Clears flag –55 to enable LASTARG.
Begins error trap.

IFERR
R→B

Converts n to a binary integer.

THEN
END

If an error occurs, do nothing (no commands in
the THEN clause).

→ n
«
CLLCD

Creates a local variable n and begins the defining
program.
Clears the display.

« BIN »« OCT »

Nested program for BIN.
Nested program for OCT.

« DEC »

Nested program for DEC.

« HEX »

Nested program for HEX.

1 4
FOR j

Sets the counter limits.
Starts the loop with counter j.

EVAL

Executes one of the nested base programs(initially for HEX).

n →STR

Makes a string showing n in the current base.

PAD

Pads the string to 22 characters.

j DISP

Displays the string in the jth line.

NEXT»

Increments j and repeats the loop.
Ends the defining program.

3 FREEZE

Freezes the status and stack areas.

»
PRESERVE

Ends the main nested program.
Stores the current flag status, executes the main
nested program, and restores the status.

»`OBDISP K

Stores the program in BDISP.

Checksum: # 22884d
Bytes:
187

RPL Programming Examples 2-9

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%

Return to the normal stack display and check the current base.
−‚ã
Although the main nested program left the calculator in BIN base,
PRESERVE restored DEC base. To check that BDISP also works forreal numbers, try 144.
J

144 %BDISP%
Press − to return to the stack display.

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 andpressing %©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 ExamplesthTechniques used in %TILE
 FLOOR and CEIL. For an integer, FLOOR and CEIL both return that integer; for a noninteger, FLOOR and
CEIL return successive integers that bracket the noninteger.
 SORT. The SORT command sorts the list elements into ascending order.

%TILE program listing

Program:Comments:«
SWAP SORTDUP SIZEBrings the list to level 1 and sorts it.
Copies the list, then finds its size.

1 + ROT %Calculates the position of the specified percentile.

DUP2

Makes a copy of the list and the percentile.

FLOOR

Rounds the position to the lower integer.

1 MAX OVER SIZE MIN

Ensures it is between 1 and the size of the list.

GET
ROT ROT

Gets the corresponding number.
Moves the list to level 1.

CEIL

Rounds the position to the upper integer.

1 MAX OVER SIZE MIN

Ensures it is between 1 and the size of the list.

GET
+ 2 /
»

Gets the corresponding number.
Calculates the average of the two numbers.

`O%TILE K

Stores the program in %TILE.

Checksum: # 3805d
Bytes:
92.5
Example: Calculate the median of the list {8 3 1 5 2}.
!ä8 3 1 5 2`

J50 %©TILE%

MEDIAN (Median of Statistics Data)
MEDIAN returns a vector containing the medians of the columns of the statistics data. Note that for a sorted list
with an odd number of elements, the median is the value of the center element; for a list with an even number of
elements, the median is the average value of the elements just above and below the center.
Level 1→

Level 1→

[ x1 x2  xm ]RPL Programming Examples 2-11

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.

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 ofthe 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:Comments:«
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 thenumber of rows in ΣDAT and m is the number ofcolumns.
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 isthe 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 themth 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 ROLLDMoves the median to the proper stack level.

NEXT

Increments j and repeats the loop.

OBJ→ DROP

2-12 RPL Programming Examples

Program:m →ARRYs STOΣ

Comments:
Combines all the medians into an m-element vector.
Restores ΣDAT to its previous value.
Ends the defining procedure.

»»`OMEDIAN K

Stores the program in MEDIAN.

Checksum: # 256d
Bytes:
140
Example: Calculate the median of the following data.
18 12
4 7
3 2
11 1
31 48
20 17

There are two columns of data, so MEDIAN will return a two-element vector.
Enter the matrix.
‚Ù%OK% %EDIT%

18 `12 `˜šš
4 `7 `
3 `2 `
11 `1 `
31 `48 `20 `17 `` %OK%The matrix is now stored in ΣDAT.
Calculate the median.
J %MEDIA%

Clear approximate mode (set exact mode) before going on to the next example.

Expanding and Collecting Completely
This section contains two programs: MULTI repeats a program until the program has no effect on its argument.
 EXCO calls MULTI to completely expand and collect an algebraic.

RPL Programming Examples 2-13

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 clausecontains 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 theprogram.
MULTI program listing

Program:«→ p

Comments:
Creates a local variable p that contains the
program from level 1.

«
DO
DUP
p EVAL

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.

DUP
ROT
UNTIL
SAME

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 newversion are the same.
Ends the DO structure.
Ends the defining procedure.

END»»`OMULTI K

Stores the program in MULTI.

Checksum: # 22693d
Bytes:
56
MULTI is demonstrated in the next programming example.

2-14 RPL Programming Examples

EXCO (Expand and Collect Completely)
EXCO repeatedly executes EXPAN on an algebraic until the algebraic doesn’t change, then repeatedly executes
COLCT until the algebraic doesn’t change. In some cases the result will be a number.
Expressions with many products of sums or with powers can take many iterations of EXPAN to expand
completely, resulting in a long execution time for EXCO.

Level 1→

Level 1'algebraic'→'algebraic''algebraic'→zTechniques used in EXCO
 Subroutines. EXCO calls the program MULTI twice. It is more efficient to create program MULTI and simply
call its name twice than write each step in MULTI two times.
Required Programs MULTI (Multiple Execution) repeatedly executes the programs that EXCO provides as arguments.
EXCO program listing

Program:Comments:«« EXPAN »Puts a program on the stack as
the level 1 argument for MULTI.
The program executes the
EXPAN command.

MULTI

Executes EXPAN until thealgebraic object doesn’t change.

« COLCT »Puts another program on thestack for MULTI. The program
executes the COLCT command.

MULTI

Executes COLCT until thealgebraic object doesn’t change.

»`OEXCO KStores the program in EXCO.

Checksum: # 41162d
Bytes:
65.5
Example: Expand and collect completely the expression:2

3x(4y + z) + (8x – 5z)

Enter the expression.
O3 * X *RPL Programming Examples 2-15

!Ü4 *Y+Z ™+! Ü 8 *X -5 *Z™Q2`
Select the VAR menu and start the program.
J %EXCO%Minimum and Maximum Array Elements
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

Techniques used in MNX
 DO…UNTIL…END (indefinite loop). The DO clause contains the sort instructions. The UNTIL clausecontains 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 automaticallyset, 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 newminimum 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 twoelements and the status of flag 10.

2-16 RPL Programming Examples

MNX program listing

Program:Comments:«{{ "MAX"« 10 SF CONT » }{ "MIN"« 10 CF CONT » }}TMENU
"Sort for MAX or MIN?"
PROMPT

Defines the option menu. %MAX% setsflag 10 and continues execution.
%MIN% clears flag 10 and continues
execution.
Displays the temporary menu and aprompt message.

1 GETI

Gets the first element of the array.

DO

Begins the DO loop.

ROT ROT GETI

Puts the index and the array in levels
1 and 2, then gets the new arrayelement.
Moves the current minimum or
maximum array element from level 4
below 1, then copies both.
Tests the combined state of therelative value of the two elements andthe status of flag 10.

4 ROLL DUP2

IF
> 10 FS? XOR
THEN
SWAP
END

If the new element is either less thanthe current maximum or greater thanthe current minimum, swaps the newelement into level 1.

DROP

Drops the other element off thestack.
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
it. Restores the last menu.

UNTIL-64 FS?
END
SWAP DROP 0 MENU»`OMNX KStores 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

Enter the matrix.
!²

12 `56 `˜šš
45 `1 `
9 `14 ``
Select the VAR menu and execute MNX.
J %MNX%

Find the maximum element.
%MAX%

MNX2 (Minimum or Maximum Element—Version 2)
Given an array on the stack, MNX2 finds the minimum or maximum element in the array. MNX2 uses a different
approach than MNX: it executes OBJ→ to break the array into individual elements on the stack for testing, rather
than executing GETI to index through the array.
Level 1→

Level2

Level 1[[ array ]]→[[ array ]]Z max or Z min

Techniques used in MNX2
 FOR…NEXT (definite loop). The initial counter value is 1. The final counter value is nm –1, where nm is thenumber of elements in the array. The loop-clause contains the sort instructions.
 User flag for logic control. User flag 10 defines the sort: When flag 10 is set, MNX2 finds the maximum
element; when flag 10 is clear, it finds the minimum element. You determine the status of flag 10 at the beginningof the program.
 Nested conditional. An IF…THEN…END conditional is nested in the FOR…NEXT loop, and determines
the following: Whether to maintain the current minimum or maximum element, or make the current element the newminimum or maximum.
 The sense of the comparison of elements (either < or >) based on the status of flag 10.
 Logical function. MNX2 executes XOR (exclusive OR) to test the combined state of the relative value of the twoelements and the status of flag 10.
 Custom menu. MNX2 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.

2-18 RPL Programming Examples

MNX2 program listing

Program:Comments:«{{ "MAX"« 10 SF CONT » }{ "MIN"« 10 CF CONT » }}TMENU
"Sort for MAX or MIN?"
PROMPT
DUP OBJ→

1
SWAP 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 aprompting message.
Copies the array. Returns the individual arrayelements to levels 2 through nm+1, andreturns the list containing n and m to level 1.
Sets the initial counter value.
Converts the list to individual elements on
the stack.

DROP * 1 -Drops the list size, then calculates the final
counter value (nm - 1).

FOR nStarts the FOR…NEXT loop.

DUP2

DROP

Saves the array elements to be tested (initiallythe last two elements). Uses the last arrayelement as the current minimum or
maximum.
Tests the combined state of the relative valueof the two elements and the status of flag 10.
If the new element is either less than thecurrent maximum or greater than the current
minimum, swaps the new element into level1.
Drops the other element off the stack.

NEXT
0 MENU

Ends the FOR…NEXT loop.
Restores the last menu.

IF> 10 FS? XOR
THEN
SWAP
END

»
`OMNX2 KStores 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

!²

12 `56 `˜šš
45 `1 `
9 `14 ``

Select the VAR menu and execute MNX2.
J %MNX2%

Find the minimum element.
%MIN%

Applying a Program to an Array
APLY makes use of list processing to transform each element of an array according to a desired procedure.
The procedure applied to each element must be a program that takes exactly one argument (i.e. the element) andreturns exactly one result (i.e. the transformed element).
The procedure assumes flag –55 to be clear, and unexpected results could be returned if flag –55 is set.

Level 2

Level 1→

Level 1[ array ]« program »→[[ array ]] or {{ array }}Techniques used in APLY Manipulating Meta-Objects. Meta-objects are composite objects like arrays and lists that have been disassembled
on the stack. APLY illustrates several approaches to manipulating the elements and dimensions of such objects.

APLY makes use of DOSUBS (although DOLIST might also have been used)
to perform the actual transformation of array elements.
 Using an IFERR…THEN…ELSE…END Structure. The entire symbolic pseudo-array case is handledwithin a error structure — triggered when the →ARRY command generates an error when symbolic elements arepresent.
 Using Flags. User flag 1 is used to track the case when the input array is a vector.
 Application of List Processing.

APLY program listing

Program:«→ a p«

2-20 RPL Programming Examples

Comments:
Store the array and program in local variables.
Begin the main local variable structure.

Program:
1 CF
a DUP SIZEDUP SIZE
IF 1 ==
THEN 1 SF 1 +SWAP OBJ→ OBJ→ DROP

Comments:
Make sure the flag 1 is clear to begin theprocedure.
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 theelement count, n, in level 1.

1 + ROLL

Roll the elements up the stack and bring the“matrix” dimensions of the vector to level 1.

ELSE DROP2 a OBJ→

If array is a matrix, clean up the stack anddecompose the matrix into its elements, leaving
its dimension list on level 1.
Duplicate the dimension list and compute thetotal number of elements.
Roll up the element count and combine all
elements into a list. Note that the elements inthe list are in row-major order.

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?CTHEN DROP
END → n m
« 1 n
FOR i
m →LIST'm*(n-i)+i' EVAL
ROLLD

Recalls the program and uses it as an argument
for DOSUBS (DOLIST works in this case aswell). 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 thegiven 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 sothat the next row can be collected.

RPL Programming Examples 2-21

Program:Comments:
Repeat loop for the next row.
Gather rows into a list, forming a list of lists(symbolic pseudo-array).
Close the local variable structure and end the
IFERR…THEN…END structure. Clear flag 1
before exiting the program.

NEXT
n →LIST»
END 1 CF»»Stores the program in APLY.

`OAPLY K

Checksum: # 11132d
Bytes:
314
Example: Apply the function, f(x) = Ax3-7 to each element x of the vector [ 3 -2 4 ].
!Ô3†2W†4`‚å 3 QA *7 `J %APLY%H#DISP ˜˜(select small stack display to see
all vector elements.)

Converting Between Number BasesnBASE converts a positive decimal number (x) into a tagged string representation of the equivalent value in adifferent number base (b). Both x and b must be real numbers. nBASE automatically rounds both arguments to thenearest integer.
Level 2

Level 1→

Level 1xb→

x baseb: "string"Techniques used in nBASE
 String Concatenation and Character Manipulation. nBASE makes use of several string and character
manipulation techniques to build up the result string.

nBASE labels (“tags”) the output string with its original arguments so that the output is acomplete record of the command.
 Indefinite Loops. nBASE accomplishes most of its work using indefinite loops — both DO...UNTIL...END
and WHILE...REPEAT...END loops.
 Tagged Output.

2-22 RPL Programming Examples

nBASE program listing

Program:Comments:«
1 CF 0 RND SWAP 0 RND RCLF

Clear flag 1, round both arguments tointegers and recall flag settings.

→ b n f

Store the base, number and flag settingsin local variables.

«

Begin the outer local variable structure.

STD n LOG b LOG /Sets “standard” display mode andcomputes the ratio of the common
logarithms of number and base.

10 RND

Rounds result to remove imprecision inlast decimal place.

IP n 0Find the integer part of log ratio, recall
the original number, and initialize thecounter 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 - ^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.

DUP2 MOD

Makes a copy of the arguments andcomputes the decimal value still
remaining that must be accounted forby other positions.
Is the remainder zero and m ≥ b?

IF DUP 0 =='m' EVAL b Š
AND
THEN 1 SF
END 'm' STO/ IP

If the test is true, then set flag 1.
Store the remainder in m. Compute thenumber of times the current positionvalue goes into the remaining decimalvalue. This is the “digit” that belongs in
the current position.

IF DUP 10 Š
THEN 55
ELSE 48
END + CHRIs 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:
UNTIL 'm' EVAL 0 ==END
IF 1 FS?CTHEN "0" +Comments:
Repeat the DO...UNTIL loop until m =0 (i.e. all decimal value have beenaccounted for).
Is flag 1 set? Clear the flag after the test.
Then add a placeholding zero to theresult string.

WHILE i 'k' EVAL
- 0 ‹Begin WHILE...REPEAT loop to
determine if additional placeholding
zeros are needed.
Loop repeats as long as i≠k.

REPEAT "0" +1 'k' STO+

Add an additional placeholding zero andincrement k before repeating the testclause.
End the WHILE...REPEAT...END
loop, the IF...THEN...END structure,and the inner local variable structure.
End the outermost
IF...THEN...ELSE...END structure andcreate the label string and tag the result
string using the original arguments.

END
END
»
" base" b +n SWAP + →TAG

f STOF

Restore original flag settings.

»»`OnBASE KStores the program in nBASE.

Checksum: # 54850d
Bytes:
433
Example: Convert 100010 to base 23.

1000 `23 J %NBASE%

Verifying Program Arguments
The two utility programs in this section verify that the argument to a program is the correct object type.
 NAMES verifies that a list argument contains exactly two names.
 VFY verifies that the argument is either a name or a list containing exactly two names. It calls NAMES if theargument is a list.
You can modify these utilities to verify other object types and object content.

2-24 RPL Programming Examples

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 }→Level 1(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 innerconditional verifies that both objects are names.

NAMES uses the AND command in the inner conditional to determine if both objects arenames, and the NOT command to display the error message if they are not both names.

 Logical functions.

NAMES program listing

Program:«IF
OBJ→

DUP 2. SAME
THEN
DROP
IF
TYPE 6. SAMESWAP TYPE 6. SAME
AND
NOT
THEN
"List needs two names"
DOERR
END
ELSE
DROPN
"Illegal list size"
DOERR
END
»
`ONAMES K

Comments:
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 tolevel 1 and 2, and starts the innerconditional structure.
Tests if the object is a name: returns 1 if
so, otherwise 0.
Moves the second object to level 1, thentests if it is a name (returns 1 or 0).
Combines test results: Returns 1 if bothtests 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

Checksum: # 10752d
Bytes:
141.5
NAMES is demonstrated in the program VFY.
VFY (Verify Program Argument)

VFY verifies that an argument on the stack is either a name or a list that contains exactly two names.
Level 1→

Level 1

'name'→'name'{ valid list }→{ valid list }{ invalid list }→{ invalid list } (and error message in status area)

invalid object→

invalid object (and error message in status area)

Techniques used in VFY
 Utility programs. VFY by itself has little use. However, it can be used with minor modifications by otherprograms to verify that specific object types are valid arguments.
 CASE…END case structure). VFY uses a case structure to determine if the argument is a list or a name.
 Structured programming. If the argument is a list, VFY calls NAMES to verify that the list contains exactly

two names.
 Local variable structure. VFY stores its argument in a local variable so that it can be passed to NAMES if
necessary.
 Logical function. VFY uses NOT to display an error message.
Required Programs

NAMES
 NAMES verifies that a list argument contains exactly two names.
VFY program listing

Program:«
DUP
DTAG→ argm«CASE
argm TYPE 5. SAME
THEN
argm NAMES
END

2-26 RPL Programming Examples

Comments:
Copies the original argument to leave on
the stack.
Removes any tags from the argument for
subsequent testing.
Stores the argument in local variable argm.
Begins the defining procedure.
Begins the case structure.
Tests if the argument is a list.
If so, puts the argument back on the stackand calls NAMES to verify that the list isvalid, then leaves the CASE structure.

Program:
argm TYPE 6. SAME NOT
THEN"Not name or list"
DOERR
END
END
»
»

Comments:
Tests if the argument is not a name. If so,
displays an error message and aborts
execution.
Ends the CASE structure.
Ends the defining procedure.
Enters the program, then stores it in VFY.

`OVFYK

Checksum: # 31403d
Bytes:
139.5
Example: Execute VFY to test the validity of the name argument BEN. (The argument is valid and is simply
returned to the stack.)

OBEN `
J %VFY%
Example: Execute VFY to test the validity of the list argument {BEN JEFF SARAH }. Use the name from theprevious example, then enter the names JEFF and SARAH and convert the three names to a list.

OJEFF `
OSARAH `3 !° %LIST% %²LIST%
Execute VFY. Since the list contains too many names, the error message is displayed and execution is aborted.
J %VFY%

Converting Procedures from Algebraic to RPNThis section contains a program, →RPN, that converts an algebraic expression into a series (list) of objects inequivalent RPN order.

Level 1→

Level 1‘symb’→{ objects }RPL Programming Examples 2-27

Techniques used in →RPN
 Recursion. The →RPN program calls itself as a subroutine. This powerful technique works just like calling
another subroutine as long as the stack contains the proper arguments before the program calls itself. In this casethe level 1 argument is tested first to be sure that it is an algebraic expression before →RPN is called again.
 Object Type-Checking. →RPN uses conditional branching that depends on the object type of the level 1

object.
 Nested program Structures. →RPN nests IF…THEN…END structures inside FOR…NEXT loops inside a
IF…THEN… ELSE…END structure.
 List Concatenation. The result list of objects in RPN order is built by using the ability of the + command to
sequentially append additional elements to a list. This is a handy technique for gathering results from a looping
procedure.
→RPN program listing

Program:Comments:«OBJ→
IF OVER
THEN → n f
«
1 n
FOR i
IF DUP TYPE 9. SAMETHEN →RPN
END n ROLLDNEXT
IF DUP TYPE 5. ‹THEN 1 →LIST
END
IF n 1 >THEN 2 n
START +NEXT
END f +»ELSE 1 →LIST SWAP DROP
END

Take the expression apart.
If the argument count is nonzero, thenstore the count and the function.
Begins local variable defining procedure.
Begins FOR…NEXT loop, whichconverts any algebraic arguments to lists.
Tests whether argument is an algebraic.
If argument is an algebraic, convert it to alist first.
Roll down the stack to prepare for the
next argument.
Repeat the loop for the next argument.
Tests to see if level 1 object is a list.
If not a list, then convert it to one.
Ends the IF…THEN…END structure.
Tests to see if there is more than one
argument.
Combine all of the arguments into a list.
Append the function to the end of the list.
End the local variable defining procedure.
For functions with no arguments,
converts to a simple list.
End the IF…THEN… ELSE…END
structure.

»`O→RPN K

2-28 RPL Programming Examples

Stores the program in →RPN.

Checksum: # 1522d
Bytes:
189.5
Example: Convert the following algebraic expression to a series of objects in RPN syntax:'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,
4

8

(x ⁄ 2 )(x ⁄ 2 )Ber ( x ) = 1 – ----------------- + ----------------- – …
2
2
2!
4!

Level 1→

Level 1z→

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 takearguments 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.

RPL Programming Examples 2-29

BER program listing

Program:Comments:«→ x

Creates local variable x.

«'x/2' →NUM 2 1→ xover2 j sum«
DO

Begins outer defining procedure.
Enters x/2, the first counter value, andthe first term of the series, then creates
local variables.
Begins inner defining procedure.
Begins the loop.

sum'sum+(-1)^(j/2)*
xover2^(2*j)/SQ(j!)'
EVAL
2 'j' STO+

Recalls the old sum and calculates the
new sum.

DUP 'sum' STO
UNTIL
==

Stores the new sum.
Ends the loop clause.
Tests the old and new sums.

END
sum
»
»
»
`OBER K

Checksum: # 15837d
Bytes:
203
Example: Calculate BER(3).
J

3 %BER%
Calculate BER(2) in algebraic syntax.
O %BER% !Ü2N

2-30 RPL Programming Examples

Increments the counter.

Ends the loop.
Recalls the sum.
Ends inner defining procedure.
Ends outer defining procedure.
Stores the program in BER.

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 theresulting 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 avariable. Make sure your calculator is in Radians mode.

Techniques used in SINTP
 Programmatic use of PLOT commands. SINTP uses PLOT commands to build and display a graphics object.

SINTP program listing

Program:Comments:«'SIN(X)' STEQStores the expression forsin x in EQ.

FUNCTION '-2*π' →NUM
DUP NEG XRNG
-2 2 YRNGERASE DRAW

Sets the plot type and xand y-axis display ranges.

PICT RCL 'SINT' STO

Erases PICT, then plots theexpression.
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.

RPL Programming Examples 2-31

SETTS (Superimposing Taylor’s polynomials)
SETTS superimposes successive Taylor’s polynomials on a sine curve and stores each graphics object in a list.
Techniques used in SETTS
 Structured programming. SETTS calls SINTP to build a sine curve and convert it to a graphics object.
 FOR…STEP (definite loop). SETTS calculates successive Taylor’s polynomials for the sine function in adefinite loop. The loop counter serves as the value of the order of each polynomial.
 Programmatic use of PLOT commands. SETTS draws a plot of each Taylor’s polynomial.
 Manipulation of graphics objects. SETTS converts each Taylor’s polynomial plot into a graphics object. Thenit executes + to combine each graphics object with the sine curve stored in SINT, creating nine new graphics
objects, each the superposition of a Taylor’s polynomial on a sine curve. SETTS then puts the nine new graphics
objects, and the sine curve graphics object itself, in a list.
SETTS program listing

Program:Comments:«
SINTP

Plots a sine curve and storesthe graphics object in SINT.

1 17 FOR n

Sets the range for the FOR
loop using local variable n.

'SIN(X)' 'X' n TAYLRSTEQ ERASE DRAW

Plots the Taylor’s polynomialof order n.

PICT RCL SINT +Returns the plot to the stack
as a graphics object andexecutes + to superimpose
the sine plot from SINT.

2 STEP

Increments the loop countern by 2 and repeats the loop.

SINT
10 →LIST'TSL' STO

Puts the sine curve graphics
object on the stack, thenbuilds a list containing it andthe nine graphics objects
created in the loop. Stores thelist in TSL.

»`OSETTS K

Checksum: # 41304d
Bytes:
130.5
SETTS is demonstrated in the program TSA.

2-32 RPL Programming Examples

Stores the program in
SETTS.

TSA (Animating Taylor’s Polynomials)
TSA displays in succession each graphics object created in SETTS.
Techniques used in TSA
 Passing a global variable. Because SETTS takes several minutes to execute, TSA does not call SETTS. Instead,
you must first execute SETTS to create the global variable TSL containing the list of graphics objects. TSA
simply executes that global variable to put the list on the stack.
 ANIMATE. TSA uses the ANIMATE command to display in succession each graphics object from the list.

TSA program listing

Program:Comments:«
TSL OBJ→{ { #0 #0 } .5 0 } +Puts the list TSL on thestack and converts it to 10graphics objects and the list
count.
Set up the parameters for
ANIMATE.

ANIMATE

Displays the graphics insuccession.

11 DROPN

Removes the graphics objects
and list count from the stack.

»`OTSA KStores the program in TSA.

Checksum: # 24644d
Bytes:
92.5
Example: Execute SETTS and TSA to build and display in succession a series of Taylor’s polynomial
approximations of the sine function.

Ensure Radians mode is set and execute SETTS to build the list of graphics objects. (SETTS takes several minutes
to execute.) Then execute TSA to display each plot in succession. The display shows TSA in progress.
!&H %!ANGLE% %!RAD% ( if necessary)
J %SETTS%%TSA%

Press − to stop the animation. Press !&H %!ANGLE% %!DEG% to restore Degrees mode if desired.

RPL Programming Examples 2-33

Programmatic Use of Statistics and PlottingThis section describes a program PIE you can use to draw pie charts. PIE prompts for single variable data, storesthat data in the statistics matrix ΣDAT, then draws a labeled pie chart that shows each data point as a percentage ofthe 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 eachslice 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 theslice. 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.
 Temporary menu for data input.
PIE program listing

Program:Comments:«
RCLF → flags«
RAD

Recalls the current flag status andstores it in variable flags.

{{ "SLICE" Σ+ }{ }{ "CLEAR" CLΣ }{ } { }{ "DRAW" CONT }}Sets Radians mode.
Defines the input menu: key 1
executes Σ+ to store each data pointin ΣDAT, key 3 clears ΣDAT, andkey 6 continues program execution
after data entry.

TMENU

Displays the temporary menu.

"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"Please wait...
Drawing Pie Chart"
1 DISP

2-34 RPL Programming Examples

Displays “drawing” message.

Program:Comments:(66,32) 20 0 6.28 ARC

Draws the circle.

PICT RCL →LCD

Displays the empty circle.

RCLΣ TOT /Recalls the statistics data matrix,
computes totals, and calculates the
proportions.
Converts the proportions topercentages.

DUP 100 *→ prcnts

Stores the percentage matrix in prcnts.

«
2 π →NUM * *0Multiplies the proportion matrix by
2π, and enters the initial angle (0).

→ prop angle

Stores the angle matrix in prop andangle in angle.

«
prop SIZE OBJ→DROP SWAP
FOR n(66,32) prop n GET'angle' STO+

Sets up 1 to m as loop counter range.
Begins loop-clause.
Puts the center of the circle on thestack, then gets the nth value fromthe proportion matrix and adds it toangle.

angle COS angle SIN
R→C 20 * OVER +LINE

Computes the endpoint and draws
the line for the nth slice.

PICT RCL
angle prop n GET
2 / - DUP DUP
COS SWAP SIN R→C
26 * (66,32) +
SWAP
CASE

Recalls PICT to the stack.
For labeling the slice, computes the
midpoint of the arc of the slice.

DUP 1.5 ‰
THEN
DROP
END
DUP 4.4 ‰THEN
DROP 15 END
5 <THEN(3,2) +END
END

From 0 to 1.5 radians, doesn’t offset
the label.

Starts the CASE structure to test
angle and determine the offset value
for the label.

From 1.5 to 4.4 radians, offsets thelabel 15 user units left.
From 4.4 to 5 radians, offsets thelabel 3 units right and 2 units up.
Ends the CASE structure.
RPL Programming Examples 2-35

Program:
prcnts n GET
1 RND→STR "%" +Comments:
Gets the nth value from thepercentage matrix, rounds it to one
decimal place, and converts it to astring with “%” appended.

1 →GROB

Converts the string to a graphics
object.

GOR DUP PICT STO

Adds the label to the plot and storesthe new plot.

→LCD
NEXT
{ } PVIEW

Displays the updated plot.
Ends the loop structure.
Displays the finished plot.

»»
flags STOF
» 0 MENU

Restores the original flag status.
Restores the previous menu.
(You must first press − to clear
the plot.)»`OPIE KStores the program in PIE.

Checksum: # 16631d
Bytes:
737
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.
J %PIE%

Clear the current statistics data. (The prompt is removed
from the display.) Key in the new data and draw the pie
chart.
CLEAR

983 %SLICE%
416 %SLICE%
85 %SLICE%%DRAW%

Press − to return to the stack display.

2-36 RPL Programming Examples

Trace Mode
This section contains two programs, αENTER and ßENTER, which together provide “trace mode” for the
calculator using an external printer. To turn on “trace mode,” set flag –63 and activate User mode. To turn off“trace mode,” clear flag –63 or turn off User mode.
Techniques used in αENTER and ßENTER
 Vectored ENTER. Setting flag –63 and activating User mode turns on vectored ENTER. When vectored

ENTER is turned on and variable αENTER exists, the command-line text is put on the stack as a string andαENTER is evaluated. Then, if variable ßENTER exists, the command that triggered the command-line
processing is put on the stack as a string and ßENTER is evaluated.

αENTER program listing

Program:Comments:

«
PR1
OBJ→

Prints the command line text,
then converts the string to an
object and evaluates it.

»`O αENTER KStores the program in αENTER.
(Press ~‚A to type α. You
must use this name.)

Checksum: # 127d
Bytes:
25.5
ßENTER program listing

Program:Comments:«
PR1 DROP
PRSTC

Prints the command that caused
the processing, then drops it andprints the stack in compact form.

»`O ßENTER KStores the program in ßENTER.
(Press ~‚B to type ß. You
must use this name.)

Checksum: # 31902d
Bytes:
28

RPL Programming Examples 2-37

Inverse-Function SolverThis section describes the program ROOTR, which finds the value of x at which f(x) = y. You supply the variablename 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'yx guess→x

Techniques used in ROOTR
 Programmatic use of root-finder. ROOTR executes ROOT to find the desired x-value.
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:Comments:«→ 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.

'XTEMP'
xguessROOT»'XTEMP' PURGE»Enters name of unknown variable.
Enters guess for XTEMP.
Solves program for XTEMP.
Ends the defining procedure.
Purges the temporary variable.

`OROOTR K

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

Example: Find the value of x for which X→FX equals 599.5. Use a guess in the vicinity of 1.
Start by keying in X→FX :@å@é x †O3.7*x Q3 +4.5 * x Q2

+3.9 *x +5 `Store the program in X→FX, then enter the program name, the y-value 599.5, and the guess 1, and execute
ROOTR:O X→FX K
O J %X²FX% `599.5 ` 1 %ROOTR%

Animating a Graphical Image
Program WALK shows a small person walking across the display. It animates this custom graphical image byincrementing the image position in a loop structure.
Techniques used in WALK Custom graphical image. (Note that the programmer compiles the full information content of the graphicalimage before writing the program by building the image interactively in the Graphics environment and thenreturning it to the command line.) FOR…STEP (definite loop). WALK uses this loop to animate the graphical image. The ending value for theloop is MAXR. Since the counter value cannot exceed MAXR, the loop executes indefinitely.

WALK program listing

Program:«GROB 9 15 E300
140015001C001400E300
8000C110AA0094009000
4100220014102800→ walk«ERASE { # 0d # 0d }PVIEWComments:
Puts the graphical image of thewalker in the command line.
(Note that the hexadecimal
portion of the graphics object isa continuous integer
E300...2800. The
linebreaks do not represent
spaces.)Creates local variable walk
containing the graphics object.
Clears PICT, then displays it.

RPL Programming Examples 2-39

Program:{ # 0d # 25d }PICT OVER walk GXOR

5 MAXR FOR i
i 131 MOD R→B# 25d 2 →LIST
PICT OVER walk GXORPICT ROT walk GXOR
0.2 WAIT 5 STEP»»`OWALK K

Checksum: # 28684d
Bytes:
250.0
Example: Send the small person out for a walk.
J %WALK%

Press − when you think the walker’s tired.

2-40 RPL Programming Examples

Comments:
Puts the first position on thestack and turns on the firstimage. This readies the stackand PICT for the loop.
Starts the loop to generatehorizontal coordinates
indefinitely.
Computes the horizontal
coordinate for the next image.
Specifies a fixed verticalcoordinate. Puts the twocoordinates in a list.
Displays the new image, leaving
its coordinates on the stack.
Turns off the old image,removing its coordinates fromthe stack.
Increments the horizontal
coordinate by 5.
Stores the program in WALK.

3
3.Full Command and Function Reference
Introduction
This chapter details the calculator’s commands and functions.
These listings include the following information:
 a brief definition of what the command or function does
 additional information about how it works and how to use it the key to press to gain access to it any flags that may affect how it works
 a stack diagram showing the arguments it requires (if any) related commands or functions
How to Access Commands and Functions

Many of the commands and functions in this reference are not located on the calculator’s keyboard and are accessedby pressing …µ. This is the right-shifted function of the Pkey, which is the fourth key from the left on
the fourth row of keys from the top. Once accessed, the function or command’s name is found by pressing the~key and then using the letter keys to spell out the function or command’s name. Usually, pressing the first letterof the command will move the catalog list close enough to the function to use the ˜key to find the function.
For functions or commands (or symbols) that are located on the calculator’s keyboard as shifted functions of otherkeys (such as …µ above), the proper shift key is shown followed by a font symbol indicating the function,command or symbol written above the key.
In some cases, access is shown with two keys with an ampersand (&) in between, such as !&H. This notationmeans that you must press the first key and hold it down while then pressing the second key at the same time.
The next few pages explain how to read the stack diagrams in the command reference, how commands arealphabetized, and the meaning of command classifications at the upper right corner of each stack diagram.
How to Read Stack Diagrams

Many entries in the command reference include a stack diagram. This is a table showing the arguments that thecommand, function, or analytic function takes from the stack in RPN mode or from the argument order in algebraic
mode, and the results that it returns to the stack (in RPN mode) or displays (in algebraic mode; if there is more than
one output, they are written to a list). The “→” character (pronounced “to” as in “to list” for →LIST) in the table
separates the arguments from the results. The stack diagram for a command may contain more than one “argument→ result” line, reflecting all possible combinations of arguments and results for that command.
Consider this example:
ACOS
Type:
Analytic Function
Input/Output:
Level 1/Argument 1

Level 1/Item 1z→acos z'symb'→'ACOS(symb)'

This diagram indicates that the analytic function ACOS (Arc Cosine) takes a single argument from level 1 and returns
one result (to level 1). ACOS can take either a real or complex number or an algebraic object as its argument. In the
Full Command and Function Reference 3-1

first case, it returns the numeric arccosine; in the second, it returns the symbolic arccosine expression of theargument.
Some commands affect a calculator state — a mode, a reserved variable, a flag, or a display — without taking anyarguments 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 accessit. 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
CAS soft menus and from menus created by the MENUXY command.

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”.

See also:

Related functions or commands.

Parallel Processing with Lists

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 AlphabetizedCommands appear in alphabetical order. Command names that contain special (non-alphabetic) characters areorganized 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 thecommand 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 thealphabet. 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Computer Algebra System Commands and Functions

The Computer Algebra System, or CAS, is a collection of operations that can be applied to algebraic expressions.
The calculator’s operations can be used with numbers to produce numeric results, or with symbols to produce
algebraic expressions. Algebraic expressions and equations can be written using the Equation Writer too. Algebraic
expressions and symbolic operations on them, called computer algebra operations, are introduced in Chapter 5 of
the User’s Manual.
Further explanations of computer algebra operations, are given in the User’s Guide, whereas this part of theAdvanced User’s Guide lists the computer algebra operations that can be applied to symbolic expressions, with adescription of each one listed.
These operations perform tasks such as rearrangement of trigonometric and logarithmic functions, or manipulationof polynomials, series and matrices. They are referred to as the “Computer Algebra System” or the CAS. Many of
the CAS operations are of particular use in Linear Algebra applications and in Vector Algebra. The CAS on thecalculator allows it to provide many of the features of the Computer Algebra Systems used on laptop and desktop
computers.
Note: The Computer Algebra System should not be confused with Algebraic mode, which is one of the calculator’soperating modes. The CAS works with algebraic (or symbolic) expressions, which can be entered and used in
Algebraic mode or in RPN mode.
Classification of Operations

The command dictionary contains commands, functions, and analytic functions. Commands are calculator operations thatcan be executed from a program. Functions are commands that can be included in algebraic objects. Analytic
functions are functions for which the calculator provides an inverse and a derivative. There are also four nonprogrammable operations (DBUG, NEXT, SST, and SST↓) that are included with the programmable commands as aconvenience because they are used interactively while programming.
When working with functions or commands within the Equation Writer:• When you apply a function to an expression, the function becomes part of the expression. You need to ensurethat the expression is selected, then press N to apply the function to the selection.
• When you apply a command to an expression in Equation Writer, it is evaluated immediately.
The definitions of the abbreviations used for argument and result objects are contained in the following table,“Terms Used in Stack Diagrams.” Often, descriptive subscripts are added to convey more information.

Full Command and Function Reference 3-3

Terms Used in Stack Diagrams
Term

Descriptionarg

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 mPositive integer real number (rounded if noninteger):nport:Backup identifier.

:nport: nlibrary

Library identifier.

#nBinary 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 yReal number.

x_unitUnit object, or a real number treated as a dimensionless object.

(x,y)

Complex number in rectangular form, or user-unit coordinate.

zReal or complex number.

3-4 Full Command and Function Reference

ABCUVType:
Description:

CommandAccess:Arithmetic, !Þ POLYNOMIAL

Input:

Level 3/Argument 1: The polynomial corresponding to a.
Level 2/Argument 2: The polynomial corresponding to b.
Level 1/Argument 3: The value corresponding to c.

Output:Level 2/Item 1: The solution corresponding to u.
Level 1/Item 2: The solution corresponding to 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 polynomials u and v for the following equation:

Returns a solution in polynomials u and v of au+bv =c where a and b are polynomials in thecurrent CAS independent variable, and c is a value.

22( x + x + 1 )u + ( x + 4 ) V = 13

Command:Result:See also:

ABS
Type:
Description:

ABCUV(X^2+X+1,X^2+4,13){-(X+3),X+4}

IABCUV, EGCD
Function
Absolute Value Function: Returns the absolute value of its argument.
ABS has a derivative (SIGN) but not an inverse.
In the case of an array, ABS returns the Frobenius (Euclidean) norm of the array, defined as thesquare root of the sum of the squares of the absolute values of all n elements. That is:
n

∑ zi

2

i=1

Access:!Ê
Flags:
Numerical Results (–3)
Input/Output:( Ê is the left-shift of the /key).

Level 1/Argument 1

See also:

ACK
Type:
Description:

Level 1/Item 1

x

→

|x|

(x,y)

→

x +y

x_unit→|x|_unit[array]→||array||'symb'→'ABS(symb)'22

NEG, SIGN
Command
Acknowledge Alarm Command: Acknowledges the oldest past-due alarm.
ACK clears the alert annunciator if there are both no other past-due alarms and no other active
alert sources (such as a low battery condition).
Full Command and Function Reference 3-5

ACK has no effect on control alarms. Control alarms that come due are automaticallyacknowledged and saved in the system alarm list.
Access:Flags:
Input/Output:
See also:

ACKALLType:
Description:

Access:Flags:
Input/Output:
See also:

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 automaticallyacknowledged and saved in the system alarm list.
…Ó TOOLS ALRM ACKALL( Ó is the right-shift of the 9 key).
Repeat Alarms Not Rescheduled (–43), Acknowledged Alarms Saved (–44)
None
ACK
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 π
radians; 0 to 200 grads).
A real argument outside of this domain is converted to a complex argument, z = x + 0i, and theresult is complex.
The inverse of COS is a relation, not a function, since COS sends more than one argument to thesame 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 theregions where the arguments of the real-valued inverse function are defined. The branch cut for thecomplex-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 markthe 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 theleft. Taken together, the bands cover the whole complex plane, which is the domain of COS.

3-6 Full Command and Function ReferenceAccess:
Flags:
Input/Output:

View these graphs with domain and range reversed to see how the domain of COS is restricted tomake an inverse function possible. Consider the vertical band in the lower graph as the restricteddomain Z = (x, y). COS sends this domain onto the whole complex plane in the range
W = (u, v) = COS(x, y) in the upper graph.
!¾( ¾ is the left-shift of the T key).
Principal Solution (–1), Numerical Results (–3), Angle Mode (–17, –18)
Level 1/Argument 1

Level 1/Item 1z→acos z'symb'→'ACOS(symb)'

See also:

ASIN, ATAN, COS, ISOL

ACOS2SType:
Description:

CommandTransforms an expression by replacing acos(x) in subexpressions with π/2–asin(x).

Access:Trigonometry, …Ñ

Input:The expression to transform.

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:Simplify the following expression:

Full Command and Function Reference 3-7

2
arc cos  --- + arc cos ( x )3Command:Result:See also:

ACOSH
Type:
Description:

ACOS2S(ACOS(2/3)+ACOS(X))π/2-ASIN(2/3)+π/2-ASIN(X)
ASIN2C, ASIN2T, ATAN2S
Analytic Function
Inverse Hyperbolic Cosine Analytic Function: Returns the inverse hyperbolic cosine of theargument.
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 tothe 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 theregions where the arguments of the real-valued inverse function are defined. The branch cut for thecomplex-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 showswhere the branch cut occurs: the heavy solid line marks one side of the cut, while the featheredlines mark the other side of the cut. The graph of the range shows where each side of the cut ismapped 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 andtranslated up and down. Taken together, the bands cover the whole complex plane, which is thedomain 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.

Access:…Ñ HYPERBOLIC ACOSH(Ñ is the right-shift of the 8key).
Flags:
Principal Solution (–1), Numerical Results (–3)
Input/Output:
Level 1/Argument 1z
See also:'symb'
ASINH, ATANH, COSH, ISOL

3-8 Full Command and Function Reference

Level 1/Item 1→

acosh z→'ACOSH(symb)'

ADD
Type:
Description:

Access:Flags:
Input/Output:

See also:

Command
Add List Command: Adds corresponding elements of two lists or adds a number to each of theelements of a list.
ADD executes the + command once for each of the elements in the list. If two lists are thearguments, 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 willattempt 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 + commandentry to see the object combinations that are defined.) If an undefined addition is encountered, a
Bad Argument Type error results.
( ´ is the left-shift of the P key).
!´LIST ADD
Binary Integer Wordsize (–5 through –10)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1{ list1 }{ list2 }→{ listresult }{ list }objnon-list→{ listresult }objnon-list+, ∆LIST, ΠLIST, ΣLIST{ list }→{ listresult }ADDTMODType:
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.

FunctionFull Command and Function Reference 3-9

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 result of the following addition in modulo 7.
(x2+3x+6)+(9x+3)
Note: Before trying this example, use the CAS modes input form to set the modulo to 7.

Command:Result:

ADDTMOD(X^2+3*X+6,9*X+3)
X^2-2*X+2

ADDTOREALType:
Command
Description:

Adds specified global names to the reserved variable REALASSUME. This is a list of the global
variables that will be treated by some CAS operations as real numbers when Complex mode is set.
If a variable is already in the REALASSSUME list, this command removes any additional
assumptions made on it by ASSUME.

Access:Catalog, …µInput:

Level 1/Item 1: The name of the global variable to be added to the REALASSUME list, or a listof names.

Output:No output in RPN mode, NOVAL in Algebraic mode.

Flags:

If the “all variables are real” flag is set (flag –128 set), ADDTOREAL will not add anything to the
REALASSUME list, as all variables are assumed real anyway. In this case it will only remove
further assumptions made by ASSUME.

See also:

ASSUME, DEF, STORE, UNASSUME, UNBIND

ALGB
Type:

Command

Description:

Displays a menu or list of CAS algebraic 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.

See also:

ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

ALOG
Type:
Description:
Access:Flags:
Input/Output:

Analytic Function
Common Antilogarithm Analytic Function: Returns the common antilogarithm; that is, 10 raised
to the given power.
For complex arguments: 10(x,y) = ecx cos cy + i ecx sin cy where c = ln 10.
!Â( Â is the left-shift of the V key).
Numerical Results (–3)
Level 1/Argument 1

See also:

Level 1/Item 1

z

→

10z

'symb'→'ALOG(symb)'

EXP, LN, LOG

3-10 Full Command and Function Reference

AMORTType:
Description:

Access:Flags:
Input/Output:

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 ofpayments n is taken from the input together with flag –14.
@& Î TVM AMORT(Î is the left-shift of the 7key).
Financial Payment Mode (–14)
Level 1/Argument 1

See also:

AND
Type:
Description:

Level 3/Item 1

Level 2/Item 2

Level 1/Item 3

interestbalance→nprincipal
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) logicalcomparison.
• 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.
bit1

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 theform symb1 AND symb2. Execute →NUM (or set flag –3 before executing AND) to produce a
numeric result from the algebraic result.

Access:Flags:…ãL LOGIC AND(ã is the right-shift of the 3key).
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)

Full Command and Function Reference 3-11

Input/Output:

See also:

ANIMATEType:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

#n1

#n2

→

#n3

“string1”“string2”→“string3”

T/F1

T/F2

→

0/1

T/F

'symb'→'T/F AND symb''symb'

T/F→'symb AND T/F'''symb1'
NOT, OR, XOR'symb2'→'symb1 AND symb2'

Command
Animate Command: Displays graphic objects in sequence.
ANIMATE displays a series of graphics objects (or variables containing them) one after the other.
You can use a list to specify the area of the screen you want to animate (pixel coordinates #X and#Y), the number of seconds before the next grob is displayed (delay), and the number of times thesequence is run (rep). If rep is set to 0, the sequence is played approximately one million times(1,048,575 cycles), or until you press − (the $ key).
If you use a list on level 1, all parameters must be present.
If the list specifier is not used, the delay between each grob will default to 0.1 second.
The animation displays PICT while displaying the grobs. The grobs and the animate parameters
are left on the stack.
( °is the left-shift of the Nkey).
!°LGROBLANIMATE
Ln+1.../A1

L1/An+1

L1/I1

grobn...grob1

ngrobs→same stackgrobn...grob1{ n {#X#Y } delay rep }→same stack

L = Level, A = Argument, I = item

Example:See also:

ANS
Type:
Description:

The following program draws half a cylinder and rotates it:« PARSURFACE { 'COS(X)' 'SIN(X)' Y }STEQ« I 180 I + XXRNG ERASE DRAW PICT RCL »I 0 359 8 SEQ OBJ ANIMATE DROPN »This program also illustrates the use of SEQ and PARSURFACE. You can adjust the increment
value used with SEQ (8 is used here) to change the number of images drawn by the program, or
to use less memory.
BLANK, →GROB
Command
Recalls the nth answer from history, where n is an integer, in algebraic mode only. When called
directly from the keybard in RPN mode, it takes no input and performs the LASTARG
command. When the command name is typed manually in RPN mode, it performs PICK, withthe exception that any stack levels containing null-tagged expressions (surrounded by `3-12 Full Command and Function Referencecharacters), as might have been left on the stack by entries when running in algebraic mode, willbe ignored.
Access:!î
Input/Output:( îis the left-shift of the `key).
Level 1/Argument 1

Level 1/Item 1→nLAST, LASTARG, PICKSee also:

APPLY
Type:
Description:

Access:
Input/Output:

Function
Apply to Arguments Function: Creates an expression from the specified function name andarguments.
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

Example:See also:

ARC
Type:
Description:

objn

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 casestructure), 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 » »
`OAsinKQUOTE, |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. Withuser-unit arguments, the arc starts at the pixel specified by (x, y) + (a, b), where (a, b) is therectangular conversion of the polar coordinate (xradius, xθ1). The resultant distance in pixels fromthe 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

Access:
Flags:!°LPICT ARC( °is the left-shift of the Nkey).
Angle Mode (–17 and –18). The setting of flags –17 and –18 determine the interpretation of xθ1
and xθ2 (degrees, radians, or grads).

Input/Output:
Level 4/Argument 1 Level 3/Argument 2 Level 2/Argument 3 Level 1/Argument 4(x, y)
Flags:
See also:

ARCHIVE
Type:
Description:{ #n,#m }Angle Mode (–17 and –18)
BOX, LINE, TLINE

Level 1/Item 1

xradius

x θ1

x θ2

→

#nradius

x θ1

x θ2

→

Command
Archive HOME Command: Creates a backup copy of the HOME directory (that is, all variables),the user-key assignments, and the alarm catalog in the specified backup object (:nport:name) in RAM
or flash ROM.
The specified port number can be 0 through 3, where 3 is the SD card. (Port 3 only applies to the
HP 50g and 49g+.) An error will result if there is not enough memory in the specified port tocopy the HOME directory.
If the backup object is “:IO:name”, then the copied directory is transmitted in binary via Kermit
protocol through the current I/O port to the specified filename.
To save flag settings, execute RCLF and store the resulting list in a variable.

Access:!°MEMORYLARCHIVE( °is the left-shift of the Nkey).
Flags:
I/O Device (–33), I/O Messages (–39), I/O Device for Wire (–78) if the argument is “:IO:name”.
Input/Output:
Level 1/Argument 1

See also:

ARG
Type:
Description:

Access:Flags:
Input/Output:

Level 1/Item 1:nport :name→:IO :name→

RESTORE
FunctionArgument Function: Returns the (real) polar angle θ of a complex number (x, y).
The polar angle θ is equal to:• atan y/x for x ≥ 0• atan y/x + π sign y for x < 0, Radians mode
• atan y/x + 180 sign y for x < 0, Degrees mode
• atan y/x + 200 sign y for x < 0, Grads mode
A real argument x is treated as the complex argument (x,0).
…Ë(Ë is the right-shift of the /key).
Angle mode (–17, –18)
Level 1/Argument 1

See also:

Level 1/Item 1(x, y)→

θ'symb'→'ARG(symb)'

ATAN

3-14 Full Command and Function Reference

ARIT
Type:
Description:

CommandAccess:Catalog, …µ

Flags:

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.

See also:

ALGB, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

ARRY→
Type:
Description:

Access:
Input/Output:

Displays a menu or list showing the three CAS submenus for arithmetical operations, INTEGER,
MODULAR and POLYNOMIAL.

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.
…µ ARRY→
Level 1/Argument 1

Lnm+1/A1 ... L2/Anm

Level1/Itemnm+1[ vector ]→z1 ... zn{ nelement }[[ matrix ]]→z11 ... znm{ nrow mcol }L = Level; I = item

See also:

→ARRY
Type:
Description:

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

z1 … zn
See also:

ASIN
Type:
Description:nelementz1 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
to +π/2 radians; –100 to +100 grads).
A real argument outside of this domain is converted to a complex argument z = x + 0i, and theresult is complex.
Full Command and Function Reference 3-15

The inverse of SIN is a relation, not a function, since SIN sends more than one argument to thesame result. The inverse relation for SIN is expressed by ISOL as the general solution:
ASIN(Z)*(-1)^n1+π*n1
The function ASIN is the inverse of a part of SIN, a part defined by restricting the domain of SIN
such that:• each argument is sent to a distinct result, and• each possible result is achieved.
The points in this restricted domain of SIN are called the principal values of the inverse relation.
ASIN in its entirety is called the principal branch of the inverse relation, and the points sent by
ASIN to the boundary of the restricted domain of SIN form the branch cuts of ASIN.
The principal branch used by the calculator for ASIN was chosen because it is analytic in theregions where the arguments of the real-valued inverse function are defined. The branch cut for thecomplex-valued arc sine 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 ASIN. 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 markthe 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 ASIN(Z)*(–1)^n1+π*n1 for the casen1=0. For other values of n1, the vertical band in the lower graph is translated to the right (for n1
positive) or to the left (for n1 negative). Taken together, the bands cover the whole complex
plane, which is the domain of SIN.
View these graphs with domain and range reversed to see how the domain of SIN is restricted tomake an inverse function possible. Consider the vertical band in the lower graph as the restricteddomain Z = (x, y). SIN sends this domain onto the whole complex plane in the range
W = (u, v) = SIN(x, y) in the upper graph.

Access:Flags:!¼( ¼is the left-shift of the Skey).
Principal Solution (–1), Numerical Results (–3), Angle Mode (–17, –18)

3-16 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Level 1/Item 1z→asin z'symb'→'ASIN(symb)'

See also:

ACOS, ATAN, ISOL, SIN

ASIN2CType:

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).

See also:

ACOS2S, ASIN2T, ATAN2S

ASIN2TType:
Description:

CommandTransforms an expression by replacing asin(x) subexpressions with the following: x 
atan  ------------------ 1 – x 2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).

See also:

ASIN2C, ACOS2S, ATAN2S

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 tothe 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

The principal branch used by the calculator for ASINH was chosen because it is analytic in theregions where the arguments of the real-valued function are defined. The branch cut for thecomplex-valued ASINH function occurs where the corresponding real-valued function is
undefined. The principal branch also preserves most of the important symmetries.
The graph for ASINH can be found from the graph for ASIN (see ASIN) and the relationshipasinh z = –i asin iz.
Access:…ÑHYPERBOLIC ASINH(Ñ is the right-shift of the 8key).
Flags:
Principal Solution (–1), Numerical Results (–3)
Input/Output:
Level 1/Argument 1z
See also:

ASN
Type:
Description:'symb'
ACOSH, ATANH, ISOL, SINH

Level 1/Item 1→

asinh z→'ASINH(symb)'

Command
Assign Command: Defines a single key on the user keyboard by assigning the given object to thekey xkey, which is specified as rc.pf.
The argument xkey is a real number rc.pf specifying the key by its row number r, column number c,shift plane p and shift-and-hold flag f. A value of f=0 represents a normal shifted key assignment(where the shift is released prior to pressing the key); whereby f=1 corresponds to a shift-andhold key assignment indicated by “&” in the table below (where the shift is held while pressing
the key). The legal values for p and f are as follows:
Value of
.pf

Shift

Value
of .pfShift.00 or .10

Unshifted [key].20!(left-shifted) [key].21! & [key].30…(right-shifted) [key].31… & [key].40~(alpha-shifted) [key].41~& [key].50~!(alpha left-shifted) [key].51~!& [key].60~…(alpha right-shifted) [key].61~…& [key]Once ASN has been executed, pressing a given key in User or 1-User mode executes the userassigned object. The user key assignment remains in effect until the assignment is altered by ASN,STOKEYS, or DELKEYS. Keys without user assignments maintain their standard definitions.
If the argument obj is the name SKEY, then the specified key is restored to its standard key
assignment 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 (see DELKEYS).
To make multiple key assignments simultaneously, use STOKEYS. To delete key assignments, use
DELKEYS.

3-18 Full Command and Function Reference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.
Access:…µASN OR !&H KEYS ASN
Flags:
User-Mode Lock (–61) and User Mode (–62) affect the status of the user keyboard
Input/Output:

Example:See also:

ASR
Type:
Description:

Access:Flags:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

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
(instead of executing Õ).
DELKEYS, RCLKEYS, STOKEYS
CommandArithmetic Shift Right Command: Shifts a binary integer one bit to the right, except for the mostsignificant 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 andlost.
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 interpreta number as a signed quantity.
( ãis the right-shift of the 3key).
…ãL BIT ASR
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1#n1
See also:

SL, SLB, SR, SRB

ASSUMEType:
Description:

Function

Access:Level 1/Item 1→#n2

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 torepresent real numbers when complex mode is set. ASSUME adds further assumptions, forexample that a variable is greater than or equal to zero. Assumptions must be of the formv≤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 begreater than zero then the solvers will not look for solutions where that variable is negative. Someof the solvers will give complex solutions for variables even if they are in REALASSUME.
Catalog, …µ

Full Command and Function Reference 3-19

Input:Level 1/Item 1: An expression giving the name of the global variable to be added to the
REALASSUME list, and the assumption to be placed on it, or a list of such assumptions.

Output:Level 1/Item 1: The input expression or list of expressions.

Example:Add the CAS assumption that the global variable Z is real and positive. Note that ASSUME will
replace Z>0 with Z≥0, which does not guarantee that Z is positive, so Z≥MINR is used instead,which guarantees that Z is greater than or equal to the smallest positive number the calculator
recognizes.

Command:Result:See also:

ATAN
Type:
Description:

ASSUME(Z≥MINR)Z≥MINRADDTOREAL, UNASSUME
Analytic Function
Arc Tangent Analytic Function: Returns the value of the angle having the given tangent.
For a real argument, the result ranges from –90 to +90 degrees (–π/2 to +π/2 radians; –100 to+100 grads).
The inverse of TAN is a relation, not a function, since TAN sends more than one argument to thesame result. The inverse relation for TAN is expressed by ISOL as the general solution:
ATAN(Z)+π*n1
The function ATAN is the inverse of a part of TAN, a part defined by restricting the domain of
TAN such that:• each argument is sent to a distinct result, and• each possible result is achieved.
The points in this restricted domain of TAN are called the principal values of the inverse relation.
ATAN in its entirety is called the principal branch of the inverse relation, and the points sent by
ATAN to the boundary of the restricted domain of TAN form the branch cuts of ATAN.
The principal branch used by the calculator for ATAN was chosen because it is analytic in theregions where the arguments of the real-valued inverse function are defined. The branch cuts forthe complex-valued arc tangent function occur 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 ATAN. 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 markthe 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 ATAN(Z)+π*n1 for the case n1 = 0. For other values ofn1, the vertical band in the lower graph is translated to the right (for n1 positive) or to the left (forn1 negative). Together, the bands cover the whole complex plane, the domain of TAN.
View these graphs with domain and range reversed to see how the domain of TAN is restricted tomake an inverse function possible. Consider the vertical band in the lower graph as the restricteddomain Z = (x, y). TAN sends this domain onto the whole complex plane in the range W = (u,v) = TAN(x, y) in the upper graph.

3-20 Full Command and Function ReferenceAccess:!À( Àis the left-shift of the Ukey).
Flags:
Principal Solution (–1), Numerical Results (–3), Angle Mode (–17, –18)
Input/Output:
Level 1/Argument 1

See also:

ACOS, ASIN, ISOL, TAN

ATAN2SType:
Description:

Command

Level 1/Item 1z→atan z'symb'→'ATAN(symb)'

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).

See also:

ASIN2C, ACOS2S, ASIN2T
Full Command and Function Reference 3-21

ATANHType:
Description:

Access:Flags:
Input/Output:

Analytic Function
Arc Hyperbolic Tangent Analytic Function: Returns the inverse hyperbolic tangent of theargument.
For real arguments |x| > 1, ATANH returns the complex result obtained for the argument (x, 0).
For a real argument x=±1, an Infinite Result exception occurs. If flag –22 is set (no error), thesign of the result (MAXR) matches that of the argument.
The inverse of TANH is a relation, not a function, since TANH sends more than one argument tothe same result. The inverse relation for TANH is expressed by ISOL as the general solution;
ATANH(Z)+π*i*n1
The function ATANH is the inverse of a part of TANH, a part defined by restricting the domain
of TANH such that:• each argument is sent to a distinct result, and• each possible result is achieved.
The points in this restricted domain of TANH are called the principal values of the inverse relation.
ATANH in its entirety is called the principal branch of the inverse relation, and the points sent by
ATANH to the boundary of the restricted domain of TANH form the branch cuts of ATANH.
The principal branch used by the calculator for ATANH was chosen because it is analytic in theregions where the arguments of the real-valued function are defined. The branch cut for thecomplex-valued ATANH function occurs where the corresponding real-valued function is
undefined. The principal branch also preserves most of the important symmetries.
The graph for ATANH can be found from the graph for ATAN (see ATAN) and the relationship
atanh z = –i atan iz.
…ÑHYPERBOLIC ATAN
(Ñ is the right-shift of the 8key).
Principal Solution (–1), Numerical Results (–3), Infinite Result Exception (–22)
Level 1/Argument 1z
See also:

ATICK
Type:
Description:

Access:'symb'
ACOSH, ASINH, ISOL, TANH

Level 1/Item 1→

atanh z→'ATANH(symb)'

Command
Axes Tick-Mark Command: Sets the axes tick-mark annotation in the reserved variable PPAR.
Given x, ATICK sets the tick-mark annotation to x units on both the x- and the y-axis. For
example, 2 would place tick-marks every 2 units on both axes.
Given #n, ATICK sets the tick-mark annotation to #n pixels on both the x- and the y-axis. For
example, #5 would place tick-marks every 5 pixels on both axes.
Given { x y }, ATICK sets the tick-mark unit annotation for each axis individually. For example,{ 10 3 } would mark the x-axis at every multiple of 10 units, and the y-axis at every multiple of 3
units.
Given { #n #m } ATICK sets the tick-mark pixel annotation for each axis individually. For
example, {#6 #2 } would mark the x-axis every 6 pixels, and the y-axis every 2 pixels.
…µATICK

3-22 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Level 1/Item 1

→
→
→
→

x
#n
{xy}
{ #n #m }See also:

ATTACHType:
Description:

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 theavailable 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

See also:

AUGMENTType:
Description:

Level 1/Item 1

nlibrary→:nport :nlibrary→

DETACH, LIBS
CommandConcatenate 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

1 2 34 5 6Result:AUTO
Type:
Description:

Command
Autoscale Command: Calculates a y-axis display range, or an x- and y-axis display range.
The action of AUTO depends on the plot type as follows:
Plot Type

Scaling Action

FUNCTION

Samples the equation in EQ at 40 values of the independent
variable, equally spaced through the x-axis plotting range, discards
points that return ±∞, then sets the y-axis display range to include
the maximum, minimum, and origin.

CONIC

Sets the y-axis scale equal to the x-axis scale.

POLAR

Samples the equation in EQ at 40 values of the independent
variable, equally spaced through the plotting range, discards
points that return ±∞, then sets both the x- and y-axis display
ranges in the same manner as for plot type FUNCTION.

PARAMETRIC

Same as POLAR.

TRUTH

No action.

BAR

Sets the x-axis display range from 0 to the number of elements in
ΣDAT, plus 1. Sets the y-range to the minimum and maximum of
the elements. The x-axis is always included.

HISTOGRAM

Sets the x-axis display range to the minimum and maximum of
the elements in ΣDAT. Sets the y-axis display range from 0 to thenumber of rows in ΣDAT.

SCATTER

Sets the x-axis display range to the minimum and maximum of
the independent variable column (XCOL) in ΣDAT. Sets the yaxis display range to the minimum and maximum of thedependent variable column (YCOL).

AUTO does not affect 3D plots.
AUTO actually calculates a y-axis display range and then expands that range so that the menu
labels do not obscure the resultant plot.
AUTO does not draw a plot — execute DRAW to do so.
Access:…µAUTO
Input/Output: None
See also:
DRAW, SCALEH, SCALE, SCLΣ, SCALEW, XRNG, YRNG

AXES
Type:
Description:

Command
Axes Command: Specifies the intersection coordinates of the x- and y-axes, tick-mark annotation,and the labels for the x- and y-axes. This information is stored in the reserved variable PPAR.

3-24 Full Command and Function Reference

The argument for AXES (a complex number or list) is stored as the fifth parameter in thereserved variable PPAR. How the argument is used depends on the type of object it is:• If the argument is a complex number, it replaces the current entry in PPAR.
• If the argument is a list containing any or all of the above variables, only variables that are
specified are affected.
atick has the same format as the argument for the ATICK command. This is the variable that is
affected by the ATICK command.
The default value for AXES is (0,0).
Axes labels are not displayed in PICT until subsequent execution of LABEL.
Access:…µAXES
Input/Output:
Level 1/Argument 1

Example:See also:

Level 1/Item 1(x, y)→{ (x, y) atick “x-axis label” “y-axis label” }→The command sequence{ (0,0) 2 "t" "y" } AXES LABEL
specifies an axes intersection at (0,0), tick-mark annotation every 2 units, and puts the labels t and y
PICT. The labels are positioned to identify the horizontal and vertical axes respectively.
ATICK, DRAW, DRAX, LABEL

AXL
Type:
Description:

CommandAccess:Convert, !Ú MATRIX CONVERT, or matrices !Ø OPERATIONS

Input:

A list or an array.

Output:If the input is a list, returns the corresponding array. If the input is an array, returns thecorresponding list.

Example:Convert the following matrix to a list:

Converts a list to an array, or an array to a list.

01
10Command:Result:AXL([[0,1][1,0]]){{0,1},{1,0}}

See also:

AXM, AXQ

AXM
Type:

Command

Description:

Converts a numeric array (object type 3) to a symbolic matrix (object type 29), or a symbolic
matrix to a numeric array.

Access:Matrices, !Ø OPERATIONS

Input:

A numeric array or a symbolic matrix.

Output:

The corresponding symbolic matrix or numeric array.

Full Command and Function Reference 3-25

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

See also:

AXL, AXQ

AXQ
Type:
Description:

CommandAccess:Convert, !Ú MATRIX CONVERT, or matrices !Ø QUADRATIC FORM

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:

Converts a square matrix into the associated quadratic form.

360
241
111

Command:Result:See also:

BAR
Type:
Description:

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
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 columnof 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 cornerof 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 rightcorner 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 nameand two numbers, with the smaller of the numbers specifying the horizontal location of the firstbar. 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 inuser-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• ptype is a command name specifying the plot type. Executing the command BAR places thecommand name BAR in PPAR.
• depend is a name specifying a label for the vertical axis. The default value is Y.
A bar is drawn for each element of the column in ΣDAT. Its width is specified by res and its
height is the value of the element. The location of the first bar can be specified by indep;
otherwise, the value in (xmin, ymin) is used.

Access:…µBAR
Input/Output: None
See also:
CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,YSLICEBARPLOTType:
Description:

Access:
Input:
Output:See also:

Command
Draw Bar Plot Command: Plots a bar chart of the specified column of the current statistics matrix(reserved variable ΣDAT).
The data column to be plotted is specified by XCOL and is stored as the first parameter inreserved variable ΣPAR. The default column is 1. Data can be positive or negative, resulting inbars above or below the axis. The y-axis is autoscaled, and the plot type is set to BAR.
When BARPLOT is executed from a program, the resulting plot does not persist unless
PICTURE, PVIEW (with an empty list argument), or FREEZE is subsequently executed.
…µBARPLOTNone
A bar chart based on ΣDAT.
FREEZE, HISTPLOT, PICTURE, PVIEW, SCATRPLOT, XCOL

BASIS
Type:

Command

Description:

Determines the basis of a sub-space of the n-space Rn.

Access:Matrices, !Ø LVECTOR

Input:
Output:Flags:

A list of vectors defining a vector sub-space of Rn.
A list containing the vectors of a basis of the vector sub-space.
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:See also:

Find the vectors that form a basis of the sub-space defined by [1,2,3], [1,1,1], and [2,3,4]

BAUD
Type:
Description:
Access:BASIS({[1,2,3],[1,1,1],[2,3,4]}){[1,0,-1],[0,1,2]}

IBASIS
CommandBaud Rate Command: Specifies bit-transfer rate.
Legal baud rates are 2400, 4800, 9600, 14400, 19200, 38400, 57600 and 115200 (default).
…µBAUD

Full Command and Function Reference 3-27

Input/Output:
Level 1/Argument 1→

nbaudrate
See also:

BEEP
Type:
Description:

Access:Flags:
Input/Output:

See also:

BESTFITType:
Description:

Level 1/Item 1

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’tround 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
CommandBest-Fitting Model Command: Executes LR with each of the four curve fitting models, andselects the model yielding the largest correlation coefficient.
The selected model is stored as the fifth parameter in the reserved variable ΣPAR, and theassociated regression coefficients, intercept and slope, are stored as the third and fourthparameters, respectively.

Access:…µBESTFITInput/Output: None
See also:
EXPFIT, LINFIT, LOGFIT, LR, PWRFIT

BIN
Type:
Description:

Command
Binary Mode Command: Selects binary base for binary integer operations. (The default base isdecimal.)Binary integers require the prefix #. Binary integers entered and returned in binary baseautomatically show the suffix b. If the current base is not binary, binary numbers can still beentered 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
See also:
DEC, HEX, OCT, STWS, RCWS

3-28 Full Command and Function Reference

BINS
Type:
Description:

Command
Sort into Frequency Bins Command: Sorts the elements of the independent column (XCOL) of
the current statistics matrix (the reserved variable ΣDAT) into (nbins + 2) bins, where the left edgeof bin 1 starts at value xmin and each bin has width xwidth.
BINS returns a matrix containing the frequency of occurrences in each bin, and a 2-element array
containing the frequency of occurrences falling below or above the defined range of x-values. The
array can be stored into the reserved variable ΣDAT and used to plot a bar histogram of the bindata (for example, by executing BARPLOT).
For each element x in ΣDAT, the nth bin count nfreq bin n is incremented, where:x – x m inn f r e q b in n = IP -----------------x w i d thfor xmin ≤ x ≤ xmax, where xmax = xmin + (nbins)(xwidth).
Access:…µBINS
Input/Output:
L3/A1

L2/A2

L1/A3

xmin

xwidth

nbins

→

L2/I1

L1/I2

[[ nbin 1 ... nbin n ]][ nbin L nbin R]

L = Level; A = Argument; I = item

Example:See also:

BLANK
Type:
Description:
Access:
Input/Output:

See also:

BOX
Type:
Description:
Access:If the independent column of ΣDAT contains the following data:
7 2 3 1 4 6 9 0 1 1 3 5 13 2 6 9 5 8 5
1 2 5 BINS returns [[ 5 ][ 3 ][ 5 ][ 2 ][ 2 ]] and [ 1 1 ]The data has been sorted into 5 bins of width 2, starting at x-value 1 and ending at x-value 11.
The first element of the matrix shows that 5 x-values (2 1 1 1 2) fell in bin 1, where bin 1 ranges
from x-value 1 through 2.99999999999. The vector shows that one x-value was less than xmin (0),and one was greater than xmax (13).
BARPLOT, XCOL
Command
Blank Graphics Object Command: Creates a blank graphics object of the specified width andheight.
!°LGROB BLANK( °is the left-shift of the Nkey).
Level 2/Argument 1

Level 1/Argument 2#nwidth#mheight

Level 1/Item 1→

grobblank→GROB, LCD→
Command Operation
Box Command: Draws in PICT a box whose opposite corners are defined by the specified pixel
or user-unit coordinates.
!°LPICT BOX( °is the left-shift of the Nkey).

Full Command and Function Reference 3-29

Input/Output:

See also:

BUFLENType:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1{ #n1 #m1 }{ #n2 #m2 }→(x1, y1)(x2, y2)→

ARC, LINE, TLINE
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

nchars0/1→
See also:

BYTES
Type:
Description:

CLOSEIO, OPENIO, SBRK, SRECV, STIME, XMITCommand
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 thechecksum represents the contents only. The size of the name alone is (3.5 + n), where n is thenumber of characters in the name.

Access:!°MEMORY BYTESInput/Output:
Level 1/Argument 1( °is the left-shift of the Nkey).
Level 2/Item 1

Level 1/Item 2

See also:→
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

B→R
Type:
Description:

Command
Binary to Real Command: Converts a binary integer to its floating-point equivalent.

Example:3-30 Full Command and Function ReferenceIf # n ≥ # 1000000000000 (base 10), only the 12 most significant decimal digits are preserved in
the resulting mantissa.
( ãis the right-shift of the 3key).
Access:…ãB→R
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output:
Level 1/Argument 1

Level 1/Item 1→#n
See also:C$
Type:
Description:n

R→B

Access:Example 1:

Command
Counted String Command: Enters C$ on the command line to help with the manual entry of astring object. Must be followed by a number indicating the number of characters to include in thestrings, or an additional $ to indicate that the rest of the command line is a single string. There
must be exactly one separator character after the second $ and before the body of the string.
If the declared length is greater than the number of characters actually available, the string is
automatically truncated to the correct length.
None. Must be typed in.
C$ 3 a"b returns "a"b" on level 1.

Example 2:

C$ 3abcdef returns "abc" on level 2 and 'def' on level 1 (assuming def is undefined).

Example 3:

C$ $ abcdef returns "abcdef" on level 1.

C2P
Type:
Description:

Command
Takes a list of cycles as an argument, and returns the equivalent permutation. In other words,
finds a permutation from its cyclical decomposition.

Output:Example:Command:Result:Arithmetic, !ÞPERMUTATION
A list of cycles equivalent to a permutation. For example, the list {1,3,5} defines a cycle C, suchthat C(1)=3, C(3)=5 and C(5)=1, while items 2 and 4 are not changed. This could be followed by{2,4} which defines a cycle C, such that C(2)=4, and C(4)=2.
A list representing the permutation equivalent to the cycles.
Convert the cycles given by {{1,3,5},{2,4}} into a permutation:
C2P({{1,3,5},{2,4}}){3,4,5,2,1}

See also:

P2C, CIRC

CASCFGType:

CommandAccess:
Input:

Description:

Restores the default CAS mode settings. This command is almost equivalent to pressing L!RESET, then selecting “Reset all” and pressing !!OK!, when the CAS Modes input form is displayed.
The difference is that CASCFG sets the modulus value to 13, whereas “Reset all” sets themodulus to 3.

Access:Catalog, …µ

Full Command and Function Reference 3-31

CASCMDType:
Description:

Access:See also:

CASE
Type:
Description:

Command
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 commandline. More details are given in Appendix C and Appendix H of the User’s Guide. If level 1 of thestack contains a string, the list of CAS operations will be displayed beginning at this point.
Catalog, …µ, or tools IL
HELP
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
default-clause (optional)
END

When CASE executes, test-clause1 is evaluated. If the test is true, true-clause1 executes, thenexecution 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

Level 1/Item 1

→

CASE
THEN

Example:See also:

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

CEIL
Type:
Function
Description:
Ceiling Function: Returns the smallest integer greater than or equal to the argument.
Access:!´REAL LL CEIL
( ´ is the left-shift of the Pkey).
Flags:
Numerical Results (–3)
Input/Output:
Level 1/Argument 1

See also:

CENTR
Type:
Description:

Access:
Input/Output:

Level 1/Item 1

x

→

n

x_unit→n_unit'symb'→'CEIL(symb)'

FLOOR, IP, RND, TRNC
CommandCenter Command: Adjusts the first two parameters in the reserved variable PPAR, (xmin, ymin) and(xmax, ymax), so that the point represented by the argument (x, y) is the plot center. On the HP 50g
and 49g+, the center pixel is in row 40, column 65 when PICT is its default size (131 × 80). On
the 48gII, the center pixel is in row 32, column 65 when PICT is its default size (131 × 64).
If the argument is a real number x, CENTR makes the point (x,0) the plot center.
…µCENTR
Level 1/Argument 1

See also:

CF
Type:
Description:

Level 1/Item 1(x, y)

→

x

→

SCALE
CommandClear Flag Command: Clears the specified user or system flag.
User flags are numbered 1 through 128. System flags are numbered –1 through –128. See
Appendix C for a listing of the calculator’s system flags and their flag numbers.

Access:!°TESTLLCF
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1

nflagnumber
See also:

%CH
Type:
Description:

Access:Flags:

Level 1/Item 1→

FC?, FC?C, FS?, FS?C, SF
Function
Percent Change Function: Returns the percent change from x to y as a percentage of x.
If both arguments are unit objects, the units must be consistent with each other. The dimensionsof a unit object are dropped from the result, but units are part of the calculation.
For more information on using temperature units with arithmetic functions, refer to the keyword
entry of +.
!´REAL %CH
Numerical Results (–3)( ´ is the left-shift of the Pkey).

Full Command and Function Reference 3-33

Input/Output:
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

100(y – x)/xx

'symb'→'%CH(x,symb)''symb'x→'%CH(symb,x)''symb1''symb2'→'%CH(symb1, symb2)'

x_unity_unit→100(y_unit – x_unit)/x_unit

x_unit'symb'→'%CH(x_unit,symb)'

Example 1:→'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.

See also:%, %T

CHINREMType:

Command

Description:

Chinese Remainder function. Solves a system of simultaneous polynomial congruences in thering 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).

Example:Solve the following simultaneous congruences for the polynomial u:2u ≡ x + 1 (mod x+2)

u ≡ x – 1 (mod x+3)

Command:Result:See also:

CHOLESKYType:
Description:
Access:
Input:
Output:Flags:

CHINREM([X^2+1,X+2],[X-1,X+3])[X^3+2*X^2+5,-(X^2+5*X+6)]

EGCD, ICHINREM
CommandReturns the Cholesky factorization of a square matrix.
Matrices, !Ø QUADRATIC FORM
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Example:

Find the Cholesky factorization of:
11
15

Command:Result:CHOOSEType:
Description:


CHOLESKY  1 1 
 15
1 1
0 2

CommandCreate User-Defined Choose Box Command: Creates a user-defined choose box.
CHOOSE creates a standard single-choice choose box based on the following specifications:
Variable

Access:
Input/Output:

Function“prompt”

A message that appears at the top of choose box. If “prompt” is anempty string (“”), no message is displayed.

{c1 … cn}

Definitions that appear within the choose box. A choice definition(cx) can have two formats.
• obj, any object• { objdisplay objresult }, the object to be displayed followed by the result
returned to the stack if that object is selected.

npos

The position number of an item definition. This item is highlighted
when the choose box appears. If npos = 0, no item is highlighted, andthe choose box can be used to view items only.

If you choose an item from the choose box and press OK, CHOOSE returns the result (or theobject itself if no result is specified) to level 2 and 1 to level 1. If you press −, CHOOSE
returns 0. Also, if npos = 0, CHOOSE returns 0.
!°LIN CHOOSE( °is the left-shift of the Nkey).
L3/A1

L2/A2

L1/A3

“prompt”{ c1 ... cn }

npos

→

{ c1 ... cn }

npos

→

“prompt”

L2/I1

L1/I2

obj or result

“1”
“0”

L = Level; A = Argument; I = item

Example:See also:

CHR
Type:
Description:

CHOOSE with the following three lines as input would produce a three-line choose box:
"Select a Program"{ { "Pie Chart" «PIE» } { "Inverse Function" «ROOTR» }{ "Animate Taylor" «TSA» } }1
INFORM, NOVAL
Command
Character Command: Returns a string representing the character corresponding to the charactercode n.

Full Command and Function Reference 3-35

Access:
Input/Output:

The character codes are an extension of ISO 8859/1. Codes 128 through 160 are unique to thecalculator. 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 thecalculator. 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

See also:n
NUM, POS, REPL, SIZE, SUB

CIRC
Type:
Description:

CommandComposes two permutations.

Access:
Input:

Output:Example:Command:Result:See also:

CKSM
Type:
Description:

Level 1/Item 1→“string”

Arithmetic, !ÞPERMUTATION
Two lists, L1 and L2, representing two permutations. The composition L1○L2 is the permutationequivalent to performing permutation L2 first and L1 second.
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
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.

Access:…µCKSM
Input/Output:
Level 1/Argument 1

See also:

nchecksum
BAUD, PARITY, TRANSIO

3-36 Full Command and Function Reference

Level 1/Item 1→

CLEAR
Type:
Description:

Access:
Input/Output:

CommandClear Command: Removes all objects from the stack or history.
To recover a cleared stack or history, press …¯ (the right-shift of the Mkey) before
executing any other operation. There is no programmable command to recover the stack orhistory.
…·(·is the right-shift of the ƒkey).
Leveln/Argument 1 ... Level 1/Argumentn

objn ...obj1
See also:

CLKADJ
Type:
Description:

Access:
Input/Output:

Leveln/Item 1 ... Level 1/Itemn→

CLVAR, PURGE
CommandAdjust System Clock Command: Adjusts the system time by x clock ticks, where 8192 clock ticks
equal 1 second. If x is positive, x clock ticks are added to the system time. If x is negative, x clock
ticks are subtracted from the system time. If X>10^12, it will be changed to 10^12 ticks (which isapproximately 3.87 years).
( Ó is the right-shift of the 9 key).
…ÓTOOLS LLCLKADJ
Level 1/Argument 1x
See also:

Level 1/Item 1

→

→TIME

CLLCD
Type:
Description:

CommandClear LCD Command: Clears (blanks) the stack display.
The menu labels continue to be displayed after execution of CLLCD.
When executed from a program, the blank display persists only until the keyboard is ready for
input. To cause the blank display to persist until a key is pressed, execute FREEZE after
executing CLLCD. (When executed from the keyboard, CLLCD automatically freezes the display.)
Access:!°LOUT CLLCD( °is the left-shift of the Nkey).
Input/Output: None
Example:Evaluating « CLLCD 7 FREEZE » blanks the display (except the menu labels), thenfreezes the entire display.
See also:
DISP, FREEZE

CLOSEIO
Type:
Description:

CommandClose I/O Port Command: Closes the serial port, and clears the input buffer and any error
messages for KERRM.
When the calculator turns off, it automatically closes the serial port, but does not clear KERRM.
Therefore, CLOSEIO is not needed to close the port, but can conserve power without turning
off the calculator.
Executing Kermit protocol commands automatically clears the input buffer; however, executing
non-Kermit commands (such as SRECV and XMIT) does not.
CLOSEIO also clears error messages from KERRM. This can be useful when debugging.
Full Command and Function Reference 3-37

Access:…µCLOSEIO
Input/Output: None
See also:
BUFLEN, OPENIO

CLΣ
Type:
Description:

CommandPurges the current statistics matrix (reserved variable ΣDAT).

Access:…µCLΣInput/Output: None
See also:
RCLΣ, STOΣ, Σ+, Σ–

CLUSR
Type:
Description:
Access:CommandClear Variables Command: Provided for compatibility with the HP 28 series. CLUSR is the sameas CLVAR. See CLVAR.
None. Must be typed in.

CLVAR
Type:
Description:
Access:
Input/Output:
See also:

CommandClear Variables Command: Purges all variables and empty subdirectories in the current directory.
…µCLVARNone
PGDIR, PURGE

CMPLX
Type:
Description:

Command
Displays a menu of commands pertaining to complex numbers.

Access:…µCMPLX
Input/Output: None
See also:
ARIT, DIFF, EXP&LN, SOLVER, TRIGO

CNRM
Type:
Description:

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 absolutevalues of all elements in each column. For a vector, the column norm is the sum of the absolutevalues of the vector elements. For complex arrays, the absolute value of a given element (x, y) is
2

x +y

2

.

Access:!Ø OPERATIONS CNRM
Input/Output:( Ø is the left-shift of the 5key).

Level 1/Argument 1

See also:[ array ]CROSS, DET, DOT, RNRM

3-38 Full Command and Function Reference

Level 1/Item 1→

xcolumnnorm

→COL
Type:
Description:

Access:CommandMatrix to Columns Command: Transforms a matrix into a series of column vectors and returns
the vectors and a column count, or transforms a vector into its elements and returns the elements
and an element count.
→COL introduces no rounding error.
!´MATRIX COL →COL
( ´ is the left-shift of the Pkey).
!Ø CREATE COLUMN →COL ( Ø is the left-shift of the 5key).

Input/Output:
Level 1/Argument 1

See also:

COL→
Type:
Description:

Access:Leveln+1/Item 1 ...

Level 2/Item 2

Level 1/Item 3[[ matrix ]]→[ vector ]col1[ vector ]coln

ncolcount[ vector ]COL→, →ROW, ROW→→

element1

elementn

nelementcountCommand
Columns to Matrix Command: Transforms a series of column vectors and a column count into amatrix containing those columns, or transforms a sequence of numbers and an element count into
a vector with those numbers as elements.
All vectors must have the same length. The column or element count is rounded to the nearest
integer.
!´MATRIX COL COL→( ´ is the left-shift of the Pkey).
!Ø CREATE COLUMN COL→ ( Ø is the left-shift of the 5key).

Input/Output:
Ln+1/A1 ...

L2/A2

L1/An+1

Level 1/Item 1[ vector ]col1[ vector ]coln

ncolcount→[[ matrix ]]element1

elementn

nelementcount→[ vector ]L = Level; A = Argument; I = item

See also:

COL–
Type:
Description:
Access:→COL, →ROW, ROW→
CommandDelete Column Command: Deletes column n of a matrix (or element n of a vector), and returns
the modified matrix (or vector) and the deleted column (or element).
n is rounded to the nearest integer.
!´MATRIX COL COL( ´ is the left-shift of the Pkey).
!Ø CREATE COLUMN COL-

( Ø is the left-shift of the 5key).

Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2[[ matrix ]]1

ncolumn[ vector ]1

nelement

Level 2/Item 1

Level 1/Item 2→[[ matrix ]]2[ vector ]column→[ vector ]2elementn

COL+, CSWP, ROW+, ROW–

Full Command and Function Reference 3-39

COL+
Type:
Description:

Access:CommandInsert Column Command: Inserts an array (vector or matrix) into a matrix (or one or moreelements 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 thenearest integer. The original array is redimensioned to include the new columns or elements, andthe 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:

See also:

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:
See also:

COLLECTType:
Description:

Level 1/Item 1'symb1'→'symb2'x→x→(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'
EXPAN, FACTOR, ISOL, QUAD, SHOW(x, y)

Command
Factorizes a polynomial or an integer. This command is almost identical to the COLCT commandand 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.

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Example:

Factorize the following:2

x + 5x + 6

Command:Result:See also:

COLΣ
Type:
Description:

Access:
Input/Output:

COLLECT(X^2+5*X+6)(X+2)(X+3)

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 twoparameters in ΣPAR will cause errors.
…µCOLΣ
Level 2/Argument 1

Example:See also:

COMB
Type:
Description:

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 thedependent-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 atime. The following formula is used:n!
C n, m = ------------------------------m! ⋅ ( n – m )!

Access:Flags:
Input/Output:

See also:

CON
Type:
Description:

The arguments n and m must each be less than 1012. If n<m, zero is returned.
!´L PROBABILITY COMB ( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

n

m

→

Cn;m

'symbn'm→'COMB(symbn,m)'n'symbm'→'COMB(n, symbm)''symbn''symbm'→'COMB(symbn,symbm)'

FACT, PERM, !
CommandConstant Array Command: Returns a constant array, defined as an array whose elements all havethe same value.

Full Command and Function Reference 3-41

Access:

The constant value is a real or complex number taken from argument 2/level 1. The resulting
array is either a new array, or an existing array with its elements replaced by the constant,depending on the object in argument 1/level 2.
• Creating a new array: If argument 1/level 2 contains a list of one or two integers, CON returns
a new array. If the list contains a single integer ncolumns, CON returns a constant vector with nelements. If the list contains two integers nrows and mcolumns, CON returns a constant matrix withn rows and m columns.
• Replacing the elements of an existing array: If argument 1/level 2 contains an array, CON
returns an array of the same dimensions, with each element equal to the constant. If theconstant is a complex number, the original array must also be complex.
• If argument 1/level 2 contains a name, the name must identify a variable that contains an array.
In this case, the elements of the array are replaced by the constant. If the constant is a complex
number, the original array must also be complex.
( ´ is the left-shift of the Pkey).
!´MATRIX MAKE CON!Ø CREATE CON( Ø is the left-shift of the 5key).

Input/Output:

Example 1:
Example 2:
See also:

COND
Type:
Description:

Access:Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1{ ncolumns }zconstant→[ vectorconstant ]{ nrows mcolumns }zconstant→[[ matrixconstant ]][ R-array ]xconstant→[ R-arrayconstant ][ C-array ]zconstant→[ C-arrayconstant ]→'name'
zconstant{ 2 2 } 6 CON returns the matrix [[ 6 6 ][ 6 6 ]].
[ (2,4) (7,9) ] 3 CON returns the complex vector [ (3,0) (3,0) ].
IDN
Command
Condition Number Command: Returns the 1-norm (column norm) condition number of a squarematrix.
The condition number of a matrix is the product of the norm of the matrix and the norm of theinverse of the matrix. COND uses the 1-norm and computes the condition number of the matrix
without computing the inverse of the matrix.
The condition number expresses the sensitivity of the problem of solving a system of linear
equations having coefficients represented by the elements of the matrix (this includes inverting
the matrix). That is, it indicates how much an error in the inputs may be magnified in the outputsof calculations using the matrix.
In many linear algebra computations, the base 10 logarithm of the condition number of the matrix
is an estimate of the number of digits of precision that might be lost in computations using thatmatrix. A reasonable rule of thumb is that the number of digits of accuracy in the result isapproximately MIN(12,15–log10(COND)).
!´MATRIX NORMALIZE COND ( ´ is the left-shift of the Pkey).
!Ø OPERATIONS COND

( Ø is the left-shift of the 5key).

Input/Output:
Level 1/Argument 1[[ matrix ]]m×n
3-42 Full Command and Function Reference

Level 1/Item 1→

xconditionnumber

Example:
See also:

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 - »SNRM, SRAD, TRACE

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 cornerof 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 rightcorner 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 (theplotting 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 is0, which specifies an interval of 1 pixel.
• axes is a complex number specifying the user-unit coordinates of the intersection of thehorizontal 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 thecommand 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
See also:
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)

Full Command and Function Reference 3-43

Input/Output:
Level 1/Argument 1

Level 1/Item 1

x

→

x

(x, y)→(x, –y)[ R-array ]→[ R-array ][ C-array ]1→[ C-array ]2

See also:→'symb''CONJ(symb)'[ (3,4) (7,2) ] CONJ returns [ (3,-4) (7,-2) ]A square matrix A containing complex elements is said to be Hermitian if AH = A, where AH is
the same as a normal transpose except that the complex conjugate of each element is used. The
following program returns 1 if the input matrix is Hermitian, and a 0 if it is not.
« DUP TRN CONJ SAME »ABS, IM, RE, SCONJ, SIGNCONLIBType:
Description:
Access:
Input/Output:
See also:

Command
Open Constants Library Command: Opens the Constants Library catalog.
GCONSTANTS LIBRARY
None
CONST

Example 1:
Example 2:

CONST
Type:
Description:

Access:Flags:
Input/Output:

Function
Constant Value Command: Returns the value of a constant.
CONST returns the value of the specified constant. It chooses the unit type depending on flag 60:
SI if clear, English if set, and uses the units depending on flag 61: units if clear, no units if set.
See “Tables of Units and Constants” in appendix B of this reference for a list of the constants
available in the Constants Library.
…µCONST
Units Type (60), Units Usage (61)Level 1/Argument 1'name'
See also:

Level 1/Item 1→x

CONLIBCONSTANTS
Type:
Command
Description:
Displays a menu or list of CAS symbolic constants.
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.

Input/Output: None
See also:

ALGB, ARIT, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

3-44 Full Command and Function Reference

CONT
Type:
Description:

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%.)
See also:
HALT, KILL, PROMPTCONVERT
Type:
Description:

Access:
Input/Output:

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 isignored.
!Ú UNITS TOOLS CONVERT ( Ú is the left-shift of the 6key).
Level 2/Argument 1

See also:

CORR
Type:
Description:

Level 1/Argument 2

Level 1/Item 1→

x1_unitssource
x2_unitstargetUBASE, UFACT, →UNIT, UVAL

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 XCOLand YCOL, respectively. If ΣPAR does not exist, CORR creates it and sets the elements to theirdefault values (1 and 2).
The correlation is computed with the following formula:n∑ ( xin – xn ) ( xin – xn )
1

1

i=1

2

2

----------------------------------------------------------------------------------2 nn∑ ( x in – xn ) ∑ ( xin – xn )

i=1

where

x in 11

1

i=1

is the ith coordinate value in column n1,

x n1

Access:
Input/Output:

2n2 ,is the mean of the data in column n1,
number of data points.
…µCORRx n2

2

2

x in 2is the ith coordinate value in the column

is the mean of the data in column n2, and n is theLevel 1/Argument 1

Level 1/Item 1→
See also:

xcorrelation

COLΣ, COV, PREDX, PREDY, XCOL, YCOL

Full Command and Function Reference 3-45

COS
Type:
Description:

Analytic Function
Cosine Analytic Function: Returns the cosine of the argument.
For real arguments, the current angle mode determines the number’s interpretation as an angle,
unless the angular units are specified.
For complex arguments, cos(x + iy) = cosx coshy – i sinx sinhy.
If the argument for COS is a unit object, then the specified angular unit overrides the angle modeto determine the result. Integration and differentiation, on the other hand, always observe theangle mode. Therefore, to correctly integrate or differentiate expressions containing COS with aunit object, the angle mode must be set to Radians (since this is a “neutral” mode).

Access:T
Flags:
Numerical Results (–3), Angle Mode (–17, –18)
Input/Output:
Level 1/Argument 1

See also:

COSH
Type:
Description:
Access:Flags:
Input/Output:

Level 1/Item 1

z

→

cos z

'symb'→'COS(symb)'

x_unitangular→cos (x_unitangular)

ACOS, SIN, TAN
Analytic Function
Hyperbolic Cosine Analytic Function: Returns the hyperbolic cosine of the argument.
For complex arguments, cosh(x + iy) = coshx cosy + i sinhx siny.
(Ñ is the right-shift of the 8key).
…ÑHYPERBOLIC COSH!´HYPERBOLIC COSH
Numerical Results (–3)( ´is the left-shift of the Pkey).

Level 1/Argument 1

See also:

COV
Type:
Description:

Level 1/Item 1z→cosh z'symb'→'COSH(symb)'

ACOSH, SINH, TANH
Command
Covariance Command: Returns the sample 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, COV creates it and sets the elements to their default
values (1 and 2).
The covariance is calculated with the following formula:
1 n------------ ∑ ( x in 1 – x n 1 ) ( x in 2 – x n 2 )n – 1i = 1

Access:where x in1 is the ith coordinate value in column n1, x in2 is the ith coordinate value in the column
xn1mean of the data in column n1,
n2 ,is theis thexnmeanof the data in column n2, and n is the2number of data points.
…µCOV

3-46 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:CR
Type:
Description:

Level 1/Item 1→
COLΣ, CORR, PCOV, PREDX, PREDY, XCOL, YCOL

xcovariance

CommandCarriage 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 theline 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 rightend of the just printed line.

…µCR
I/O Device (–33), Printing Device (–34), Double-Spaced Printing (–37), I/O Device for Wire (–78)
Input/Output: None
See also:
DELAY, OLDPRT, PRLCD, PRST, PRSTC, PRVAR, PR1

Access:Flags:

CRDIR
Type:
Description:

Access:
Input/Output:

CommandCreate 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 makeit the current directory.
!°MEMORY DIRECTORY CRDIR ( °is the left-shift of the Nkey).
Level 1/Argument 1

See also:

CROSS
Type:
Description:

Access:
Input/Output:

CSWP
Type:
Description:→'global'
HOME, PATH, PGDIR, UPDIR

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 athree-element argument [ d1 d2 0 ].)!´VECTOR CROSS( ´ is the left-shift of the Pkey).
Level 2/Argument 1

See also:

Level 1/Item 1[ vector ]A
CNRM, DET, DOT, RNRM

Level 1/Argument 2[ vector ]BLevel 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

Access:!Ø CREATE COLUMN CSWP

( Ø is the left-shift of the 5key).

!´MATRIX COL CSWP

( ´ is the left-shift of the Pkey).

Input/Output:

See also:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[[ matrix ]]1

ncolumni

ncolumnj→[[ matrix ]]2[ vector ]1
COL+, COL–, RSWP

nelementi

nelementj→[ vector ]2

CURL
Type:
Description:

Function

Access:Calculus, !ÖDERIV. & INTEG.

Input:

Level 2/Argument 1: A three-dimensional vector function of three variables.
Level 1/Argument 2: An array comprising the three variables.

Output:

The curl 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 curl of the following vector function:

Returns the curl of a three-dimensional vector function.

2

2

2

v = x yi + x yj + y zk˜˜˜Command:Result:See Also:

CURL([X^2*Y, X^2*Y, Y^2*Z],[X,Y,Z])[Z*2*Y,0,Y*2*X-X^2]

DIV, HESS, VPOTENTIALCYCLOTOMIC
Type:
Function
Description:
Returns the cyclotomic polynomial of order n. This is the polynomial whose roots are all the nth
roots of 1, except those that are also roots of 1 for smaller values of n. For example, if n is 4, the
4th roots of 1 are {1, i, -1, -i}, but 1 is the 1st root of 1 and –1 is a 2nd root of 1, so only i and -i areleft, giving the polynomial (x-i)(x+i) = x2+1.
Access:
Input:
Output:Flags:
Example:Command:Result:

CYLIN
Type:
Description:

Arithmetic, !ÞPOLYNOMIAL
A non-negative integer n
The cyclotomic polynomial of order n.
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Find the 20th cyclotomic polynomial.
CYCLOTOMIC(20)X^8-X^6+X^4-X^2+1

Command
Cylindrical Mode Command: Sets Cylindrical coordinate mode.
CYLIN clears flag –15 and sets flag –16.
In Cylindrical mode, vectors are displayed as polar components. Therefore, a 3D vector would
appear as [ R θ Z ].

3-48 Full Command and Function ReferenceAccess:!´VECTOR L CYLIN
Input/Output: None
See also:
RECT, SPHERE

C→PX
Type:
Description:( ´ is the left-shift of the Pkey).

CommandComplex 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 thereserved variable PPAR.

Access:!°LPICT LC→PX
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1

Level 1/Item 1→(x, y)
See also:

C→R
Type:
Description:

Access:
Input/Output:

PX→C
CommandComplex to Real Command: Separates the real and imaginary parts of a complex number orcomplex 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

See also:

DARCY
Type:
Description:{ #n, #m }Level 2/Item 1

Level 1/Item 2(x, y)→xy[ 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 functionuses 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 / DyRe

See also:

FANNING

DATE
Type:
Description:

CommandDate Command: Returns the system date.

Access:…ÓTOOLS DATE…&9 DATE

Level 1/Item 1→

xDarcy(Ó is the right-shift of the 9 key).

Full Command and Function Reference 3-49

Flags:Date Format (–42)
Input/Output:
Level 1/Argument 1

Example:See also:

→DATE
Type:
Description:

Access:Flags:
Input/Output:

Level 1/Item 1→
date
If the current date is May 12, 2010, if flag –42 is clear, and if the display mode is Standard, DATE
returns 5.12201. (The trailing zeros are dropped.)
DATE+, DDAYS, TIME, TSTR
CommandSet Date Command: Sets the system date to date.
date has the form MM.DDYYYY or DD.MMYYYY, depending on the state of flag –42. MM ismonth, DD is day, and YYYY is year. If YYYY is not supplied, the current specification for theyear is used. The range of allowable dates is January 1, 2000 to December 31, 2090. Inputs
between January 1, 1991 and December 31, 1999 are silently rejected by →DATE; no error isreported and the system date is left unchanged.
…ÓTOOLS →DATE( Ó is the right-shift of the 9 key).
…&9 →DATE
Date Format (–42)
Level 1/Argument 1

Level 1/Item 1

Example:→date
If flag –42 is set and the current system year is 2005, then 28.07 →DATE sets the system date as
July 28, 2005.

See also:

→TIME

DATE+
Type:
Description:

Access:Flags:
Input/Output:

See also:

DBUG
Type:
Description:

Access:CommandDate Addition Command: Returns a past or future date, given a date in argument 1/level 2 and anumber of days in argument 2/level 1. If xdays is negative, DATE+ calculates a past date. The
range of allowable dates is October 15, 1582, to December 31, 9999.
…ÓTOOLS L DATE+…&9 LDATE+
Date Format (–42)( Ó is the right-shift of the 9 key).

Level 2/Argument 1

Level 1/Argument 2

date1

xdays

Level 1/Item 1→

datenew

DATE, DDAYS
Operation
Debug Operation: Starts program execution, then suspends it as if HALT were the first programcommand.
DBUG is programmable.
!°LLRUN DBUG

3-50 Full Command and Function Reference( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Level 1/Item 1« program » or 'program name'See also:

DDAYS
Type:
Description:

Access:Flags:
Input/Output:

See also:

DEC
Type:
Description:

Access:→

HALT, NEXT
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).
…&9 LDDAYS
Date Format (–42)
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 isdecimal.)Binary integers require the prefix #. Binary integers entered and returned in decimal baseautomatically 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
See also:
BIN, HEX, OCT, RCWS, STWS

DECR
Type:
Description:
Access:
Input/Output:

CommandDecrement Command: Takes a variable, subtracts 1, stores the new value back into the originalvariable, 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:
See also:

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

DEDICACEType:
Description:

Function

Access:Catalog, …µExample:In algebraic mode, the message can be extended. Try: DEDICACE(Salutations)

DEF
Type:

Function

Displays a greeting from the CAS team and dedication to all HP calculator users.

Description:

Defines a variable or a function. Works like the DEFINE command, except that it returns a result
and can be included in an algebraic expression. Given an expression as input, DEF stores theexpression, unlike STORE which evaluates the expression and stores the numerical value.

Access:Catalog, …µInput:

Level 1/Argument 1: An expression of the form
name=expression orname(name1, … namen)=expression(name1,… name n)
In the first case, name is the name of a variable, and expression is an expression or a number to be
stored in the variable. If the variable does not exist, it is created in the current directory. In thesecond case, name is the name of a variable that will be treated as a function, name1 to namen areformal variables used to define inputs the function will take.

Output:Level 1/Item 1: Unlike DEFINE, which returns NOVAL in Algebraic mode, and no result in
RPN mode, DEF returns the expression used as the input.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example 1:

Define a new function that calculates:(a-b)/(a+b)

Command:Result:DEF(NEW(A,B)=(A-B)/(A+B))
NEW(A,B)=(A-B)/(A+B)

Example 2:
Command:Result:Check that the newly defined function works:

See also:

DEFINE, STORE

DEFINEType:
Description:

Access:Flags:

NEW(2,1)
1/3

Command
Define Variable or Function Command: Stores the expression on the right side of the = in thevariable specified on the left side, or creates a user-defined function.
If the left side of the equation is name only, DEFINE stores exp in the variable name.
If the left side of the equation is name followed by parenthetical arguments name1 … namen,
DEFINE creates a user-defined function and stores it in the variable name.
!à
Numerical Results (–3)

3-52 Full Command and Function Reference( àis the left-shift of the 2key).

Input/Output:
Level 1/Argument 1

Level 1/Item 1→'name=exp'
Example 1:
Example 2:
See also:

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
CommandDegrees 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
See also:
GRAD, RAD

DEGREEType:
Description:( °is the left-shift of the Nkey).

Function
Returns the degree of a polynomial expression. Returns 0 for a constant expression, but –1 if theexpression 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, notincluding 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 ofthe variables.

Flags:

If exact mode is set (flag –105 clear), the result is returned as an integer, otherwise it is returned asa real number.

Example 1:

Find the degree of the polynomial represented by:
x2-17=x3+2xCommand:Result:DELALARM
Type:
Description:
Access:

DEGREE(x^2-17=x^3+2*X)
3CommandDelete 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

…&9 ALRM DELALARM
Input/Output:
Level 1/Argument 1

See also:

DELAY
Type:
Description:nindexFINDALARM, RCLALARM, STOALARM

Level 1/Item 1→

Command
Delay Command: Specifies how many seconds the calculator waits between sending lines of
information to the printer.
Setting flag –34 directs printer output to the serial port. In this case, flag –33 must be clear.
If flag –34 is set and transmit pacing is enabled (nonzero) in reserved variable IOPAR, then
XON/XOFF handshaking controls data transmission and the delay setting has no effect.
xdelay specifies the delay time in seconds. The default delay is 0 seconds. The maximum delay is 6.9
seconds. (The sign of xdelay is ignored, so –4 DELAY is equivalent to 4 DELAY.)
The delay setting is the first parameter in the reserved variable PRTPAR.
A shorter delay setting can be useful when the calculator sends multiple lines of information to
your printer (for example, when printing a program). To optimize printing efficiency, set the delay
just longer than the time the printhead requires to print one line of information.
If you set the delay shorter than the time to print one line, you may lose information. Also, as thebatteries in the printer lose their charge, the printhead slows down, and, if you have previously
decreased the delay, you may have to increase it to avoid losing information. (Battery discharge
will not cause the printhead to slow to more than the 1.8-second default delay setting.)

Access:…µDELAY
Flags:
I/O Device (–33), Printing Device (–34), I/O Device for Wire (–78)
Input/Output:
Level 1/Argument 1

See also:

DELKEYSType:
Description:

Level 1/Item 1→
xdelayCR, OLDPRT, PRLCD, PRST, PRSTC, PRVAR, PR1

Access:CommandDelete Key Assignments Command: Clears user-defined key assignments.
The argument xkey is a real number rc.p specifying the key by its row number, its column number,and its plane (shift). For a definition of plane, see ASN.
Specifying 0 for xkey clears all user key assignments and restores the standard key assignments.
Specifying S as the argument for DELKEYS suppresses all standard key assignments on the user
keyboard. This makes keys without user key assignments inactive on the user keyboard. (You canmake exceptions using ASN, or restore them all using STOKEYS.) If you are stuck in User mode
— probably with a “locked” keyboard — because you have reassigned or suppressed the keys
necessary to cancel User mode, do a system halt (“warm start”): press and hold ‡ and C
simultaneously, releasing C first. This cancels User mode.
Deleted user key assignments still take up from 2.5 to 62.5 bytes of memory each. You can free
this memory by packing your user key assignments by executing RCLKEYS 0 DELKEYSSTOKEYS.
!&H KEYS DELKEYS

Flags:!°L MODES KEYS DELKEYS ( °is the left-shift of the Nkey).
User-Mode Lock (–61) and User Mode (–62) affect the status of the user keyboard.

3-54 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:

DEPND
Type:
Description:

Access:
Input/Output:

xkey

→

{ xkey1, ... ,xkey n }

→

0

→

'S'

→

ASN, RCLKEYS, STOKEYS
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 variablename 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 nameunchanged. (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
Level 2/Argument 1

Level 1/Argument 2

DEPTH
Type:
Description:
Access:Level 1/Item 1'global'→{ global }→{ global, ystart, yend }→{ystart, yend }

→

yend

→

ystartSee also:

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→nFull Command and Function Reference 3-55

See also:

CLEAR, DROPN

DERIV
Type:
Description:

Function

Access:Calculus, P CALCULUS or !ÖDERIV. & INTEG.

Input:

Level 2/Argument 1: A function or a list of functions.
Level 1/Argument 2: A variable, or a vector of variables. The variable or variables must not exist
as variables stored in the current directory nor directories above it.

Output:

The derivative, or a vector of the derivatives, of the function or functions.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Find the gradient of the following function of the spatial variables x, y, and z:

Returns the partial derivatives of a function, with respect to the specified variables.

22

2x y + 3y z + zx

Command:

DERIV(2*X^2*Y+3*Y^2*Z+Z*X, [X,Y,Z])
EXPAND(ANS(1))

Result:[4*Y*X+Z,2*X^2+6*Z*Y,X+3*Y^2]

See also:

DERVX, dn, ∂, POTENTIAL

DERVX
Type:
Description:

Function

Access:Calculus, !Ö or P CALCULUS or !ÖDERIV. & INTEG.

Input:

The function or list of functions to be differentiated.

Output:

The derivative, or a vector of the derivatives, of the function or functions.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

See also:

DERIV, dn, ∂DESOLVE
Type:
Description:

CommandAccess:Symbolic solve, !Î or calculus, !ÖDIFFERENTIAL EQNS.

Input:

Level 2/Argument 1: A first-order differential equation.
Level 1/Argument 2: The function to solve for.

Output:The solution to the equation, either y as a function of x or x as a function of y, or x and y asfunctions of a parameter.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Solve the following differential equation:

Returns the derivative of a function with respect to the current variable. This variable must notexist as a variable stored in the current directory path.

Solves certain first-order ordinary differential equations with respect to the current variable.

y′ ( x ) + 2 y ( x ) = e

Command:

3x

DESOLVE(d1Y(X)+2*Y(X)=EXP(3*X),Y(X))

3-56 Full Command and Function Reference(See the description of dn and Chapter 16 of the User’s Guide for an explanation of the use of“d1” for a derivative.)
Result:See also:

DET
Type:
Description:

Access:Flags:
Input/Output:{Y(X)=(1/5*EXP(5*X)+cC0)*(1/EXP(X)^2)}

dn, LDEC
CommandDeterminant Function: Returns the determinant of a square matrix.
The argument matrix must be square. DET computes the determinant of 1 × 1 and 2 × 2
matrices directly from the defining expression for the determinant. DET computes thedeterminant of a larger matrix by computing the Crout LU decomposition of the matrix andaccumulating the product of the decomposition’s diagonal elements.
Since floating-point division is used to do this, the computed determinant of an integer matrix isoften not an integer, even though the actual determinant of an integer matrix must be an integer.
DET corrects this by rounding the computed determinant to an integer value. This technique isalso used for noninteger matrices with determinants having fewer than 15 nonzero digits: thecomputed determinant is rounded at the appropriate digit position to restore some or all of theaccuracy lost to floating-point arithmetic.
This refining technique can cause the computed determinant to exhibit discontinuity. To avoid
this, you can disable the refinement by setting flag –54.
!Ø OPERATIONS DET( Ø is the left-shift of the 5key).
!´NORMALIZE DET
Tiny Element (–54)( ´ is the left-shift of the Pkey).

Level 1/Argument 1

Example:See also:

DETACHType:
Description:

Access:
Input/Output:

Level 1/Item 1→[[ matrix ]]xdeterminant
For a square matrix A, the minor of element aij is the determinant of the submatrix that remains
after deleting row i and column j from the original matrix. Given a square matrix in level 3, i inlevel 2, and j in level 1, the following program, MINOR determines the minor of the submatrix:« → M row col« M row ROW- DROP col COL- DROP DET »»For example, entering [[ 1 2 3 ][ 4 5 6 ][ 7 8 9 ]] 2 3 MINOR
returns -6.
CNRM, CROSS, DOT, RNRM
CommandDetach Library Command: Detaches the library with the specified number from the current
directory. Each library has a unique number. If a port number is specified, it is ignored.
A library object attached to a non-HOME directory is automatically detached (without using
DETACH) whenever a new library object is attached there.
…µDETACH
Level 1/Argument 1

See also:

Level 1/Item 1

nlibrary→:nport :nlibrary→

ATTACH, LIBS, PURGE
Full Command and Function Reference 3-57

DIAG→Type:
Description:

Access:Command
Vector to Matrix Diagonal Command: Takes an array and a specified dimension and returns amatrix 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 isreturned. 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 thearray, extra array elements are dropped.
!Ø CREATEL DIAG→( Ø is the left-shift of the 5key).

!´MATRIX L DIAG→!´MATRIX MAKELL DIAG→( ´ is the left-shift of the Pkey).
( ´ is the left-shift of the Pkey).

Input/Output:

See also:
→DIAG
Type:
Description:

Access:Level 2/Argument 1

Level 1/Argument 2[ array ]diagonals{ dim }

Level 1/Item 1→[[ matrix ]]→DIAGCommandMatrix Diagonal to Array Command: Returns a vector that contains the major diagonal elementsof a matrix.
The input matrix does not have to be square.
!Ø CREATE →DIAG( Ø is the left-shift of the 5 key).

!´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 ]]Level 1/Item 1→

See also:

DIAG→

DIAGMAPType:
Description:

Command
Applies a holomorphic operator to a diagonalizable matrix.

Access:
Input:

Output:Flags:

Example:[ 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 avariable 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).
Apply the operator ex to the matrix

3-58 Full Command and Function Reference

1102Command:
DIAGMAP  1 1 , << → X<<EXP(X) >> >>
 0 2
or DIAGMAP([[1,1],[0,2]],exp(X))

Result:EXP ( 1 ) – EXP ( 1 ) + EXP ( 2 )0
EXP ( 2 )

DIFF
Type:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, EXP&LN, INTEGER, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

DIFFEQType:
Description:

Displays a menu or list containing the CAS commands for differential calculus, includingcommands for working with series.

CommandDifferential Equation Plot Type Command: Sets the plot type to DIFFEQ.
When the plot type is DIFFEQ and the reserved variable EQ does not contain a list, the initialvalue problem is solved and plotted over an interval using the Runge–Kutta–Fehlberg (4,5)
method. The plotting parameters are specified in the reserved variable PPAR, which has thefollowing form:{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }For plot type DIFFEQ, 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 rightcorner 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 list, { X x0 xf }, containing a name that specifies the independent variable, and two
numbers that specify the initial and final values for the independent variable. The default values
for these elements are { X 0 xmax }.
• res is a real number specifying the maximum interval, in user-unit coordinates, between values of
the independent variable. The default value is 0. If res does not equal zero, then the maximum
interval is res. If res equals zero, the maximum interval is unlimited.
• 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. If the solution is realvalued, these strings can specify the dependent or the independent variable; if the solution isvector valued, the strings can specify a solution component:– 0 specifies the dependent variable (X)– 1 specifies the dependent variable (Y)– n specifies a solution component Yn

Full Command and Function Reference 3-59

– 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 thecommand name DIFFEQ in PPAR.

• depend is a list, { Y y0 xErrTol }, containing a name that specifies the dependent variable (thesolution), 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 realvalue or real vector when evaluated.
The DIFFEQ-plotter attempts to make the interval between values of the independent variable aslarge 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, andcan 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 canreturn a real value or a real matrix when evaluated.
Access:…µDIFFEQ
Input/Output: None
See also:
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 tocreate 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

Level 1/Item 1→
See also:

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

for input. The FREEZE command can be used to cause the object to persist in the display until a
key is pressed.
( °is the left-shift of the Nkey).

Access:!°LOUT DISP
Input/Output:

Example:See also:

DISPXYType:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

objn

DISTRIBType:
Description:
Access:
Input:
Output:Flags:→The program« "ENTER Data Now" 1 DISP 7 FREEZE HALT »displays ENTER Data Now at the top of the display, “freezes” the entire display, and halts.
DISPXY, FREEZE, HALT, INPUT, PROMPT
Command
Display Command: Displays obj at the specified screen coordinates using a specified font size.
The list argument expects exactly two binary integers to specify the X and Y coordinates. The
level one integer argument n will display the obj using a small font if n is 1 and using the systemfont if n is 2.
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 at coordinate #x #y, and continues down the display either to the end of the object or thebottom of the display. NOTE: DISPXY is not useful for displaying grobs.
The object displayed by DISPXY persists in the display only until the keyboard is ready for input.
The FREEZE command can be used to cause the object to persist in the display until a key ispressed.
( °is the left-shift of the Nkey).
!°LOUT DISPXY
Level 3/Argument 1

See also:

Level 1/Item 1

Level 2/Argument 2

obj{ list }DISP, FREEZE, HALT, INPUT, PROMPT

Level 1/Argument 3nLevel 1/Item 1→

Command
Applies one step of the distributive property of multiplication and division with respect toaddition and subtraction. Used for single-stepping through a multi-step distribution.
!Ú REWRITE
An expression.
An equivalent expression that results from applying the distributive property of multiplication
over addition one time.
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Expand (X+1)( X-1)( X+2).

Example:Command:Result:

DISTRIB((X+1)*(X-1)*(X+2))

See also:

FDISTRIB

X*(X-1)*(X+2)+1*(X-1)*(X+2)

Full Command and Function Reference 3-61

DIV
Type:
Description:

CommandAccess: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:

Returns the divergence of a vector function.

2

Command:Result:22v = 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)

See also:

CURL, HESS

DIV2
Type:

Command

Description:

Performs Euclidean division on two expressions. Step-by-step mode is available with thiscommand.

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:Perform the following division:2x +x+1----------------------2x + 4

Command:Result:DIV2(X^2+X+1,2*X+4){1/2(X-1),3}

DIV2MODType:

Command

Description:

Performs Euclidean division on two expressions modulo the current modulus.

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.

3-62 Full Command and Function Reference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

Example:Command:Result:x +4------------2–
1
x
Find the result of, modulo 3.

DIV2MOD(X^3+4,X^2-1){X X+1}

DIVIS
Type:
Description:

CommandAccess:Arithmetic, !Þor PARITH

Input:A polynomial or an integer.

Output:A list containing the expressions or integers that exactly divide into the input.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Find the divisors of the following polynomial:

Returns a list of divisors of a polynomial or an integer.

2

x + 3x + 2

Command:Result:DIVIS(X^2+3*X+2){1,X+1,X+2,X^2+3*X+2}

See also:

DIV2

DIVMODType:
Description:

Function

Access:Arithmetic, !Þ MODULO

Input:

Level 2/Argument 1: The dividend.
Level 1/Argument 2: The divisor.

Output:The quotient of the terms modulo the current modulus.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:Modulo 3, divide 5x2+4x+2 by x2+1.

Divides two expressions modulo the current modulus.

DIVMOD(5*X^2+4*X+2,X^2+1)-((X^2-X+1)/X^2+1))

DIVPC
Type:
Description:

CommandAccess:Calculus, !Ö LIMITS & SERIES

Input:

Level 3/Argument 1: The numerator expression.
Level 2/Argument 2: The denominator expression.
Level 1/Argument 3: The degree of the Taylor polynomial.

Output:The Taylor polynomial at x = 0 of the quotient of the two expressions, to the specified degree.

Returns a Taylor polynomial for the quotient of two polynomial expressions.

Full Command and Function Reference 3-63

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)
12+4*X+X^3

See also:

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 off(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 thewhole 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 thefunction 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).

Example:Command:Result:Differentiate the function sin(2x) with respect to its argument:
EVAL(d1SIN(2*X))
COS(2*X)(Note that the function was differentiated with respect to its argument 2x, not with respect to thevariable x.)
See also:

DO
Type:
Description:

Access:DERIV, DERVX, DESOLVE, ∂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).

3-64 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Example:See also:

DOERR
Type:
Description:

Access:
Input/Output:

Level 1/Item 1

DO

→

UNTIL

→

END
T/F →
The following program counts down from 100 to 0 and leaves the integers 100 to 0 on the stack:« 100 'A' STO A DO 'A' DECR UNTIL 'A==0' END 'A' PURGE »END, UNTIL, WHILE
CommandDo Error Command: Executes a “user-specified” error, causing a program to behave exactly as if
a normal error had occurred during program execution.
DOERR causes a program to behave exactly as if a normal error has occurred during program
execution. The error message depends on the argument provided to DOERR:• nerror or #nerror display the corresponding built-in error message.
• "error" displays the contents of the string. (A subsequent execution of ERRM returns "error".
ERRN returns # 70000h.)• 0 abandons program execution with an ‘interrupted’ error message (ERRN = #13Fh).
• 0 DOERR is equivalent to pressing −.
!°LLERROR DOERR( °is the left-shift of the Nkey).
Level 1/Argument 1

Example:See also:

DOLISTType:
Description:

Access:Level 1/Item 1

nerror→#nerror→“error”→→
0
The following program takes a number from the stack and returns an error if the number isgreater than 10:« → X « CASE 'X>10' THEN "X IS TOO BIG" DOERR END END » »ERRM, ERRN, ERR0
Command
Do to List Command: Applies commands, programs, or user-defined functions to lists.
The number of lists, n, can be omitted when the first or level 1 argument is any of the following:• A command.
• A program containing exactly one command (e.g. « DUP »)• A program conforming to the structure of a user-defined function.
The final argument 1 (or level 1 object) can be a local or global name that refers to a program orcommand.
All lists must be the same length l. The program is executed l times: on the ith iteration, n objects
each taken from the ith position in each list are entered on the stack in the same order as in their
original lists, and the program is executed. The results from each execution are left on the stack.
After the final iteration, any new results are combined into a single list.
!°LIST PROCEDURES DOLIST ( °is the left-shift of the Nkey).

Full Command and Function Reference 3-65

Input/Output:
Ln+2/A1 ... L3/An–2

L2/An+1

L1/An+2{ list }1 ... { list }nn« program »→{ results }{ list }1 ... { list }nncommand→{ results }{ list }1 ... { list }n

n

name

→

{ results }{ list }1 ...

{ list }n+1

« program »→{ results }{ list }1 ...

{ list }n+1command→{ results }{ list }1 ...

{ list }n+1

name

→

{ results }Level 1/Item 1

L = Level; A = Argument

See also:{ 1 2 3 } { 4 5 6 } { 7 8 9 } 3 « + * » DOLIST returns{ 11 26 45 }.
DOSUBS, ENDSUB, NSUB, STREAM

DOMAINType:

Command

Example:Description:

For a function of the current variable, lists the domains of real numbers for which the function isdefined 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”.

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:Define a function f =√(a+1) by typing DEF(F(A)=√(A+1)). Then tabulate the domain over which
it is defined and undefined.

Command:Result:See also:

DOSUBSType:
Description:

DOMAIN(F(X)){'-∞' '?' –1 + '+∞'}, showing that the function f is undefined for values from –∞ to –1 and isdefined from –1 to +∞.

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Access:
Input/Output:

command ENDSUB. Both of these commands return an Undefined Local Name error if
executed when DOSUBS is not active.
DOSUBS returns the Invalid User Function error if the object at level 1/argument 3 is a user
program that does not contain only one command and does not have a user-defined function
structure. DOSUBS also returns the Wrong Argument Count error if the object at level1/argument 3 is a command that does not accept 1 to 5 arguments of specific types (DUP, ROT,
or →LIST, for example).
!°LIST PROCEDURES DOSUBS ( °is the left-shift of the Nkey).
Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3{ list }1n« program »→{ list }2{ list }1ncommand→{ list }2{ list }1

n

name

→

{ list }2{ list }1« program »→{ list }2{ list }1

command→{ list }2→{ list }2

See also:{ list }1
name{ A B C D E } « - » DOSUBS returns{ 'A-B' 'B-C' 'C-D' 'D-E' }.
{ A B C } 2 « DUP * * » DOSUBS returns{ 'A*(B*B)' 'B*(C*C)' }.
Entering{ 1 2 3 4 5 } « → a b« CASE 'NSUB==1' THEN a END'NSUB==ENDSUB' THEN b END'a+b' EVAL END » » DOSUBS
returns { 1 5 7 5 }.
DOLIST, ENDSUB, NSUB, STREAM

DOT
Type:

Command

Example 1:
Example 2:
Example 3:

Level 1/Item 1

Description:

Dot Product Command: Returns the dot product A•B of two arrays A and B, calculated as thesum of the products of the corresponding elements of the two arrays.
Both arrays must have the same dimensions.
Some authorities define the dot product of two complex arrays as the sum of the products of the
conjugated elements of one array with their corresponding elements from the other array. The
calculator uses the ordinary products without conjugation. If you prefer the alternative definition,
apply CONJ to one array before using DOT.

Access:!Ø LVECTOR DOT!´VECTOR DOT( Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).

Input/Output:

Example:See also:

Level 2/Argument 1

Level 1/Argument 2[ array A ][ array B ]Level 1/Item 1→x[ 1 2 3 ][ 4 5 6 ] DOT returns 32 (by calculating 1 x 4 + 2 x 5 + 3 x 6).
CNRM, CROSS, DET, RNRM

Full Command and Function Reference 3-67

DRAW
Type:
Description:

Access:Flags:
Input/Output:
See also:

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 issubsequently executed.
…µDRAW
Simultaneous or Sequential Plot (–28), Curve Filling (–31)
None
AUTO, AXES, DRAX, ERASE, FREEZE, PICTURE, LABEL, PVIEWDRAW3DMATRIXType: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 ofthe 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 thematrix.
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, thetotal 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:

See also:

DRAX
Type:
Description:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3[[ matrix ]]

vmin

vmax

Level 1/Item 1→

FAST3D
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.

Access:…µDRAX
Input/Output: None
See also:
AXES, DRAW, LABEL

3-68 Full Command and Function ReferenceDROITEType:
Description:

Function

Access:Catalog, …µInput:

Level 2/Argument 1: The first point, in the form a+b *i, or (a,b), where a and b must be numbers,
or variables or expressions that evaluate to numbers.
Level 1/Argument 2: The second point, in the form c+d *i, or (c,d), where c and d must be
numbers, or variables or expressions that evaluate to numbers.

Output:Level 1/Item 1: An equation for the straight line through the two points. The general form is
Y=(d-b)/(c-a)*(X-a)+b.

Flags:

Numeric mode must not be set (flag –3 clear).
Complex mode must be set (flag –103 set).
In algebraic mode, if any of a, b, c, d are variables, they will be converted to their numeric values,
even if “argument to symbolic” mode is set (flag –3 clear). In RPN mode, they will be returned as
variables. If ALG mode is set and “constants to numeric” mode is selected (flag –2 set) ̟ and e
used in inputs will be converted to their real number approximations, otherwise they will be
returned in symbolic form.

Example 1:
Command:Result:Find an equation for the straight line through the points (1, 2), (3, 4).
DROITE((1, 2), (3, 4))

Example 2:
Command:Find a symbolic equation for the straight line through the points (π, e), (e, π).
With “constants to symbolic ” mode selected and exact mode set, type:

Returns an equation for the line through two given points in a plane. For more than two points,
LAGRANGE will fit a polynomial.

Y=X-1.+2.

DROITE(π+e*i, e+π*i)

Result:Y=(π-e)/(e-π)*(X-π)+e

See also:

LAGRANGE

DROP
Type:
Description:
Access:RPL Command
Drop Object Command: Removes the level 1 object from the stack.
!°STACK DROP
( °is the left-shift of the Nkey).
ISTACK DROP
ƒ in RPN mode executes DROP when no command line is present.

Input/Output:
Level 1

obj

Level 1→

See also:

CLEAR, DROPN, DROP2

DROP2
Type:
Description:

RPL Command
Drop 2 Objects Command: Removes the first two objects from the stack.

Access:!°STACK LL DROP2( °is the left-shift of the Nkey).

ISTACK LL DROP2

Full Command and Function Reference 3-69

Input/Output:
Level 2

See also:

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

See also:

DTAG
Type:
Description:

Access:
Input/Output:

Level 1

obj1 ... objn
CLEAR, DROP, DROP2n

Level 1→

CommandDelete 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:objobj

See also:

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 DUPISTACK DUP( °is the left-shift of the Nkey).

` in RPN mode executes DUP when no command line is present.
Input/Output:
Level 1obj
See also:

DUP2
Type:
Description:
Access:→Level 2

Level 1obj

obj

DUPN, DUP2, PICKRPL Command
Duplicate 2 Objects Command: DUP2 returns copies of the two objects on levels 1 and 2 of thestack.
!°STACK LL DUP2
( °is the left-shift of the Nkey).
ISTACK LL DUP2

3-70 Full Command and Function ReferenceInput/Output:
L2

L1

obj2

obj1

→

L4

L3

L2

L1

obj2

obj1

obj2

obj1

L = Level

See also:

DUP, DUPN, PICKDUPDUPType:
Description:
Access:RPL Command
Duplicates an object twice. Same as DUP DUP.
!°STACK LL DUPDUP( °is the left-shift of the Nkey).
ISTACK LL DUPDUP

Input/Output:
Level 1

See also:

DUPN
Type:
Description:
Access:→obj
DUP, NDUPN, DUPN, DUP2

Level 3

Level 2

Level 1

obj

obj

obj

RPL Command
Duplicate n Objects Command: Takes an integer n from level 1 of the stack, and returns copies ofthe objects on stack levels 2 through n + 1.
( °is the left-shift of the Nkey).
!°STACK LL DUPNISTACK LL DUPN

Input/Output:

See also:

D→R
Type:
Description:

Li+1

Li …L3

L2

L1

obj1

obj2 … obji–1

obji

n

→

Li+n

Li+n–1 ... L2

L1

obj1

obj2 ... obji–1

obji

L = Level

DUP, DUP2, PICKFunction
Degrees to Radians Function: Converts a real number representing an angle in degrees to its
equivalent in radians.
This function operates independently of the angle mode.

Access:!´REAL LL D→R
Flags:
Numerical Results (–3)
Input/Output:( ´ is the left-shift of the Pkey).

Level 1/Argument 1

Level 1/Item 1x→(π/180)x'symb'→'D→R(symb)'

See also:

R→D

e
Type:
Description:

Functione Function: Returns the symbolic constant e or its numerical representation, 2.71828182846.

Full Command and Function Reference 3-71

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 tocompute the exponential to greater accuracy. Even though the calculator often displays 'EXP(x)' ase^x, it’s still 'EXP(x)' internally.
Access:~!e!´LCONSTANTS e

Flags:
Input/Output:( ´ is the left-shift of the Pkey).

!´LCONSTANTS 2.718281828…
( ´ is the left-shift of the Pkey).
Symbolic Constants (–2), Numerical Results (–3)
Level 1/Argument 1

Level 1/Item 1

→

'e'

→

2.71828182846

See also:

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
See also:
EDITB, VISIT

EDITB
Type:
Description:

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
See also:
EDIT, VISIT

Access:

EGCD
Type:
Description:

Command
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.

Access: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.

Output: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.

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Example:

Find the polynomials for u, v, and c, where c is the greatest common divisor of a and b such that:2u(x + 1) + v(x – 1) = c

Command:Result:See also:

EGV
Type:
Description:

EGCD(X^2+1,X-1){2,1,-(X+1)}

IEGCD, ABCUV
Command
Eigenvalues and Eigenvectors Command: Computes the eigenvalues and right eigenvectors for asquare 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):A ⋅ EVec – EVec ⋅ diag ( EVal )------------------------------------------------------------------------------n⋅ A

where diag (EVal) denotes the n × n diagonal matrix containing the eigenvalues EVal.
Access:!Ø LEIGENVECTOR EGV( Ø is the left-shift of the 5key).

!´MATRIX LEGV

( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1[[matrix ]]A
See also:

EGVL
Type:
Description:
Access:→Level 2/Item 1

Level 1/Item 2[[matrix ]]EVec[vector ]EVal

EGVLCommand
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[[matrix ]]A
See also:

ELSE
Type:
Description:

Level 1/Item 1→[vector ]EVal

EGVCommand
ELSE Command: Starts false clause in conditional or error-trapping structure.
See the IF and IFERR keyword entries for more information.

Access:!°BRANCH IF ELSE
( °is the left-shift of the Nkey).
Input/Output: None
See also:
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

See the IF, CASE, IFERR, DO, and WHILE keyword entries for more information.
Access:!°BRANCH IF/CASE/DO/WHILE END ( °is the left-shift of the Nkey).
Input/Output: None
See also:
IF, CASE, DO, ELSE, IFERR, REPEAT, THEN, UNTIL, WHILEENDSUBType:
Description:

CommandEnding Sublist Command: Provides a way to access the total number of sublists contained in thelist used by DOSUBS.
Returns an Undefined Local Name error if executed when DOSUBS is not active.
Access:!°LIST PROCEDURES ENDSUB( °is the left-shift of the Nkey).
Input/Output: None
Example:The following program subtracts the number of elements in a list from each element in the list
« → a « a 1 « ENDSUB - » » DOSUBS »See also:
DOSUBS, NSUB

ENG
Type:
Description:

Access:CommandEngineering Mode Command: Sets the number display format to engineering mode, whichdisplays one to three digits to the left of the fraction mark (decimal point) and an exponent that isa multiple of three. The total number of significant digits displayed is n + 1.
Engineering mode uses n + 1 significant digits, where 0 ≤ n ≤ 11. (Values for n outside this range
are rounded up or down.) A number is displayed or printed as follows:(sign) mantissa E (sign) exponent
where the mantissa is of the form (nn)n.(n…) (with up to 12 digits total) and the exponent has one
to three digits.
A number with an exponent of –499 is displayed automatically in scientific mode.
! & H FMT ENG!°L MODES FMT ENG( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Example:See also:

Level 1/Item 1→n
The number 103.6 in Engineering mode with five significant digits (n=4) would appear as103.60E0. This same number with one significant digit (n=0) would appear as 100.E0.
FIX, SCI, STD

EPSX0
Type:
Description:

Function

Access:Catalog, …µInput:A polynomial.

Output:

The polynomial with conforming coefficients replaced with 0.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Replaces all coefficients in a polynomial that have an absolute value less than that held in the
CASDIR variable EPS, with 0. The default value of EPS is 1E-10, which can be changed bystoring a new number in the variable EPS in the CASDIR directory; this must be less than 1.

3-74 Full Command and Function ReferenceExample:
Command:Result:EQNLIBType:
Description:
Access:
Input/Output:
See also:
EQW
Type:
Description:
Access:Replace with zero the terms smaller than EPS in the expression: 10-13x + 10-2
EPSX0(1E-13*X+.01)
0*X+.01

CommandStarts the Equation Library application.
GEQUATION LIBRARY
None
MSOLVR, SOLVEQN
CommandOpens Equation Writer, where you can edit an expression.
Puts an object into the Equation Writer.
…µEQW(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 …³)

Input/Output:
Level 1/Argument 1

See also:

EQ→
Type:
Description:

Level 1/Item 1→

exp1
EDIT, EDITB, VISIT, VISITB

exp2

CommandEquation 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

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

See also:→'symb'
ARRY→, DTAG, LIST→, OBJ→, STR→

ERASE
Type:
Description:
Access:
Input/Output:
See also:

CommandErase PICT Command: Erases PICT, leaving a blank PICT of the same dimensions.
…µ ERASE
None
DRAW

Full Command and Function Reference 3-75

ERR0
Type:
Description:

CommandClear Last Error Number Command: Clears the last error number so that a subsequent execution
of ERRN returns # 0h, and clears the last error message.
( °is the left-shift of the Nkey).
Access:!°LLERROR ERR0
Input/Output: None
See also:
DOERR, ERRM, ERRN

ERRM
Type:
Description:

Access:
Input/Output:

CommandError Message Command: Returns a string containing the error message of the most recent
calculator error.
ERRM returns the string for an error generated by DOERR. If the argument to DOERR was 0,
the string returned by ERRM is ‘Interrupted’.
!°LL ERROR ERRM
( °is the left-shift of the Nkey).
Level 1/Argument 1

Example:See also:

ERRN
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→“error message”
The program « IFERR + THEN ERRM END » returns "Bad Argument Type" to level 1
if improper arguments (for example, a complex number and a binary integer) are in levels 1 and 2.
DOERR, ERRN, ERR0
CommandError Number Command: Returns the error number of the most recent calculator error.
If the most recent error was generated by DOERR with a string argument, ERRN returns#70000h. If the most recent error was generated by DOERR with a binary integer argument,
ERRN returns that binary integer. (If the most recent error was generated by DOERR with a real
number argument, ERRN returns the binary integer conversion of the real number.) The only
exceptions to these rules are 0 DOERR and #0 DOERR, both of which set ERRN to #31Fh and
ERRM to ‘Interrupted’.
( °is the left-shift of the Nkey).
!°LL ERROR ERRN
Level 1/Argument 1

Level 1/Item 1→
Example:See also:

EULER
Type:
Description:#nerror

The program « IFERR + THEN ERRN END » returns # 202h to level 1 if improperarguments (for example, a complex number and a binary integer) are in levels 1 and 2.
DOERR, ERRM, ERR0
Function
For a given integer, returns the number of integers less than the integer that are co-prime with the
integer. (Euler’s Φ function.)

Access:!ÞINTEGER

Input:

A non-negative integer, or an expression that evaluates to a non-negative integer.

Output:

The number of positive integers, less than, and co-prime with, the integer.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

3-76 Full Command and Function Reference

EVAL
Type:
Description:

Command
Evaluate Object Command: Evaluates the object.
The following table describes the effect of the evaluation on different object types.
Object Type

Effect of Evaluation

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 thename 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.

TaggedIf 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
See also:→NUM, SYSEVAL

EXLR
Type:
Description:

Command

Level 1/Item 1→(see above)

Returns the left- and right-hand sides of an equation as discrete expressions.

Full Command and Function Reference 3-77

Access:

Catalog, …µInput:

An equation.

Output:Level 2/Item 1: The expression to the left of the “=” sign in the original equation, or, if the input
is an expression and not an equation, the independent variable.
Level 1/Item 2: The expression to the right of the “=” sign in the original equation, or, if the
input is an expression, the expression.

Flags:

Numeric mode must not be set (flag –3 clear).
In Algebraic mode (flag –95 set), the output expressions are evaluated (variables are replaced bynumeric values) before the result is returned.

Example:Command:Result:Split the following equation into its two component expressions: sin(x)=5x+y

See also:

FXND

EXP&LNType:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, INTEGER, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

EXP
Type:
Description:

EXLR(SIN(X)=5*X+Y){SIN(X), 5*X+Y}

Displays a menu or list of the CAS exponential and logarithmic operations.

Analytic Function
Exponential Analytic Function: Returns the exponential, or natural antilogarithm, of theargument; that is, e raised to the given power.
EXP uses extended precision constants and a special algorithm to compute its result to full 12digit precision for all arguments that do not trigger an underflow or overflow error.
EXP provides a more accurate result for the exponential than can be obtained by using e Q.
The difference in accuracy increases as z increases. For example:z

Access:Flags:

EXP(z)ez

3
10

20.0855369232
22026.4657948

20.0855369232
22026.4657949

100

2.68811714182E43

2.68811714191E43500

1.40359221785E217

1.40359221809E217

1000

1.9707111402E434

1.9707111469E434

For complex arguments: e(x,y) = excosy + iexsiny!¸( ¸is the left-shift of the Qkey).
Numerical Results (–3)

3-78 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:

ALOG, EXPM, LN, LOG

EXP2HYPType:
Description:

Function

Level 1/Item 1

z

→

ez

'symb'→'EXP(symb)'

Converts expressions involving the exponential function into expressions with hyperbolic
functions.

Access:Catalog, …µInput:An expression

Output:

The rewritten expression.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:Rewrite in terms of hyperbolic functions the expression e

EXP2POWType:

5 ⋅ ln ( x )EXP2HYP(EXP(5*LN(X)))
SINH(5*LN(X))+COSH(5*LN(X))

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:

Simplify the expression e 5·ln(x)Result:Example 2:
Command:Result:See also:

EXPAN
Type:
Description:

Access:REWRITEEXP2POW(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:Numerical Results (–3), Exact Mode (–105)
Input/Output:
Level 1/Argument 1

Level 1/Item 1

x

→

x

'symb1'→'symb2'

Example 1:
Example 2:
See also:→(x, y)'A^(B+C)' EXPAN returns 'A^C*A^B''(X+Y)^2' EXPAN returns 'X^2+2*Y*X+Y^2'
COLCT, EXPAND, ISOL, QUAD, SHOWEXPANDType:

Command(x, y)

Description:

Expands and simplifies an algebraic expression. This command is similar to the EXPAN
command (which is included to ensure backward-compatibility with the HP 48-series calculators),
except that EXPAND does more a more in-depth analysis and often does a better job at
simplifying an expression than EXPAN.

Access:Algebra, …×or PALG

Input:An expression, or an array of expressions.

Output:

The expanded and simplified expression or array of expressions.

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:Simplify the following expression:2( x + 2x + 1 )------------------------------x+1

Command:Result:See also:

EXPAND((X^2+2*X+1)/(X+1))
X+1

EXPAN

EXPANDMOD
Type:
Function
Description:
Expands and simplifies an algebraic expression, or an array of expressions, modulo the current
modulus.
Access:!ÞMODULO

Input:An expression, or an array of expressions.

Output:

The expanded and simplified expression, or array of 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).

Example:Expand the following expression and give the result modulo 3:

Command:Result:( x + 3 )( x + 4 )EXPANDMOD((X+3)*(X+4))
X^2+X

3-80 Full Command and Function ReferenceEXPFITType:
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
See also:
BESTFIT, LR, LINFIT, LOGFIT, PWRFIT

EXPLN
Type:
Description:

Transforms the trigonometric terms in an expression to exponential and logarithmic terms.

Access:!Ð or Convert, !Ú REWRITE or PLEXP & LN

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).
Complex mode must be set (flag –103 set).

Example:Transform the following expression and simplify the result using the EXPAND command:

Command2

2 cos ( x )Command:

EXPLN(2*COS(X^2))
EXPAND(ANS(1))

Result:(EXP(i*X^2)^2+1)/EXP(i*X^2)

See also:

EXPM
Type:
Description:

Access:Flags:
Input/Output:

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 anintermediate 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
Numerical Results (–3)(Ð is the left-shift of the 8key).

Level 1/Argument 1

Level 1/Item 1x→ex – 1'symb'→'EXPM(symb)'

See also:

EXP, LNP1

EYEPT
Type:
Description:

CommandEye Point Command: Specifies the coordinates of the eye point in a perspective plot.

Full Command and Function Reference 3-81

Access:
Input/Output:

xpoint, ypoint, and zpoint are real numbers that set the x-, y-, and z-coordinates as the eye-point fromwhich to view a 3D plot’s view volume. The y-coordinate must always be 1 unit less than the view
volume’s nearest point (ynear of YVOL). These coordinates are stored in the reserved variable
VPAR.
…µEYEPT
Level 3/Argument 1

See also:

F0λ
Type:
Description:

Access:Flags:
Input/Output:

FACT
Type:
Description:
Access:Flags:
Input/Output:

Level 2/Argument 2

Level 1/Argument 3

xpointypointzpoint
NUMX, NUMY, XVOL, XXRNG, YVOL, YYRNG, ZVOLLevel 1/Item 1→

Function
Black Body Emissive Power Function: Returns the fraction of total black-body emissive power attemperature xT between wavelengths 0 and ylambda. If units are not specified, ylambda has impliedunits of meters and xT has implied units of K.
F0λ returns a dimensionless fraction.
…µ F0λNumerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

ylambdaxT→

xpowerylambda'symb'→'F0λ(ylambda,symb)''symb'xT→'F0λ(symb,xT)''symb1''symb2'→'F0λ(symb1,symb2)'

Command
Factorial (Gamma) Function: FACT is the same as ! and is provided for compatibility with the HP
28. See !.
…µFACT
Numerical Results (–3), Underflow Exception (–20), Overflow Exception (–21)
Level 1/Argument 1

Level 1/Item 1

n

→

n!

x

→

Γ(x + 1)'symb'→'(symb)!'

See also:

COMB, PERM, !

FACTOR
Type:
Description:

CommandAccess:Algebra, …×or PALG or !ÞPOLY

Factorizes a polynomial or an integer:• The function expresses a polynomial as the product of irreducible polynomials.
• The function expresses an integer as the product of prime numbers.

3-82 Full Command and Function Reference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).
Results including complex terms are returned if complex mode is set (flag –103 set).

Example:Factorize the following:2

x + 5x + 6

Command:Result:See also:

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 aprime 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:

FACTORMOD(X^2+2)(X+1)*(X-1)

See also:

MODSTOFACTORSType:
Description:

CommandAccess:Arithmetic, !Þ

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).
Radians mode must be set (flag –17 set).

Example 1:
Command:Result:Find the prime factors of 100.

Example 2:
Command:Result:Find the irreducible factors of: x + 4x + 4

For a value or expression, returns a list of prime factors and their multiplicities.

FACTORS(100){5 2. 2 2.}2

FACTORS(X^2+4*X+4){X+2,2.}

Full Command and Function Reference 3-83

FANNING
Type:
Description:

Access:Flags:
Input/Output:

See also:

FAST3DType:
Description:

Function
Fanning Friction Factor Function: Calculates the Fanning friction factor of certain fluid flows.
FANNING calculates the Fanning friction factor, a correction factor for the frictional effects of
fluid flows having constant temperature, cross-section, velocity, and viscosity (a typical pipe flow,for example). xx/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). xx/D and yRe must be real numbers or unit objects that
reduce to dimensionless numbers, and both numbers must be greater than 0.
…µFANNING
Numerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

xx/D

yRe

→

xfanning

xx/D'symb'→'FANNING(xx/D,symb)''symb'yRe→'FANNING(symb,yRe)''symb1''symb2'→'FANNING(symb1,symb2)'

DARCY
CommandFast 3D Plot Type Command: Sets the plot type to FAST 3D.
When plot type is set to FAST3D, the DRAW command plots an image graph of a 3-vectorvalued function of two variables. FAST3D 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 FAST3D, 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 are not used.
• 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 FAST3D, 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 FAST3D places thename FAST3D in ptype.
• depend is a name specifying the dependent variable. The default value is Y.

3-84 Full Command and Function ReferenceAccess:…µFAST3D
Input/Output: None
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,YSLICE

FCOEF
Type:

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 iswritten 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

Command:Result:See also:

FC?
Type:
Description:
Access:FCOEF([1,2,3,-1])(X-1)^2/(X-3)

FROOTS
Command
Flag Clear? Command: Tests whether the system or user flag specified by nflag number is clear, andreturns 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).

Input/Output:
Level 1/Argument 1

nflag number
See also:

FC?C
Type:
Description:

Access: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.
( °is the left-shift of the Nkey).
!°TEST LLFC?C!° LMODES FLAG FC?C

( °is the left-shift of the Nkey).

!&H FLAG FC?CFull Command and Function Reference 3-85

Input/Output:
Level 1/Argument 1

Example:See also:

FDISTRIB
Type:
Description:

Level 1/Item 1→
nflag number
If flag –44 is set, -44 FC?C returns 0 to level 1 and clears flag –44.
CF, FC?, FS? FS?C, SF

0/1

Command
Performs a full distribution of multiplication and division with respect to addition and subtraction
in a single step.

Access:!Ú REWRITE

Input:An expression.

Output:An equivalent expression that results from fully applying the distributive property ofmultiplication and division over addition and subtraction.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:Expand (X+1)(X-1)(X+2):
FDISTRIB((X+1)*(X-1)*(X+2))
X*(X*X)+2*(X*X)+(-(X*(1*X))+-(2*(1*X)))+ (X*(X*1)+2*(X*1)+(-(X*(1*1))+-(2*(1*1))))

See also:

FFT
Type:
Description:

DISTRIB
Command
Discrete Fourier Transform Command: Computes the one- or two-dimensional discrete Fouriertransform of an array.
If the argument is an N-vector or an N × 1 or 1 × N matrix, FFT computes the one-dimensionaltransform. If the argument is an M × N matrix, FFT computes the two-dimensional transform. M
and N must be integral powers of 2.
The one-dimensional discrete Fourier transform of an N-vector X is the N-vector Y where:
–1

Yk =

∑

n=0

2πi kn– --------------Xn e  , i =–1for k = 0, 1, …, N – 1.
The two dimensional discrete Fourier transform of an M × N matrix X is the M × N matrix Y
where:
M–1 –1

Y kl =∑∑ xm n2 πik m 2πi ln– ---------------- – -----------------e M e  ,i =–1

m=0 n=0

for k = 0, 1, …, M – 1 and l = 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 FFT command uses truncated 15-digit arithmetic and intermediate storage, then rounds theresult to 12-digit precision.
3-86 Full Command and Function ReferenceAccess:!´L FFT FFTInput/Output:( ´ is the left-shift of the Pkey).
Level 1/Argument 1[ array ]1
See also:

IFFT

FILER
Type:
Description:

CommandOpens File Manager.

Access:!¡Level 1/Item 1→[ array ]2( ¡ is the left-shift of the Gkey).

…µFILER
Input/Output: NoneFINDALARM
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).
…&9 ALRM FINDALARM
Flags:
Input/Output:

See also:

FINISHType:
Description:

Access:Flags:
Input/Output:
See also:

FIX
Type:
Description:!°LL TIME ALRM FINDALARM
Date Format (–42)( °is the left-shift of the Nkey).

Level 1/Argument 1

Level 1/Item 1

date

→

nindex{ date time }→nindex→nindex0
DELALARM, RCLALARM, STOALARM

CommandFinish Server Mode Command: Terminates Kermit Server mode in a device connected to thecalculator.
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.
…µFINISHI/O Device flag (–33), I/O Messages (–39), I/O Device for Wire (–78)
None
BAUD, CKSM, KGET, PARITY, PKT, RECN, RECV, SEND, SERVER
CommandFix 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

Access:

Fix mode shows n digits to the right of the fraction mark (decimal point), where 0 ≤ n ≤ 11.
(Values for n outside this range are rounded to the nearest integer.) A number is displayed orprinted as (sign) mantissa, where the mantissa can be of any form. However, the calculator
automatically displays a number in scientific mode if either of the following is true:• The number of digits to be displayed exceeds 12.
• A nonzero value rounded to n decimal places otherwise would be displayed as zero.
! & HFMT FIX!°LMODES FMT FIX( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Example:See also:

Level 1/Item 1→n
The number 103.6 in Fix mode to four decimal places would appear as 103.6000.
SCI, STDFLASHEVALType:
Command
Description:
Evaluate Flash Function Command: Evaluates unnamed Flash functions.
WARNING: Use extreme care when executing this function. Using
FLASHEVAL with random addresses will almost always cause a memory loss.
Do not use this function unless you know what you are doing.
Access:
Input/Output:#nfunction is of the form ffffbbbh, where bbb is the bank ID, and ffff is the function number.
…µFLASHEVAL
Level 1/Argument 1

Level 1/Item 1→

See also:#nfunction
EVAL, LIBEVAL, SYSEVAL

FLOOR
Type:
Description:

Function
Floor Function: Returns the greatest integer that is less than or equal to the argument.

Access:!´REAL LL FLOOR
Flags:
Numerical Results (–3)
Input/Output:( ´ is the left-shift of the Pkey).

Level 1/Argument 1

Example 1:
Example 2:
See also:

FONT6
Type:
Description:

Level 1/Item 1

x

→

n

x_unit→n_unit'symb'→'FLOOR(symb)'

3.2 FLOOR returns 3.
-3.2 FLOOR returns –4.
CEIL, IP, RND, TRNC

Function
Font Function: Returns the system FONT6 object. You use this in conjunction with the→FONT command to set the system font to type 6.

3-88 Full Command and Function ReferenceAccess:…µ FONT6
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

FONT7
Type:
Description:
Access:
Input/Output:

FONT7, FONT8, →FONT, FONT→
Function
Font Function: Returns the system FONT7 object. You use this in conjunction with the→FONT command to set the system font to type 7.
…µFONT7
Level 1/Argument 1

Level 1/Item 1→
See also:

FONT8
Type:
Description:
Access:
Input/Output:

Font object

FONT6, FONT8, →FONT, FONT→
Function
Font Function: Returns the system FONT8 object. You use this in conjunction with the→FONT command to set the system font to type 8.
…µ FONT8
Level 1/Argument 1

Level 1/Item 1→
See also:

Font object

Font object

FONT6, FONT7, →FONT, FONT→

FONT→
Type:
Function
Description:
Returns the current system font.
Access:…µ FONT→
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:
→FONT
Type:
Description:

Font object

FONT6, FONT7, FONT8, →FONT
FunctionSet font Function: Sets the system font. You use this in conjunction with one of the three fontcommands to set the system font. Valid input is any font object (TYPE 30) of size 6, 7, or 8.

Access:…µ →FONT
Input/Output:
Level 1/Argument 1

See also:

Font object
FONT6, FONT7, FONT8, FONT→

Level 1/Item 1→

Full Command and Function Reference 3-89

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 oftimes.
• 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 NEXTFOR 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 bereferenced 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 bereferenced 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 isautomatically 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/

Level 1

FOR xstart

xfinishExample:See also:

→
→

NEXT

Note:

Level 1/Item 1

FOR xstart

xfinish→STEP

xincrement

→

→
STEP
'symbincrement'
It should be noted that FOR inputs may also be integers (object type 28) and binary integers (type10). 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

3-90 Full Command and Function ReferenceFOURIERType:
Description:

Function

Access:Calculus !ÖDERIV. & INTEG.

Input:

Level 1/Argument 2: An expression in terms of the current variable
Level 2/Argument 1: The number, n, of the coefficient to return.

Output:

The nth Fourier coefficient 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).
Complex mode must be set, that is, flag –103 must be set.

Example:Returns the nth coefficient of a complex Fourier series expansion. The PERIOD variable must be in
the CAS directory, CASDIR, or in current path, and set to hold L, the period of the input
function. The expression is expanded in terms of the current CAS variable.

Obtain the Fourier coefficient as below, with the default value of 2π in the PERIOD variable in

CASDIR, and simplify it with EXPAND:

Command:FOURIER(X^2,0)
EXPAND(ANS(1))

Result:4/3* π^2

FP
Type:
Description:
Access:Flags:
Input/Output:

Function
Fractional Part Function: Returns the fractional part of the argument.
The result has the same sign as the argument.
!´REAL LFP( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 1/Argument 1xx_unit'symb'

Level 1/Item 1

→
→
→

y
y_unit'FP(symb)'

Example 1:
Example 2:
See also:-32.3 FP returns -.3.
32.3_m FP returns .3_m.
IP

FREE
Type:
Description:
Access:Command
Do not use this command, a carry-over from the HP 48SX for handling plug-in RAM cards.
…µ FREE

FREEZEType:
Description:

CommandFreeze Display Command: Freezes the part of the display specified by ndisplay area, so that it is not
updated until a key is pressed.
Normally, the stack display is updated as soon as the calculator is ready for data input. For
example, when HALT stops a running program, or when a program ends, any displayed messages
are cleared. The FREEZE command “freezes” a part or all of the display so that it is not updated
until a key is pressed. This allows, for example, a prompting message to persist after a program
halts to await data input.
ndisplay area is the sum of the value codes for the areas to be frozen:
Full Command and Function Reference 3-91

Access:
Input/Output:

Display Area

Value CodeStatus area

1

History/Stack/Command-line area

2

Menu area

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 thegraphics display, you must freeze the status and stack/command-line areas (by entering 3), or theentire display (by entering 7).
( °is the left-shift of the Nkey).
!°LOUT FREEZE
Level 1/Argument 1

ndisplayarea
Example 1:

Example 2:

Flags:
See also:

Level 1/Item 1→

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 thatthe 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, HALTFROOTSType:
Description:

CommandAccess: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.
See also:

FS?
Type:
Description:
Access:FCOEF
Command
Flag Set? Command: Tests whether the system or user flag specified by nflag number is set, andreturns 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).

3-92 Full Command and Function Reference

!° LMODES FLAG FS?
!& H FLAG FS?

( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1→

nflag number
See also:

FS?C
Type:
Description:
Access:Level 1/Item 1

0/1

CF, FC?, FC?C, FS?C, SF
Command
Flag Set? Clear Command: Tests whether the system or user flag specified by nflag number is set, andreturns a corresponding test result: 1 (true) if the flag is set or 0 (false) if the flag is clear. After
testing, clears the flag.
!°TEST LLFS?C( °is the left-shift of the Nkey).
!° LMODES FLAG FS?C

( °is the left-shift of the Nkey).

!& H FLAG FS?C
Input/Output:
Level 1/Argument 1

nflag number
Example:See also:

FUNCTION
Type:
Description:

Level 1/Item 1→

0/1

If flag –44 is set, -44 FS?C returns 1 to level 1 and clears flag –44.
CF, FC?, FC?C, FS?, SF
CommandFunction Plot Type Command: Sets the plot type to FUNCTION.
When the plot type is FUNCTION, the DRAW command plots the current equation as a realvalued 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 form:{ (xmin, ymin) (xmax, ymax) indep res axes ptype depend }For plot type FUNCTION, the elements of PPAR are used as follows:• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left cornerof 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 rightcorner 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 (theplotting range). 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 is0, 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 FUNCTION places
the name FUNCTION in PPAR.
• 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 andmaximum values of the independent variable (the plotting range) can be specified in indep;

Full Command and Function Reference 3-93

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

Plotting Action

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.

indep = constantA 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 theunits 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, thenumerical value of the independent variable is combined with the specified unit (inches in thisexample) 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
See also:
BAR, CONIC, DIFFEQ, FAST3D, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME,YSLICEFXND
Type:Command

Description:

Splits an object into a numerator and a denominator.

Access:Catalog, …µ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.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Return the numerator and the denominator of the following expression:2(x – 3)------------------z+4

Command:Result:See also:

FXND((X-3)^2/(Z+4)){(X-3)^2, Z+4}

EXLR

3-94 Full Command and Function Reference

GAMMAType:
Description:

Function
Evaluate the Γ function at the given point. For a positive integer x, Γ(x) is equal to (x +1)!
GAMMA differs from the FACT and ! functions because it allows complex arguments. The Γ
function is defined by
Γ(x ) = ∫+∞ – t
0

e ⋅t

x–1

dt

.

Access:
Input:
Output:Flags:!´LSPECIAL
A real or complex number, x.
Γ(x). If the input x is an integer greater than 100, returns the symbolic expression GAMMA(x).
If the Underflow Exception (–20) or Overflow Exception (–21) flags are set then underflow or
overflow conditions give errors, otherwise they give zero or the maximum real number the
calculator can express.
Complex mode must be set (flag –103 set) if x is complex.

See also:

FACT, PSI, Psi, !

GAUSS
Type:
Description:

CommandReturns the diagonal representation of a quadratic form.

Access:Matrices, !Ø

Input:

Level 2/Argument 1: The quadratic form.
Level 1/Argument 2: A vector containing the independent variables.

Output:Level 4/Item 1: An array of the coefficients of the diagonal.
Level 3/Item 2: A matrix, P, such that the quadratic form is represented as PTDP, where thediagonal matrix D contains the coefficients of the diagonal representation.
Level 2/Item 3: The diagonal representation of the quadratic form.
Level 1/Item 4: The vector of 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 Gaussian symbolic quadratic form of the following:

QUADRATIC FORM2

x + 2axyCommand:Result:GAUSS(X^2+2*A*X*Y,[X,Y]){[1,-A^2], [[1,A][0,1]], -(A^2*Y^2)+(A*Y+X)^2,[X,Y]}

See also:

AXQ, QXAGBASISType:
Description:

CommandReturns a set of polynomials that are a Grœbner basis G of the ideal I generated from an input setof polynomials F.

Access:Catalog, …µInput:

Level 2/Argument 1: A vector F of polynomials in several variables.
Level 1/Argument 2: A vector giving the names of the variables.

Output:Level 1/Item 1: A vector containing the resulting set G of polynomials. The command attempts
to order the polynomials as given in the vector of variable names.

Full Command and Function Reference 3-95

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 Grœbner basis of the ideal polynomial generated by the polynomials:
x2 + 2xy2, xy + 2y3 – 1

Command:Result: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.

See also:

GREDUCE

GCD
Type:
Description:

Function

Access:Arithmetic, !ÞPOLY L

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 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)

See also:

GCDMOD, EGCD, IEGCD, LCM

GCDMOD
Type:

Function

Description:

Finds the greatest common divisor of two polynomials modulo the current modulus.

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).

Example:Command:Result:Find the greatest common divisor of 2x^2+5 and 4x^2-5x, modulo 13.
GCDMOD(2X^2+5,4X^2-5X)

See also:

GCD

GET
Type:
Description:

Returns the greatest common divisor of two objects.

33-(4X-5)

CommandGet 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.

3-96 Full Command and Function ReferenceAccess:!°LIST ELEMENTS GETInput/Output:

Example 1:
Example 2:
Example 3:
See also:

GETI
Type:
Description:

Access:Flags:( °is the left-shift of the Nkey).

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1[[ matrix ]]nposition→zget[[ matrix ]]{ nrow, mcolumn }

→

zget

'namematrix'

nposition→

zget'namematrix'{ nrow, mcolumn }

→

zget

[ vector ]nposition→zget[ vector ]{nposition }

→

zget

'namevector'

nposition→

zget'namevector'{nposition }

→

zget

{ list }nposition→

objget{ list }{nposition }→objget'namelist'

nposition→

objget→'namelist'{nposition }objget[[ 2 3 7 ][ 3 2 9 ][ 2 1 3 ] { 2 3 } GET returns 9.
[[ 2 3 7 ][ 3 2 9 ][ 2 1 3 ] 8 GET returns 1.
{ A B C D E } { 1 } GET returns 'A'.
GETI, PUT, PUTI
CommandGet and Increment Index 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 inargument 2/level 1, along with the first (level 2) argument and the next position in that argument.
For matrices, the position is incremented in row order.
!°LIST ELEMENTS GETI
( °is the left-shift of the Nkey).
Index Wrap Indicator (–64)

Full Command and Function Reference 3-97

Input/Output:
L2/A1

L1/A2

L3/I1

L2/I2

L1/I3

[[ matrix ]]nposition1→[[ matrix ]]nposition2zget[[ matrix ]]{ nrow, mcolumn }1→[[ matrix ]]{ nrow, mcolumn }2zget'namematrix'

nposition1→'namematrix'

nposition2

zget'namematrix'{ nrow, mcolumn }1→'namematrix'{ nrow, mcolumn }2zget[ vector ]nposition→[ vector ]nposition2zget[ vector ]{nposition1 }→[ vector ]{nposition2 }zget'namevector'

nposition1→'namevector

nposition2

zget'namevector'{nposition1 }→'namevector{nposition2 }zget{ list }nposition1→{ list }nposition2

objget{ list }{nposition1 }→{ list }{nposition2 }objget'namelist'

nposition1→'namelist'

nposition2

objget'namelist'{nposition1 }→'namelist'{nposition2 }objget

L = Level; A = Argument; I = Item

See also:

GOR
Type:
Description:

Access:
Input/Output:

See also:

GRAD
Type:
Description:

Access:

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 portionof the argument graphics object.
If the first argument (stack level 3) is any graphics object other than PICT, then grobresult isreturned 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

→

grobresult

grobtarget(x, y)

grob1→

grobresult

PICT{ #n #m }

grob1

→

(x, y)

grob1

→

PICT
GXOR, REPL, SUB

Level 1/Item 1

CommandGrads Mode Command: Sets Grads angle mode.
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, andreal-number results that represent angles are expressed in grads.
!&HANGLE GRAD…µ GRAD

3-98 Full Command and Function ReferenceInput/Output: None
See also:
DEG, RADGRAMSCHMIDTType:
Command
Description:
Finds an orthonormal base of a vector space with respect to a given scalar product.
Access:Matrices, !Ø LVECTOR

Input:

Level 2/Argument 1: A vector representing a basis of a vector space.
Level 1/Argument 2: A function that defines a scalar product in that space. This can be given as aprogram, or as the name of a variable containing the definition of the function.

Output:An orthonormal base of the vector space with respect to the given scalar product.

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 an orthonormal base for the vector space with base [1, 1+X] with respect to the scalar
product defined by :1

P ⋅ Q = ∫ P ( x ) ⋅ Q ( x ) dx
–1

Command:Result:

GRAPH
Type:
Description:

GRAMSCHMIDT([1,1+X], « → P Q « PREVAL(INTVX(P*Q),-1,1) » »)1
X------- -------------1
2 --- ⋅ 6
3

CommandPicture Environment Command: Selects the Picture environment
GRAPH is provided for compatibility with the HP 28 series. GRAPH is the same as PICTURE;
see its listing for details.

GREDUCEType:

Command

Description:

Reduces a polynomial with respect to a Grœbner basis.

Access:Catalog, …µInput:

Level 3/Argument 1: A vector of polynomials in several variables.
Level 2/Argument 2: A vector of polynomials that is a Grœbner basis in the same variables.
Level 1/Argument 3: A vector giving the names of the variables.

Output:Level 1/Item 1: A vector containing the input polynomial reduced with respect to the Grœbner
basis, up to a constant; as with GBASIS, fractions in the result are avoided.

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:Reduce the polynomial:
x2y – xy – 1
with respect to the Grœbner basis (obtained in the example for GBASIS):x, 2y3 – 1

Command:

GREDUCE(X^2*Y–X*Y–1, [X,2*Y^3–1], [X,Y])

Full Command and Function Reference 3-99

Result:
See also:-1

Note this is the remainder of the input polynomial modulo the term x in the Grœbner basis
GBASISGRIDMAPType:
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 thegraph.
• 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 followingform:{ (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 is0, 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
See also:
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 theargument 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Input/Output:
Level 2/Argument 1

Level 1/Argument 2

obj

ncharsize

Level 1/Item 1

→

grob

Example:This program:« 'Y=3*X^2' 0 →GROB PICT STO { } PVIEW »returns a graphics object to the stack representing the Equation Writer application picture of'Y=3*X^2', then stores the graphics object in PICT and shows it in the graphics display withscrolling activated.

See also:→LCD, LCD→

GROB
Type:
Description:
Access:CommandEnters GROB on the command line to help with the manual entry of a graphic object.
…µGROBGROBADDType:
Description:

Command
Combines two graphic objects by appending the second argument onto the bottom of the first.

Access:PGRAPH GROBADD!ÖGRAPH GROBADD( Ö is the left-shift of the 4key).

Input/Output:

GXOR
Type:
Description:

Level 2/Argument 1

Level 1/Argument 2

GROB1

GROB2

→

GROB3

Command
Graphics Exclusive 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.
GXOR is used for creating cursors, for example, to make the cursor image appear dark on a lightbackground and light on a dark background. Executing GXOR again with the same image
restores the original picture.
GXOR uses a logical exclusive OR to determine the state of the pixels (on or off) in theoverlapping portion of the argument graphics objects.
Any portion of grob1 that extends past grobtarget or PICT is truncated.
If the first (level 3) argument (the target graphics object) is any graphics object other than PICT,
then grobresult is returned to the stack. If the first (level 3) argument is PICT, no result is returned tothe stack.

Access:!°L GROB GXOR
Input/Output:

Example:Level 1/Item 1( °is the left-shift of the Nkey).

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

grobtarget
grobtarget
PICT
PICT

{ #n, #m }(x, y){ #n, #m }(x, y)

grob1
grob1
grob1
grob1

Level 1/Item 1

→
→
→
→

grobresult
grobresult

This program:« ERASE PICT NEG PICT { # 0d # 0d }Full Command and Function Reference 3-101

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 atpixel 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.

See also:*H
Type:
Description:

GOR, REPL, SUB
CommandMultiply Height Command: Multiplies the vertical plot scale by xfactor. *H is provided forcompatibility with the HP 48. *H is the same as SCALEH; see its listing for details.

HADAMARDType:
Command
Description:
Performs an element by element multiplication of two matrices (Hadamard product).
Access:Matrices, !Ø OPERATIONS L

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).

Example:Find the Hadamard product of the following two matrices:3 –1 20 1 4

Command:Result:HALFTANType:
Description:

and

2 3 0
1 5 2

HADAMARD([[3,-1,2][0,1,4]],[2,3,0][1,5,2]])[[6,-3,0][0,5,8]]

CommandTransforms an expression by replacing sin(x), cos(x) and tan(x) subexpressions with tan(x/2)
terms.

Access:Trigonometry, …Ñor P TRIG

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).

See also:

TAN2CS2, TAN2SC2

HALT
Type:
Description:

CommandHalt Program Command: Halts program execution.
Program execution is halted at the location of the HALT command in the program. The HLTannunciator 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Access:!°LL RUN & DEBUG HALT
Input/Output: None
See also:
CONT, KILL

HEAD
Type:
Description:
Access:( °is the left-shift of the Nkey).

CommandFirst Listed Element Command: Returns the first element of a list or string.
!°LCHARS LHEAD!°LIST ELEMEN LHEAD( °is the left-shift of the Nkey).
( °is the left-shift of the Nkey).

…± LHEAD(± is the right-shift of the Nkey).

Input/Output:
Level 1/Argument 1{ obj1, ... ,objn }Example 1:
Example 2:

See also:

Level 1/Item 1

→

obj1

→
“string”“element1”"Dead" HEAD returns "D".
The following program takes a list of coordinates { A B C } that define a right triangle, and finds
the length of the hypotenuse AC:« DUP HEAD SWAP REVLIST HEAD - ABS »For example, entering { (0,0) (0,3) (3,4) } returns 5.
TAIL

HEADER→Type:
Command
Description:
Header size: Returns the current size of the header in lines.
Access:…µHEADER→
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

Header size

→HEADER→HEADERType:
Command
Description:
Header size: Sets the current size of the header in lines: to 0, 1, or 2 lines.
Access:…µ→HEADER
Input/Output:
Level 1/Argument 1

Header size
See also:

HEADER→

HELP
Type:
Description:

CommandAccess:See also:

Level 1/Item 1→

Similar to CASCMD, displays a list of CAS operations. Selecting one with OK displays help for it,
an example of the operation, and the option to copy the example to the command line. Moredetails are given in Appendix C and Appendix H of the User’s Guide.
Catalog, …µ, or tools IL
CASCMD
Full Command and Function Reference 3-103

HERMITE
Type:Description:

Function

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:See also:

Find the Hermite polynomial with degree 4.

HESS
Type:
Description:

Returns the nth Hermite polynomial.

HERMITE(4)16*X^4-48*X^2+12

LEGENDRE, TCHEBYCHEFF
CommandReturns the Hessian matrix and the gradient of an expression with respect to the specified
variables.

Access:Calculus !ÖDERIV & INTEG

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.

Command:Result:See also:

HEX
Type:
Description:

HESS(T^2+2*T*U^2, [T, U]){[[2, 2*(2*U)], [2*(2*U), 2*(2*T)]], [2*T+2*U^2, 2*T*(2*U)], [T, U]}

CURL, DIV

Access:Command
Hexadecimal Mode Command: Selects hexadecimal base for binary integer operations. (Thedefault base is decimal.)
Binary integers require the prefix #. Binary integers entered and returned in hexadecimal baseautomatically show the suffix h. If the current base is not hexadecimal, then you can enter ahexadecimal number by ending it with h. It will be displayed in the current base when it isentered.
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).

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Input/Output: None
See also:
BIN, DEC, OCT, RCWS, STWSHILBERT
Type:
Description:

CommandAccess:Matrices, !Ø CREATE Lor !´ MATRX MAKE LL

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)Result:See also:

Returns a square Hilbert matrix of the specified order.

1 1
1 --- --2 3
1 1 1--- --- --2 3 4
1 1 1--- --- --3 4 5CON, IDN, RANM, VANDERMONDEHISTOGRAM
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 fromone 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 cornerof 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 rightcorner 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 nameand 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 ofthe 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

• depend is a name specifying a label for the vertical axis. The default value is Y.
The frequency of the data is plotted as bars, where each bar represents a collection of data points.
The base of each bar spans the values of the data points, and the height indicates the number ofdata points. The width of each bar is specified by res. The overall maximum and minimum values
for the data can be specified by indep; otherwise, the values in (xmin, ymin) and (xmax, ymax) are used.

Access:…µ HISTOGRAM
Input/Output: None
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, PARAMETRIC, PARSURFACE,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICEHISTPLOTType:
Description:

Command
Draw Histogram Plot Command: Plots a frequency histogram of the specified column in thecurrent statistics matrix (reserved variable ΣDAT).
The data column to be plotted is specified by XCOL and is stored as the first parameter in thereserved variable ΣPAR. If no data column is specified, column 1 is selected by default. The y-axis
is autoscaled and the plot type is set to HISTOGRAM.
HISTPLOT plots relative frequencies, using 13 bins as the default number of partitions. The RES
command lets you specify a different number of bins by specifying the bin width. To plot afrequency histogram with numerical frequencies, store the frequencies in ΣDAT and execute BINS
and then BARPLOT.
When HISTPLOT 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 issubsequently executed.
Access:…µ HISTPLOT
Input/Output: None
See also:
BARPLOT, BINS, FREEZE, PICTURE, PVIEW, RES, SCATRPLOT, XCOL

HMS–
Type:
Description:

Access:Command
Hours-Minutes-Seconds Minus Command: Returns the difference of two real numbers, where thearguments and the result are interpreted in 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 (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 thedecimal fractional part of seconds.
…ÓTools LHMS–( Ó is the right-shift of the 9 key).
…& 9LHMS–

Input/Output:
Level 2/Argument 1

See also:

HMS+
Type:
Description:

Level 1/Argument 2

HMS1
HMS→, →HMS, HMS+

HMS2

Level 1/Item 1→

HMS1 – HMS2

Command
Hours-Minutes-Seconds Plus Command: Returns the sum of two real numbers, where thearguments and the result are interpreted in hours-minutes-seconds format.

3-106 Full Command and Function ReferenceAccess:

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 thedecimal fractional part of seconds.
…ÓTools LHMS+( Ó is the right-shift of the 9 key).
…& 9LHMS+

Input/Output:
Level 2/Argument 1

See also:

HMS→
Type:
Description:

Access:Level 1/Argument 2

HMS1
HMS→, →HMS, HMS–

HMS2

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 thedecimal fractional part of seconds.
…ÓTools L HMS→( Ó is the right-shift of the 9 key).
…&9L HMS→

Input/Output:
Level 1/Argument 1

HMS
See also:

→HMS
Type:
Description:

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 thedecimal fractional part of seconds.
…ÓTools L→HMS( Ó is the right-shift of the 9 key).
…&9L→HMS

Input/Output:
Level 1/Argument 1x
See also:

Level 1/Item 1→

HMS

HMS→, HMS+, HMS–

Full Command and Function Reference 3-107

HOME
Type:
Description:
Access:Command
HOME Directory Command: Makes the HOME directory the current directory.
…µ HOME!& J
Input/Output: None
See also:
CRDIR, PATH, PGDIR, UPDIRHORNER
Type:
Description:

Command
Executes a Horner scheme on a polynomial. That is, for a given polynomial P, and a number r,
HORNER returns QUOT(P/(x–r)), r and also P(r)Access:Arithmetic, !ÞPOLY L

Input:

Level 2/Argument 1: A polynomial, P.
Level 1/Argument 2: A number, r.

Output:Level 3/Item 1: QUOT(P/(x–r))
Level 2/Item 2: r
Level 1/Item 3: P(r), the remainder of the division process.

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:For r = 3, find the result of executing a Horner scheme on the following polynomial:
2

x +x+1

Command:Results:i
Type:
Description:
Access:Flags:
Input/Output:

HORNER(X^2+X+1,3)(X+4,3,13)

Function
i Function: Returns the symbolic constant i or its numerical representation, (0, 1).
!¥(¥is the left-shift of the Ikey).
Symbolic Constants (–2), Numerical Results (–3)
Level 1/Argument 1

Level 1/Item 1

→

'i'

→

(0,1)

See also:e, MAXR, MINR, π

IABCUVType:
Description:

CommandReturns a solution in integers u and v of au + bv = c, where a, b, and c are integers.

Access:Arithmetic, !ÞINTEGER

Input:

Level 3/Argument 1: the value of a.
Level 2/Argument 2: the value of b.
Level 1/Argument 3: the value of c.

3-108 Full Command and Function Reference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

Command:Result:IABCUV(6,11,3){6,-3}

See also:

ABCUV, IEGCDIBASISType:
Description:

CommandAccess: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:See also:

Find a vector of a basis of the intersection of the vector sub-spaces defined by [1, 2] and [2, 4]

Determines the basis of the intersection between two vector spaces.

IBASIS({[1,2]}, {[2,4]}){[1,2]}

BASIS

IBERNOULLIType:
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 greaterthan about 40 the calculation can take a long time.

Flags:

Numeric mode must not be set (flag –3 clear).

IBP
Type:
Description:

Command
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

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:Use integration by parts to calculate the following:∫ x cos ( x ) dx
Command 1: Apply the IBP command in RPN mode:
Level 2: X*COS(X)
Level 1: SIN(X)
Result:Level 2: SIN(X)*X
Level 1: -SIN(X)
Command 2: Apply the INTVX command to level 1, -SIN(X)
Result:Level 2: SIN(X)*X
Level 1: COS(X)
Command 3: Press + to add the result to the value at level 2 to obtain the final result.
SIN(X)*(X)+COS(X)
Result:See also:

INTVX, INT, PREVAL, RISCH

ICHINREM
Type:

Command

Description:

Solves a system of two congruences in integers using the Chinese Remainder theorem.

Access:Arithmetic, !ÞINTEGER

Input:

Level 2/Argument 1: A vector of the first value and the modulus.
Level 1/Argument 2: A vector of the second value and the modulus.

Output:A vector of the solution.

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:Solve the following system of congruences:x ≡ 2 Modulo 3
x ≡ 1 Modulo 5

Command:Results:
See also:

ICHINREM([2,3],[1,5])

IDN
Type:
Description:[-4, 15]

CHINREM
Command
Identity Matrix Command: Returns an identity matrix; that is, a square matrix with its diagonal
elements equal to 1 and its off-diagonal elements equal to 0.
The result is either a new square matrix, or an existing square matrix with its elements replaced by
the elements of the identity matrix, according to the argument.
• Creating a new matrix: If the argument is a real number n, a new real identity matrix is returned,
with its number of rows and number of columns equal to n.
• Replacing the elements of an existing matrix: If the argument is a square matrix, an identity
matrix of the same dimensions is returned. If the original matrix is complex, the resulting
identity matrix will also be complex, with diagonal values (1,0).

3-110 Full Command and Function Reference• If the argument is a name, the name must identify a variable containing a square matrix. In thiscase, the elements of the matrix are replaced by those of the identity matrix (complex if theoriginal matrix is complex).

Access:!Ø( Ø is the left-shift of the 5key).

CREATE IDN!´MATRIX MAKE IDN( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

Level 1/Item 1

→
→
→

n
[[ matrix ]]'name'[[ R-matrixidentity ]][[ matrixidentity ]][[ matrixidentity ]]See also:

CON

IDIV2
Type:

Command

Description:

For two integers, a and b, returns the integer part of a/b, and the remainder, r.

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).

Example:Command:Result:See also:

Return the integer part and the remainder of 11632/864.

IEGCD
Type:
Description:

IDIV2(11632,864){13,400}

DIV2, IQUOT
Command
Given two integers x and y, returns three integers, a, b, and c, such that:ax+by=cwhere c is the GCD of x and y.

Access:PARITH or Arithmetic, !ÞINTEGER

Input:

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.
IEGCD(18,24){6,-1,1}

Full Command and Function Reference 3-111

See also:

IF
Type:
Description:

ABCUV, EGCD, IABCUV
Command Operation
IF Conditional Structure Command: Starts IF … THEN … END and IF … THEN … ELSE …
END conditional structures.
Conditional structures, used in combination with program tests, enable a program to make decisions.
• IF … THEN … END executes a sequence of commands only if a test returns a nonzero (true)
result. The syntax is:
IF test-clause THEN true-clause END

IF begins the test clause, which must return a test result to 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.
• IF … THEN … ELSE … END executes one sequence of commands if a test returns a true(nonzero) result, or another sequence of commands if that test returns a false (zero) result. The
syntax is:
IF test-clause THEN true-clause ELSE false-clause END

IF begins the test clause, which must return a test result to the stack. THEN removes the test
result from the stack. If the value is nonzero, the true clause is executed. Otherwise, the false
clause is executed. After the appropriate clause is executed, execution resumes following END.
In RPL mode, 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 is automatically evaluated to a number(→NUM or EVAL isn’t necessary).
Access:!°BRANCH IF
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1

Level 1/Item 1

→

IF
THEN

T/F

→

T/F

→

END
IF
THEN
ELSE
See also:

IFERR
Type:
Description:

END
CASE, ELSE, END, IFERR, THEN→→

Command
If Error Conditional Structure Command: Starts IFERR … THEN … END and IFERR …
THEN … ELSE … END error trapping structures.
Error trapping structures enable program execution to continue after a “trapped” error occurs.
• IFERR … THEN … END executes a sequence of commands if an error occurs. The syntax of
IFERR … THEN … END is:
IFERR trap-clause THEN error-clause END

If an error occurs during execution of the trap clause:
1 The error is ignored.
2 The remainder of the trap clause is discarded.
3-112 Full Command and Function Reference3 The key buffer is cleared.
4 If any or all of the display is “frozen” (by FREEZE), that state is cancelled.
5 If Last Arguments is enabled, the arguments to the command that caused the error are

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

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:See also:

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
CommandInverse 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

1
X n = ---- ∑ Y k 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 theresult to 12-digit precision.

Full Command and Function Reference 3-113

Access:!´LFFT IFFT
Input/Output:( ´ is the left-shift of the Pkey).
Level 1/Argument 1

Level 1/Item 1→[ array ]1
See also:

IFT
Type:
Description:

FFT
Command
IF-THEN Command: Executes obj if T/F is nonzero. Discards obj if T/F is zero.
IFT lets you execute in stack syntax the decision-making process of the IF … THEN … END
conditional structure. The “true clause” is obj in argument 2 (level 1).

Access:!°BRANCH IFT
Input/Output:
Level 2/Argument 1

Example:See also:

IFTE
Type:
Description:

Access:
Input/Output:

Example 2:
See also:

ILAP
Type:
Description:( °is the left-shift of the Nkey).
Level 1/Argument 2

Level 1/Item 1

→
T/F
obj
It depends!
« X 0 > "Positive" IFT » puts "Positive" in level 1 if X contains a positive
real number.
IFTE
Function
IF-THEN-ELSE Function: Executes the obj in argument 2 or level 2 if T/F is nonzero. Executes
the obj in argument 3 or level 1 if T/F is zero.
IFTE lets you execute in stack syntax the decision-making process of the IF … THEN … ELSE
… END conditional structure. The “true clause” is objtrue in argument 2 or level 2. The “false
clause” is objfalse in argument 3 or level 1.
IFTE is also allowed in algebraic expressions, with the following syntax:
IFTE(test,true-clause,false-clause)
When an algebraic containing IFTE is evaluated, its first argument test is evaluated to a test result.
If it returns a nonzero real number, true-clause is evaluated. If it returns zero, false-clause is evaluated.
!°BRANCH LIFTE( °is the left-shift of the Nkey).
Level 3/Argument 1

Example 1:[ array ]2Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1→
T/F
objtrueobjfalse
It depends!
The command sequence X 0 Š "Positive" "Negative" IFTE leaves"Positive" on the stack if X contains a non-negative real number, or "Negative" if
X contains a negative real number.
The algebraic 'IFTE(X‹0,SIN(X)/X,1)' returns the value of sin(x)/x, even for x = 0,
which would normally cause an Infinite Result error.
IFT
Function
Returns the inverse Laplace transform of an expression. The expression must evaluate to arational fraction.

3-114 Full Command and Function ReferenceAccess:

Calculus, !ÖDIFFERENTIAL EQNS

Input:

A rational expression.

Output:

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:See also:

ILAP(1/(X-5)^2)

IM
Type:
Description:

Access:Flags:
Input/Output:

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 theimaginary 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

Level 1/Item 1

x

→

0

(x, y)→y[ R-array ]→[ R-array ][ C-array ]→[ R-array ]'symb'→'IM(symb)'

See also:

C→R, RE, R→C

IMAGE
Type:
Description:

CommandAccess:Matrices, !Ø LINEAR APPL

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).

Computes the basis of the image (also called the range) of a linear application f.

Find the image of

112
213
314

Example:Command:Result:IMAGE([1,1,2] [2,1,3] [3,1,4])

See also:

BASIS, KER{[1,0,-1] [0,1,2]}

Full Command and Function Reference 3-115

INCR
Type:
Description:
Access:
Input/Output:

CommandIncrement Command: Takes a variable, adds 1, stores the new value back into the originalvariable, and returns the new value.
The value in name must be a real number or an integer.
!°MEMORY ARITHMETIC INCR ( °is the left-shift of the Nkey).
Level 1/Argument 1

Example:See also:

INDEP
Type:
Description:

Level 1/Item 1→'name'
If 35.7 is stored in A, 'A' INCR returns 36.7.
DECR

xincrement

Command
Independent Variable Command: Specifies the independent variable and its plotting range.
The specification for the independent variable name and its plotting range is stored as the thirdparameter in the reserved variable PPAR. If the argument to INDEP is a:• Global variable name, that name replaces the independent variable entry in PPAR.
• List containing a global name, that name replaces the independent variable name but leaves
unchanged any existing plotting range.
• List containing a global name and two real numbers, that list replaces the independent variableentry.
• List containing two real numbers, or two real numbers from levels 1 and 2, those two numbers
specify a new plotting range, leaving the independent variable name unchanged. (LASTARG
returns a list, even if the two numbers were entered separately.)
The default entry is X.

Access:…µ INDEP
Input/Output:
Level 2/Argument 1

Level 1/Argument 2'global'→{ global }→{ global xstart xend }→{xstart xend }

→

xend

→

xstartSee also:

INFORMType:
Description:

Level 1/Item 1

DEPND
CommandUser-Defined Dialog Box Command: Creates a user-defined input form (dialog box).
INFORM creates a standard dialog box based upon the following specifications:
Variable“title”

Function

Title. This appears at the top of the dialog box.

3-116 Full Command and Function ReferenceVariable

Function{s1 s2 … sn}

Field definitions. A field definition (sx) can have two formats: “label”, a fieldlabel, 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 arevalid. 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.

formatField 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 optionallyspecifies 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 thelist 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.

If you exit the dialog box by selecting OK or `, INFORM returns the field values { vals } initem 1 or level 2, and puts a 1 in item 2 or level 1. (If a field is empty, NOVAL is returned as aplace holder.) If you exit the dialog box by selecting CANCEL or B, INFORM returns 0.
Access:!°LIN INFORM
Input/Output:( °is the left-shift of the Nkey).

L5/A1

L4/A2

L 3 A3

L2/A4

L1/A5

L2/I1

L1/I2

“title”{s1 s2 ... sn }format{resets }{init }

→ { vals }1“title”{s1 s2 ... sn }format{resets }{init }→

0

L = Level; A = Argument; I = item

Example:See also:

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 tostack operations.
When INPUT is executed, the stack or history area is blanked and program execution issuspended 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

Access:
Input/Output:

In its general form, the second argument (level 1) for INPUT is a list that specifies the content
and interpretation of the command line. The list can contain one or more of the following
parameters, in any order:• "command-line prompt", whose contents are placed on the command line for prompting when the
program pauses.
• Either a real number, or a list containing two real numbers, that specifies the initial cursor position on
the command line:– A real number n at the nth character from the left end of the first row (line) of the commandline. A positive n specifies the insert cursor; a negative n specifies the replace cursor. 0 specifies
the end of the command-line string.
– A list that specifies the initial row and column position of the cursor: the first number in thelist specifies a row in the command line (1 specifies the first row of the command line); thesecond number counts by characters from the left end of the specified line. 0 specifies the endof the command-line string in the specified row. A positive row number specifies the insert
cursor; a negative row number specifies the replace cursor.
• One or more of the parameters ALG, α, or V, entered as unquoted names:– ALG activates Algebraic/Program-entry mode.
– α specifies alpha lock.
– V verifies if the characters in the result string "result", without the " delimiters, compose avalid object or objects. If the result-string characters do not compose a valid object or objects,
INPUT displays the Invalid Syntax warning and prompts again for data.
You can choose to specify as few as one of the argument 2 (level 1) list parameters. The default
states for these parameters are:
• Blank command line.
• Insert cursor placed at the end of the command-line prompt string.
• Program-entry mode.
• Result string not checked for invalid syntax.
If you specify only a command-line prompt string for the second argument (level 1), you don’t
need to put it in a list.
!°LIN INPUT( °is the left-shift of the Nkey).
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1“stack prompt”“command-line prompt”→“result”“stack prompt”{ listcommand-line }→“result”

See also:

PROMPT, STR→

INT
Type:
Description:

Function

Access:Catalog, …µInput:

Level 3/Argument 1: A function.
Level 2/Argument 2: The variable to obtain the derivative with respect to.
Level 1/Argument 3: The point at which to calculate the antiderivative. This point can be avariable or an expression.

Output:

The antiderivative of the function for the given variable, at the point you specified.

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).

Calculates the antiderivative of a function for a given variable, at a given point.

3-118 Full Command and Function ReferenceExample:
Command:Result:Find the integral of sin(x) with respect to x, at the point where x=y.

See also:

INTVX, RISCH

INTEGERType:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, MAIN, MATHS, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

INTVX
Type:
Description:

Function

Access:Calculus, !Öor P CALC or !Ö DERIV. & INTEG L

Input:An expression.

Output:

The antiderivative 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 antiderivative of the following:

INT(SIN(X),X,Y)-COS(Y)

Displays a menu or list of CAS integer operations.

Finds the antiderivative of a function symbolically, with respect to the current default variable.

2

x ln xCommand:Result:See also:

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  ---------------22, 2
x +y x +y 

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.
Access:Flags:

Y
Numerical Results (–3)

Full Command and Function Reference 3-119

Input/Output:
Level 1/Argument 1

Level 1/Item 1

z

→

1/z

[[ matrix ]]→[[ matrix ]]–1

'symb'→'INV(symb)'

x_unit→1/x_1/unit

See also:

SINV, /INVMODType:
Description:

Function

Access:Arithmetic, !ÞMODULO L

Input:

An object.

Output:

The modular inverse of the object.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Solve the following for x, modulo the default modulus, 13.

Command:Result:IP
Type:
Description:
Access:Flags:
Input/Output:

Performs modular inversion on an object modulo the current modulus.

( 2x ≡ 1 )INVMOD(2)-6Function
Integer Part Function: Returns the integer part of its argument.
The result has the same sign as the argument.
( ´ is the left-shift of the Pkey).
!´ REALL IP
Numerical Results (–3)
Level 1/Argument 1

Example:See also:

IQUOT
Type:
Description:

Level 1/Item 1

x

→

n

x_unit→n_unit'symb'
32.3_m IP returns 32_m.
FP→'IP(symb)'

Function
Returns the integer quotient (or Euclidean quotient) of two integers. That is, given two integers, aand b, returns the integer q, such that:a = qb + r, and 0 ≤ r < b

Access:PARITH or Arithmetic, !ÞINTEGER L

Input:

Level 2/Argument 1: The dividend.
Level 1/Argument 2: The divisor.

Output:

The integer quotient.

3-120 Full Command and Function Reference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).

See also:

QUOT, IDIV2

IREMAINDER
Type:
Function
Description:
Returns the remainder of an integer division.
Access:PARITH or Arithmetic, !ÞINTEGER L

Input:

Level 2/Argument 1: The numerator.
Level 1/Argument 2: The denominator.

Output:

The remainder.

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).
IDIV2

See also:

ISOL
Type:
Description:

Access:Flags:
Input/Output:

Command
Isolate Variable Command: Returns an algebraic symb2 that rearranges symb1 to “isolate” the firstoccurrence of variable global.
The result symb2 is an equation of the form global = expression. If global appears more than once,
then symb2 is effectively the right side of an equation obtained by rearranging and solving symb1 toisolate the first occurrence of global on the left side of the equation.
If symb1 is an expression, it is treated as the left side of an equation symb1 = 0.
If global appears in the argument of a function within symb1, that function must be an analytic
function, that is, a function for which the calculator provides an inverse. Thus ISOL cannot solve
IP(x)=0 for x, since IP has no inverse.
ISOL is identical to SOLVE.
!ÎISOL( Îis the left-shift of the 7key).
Principal Solution (–1), Numerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1→

See also:'symb1''global'COLCT, EXPAN, QUAD, SHOW, SOLVE'symb2'

ISOM
Type:

Command

Description:

Determine the characteristics of a 2-d or 3-d linear isometry.

Access:Matrices, !Ø LINEAR APPL

Input:A square matrix representing a linear isometry.

Output:A vector and/or an angle that represent the symmetry of the matrix, and 1 (for a direct isometry)or –1 (for an indirect 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).

Full Command and Function Reference 3-121

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 indirectisometry.
1 – 3--- ---------2 2

Example 2:
Command:Result:Analyze the isometry given by the matrix3------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.

See also:

MKISOM

ISPRIME?
Type:
Description:

Function
Tests if a number is prime. For numbers of the order of 1014 or greater (to be exact, greater than341550071728321), 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:PARITH or Arithmetic, !ÞINTEGER L

Input:

An object that evaluates to an integer or a whole real number.

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).

See also:

NEXTPRIME, PREVPRIME

I→R
Type:
Description:
Access:Flags:
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.

See also:→NUM, R→I, XNUMJORDANType:
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vector or a list of Jordan chains, each of them ending with an "Eigen:"-tagged eigenvector).
Level 1/Item 4: An array of the eigenvalues, with multiplicities
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:Perform the following diagonalization:
JORDAN([1,1][1,1]){X^2-2*X,
X^2-2*X,{0: [1,-1]}, 2: [1,1]}[0,2]}KER
Type:
Description:

CommandAccess:Matrices, !Ø LINEAR APPL

Input:A matrix representing a linear application f in terms of the standard basis.

Output:A list of vectors representing a basis of the kernel (also called the nullspace) of f.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Computes the basis of the kernel of a linear application f.

Find the kernel of

112
213
314

Example:Command:Result:KER([1,1,2][2,1,3][3,1,4])

See also:

BASIS, IMAGE

KERRM
Type:
Description:

Access:
Input/Output:{[1,1,-1]}

Command
Kermit Error Message Command: Returns the text of the most recent Kermit error packet.
If a Kermit transfer fails due to an error packet sent from the connected Kermit device to thecalculator, then executing KERRM retrieves and displays the error message. (Kermit errors not inpackets are retrieved by ERRM rather than KERRM.)…µ KERRM
Level 1/Argument 1

Level 1/Item 1→
See also:

KEY
Type:
Description:“error message”

FINISH, KGET, PKT, RECN, RECV, SEND, SERVER
Command
Key Command: Returns a test result and, if a key is pressed, returns the row-column location xn mof that key.
KEY returns a false result (0) to item 2 (stack level 1) until a key is pressed. When a key is pressed,
it returns a true result (1) to item 2 (stack level 1) and xn m to item 1 (stack level 2). The result xn m
is a two- or three-digit number that identifies the row and column location of the key just pressed.

Full Command and Function Reference 3-123

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

→
→

Example:See also:

KEYEVALType:
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, KEYEVALCommand
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.
…µ KEYEVALLevel 1/Argument 1

nn.n
Example:Command:Result:→KEYTIME
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→

Turn the calculator off using a command.
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 ismeasured 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
Level 1/Argument 1

time
See also:

KEYTIME→

3-124 Full Command and Function Reference

Level 1/Item 1→

KEYTIME→
Type:
Description:
Access:
Input/Output:

Command
Displays the current keytime value.
Keytime is the time after a keypress during which further keypresses will not be actioned. It ismeasured in ticks. If you experience key bounce, you can increase the value of keytime.
…µ KEYTIME→
Level 1/Argument 1

Level 1/Item 1→
See also:

KGET
Type:
Description:

Access:Flags:
Input/Output:→KEYTIME
Command
Kermit Get Command: Used by a local Kermit to get a Kermit server to transmit the named
object(s).
To rename an object when the local device gets it, include the old and new names in an embedded
list. For example, {{ AAA BBB }} KGET gets the variable named AAA but changes its name to
BBB. {{ AAA BBB } CCC } KGET gets AAA as BBB and gets CCC under its own name. (If theoriginal name is not legal on the calculator, enter it as a string.)…µ KGETI/O Device (–33), RECV Overwrite (–36), I/O Messages (–39), I/O Device for Wire (–78)
Level 1/Argument 1

See also:

time

Level 1/Item 1→'name'→“name”→{ nameold namenew }→{ name1 ... namen }→{{ nameold namenew } name ... }BAUD, CKSM, FINISH, PARITY, RECN, RECV, SEND, SERVER, TRANSIO

KILL
Type:
Description:

Command
Cancel Halted Programs Command: Cancels all currently halted programs. If KILL is executed
within a program, that program is also canceled.
Canceled programs cannot be resumed.
KILL cancels only halted programs and the program from which KILL was executed, if any.
Commands that halt programs are HALT and PROMPT.
Suspended programs cannot be canceled. Commands that suspend programs are INPUT and
WAIT.
Access:!°LL RUN & DEBUG KILL
( °is the left-shift of the Nkey).
Input/Output: None
See also:
CONT, DOERR, HALT, PROMPT

LABEL
Type:
Description:

CommandLabel Axes Command: Labels axes in PICT with x- and y-axis variable names and with theminimum and maximum values of the display ranges.
The horizontal axis name is chosen in the following priority order:
1. If the axes parameter in the reserved variable PPAR is a list, then the x-axis element from thatlist is used.
Full Command and Function Reference 3-125

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
See also:
AXES, DRAW, DRAXLAGRANGE
Type:
Description:

CommandReturns the interpolating polynomial of minimum degree for a set of pairs of values. For twopairs, 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:Find an interpolating polynomial for the data (1,6), (3,7), (4,8), (2,9)
LAGRANGE([[1,3,4,2][6,7,8,9]])3

Result:See also:2

8x – 63x + 151 x – 60-------------------------------------------------------6

DROITELANGUAGE→
Type:
Command
Description:
Language: Returns the language that is currently set. 0 for English, 1 for French, and 2 forSpanish.
Access:…µ LANGUAGE→
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

value→LANGUAGE→LANGUAGEType:
Command
Description:
Language: Sets the language for things such as error messages: 0 for English, 1 for French, and 2
for Spanish.
Access:…µ →LANGUAGE
Input/Output:
Level 1/Argument 1

value
See also:

LANGUAGE→

3-126 Full Command and Function Reference

Level 1/Item 1

→

LAP
Type:
Description:

Function

Access:Calculus, !Ö DIFFERENTIAL EQNS

Input:An expression.

Output:

The Laplace transform 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:Command:Result:Find the Laplace transform of ex.

See also:

ILAP, LAPL

LAPL
Type:
Description:

CommandAccess:!Ö DERIV & INTEG L

Input:

Level 2/Argument 1:An expression.
Level 1/Argument 2: A vector of variables.

Output:

The Laplacian of the expression with respect to 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, and simplify, the Laplacian of the following expression:

Performs a Laplace transform on an expression with respect to the current default variable.

LAP(EXP(X))
1/(X-1)Returns the Laplacian of a function with respect to a list of variables.

xe cos ( zy )Command:

LAPL(EXP(X)*COS(Z*Y),[X,Y,Z])
EXPAND(ANS(1))

Result:-((Y^2+Z^2-1)*EXP(X)*COS(Z*Y))

See also:

LAST
Type:
Description:
Access:Flags:
Input/Output:

LAP, ILAP
CommandReturns copies of the arguments of the most recently executed command.
LAST is provided for compatibility with the HP 28S. LAST is the same as LASTARG.
None. Must be typed in.
Last Arguments (–55)
Level 1→
See also:

Level n7

Level 1

objn

…

obj1

ANS, LASTARG

Full Command and Function Reference 3-127

LASTARGType:
Description:

Access:CommandReturns 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 noarguments leave the current saved arguments unchanged. When LASTARG follows a commandthat evaluates an algebraic expression or program, the last arguments saved are from the evaluatedalgebraic expression or program, not from the original command.
…µ LASTARG!°LLERROR LASTA

Flags:
Input/Output:!îin RPN mode.
Last Arguments (–55)
Level 1→
See also:

LCD→
Type:
Description:( °is the left-shift of the Nkey).
(îis the left-shift of the`key).

Level n7

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:See also:
→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

Level 1/Item 1→

See also:

BLANK, →GROB, LCD→

LCM
Type:
Description:

Function

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.

Returns the least common multiple of two objects.

3-128 Full Command and Function ReferenceOutput:

The least common multiple of the objects.

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 least common multiple of the following two expressions:
2

x –1

x–1
Command:Results:

LCM(X^2-1,X-1)
X^2-1

See also:

GCD

LCXM
Type:
Description:

CommandAccess:Catalog, …µInput:

Level 3/Argument 1: The number of rows you want in the resulting matrix.
Level 2/Argument 2: The number of columns you want in the resulting matrix.
Level 1/Argument 3: A program that uses two arguments. An expression with the two variables I,
J can be used instead.

Output:

The resulting matrix.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:

Build a 2 × 3 matrix with aij=i+2j.

Result:LDEC
Type:
Description:

From a program with two arguments, builds a matrix with the specified number of rows andcolumns, with aij = f(i,j).

LCXM(2,3,« →I J 'I+2*J'»)
3 5 7
4 6 8

Command
Solves a linear differential equation with constant coefficients, or a system of first order linear
differential equations with constant coefficients.

Access:Symbolic solve, !Îor PSOLVER or !ÖDIFF

Input:

Level 2/Argument 1: For a single equation, the function forming the right hand side of theequation. For a system of equations, an array comprising the terms not containing the dependent
variables.
Level 1/Argument 2: For one equation, the auxiliary polynomial. For a system of equations, thematrix of coefficients of the dependent variables.

Output:The solution.

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:

Solve 2sin(x), with the auxiliary polynomial x2+1:
LDEC(2*SIN(X),X^2+1)

Full Command and Function Reference 3-129

Result:

COS(X)*(cC0 -X)+(cC1 — -1)*SIN(X)

See also:

DESOLVE

LEGENDRE
Type:
Description:

Function

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).

Example:Command:Result:Find the Legendre polynomial with degree 4.

See also:

HERMITE, TCHEBYCHEFF

LGCD
Type:
Description:

Function

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: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).

See also:

GCD

LIBEVALType:
Description:

Command
Evaluate Library Function Command: Evaluates unnamed library functions.

Returns the nth degree Legendre polynomial.

LEGENDRE(4)(35*X^4-30*X^2+3)/8

Returns the greatest common divisor of a list of expressions or values.

WARNING: Use extreme care when executing this function. Using LIBEVAL
with random addresses will almost always cause a memory loss. Do not use thisfunction unless you know what you are doing.
#nfunction is of the form lllfffh, where lll is the library number, and fff the function number.
Access:…µ LIBEVAL
Input/Output:
Level 1/Argument 1

See also:

LIBS
Type:
Description:#nfunction
EVAL, FLASHEVAL, SYSEVAL

Level 1/Item 1→

CommandLibraries 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 librarywithout a title is displayed as " ".

3-130 Full Command and Function ReferenceAccess:…µ LIBS
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

ATTACH, DETACH

lim
Type:
Description:

Function

Access:Calculus, !Ö LIMITS&SERIES

Input:

Level 2/Argument 1: An expression.

{“title”, nlib, nport, ...,“title”, nlib, nport }Returns the limit of a function as its argument approaches a specified value. Expands andsimplifies an algebraic expression.

Level 1/Argument 2: An expression of the form x = y, where x is the variable and y is the value atwhich the limit is to be evaluated. If the variable approaching a value is the current CAS variable,
it is sufficient to give its value alone. The ∞ symbol provided by the calculator can be used to set
the limiting value at plus or minus infinity.
Output:

The limit of the expression at the limit point.

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 following limit:nn–y lim  x-------------- x → y x – y -Command:Result:lim((X^N-Y^N)/(X-Y), X=Y)N*EXP(N*LN(Y))/Y

See also:

SERIES

LIMIT
Type:
Description:

Function
Returns the limit of a function as its argument approaches a specified value. This function is
identical to the lim function, described above, and is included to ensure backward-compatibility
with the HP 49G calculator.

Access:Catalog, …µ

LIN
Type:
Description:

CommandAccess:…× or Exponential and logarithm, !Ð or PALG, or !Ú
PLEXPLN.

Input:An expression.

Output:

The linearized 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).

Linearizes expressions involving exponential terms.
REWRITE, orFull Command and Function Reference 3-131

Example:

Linearize the following expression:x y 4x(e e )

Command:Result:See also:

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:See also:

ΣLINE
Type:
Description:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1(x1, y1)(x2, y2)→{ #n1, #m1}

{ #n2, #m2}→

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
CommandRegression 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.
Model

Form of Expression

LINFITLOGFITmx + bm ln(x) + b

EXPFIT

bemx

PWRFITbxm

Access:…µ ΣLINE
Input/Output:
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)'.

See also:

BESTFIT, COLΣ, CORR, COV, EXPFIT, LINFIT, LOGFIT, LR, PREDX, PREDY, PWRFIT,XCOL, YCOL

LINFITType:
Description:

Access: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Input/Output: None
See also:
BESTFIT, EXPFIT, LOGFIT, LR, PWRFIT

LININ
Type:
Description:

Access:
Input/Output:

Function
Linear Test Function: Tests whether an algebraic is structurally linear for a given variable.
If any two subexpressions containing a variable (name) are combined only with addition andsubtraction, and any subexpression containing the variable is at most multiplied or divided byanother factor not containing the variable, the algebraic (symb) is determined to be linear for thatvariable. LININ returns a 1 if the algebraic is linear for the variable, and a 0 if not.
!°TEST !«LININ( °is the left-shift of the Nkey).
Level 2/Argument 1

Example 1:
Example 2:

Level 1/Argument 2

Level 1/Item 1→'symb''name'
0/1'(X+1)*(Y^-2^Z)+(X/(3-Z^3)' 'X' LININ returns 1.
'(X^2-1)/(X+1)' 'X' LININ returns 0.
(Although this equation yields a linear equation when factored, LININ tests the equation as
described above.)

LINSOLVE
Type:

Command

Description:

Solves a system of linear equations.

Access:Symbolic solve, !Î, PSOLVE, !Ø LIN-S

Input:

Level 2/Argument 1: An array of equations.
Level1/Argument 2: A vector of the variables to solve for.

Output:Level 3/Item 1: The system of equations, as a list containing the inputs as above.
Level 2/Item 2: A list of the pivot points.
Level 1/Item 3: The solution.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

See also:

DESOLVE, SOLVE, MSLV

LIST→
Type:
Description:
Access:
Input/Output:

Command
List to Stack Command: Takes a list of n objects and returns each object to a separate level, andreturns the total number of objects to item n+1 (stack level 1).
The command OBJ→ also provides this function.
…µ LIST→
Level 1/Argument 1

Leveln+1/Item1 ...

Level2/Itemn

Level1/Itemn+1

objn

n

See also:→{ obj1, ...,objn }obj1 ...
ARRY→, DTAG, EQ→, →LIST, OBJ→, STR→

→LIST
Type:
Description:
Access:Command
Stack to List Command: Takes n specified objects and returns a list of those objects.
!°TYPE →LIST( °is the left-shift of the Nkey).
!°LIST →LIST( °is the left-shift of the Nkey).
Full Command and Function Reference 3-133

Input/Output:
Leveln+1/Argument1 7Level2/Argumentn

Level1/Argumentn+1

Level 1/Item 1

Example:→obj1 … objnn
{ obj1, … ,objn }The program « DEPTH →LIST 'A' STO » combines the entire contents of the stack
into a list that is stored in variable A.

See also:→ARRY, LIST→, →STR, →TAG, →UNIT

∆LIST
Type:
Description:
Access:
Input/Output:

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
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' }.

See also:

Σ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.
( ´ is the left-shift of the Pkey).
!´ LIST ΠLIST
Level 1/Argument 1

Example 1:{ list }{ 5 8 2 } œLIST returns 80.

Example 2:{ A B C 1 } œLIST returns 'A*B*C'.

See also:

ΣLIST, ∆LIST, STREAM

ΣLIST
Type:
Description:
Access:
Input/Output:

Level 1/Item 1→

product

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).
Level 1/Argument 1

Level 1/Item 1→

Example 1:{ list }{ 5 8 2 } ΣLIST returns 15.

Example 2:{ A B C 1 } ΣLIST returns 'A+B+C+1'.

See also:

ΠLIST, ∆LIST, STREAM

LN
Type:
Description:

Analytic function
Natural Logarithm Analytic Function: Returns the natural (base e) logarithm of the argument.

3-134 Full Command and Function ReferencesumFor x = 0 or (0, 0), an Infinite Result exception occurs, or, if flag –22 is set, –MAXR is returned.
The inverse of EXP is a relation, not a function, since EXP sends more than one argument to thesame result. The inverse relation for EXP is the general solution:
LN(Z)+2*π*i*n1
The function LN is the inverse of a part of EXP, a part defined by restricting the domain of EXP
such that: each argument is sent to a distinct result, and each possible result is achieved.
The points in this restricted domain of EXP are called the principal values of the inverse relation.
LN in its entirety is called the principal branch of the inverse relation, and the points sent by LN tothe boundary of the restricted domain of EXP form the branch cuts of LN.
The principal branch used by the calculator for LN was chosen because it is analytic in the regions
where the arguments of the real-valued inverse function are defined. The branch cut for thecomplex-valued natural log 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 LN. The graph of the domain shows where thebranch cut occurs: the heavy solid line marks one side of the cut, while the feathered lines markthe 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 LN(Z)+2*π*i*n1 for the case n1=0. For other values ofn1, the horizontal band in the lower graph is translated up (for n1 positive) or down (for n1
negative). Taken together, the bands cover the whole complex plane, which is the domain of
EXP.

Access:Flags:

You can view these graphs with domain and range reversed to see how the domain of EXP is
restricted to make an inverse function possible. Consider the vertical band in the lower graph as the
restricted domain Z = (x,y). EXP sends this domain onto the whole complex plane in the range
W = (u,v) = EXP(x,y) in the upper graph.
…¹(¹is the right-shift of the Qkey).
Principal Solution (–1), Numerical Results (–3), Infinite Result Exception (–22)
Full Command and Function Reference 3-135

Input/Output:
Level 1/Argument 1z
See also:

LNAME
Type:
Description:
Access:
Input:
Output:Flags:
Example:Command:Result:See also:'symb'
ALOG, EXP, ISOL, LNP1, LOG

Level 1/Item 1

→

ln z

→

'LN(symb)'

CommandReturns 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 bylength, 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.
LNAME(COS(B)/2*A + MYFUNC(PQ) + INV(T)){COS(B)/2*A + MYFUNC(PQ) + 1/T, [MYFUNC,PQ,A,B,T]}

LVAR

LNCOLLECT
Type:
Command
Description:
Simplifies an expression by collecting logarithmic terms. For symbolic powers does not performthe 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)LNCOLLECT(EXP(N*LN(X))
Command:Result:
EXP(N*LN(X))
See also:
EXP2POW, TEXPAND
LNP1
Type:
Description:

Access: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).

Flags:Numerical Results (–3), Infinite Result Exception (–22)
Input/Output:
Level 1/Argument 1

Level 1/Item 1x→

ln (x + 1)

'symb'→'LNP1(symb)'

See also:

EXPM, LN

LOCAL
Type:
Description:

CommandAccess: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. Anyvariable 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).

Example:Command:Result:Create local variables ←A and ←B and store the values 0 in the first and 2 in the second.
LOCAL({←A,←B=2})

See also:

DEF, STORE, UNBIND

LOG
Type:
Description:

Access:Flags: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.

{←A,←B=2}

Analytic function
Common Logarithm Analytic Function: Returns the common logarithm (base 10) of theargument.
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 tothe 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 isachieved. The points in this restricted domain of ALOG are called the principal values of theinverse relation. LOG in its entirety is called the principal branch of the inverse relation, and thepoints 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 theregions where the arguments of the real-valued function are defined. The branch cut for thecomplex-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 relationshiplog 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

Input/Output:
Level 1/Argument 1

See also:

LOGFITType:
Description:

Level 1/Item 1

z

→

log z

'symb'→'LOG(symb)'

ALOG, EXP, ISOL, LN
Command
Logarithmic Curve Fit Command: Stores LOGFIT as the fifth parameter in the reserved variableΣPAR, indicating that subsequent executions of LR are to use the logarithmic curve-fitting model.
LINFIT is the default specification in ΣPAR.

Access:…µ LOGFIT
Input/Output: None
See also:
BESTFIT, EXPFIT, LINFIT, LR, PWRFIT

LQ
Type:
Description:

Access:Command
LQ Factorization of a Matrix Command: Returns the LQ factorization of an m × n matrix.
LQ factors an m × n matrix A into three matrices:• L is a lower m × n trapezoidal matrix.
• Q is an n × n orthogonal matrix.
• P is a m × m permutation matrix.
Where P × A = L × Q.
!Ø FACTORIZATION LQ( Ø is the left-shift of the 5key).
!´ MATRIX FACTORS LQ( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1[[ matrix ]]A
See also:LR
Type:
Description:→

Level 3/Item 1

Level 2/Item 2

Level 1/Item 3[[ matrix ]]L[[ matrix ]]Q[[ matrix ]]P

LSQ, QR
Command
Linear Regression Command: Uses the currently selected statistical model to calculate the linear
regression coefficients (intercept and slope) for the selected dependent and independent variablesin the current statistics matrix (reserved variable ΣDAT).
The columns of independent and dependent data are specified by the first two elements in thereserved variable ΣPAR, set by XCOL and YCOL, respectively. (The default independent anddependent columns are 1 and 2.) The selected statistical model is the fifth element in ΣPAR. LR
stores the intercept and slope (untagged) as the third and fourth elements, respectively, in ΣPAR.
The coefficients of the exponential (EXPFIT), logarithmic (LOGFIT), and power (PWRFIT)
models are calculated using transformations that allow the data to be fitted by standard linear
regression. The equations for these transformations appear in the table below, where b is theintercept and m is the slope. The logarithmic model requires positive x-values (XCOL), theexponential model requires positive y-values (YCOL), and the power model requires positive xand y-values.

3-138 Full Command and Function ReferenceModelTransformation

Logarithmic

y = b + m ln(x)Exponential

ln(y) = ln(b) + mx

Powerln(y) = ln(b) + m ln(x)Access:…µ LR
Input/Output:
Level 1/Argument 1

Level 2/Item 1

Level 1/Item 2→

See also:

LSQ
Type:
Description:

Access:Flags:
Input/Output:

See also:

LU
Type:
Description:

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, eachcolumn 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 numberof 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 thatsatisfies all the equations may not exist. LSQ returns the solution with the minimum residuals of
A × X – B.
!Ø OPERATIONS L LSQ!´ MATRIX LSQSingular Values (–54)( Ø is the left-shift of the 5key).
( ´ is the left-shift of the Pkey).

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1[ array ]B[[ matrix ]]A→[ array ]x[[ matrix ]]B
LQ, RANK, QR, /[[ matrix ]]A→[[ matrix ]]xCommandLU Decomposition of a Square Matrix Command: Returns the LU decomposition of a squarematrix.
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).
!´ MATRIX FACTOR LU( ´ is the left-shift of the Pkey).

Full Command and Function Reference 3-139

Input/Output:
Level 1/Argument 1

See also:[[ matrix ]]A
DET, INV, LSQ, /

LVAR
Type:

Command→

Level 3/Item 1

Level 2/Item 2

Level 1/Item 3[[ matrix ]]L[[ matrix ]]U[[ matrix ]]P

Description:

Returns a list of variables in an algebraic object. Differs from LNAME above in that functions ofvariables, such as COS(X) or LN(AB) are returned, instead of the variable names, X or AB. INV()
and SQ() are not treated as functions. Compare the example here with the same example in
LNAME.

Access:Catalog, …µInput:An algebraic object.

Output:Level 2/Item 1: The algebraic object.
Level 1/Item 2: A list which includes both the original expression and a vector containing thevariable names. Variable names include functions of variables, as described above. The names are
sorted by length, longest first, and ones of equal length are sorted alphabetically.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:

List the variables and function names in the expression COS(B)/2*A + MYFUNC(PQ) + 1/T.
LVAR(COS(B)/2*A + MYFUNC(PQ) + INV(T))

See also:

LNAME

MAD
Type:
Description:

Command{COS(B)/2*A + MYFUNC(PQ) + 1/T, [MYFUNC(PQ),COS(B),A,T]}

Returns details of a square matrix, including the information needed to obtain the adjoint matrix.
The adjoint matrix is obtained by multiplying the inverse matrix by the determinant.
OPERATIONS L

Access:Matrices, !Ø

Input:A square matrix

Output:Level 4/Item 1: The determinant.
Level 3/Item 2: The formal inverse.
Level 2/Item 3: The matrix coefficients of the polynomial, p, defined by(xi–a)p(x)=m(x)i, where a is the matrix, and m is the characteristic polynomial of a.
Level 1/Item 4: The characteristic polynomial.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Obtain the adjoint matrix of:
0 –1
1 0

Command:Result:See also:

MAD([[0, -1][1, 0]]){1,[[0, 1][-1, 0]],{[[1, 0][0, 1]], [[0, -1][1, 0]]}, X^2+1}

The determinant is 1, so the adjoint is the second item[[0, 1][-1, 0]].
LNAME

3-140 Full Command and Function Reference

MAIN
Type:

Command

Description:

Displays the main menu (or list) of CAS operations. This displays the CASCFG command, theALGB, 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 isset, displays the operations as a menu of function keys.

See also:

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

See also:

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:↓MATCHType:
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

CommandMatch 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

The pattern 'symbpat' and replacement 'symbrepl' can be normal expressions; for example, you canreplace .5 with 'SIN(π/6)'. You can also use a “wildcard” in the pattern (to match any
subexpression) and in the replacement (to represent that expression). A wildcard is a name thatbegins with &, such as the name '&A', used in replacing 'SIN(&A+&B)' with
'SIN(&A)*COS(&B)+COS(&A)*SIN(&B)'. Multiple occurrences of a particular wildcard in apattern must match identical subexpressions.
↓MATCH works from top down; that is, it checks the entire expression first. This approachworks well for expansion. An expression expanded during one execution of ↓MATCH willcontain additional subexpressions, and those subexpressions can be expanded by anotherexecution of ↓MATCH. Several expressions can be expanded by one execution of ↓MATCH
provided none is a subexpression of any other.
Access:…µ↓MATCH
Input/Output:

Example 1:

Level 2/Argument 1

Level 1/Argument 2'symb1'{ 'symbpat' 'symbrepl' }Level 2/Item 1→'symb2'

Level 1/Item

0/1→'symb1'{ 'symbpat' 'symbrepl' 'symbcond' }'symb2'0/1.5 { .5 'SIN(π/6)' } ↓MATCH returns 'SIN(π/6)' to level 2 and 1 to level
1.

Example 2: 'SIN(U+V)' { 'SIN(&A+&B)''SIN(&A)*COS(&B)+COS(&A)*SIN(&B)' } ↓MATCH returns'SIN(U)*COS(V)+COS(U)*SIN(V)' to level 2 and 1 to level 1.

Example 3: This sequence: 'SIN(5*Z)' { 'SIN(&A+&B)''Σ(K=0,&A,COMB(&A,K)*SIN(K*π)*COS(&B^(&A-K)*SIN(&B)^K)''ABS(IP(&A))==&A' } ↓MATCH returns'Σ(K=0,5,COMB(5,K)*SIN(K*π)*COS(Z^(5-K)*SIN(Z)^K)' to level 2
and 1 to level 1.
See also:↑MATCHType:
Description:

Access:↑MATCH
Command
Bottom-Up Match and Replace Command: Rewrites an expression.
↑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.
The pattern 'symbpat' and replacement 'symbrepl' can be normal expressions; for example, you canreplace 'SIN(π/6)' with '1/2'. You can also use a “wildcard” in the pattern (to match any
subexpression) and in the replacement (to represent that expression). A wildcard is a name thatbegins with &, such as the name '&A', used in replacing 'SIN(&A+π)' with '–SIN(&A)'. Multiple
occurrences of a particular wildcard in a pattern must match identical subexpressions.
↑MATCH works from bottom up; that is, it checks the lowest level (most deeply nested)
subexpressions first. This approach works well for simplification. A subexpression simplified
during one execution of ↑MATCH will be a simpler argument of its parent expression, so theparent expression can be simplified by another execution of ↑MATCH.
Several subexpressions can be simplified by one execution of ↑MATCH provided none is a
subexpression of any other.
…µ↑MATCH

3-142 Full Command and Function ReferenceInput/Output:
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/1This sequence: 'SIN(π/6)' { 'SIN(π/6)' '1/2' } ↑MATCH returns'1/2' to level 2 and 1 (indicating a replacement was made) to level 1.

Example 2:This sequence: 'SIN(X+π)' { 'SIN(&A+π)' '-SIN(&A)' } ↑MATCH
returns '-SIN(X)' to level 2 and 1 to level 1.

Example 3:This sequence: 'W+ƒ(SQ(5))' { 'ƒ(SQ(&A))' '&A' '&AŠ0' } ↑MATCH
returns 'W+5' to level 2 and 1 to level 1.

See also:↓MATCH

MATHS
Type:

Command

Description:

Displays a menu or list of CAS mathematics submenus. Details are given in Appendix J of theUser’s Guide.

Access:Catalog, …µ

Flags:

If the CHOOSE boxes flag is clear (flag –117 clear), displays the submenus as a list. If the flag isset, displays the submenus as a menu of function keys.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATR, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

MATR
Type:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MODULAR,POLYNOMIAL, REWRITE, TESTS, TRIGO

MAX
Type:
Description:

Displays a menu or list containing the CAS commands for matrix operations.

Function
Maximum Function: Returns the greater of two inputs.

Access:!´REAL MAX
Flags:
Numerical Results (–3)
Input/Output:( ´ is the left-shift of the Pkey).

Level 2/Argument 1

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_unit1y_unit2→max(x_unit1, y_unit2)

Full Command and Function Reference 3-143

Example 1:

10 -23 MAX returns 10.

Example 2:-10 -23 MAX returns -10.

Example 3:

1_m 9_cm MAX returns 1_m.

See also:

MIN

MAXR
Type:
Description:

Access:Flags:
Input/Output:

Function
Maximum Real Function: Returns the symbolic constant MAXR or its numerical representation
9.99999999999E499.
MAXR is the largest real number that can be represented by the calculator.
!´L CONSTANTS LMAXR ( ´ is the left-shift of the Pkey).
Symbolic Constants (–2), Numerical Results (–3)
Level 1/Argument 1

See also:

MAXΣ
Σ
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→'MAXR'→

9.99999999999E499

e, i, MINR, πCommand
Maximum Sigma Command: Finds the maximum coordinate value in each of the m columns of
the current statistical matrix (reserved value ΣDAT).
The maxima are returned as a vector of m real numbers, or as a single real number if m = 1.
…µ MAXΣLevel 1/Argument 1

See also:

MCALC
Type:
Description:
Access:
Input/Output:

Level 1/Item 1

→

xmax

→

[xmax1 xmax2 ... xmaxm ]BINS, MEAN, MINΣ, SDEV, TOT, VAR
CommandMake Calculated Value Command: Designates a variable as a calculated variable for the multipleequation solver.
MCALC designates a single variable, a list of variables, or all variables as calculated values.
…µ MCALC
Level 1/Argument 1

See also:

Level 1/Item 1'name'→{ list }

→

"ALL"

→

MUSER

3-144 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

See also:

MEM
Type:
Description:

Level 1/Item 1

→

xmean

→

[xmean1, xmean2, ..., xmeanm ]BINS, MAXΣ, MINΣ, SDEV, TOT, VAR
CommandMemory 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 ofmemory 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→
See also:

MENU
Type:
Description:

x

BYTES
Command Operation
Display Menu Command: Displays a built-in menu or a library menu, or defines and displays acustom menu.
A built-in menu is specified by a real number xmenu. The format of xmenu is mm.pp, where mm is themenu 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
the menu number.
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 issubsequently displayed.
MENU takes any object as a valid argument and stores it in CST. However, the calculator canbuild 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

Access:

than a list or name containing a list is supplied to MENU, a Bad Argument Type error will occur
when the calculator attempts to display the custom menu.
A full list of all menus can be found in Appendix H of this reference.
!&H [MENU] MENU!°LMODES [MENU] MENU ( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Example 1:
Example 2:
Example 3:
Example 4:
See also:

MENUXYType:
Description:
Access:Level 1/Item 1

xmenu

→

{ listdefinition }→'namedefinition'

→

→
obj
5 MENU displays the first page of the MTH MATR NORM menu.
48.02 MENU displays the second page of the UNITS MASS menu.
{ A 123 "ABC" } MENU displays the custom menu defined by the list argument.
'MYMENU' MENU displays the custom menu defined by the name argument.
RCLMENU, TMENU
Command
Displays a function key menu of computer algebra commands in a specified range.
Catalog, …µInput:

Level 2/Argument 1: The number of the first command in the range to be displayed.
Level 1/Argument 2: The number of the last command in the range to be displayed.
Arguments below 0 are treated as 0; arguments above 140 are treated as 140.

Output:On the function key menu, the computer algebra commands in the range specified. NOVAL isreturned in Algebraic mode.
This list gives the number of each operation that can be displayed by the command. The complete
menu below can be generated by MENUXY(0,140). Items 127 through to 135 allow access fromthe top row of keys to CAS menus.

Number
0-5
6-11
12-17
18-23
24-29
30-35
36-41
42-47
48-53
54-59
60-65
66-71
72-77
78-83
84-89
90-95
96-101
102-107

EXPANDTAYLOR0
PREVALLDEC
SINCOS
TRIGTANASIN2CREMAINDER
ABCUV
PTAYL
ISPRIME?
FROOTSREF
SYLVESTER
HILBERTLEGENDRETABVAR
MAP

FACTORSERIESRISCH
TEXPANDTLIN
TAN2SCACOS2S
IREMAINDERIABCUV
HORNERNEXTPRIMEFACTORS
AXM
PCAR
LCXM
TCHEBYCHEFFTABVALXNUM

OperationSUBSTSOLVEVX
DERIVLIN
TCOLLECTHALFTAN
DIV2
GCD
LGCD
EULER
PREVPRIMEDIVISAXLJORDANDIVHERMITEDIVPC
XQ

3-146 Full Command and Function Reference

DERVX
PLOT
DESOLVE
TSIMP
TRIG
TAN2SC2
IDIV2
LCM
SIMP2
PA2B2
SOLVE
TRAN
QXA
MAD
CURL
LAGRANGETRUNC
REORDERINTVXPLOTADDLAP
LNCOLLECTTRIGCOSATAN2SQUOTEGCD
PARTFRAC
CHINREMZEROSHADAMARDAXQ
LINSOLVELAPL
FOURIER
SEVAL
LVAR

lim
IBP
ILAP
EXPLN
TRIGSIN
ASIN2T
IQUOT
IEGCD
PROPFRACICHINREM
FCOEF
rref
GAUSS
VANDERMONDEHESSSIGNTABTEVAL
FXND

108-113
114-119120-125
126-131132-137
138-140

Example:Command:Result:EXLR
DIV2MODRREFMODCASCFG
DIFF
∞

LNAME
POWMOD
MODSTO
MAIN
ARIT
PROMPTSTOADDTMODINVMODMENUXYALGBSOLVERVER

SUBTMODGCDMODKEYEVAL
CMPLX
EXP&LN

MULTMODEXPANDMOD
GROBADD
TRIGO
EPSX0

DIVMOD
FACTORMODSCROLL
MATR?

Display a menu containing ATAN2S, ASIN2T, ASIN2C and ACOS2S.
MENUXY(34,37)
The four functions are displayed above the A to D keys. In Algebraic mode, NOVAL isreturned as item 1.

See also:

MENU, TMENU

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:

Example 1:
Example 2:
Example 3:
See also:

MINEHUNTType:
Description:

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 2

Level 1/Item 1

x

y

→

min(x,y)x'symb'→'MIN(x, symb)''symb'x→'MIN(symb, x)''symb1''symb2'→'MIN(symb1, symb2)'

x_unit1y_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)

CommandStarts the MINEHUNT game.
In this game, you are standing in the upper-left corner of an 8x16 battlefield grid. Your mission isto 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

Use the number or arrow keys to cross the battlefield one square at a time (use 7, 9, 1,
and 3to move diagonally.) You can exit the game at any time by pressing −(the $ key).
To interrupt and save a game, press K. This creates a variable MHpar in the current directoryand ends the game. If MHpar exists when you start MINEHUNT, the interrupted game resumes
and MHpar is purged.
You can change the number of mines in the battlefield by creating a variable named Nmines
containing the desired number. Nmines must contain a real number (1 to 64). If Nmines is negative,
the mines are visible during the game (allowing you to cheat).
Access:G EQUATION LIBRARY UTILS MINEHUNTInput/Output: None.

MINIFONT→Type:
Command
Description:
Minifont: Returns the font that is set as the minifont.
Access:…µ MINIFONT→
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

Font object→MINIFONT→MINIFONT
Type:Command
Description:
Minifont: Sets the font that is used as the minifont.
Access:…µ →MINIFONTInput/Output:
Level 1/Argument 1

Font object
See also:

MINIT
Type:
Description:
Access:See also:

MINR
Type:
Description:

Access:Flags:

Level 1/Item 1→

MINIFONT→
CommandMultiple-equation Menu Initialization Command. Creates the reserved variable Mpar, which
includes the equations in EQ and the variables in these equations.
…µMINIT
MITM, MROOT, MSOLVR
Function
Minimum Real Function: Returns the symbolic constant MINR or its numerical representation,
1.00000000000E–499.
MINR is the smallest positive real number that can be represented by the calculator.
!´LCONSTANTS LMINR ( ´ is the left-shift of the Pkey).
Symbolic Constants (–2), Numerical Results (–3)

3-148 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:

MINΣ
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→'MINR'→

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/Argument 1

See also:

MITM
Type:
Description:
Access:
Input/Output:

Level 1/Item 1

→

xmin

→

{ xmin 1 xmin 2 … xmin m }BINS, MAXΣ, MEAN, SDEV, TOT, VAR
CommandMultiple-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 blanklabel. 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→

See also:

MINIT

MKISOMType:
Description:

CommandAccess:Matrices, !Ø LINEAR APPL

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:

Find the matrix for a rotation of π/2 radians in two dimensions

Command:Result:Returns the matrix representation for a given isometry.

MKISOM(π/2, 1)
0 –1
1 0

Full Command and Function Reference 3-149

Example 2:
Command:Result:See also:

MOD
Type:
Description:

Access:Flags:
Input/Output:

Find the matrix for a rotation with axis [1 1 1] and angle π/3 radians combined with a reflection in
the plane x + y + z = 0
MKISOM({ [1, 1, 1],π/3}, -1) then simplify with EXPAND(ANS(1))
0 –1 00 0 –1–1 0 0ISOM
Function
Modulo Function: Returns a remainder defined by: x mod y = x – y floor (x/y)
Mod (x, y) is periodic in x with period y. Mod (x, y) lies in the interval [0, y) for y > 0 and in (y, 0]
for y < 0.
Algebraic syntax: argument 1 MOD argument 2!´REAL MOD( ´ is the left-shift of the Pkey).
!ÞMODUL L MOD( Þ is the left-shift of the 1key).
Numerical Results (–3)

See also:

FLOOR, /MODSTOType:

Command

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

x mod yx

'symb'→'MOD(x, symb)''symb'x→'MOD(symb, x)''symb1''symb2'→'MOD(symb1, symb2)'

Description:

Changes the modulo setting to the specified number. The number that you set is reflected in the
CAS Modes input form. Negative numbers are replaced by their positive value, 0 and 1 are
replaced by 2.

Access:Arithmetic, !Þ MODULO L

Input:The modulo value that you want to set, an integer or an expression that evaluates to an integer.

Output:

The modulo setting is changed to the specified number. In Algebraic mode, NOVAL is returned
as argument 1.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

MODULARType:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
POLYNOMIAL, REWRITE, TESTS, TRIGO

Displays a menu or list of the CAS modulo operations.

3-150 Full Command and Function ReferenceMOLWTType:
Description:

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 molecularweight. 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 — forexample, 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.)

Access:G PERIODIC TABLE
Flags:
Units Usage (61)
Input/Output:

MOLWT

Level 1/Argument 1'name'
Example 1:
Example 2:
See also:

MROOT
Type:
Description:
Access:
Input/Output:

Level 1/Item 1→→“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
CommandMultiple 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

See also:

MSGBOXType:
Description:

Access:x or x_unit

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 toappear on the screen is truncated. You can use spaces and new-line characters (…ë) tocontrol 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:
Level 1/Argument 1

See also:

MSLV
Type:
Description:“message”
CHOOSE, INFORM, PROMPT

Level 1/Item 1→

Command
Numerically approximates a solution to a system of equations. Searches for a solution accurate to
12 digits, regardless of the display setting. Underdetermined and overdetermined systems are
rejected. Complex solutions will be looked for if any of the inputs contain complex values. If asingle expression or equation is to be solved, use SOLVE instead, or for linear equations, use
LINSOLVE. This command is similar to MSOLVR, but is more appropriate for use with the
CAS as it automates the solution instead of working through a menu. Step-by-step mode isavailable with this command.

Access:Numeric solve, …Ï or catalog, …µInput:

Level 3/Argument 1: A vector containing the equations or expressions (assumed equal to zero) tosolve.
Level 2/Argument 2: A vector containing the variables to solve forLevel 1/Argument 3: A vector containing initial guesses

Output:Level 3/Item 1: The vector containing the equations to solve.
Level 2/Item 2: The vector containing the variables to solve forLevel 1/Item 3: A vector representing an approximate solution to the system of equations.

Flags:Exact mode must be set (flag –105 clear), The calculator will set approximate mode and will look
for approximate results if exact results are not found.
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 complex results are wanted.
Step-by-step mode can be set (flag –100 set).

Example:Find x and y values, allowing for complex solutions, that solve the following two equations. The
first equation is an expression equal to zero, so only the expression needs to be given. Setting thesecond expression equal to a complex number forces the solver to look for complex solutions:sin(x)+y=0, x+sin(y)=1:

Command:Results:

MSLV('[SIN(X)+Y, X+SIN(Y)=(1,0)]', '[X,Y]', [0,0])('[SIN(X)+Y, X+SIN(Y)=(1,0)]', '[X,Y]', [(1.82384112611,0.),(-.968154636174,0.)])See also:

MSOLVR
Type:
Description:

DESOLVE, LINSOLVE, MSOLVR, SOLVE
CommandMultiple Equation Solver Command: Gets the multiple-equation solver variable menu for the setof equations defined by Mpar.
The multiple-equation solver application can solve a set of two or more equations for unknown
variables by finding the roots of each equation, one at a time.
The Multiple-Equation Solver uses the list of equations stored in EQ. “Equations” in this context
includes programs, expressions, and variable names that evaluate to a single value. The MultipleEquation Solver requires that EQ contain more than one equation — that is, the HP Solveapplication would include the NXEQ menu label for EQ. The solver uses EQ to create a reserved

3-152 Full Command and Function Referencevariable Mpar that is used during the solution process. Mpar contains the equation set plus
additional information. See appendix D, “Reserved Variables”, for information about Mpar.
Access:…µ MSOLVR
Input/Output: None
See also:
EQNLIB, MCALC, MINIT, MITM, MROOT, MSLV, MUSER

MULTMODType:
Description:

Function

Access:Arithmetic, !Þ MODULO L

Input:

Level 2/Argument 1: A number or an expression.
Level 1/Argument 2: A number or an expression.

Output:

The result of modular multiplication of the two objects, 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:Command:Result:Find the product of 2x and 38x2, modulo the default modulus, 3.

MUSER
Type:
Description:

Access:
Input/Output:

Performs modular multiplication of two objects, modulo the current modulus.

MULTMOD(2*X,38*X^2)
X^3

CommandMake User-Defined Variable Command: Designates a variable as user-defined for the multipleequation solver.
MUSER designates a single variable, a list of variables, or all variables as user-defined.
…µ MUSER
Level 1/Argument 1

See also:→NDISPType:
Description:

Access:
Input/Output:

Level 1/Item 1'name'→{ list }

→

"ALL"

→

MCALC
Command
Sets the number of program lines displayed on the screen.
The default value on the calculator is 9. On the HP 50g and 49g+ a value of 12 should be set for→NDISP, which will allow more of these models’ taller screen to be used when the font is
FONT7, FONT6, or the MINIFONT. Also, note that the →NDISP setting is reset to 9 at every
warmstart. Including << 12 →NDISP >> in 'STARTUP' will automatically reset the value to 12.
…µ →NDISP
Level 1/Argument 1nLevel 1/Item 1→

Full Command and Function Reference 3-153

NDISTType:
Description:

CommandNormal 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:2(x – m)– ------------------2v

endist ( m, v, x ) = --------------------2πv

Access:!´LPROBABILITY L NDIST
Input/Output:

See also:

NDUPN
Type:
Description:
Access:( ´ is the left-shift of the Pkey).

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

m

v

x

Level 1/Item 1→ndist(m, v, x)

UTPN
RPL command
Duplicates an object n times, and returns n.
!°STACK !«NDUPN ( °is the left-shift of the Nkey).
ISTACK !«NDUPN

Input/Output:
Level 2

Example:See also:

NEG
Type:
Description:

Access: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, DUP2n

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 theargument is PICT, the graphics object stored in PICT is inverted.
… ß 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

Level 1/Item 1

z

→

–z

#n1

→

#n2

[ array ]→[ –array ]'symb'→'–(symb)'x_unit→–x_unit

grob1

→

grob2

PICT1

→

PICT2

3-154 Full Command and Function ReferenceSee also:

NEWOB
Type:
Description:

Access:Flags:

ABS, CONJ, NOT, SIGN
Command
New Object Command: Creates a new copy of the specified object.
NEWOB has two main uses:• NEWOB enables the purging of a library or backup object that has been recalled from a port.
NEWOB creates a new, separate copy of the object in memory, thereby allowing the original
copy to be purged.
• Creating a new copy of an object that originated in a larger composite object (such as a list)
allows you to recover the memory associated with the larger object when that larger object is nolonger needed.
( °is the left-shift of the Nkey).
!°MEMORY NEWOB
Last Arguments (–55). In order for NEWOB to immediately release the memory occupied by theoriginal copy, flag –55 must be set so that the copy is not saved as a last argument.

Input/Output:
Level 1/Argument 1

Example 1:
Example 2:
See also:

Level 1/Item 1

→
obj
obj
:0:BKUP1 RCL NEWOB :0:BKUP1 PURGE recalls and purges the backup object
BKUP1.
3 GET NEWOB retrieves the third element out of a list on the stack, recovering the memory
occupied by the whole list.
MEM, PURGE

NEXT
Type:
Description:

Command
NEXT Command: Ends definite loop structures.
See the FOR and START keyword entries for more information.
Access:!°BRANCH START/FOR NEXT ( °is the left-shift of the Nkey).
Input/Output: None
See also:
FOR, START, STEP

NEXT
Type:
Description:

Operation
NEXT Operation: Returns but does not execute the next one or two steps of a program.

Access:„°LLRUN NEXT
Input/Output: None
See also:
SST, SST↓( °is the left-shift of the Nkey).

NEXTPRIMEType:
Function
Description:
Given an integer, returns the next prime number larger than the integer. Like ISPRIME?, it uses a
pseudoprime check for large numbers.
Access:Arithmetic, !Þ INTEGER L

Input:

An integer or an expression that evaluates to an integer.

Output:

The next prime number larger than the integer.

Example:Find the closest, larger prime number to 145.
Full Command and Function Reference 3-155

Command:Result:See also:

NIP
Type:
Description:

Access:NEXTPRIME(145)
149

ISPRIME?, PREVPRIME
RPL commandDrops 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).

I STACK LLNIP
Input/Output:
Level 2

Example:See also:

NOT
Type:
Description:

Access:Flags:
Input/Output:

Level 1

obj1
obj2
333 222 1 NIP returns 333 1
DUP, DUPDUP, DUPN, DUP2

Level 1→

FunctionNOT 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 toproduce 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 ona 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 thealgebraic 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

See also:

NOVAL
Type:
Description:

obj2

Level 1/Item 1

#n1

→

#n2

T/F

→

0/1

“string1”→“string2”'symb'→'NOT symb'

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.

3-156 Full Command and Function Reference

NOVAL is used to mark an empty field in a user-defined dialog box created with the INFORM
command. INFORM defines fields sequentially. If default values are used for those fields, thedefaults must be defined in the same order as the fields were defined. To skip over (not provide
defaults for) some of the fields, use the NOVAL command.
After INFORM terminates, NOVAL is returned if a field is empty and OK or ` is selected.
Access:!°L IN NOVAL
Input/Output: None
See also:
INFORMNΣ
Type:
Description:
Access:
Input/Output:( °is the left-shift of the Nkey).

CommandNumber of Rows Command: Returns the number of rows in the current statistical matrix(reserved variable ΣDAT).
…µ NΣ
Level 1/Argument 1

Level 1/Item 1→
See also:

NSUB
Type:
Description:

Access:
Input/Output:

ΣX, ΣXY, ΣX2, ΣY, ΣY2
CommandNumber of Sublist Command: Provides a way to access the current sublist position during an
iteration of a program or command applied using DOSUBS.
Returns an Undefined Local Name error if executed when DOSUBS is not active.
( °is the left-shift of the Nkey).
!°LIST PROCEDURES NSUB
Level 1/Argument 1

Level 1/Item 1→
See also:

→NUM
Type:
Description:

Access:
Input/Output:

Command
Evaluate to Number Command. Evaluates a symbolic argument object (other than a list) andreturns the numerical result.
→NUM repeatedly evaluates a symbolic argument until a numerical result is achieved. The effect isthe same as evaluating a symbolic argument in Numerical Result Mode (flag –3 set).
… →NUM(→NUM is the right-shift of the `key).

objsymb

NUM
Type:
Description:

nposition

DOSUBS, ENDSUB

Level 1/Argument 1

See also:

nrows

Level 1/Item 1

→

z

EVAL
Command
Character Number Command: Returns the character code n for the first character in the string.
The character codes are an extension of ISO 8859/1. Codes 128 through 159 are unique to thecalculators.

Full Command and Function Reference 3-157

The number of a character can be found by accessing the Characters tool (…±) andhighlighting 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

See also:

NUMX
Type:
Description:

Access:
Input/Output:“string”
CHR, POS, REPL, SIZE, SUB

Level 1/Item 1→

CommandNumber 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
See also:

NUMY
Type:
Description:n

Level 1/Item 1→

NUMY
CommandNumber 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.

Access:…µ NUMY
Input/Output:
Level 1/Argument 1

ny
See also:

OBJ→
Type:
Description:

Access:Level 1/Item 1→

NUMX
Command
Object to Stack Command: Separates an object into its components. For some object types, thenumber 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 oflist 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

!°LIST OBJ→…&NL OBJ→!°LCHARS LOBJ→( °is the left-shift of the Nkey).
( °is the left-shift of the Nkey).

Input/Output:
Leveln+1/Item1

Level 1/Argument 1

Example:See also:

Level2/Itemn

Level1/Itemn+1xy(x, y)→{ obj1, ... ,objn }

→

obj1

…

objn

n

[ x1, ... ,xn ]

→

x1

…

xn

{n}

[[ x1 1, ... ,xm n ]]

→

x1 1

…

xm n

{ m, n }“obj”→'symb'→

x_unit→evaluated object
arg1 ... argn…

n'function'x

1_unit→:tag:obj
obj
The command sequence '„(0,1,SIN(X),X)' OBJ→ returns:
6:0
first argument
5:
1
second argument
4: 'SIN(X)'
third argument
3:'X'
fourth argument
2:
4
number of arguments for „1:„
function name
ARRY→, C→R, DTAG, EQ→, LIST→, R→C, STR→, →TAG

“tag”

OCT
Type:
Description:

Command
Octal Mode Command: Selects octal base for binary integer operations.
(The default base is decimal.) Binary integers require the prefix #. Binary integers entered andreturned in octal base automatically show the suffix o. If the current base is not octal, enter anoctal number by ending it with o. It will be displayed in the current base when entered. The
current base does not affect the internal representation of binary integers as unsigned binary
numbers.
Access:…ãOCT(ã is the right-shift of the 3key).
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output: None
See also:
BIN, DEC, HEX, RCWS, STWS

OFF
Type:
Description:

Command
Off Command: Turns off the calculator.
When executed from a program, that program will resume execution when the calculator is turned
on. This provides a programmable “autostart.” ( i.e., a programmable …ç).
Access:„°LLRUNL OFF( °is the left-shift of the Nkey).
Input/Output: None
See also:
CONT, HALT, KILLOLDPRTType:
Description:

Command
Modifies the remapping string in the reserved variable PRTPAR so that the extended character setof the calculator matches that of the HP 82240A Infrared Printer.
Full Command and Function Reference 3-159

Access:
See also:

OPENIOType:
Description:

Access:Flags:
Input/Output:
See also:OR
Type:
Description:

The character set in the HP 82240A Infrared Printer does not match the character set of thecalculator:• 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 havethe 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 notnormally 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 theport 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, XMITFunction
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) logicalcomparison.
• 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

bit1

bit2

bit1 OR bit2

0

0

0

0

1

1

1

0

1

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 be the samelength.
When the arguments are real numbers or symbolics, OR simply does a true/false test. The result
is 1 (true) if either or both arguments are nonzero; it is 0 (false) if both arguments are 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 OR symb2. Execute →NUM (or set flag –3 before executing OR) to produce a numeric
result from the algebraic result.

Access:Flags:
Input/Output:

See also:

ORDER
Type:
Description:(ãis the right-shift of the 3key).
…ãL LOGIC OR!° TEST L OR
( °is the left-shift of the Nkey).
Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

#n1

#n2

→

#n3

“string1”“string2”→“string3”

T/F1

T/F2

→

0/1

T/F

'symb'→'T/F OR symb''symb'

T/F→'symb OR T/F'

'symb1''symb2'→'symb1 OR symb2'

AND, NOT, XOR
CommandOrder Variables Command: Reorders the variables in the current directory (shown in the VARmenu) to the order specified.
The names that appear first in the list will be the first to appear in the VAR menu. Variables not
specified in the list are placed after the reordered variables.
If the list includes the name of a large subdirectory, there may be insufficient memory to execute
ORDER.

Access:!°MEMORY DIRECTORY L ORDER
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1{ global1 ... globaln }Level 1/Item 1→

See also:

VARS

OVER
Type:
Description:

RPL command
Over Command: Returns a copy to stack level 1 of the object in level 2.

Full Command and Function Reference 3-161

Access:!°STACK OVER
Input/Output:
Level 2

See also:

P2C
Type:
Description:( °is the left-shift of the Nkey).
Level 1

→

obj1
obj2
PICK, ROLL, ROLLD, ROT, SWAP

Level 3

Level 2

Level 1

obj1

obj2

obj1

Command
Takes a list representing a permutation as an argument, and returns the permutation decomposed
into lists that represent cycles.

Access:!Þ PERM

Input:

A list representing a permutation. For example, the list {3,1,2,5,4} defines a permutation P, suchthat P(1)=3, P(2)=1, P(3)=2, P(4)=5, and P(5)=4Output: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)=3Level 1, Item 2: The signature of the permutation, 1 or –1.

Example:Command:Result:Convert the permutation given by {3,4,5,2,1} into cycles:

See also:

C2P, CIRC

PA2B2
Type:
Description:

Function

P2C({3,4,5,2,1}){{{1,3,5},{2,4}},-1}

Takes a prime number, p, such that p=2 orp ≡ 1 modulo 4, and returns a Gaussian integer a + ib
such that p = a2 + b2. This function is useful for factorizing Gaussian integers.

Access:Arithmetic, !Þ INTEGER L

Input:A prime number, p, such that p=2 orp ≡ 1

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).

See also:

GAUSS

modulo 4

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 acomplex-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 thefollowing 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 cornerof 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• (xmax, ymax) is a complex number specifying the upper right corner of PICT (the upper rightcorner 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 list containing a name that specifies the independent variable, and two numbers
specifying the minimum and maximum values for the independent variable (the plotting range).
Note that the default value is X. If X is not modified and included in a list with a plotting
range, the values in (xmin, ymin) and (xmax, ymax) are used as the plotting range, which generally
leads to meaningless results.
• 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 equal to 1/130 of thedifference between the maximum and minimum values in indep (the plotting range).
• 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 PARAMETRIC
places the name PARAMETRIC in PPAR.
• depend is a name specifying a label for the vertical axis. The default value is Y.
The contents of EQ must be an expression or program; it cannot be an equation. It is evaluatedfor each value of the independent variable. The results, which must be complex numbers, give thecoordinates of the points to be plotted. Lines are drawn between plotted points unless flag –31 isset.
Access:…µ PARAMETRIC
Flags:
Simultaneous Plotting (–28), Curve Filling (–31)
Input/Output: None
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARSURFACE,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICEPARITYType:
Description:

Command
Parity Command: Sets the parity value in the reserved variable IOPAR.
Legal values are shown below. A negative value means the calculator does not check parity on
bytes received during Kermit transfers or with SRECV. Parity is still used during datatransmission, however.
n-Value

Meaning0

no parity (the default value)

1

odd parity

2even parity

3

mark

4

space

For more information, refer to the reserved variable IOPAR in appendix D, “Reserved
Variables”.
Access:…µPARITY
Input/Output:
Level 1/Argument 1

nparity
See also:

Level 1/Item 1→

BAUD, CKSM, TRANSIO

Full Command and Function Reference 3-163

PARSURFACEType:
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 isviewed.
• 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
See also:
BAR, CONIC, DIFFEQ, FAST3D, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,
PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICEPARTFRACType:
Description:

CommandAccess: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:

Performs partial fraction decomposition on a partial fraction.

1------------2
x –1

Command:

PARTFRAC(1/(X^2-1))

3-164 Full Command and Function ReferenceResult:
See also:

PATH
Type:
Description:

Access:
Input/Output:

1/2/(X-1)+-1/2/(X+1)

PROPFRAC
CommandCurrent Path Command: Returns a list specifying the path to the current directory.
The first directory is always HOME, and the last directory is always the current directory.
If a program needs to switch to a specific directory, it can do so by evaluating a directory list, suchas one created earlier by PATH.
( °is the left-shift of the Nkey).
!°MEMORY DIRECTORY PATH
Level 1/Argument 1

Level 1/Item 1→{ HOME directory-name1 ... directory-namen }See also:

CRDIR, HOME, PGDIR, UPDIR

PCAR
Type:

Command

Description:

Returns the characteristic polynomial of an n × n matrix.

Access:Matrices, !Ø L EIGENVECTORS

Input:A square matrix.

Output:

The characteristic polynomial of the matrix.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Find the characteristic polynomial of the following matrix:
5 8 164 1 8– 4 – 4 – 11

Command:Result:See also:

PCOEF
Type:
Description:

PCAR([[5,8,16][4,1,8][-4,-4,-11]])X^3+5*X^2+3*X-9

JORDAN, PMINI
CommandMonic Polynomial Coefficients Command: Returns the coefficients of a monic polynomial (apolynomial with a leading coefficient of 1) having specific roots.
The argument must be a real or complex array of length n containing the polynomial’s roots. The
result is a real or complex vector of length n+1 containing the coefficients listed from highest
order to lowest, with a leading coefficient of 1.

Access:!Þ POLYNOMIAL LL PCOEF
Input/Output:( Þis the left-shift of the 1key).

Level 1/Argument 1

Example:Command:Result:See also:

Level 1/Item 1[ array ]roots
Find the polynomial that has the roots 2, –3, 4, –5:→[ array ]coefficients[ 2 –3 4 –5 ] PCOEF[ 1 2 –25 –26 120 ], representing the polynomial x4 + 2x3 - 25x2 - 26x + 120.

PEVAL, PROOT

Full Command and Function Reference 3-165

PCONTOURType:
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 scalarfunction 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 isviewed.
• 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
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE

PCOV
Type:
Description:

CommandPopulation Covariance Command: Returns the population covariance of the independent anddependent 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 theirdefault values (1 and 2).
The population covariance is calculated with the following formula:
1 n--- ∑ ( xkn1 – x n 1 ) ( x kn2 – x n2 )nk = 1

where

x kn 1n

is the kth coordinate value in columnn 1 x kn 2,
is the kth coordinate value in the

x

n1 xn
n
, 2 is the mean of the data in column 2 ,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Access:…µ PCOV
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

PDIM
Type:
Description:

xpcovariance

COLΣ, CORR, COV, PREDX, PREDY, XCOL, YCOL
Command
PICT Dimension Command: Replaces PICT with a blank PICT of the specified dimensions.
If the arguments are complex numbers, PDIM changes the size of PICT and makes the arguments
the new values of (xmin, ymin) and (xmax, ymax) in the reserved variable PPAR. Thus, the scale of asubsequent plot is not changed. If the arguments are binary integers, PPAR remains unchanged,
so the scale of a subsequent plot is changed.
PICT cannot be smaller than 131 pixels wide × 80 pixels high on the HP 50g and 49g+ (64 pixels
high on the HP 48gII) nor wider than 2048 pixels (height is unlimited).

Access:!°PICT PDIM
Input/Output:
Level 2/Argument 1(xmin, ymin)#nwidth( °is the left-shift of the Nkey).
Level 1/Argument 2(xmax, ymax)#mheight

Level 1/Item 1→→

See also:

PMAX, PMINPERINFOType:
Description:
Access:
Input/Output:
See also:

Command
Displays the Periodic Table version and copyright information. It doesn’t affect the stack.
G PERIODIC TABLE PERINFO
None
MOLWT, PERTBL, PTPROP

PERM
Type:
Description:

Function
Permutations Function: Returns the number of possible permutations of n items taken m at atime.
The formula used to calculate Pn,m is:n!
P n, m = -------------------( n – m )!

The arguments n and m must each be less than 1012. If n < m, zero is returned.
Access:!´LPROBABILITY PERM
Flags:
Numerical Results (–3)
Input/Output:
Level 2/Argument 1n'symbn'n'symbn'See also:( ´ is the left-shift of the Pkey).

Level 1/Argument 2mm'symbm''symbm'Level 1/Item 1

→
→
→
→

Pn,m
'PERM(symbn,m)''PERM(n, symbm)''PERM(symbn,symbm)'

COMB, FACT, !

Full Command and Function Reference 3-167

PERTBLType:
Description:
Access:Flags:
Input/Output:
See also:
PEVAL
Type:
Description:

Access:
Input/Output:

CommandStarts the Periodic Table. It doesn’t affect the stack.
G PERIODIC TABLE PERTBL
Units Usage (61), Units Type (60)None
MOLWT, PERINFO, PTPROP
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 listedfrom highest order to lowest, and the value x at which the polynomial is to be evaluated.
…µ PEVAL
Level 2/Argument 1

Example:Command:Result:See also:

Level 1/Argument 2

Level 1/Item 1→[ array ]coefficientsx
Find the polynomial x4 + 2x3 - 25x2 - 26x + 120 at x = 8:p(x)[ 1 2 –25 –26 120 ] 8 PEVAL
3432

PCOEF, PROOT

PGDIR
Type:
Command
Description:
Purge Directory Command: Purges the named directory (whether empty or not).
Access:!°MEMORY DIRECTORY PGDIR( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1

See also:

Level 1/Item 1→'global'
CLVAR, CRDIR, HOME, PATH, PURGE, UPDIR

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:
Ln+1...

L2

L1

objn ...

obj1

n

→

Ln+1

L2

L1

objn ...

obj1

obji

L = Level

See also:

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).

3-168 Full Command and Function ReferenceInput/Output:
L3

L2

L1

obj1

obj2

obj3

→

L4

L3

L2

L1

obj1

obj2

obj3

obj1

L = Level; A = Argument; I =Item

Example:See also:

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 avariable. Note, however, that PICT is not a variable as defined in the calculator: its name cannot bequoted, 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:See also:

PICTUREType:
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
CommandPicture 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 return to stack"
1 DISP 3 WAIT PICTURE »displays a message for 3 seconds, then selects the Picture environment. (The
program indicates a linefeed.)
See also:
PICT, PVIEW, TEXT

PINIT
Type:
Description:

Access:character in theCommand
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 thenpurges 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

Input/Output: None

PIX?
Type:
Description:

Command
Pixel On? Command: Tests whether the specified pixel in PICT is on; returns 1 (true) if the pixel
is on, and 0 (false) if the pixel is off.

Access:!° LPICT L PIX?
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1

See also:

Level 1/Item 1

(x,y)

→

0/1

{ #n #m }→0/1

PIXON, PIXOFFPIXOFFType:
Command
Description:
Pixel Off Command: Turns off the pixel at the specified coordinate in PICT.
( °is the left-shift of the Nkey).
Access:!°LPICT L PIXOFF
Input/Output:
Level 1/Argument 1

See also:

Level 1/Item 1

(x,y)

→

{ #n #m }→PIXON, PIX?

PIXON
Type:
Command
Description:
Pixel On Command: Turns on the pixel at the specified coordinate in PICT.
( °is the left-shift of the Nkey).
Access:!°LPICT LPIXON
Input/Output:
Level 1/Argument 1

See also:

PKT
Type:
Description:

Access:Level 1/Item 1

(x,y)

→

{ #n #m }→PIXOFF, PIX?
Command
Packet Command: Used to send command “packets” (and receive requested data) to a Kermit
server.
To send calculator objects, use SEND.
PKT allows additional commands to be sent to a Kermit server.
The packet data, packet type, and the response to the packet transmission are all in string form.
PKT first does an I (initialization) packet exchange with the Kermit server, then sends the server apacket constructed from the data and packet-type arguments supplied to PKT. The response to
PKT will be either an acknowledging string (possibly blank) or an error packet (see KERRM).
For the type argument, only the first letter is significant.
…µ PKT

3-170 Full Command and Function ReferenceFlags: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.

Input/Output:
Level 2/Argument 1

Example 1:
Example 2:

See also:

PLOT
Type:
Description:
Access:
Input:
Output:Example:Command:Result: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
CommandStores 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))

See also:

PLOT SETUP screen is open with SIN(X) in EQ. SIN(X) is copied to history (LASTARG in RPNmode).
PLOTADD

PLOTADDType:

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(symb)PMAX
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→

Command
PICT Maximum Command: Specifies (x, y) as the coordinates at the upper right corner of thedisplay.
The complex number (x, y) is stored as the second element in the reserved variable PPAR.
…µ PMAX
Level 1/Argument 1

See also:

PMIN
Type:
Description:(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 thedisplay. The complex number (x, y) is stored as the first element in the reserved variable PPAR.

Full Command and Function Reference 3-171

Access:…µ PMIN
Input/Output:
Level 1/Argument 1

See also:

Level 1/Item 1

→

(x,y)
PDIM, PMAX, XRNG, YRNG

PMINI
Type:
Description:

CommandAccess:Matrices, ! Ø LEIGENVECTORS

Input:

An nxn matrix A.

Output:A matrix whose first zero-row contains the minimal polynomial of A. In step-by-step mode,
PMINI shows the row-reduction steps.

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).

Example:Command:Finds the minimal polynomial of a matrix.

Find the minimal polynomial of

01
10

:

PMINI([[0,1][1,0]])1 0 0 10 1 1 0

1
X
2

Result:See also:

POLAR
Type:
Description:

0 0 0 0 X –1

So, the minimal polynomial is X2-1, as it is in the first row to contain entirely
zeros, except for the result.
JORDAN, PCAR
CommandPolar Plot Type Command: Sets the plot type to POLAR.
When the plot type is POLAR, the DRAW command plots the current equation in polar
coordinates, where the independent variable is the polar angle and the dependent variable is theradius. 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 POLAR, the elements of PPAR are used as follows:• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left cornerof 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 rightcorner 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 (theplotting range). The default value of indep is X.

3-172 Full Command and Function Reference• 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
π/90 radians.
• 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 thename 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 andmaximum 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 fullcircle 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

Access:Flags:
Input/Output:
See also:

expr = expr

Each expression is plotted separately. The intersection of thetwo graphs shows where the expressions are equalname = expr

Only the expression is plotted…µ POLAR
Simultaneous Plotting (–28), Curve Filling (–31)
NoneBAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME, YSLICEPOLYNOMIALType: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
MODULAR, REWRITE, TESTS, TRIGO

POP
Type:

CommandAccess:
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.

See also:

PUSH, RCLF, STOF

Description:

Full Command and Function Reference 3-173

POS
Type:
Description:

Access:Command
Position Command: Returns the position of a substring within a string or the position of an
object within a list.
If there is no match for obj or substring, POS returns zero.
!°LCHARS POS( °is the left-shift of the Nkey).
!°LIST ELEM POS( °is the left-shift of the Nkey).

@& N POS
Input/Output:

See also:

POTENTIAL
Type:
Description:

Level 2/Argument 1

Level 1/Argument 2“string”“substring”

→

n

obj

→

n

{ list }CHR, NUM, REPL, SIZE, SUB

Level 1/Item 1

CommandFind the potential field function describing a field whose vector gradient is input. This commandis the opposite of DERIV. Given a vector V it attempts to return a function U such that grad U
is equal to V; ∇U = V . For this to be possible, CURL(V) must be zero, otherwise the command
reports a “Bad Argument Value” error. Step-by-step mode is available with this command.

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 function U of the variables that is the potential from which V is derived. 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 confirm that this command is the opposite of DERIV, use the output of the example in
DERIV, and show that the result is the same as the input given in the DERIV example. Find thefunction of the spatial variables x, y, and z whose gradient is:(4xy+z)i + (2x2 + 6yz)j + (x+3y2)kCommand:

POTENTIAL([4*X*Y+Z, 2*X^2+6*Y*Z, X+3*Y^2], [X,Y,Z])
EXPAND(ANS(1))

Result:

2*Y*X^2+Z*X+3*Z*Y^2

See also:

DERIV, VPOTENTIALPOWEXPAND
Type:
Function
Description:
Rewrites an expression raised to a power as a product. If followed by repeated execution of
DISTRIB allows an expression to be expanded fully, step by step.
Access:!Ú REWRITE L

Input:An expression raised to a power.

3-174 Full Command and Function ReferenceOutput:

The result from applying the distributive property of exponentiation over multiplication.

Flags: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)

POWMODType:
Description:

Function

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:

Raises an object (number or expression) to the specified power, and expresses the result modulo
the current modulus.

CommandPrint 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:
Array { 2 3 }
Row 1
1] 1
2] 2
3] 3
Row 2
1] 4
2] 5
3] 6

Full Command and Function Reference 3-175

Access:
Flags:…µ PR1I/O Device (–33), Printing Device (–34), Double-spaced Printing (–37), Linefeed (–38), I/O
Device for Wire (–78). If flag –34 is set, flag –33 must be clear.

Input/Output:
Level 1/Argument 1

See also:

PREDV
Type:
Description:

Level 1/Item 1→
objectCR, DELAY, OLDPRT, PRLCD, PRST, PRSTC, PRVAR

objectCommandPredicted 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.
PREDV is the same as PREDY. See PREDY.

Access:…µ PREDV
Input/Output:
Level 1/Argument 1

xindependent
See also:

PREDX
Type:
Description:

Level 1/Item 1→

ydependent

PREDY
CommandPredicted x-Value Command: Returns the predicted independent-variable value xindependent, basedon the dependent-variable value ydependent, 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 andstored in the reserved variable ΣPAR. For the linear statistical model, the equation used is this:ydependent = (mxindependent) + b

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 PREDX are listed in the LR entry.
If PREDX is executed without having previously generated regression coefficients in ΣPAR, adefault value of zero is used for both regression coefficients, and an error results.
Access:…µ PREDX
Input/Output:
Level 1/Argument 1

Example:See also:

Level 1/Item 1→
ydependent
xindependent
Given five columns of data in ΣDAT, the command sequence:
2 XCOL 5 YCOL LOGFIT LR 23 PREDX
sets column 2 as the independent variable column, sets column 5 as the dependent variablecolumn, and sets the logarithmic statistical model. It then executes LR, generating intercept andslope regression coefficients, and storing them in ΣPAR. Then, given a dependent value of 23, it
returns a predicted independent value based on the regression coefficients and the statisticalmodel.
COLΣ, CORR, COV, EXPFIT, ΣLINE, LINFIT, LOGFIT, LR, PREDY, PWRFIT, XCOL,
YCOL

3-176 Full Command and Function ReferencePREDYType:
Description:

CommandPredicted 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 andstored in the reserved variable ΣPAR. For the linear statistical model, the equation used is this:ydependent = (mxindependent) + b

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, adefault 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.
Access:…µ PREDY
Input/Output:
Level 1/Argument 1

Example:See also:

PREVALType:
Description:

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 variablecolumn, 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,YCOLFunctionWith respect to the current default variable, returns the difference between the values of afunction 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:3

3∫0 ( x + 3 x ) dx
Command:

PREVAL(INTVX(X^3+3*X),0,3)

Full Command and Function Reference 3-177

Result:

135/4

PREVPRIMEType:
Function
Description:

Given an integer, finds the closest prime number smaller than the integer. Like ISPRIME?, it uses
a pseudoprime check for large numbers.

Access:Arithmetic, !Þ INTEGER L

Input:

An integer or an expression that evaluates to an integer.

Output:

The closest prime number smaller than the integer.

Example:Command:Result:Find the closest, smaller prime number to 145.
PREVPRIME(145)

See also:

ISPRIME?, NEXTPRIME

139

PRLCD
Type:
Description:

CommandPrint LCD Command: Prints a pixel-by-pixel image of the current display (excluding theannunciators).
The width of the printed image of characters in the display is narrower using PRLCD than using aprint command such as PR1. The difference results from the spacing between characters. On thedisplay there is a single blank column between characters, and PRLCD prints this spacing. Print
commands such as PR1 print two blank columns between adjacent characters.
Access:…µ PRLCD
Flags:
I/O Device (–33), Printing Device (–34), Double-spaced Printing (–37), Linefeed (–38). Flag –38
must be clear, I/O Device for Wire (–78). If flag –34 is set, flag –33 must be clear.
Input/Output: None
Example:The command sequence ERASE DRAW PRLCD clears PICT, plots the current equation, thenprints the graphics display.
See also:
CR, DELAY, OLDPRT, PRST, PRSTC, PRVAR, PR1

PROMPTType:
Description:

Access:
Input/Output:

CommandPrompt Command: Displays the contents of “prompt” in the status area, and halts program
execution.
PROMPT is equivalent to 1 DISP 1 FREEZE HALT.
!°LIN LPROMPT( °is the left-shift of the Nkey).
Level 1/Argument 1

See also:

Level 1/Item 1→“prompt”
CONT, DISP, FREEZE, HALT, INFORM, INPUT, MSGBOXPROMPTSTO
Type:
Command
Description:
Prompt Command: Creates a variable with the name supplied as an argument, prompts for avalue, and stores the value you enter in the variable.
Access:…µPROMPTSTO

3-178 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Level 1/Item 1→“global”
See also:

PROOT
Type:
Description:

PROMPT, STO
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 coefficientapproaches zero, a root of the polynomial approaches infinity: therefore, if flag –22 is clear (thedefault), 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 realcoefficients, 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 ]See also:
PCOEF, PEVALPROPFRACType:
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:

Command3

x +4------------2
xCommand:Result:PROPFRAC((X^3+4)/X^2))
X+(4/X^2)

Full Command and Function Reference 3-179

PRST
Type:
Description:

CommandPrint Stack Command: Prints all objects in the stack, starting with the object on the highest level.
Objects are printed in multiline printer format. See the PR1 entry for a description of multiline
printer format.
Access:…µ PRST
Flags:
I/O Device (–33), Printing Device (–34), Double-spaced Printing (–37), Linefeed (–38), I/O
Device for Wire (–78). If flag –34 is set, flag –33 must be clear. Generally, flag –38 should beclear.
Input/Output: None
See also:
CR, DELAY, OLDPRT, PRLCD, PRSTC, PRVAR, PR1

PRSTC
Type:
Description:

CommandPrint Stack (Compact) Command: Prints in compact form all objects in the stack, starting with theobject on the highest level.
If flag –34 is set (printer output directed to the serial port), flag –33 must be clear.
When flag –38 is set, linefeeds are not added at the end of each print line. Generally, flag –38
should be clear for execution of PRSTC.
Compact printer format is the same as compact display format. Multiline objects are truncatedand appear on one line only.

…µ PRSTCI/O Device (–33), Printing Device (–34), Double-spaced Printing (–37), Linefeed (–38), I/O
Device for Wire (–78)
Input/Output: None
See also:
CR, DELAY, OLDPRT, PRLCD, PRST, PRVAR, PR1

Access:Flags:PRVAR
Type:
Description:

Access:Flags:

CommandPrint Variable Command: Searches the current directory path or port for the specified variables
and prints the name and contents of each variable.
Objects are printed in multiline printer format. See the PR1 entry for a description of multiline
printer format.
If flag –34 is set (printer output directed to the serial port), flag –33 must be clear.
When flag –38 is set, linefeeds are not added at the end of each print line. Generally, flag –38
should be clear for execution of PRVAR.
…µ PRVARI/O Device (–33), Printing Device (–34), Double-spaced Printing (–37), Linefeed (–38), I/O
Device for Wire (–78). If flag –34 is set, flag –33 must be clear. Generally, flag –38 should beclear.

Input/Output:
Level 1/Argument 1

See also:→'name'→{ name1 name2 ... }→:nport : 'global'
CR, DELAY, OLDPRT, PR1, PRLCD, PRST, PRSTC

3-180 Full Command and Function Reference

Level 1/Item 1

PSDEVType:
Description:

CommandPopulation Standard Deviation Command: Calculates the population standard deviation of eachof 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:n21--- ∑ ( 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

See also:

PSI
Type:
Description:
Access:
Input:
Output:Flags:
See also:

Psi
Type:
Description:

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), andnumeric 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 thenatural logarithm (ln) of the gamma function. The function can be represented as follows:′Γ (z )dΨ ( z ) = ----- ( ln Γ ( z )) = -----------Γ (z)dz

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), andnumeric mode must not be set (flag –3 clear), if symbolic results are wanted. For example, withthese 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.

See also:

PSI

Full Command and Function Reference 3-181

PTAYLType:
Description:

Function

Access:Arithmetic, !Þ POLYNOMIAL LL

Input:

Level 2/Argument 1: A polynomial, P.
Level 1/Argument 2: A number, a.

Output:A polynomial, Q such that Q(x – a)=P(x).

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 polynomial Q(x) such that
Q(x-2)=x2+3x+2.

Command:Result:PTPROPType:
Description:

Access:Flags:
Input/Output:

Example 1:
Example 2:
See also:

PURGE
Type:
Description:

Returns the Taylor polynomial at x = a for a specified polynomial.

PTAYL(X^2+3*X+2, 2)X^2+7*X+12

Function
Returns the specified property for the specified element. It takes the element’s atomic number or
symbol as a name (with certain restrictions) and the property number. It returns the property,
usually a value or a string. It chooses to use or not use units according to the Units Usage flag
(flag 61: SI units if clear, no units if set). If you use PTPROP as an algebraic function, you must
use the symbol to define the element — you can’t use its atomic number.
See Appendix B for a full list of available properties.
G PERIODIC TABLE PTPROP
Units Usage (61)Level 2

Level 1'symb'x

Level 1→“string” or x or x_unit or 'name'→yx“string” or x or x_unit or 'name'
The command sequence 'Hg' 6 PTPROP returns "[Xe]4f14·5d10·6s2".
The command sequence 79 8 PTPROP returns 1337.58 when flag 61 is set.
MOLWT, PERINFO, PERTBL
CommandPurge Command: Purges the named variables or empty subdirectories from the current directory.
PURGE executed in a program does not save its argument for recovery by LASTARG.
To empty a named directory before purging it, use PGDIR.
To help prepare a list of variables for purging, use VARS.
Purging PICT replaces the current graphics object with a 0 × 0 graphics object.
If a list of objects (with global names, backup objects, library objects, or PICT) for purging
contains an invalid object, then the objects preceding the invalid object are purged, and the error
Bad Argument Type occurs.
To purge a library or backup object, tag the library number or backup name with the appropriate
port number (:nport), which must be in the range from 0 to 3. For a backup object, the port

3-182 Full Command and Function Referencenumber can be replaced with the wildcard character &, in which case the calculator will searchports 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” internallyby stack pointers (such as an object on the stack, in a local variable, on the LAST stack, or on aninternal return stack). This produces the error Object in Use. To avoid these restrictions, use
NEWOB before purging. (See NEWOB.)
Access:!°MEMORY PURGE( °is the left-shift of the Nkey).

I PURGE
Input/Output:
Level 1/Argument 1

See also:

PUSH
Type:
Description:

Access:
Input:
Output:See also:

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
CommandPut 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

Input/Output:

Example 1:

Example 2:
Example 3:
See also:

PUTI
Type:
Description:

Access:Flags:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[[ matrix ]]1

nposition

zput→[[ matrix ]]2[[ matrix ]]1{ nrow mcol }

zput

→

[[ matrix ]]2'namematrix'

nposition

zput→'namematrix'{ nrow mcol }

zput

→

[ vector ]1

nposition

zput→[ vector ]2[ vector ]1{ nposition }

zput

→

[ vector ]2'namevector'

nposition

zput→'namevector'{ nposition }

zput

→

{ list }1nposition

objput→{ list }2{ list }1{ nposition }objput→{ list }2'namelist'

nposition

objput→→'namelist'{ nposition }objputThis command sequence:[[ 2 3 4 ][ 4 1 2 ]] { 1 3 } 96 PUT returns[[ 2 3 96 ][ 4 1 2 ]].
The command sequence:[[ 2 3 4 ][ 4 1 2 ]] 5 96 PUT returns [[ 2 3 4 ][ 4 96 2 ]].
The command sequence:{ A B C D E } { 3 } 'Z' PUT returns { A B Z D E }.
GET, GETI, PUTI
CommandPut and Increment Index Command: Replaces the object at a specified position (second input) ina specified array or list (first input) with a specified object (third input), returning a new array orlist together with the next position in the array or list.
For matrices, the position is incremented in row order.
Unlike PUT, PUTI returns a named array or list. This enables a subsequent execution of PUTI at
the next position of a named array or list.
!°LIST ELEMENTS PUTI
( °is the left-shift of the Nkey).
Index Wrap Indicator (–64)

3-184 Full Command and Function ReferenceInput/Output:
L3/A1

L2/A2

L1/A3

L2/I1

L1/I2

[[ matrix ]]1

nposition1

zput

→

[[ matrix ]]2

nposition2[[ matrix ]]1{ nrow mcol }1

zput

→

[[ matrix ]]2{ nrow mcol }2'namematrix'

nposition1

zput

→

'namematrix'

nposition2'namematrix'{ nrow mcol }1

zput

→

'namematrix'{ nrow mcol }2[ vector ]1

nposition1

zput

→

[ vector ]2

nposition2[ vector ]1{ nposition1 }

zput

→

[ vector ]2{ nposition2 }'namevector'

nposition1

zput

→

'namevector'

nposition2'namevector'{ nposition1 }

zput

→

'namevector'{ nposition2 }{ list }1nposition1

objput→{ list }2nposition2{ list }1{ nposition1 }objput→{ list }2{ nposition2 }'namelist'

nposition1

objput→'namelist'

nposition2'namelist'{ nposition1 }objput→'namelist'{ nposition2 }L = Level; A = Argument; I = item

Example:See also:

PVAR
Type:
Description:

The following program uses PUTI and flag –64 to replace A, B, and C in the list with X.
« { A B C } DO 'X' PUTI UNTIL -64 FS? END »GET, GETI, PUT
CommandPopulation Variance Command: Calculates the population variance of the coordinate values ineach of the m columns in the current statistics matrix (ΣDAT).
The population variance (equal to the square of the population standard deviation) is returned as avector of m real numbers, or as a single real number if m = 1. The population variances arecomputed using this formula:n21--- ∑ ( 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:…µ PVAR
Input/Output:
Level 1/Argument 1

See also:

PVARS
Type:
Description:

Level 1/Item 1→

xpvariance→[ xpvariance1, ...,xpvariancem ]MEAN, PCOV, PSDEV, SDEV, VAR
Command
Port-Variables Command: Returns a list of the backup objects (:nport:name) and the library objects(:nport:nlibrary) in the specified port. Also returns the available memory size (RAM).
The port number, nport, must be in the range from 0 to 2.

Full Command and Function Reference 3-185

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

See also:

PVIEW
Type:
Description:

Access:Level 2/Item 1

Level 1/Item 2

nport

→

{ :nport :namebackup ... }memorynport→{ :nport :nlibrary ... }memoryPVARS, VARS
Command
PICT View Command: Displays PICT with the specified coordinate at the upper left corner ofthe 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), thegraphics 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 withscrolling 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
and Picture menu, execute PICTURE.
( °is the left-shift of the Nkey).
!°LPICT L PVIEW!°LOUT PVIEW( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1(x,y){ #n, #m }{}Example:See also:

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, TEXTPWRFITType:
Description:

CommandPower 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
See also:
BESTFIT, EXPFIT, LINFIT, LOGFIT, LR

3-186 Full Command and Function Reference

PX→C
Type:
Description:

Access:
Input/Output:

Command
Pixel to Complex Command: Converts the specified pixel coordinates to user-unit coordinates.
The user-unit coordinates are derived from the (xmin, ymin) and (xmax, ymax) parameters in thereserved variable PPAR. The coordinates correspond to the geometrical center of the pixel.
( °is the left-shift of the Nkey).
!°LPICT LPX→C
Level 1/Argument 1{ #n #m }See also:→Q
Type:
Description:

Level 1/Item 1

→

(x,y)

C→PX
CommandTo Quotient Command: Returns a rational form of the argument.
The rational result is a “best guess”, since there might be more than one rational expression
consistent with the argument. →Q finds a quotient of integers that agrees with the argument towithin the number of decimal places specified by the display format mode.
→Q also acts on numbers that are part of algebraic expressions or equations.

(Ú is the left-shift of the 6key).
Access:„Ú REWRITE L→Q
Flags:
Number Display Format (–45 to –50)
Input/Output:
Level 1/Argument 1

Example:See also:→QπType:
Description:

Access:Flags:

x(x,y)'symb1''Y+2.5' →Q returns 'Y+5/2'→Qπ, /, XQ

Level 1/Item 1

→
→
→

'a/b'
'a/b + c/d*i''symb2'

CommandTo Quotient Times π Command: Returns a rational form of the argument, or a rational form of
the argument with π, square roots, natural logs, and exponentials factored out, whichever yields
the smaller denominator.
The rational result is a “best guess”, since there might be more than one rational expression
consistent with the argument. →Qπ finds a quotient of integers that agrees with the argument to
the number of decimal places specified by the display format mode.
→Qπ also acts on numbers that are part of algebraic expressions or equations.
For a complex argument, the real or imaginary part (or both) can have π as a factor.
(Ú is the left-shift of the 6key).
„Ú REWRITE L →Qπ
Number Display Format (–45 to –50)

Full Command and Function Reference 3-187

Input/Output:
Level 1/Argument 1

Example:See also:qr
Type:
Description:

Access:
Input/Output:x→'a/b*̟'

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
See also:

QR
Type:
Description:

Access:Level 1/Item 1→

Level 2/Item 1

Level 1/Item 2[[ matrix ]]Q[[ matrix ]]R

LQ, LSQ
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.
!Ø FACTORIZATION QR( Ø is the left-shift of the 5key).

!´ MATRIX FACTORS QR( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1[[ matrix ]]A
See also:

QUAD
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.
…µ QUADPrincipal Solution (–1)

3-188 Full Command and Function ReferenceInput/Output:
Level 2/Argument 1

Level 1/Argument 2'symb1''global'COLCT, EXPAN, ISOL, SHOW, SOLVE

See also:

Level 1/Item 1→'symb2'QUOT
Type:Description:

Function

Access:Arithmetic, !Þ POLYNOMIAL !«Input:

Level 2/Argument 1: The numerator polynomial.
Level 1/Argument 2: The denominator polynomial.

Output:The quotient of 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).

Example:Command:Result:Find the quotient of the division of x + 6 x + 11 x + 6 by x + 5 x + 6 .

See also:

REMAINDER, DIV2, IQUOT

Returns the quotient part of the Euclidean division of two polynomials.

3

X+1

Access:
Input/Output:

Function
Quote Argument Function: Returns its argument unevaluated.
When an algebraic expression is evaluated, the arguments to a function in the expression areevaluated before the function. For example, when SIN(X) is evaluated, the name X is evaluatedfirst, and the result is placed on the stack as the argument for SIN.
This process creates a problem for functions that require symbolic arguments. For example, theintegration function requires as one of its arguments a name specifying the variable of integration.
If evaluating an integral expression caused the name to be evaluated, the result of evaluation
would be left on the stack for the integral, rather than the name itself. To avoid this problem, thecalculator automatically (and invisibly) quotes such arguments. When the quoted argument isevaluated, the unquoted argument is returned.
If a user-defined function takes symbolic arguments, quote the arguments using QUOTE.
…µQUOTE
Level 1/Argument 1

See also:

2

QUOT(X^3+6*X^2+11*X+6, X^2+5*X+6)

QUOTE
Type:
Description:

Example:2

Level 1/Item 1

→
obj
obj
The following user-defined function ArcLen calculates the arc length of a function:« → start end expr var« start end expr var ˆ SQ 1 + ƒ var »»`OArcLen K
To use this user-defined function in an algebraic expression, the symbolic arguments must bequoted:'ArcLen(0,π,QUOTE(SIN(X)),QUOTE(X))'
APPLY, | (Where)

Full Command and Function Reference 3-189

QXA
Type:
Description:

CommandAccess:!Ø QUADF, !Ú MATRX

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:

Expresses a quadratic form in matrix form.

2x + xy + y2Command:Result:QXA(X^2+X*Y+Y^2, [X,Y])

See also:

AXQ, GAUSS, SYLVESTER

RAD
Type:
Description:

Access:{[[1,1/2][1/2,1]],[X,Y]}

Command
Radians Mode Command: Sets Radians angle mode.
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.
„& H ANGLE RAD„°L MODES ANGLE RAD
Input/Output: None
See also:
DEG, GRAD

RAND
Type:
Description:

Access:
Input/Output:( °is the left-shift of the Nkey).

Command
Random Number Command: Returns a pseudo-random number generated using a seed value,
and updates the 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 computedfrom 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).
Level 1/Argument 1

Level 1/Item 1→
See also:

COMB, PERM RDZ, !

RANK
Type:
Description:

CommandMatrix Rank Command: Returns the rank of a rectangular matrix.

3-190 Full Command and Function Reference

xrandomAccess:
Flags:
Input/Output:

Rank is computed by calculating the singular values of the matrix and counting the number of
non-negligible values. If all computed singular values are zero, RANK returns zero. Otherwise
RANK consults flag –54 as follows:• If flag –54 is clear (the default), RANK counts all computed singular values that are less than orequal to 1.E–14 times the largest computed singular value.
• If flag –54 is set, RANK counts all nonzero computed singular values.
!Ø OPERATIONS L RANK
( Ø is the left-shift of the 5key).
!´ MATRIX NORMALIZE L RANKSingular Value (–54)( ´ is the left-shift of the Pkey).

Level 1/Argument 1

Level 1/Item 1[[ matrix ]]See also:

RANM
Type:
Description:

Access:→Nrank

LQ, LSQ, QR
Command
Random Matrix Command: Returns a matrix of specified dimensions that contains random
integers in the range –9 through 9.
The probability of a particular nonzero digit occurring is 0.05; the probability of 0 occurring is 0.1.
( Ø is the left-shift of the 5key).
!Ø CREATE LLRANM!´MATRIX MAKE RANM

( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

See also:

RATIO
Type:
Description:

Access:Level 1/Item 1

{mn}

→

[[ random matrix ]]m×n[[ matrix ]]m×n→[[ random matrix ]]m×n

RAND, RDZ
Function
Prefix Divide Function: Prefix form of / (divide).
RATIO is identical to / (divide), except that, in algebraic syntax, RATIO is a prefix function, while/ is an infix function. For example, RATIO(A,2) is equivalent to A/2.
…µ RATIO

Full Command and Function Reference 3-191

Input/Output:

See also:

RCEQ
Type:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

z1[ array ][ array ]z'symb''symb1'#n1n1#n1x_unit1xx_unit'symb'
x_unitz2{[ matrix ]]z'symb'
z'symb2'n2#n2#n2y_unit2y_unityx_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 fromthe 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/Argument 1

Level 1/Item 1→
See also:

RCI
Type:
Description:

Access:

objEQ

STEQ
CommandMultiply Row by Constant Command: Multiplies row n of a matrix (or element n of a vector) by aconstant 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( ´ is the left-shift of the Pkey).

Input/Output:

See also:

RCIJ
Type:
Description:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[[ matrix ]]1

xfactornrow number→[[ matrix ]]3[ vector ]1

xfactornelement number→[ vector ]2

RCIJ
Command
Add Multiplied Row Command: Multiplies row i of a matrix by a constant xfactor, adds thisproduct 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

by a constant xfactor, adds this product to element j of the vector, and returns the modified vector.
RCIJ rounds the row numbers to the nearest integer, and treats vector arguments as column
vectors.
Access:!Ø CREATE ROW RCIJ

( Ø is the left-shift of the 5key).

!´ MATRIX ROW RCIJ

( ´ is the left-shift of the Pkey).

Input/Output:
Level 4/Argument 1 Level 3/Argument 2 Level 2/Argument 3 Level 1/Argument 4

See also:

RCL
Type:
Description:[[ matrix ]]1

xfactornrow inrow j→ [[ matrix ]]2[ vector ]1

xfactornelement i

nelement j→

Command Operation
Recall Command: Returns the unevaluated contents of a specified variable.
RCL searches the entire current path, starting with the current directory. To search a different
path, specify { path name }, where path is the new path to the variable name. The path subdirectory
does not become the current subdirectory (unlike EVAL).
To recall a library or backup object, tag the library number or backup name with the appropriate
port number (nport), which must be an integer in the range 0 to 3. Recalling a backup object bringsa copy of its contents to the stack, not the entire backup object.
To search for a backup object, replace the port number with the wildcard character &, in whichcase the calculator will search (in order) ports 0 through 3, and the main memory for the named
backup object.
You can specify a port (that is, nport) in one of two ways:• H, 0, 1, 2, or 3
• H, R, E, F, or SD
In each case, the ports are home, RAM, extended RAM, flash memory, and the plug-in SD cardslot, respectively.
( ©is the left-shift of the Kkey).
Level 1/Argument 1

RCLALARM
Type:
Description:[ vector ]2

RCI

Access:!©
Input/Output:

See also:

Level 1/Item 1

Level 1/Item 1

'obj'

→

obj

PICT

→

grob

:nport :nlibrary→obj:nport :namebackup→

obj:nport :{ path }

→

obj

STO
Command
Recall Alarm Command: Recalls a specified alarm.
objaction is the alarm execution action. If an execution action was not specified, objaction defaults toan empty string.
xrepeat is the repeat interval in clock ticks, where 1 clock tick equals 1/8192 second. If a repeat
interval was not specified, the default is 0.
Full Command and Function Reference 3-193

Access:…ÓTools ALRM RCLALARM( Ó is the right-shift of the 9 key).

…&9ALRM RCLALARM„°LLTIME ALRM RCLALARM( °is the left-shift of the Nkey).

Level 1/Argument 1

Level 1/Item 1

Input/Output:

See also:

RCLF
Type:
Description:

Access:Flags:
Input/Output:

nindexDELALARM, FINDALARM, STOALARM→

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 thecorresponding flag is clear. The rightmost (least significant) bit of #nsystem and #nuser indicate thestates 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
Binary Integer Wordsize (–5 through –10)

( °is the left-shift of the Nkey).

Level 1/Argument 1

Level 1/Item 1→
See also:

RCLKEYSType:
Description:

Access:Flags:
Input/Output:

RCLMENU
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, itscolumn 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
Level 1/Argument 1

See also:{ date time objaction xrepeat }Level 1/Item 1→{ obj1, xkey 1, ... ,objn, xkey n }→{ S, obj1, xkey 1, ... objn, xkey n }ASN, DELKEYS, STOKEYS
Command
Recall Menu Number Command: Returns the menu number of the currently displayed menu.
xmenu has the form mm.pp, where mm is the menu number and pp is the page of the menu.

3-194 Full Command and Function ReferenceExecuting RCLMENU when the current menu is a user-defined menu (build by TMENU)
returns 0.01 (in 2 Fix mode), indicating “Last menu”.
Access:„&HMENU RCLMENU„°LMODES MENU RCLMENU( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Level 1/Item 1→

Example:See also:

xmenu
If the third page of the PRG STACK menu is currently active, RCLMENU returns 73.03.
MENU, TMENU

RCLVX
Type:
Description:

CommandAccess:Catalog, …µInput:

None.

Output:Level 1/Item 1: The name of the current CAS variable.

See also:

STOVX

RCLΣ
Type:
Description:

Access:
Input/Output:

Returns the name or list of names stored in the current CAS variable. This is the same action asrecalling the contents of the variable VX in the CASDIR directory.

Command
Recall Sigma Command: Returns the current statistical matrix (the contents of reserved variable
ΣDAT) from the current directory.
To recall ΣDAT from the parent directory (when ΣDAT doesn’t exist in the current directory),
evaluate the name ΣDAT.
…µ RCLΣ (or …ΣDAT after pressing J)
Level 1/Argument 1

Level 1/Item 1→

obj

See also:CLΣ, STOΣ, Σ+, Σ–

RCWS
Type:
Description:

Command
Recall Wordsize Command: Returns the current wordsize in bits (1 through 64).

Access:…ãL RCWS(ã 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

Level 1/Item 1→
See also:

RDM
Type:
Description:nBIN, DEC, HEX, OCT, STWS
Command
Redimension Array Command: Rearranges the elements of the argument according to specified
dimensions.

Full Command and Function Reference 3-195

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 thecontents of the variable.
Access:!Ø CREATE LLRDM( Ø is the left-shift of the 5key).

!´MATRIX MAKE RDM( ´ is the left-shift of the Pkey).

Input/Output:

Example 1:
Example 2:
See also:

RDZ
Type:
Description:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1[ vector ]1{ nelements }→[ 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
See also:

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.
(ßis the right-shift of the 1key).
…ßL RE
Numerical Results (–3)

3-196 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:

RECN
Type:
Description:

Access:Flags:

Level 1/Item 1

x

→

x

x_unit

→

x

(x,y)

→

x

[ R-array ]→[ R-array ][ C-array ]→[ R-array ]'symb'→'RE(symb')

C→R, IM, R→C
Command
Receive Renamed Object Command: Prepares the calculator to receive a file from another Kermit
server device, and to store the file in a specified variable.
RECN is identical to RECV except that the name under which the received data is stored isspecified.
…µ RECNI/O Device flag (–33), I/O Data Format (–35), RECV Overwrite (–36), I/O Messages (–39), I/O
Device for Wire (–78)

Input/Output:
Level 1/Argument 1'name'
See also:

RECT
Type:
Description:

Access:Command
Rectangular Mode Command: Sets Rectangular coordinate mode.
RECT clears flags –15 and –16.
In Rectangular mode, vectors are displayed as rectangular components. Therefore, a 3D vector
would appear as [X Y Z].
„&H ANGLE RECT„°L MODES ANGLE RECT
Input/Output: None
See also:
CYLIN, SPHERE

Access:→→“name”
BAUD, CKSM, CLOSEIO, FINISH, KERRM, KGET, PARITY, RECV, SEND, SERVER,
TRANSIO„´VECTOR L RECT

RECV
Type:
Description:

Level 1/Item 1( ´is the left-shift of the Pkey).
( °is the left-shift of the Nkey).

Command
Receive Object Command: Instructs the calculator to look for a named file from another Kermit
server device. The received file is stored in a variable named by the sender.
Since the calculator does not normally look for incoming Kermit files, you must use RECV to tell
it to do so.
…µ RECV
Full Command and Function Reference 3-197

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
See also:
BAUD, CKSM, FINISH, KGET, PARITY, RECN, SEND, SERVER, TRANSIO
Flags:REF
Type:
Description:

CommandAccess:Matrices, !Ø LINEAR SYSTEMS

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.

See also:

rref, RREFMODReduces a matrix to echelon form. This is a subdiagonal reduction (Gauss, not Gauss-Jordan).

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 x + 6 x + 11 x + 6 by x + 5 x + 6 .

See also:

QUOT

3

2

2

REMAINDER(X^3+6*X^2+11*X+6, X^2+5*X+6)0

RENAMEType:
Command
Description:
Rename Object Command: Renames an object to the name that you specify.
Access:…µ RENAME
Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

new 'name'old 'name'

COPY

3-198 Full Command and Function Reference

Level 1/Item 1→

REORDER
Type:
Description:

Function
Given a polynomial expression and a variable, reorders the variables in the expression in the orderof powers set on the CAS Modes screen, that is, either in increasing or decreasing order.

Access:Catalog, …µInput:

Level 2/Argument 1: The polynomial expression.
Level 1/Argument 2: The variable with respect to which the reordering is performed.

Output:

The reordered 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) if the polynomial contains complex terms.
The polynomial terms order flag (flag –114) must be set for increasing power order, or clear (thedefault) for decreasing power order.

Example:Reorder the polynomial x2 + 2y2 +2x +3y in order of powers of y. Assume that increasing powermode has been set in the CAS modes.

Command:Result:REPEATType:
Description:

REORDER(X^2+2*Y^2+2*X+6+3*Y, Y)
2*Y^2+3*Y+(X^2+2*X)

Command
REPEAT Command: Starts loop clause in WHILE … REPEAT … END indefinite loop
structure.
See the WHILE entry for more information.

Access:!°BRANCH WHILE REPEAT
Input/Output: None
See also:
END, WHILE

REPL
Type:
Description:

Access:( °is the left-shift of the Nkey).

CommandReplace Command: Replaces a portion of the target object (first input) with a specified object(third input), beginning at a specified position (second input).
For arrays, nposition counts in row order. For matrices, nposition specifies the new location of theupper left-hand element of the replacement matrix.
For graphics objects, the upper left corner of grob1 is positioned at the user-unit or pixel
coordinates (x,y) or { #n #m }. From there, it overwrites a rectangular portion of grobtarget or
PICT. If grob1 extends past grobtarget or PICT in either direction, it is truncated in that direction. If
the specified coordinate is not on the target graphics object, the target graphics object does notchange.
!°LIST REPL

( °is the left-shift of the Nkey).

Full Command and Function Reference 3-199

Input/Output:

Example 1:

Example 2:
Example 3:

See also:

RES
Type:
Description:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[[ matrix ]]1

nposition[[ matrix ]]2→[[ matrix ]]3[[ matrix ]]1{ nrow, ncolumn }[[ matrix ]]2→[[ matrix ]]3[ vector ]1

nposition[ vector ]2→[ vector ]3{ listtarget }nposition{ list1 }→{ listresult }“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 corneris positioned at (0,0) in PICT.
CHR, GOR, GXOR, NUM, POS, SIZE, SUB
CommandResolution Command: Specifies the resolution of mathematical and statistical plots, where theresolution 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 theinterval 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 TypeDefault 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)

GRIDMAPRES does not apply

HISTOGRAM

10 pixels (bin width = 10 pixel columns)

PARAMETRIC[independent variable range in user units]/130

PARSURFACERES does not apply

3-200 Full Command and Function ReferencePlot TypeDefault Interval

PCONTOURRES does not apply

POLAR

2°, 2 grads, or π/90 radians

SCATTERRES does not apply

SLOPEFIELD

RES does not apply

WIREFRAMERES 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
See also:

RESTOREType:
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:See also:→
backupTo 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
ARCHIVERESULTANTType:
Function
Description:

Returns the resultant of two polynomials of the current variable. That is, it returns thedeterminant 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

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 either input contains complex terms.

Example:Obtain the resultant of the two polynomials
x3-px+q and 3x2-p.

Command:Result:RESULTANT(X^3-P*X+Q, 3*X^2-P)
27*Q^2-4*P^3

REVLISTType:
Command
Description:Reverse List Command: Reverses the order of the elements in a list.
Access:!°LIST PROCEDURES REVLIST ( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1{ objn ... obj1 }Level 1/Item 1→{ obj1 ... objn }See also:

SORT

REWRITEType:

Command

Description:

Displays a menu or list of CAS operations that rewrite expressions.

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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
MODULAR, POLYNOMIAL, TESTS, TRIGO

RISCH
Type:
Description:

Function

Access:
Input:
Output:Flags:

Example:Performs symbolic integration on a function using the Risch algorithm. RISCH is similar to the
INTVX command, except that it allows you to specify the variable of integration.
Calculus !Ö DERIV. & INTEG L.
Level 2/Argument 1: The function to integrate.
Level 1/Argument 2: The variable of integration.
The antiderivative of the function with respect to the variable.
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 antiderivative of the following function, with respect to y:2

y + 3y + 2

Command:Result:See also:

RISCH(Y^2-3*Y+2,Y)
1/3*Y^3-3*(1/2*Y^2)+2*Y

IBP, INT, INTVX

3-202 Full Command and Function Reference

RKF
Type:
Description:

Access:
Input/Output:

Command
Solve for Initial Values (Runge–Kutta–Fehlberg) Command: Computes the solution to an initialvalue 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 theright-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
L3/A1

L2/A2

L1/A3

{ list }xtol

xT final{ xtol xhstep }xT final{ list }

L2/I1

L1/I2

→

{ list }xtol→{ list }xtol

L = Level; A = Argument; I = item

Example:Solve the following initial value problem for y(8), given that y(0) = 0:1y′ =− 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.
2
1+ t
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 atolerance: 0.00001.
6. Enter the final value for the independent variable: 8.
The stack should look like this:{ T Y F }See also:

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

CommandError 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 theright-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

• error displays the absolute error for that step. A zero error indicates that the Runge–Kutta–
Fehlberg method failed and that Euler’s method was used instead.
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.)

Access:…µ RKFE
Input/Output:
L2/A1

L1/A2

{ list }

h

→

L4/I1

L3/I2

L2/I3

L1/I4

{ list }hydeltaerror

L = Level; A = Argument; I = item

See also:

RKFSTEPType:
Description:

RKF, RKFSTEP, RRK, RRKSTEP, RSBERR
Command
Next Solution Step for RKF Command: Computes the next solution step (hnext) to 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 theright-hand side of the differential equation (or a variable where the expression is stored).
• xtol sets the tolerance value.
• h specifies the initial candidate step.
• hnext is the next candidate step.
The independent and solution variables must have values stored in them. RKFSTEP steps thesevariables to the next point upon completion.
Note that the actual step used by RKFSTEP will be less than the input value h if the global error
tolerance is not satisfied by that value. If a stringent global error tolerance forces RKFSTEP to
reduce its stepsize to the point that the Runge–Kutta–Fehlberg methods fails, then RKFSTEP
will use the Euler method to compute the next solution step and will consider the error tolerance
satisfied. The Runge-Kutta-Fehlberg method will fail if the current independent variable is zeroand the stepsize ≤ 1.3 × 10-498 or if the variable is nonzero and the stepsize is 1.3 × 10-10 times its
magnitude.

Access:…µ RKFS
Input/Output:
L3/A1

L2/An

L1/An+1{ list }

xtol

h

→

L3/I1

L2/I2

L1/I3

{ list }

xtol

hnext

L = Level; A = Argument; I = item

See also:

RL
Type:
Description:
Access:Flags:

RKF, RKFERR, RRK, RRKSTEP, RSBERR
Command
Rotate Left Command: Rotates a binary integer one bit to the left.
The leftmost bit of #n1 becomes the rightmost bit of #n2.
… ãBIT RL(ã is the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)

3-204 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Level 1/Item 1→#n1
See also:

RLB
Type:
Description:
Access:Flags:
Input/Output:#n2

RLB, RR, RRB
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/Argument 1

Level 1/Item 1→#n1
See also:

RND
Type:
Description:

RL, RR, RRB
FunctionRound 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

Example 1:
Example 2:

Effect on Level 2 Argument

0 through 11

Rounded to n decimal places.

–1 through –11

Rounded to n significant digits.

12

Access:Flags:
Input/Output:#n2

Rounded to the current display format.

For complex numbers and arrays, each real number element is rounded. For unit objects, thenumerical part of the object is rounded.
!´ REAL LL RND( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

nround→z2z'symbround'→'RND(symbround)''symb'

nround→'RND(symb,nround)''symb1''symbround'→'RND('symb1, symbround)'[ array1 ]nround→[ array2 ]x_unitnround→y_unit→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

See also:

RNRM
Type:
Description:

Access:TRNC
CommandRow Norm Command: Returns the row norm (infinity norm) of its argument array.
The row norm is the maximum (over all rows) of the sums of the absolute values of all elementsin each row. For a vector, the row norm is the largest absolute value of any of its elements.
!Ø OPERATIONS LRNRM ( Ø is the left-shift of the 5key).
!´ MATRIX NORMALIZE RNRM ( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

See also:

ROLL
Type:
Description:

Level 1/Item 1→[ array ]CNRM, CROSS, DET, DOT

xrow norm

RPL command
Roll Objects Command: Moves the contents of a specified level to level 1, and rolls upwards the
portion of the stack beneath the specified level.
In RPN mode, 3 ROLL is equivalent to ROT.

Access:!°STACK LROLL
Input/Output:( °is the left-shift of the Nkey).

Ln+1... L2

L1

objn ... obj1n→

Ln ...

L2

L1

objn–1 ...

obj1

objn

L = Level

See also:

ROLLD
Type:
Description:

OVER, PICK, ROLLD, ROT, SWAP
RPL command
Roll Down Command: Moves the contents of level 2 to a specified level, n, and rolls downward
the portion of the stack beneath the specified level.

Access:!°STACK LROLLD
Input/Output:( °is the left-shift of the Nkey).

Ln+1... L2

L1

objn ... obj2n (obj1)→

Ln

Ln–1 ...

L1

obj1

objn ...

obj2

L = Level

See also:

OVER, PICK, ROLL, ROT, SWAP

ROMUPLOAD
Type:
Command
Description:
This command remains from earlier HP graphing calculators and should not be used. It was used
to transfer the ROM from one HP 49G to another.
Access:…µ ROMUPLOAD

3-206 Full Command and Function Reference

ROOT
Type:
Description:

Access:
Input/Output:

ROT
Type:
Description:

Access:
Input/Output:

CommandRoot-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 theequation, 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

Level 1/Argument 3

Level 1/Item 1«program»'global'

guess

→

xroot

«program»'global'{ guesses }

→

xroot

'symb''global'

guess

→

xroot

'symb''global'{ guesses }

→

xroot

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.
!°STACK ROT( °is the left-shift of the Nkey).
L3

L2

obj3

obj2

L1

→

obj1

L3

L2

L1

obj2

obj1

obj3

L = Level

See also:

ROW–
Type:
Description:

Access:

OVER, PICK, ROLL, ROLLD, SWAP, UNROT
CommandDelete Row Command: Deletes row n of a matrix (or element n of a vector), and returns themodified 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:

See also:

Level 2/Argument 1

Level 1/Argument 2[[ matrix ]]1

nrow
nelement[ vector ]1
COL–, COL+, ROW+, RSWP

Level 2/Item 1

Level 1/Item 2→[[ matrix ]]2[ vector ]row→

[ vector ]2elementn

Full Command and Function Reference 3-207

ROW+
Type:
Description:

Access:CommandInsert Row Command: Inserts an array into a matrix (or one or more numbers into a vector) at
the position indicated by nindex, and returns the modified matrix (or vector).
The inserted array must have the same number of columns as the target array.
nindex is rounded to the nearest integer. The original array is redimensioned to include the newcolumns or elements, and the elements at and below the insertion point are shifted down.
!Ø CRREATE ROW ROW+

( Ø is the left-shift of the 5key).

!´ MATRIX ROW ROW+

( ´ is the left-shift of the Pkey).

Input/Output:

See also:

ROW→
Type:
Description:

Access:Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3[[ matrix ]]1[[ matrix ]]2

nindex→[[ matrix ]]3[[ matrix ]]1[ vector ]row

nindex→[[ matrix ]]2

nelement

nindex→[ vector ]2[ vector ]1
COL–, COL+, ROW–, RSWP

Level 1/Item 1

CommandRows to Matrix Command: Transforms a series of row vectors and a row count into a matrix
containing those rows, or transforms a sequence of numbers and an element count into a vector
with those numbers as elements.
( Ø is the left-shift of the 5key).
!Ø CREATE ROW ROW→!´ MATRIX ROW ROW→

( ´ is the left-shift of the Pkey).

Input/Output:
Ln+1/A1 7

L2/An

L1/An+1

Level 1/Item 1[ vector ]row 1 +[ vector ]row n

nrow count→[[ matrix ]]element1 +elementn

nelement count→[ vector ]column

L = Level; A = Argument; I = item

See also:

→ROW
Type:
Description:

Access:→COL, COL→, →ROW
CommandMatrix to Rows Command: Transforms a matrix into a series of row vectors, returning thevectors and row count, or transforms a vector into its elements, returning the elements andelement count.
( Ø is the left-shift of the 5key).
!Ø CREATE ROW →ROW!´ MATRIX ROW →ROW

( ´ is the left-shift of the Pkey).

Input/Output:
L1/Argument1[[ matrix ]][ vector ]Ln+1/I1 7 L2/In

L1/In+1→[ vector ]row n … [ vector ]row n

nrowcount→element1 … elementn

nelementcount

L =Level; A = Argument; I = Item

See also:→COL, COL→, ROW→

3-208 Full Command and Function Reference

RPL>
Type:
Description:

Access:
Input/Output:

CommandUser 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 thecommand 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>
Level 1/Argument 1

Level 1/Item 1

→

RR
Type:
Description:
Access: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).
!´ BASE L BIT RR

Flags:
Input/Output:( ´ 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

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 eighttimes.
…ãL BYTE RRB(ã is the right-shift of the 3key).
( ´ 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)
Level 1/Argument 1#n1
See also:#n2

RL, RLB, RRB!´BASE L BYTE RRB
Flags:
Input/Output:

Level 1/Item 1→#n1
See also:

obj

Level 1/Item 1→#n2

RL, RLB, RR

Full Command and Function Reference 3-209

rref
Type:
Description:

CommandAccess:PSOLVE, Matrices, !Ø LINEAR SYSTEMS

Input:A matrix.

Output:Level 2/Item 1: The pivot points.

Reduces a matrix to row-reduced echelon form, and provides a list of pivot points.

Level 1/Item 2: An equivalent matrix in row reduced echelon 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, and find the pivot points, for the matrix:

2 1
3 4
Command:Result:rref([[2,1][3,4]]){Pivots: {5,1.,2,1.},[[10,0][0,5]]}

See also:

RREFMOD

RREF
Type:
Description:

Command
Reduces a matrix to row-reduced echelon form. The reduction is carried out completely, so asquare matrix is reduced to an identity matrix. Step-by-step mode can be used to show how the
reduction proceeds.

Access:Matrices, !Ø LINEAR SYSTEMS, !´ MATRX

Input:A matrix.

Output:An equivalent matrix in row reduced echelon form.

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).

Example:Solve the system of linear equations:
3x + 4y = 5
5x + 6y = 7
by reducing the augmented matrix that represents this system.

Command:Result:See also:

RREF([[3, 4, 5] [ 5, 6, 7]])[[1, 0, -1] [0, 1, 2]]This reduced matrix represents the system:
1x + 0y = –1
0x + 1y = 2
so that the solution is x = –1, y = 2 .
rref, RREFMOD

3-210 Full Command and Function Reference

FACTRRREFMODType:
Description:

CommandAccess: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:

Performs modular row-reduction to echelon form on a matrix, modulo the current modulus.

2 1
3 4
Command:Result:See also:

RRK
Type:
Description:

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 theexpression is stored).
– The partial derivative of y'(t) with respect to the independent variable (or a variable where theexpression 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

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

Example:Solve the following initial value problem for y(8), given that y(0) = 0:1y′ =− 2 y 2 = f (t , y )1+ t 2

Full Command and Function Reference 3-211

The derivative of the function with respect to y (∂f/∂y) is –4y, and the derivative of the function− 2twith respect to t (∂f/∂t) is.
(1 + t 2 ) 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.
2
1+ t
4. Store ∂f/∂y, –4y, in FY.
− 2t
5. Store ∂f/∂t,, in FT.
(1 + t 2 ) 2
6. Enter these five items in a list: { T Y F FY FT }.
7. Enter the tolerance. Use estimated decimal place accuracy as a guideline for choosing atolerance: 0.00001.
8. Enter the final value for the independent variable: 8.
The stack should look like this:{ T Y F FY FT }See also:

RRKSTEPType:
Description:.000018
9. Press RRK. 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.
RKF, RKFERR, RKFSTEP, RRKSTEP, RSBERR

Command
Next Solution Step and Method (RKF or RRK) Command: Computes the next solution step
(hnext) to an initial value problem for a differential equation, and displays the method used to arriveat that result.
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 theexpression is stored).
– The partial derivative of y'(t) with respect to the independent variable (or a variable where theexpression is stored).
• xtol is the tolerance value.
• h specifies the initial candidate step.
• last specifies the last method used (RKF = 1, RRK = 2). If this is the first time you are using
RRKSTEP, enter 0.
• current displays the current method used to arrive at the next step.
• hnext is the next candidate step.
The independent and solution variables must have values stored in them. RRKSTEP steps thesevariables to the next point upon completion.
Note that the actual step used by RRKSTEP will be less than the input value h if the global error
tolerance is not satisfied by that value. If a stringent global error tolerance forces RRKSTEP to
reduce its stepsize to the point that the Runge–Kutta–Fehlberg or Rosenbrock methods fails, then

3-212 Full Command and Function ReferenceAccess:
Input/Output:

RRKSTEP will use the Euler method to compute the next solution step and will consider theerror tolerance satisfied. The Rosenbrock method will fail if the current independent variable iszero 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
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

See also:

RSBERR
Type:
Description:

Access:
Input/Output:

RKF, RKFERR, RKFSTEP, RRK, RSBERR
CommandError Estimate for Rosenbrock Method Command: Returns an error estimate for a given step hwhen 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 theexpression is stored).
– The partial derivative of y'(t) with respect to the independent variable (or a variable where theexpression 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 theestimated 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 thesolution.) A zero error indicates that the Rosenbrock method failed and Euler’s method wasused instead.
…µ RSBER
L2/A1

L1/A2

{ list }

h

→

L4/I1

L3/I2

L2/I3

L1/I4

{ list }hydeltaerror

L = Level; A = Argument; I = item

See also:

RSD
Type:
Description:

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 thenumber 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 thenumber of rows of B if B is a matrix.
Full Command and Function Reference 3-213

• B and Z must both be vectors or both be matrices.
• B and Z must have the same number of columns if they are matrices.
RSD is typically used for computing a correction to Z, where Z has been obtained as an
approximation to the solution X to the system of equations AX = B.

Access:!Ø OPERATIONS LRSD

( Ø is the left-shift of the 5key).

!´ MATRIX LRSD

( ´ is the left-shift of the Pkey).

Input/Output:

See also:

RSWP
Type:
Description:

Access:Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[ vector ]B[[ matrix ]]A[ vector ]Z→[ vector ]B–AZ[[ matrix ]]B[[ matrix ]]A[[ matrix ]]Z→[[ matrix ]]B–AZ

DET, IDN
CommandRow Swap Command: Swaps rows i and j of a matrix and returns the modified matrix, or swaps
elements i and j of a vector and returns the modified vector.
Row numbers are rounded to the nearest integer. Vector arguments are treated as column vectors.
( Ø is the left-shift of the 5key).
!Ø CREATE ROW LRSWP!´ MATRIX ROW LRSWP( ´ is the left-shift of the Pkey).

Input/Output:
Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3[[ matrix ]]1

nrow inrow j→[[ matrix ]]2

nelement i

nelement j→[ vector ]2

See also:[ vector ]1
CSWP, ROW+, ROW–

RULES
Type:
Description:
Access:
Input/Output:

Command
Displays a list of names of individuals involved with the HP 49G calculator project.
…µ RULES
None

R→B
Type:
Description:

Level 1/Item 1

Command
Real to Binary Command: Converts a positive real to its binary integer equivalent.
For any value of n ≤ 0, the result is # 0. For any value of n ≥ 1.84467440738E19 (base 10), theresult is # FFFFFFFFFFFFFFFF (base 16).

Access:…ãR→B(ã is the right-shift of the 3key).
Flags:
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Input/Output:
Level 1/Argument 1n
See also:

B→R

3-214 Full Command and Function Reference

Level 1/Item 1

→

#n

R→C
Type:
Description:

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.

Access:!°TYPE L R→C
Input/Output:

See also:

R→D
Type:
Description:

Access:Flags:
Input/Output:( °is the left-shift of the Nkey).

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

(x,y)

[ R-array1 ][ R-array2 ]→[ C-array ]C→R, IM, RE
Function
Radians to Degrees Function: Converts a real number expressed in radians to its equivalent indegrees.
This function operates independently of the angle mode.
!´REAL LLR→D( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 1/Argument 1

Level 1/Item 1x→(180/̟)x'symb'→'R→D(symb)'

See also:

D→R

R→I
Type:
Description:

Function
Converts a real number to an integer.

Access:Flags:
Input:
Output:See also:!Ú 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

SAME
Type:
Description:

Access:CommandSame 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/Output:
Level 2/Argument 1

Example 1:
Example 2:
Example 3:
See also:

Level 1/Argument 2

obj1
obj2
{ A B } (4,5) SAME returns 0.
{ A B } { B A } SAME returns 0.
"CATS" "CATS" SAME returns 1.
TYPE, ==

Level 1/Item 1

→

0/1

SBRK
Type:
Description:

Command
Serial Break Command: Interrupts serial transmission or reception.
SBRK is typically used when a problem occurs in a serial data transmission.
Access:…µ SBRK
Flags:
I/O Device (–33), I/O Device for Wire (–78)
Input/Output: None
See also:
BUFLEN, SRECV, STIME, XMIT

SCALE
Type:
Description:

Access:
Input/Output:

Command
Scale Plot Command: Adjusts the first two parameters in PPAR, (xmin, ymin) and (xmax, ymax), sothat xscale and yscale are the new plot horizontal and vertical scales, and the center point doesn’tchange.
The scale in either direction is the number of user units per tick mark. The default scale in both
directions is 1 user-unit per tick mark.
…µ SCALE
Level 2/Argument 1

See also:

SCALEHType:
Description:

Access:
Input/Output:

Level 1/Argument 2

xscaleyscaleAUTO, CENTR, SCALEH, SCALEW

Level 1/Item 1→

CommandMultiply Height Command: Multiplies the vertical plot scale by xfactor.
Executing SCALEH changes the y-axis display range — the ymin and ymax components of the firsttwo complex numbers in the reserved variable PPAR. The plot origin (the user-unit coordinate of
the center pixel) is not changed.
…µSCALEH
Level 1/Argument 1

xfactorLevel 1/Item 1→

See also:

AUTO, SCALEW, YRNGSCALEWType:
Description:

CommandMultiply Width Command: Multiplies the horizontal plot scale by xfactor.

3-216 Full Command and Function ReferenceExecuting SCALEW changes the x-axis display range—the xmin and xmax components of the firsttwo complex numbers in the reserved variable PPAR. The plot origin (the user-unit coordinate of
the center pixel) is not changed.
Access:…µSCALEW
Input/Output:
Level 1/Argument 1

xfactorSee also:

Level 1/Item 1→

AUTO, SCALEH, XRNGSCATRPLOTType:
Command
Description:
Draw Scatter Plot Command: Draws a scatterplot of (x, y) data points from the specified columnsof the current statistics matrix (reserved variable ΣDAT ).
The data columns plotted are specified by XCOL and YCOL, and are stored as the first two
parameters in the reserved variable ΣPAR. If no data columns are specified, columns 1(independent) and 2 (dependent) are selected by default. The y-axis is autoscaled and the plot typeis set to SCATTER.
When SCATRPLOT is executed from a program, the resulting display does not persist unless
PICTURE or PVIEW is subsequently executed.
Access:…µ SCATRPLOT
Input/Output: None
Example: The following program plots a scatter plot of the data in columns 3 and 4 of ΣDAT, draws a best fit
line, and displays the plot:« 3 XCOL 4 YCOL SCATRPLOT BESTFIT ΣLINE STEQFUNCTION DRAW { # 0d # 0d } PVIEW 7 FREEZE »See also:
BARPLOT, PICTURE, HISTPLOT, PVIEW, SCLΣ, XCOL, YCOLSCATTERType:
Description:

Command
Scatter Plot Type Command: Sets the plot type to SCATTER.
When the plot type is SCATTER, the DRAW command plots points by obtaining x and ycoordinates from two columns of the current statistics matrix (reserved variable ΣDAT). The
columns are specified by the first and second parameters in the reserved variable ΣPAR (using the
XCOL and YCOL commands). 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 SCATTER, the elements of PPAR are used as follows:• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left cornerof 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 rightcorner 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. The default value of indep is X.
• res is not used.
• 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).

Full Command and Function Reference 3-217

• 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
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SLOPEFIELD, TRUTH, WIREFRAME, YSLICE

SCHUR
Type:
Description:

Access:Command
Schur Decomposition of a Square Matrix Command: Returns the Schur decomposition of asquare 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 isupper block triangular with 1 × 1 or 2 × 2 diagonal blocks where the 2 × 2 blocks havecomplex 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).

Input/Output:
Level 1/Argument 1[[ matrix ]]A
See also:

SCI
Type:
Description:

Access:→Level 2/Item 1

Level 1/Item 2[[ matrix ]]Q[[ matrix ]]T

LQ, LU, QR, SVD, SVL, TRN
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).

Input/Output:
Level 1/Argument 1

Example:See also:

SCLΣ
Type:
Description:

Level 1/Item 1→n
The number 103.6 in Scientific mode to four decimal places appears as 1.0360E2.
ENG, FIX, STD
Command
Scale Sigma Command: Adjusts (xmin, y min) and (xmax, ymax) in PPAR so that a subsequent scatterplot 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.

3-218 Full Command and Function ReferenceAccess:…µ SCLΣ
Input/Output: None
See also:
AUTO, SCATRPLOT

SCONJ
Type:
Description:
Access:
Input/Output:

CommandStore Conjugate Command: Conjugates the contents of a named object.
The named object must be a number, an array, or an algebraic object. For information on
conjugation, see CONJ.
!°MEMORY ARITHMETIC LSCONJ ( °is the left-shift of the Nkey).
Level 1/Argument 1

Level 1/Item 1→'name'
See also:

SCROLLType:
Description:
Access:
Input/Output:

CONJ, SINV, SNEG
Command
Displays any object. This is the programmable equivalent of pressing I%VIEW% and is the best
way to view any object larger than the screen, such as complicated algebraic expressions.
…µ SCROLL
Level 1/Argument 1

Level 1/Item 1

→

Grob

SDEV
Type:
Description:

CommandStandard Deviation Command: Calculates the sample standard deviation of each of the mcolumns of coordinate values in the current statistics matrix (reserved variable ΣDAT).
SDEV returns a vector of m real numbers, or a single real number if m = 1. The standard
deviation (the square root of the variances) is computed using this formula:2
1 n------------ ∑ ( x i – x )n – 1i = 1

where xi is the ith coordinate value in a column, x is the mean of the data in this column, and n is
the number of data points.
Access:…µ SDEV
Input/Output:
Level 1/Argument 1

Level 1/Item 1

→

xsdev

→

[ xsdev 1 xsdev 2 ... xsdev m ]See also:MAXΣ, MEAN, MINΣ, PSDEV, PVAR, TOT, VAR

SEND
Type:
Description:

Command
Send Object Command: Sends a copy of the named objects to a Kermit device.

Full Command and Function Reference 3-219

Access:
Flags:

Data is always sent from a local Kermit, but can be sent either to another local Kermit (whichmust 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

Example 1:
Example 2:
See also:

SEQ
Type:
Description:

Access:
Input/Output:

Level 1/Item 1'name'→{ name1 ... namen }→→{{ nameold namenew } name ... }Executing {{ AAA BBB }} SEND sends the variable named AAA but changes its nameto 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
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 localname. 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 thatindex 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 }L = Level; A = Argument; I = item

Example 1:
Example 2:
See also:'n^2' 'n' 1 4 1 returns { 1 4 9 16 }.
« n SQ » 'n' 2 4 1 returns { 4 9 16 }.
DOSUBS, STREAMSERIESType:
Description:

CommandAccess: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 isa. If the function is in terms of the current variable, this can be given as just the value a.

For a given function, computes Taylor series, asymptotic development and limit at finite or
infinite points.

3-220 Full Command and Function ReferenceLevel 1/Argument 3: The order for the series expansion. The minimum value is 2, and the
maximum value is 20.
Output:Level 2/Item 1: A list containing the limit as a value and as the equivalent expression, an
expression approximating the function near the limit point, and the order of the remainder. Theseare expressed in terms of a small parameter h.
Level 1/Item 2: An expression for h in terms of the original variable.

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:Obtain the second order Taylor series expansion of ln(x) at x=1.

See also:

TAYLOR0

SERIES(LN(X),1,2){{Limit: 0, Equiv: h, Expans: -1/2*h^2+h, Remain: h^3}, h=X- 1}

SERVER
Type:
Description:

CommandServer Mode Command: Selects Kermit Server mode.
A Kermit server (a Kermit device in Server mode) passively processes requests sent to it by the
local Kermit. The server receives data in response to SEND, transmits data in response to
KGET, terminates Server mode in response to FINISH or LOGOUT, and transmits a directory
listing in response to a generic directory request.
Access:…µ SERVER
Flags:
I/O Device (–33), I/O Data Format (–35), RECV Overwrite (–36), I/O Messages (–39), I/O
Device for Wire (–78)
Input/Output: None
See also:
BAUD, CKSM, FINISH, KERRM, KGET, PARITY, PKT, RECN, RECV, SEND, TRANSIO

SEVAL
Type:

Function

Description:

Simplifies the given expression. Simplifies the expression except at the highest level, and also
evaluates any existing variables that the expression contains and substitutes these back into theexpression.

Access:Catalog, …µInput:

Level 1/Argument 1: An algebraic expression.

Output:

The expression simplified and with existing variables evaluated.

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:With π stored in the variable Y, and the variables X and Z not in the current path, simplify thefollowing expression. Note that the top-level simplification is not carried out.
Sin(3x – y + 2z – (2x – z)) – Sin(x – 2y + (y + 3z))

Command:Result:SEVAL(SIN(3*X-Y+2*Z-(2*X-Z)) - SIN(X-2*Y+(Y+3*Z))

See also:

EXPAND, SIMPLIFY

SF
Type:
Description:

CommandSet Flag Command: Sets a specified user or system flag.

-SIN(π –(X+3*Z)) -SIN(π –(X+3*Z))

Full Command and Function Reference 3-221

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
See also:

SHOW
Type:
Description:
Access:Flags:
Input/Output:

Example:Command:Result:See also:

SIDENSType:
Description:

Access:Flags:
Input/Output:

Level 1/Item 1

CF, FC?, FC?C, FS?, FS?CCommandShow 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''X-Y+2*C+3*D' { X Y } SHOW
'X-Y+14+15'

COLCT, EXPAN, ISOL, QUAD
Function
Silicon Intrinsic Density Command: Calculates the intrinsic density of silicon as a function oftemperature, 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:

Level 1/Item 1

xT→

xdensity

x_unit→x_1/cm3'symb'→'SIDENS(symb)'

Function
Calculates the discrete antiderivative of a function f with respect to a specified variable. This is afunction G such that:

3-222 Full Command and Function ReferenceG(x + 1) – G(x) = f(x)where x is the specified variable.
Access:!ÖDERIV L

Input:

Level 2/Argument 1: A function
Level 1/Argument 2: The variable to calculate the antiderivative with respect to.

Output:

The discrete antiderivative of the function.

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:Obtain the discrete antiderivative with respect to the variable y of the expression:
2x-2yCommand:Result:SIGMA(2*X-2*Y,Y)-(Y^2 –(2*X+1)*Y)

See also:

SIGMAVX, RISCH

SIGMAVXType:

Function

Description:

Calculates the discrete antiderivative of a function f with respect to the current variable. This is afunction G such that:G(x + 1) – G(x) = f(x)where x is the current variable.

Access:!ÖDERIV LL

Input:

Level 1/Argument 1: A function.

Output:

The discrete antiderivative of the function.

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:Obtain the discrete antiderivative with respect to the current variable x of the expression:
2x-2yCommand:Result:See also:

SIGN
Type:
Description:

SIGMAVX(2*X-2*Y)X^2 –(2*Y+1)*X

SIGMA, RISCH
Function
Sign Function: Returns the sign of a real number argument, the sign of the numerical part of aunit object argument, or the unit vector in the direction of a complex number argument.
For real number and unit object arguments, the sign is defined as +1 for positive arguments, –1
for negative arguments. In exact mode, the sign for argument 0 is undefined (?). In approximate
mode, the sign for argument 0 is 0. SIGN in the !´menu returns the sign of a number, while
SIGN in the …ß menu returns the unit vector of a complex number.
For a complex argument:xiy
SIGN ( x + iy ) = --------------------- + --------------------2
2
2
2
x +y
x +y

Full Command and Function Reference 3-223

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

Level 1/Item 1

z1

→

z2

x_unit→xsign'symb'→

Example 1:
Example 2:
See also:'SIGN(symb)'
32_ft SIGN returns 1.
(1,1) SIGN returns (.707106781187,.707106781187).
ABS, MANT, XPONSIGNTABType:

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).

Example:Command:Show the ranges of values of x for which the expression 2-x2 is positive and negative.

Result:

SIGNTAB(2 – X^2)
{ '-∞' – '-√2' + '√2' – '+∞' }See also:

TABVAR

SIMP2
Type:
Description:

CommandAccess: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:

Simplifies two objects by dividing them by their greatest common divisor.

3

2

x + 6 x + 11 x + 6
3

x – 7x – 6

Command:Result: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See also:

EGCD

SIMPLIFYType:

Command

Description:

Simplifies an expression.

Access:!Ú REWRITE L

Input:An expression

Output:An equivalent simplified expression. SIMPLIFY follows an extensive built-in set of rules, butthese might not give exactly the simplification the user expects.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
SI ( 3 ⋅ X ) + SI ( 7 ⋅ X )---------------------------------------------------------SI ( 5 ⋅ X )Simplify

Example:Command:Result:

4*COS(X)^2 - 2

See also:

COLLECT, EXPAND

SIN
Type:
Description:

Access:Flags:
Input/Output:

SIMPLIFY((SIN(3*X)+SIN(7*X))/SIN(5*X))

Analytic function
Sine Analytic Function: Returns the sine of the argument.
For real arguments, the current angle mode determines the number’s units, unless angular units
are specified.
For complex arguments, sin(x + iy) = sinx coshy + i cosx sinhy.
If the argument for SIN is a unit object, then the specified angular unit overrides the angle modeto determine the result. Integration and differentiation, on the other hand, always observe theangle mode. Therefore, to correctly integrate or differentiate expressions containing SIN with aunit object, the angle mode must be set to radians (since this is a “neutral” mode).
S
Numerical Results (–3), Angle Mode (–17, –18)
Level 1/Argument 1

See also:

ASIN, COS, TAN

SINCOSType:
Description:

Command

Level 1/Item 1

z

→

sin z

x_unitangular→sin(x_unitangular)'symb'→'SIN(symb)'

Converts complex logarithmic and exponential expressions to expressions with trigonometricterms.

Access:Trigonometry, …ÑL, PLEXPLN

Input:An expression with complex linear and exponential terms.

Output:

The expression with logarithmic and exponential subexpressions converted to trigonometric andinverse trigonometric expressions.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Full Command and Function Reference 3-225

Radians mode must be set (flag –17 set).
Must be in complex mode (flag –103 set).
Example:Command:Result:Express eix in trigonometric terms.

See also:

EXPLN

SINH
Type:
Description:
Access:Flags:
Input/Output:

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
Numerical Results (–3)( ´ is the left-shift of the Pkey).

Level 1/Argument 1

See also:

SINV
Type:
Description:
Access:
Input/Output:

Level 1/Item 1z→sinh z'symb'→'SINH(symb)'

ASINH, COSH, TANH
CommandStore 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'
See also:

SIZE
Type:
Description:

Access:Level 1/Item 1→

INV, SCONJ, SNEG
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.
!° LCHARS SIZE
( °is the left-shift of the Nkey).

3-226 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

See also:

SL
Type:
Description:

Access:Flags:
Input/Output:

Level 2/Item 1“string”→

ninteger→n{ list }→n[ vector ]→{n}[[ matrix ]]→{ n m}'symb'

→

n

grob

→

#nwidth#mheight

PICT→#nwidth#mheight

x_unit
CHR, NUM, POS, REPL, SUB→nCommand
Shift Left Command: Shift a binary integer one bit to the left.
The most significant bit is shifted out to the left and lost, while the least significant bit isregenerated as a zero. SL is equivalent to binary multiplication by 2, truncated to the current
wordsize.
!´ BASE LBIT SL( ´ is the left-shift of the Pkey).
…ãL BIT SL(ã is the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1#n1
See also:

SLB
Type:
Description:

Access:Flags:
Input/Output:

Level 1/Item 1→#n2

ASR, SLB, SR, SRB
Command
Shift Left Byte Command: Shifts a binary integer one byte to the left.
The most significant byte is shifted out to the left and lost, while the least significant byte isregenerated as zero. SLB is equivalent to binary multiplication by 28 (256) (or executing SL eighttimes), truncated to the current wordsize.
!´ BASE LBYTE SLB( ´ is the left-shift of the Pkey).
(ã is the right-shift of the 3key).
…ãL BYTE SLB
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1#n1
See also:

Level 1/Item 2

Level 1/Item 1→#n2

ASR, SL, SR, SRB

SLOPEFIELD
Type:
Command
Description:
SLOPEFIELD Plot Type Command: Sets the plot type to SLOPEFIELD.

Full Command and Function Reference 3-227

When plot type is set to SLOPEFIELD, the DRAW command plots a slope representation of ascalar 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 isviewed.
• 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
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, TRUTH, WIREFRAME, YSLICE

SNEG
Type:
Description:
Access:
Input/Output:

CommandStore 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'
See also:

SNRM
Type:
Description:
Access:Level 1/Item 1→

NEG, SCONJ, SINV
CommandSpectral 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 amatrix.
!Ø OPERATIONS L L SNRM
( Ø is the left-shift of the 5key).
!´ MATRIX NORMALIZE SNRM

3-228 Full Command and Function Reference( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

Level 1/Item 1→

See also:[ array ]ABS, CNRM, COND, RNRM, SRAD, TRACE

xspectralnorm

SOLVE
Type:

Command

Description:

Finds zeros of an expression equated to 0, or solves an equation.

Access:Symbolic solve, !Î, P SOLVE, …×L

Input:

Level 2/Argument 1: The expression or equation. A list of equations and expressions can begiven too, each will be solved for the same variable.
Level 1/Argument 2: The variable to solve for.

Output:A zero or solution, or a list of zeros or solutions.

Flags:

Radians mode must be set (flag –17 set).
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.
Radians mode must be set (flag –17 set).
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 1:

Find the zeros of the following expression:
3x –x–9Command:Result:Example 2:
Command:

SOLVE(X^3-X-9,X)
X=2.24004098747

Find the real and complex roots of the two equations:42
x – 1=3 ,x – A= 0
Clear numeric mode, clear approximate mode, set complex mode, set rectangular mode, enter:
SOLVE({X^4-1=3,X^2-A=0},X)

Result:{{X=√2×i,X=√2×-1,X=-(√2×i),X=√2},{X=√A×-1,X=√A}} Note that in this case, imaginary solutions for X are returned, even if X is in

REALASSUME.
See also:

SOLVEQN
Type:
Description:

Access:Flags:
Flags:DESOLVE, LDEC, LINSOLVE, MSLV, QUAD, SOLVEVX

CommandStarts the appropriate solver for a specified set of equations.
SOLVEQN sets up and starts the appropriate solver for the specified set of equations, bypassing
the Equation Library catalogs. It sets EQ (and Mpar if more than one equation is being solved),
sets the unit options according to flags 60 and 61, and starts the appropriate solver.
SOLVEQN uses subject and title numbers (levels 3 and 2) and a “PICT” option (level 1) andreturns nothing. Subject and title numbers are listed in chapter 5. For example, a 2 in level 3 and a
9 in level 2 would specify the Electricity category and Capacitive Energy set of equations. If the“PICT” option is 0, PICT is not affected; otherwise, the equation picture (if any) is copied into
PICT.
…µ SOLVEQN
Unit Type (60), Units Usage (61)Units Type (60), Units Usage (61)Full Command and Function Reference 3-229

Input/Output:
Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

n

m

0/1

See also:

EQNLIB, MSOLVRSOLVER
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

Flags:SOLVEVXType:

Command

Description:

Finds zeros of an expression with respect to the current variable, or solves an equation withrespect 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.

Flags:

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:
3x –x–9Command:Result:See also:

SORT
Type:
Description:

Access:SOLVEVX(X^3-X-9)
X=2.24004098747

Note that if exact mode is set, this example returns a null list as there are no exact solutions to theequation.
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 bycharacter 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).
!° LIST PROCEDURES L SORT

3-230 Full Command and Function Reference( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1→{ list }1
See also:

Level 1/Item 1{ list }2

REVLISTSPHEREType:
Description:

CommandSpherical Mode Command: Sets spherical coordinate mode.
SPHERE sets flags –15 and –16.
In spherical mode, vectors are displayed as polar components.
Access:„&H ANGLE SPHERE
Input/Output: None
See also:
CYLIN, RECT

SQ
Type:
Description:

Access:Flags:
Input/Output:

Analytic function
Square Analytic Function: Returns the square of the argument.
The square of a complex argument (x, y) is the complex number (x2 – y2, 2xy).
Matrix arguments must be square.
!º( º is the left-shift of the Rkey).
Numerical Results (–3)
Level 1/Argument 1

See also:

SR
Type:
Description:

Access:Flags:
Input/Output:

Level 1/Item 1

z

→

z2

x_unit→x2_unit2[[ matrix ]]→[[ matrix × matrix ]]'symb'→'SQ(symb)'√, ^Command
Shift Right Command: Shifts a binary integer one bit to the right.
The least significant bit is shifted out to the right and lost, while the most significant bit isregenerated as a zero. SR is equivalent to binary division by 2.
!´ BASE L BIT SR( ´ is the left-shift of the Pkey).

…ã L BIT SR(ã is the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1#n1

Level 1/Item 1→

See also:

ASR, SL, SLB, SRB

SRAD
Type:
Description:

CommandSpectral Radius Command: Returns the spectral radius of a square matrix.

#n2

Full Command and Function Reference 3-231

The spectral radius of a matrix is a measure of the size of the matrix, and is equal to the absolutevalue of the largest eigenvalue of the matrix.
Access:!Ø OPERATIONS L L SRAD

(Ø is the left-shift of the 5key).

!´ MATRIX NORMALIZE SRAD

( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1[[ matrix ]]n×n
See also:

SRB
Type:
Description:

Access:Flags:
Input/Output:

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 isregenerated 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).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1#n1
See also:

SRECV
Type:
Description:

xspectralradius

Level 1/Item 1→#n2

ASR, SL, SLB, SR
Command
Serial Receive Command: Reads up to n characters from the serial input buffer and returns themas 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
wait for more characters to be received. Instead, it returns the characters already in the input
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 ittries to read the byte where the error occurred. Since these three errors cause the byte where theerror 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Access:
Flags:
Input/Output:

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, newcharacters can enter the input buffer.
…µSRECVI/O Device (–33), I/O Device for Wire (–78)
Level 1/Argument 1

Example:See also:

SREPL
Type:
Description:

Access: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 toread 10 bytes would not indicate an error. Only when SRECV tries to read the byte that caused theframing error does it return a 0. Similarly, if the input buffer overflowed, SRECV would notindicate an error until it tried to read the first byte that was lost due to the overflow.
BUFLEN, CLOSEIO, OPENIO, SBRK, STIME, XMITCommandFind 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:

See also:

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3'string''string''string'

Level 1/Item 1→'string'

REPL

SST
Type:
Description:

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
See also:
NEXT, SST↓

SST↓
Type:
Description:

Operation
Execute Subroutine Step Operation: Returns and executes the next step of a program orsubroutine. 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

See also:

START
Type:
Description:

Access:
Input/Output:

NEXT, SST
Command Operation
START Definite Loop Structure Command: Begins START … NEXT and START … STEP
definite loop structures.
Definite loop structures execute a command or sequence of commands a specified number of times.
• START … NEXT executes a portion of a program a specified number of times.
The RPL syntax is this: xstart xfinish START loop-clause NEXT
The algebraic syntax is this: START(xstart xfinish) loop-clause NEXT
START takes two numbers (xstart and xfinish) from the stack and stores them as the starting andending values for a loop counter. Then the loop clause is executed. NEXT increments thecounter by 1 and tests to see if its value is less than or equal to xfinish. If so, the loop clause is
executed again. Notice that the loop clause is always executed at least once.
• START … STEP works just like START … NEXT, except that it can use an increment value
other than 1. The RPL syntax is this: xstart xfinish START loop-clause xincrement STEP
The algebraic syntax is this: START (xstart xfinish) loop-clause STEP(xincrement)
START takes two numbers (xstart and xfinish) from the stack and stores them as the startingand ending values for the loop counter. Then the loop clause is executed. STEP takes
xincrement from the stack and increments the counter by that value. If the argument of STEP
is an algebraic or a name, it is automatically evaluated to a number.
The increment value can be positive or negative:– If positive, the loop is executed again when the counter is less than or equal to xfinish.
– If negative, the loop is executed when the counter is greater than or equal to xfinish.
!°BRANCH START( °is the left-shift of the Nkey).
Level 2/Argument 1

Level 1/Argument 2

START xstart

xfinishSee also:

STD
Type:
Description:

STEP
FOR, NEXT, STEP

→
→

NEXT
STEP

Level 1/Item 1

xincrement→'symbincrement'→

CommandStandard Mode Command: Sets the number display format to standard mode.
Executing STD has the same effect as clearing flags –49 and –50.
Standard format (ANSI Minimal BASIC Standard X3J2) produces the following results whendisplaying or printing a number.
• Numbers that can be represented exactly as integers with 12 or fewer digits are displayed
without a fraction mark or exponent. Zero is displayed as 0.
• Numbers that can be represented exactly with 12 or fewer digits, but not as integers, aredisplayed with a fraction mark but no exponent. Leading zeros to the left of the fraction markand trailing zeros to the right of the fraction mark are omitted.
• All other numbers are displayed in scientific notation (see SCI) with both a fraction mark (withone number to the left) and an exponent (of one or three digits). There are no leading or trailingzeros.
In algebraic objects, integers less than 103 are always displayed in standard mode.

3-234 Full Command and Function ReferenceAccess:…µ STD
Input/Output: None
Example:The following table provides examples of numbers displayed in Standard mode:
NumberSee also:

STEP
Type:
Description:

Representable With
12 Digits?

Displayed As

1011

100000000000

Yes (integer)

1012

1.E12

No

10-11

.000000000001

Yes

1.2 x 10-11

1.23E-11No

12.34512.345Yes

ENG, FIX, SCI
Command Operation
STEP Command: Defines the increment (step) value, and ends definite loop structure.
See the FOR and START keyword entries for more information.

Access:!°BRANCH START/FOR STEP ( °is the left-shift of the Nkey).
Input/Output: None
See also:
FOR, NEXT, START

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

obj
See also:

STIME
Type:
Description:

Access:Level 1/Item 1→

RCEQ
Command
Serial Time-Out Command: Specifies the period that SRECV (serial reception) and XMIT (serialtransmission) 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, thedefault is 10 seconds. If x is 0, there is no time-out; that is, the device waits indefinitely, which candrain the batteries.
STIME is not used for Kermit time-out.
…µ STIME

Full Command and Function Reference 3-235

Input/Output:
Level 1/Argument 1→

xseconds
See also:

STO
Type:
Description:

Access:
Input/Output:

Example 1:
Example 2:
Example 3:
See also:

STOALARM
Type:
Description:

Level 1/Item 10
BUFLEN, CLOSEIO, SBRK, SRECV, XMIT→CommandStore Command: Stores an object into a specified variable or object.
Storing a graphics object into PICT makes it the current graphics object.
To create a backup object, store the obj into the desired backup location (identified as:nport:namebackup). STO will not overwrite an existing backup object.
To store backup objects and library objects, specify a port number (0 through 3).
After storing a library object in a port, it must then be attached to its directory before it can beused. The easiest way to do this is to execute a warm start (by pressing $& C). This also
causes the calculator to perform a system halt, which clears the stack, the LAST stack, and all local
variables.
STO can also replace a single element of an array or list stored in a variable. Specify the variable inlevel 1 as name(index), which is a user function with index as the argument. The index can be n or
n,m, where n specifies the row position in a vector or list, and n,m specifies the row-and-column
position in a matrix.
K
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

obj'name'

→

grob

PICT

→

obj

:nport :namebackup→

obj'name(index)'→

backupnport→

library

nport

→

→
library:nport :nlibrary'A+B+C+D' 'SUMAD' STO stores the expression A+B+C+D in the variable SUMAD.
5 'A(3)' STO stores the integer 5 in the third element in a list or vector A.
2 'A(3,5)' STO stores the integer 2 in the element in the third row and fifth column of
matrix A.
DEFINE, RCL, →, CommandStore Alarm Command: Stores an alarm in the system alarm list and returns its alarm index
number.
If the argument is a real number xtime, the alarm date will be the current system date by default.
If objaction is a string, the alarm is an appointment alarm, and the string is the alarm message. If
objaction is any other object type, the alarm is a control alarm, and the object is executed when thealarm comes due.
xrepeat is the repeat interval for the alarm in clock ticks, where 8192 ticks equals 1 second.

3-236 Full Command and Function Referencenindex is a real integer identifying the alarm based on its chronological position in the system alarmlist.
(Ó 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

Example:See also:

STOF
Type:
Description:

Level 1/Item 1

xtime

→

nindex{ date time }→nindex{ date time objaction }→nindex→{ date time objaction xrepeat }nindexWith 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
CommandStore 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. Withargument { #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 anduser 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:
Level 1/Argument 1

Level 1/Item 1→#nsystem
See also:

STOKEYSType:
Description:

Access:Flags:{ #nsystem #nuser #nsystem2 #nuser2 }RCLF, PUSH, POP, STWS, RCWS→

CommandStore Key Assignments Command: Defines multiple keys on the user keyboard by assigningobjects 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 theirstandard 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

Input/Output:
Level 1/Argument 1

Level 1/Item 1{ obj1, xkey 1, ... objn, xkey n }→{ S, obj1, xkey 1, ... objn, xkey n }

→

'S'

→

See also:

ASN, DELKEYS, RCLKEYS

STORE
Type:
Description:

Function
Stores a number in a global variable. Given an expression as input, STORE evaluates theexpression and stores the numerical value, unlike DEF which stores the expression.

Access:Catalog, …µInput:

Level 2/Argument 1: A number or an expression that evaluates to a numeric value.
Level 1/Argument 2: The name of the variable in which the number is to be stored. If thisvariable does not already exist in the current directory path then it is created.

Output:Level 1/Item 1: The number to which the first argument is evaluated, and which is stored in thevariable.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:Result:Store in variable Z the result of calculating 17*Y. Assume that Y contains the integer number 2.

See also:

DEF, DEFINE, UNASSIGN

STOVX
Type:

Command

STORE(17*Y, Z)
34

Description:

Stores a name or list of names in the current CAS variable. This is the same as storing into the VX
variable in the CASDIR directory. By default, the CAS variable is called X; this command allows a
program to change that name.

Access:Catalog, …µInput:

Level 1/Argument 1: A name or list of names.

Output:None in RPN mode, NOVAL in Algebraic mode.

See also:

RCLVX

STO+
Type:
Description:

Access:CommandStore Plus Command: Adds a number or other object to the contents of a specified variable.
The object on the stack and the object in the variable must be suitable for addition to each other.
STO+ can add any combination of objects suitable for addition.
Using STO+ to add two arrays (where obj is an array and name is the global name of an array)requires less memory than using the stack to add them.
!°MEMORY ARITHMETIC STO+
( °is the left-shift of the Nkey).

3-238 Full Command and Function ReferenceInput/Output:
Level 2/Argument 1

See also:

STO–
Type:
Description:

Access:
Input/Output:

See also:

STO*
Type:
Description:

Access:
Input/Output:

See also:

STO/
Type:
Description:

obj'name'
STO–, STO*, STO/, +Level 1/Argument 2'name'
obj

Level 1/Item 1→→

CommandStore Minus Command: Calculates the difference between a number (or other object) and thecontents 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 eachother. 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

Level 1/Item 1

obj'name'→'name'
STO+, STO*, STO/, –obj→

CommandStore Times Command: Multiplies the contents of a specified variable by a number or otherobject.
The object on the stack and the object in the variable must be suitable for multiplication witheach 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 anumber and name is the global name of an array) requires less memory than using the stack tomultiply them.
!°MEMORY ARITHMETIC STO* ( °is the left-shift of the Nkey).
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

obj'name'→'name'
STO+, STO–, STO/, *obj→

CommandStore Divide Command: Calculates the quotient of a number (or other object) and the contents ofa 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 eachother. 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:
Input/Output:

See also:

STOΣ
Type:
Description:

Access:
Input/Output:

Using STO/ to divide one array by another array or to divide an array by a number (where obj is
an array or a number and name is the global name of an array) requires less memory than using thestack to divide them.
!°MEMORY ARITHMETIC STO/ ( °is the left-shift of the Nkey).
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

obj'name'→'name'
STO+, STO–, STO*, /obj→

CommandStore Sigma Command: Stores obj in the reserved variable ΣDAT.
STOΣ accepts any object and stores it in ΣDAT. However, if the object is not a matrix or thename of a variable containing a matrix, an Invalid ΣDATA error occurs upon subsequent
execution of a statistics command.
…µ STOΣLevel 1/Argument 1

obj
See also:

STR→
Type:
Description:
Access:
Input/Output:

Level 1/Item 1→

CLΣ, RCLΣ, Σ+, Σ–Command
Evaluate String Command: Evaluates the text of a string as if the text were entered from thecommand line.
OBJ→ also includes this function. STR→ is included for compatibility with the HP 28S.
…µ STR→
Level 1/Argument 1

See also:

→STR
Type:
Description:

Access:Flags:“obj”
ARRY→, DTAG, EQ→, LIST→, OBJ→, →STR

Level 1/Item 1→

evaluated-object

Command
Object to String Command: Converts any object to string form.
The full-precision internal form of a number is not necessarily represented in the result string. To
ensure that →STR preserves the full precision of a number, select Standard number display
format or a wordsize of 64 bits (or both) before executing →STR.
The result string includes the entire object, even if the displayed form of the object is too large to
fit in the display.
If the argument object is normally displayed in two or more lines, the result string will contain
newline characters (character 10) at the end of each line. The newlines are displayed as thecharacter ␍.
If the argument object is already a string, →STR returns the string.
…µ →STR
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12), Number Display
Format (–49, –50)

3-240 Full Command and Function ReferenceInput/Output:
Level 1/Argument 1

Level 1/Item 1→

obj
Example:See also:

STREAMType:
Description:

Access:
Input/Output:“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 takenfrom level 1.
→ARRY, →LIST, STR→, →TAG, →UNIT
CommandStream Execution Command: Moves the first two elements from the list onto the stack, andexecutes obj. Then moves the next element (if any) onto the stack, and executes obj again using theprevious 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/Argument 2

Example 1:
Example 2:
See also:→{ list }obj{ 1 2 3 4 5 } « * » STREAM returns 120.
« + » STREAM is equivalent to ΣLIST.
DOSUBS

STRM
Type:
Description:

CommandStarts the StreamSmart application.

Level 1/Item 1

resultAccess:
GSTREAMSMART
Input/Output: None

STURM
Type:
Description:

CommandAccess: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:

For a polynomial P, STURM returns a list containing Sturm’s sequences of P and theirmultiplicities

3

x +1

Command:Result:

STURM(X^3+1){[1],-1.,[1],1.,[X^3+1,-(3*X^2),-1],1.}

Full Command and Function Reference 3-241

See also:

STURMABSTURMABType:

Command

Description:

For a polynomial P and a closed interval [a, b], STURMAB determines the number of zeroes P has
in [a, b]

Access:Arithmetic, !ÞPOLYNOMIAL !«Input:A polynomial P

Output:A list containing a number that is the same sign as P(a) and the number of zeroes P has in [a, b].

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:For the polynomial:3

x +2

in the interval [-2,0] find the sign at the lower bound, and the number of zeroes
Command:Result:See also:

STWS
Type:
Description:

Access:Flags:
Input/Output:

STURMAB(X^3+2, -2, 0){-6,1}STURM, ZEROS
CommandSet Wordsize Command: Sets the current binary integer wordsize to n bits, where n is a value
from 1 through 64 (the default is 64).
Values of n less than 1 or greater than 64 are interpreted as 1 or 64, respectively.
If the wordsize is smaller than an integer entered on the command line, then the most significant
bits are not displayed upon entry. The truncated bits are still present internally (unless they exceed64), but they are not used for calculations and they are lost when a command uses this binary
integer as an argument.
Results that exceed the given wordsize are also truncated to the wordsize.
!´ BASE LSTWS( ´ is the left-shift of the Pkey).

… ã STWS(ã is the right-shift of the 3key).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 1/Argument 1

See also:

SUB
Type:
Description:

Level 1/Item 1

n

→

#n
BIN, DEC, HEX, OCT, RCWS→

Command Operation
Subset Command: Returns the portion of a string or list defined by specified positions, or returns
the rectangular portion of a graphics object or PICT defined by two corner pixel coordinates.
If nend position is less than nstart position, SUB returns an empty string or list. Values of n less than 1 aretreated as 1; values of n exceeding the length of the string or list are treated as that length.
For graphics objects, a user-unit coordinate less than the minimum user-unit coordinate of thegraphics object is treated as that minimum. A pixel or user-unit coordinate greater than the
maximum pixel or user-unit coordinate of the graphics object is treated as that maximum.

3-242 Full Command and Function ReferenceAccess:!°LIST SUB
Input/Output:( °is the left-shift of the Nkey).

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1[[ matrix ]]1

nstartposition

nendposition→[[ matrix ]]2[[ matrix ]]1{nrow, ncolumn }nendposition→[[ matrix ]]2[[ matrix ]]1

nstartposition{nrow,, ncolumn }→[[ matrix ]]2[[ matrix ]]1{nrow, ncolumn }{nrow,, ncolumn }→[[ matrix ]]2“stringtarget”

nstartposition

nendposition→“stringresult”{ listtarget }nstartposition

nendposition→{ listresult }grobtarget{ #n1, #m1 }{ #n2 #m2 }→grobresult

grobtarget( x 1 , y1 )( x 2 , y2 )→grobresult

PICT{ #n1, #m1 }{ #n2 #m2 }→grobresult

PICT( x 1 , y1 )( x 2 , y2 )→grobresult

See also:{ 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
Type:

Function

Example 1:
Example 2:
Example 3:

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 tosimplify the result:2

x + 3x + 7

Command:

SUBST(X^2+3*X+7,X=Z+1)
EXPAND(ANS(1))

Result:Z^2+5*Z+11

See also:| (where command)

SUBTMODType:
Description:

Function

Access:Arithmetic, !Þ MODULO L

Performs a subtraction, modulo the current modulus.

Full Command and Function Reference 3-243

Input:Level 2/Argument 1: The object or number to be subtracted from.
Level 1/Argument 2: The object or number to subtract.

Output:

The result of the subtraction, 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).

SVD
Type:
Description:

Command
Singular Value Decomposition Command: Returns the singular value decomposition of an m × n
matrix.
SVD decomposes A into 2 matrices and a vector. U is an m × m orthogonal matrix, V is an n × northogonal matrix, and S is a real vector, such that A = U × diag(S) × V . S has length MIN(m,n)
and contains the singular values of A in nonincreasing order. The matrix diag(S) is an m×n
diagonal matrix containing the singular values S.
The computed results should minimize (within computational precision):A – U ⋅ diag ( S ) ⋅ V--------------------------------------------------min ( m, n ) ⋅ A

where diag(S) denotes the m × n diagonal matrix containing the singular values S.
Access:!Ø FACTORIZATION SVD(Ø is the left-shift of the 5key).

!´ MATRIX FACTORS SVD( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

See also:

SVL
Type:
Description:

Access:[[ matrix ]]A
DIAG→, MIN, SVL→

Level 3/Item 1

Level 2/Item 2

Level 1/Item 3[[ matrix ]]U[[ matrix ]]V[ vector ]SCommand
Singular Values Command: Returns the singular values of an m × n matrix.
SLV returns a real vector that contains the singular values of an m × n matrix in non-increasingorder. The vector has length MIN(m,n).
!Ø FACTORIZATION LSVL (Ø is the left-shift of the 5key).
!´ MATRIX FACTORS LSVL ( ´ is the left-shift of the Pkey).

Input/Output:
Level 1/Argument 1

Level 1/Item 1→[[ matrix ]]See also:

MIN, SVD

SWAP
Type:
Description:

RPL Command
Swap Objects Command: Swaps the position of the two inputs.

Access:!°STACK SWAP

[ vector ]( °is the left-shift of the Nkey).

™ in RPN mode executes SWAP when no command line is present.
Input/Output:
Level 2

Level 1

obj1

obj2

3-244 Full Command and Function Reference→

Level 2

Level 1

obj2

obj1

DUP, DUPN, DUP2, OVER, PICK, ROLL, ROLLD, ROT

See also:

SYSEVALType:
Description:

Command
Evaluate System Object Command: Evaluates unnamed operating system objects specified bytheir memory addresses.
WARNING: Use extreme care when executing this function. Using SYSEVAL withrandom 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

Example:See also:

Level 1/Item 1→#naddress
Display the version string of a calculator by executing #2F389h SYSEVAL. This should
display "HPHP49-C".
EVAL, LIBEVAL, FLASHEVALSYLVESTERType:
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:

QUADF

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:!Ú MATRX, Matrices, !Ø LINEAR SYSTEMS

Input:

Level 2/Argument 1: A vector containing a system of linear equations. An expression with noequal 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 notexist 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).
Full Command and Function Reference 3-245

Example:

Convert this system to a matrix:
X–Y=0
2X + Y = 5

Command:

SYST2MAT([X-Y, 2*X+Y=5],[X, Y])

Result:1 –1 02 1 –5%T
Type:
Description:

Access:Flags:
Input/Output:

Example 1:
Example 2:
See also:

Function
Percent of Total Function: Returns the percent of the first argument that is represented by thesecond argument.
If both arguments are unit objects, the units must be consistent with each other.
The dimensions of a unit object are dropped from the result, but units are part of the calculation.
For more information on using temperature units with arithmetic functions, refer to the entry for+.
!´ REAL %T( ´ is the left-shift of the Pkey).
Numerical Results (–3)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

100y/xx'symb'→'%T(x,symb)''symb'x→'%T(symb,x)''symb1''symb2'→'%T(symb1, symb2)'

x_unit1y_unit2→100y_unit2/x_unit1

x_unit'symb'→'%T(x_unit,symb)'→'symb'
x_unit'%T(symb,x_unit)'
1_m 500_cm %T returns 500, because 500 cm represents 500% of 1 m.
100_K 50_K %T returns 50.
+, %, %CH

TABVALType:
Description:

CommandAccess:PGRAPH L, !ÖGRAPHL

Input:

Level 2/Argument 1: An algebraic expression in terms of the current variable.
Level 1/Argument 2: A list of values for which the expression is to be evaluated.

Output:Level 2/Item 1: The algebraic expression.
Level 1/Item 2: A list containing two lists: a list of the values and a list of the corresponding
results.

Flags:Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).

Example:Command:

Substitute 1, 2, and 3 into x + 1 .

For an expression and a list of values, stores the expression in EQ, and returns the results ofsubstituting the values for the current variable in the expression.

2

TABVAL(X^2+1,{1, 2, 3})3-246 Full Command and Function ReferenceResult:

TABVARType:{ X^2+1,{{1, 2, 3},{2, 5, 10}}}

Command

Description:

For a function of the current variable, with a rational derivative, computes the variation table, thatis the turning points of the function and where the function is increasing or decreasing.

Access:PGRAPH L, !ÖGRAPH L

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 isincreasing or decreasing) in terms of the independent variable. The second list indicates thevariation 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

Command:TABVAR(X^2-1)

Result:{'X^2-1' {{ '-∞' – 0 + '∞' }{ '+∞' ↓ '-1' ↑ '+∞' }} Graphic 96 × 55 }See also:

→TAG
Type:
Description:

Viewing the graphic, one sees the original function F and its derivative, as functions of X, and thevariation table for X and F, shown as a matrix
SIGNTAB
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:

See also:( °is the left-shift of the Nkey).

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

obj

“tag”

→

:tag:obj

obj'name'→:name:obj→
objx→ARRY, DTAG, →LIST, OBJ→, →STR, →UNIT:x:objTAIL
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{ obj1 ... objn }Example:“string1”"tall" TAIL returns "all".

Level 1/Item 1→{ obj2 ... objn }→“string2”

Full Command and Function Reference 3-247

See also:

TAN
Type:
Description:

HEAD
Analytic function
Tangent Analytic Function: Returns the tangent of the argument.
For real arguments, the current angle mode determines the number’s interpretation as an angle,
unless the angular units are specified.
For a real argument that is an odd-integer multiple of 90 in Degrees mode, an Infinite Result
exception occurs. If flag –22 is set (no error), the sign of the result (MAXR) matches that of theargument.
For complex arguments:( sin x) ( cos x ) + i ( sinh y ) ( cosh y )tan ( x + iy ) = -----------------------------------------------------------------------------2
2
sin h y + cos x

Access:Flags:
Input/Output:

If the argument for TAN is a unit object, then the specified angular unit overrides the angle modeto determine the result. Integration and differentiation, on the other hand, always observe theangle mode. Therefore, to correctly integrate or differentiate expressions containing TAN with aunit object, the angle mode must be set to Radians (since this is a “neutral” mode).
U
Numerical Results (–3), Angle Mode (–17, –18), Infinite Result Exception (–22)
Level 1/Argument 1

z

→

tan z

'symb'→'TAN(symb)'

x_unitangular→tan (x_unitangular)

See also:

ATAN, COS, SIN

TAN2CS2Type:
Description:

CommandAccess:Catalog, …µ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).

Example:Replace tan(x) terms in the function:

Replaces tan(x) terms in an expression with (1-cos(2x))/sin(2x) terms.

( tan ( x ) ) 2

Command:Result:Level 1/Item 1

TAN2CS2(TAN(X)^2)((1-COS(2*X))/SIN(2*X))^2

See also:

TAN2SC, TAN2SC2TAN2SCType:

Command

Description:

Replaces tan(x) sub-expressions with sin(x)/cos(x).

Access:PTRIG, Trigonometry, …ÑL

3-248 Full Command and Function Reference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).

Example:Replace tan(x) terms in the function:( tan ( x ) ) 2

Command:Result:TAN2SC(TAN(X)^2)(SIN(X)/COS(X))^2

See also:

HALFTAN, TAN2CS2, TAN2SC2TAN2SC2Type:

Command

Description:

Replaces tan(x) terms in an expression with sin(2x)/1+cos(2x) terms.

Access:PTRIG, Trigonometry, …ÑL

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).
In previous versions of the CAS, if flag –116 was set (Prefer sin()), then TAN2SC2 replaced tan(x)terms with: 1 – cos(2x)/sin(2x). This action is now performed by the TAN2CS2 command.

Example:Replace tan(x) terms in the function:( tan ( x ) ) 2

Command:Result:See also:

TANH
Type:
Description:

TAN2SC2(TAN(X)^2)(SIN(2*X)/(1+COS(2*X)))^2

HALFTAN, TAN2CS2, TAN2SC
Analytic function
Hyperbolic Tangent Analytic Function: Returns the hyperbolic tangent of the argument.
For complex arguments,
sinh 2x + i sin 2ytanh ( x + iy ) = --------------------------------------cosh 2x + cos 2y

Access:Flags:
Input/Output:…Ñ HYPERBOLIC TANH

(Ñ is the right-shift of the 8key).

!´ HYPERBOLIC TANH
Numerical Results (–3)( ´ is the left-shift of the Pkey).

Level 1/Argument 1

See also:

Level 1/Item 1z→tanh z'symb'→'TANH(symb)'

ATANH, COSH, SINH

Full Command and Function Reference 3-249

TAYLOR0Type:
Description:

Function

Access:Calculus, !Ö LIMITS & SERIES, PCALC L

Input:An expression

Output:The Taylor expansion 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:Command:Result:Obtain the fourth-order Taylor series expansion of cos(x) at x=0.

See also:

DIVPC, lim, TAYLR, SERIES

TAYLR
Type:
Description:

Access:
Input/Output:

Performs a fourth-order Taylor expansion of an expression at x = 0.

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 variableglobal.
The polynomial is calculated at the point global = 0. The expression symb may have a removablesingularity at 0. The order, n, is the relative order of the Taylor polynomial — the difference inorder 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:See also:

Level 2/Argument 2

Level 1/Argument 3'symb''global'norderThe command sequence '1+SIN(X)^2' 'X' 5 TAYLR
returns '1+X^2-8/4!*X^4'.
∂, ∫, ΣTCHEBYCHEFF
Type:Function
Description:
Returns the nth Tchebycheff polynomial.
Access: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.

See also:

HERMITE, LEGENDRETCHEBYCHEFF(4)8*X^4-8*X^2+1

3-250 Full Command and Function Reference

Level 1/Item 1→'symbTaylor'

TCOLLECT
Type:
Description:

CommandAccess:Trigonometry, …ÑL

Input:An expression with trigonometric terms.

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:Collect terms in the expression:

Linearizes products in a trigonometric expression by collecting sine and cosine terms, and bycombining sine and cosine terms of the same argument.

sin 2x + cos 2x

Command:Result:See also:

TDELTAType:
Description:

Access:Flags:
Input/Output:

TCOLLECT(SIN(2*X)+COS(2*X))√2*COS(2*X-π/4)

TEXPAND, TLIN

Function
Temperature Delta Function: Calculates a temperature change.
TDELTA subtracts two points on a temperature scale, yielding a temperature increment (not an
actual temperature). x or x_unit1 is the final temperature, and y or y_unit2 is the initial
temperature. If unit objects are given, the increment is returned as a unit object with the sameunits as x_unit1. If real numbers are given, the increment is returned as a real number.
…µ TDELTA
Numerical Results (–3)

See also:

TINC

TESTS
Type:

Command

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

xdeltax_unit1x_unit2→x_unit1delta

x_unit'symb'→'TDELTA(x_unit, symb)''symb'

y_unit→'TDELTA(symb, y_unit)''symb1''symb2'→'TDELTA(symb1, symb2)'

Description:

Displays a menu or list containing the ASSUME and UNASSUME commands, and tests that canbe included in algebraic expressions.

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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
MODULAR, POLYNOMIAL, REWRITE, TRIGO
Full Command and Function Reference 3-251

TEVALType:
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

resulttime taken

See also:

EVAL

TEXPAND
Type:
Description:

CommandAccess:!Ð, PALG, PTRIG, …×L, …ÑL, PLEXPLN

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).

Example:Expand the following expression:ln(sin(x+y))Command:Result:See also:

TEXT
Type:
Description:

Expands transcendental functions.

TEXPAND(LN(SIN(X+Y)))
LN(COS(Y)*SIN(X)+SIN(Y)* COS(X))

TCOLLECT, TLIN
CommandShow Stack Display Command: Displays the stack display.
TEXT switches from the graphics display to the stack display. TEXT does not update the stackdisplay.

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 thecontents 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.
See also:
PICTURE, PVIEW

THEN
Type:
Description:

Command
THEN Command: Starts the true-clause in conditional or error-trapping structure.
See the IF and IFFER entries for more information.
Access:!° BRANCH IF/CASE THEN ( °is the left-shift of the Nkey).
Input/Output: None
See also:
CASE, ELSE, END, IF IFERR

3-252 Full Command and Function Reference

TICKSType:
Command
Description:
Ticks Command: Returns the system time as a binary integer, in units of 1/8192 second.
Access:…ÓTOOLS TICKS( Ó is the right-shift of the 9 key).
Input/Output:
Level 1/Argument 1

Example:See also:

TIME
Type:
Description:

Access:
Input/Output:

Level 1/Item 1→#ntimeIf the result from a previous invocation from TICKS is on level 1 of the stack, then the commandsequence TICKS SWAP - B->R 8192 / returns a real number whose value is theelapsed time in seconds between the two invocations.
TIME
CommandTime Command: Returns the system time in the form HH.MMSSs.
time has the form HH.MMSSs, where HH is hours, MM is minutes, SS is seconds, and s is zero or
more digits (as many as allowed by the current display mode) representing fractional seconds. timeis always returned in 24-hour format, regardless of the state of the Clock Format flag (–41).
…Ó TOOLS TIME
(Ó is the right-shift of the 9 key).
Level 1/Argument 1

Level 1/Item 1→
See also:

→TIME
Type:
Description:

Access:
Input/Output:

DATE, TICKS, TSTR
CommandSet System Time Command: Sets the system time.
time must have the form HH.MMSSs, where HH is hours, MM is minutes, SS is seconds, and s iszero or more digits (as many as allowed by the current display mode) representing fractional
seconds. time must use 24-hour format.
…ÓTOOLS →TIME(Ó is the right-shift of the 9 key).
Level 1/Argument 1

time
See also:

TINC
Type:
Description:

Access:Flags:

time

Level 1/Item 1→

CLKADJ, →DATE
Function
Temperature Increment Command: Calculates a temperature increment.
TINC adds a temperature increment (not an actual temperature) to a point on a temperature scale.
Use a negative increment to subtract the increment from the temperature. xinitial or x_unit1 is theinitial temperature, and ydelta or y_unit2delta is the temperature increment. The returned temperatureis the resulting final temperature. If unit objects are given, the final temperature is returned as aunit object with the same units as x_unit1. If real numbers are given, the final temperature is
returned as a real number.
…µ TINC
Numerical Results (–3)

Full Command and Function Reference 3-253

Input/Output:

See also:

TDELTA

TLIN
Type:Description:

Command

Level 2/Argument 1

Level 1/Argument 2

xinitial

ydelta→xfinalx_unit1y_unit2delta→

x_unit1final

x_unit'symb'→'TINC(x_unit, symb)''symb'

y_unitdelta→'TINC(symb, y_unitdelta)''symb1''symb2'→'TINC(symb1, symb2)'

Linearizes and simplifies trigonometric expressions. Note that this function does not collect sin
and cos terms of the same angle.

Access:PTRIG, Trigonometry, …ÑL

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).

Example:Linearize and simplify the following:( cos ( x ) )Command:Result:

TLINE
Type:
Description:
Access:
Input/Output:

See also:

4

TLIN(COS(X)^4)(1/8)*COS(4X)+(1/2)*COS(2X)+(3/8)

SIMPLIFY, TCOLLECT, TEXPAND

See also:

Example:Level 1/Item 1

CommandToggle 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TMENUType:
Description:

Access:
Input/Output:

CommandTemporary Menu Command: Displays a built-in menu, library menu, or user-defined menu.
TMENU works just like MENU, except for user-defined menus (specified by a list or by thename of a variable that contains a list). Such menus are displayed like a custom menu and work
like a custom menu, but are not stored in reserved variable CST. Thus, a menu defined anddisplayed by TMENU cannot be redisplayed by evaluating CST.
See Appendix H for a list of the calculator’s built-in menus and the corresponding menu
numbers (xmenu).
„&H MENU TMENU
Level 1/Argument 1

Example 1:
Example 2:
Example 3:
Example 4:
Example 5:
See also:

TOT
Type:
Description:
Access:
Input/Output:

Level 1/Item 1

xmenu

→

{ listdefinition }→→'namedefinition'
7 TMENU displays the first page of the MTH MATR menu.
48.02 TMENU displays the second page of the UNITS MASS menu.
256 TMENU displays the first page of commands in library 256.
{ A 123 "ABC" } TMENU displays the custom menu defined by the list argument.
'MYMENU' TMENU displays the custom menu defined by the name argument.
MENU, RCLMENU
Command
Total Command: Computes the sum of each of the m columns of coordinate values in the current
statistics matrix (reserved variable ΣDAT).
The sums are returned as a vector of m real numbers, or as a single real number if m = 1.
…µ TOT
Level 1/Argument 1

Level 1/Item 1→
See also:

TRACE
Type:
Description:
Access:→MAXΣ, MINΣ, MEAN, PSDEV, PVAR, SDEV, VAR

xsum[ xsum 1, xsum 2, ... ,xsum m ]CommandMatrix Trace Command: Returns the trace of a square matrix.
The trace of a square matrix is the sum of its diagonal elements.
!Ø OPERATIONS LL TRACE( Ø is the left-shift of the 5key).
!´MATRIX NORMALIZE L TRACE( ´ is the left-shift of the Pkey).

Level 1/Argument 1

Level 1/Item 1

Input/Output:[[ matrix ]]n×n
See also:

TRAN
Type:
Description:→

xtrace

CONJ, DET, IDN
CommandTranspose Matrix Command: Returns the transpose of a matrix.
Same as TRN, but without conjugation of complex numbers.
Full Command and Function Reference 3-255

Access:!Ø OPERATIONS LLTRAN
Input/Output:( Ø is the left-shift of the 5key).

Level 1/Argument 1

See also:

TRANSIO
Type:
Description:

Level 1/Item 1[[ matrix ]]→'name'→[[ matrix ]]transpose

CONJ, TRN
Command
I/O Translation Command: Specifies the character translation option. These translations affectonly ASCII Kermit transfers and files printed to the serial port.
Legal values for n are as follows:n

Effect0

No translation

1

Translate character 10 (line feed only) to /from characters 10 and 13 (line feedwith 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)

Access:…µ TRANSIO
Input/Output:
Level 1/Argument 1

noptionSee also:

BAUD, CKSM, PARITY

TRIG
Type:
Description:

Command

Level 1/Item 1→

Converts complex logarithmic and exponential subexpressions into their equivalent trigonometric22expressions. It also simplifies trigonometric expressions by using: ( sin x ) + ( cos x ) = 1

Access:PTRIG, Trigonometry, …ÑLLInput:

A complex expression with logarithmic and/or exponential terms, or a trigonometric 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).
Prefers cosine terms if “prefer cos” is selected (flag –116 clear), prefers sine terms if flag –116 isset.
Must be in Complex mode (flag –103 set) if a complex expression is being simplified.

Example:Express the following in trigonometric terms:

Command:ln ( x + i )TRIG(LN(X+i))

3-256 Full Command and Function ReferenceResult:

2
1
L N( X + 1 ) + 2 × i × A TA N -- x-----------------------------------------------------------------------------2

See also:

TRIGCOS, TRIGSIN, TRIGTANTRIGCOSType:

Command

Description:

Simplifies a trigonometric expression by applying the identity:
2

2( sin x ) + ( cos x ) = 1

Returns only cosine terms if possible.
Access:Trigonometry, …ÑLLInput: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).

See also:

TRIG, TRIGSIN, TRIGTAN

TRIGO
Type:
Description:

CommandAccess: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.

See also:

ALGB, ARIT, CONSTANTS, DIFF, EXP&LN, INTEGER, MAIN, MATHS, MATR,
MODULAR, POLYNOMIAL, REWRITE, TESTSTRIGSIN
Type:
Description:

Command

Displays a menu or list containing the CAS commands for transforming trigonometricexpressions.

Simplifies a trigonometric expression by applying the identity:
2

2( sin x ) + ( cos x ) = 1

Returns only sine terms if possible.
Access:Trigonometry, …ÑLLInput: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).

See also:

TRIG, TRIGCOS, TRIGTANTRIGTANType:
Description:

CommandReplaces sine and cosine terms in a trigonometric expression with tangent terms.

Full Command and Function Reference 3-257

Access:

Trigonometry, …ÑLLInput: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)

See also:

TRIG, TRIGCOS, TRIGSIN

TRN
Type:
Description:

Access:
Input/Output:

TAN(X)^2/(TAN(X)^2+1)

CommandTranspose 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:See also:

TRNC
Type:
Description:

Access:Flags:

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
ntruncate0 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, thenumber 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Input/Output:

Example 1:
Example 2:
See also:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

ntruncate

→

z2

z1

'symbtruncate'→'TRNC(z1,symbtruncate)''symb1'

ntruncate→'TRNC(symb1,ntruncate)''symb1''symbtruncate'→'TRNC(symb1,symbtruncate)'[ array ]1

ntruncate→[ array ]2

x_unitntruncate→y_unit→x_unit'symbtruncate''TRNC(x_unit,symbtruncate)'(4.5792,8.1275) 2 TRNC returns (4.57,8.12).
[ 2.34907 3.96351 2.73453 ] -2 TRNC returns [ 2.3 3.9 2.7 ].
RND

TRUNC
Type:
Description:

Truncates a series expansion.

Access:Catalog, …µInput:

Level 2/Argument 1: The expression that you want to truncate.
Level 1/Argument 2: The expression to truncate with respect to.

Output:

The expression from Level 2/Argument 1, with terms of order greater than or equal to the orderof the expression in Level 1/Argument 2 removed.

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:Expand the expression (x+1)7, and remove all terms in x4 and higher powers of x
TRUNC((X+1)^7,X^4)

See also:

DIVPC, EXPAND, SERIES

TRUTH
Type:
Description:

Function

35*X^3+21*X^2+7*X+1

Command
Truth Plot Type Command: Sets the plot type to TRUTH.
When the plot type is TRUTH, the DRAW command plots the current equation as a truth-valued
function 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 TRUTH, the elements of PPAR are used as follows:• (xmin, ymin) is a complex number specifying the lower left corner of PICT (the lower left cornerof 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 rightcorner 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+.

Full Command and Function Reference 3-259

• 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 thename TRUTH in ptype.
• depend is a name specifying the independent variable on the vertical axis, or a list containing sucha 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 evaluatedfor 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 theresult is zero, the state of the pixel is unchanged. If the result is nonzero, the pixel is turned on(made dark).
Access:…µ TRUTH
Input/Output: None
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, WIREFRAME, YSLICE

TSIMP
Type:

Command

Description:

Performs simplifications on expressions involving exponentials and logarithms. Converts base 10
logarithms to natural logarithms

Access:Exponential and logarithms, !Ð L, or …ÑLLInput: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)

See also:

TEXPAND, TLIN

TSTR
Type:
Description:

Access:Flags:TSIMP(LOG(X+X))(LN(2)+LN(X))/(LN(5)+LN(2))

CommandDate 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 thecurrent 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Input/Output:

Example:See also:

TVARS
Type:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

date

time

Level 1/Item 1→“DOW DATE TIME“With flags –42 and –41 clear, 2.061990 14.55 TSTR returns"TUE 02/06/90 02:55:00P".
DATE, TICKS, TIME
Command
Typed Variables Command: Lists all global variables in the current directory that contain objectsof the specified types.
If the current directory contains no variables of the specified types, TVARS returns an empty list.
For a table of the object-type numbers, see the entry for TYPE.
!° MEMORY DIRECTORY LTVARS ( °is the left-shift of the Nkey).
Level 1/Argument 1

Level 1/Item 1

ntype

→

{ global ... }{ ntype ...}→

{ global ... }See also:

PVARS, TYPE, VARS

TVM
Type:
Description:
Access:
Input/Output:
See also:

Command
TVM Menu Command: Displays the TVM Solver menu.
…µ TVM
None
AMORT, TVMBEG, TVMEND, TVMROOT

TVMBEGType:
Description:

Command
Payment at Start of Period Command: Specifies that TVM calculations treat payments as being
made at the beginning of the compounding periods.
Access:…µ TVMBEG
Input/Output: None
See also:
AMORT, TVM, TVMEND, TVMROOTTVMENDType:
Description:

Command
Payment at End of Period Command: Specifies that TVM calculations treat payments as being
made at the end of the compounding periods.
Access:…µ TVMEND
Input/Output: None
See also:
AMORT, TVM, TVMBEG, TVMROOT

TVMROOTType:
Description:
Access:Command
TVM Root Command: Solves for the specified TVM variable using values from the remaining
TVM variables.
…µ TVMROOT
Full Command and Function Reference 3-261

Input/Output:
Level 1/Argument 1'TVM variable'

Level 1/Item 1→

xTVM variable

See also:

AMORT, TVM, TVMBEG, TVMEND

TYPE
Type:
Description:

CommandType Command: Returns the type number of an object, as shown in the following table:

Object Type:

Number:Object Type:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

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
Linked array
Character
Code object
Library data
Mini font
Font
Extended object

User objects:
Real number
Complex number
Character string
Real array
Complex array
List
Global nameLocal name
Program
Algebraic object
Binary integer
Graphics object
Tagged object
Unit object
XLIB name
Directory object
Library
Access:!° TEST LTYPE
Input/Output:

Number:
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

obj

Level 1/Item 1

→

ntype

See also:

SAME, TVARS, VTYPE, ==

UBASE
Type:
Description:
Access:Flags:
Input/Output:

Function
Convert to SI Base Units Function: Converts a unit object to SI base units.
!Ú UNITS TOOLS UBASE( Ú is the left-shift of the 6key).
Numerical Results (–3)
Level 1/Argument 1

x_unitExample:See also:

Level 1/Item 1→→'symb'
30_knot UBASE returns 15.4333333333_m/s.
CONVERT, UFACT, →UNIT, UVAL

3-262 Full Command and Function Reference

y_base-units'UBASE(symb)'

UFACTType:
Command
Description:
Factor Unit Command: Factors the level 1 unit from the unit expression of the level 2 unit object.
Access:!Ú UNITS TOOLS UFACT( Ú is the left-shift of the 6key).
Input/Output:
Level 2/Argument 1

Example:See also:

Level 1/Argument 2

x1_unit1x2_unit2
1_W 1_N UFACT returns 1_N*m/s.
CONVERT, UBASE, →UNIT, UVAL

Level 1/Item 1→

x3_unit2*unit3

UFL1→MINIF
Type:Command
Description:
Converts a UFL1 (universal font library) fontset to a minifont compatible with the calculator.
You specify the fontset and give it an ID (0–255). The font must be a 6-by-4 font.
Access:…µUFL1→MINIF
Input/Output:
Level 2/Argument 1

See also:

objfontset→MINIFONT, MINIFONT→UNASSIGN
Type:

Command

Level 1/Argument 2

nID

Level 1/Item 1→ The font converted to minifont.

Description:

Removes global variables and returns their values. This is an algebraic version of the PURGE
command.

Access:Catalog, …µInput:

Level 1/Item 1: The name of a global variable, or a list of global names, to be purged.

Output:Level 1/Item 1: The value or list of values that were stored in the now purged variables. If avariable does not exist, or is not in the current directory path, it is not removed, and its name isreturned.

Flags:The status of the purge confirm flag (flag –76) is ignored, variables are purged with no request for
confirmation.

Example:Try to remove the global variable U, which contains 17.5, and the global variable V, which is noton the current directory path.

Command:Result:UNASSIGN({U, V}){17.5, V}

See also:

ADDTOREAL, ASSUME, DEF, LOCAL, PURGE, STO, STORE, UNASSUME, UNBINDUNASSUME
Type:
Description:

CommandAccess:Removes all assumptions on specified global variables, whether created by default, by
ADDTOREAL or by ASSUME. Does this by removing the variable names from the list
REALASSUME. Returns the variable names. To remove assumptions on a variable but leave it in
REALASSUME, use ADDTOREAL instead of UNASSUME.
Catalog, …µ

Full Command and Function Reference 3-263

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.

Example:Command:Result:Remove the variables S1 and S2 which are include in the REALASSUME list by default.
UNASSUME({S1, S2})

See also:

ADDTOREAL, ASSUME, DEF, LOCAL, UNASSIGN, UNBINDUNBINDType:
Description:

CommandAccess: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.

See also:

DEF, LOCAL, STORE, UNASSIGN, UNASSUME

→UNIT
Type:
Description:

Access:
Input/Output:{S1, S2}

Removes all local variables created by the LOCAL command, and returns their values. This isuseful only if a program needs to remove local variables created earlier in the same program.

UNBIND{←B=2, ←A=0}

Command
Stack to Unit Object Command: Creates a unit object from a real number and the unit part of aunit object. →UNIT adds units to a real number, combining the number and the unit part of aunit 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

See also:

UNPICKType:
Description:

Level 1/Argument 2x→ARRY, →LIST, →STR, →TAG

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

See also:→

y_unitAccess:!° STACK L UNPICK
Input/Output:

Example:Level 1/Item 1

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

UNROTType:
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:See also:

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.
See the DO entry for more information.
( °is the left-shift of the Nkey).
Access:!° BRANCH DO UNTIL
Input/Output: None
See also:
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
See also:
CRDIR, HOME, PATH, PGDIR

UTPC
Type:
Description:

CommandUpper Chi-Square Distribution Command: Returns the probability utpc(n, x) that a chi-squarerandom 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:
∞ nt
1
- t --2- – 1 ⋅ e– --2- dt
utpc ( n, x ) = --------------n--∫
2 2 Γ ( n--2- ) x• For x < 0:
utpc ( n, x ) ) = 1

For any value z,

Access:zzΓ  --- =  --- – 1 !
2
2, where ! is the factorial command.

The value n is rounded to the nearest integer and, when rounded, must be positive.
!´ L PROBABILITY L UTPC
( ´ is the left-shift of the Pkey).

Full Command and Function Reference 3-265

Input/Output:
Level 2/Argument 1

See also:

UTPF
Type:
Description:

Level 1/Argument 2n
UTPF, UTPN, UTPT

Level 1/Item 1→x

utpc(n,x)CommandUpper Snedecor’s F Distribution Command: Returns the probability utpf(n1, n2, x) that a
Snedecor’s F random variable is greater than x, where n1 and n2 are the numerator anddenominator degrees of freedom of the F distribution.
The defining equations for utpf(n1, n2, x) are these:• For x ≥ 0:
( n1 + n2 )n 1 + n 2n1
– -------------------------- Γ  ---------------∞ n1 – 2
22n-------------n1  2 2
 -----1tdt
1 + ----- t∫x
 n  -----------------------------n nn22Γ  ----1- Γ  ----2-22• For x < 0:
utp f ( n 1, n 2, x ) = 1

For any value z,

Access:
Input/Output:zzΓ  --- =  --- – 1 !
2
2

The values n1 and n2 are rounded to the nearest integers and, when rounded, must be positive.
!´ L PROBABILITY L UTPF
( ´ is the left-shift of the Pkey).
Level 3/Argument 1

See also:

UTPN
Type:
Description:, where ! is the calculator’s factorial command.

Level 2/Argument 2

Level 1/Argument 3

n2

x

n1
UTPC, UTPN, UTPT

Level 1/Item 1→

utpf(n1,n2,x)CommandUpper Normal Distribution Command: Returns the probability utpn(m, v, x) that a normal
random variable is greater than x, where m and v are the mean and variance, respectively, of thenormal distribution.
For all x and m, and for v > 0, the defining equation is this:2(t – m)∞ – -----------------2v

1
utpn ( m, v, x ) = ------------∫e2πv xAccess:dt

For v = 0, UTPN returns 0 for x ≥ m, and 1 for x < m.
!´ L PROBABILITY L UTPN
( ´ is the left-shift of the Pkey).

3-266 Full Command and Function ReferenceInput/Output:
Level 3/Argument 1

See also:

UTPT
Type:
Description:

Level 2/Argument 2

Level 1/Argument 3v

xm
UTPC, UTPF, UTPT

Level 1/Item 1→

utpn(m,v,x)CommandUpper Student’s t Distribution Command: Returns the probability utpt(n, x) that a Student’s trandom 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
n+1– -----------Γ  ------------ ∞22
t2
utpt ( n, x ) = ----------------------- ∫  1 + ---- dtnnxΓ  --- nπ
2

For any value z,

Access:
Input/Output:zzΓ  --- =  --- – 1 !
2
2, where ! is the factorial command.

The value n is rounded to the nearest integer and, when rounded, must be positive.
( ´ is the left-shift of the Pkey).
!´ L PROBABILITY L UTPT
Level 2/Argument 1

Level 1/Argument 2x

Level 1/Item 1→

See also: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:(Û is the right-shift of the 6key).

Level 1/Argument 1

See also:V→
Type:
Description:

Access:Flags:

x_unit'symb'
CONVERT, UBASE, UFACT, →UNIT

utpt(n,x)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 systemmode, and always returns the elements of the vector to the stack as they are stored internally (inrectangular 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

Input/Output:
L1/A1

[xy]
[ xr, ytheta ][ x1 , x2 , x3 ][ x1, xtheta, xz ][ x1, xtheta, xphi ][ x1, x2, ..., xn ](x, y)(xr, ytheta)

→
→
→
→
→
→
→
→

Ln/I1 ... L3/In–2

L2/In–1

L1/In

x1
x1
x1
x1 ... xn–2xxrx2
xthetaxthetaxn–1xxr

yytheta
x3
xz
xphi
xn
y
ytheta

L = Level; A = Argument; I = item

Example 1:
Example 2:
Example 3:
See also:

→V2
Type:
Description:

With flag –16 clear (Rectangular mode), (2,3) V→ returns 2 to level 2 and 1 to level 1.
With flag –15 clear and –16 set (Polar/Cylindrical mode), [ 2 7 4 ] V→ returns 2 tolevel 3, 7 to level 2, and 4 to level 1.
[ 9 7 5 3 ] V→ returns 9 to level 4, 7 to level 3, 5 to level 2, and 3 to level 1,
independent of the state of flags –15 and –16.
→V2, →V3
Command
Stack to Vector/Complex Number Command: Converts two specified numbers into a 2-element
vector or a complex number.
The result returned depends on the setting of flags –16 and –19, as shown in the following table:
Flag –19 clear

Flag –19 set

Flag –16 clear (Rectangular mode)[xy](x, y)

Flag –16 set (Polar mode)[xy](x,  y)Access:!´ VECTOR →V2( ´ is the left-shift of the Pkey).
Flags:
Coordinate System (–16), Complex Mode (–19)
Input/Output:

Example 1:
Example 2:
See also:

→V3
Type:
Description:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

[xy]

x

y

→

[xy]

x

y

→

(x, y)→xy(x,  y)With flags –19 and –16 clear, 2 3 →V2 returns [ 2 3 ].
With flags –19 and –16 set (Polar/Spherical mode), 2 3 →V2 returns (2,3).
V→, →V3
Command
Stack to 3-Element Vector Command: Converts three numbers into a 3-element vector.
The result returned depends on the coordinate mode used, as shown in the following table:

3-268 Full Command and Function ReferenceMode

ResultRectangular (flag –16 clear)[ 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:

Example 1:
Example 2:
Example 3:
See also:( ´ is the left-shift of the Pkey).

Level 3/Argument 1

Level 2/Argument 2

Level 1/Argument 3

Level 1/Item 1

x1

x2

x3

→

[ x1 x2 x3 ]x1

xthetaxz→[ x1 xtheta xz ]x1

xthetaxphi→[ x1 xtheta xphi ]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

VANDERMONDEType:
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 consistsof 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 resultwith the command TRAN.
Access:Matrices, !Ø CREATELL, !´ MATRX MAKE LL

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:

TRAN(VANDERMONDE({x,y,z}))
1 1 1
x y z
2

Result:See also:

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 mcolumns in the current statistics matrix (ΣDAT).
Full Command and Function Reference 3-269

The variance (equal to the square of the standard deviation) is returned as a vector of m real
numbers, or as a single real number if m = 1. The variances are computed using this formula:n21------------ ⋅ ∑ ( x i – x )n–1
i=1

where xi is the ith coordinate value in a column, x is the mean of the data in this column, and n is
the number of data points.
Access:…µ VAR
Input/Output:
Level 1/Argument 1

See also:

VARS
Type:
Description:
Access:
Input/Output:

Level 1/Item 1→

xvariance→[ xvariance1, ..., xvariancem ]MAXΣ, MEAN, MINΣ, PSDEV, PVAR, SDEV, TOT
Command
Variables Command: Returns a list of the names of all variables in the VAR menu for the current
directory.
!° MEMORY DIRECTORY L VARS
( °is the left-shift of the Nkey).
Level 1/Argument 1

Level 1/Item 1→{ global1 ... globaln }See also:

ORDER, PVARS, TVARS

VER
Type:
Description:

CommandAccess:Catalog, …µInput:

No input required.

Output:A real number giving the version and release date of the Computer Algebra System software.

Flags:The version and release date are given as a number of the form V.YYYYMMDD, so a display
mode showing at least 8 digits after the fraction mark is needed to display the result in full.

Returns the Computer Algebra System version number, and date of release.

VERSIONType:
Command
Description:
Software Version Command: Displays the software version and copyright message.
Access:…µ VERSION
Input/Output:
Level 1/Argument 1→

3-270 Full Command and Function Reference

Level 2/Item 1

Level 1/Item 2“version number”“copyright message”

VISITType:
Command
Description:
For a specified variable, opens the contents in the command-line editor.
Access:…µ VISIT or „˜
Input/Output:
Level 1/Argument 1

Level 1/Item 1→

A variable nameSee also:

VISITBType:
Description:
Access:
Input/Output:

VISITB, EDIT, EDITB
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
Level 1/Argument 1

Level 1/Item 1→

A variable nameSee also:

The contents opened in the command line
editor.

The contents opened in the most suitable
editor.

VISIT, EDIT, EDITBVPOTENTIALType:
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 thatcurl U is equal to V; ∇ × U = V . For this to be possible, DIV(V) must be zero, otherwise thecommand reports a “Bad Argument Value” error. Step-by-step mode is available with thiscommand.

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)kCommand: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

However, obtaining the curl of the above result, and then applying VPOTENTIAL to it again will
give the same result.
See also:

VTYPE
Type:
Description:

CURL, POTENTIAL
Command
Variable Type Command: Returns the type number of the object contained in the named variable.
If the named variable does not exist, VTYPE returns –1.
For a table of the objects’ type numbers, see the entry for TYPE.

Access:!° TYPE L L VTYPE
Input/Output:( °is the left-shift of the Nkey).

Level 1/Argument 1

See also:*W
Type:
Description:
WAIT
Type:
Description:

Access:Level 1/Item 1'name'→

ntype:nport : namebackup

→

ntype

:nport : nlibrary

→

ntype

TYPE
CommandMultiply Width Command: Multiplies the horizontal plot scale by xfactor. *W is provided forcompatibility with the HP 48. *W is the same as SCALEW; see its listing for details.
Command
Wait Command: Suspends program execution for specified time, or until a key is pressed.
The function of WAIT depends on the argument, as follows:• Argument x interrupts program execution for x seconds.
• Argument 0 suspends program execution until a valid key is pressed (see below). WAIT thenreturns xkey, which defines where the pressed key is on the keyboard, and resumes program
execution.
xkey is a three-digit number that identifies a key’s location on the keyboard. See the entry for
ASN for a description of the format of xkey.
• Argument –1 works as with argument 0, except that the currently specified menu is also
displayed.
!, …, ~, ~!, and ~… are not by themselves valid keys.
Arguments 0 and –1 do not affect the display, so that messages persist even though the keyboard
is ready for input (FREEZE is not required).
Normally, the MENU command does not update the menu keys until a program halts or ends.
WAIT with argument –1 enables a previous execution of MENU to display that menu while theprogram is suspended for a key press.
!° L IN WAIT

3-272 Full Command and Function Reference( °is the left-shift of the Nkey).

Input/Output:
Level 1/Argument 1

Example 1:

Example 2:

See also:

WHILE
Type:
Description:

Access:
Input/Output:

Level 1/Item 1

x

→

0

→

xkey

–1

→

xkey

This program:« "Press [1] to add Press 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, twonumbers on the stack are subtracted.
This program:« { ADD { } { } { } { } SUB } MENU
"Press [ADD] to add Press [SUB] to subtract"
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 otherkey 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 istrue. Since the test clause occurs before the loop-clause, the loop clause is never executed if thetest 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
See also:

T/F

→
→

DO, END, REPEATWIREFRAME
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 thegraph 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

VPAR has the following form:{ xleft, xright, ynear, yfar, zlow, zhigh, xmin, xmax, ymin, ymax, xeye, yeye, zeye, xstep, ystep }For plot type WIREFRAME, 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 isviewed.
• 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 WIREFRAME, 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 name specifying the plot type. Executing the command WIREFRAME places thecommand name WIREFRAME in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:…µ WIREFRAME
Input/Output: None
See also:
BAR, CONIC DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, YSLICE

WSLOG
Type:
Description:

CommandWarmstart Log Command: Returns four strings recording the date, time, and cause of the fourmost recent warmstart events.
Each string "logn" has the form "code–date time". The following table summarizes the legal values ofcode and their meanings.

Code

Description

0

The warmstart log was cleared.

1

The interrupt system detected a very low battery condition at the battery contacts(not the same as a low system voltage), and put the calculator in “Deep Sleepmode” (with the system clock running). When $ is pressed after the battery voltage
is restored, the system warmstarts and puts a 1 in the log.

2

Hardware failed during transmission (timeout).

3

Run through address 0.

4

System time is corrupt

3-274 Full Command and Function ReferenceCode

Description

5

A Deep Sleep wakeup (for example, $, Alarm).

6

Not used7

A 5-nibble word (CMOS test word) in RAM was corrupt. (This word is checkedon every interrupt, but it is used only as an indicator of potentially corrupt RAM.)8

Not used

9

The alarm list is corrupt.

A

System RPL jump to #0.

B

The card module was removed (or card bounce).

C

Hardware reset occurred (for example, an electrostatic discharge or user reset)

D

Access:Flags:
Input/Output:

An expected System (RPL) error handler was not found in runstream.
The date and time stamp (date time) part of the log may be displayed as 00…0000 for one of threereasons:• 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

→

ΣX
Type:
Description:“log4” ... “log1”

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 thereserved variable ΣPAR. The default independent-variable column number is 1.

Access:…µΣX
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

Σ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 thereserved variable ΣPAR. The default independent-variable column number is 1.
Full Command and Function Reference 3-275

Access:…µΣX2
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
See also:

ΣX^2
Type:
Description:

Sum of X2

NΣ, ΣX, XCOL, ΣXY, Σ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. ΣX^2 is provided for compatibility with the HP
28. ΣX^2 is the same as ΣX2; see its listing for details.

Access:XCOL
Type:Description:

Access:
Input/Output:

Command
Independent Column Command: Specifies the independent-variable column of the current
statistics matrix (reserved variable ΣDAT).
The independent-variable column number is stored as the first parameter in the reserved variableΣPAR. The default independent-variable column number is 1.
XCOL will accept a noninteger real number and store it in ΣPAR, but subsequent commands thatutilize the XCOL specification in ΣPAR will cause an error.
…µXCOL
Level 1/Argument 1

See also:

XGET
Type:
Description:

Level 1/Item 1→ncol
BARPLOT, BESTFIT, COLΣ, CORR, COV, EXPFIT, HISTPLOT, LINFIT, LOGFIT, LR,
PREDX, PREDY, PWRFIT, SCATRPLOT, YCOL
Command
XModem Get Command: Retrieves a specified filename via XMODEM from another calculator.
The other calculator needs to be in server mode for the operation to work (G I/O FUNCTIONSSTART SERVER).

Access:…µ XGET
Input/Output:
Level 1/Argument 1

See also:

XMIT
Type:
Description:

Level 1/Item 1→'name'
BAUD, RECN, RECV, SEND, XRECV, XSERV, XPUT
Command
Serial Transmit Command: Sends a string serially without using Kermit protocol, and returns asingle digit that indicates whether the transmission was successful.
XMIT is useful for communicating with non-Kermit devices such as RS-232 printers.
If the transmission is successful, XMIT returns a 1. If the transmission is not successful, XMIT
returns the unsent portion of the string and a 0. Use ERRM to get the error message.

3-276 Full Command and Function Reference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.
…µ XMITI/O Device (–33), I/O Device for Wire (–78)
Level 1/Argument 1

Level 2/Item 1→“string”
See also:

XNUM
Type:
Description:→“string”
BUFLEN, SBRK, SRECV, STIME

1“substringunsent”

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.
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})

See also:

I→R, →NUM{1.5707963268 8.15484548538 -1.66458734619}

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) logicalcomparison:• 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

Access:0CommandAccess:XOR
Type:
Description:

Level 1/Item 2

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 thebinary 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 arenonzero 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.
(ã is the right-shift of the 3key).
…ã L LOGIC XOR
Full Command and Function Reference 3-277

Flags:
Input/Output:!´ BASE L LOGIC XOR( ´ is the left-shift of the Pkey).
Binary Integer Wordsize (–5 through –10), Binary Integer Base (–11, –12)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

#n1

#n2

→

#n3

“string1”“string2”→“string3”

T/F1

T/F2

→

0/1

T/F

'symb'→'T/F XOR symb''symb'

T/F→'symb XOR T/F'

'symb1''symb2'→'symb1 XOR symb2'

See also:

AND, NOT, OR

XPON
Type:
Description:

Function
Exponent Function: Returns the exponent of the argument.

Access:!´ REAL L XPON
Flags:
Numerical Results (–3)
Input/Output:( ´ is the left-shift of the Pkey).

Level 1/Argument 1

x
Example 1:
Example 2:
Example 3:
See also:

XPUT
Type:
Description:
Access:
Input/Output:

Level 1/Item 1→→'symb'
1.2E34 XPON returns 34.
12.4E3 XPON returns 4.
'A*1E34' XPON returns 'XPON(A*1E34)'.
MANT, SIGN

XQ
Type:
Description:'XPON(symb)'

Command
XModem Send Command: Sends a specified filename via XMODEM to a calculator. The
receiving calculator needs to be in Server mode (G I/O FUNCTIONS START SERVER).
…µ XPUT
Level 1/Argument 1

See also:

nexponLevel 1/Item 1→'name'
BAUD, RECN, RECV, SEND XRECV, XSERV, XGET
Command
Converts a number, or a list of numbers in decimal format, to quotient (rational) format. Similar
to the →Qπ command, but also clears numeric constants mode (flag –2) and sets exact mode
(flag –105).

Access:Catalog, …µInput:

A number, or a list of numbers.

Output:

The number or list of numbers in rational format. This rational number converts to the input
value to the accuracy of the current display setting.

3-278 Full Command and Function ReferenceExample 1:
Command:Results:

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:

See also:→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 BBBCCC} XSEND, for example).
…µ XRECVI/O Device (–33), RECV Overwrite (–36), I/O Device for Wire (–78)
Level 1/Argument 1

See also:

XRNG
Type:
Description:

Access:
Input/Output:

XROOT
Type:
Description:
Access:Flags:→'name'
BAUD, RECV, RECN, SEND, XSENDCommandx-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

See also:

Level 1/Item 1

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

Input/Output (RPN):
Level 2

Level 1

Level 1

y

x

→

x y

'symb1''symb2'→'XROOT(symb2,symb1)''symb'x→'XROOT(x,symb)'y'symb'→'XROOT(symb,y)'y_unitx→y_unit'symb'→

Argument 1

Argument 2

y

x

→

y x

'symb1''symb2'→'XROOT(symb1,symb2)''symb'x→'XROOT(symb,x)'y'symb'→'XROOT(y,symb)'xy_unit→'symb'

y_unit→x y_unit1/x'XROOT(symb,y_unit)'

Input/Output (ALG):

XSEND
Type:
Description:

Access:Flags:
Input/Output:

Level 1

XSERV
Type:
Description:_unit1/x'XROOT(symb,y_unit)'

Command
XModem Send Command: Sends a copy of the named object via XModem.
A receiving calculator must execute XRECV to receive an object via XModem.
The transfer occurs more quickly if you start the receiving XModem after executing XSEND.
Also, configuring the receiving modem not to do CRC checksums (if possible) will avoid a 30 to
60-second delay when starting the transfer.
If you are transferring data between two calculators, executing {AAA BBB CCC} XSEND
sends AAA, BBB, and CCC. You also need to use a list on the receiving end ({AAA BBBCCC} XRECV, for example).
…µ XSEND
I/O Device (–33), I/O Device for Wire (–78)
Level 1/Argument 1

See also:

x y'name'
BAUD, RECN, RECV, SEND XRECVLevel 1/Item 1→

Command
XModem Server Command: Puts the calculator in XModem server mode. When in server mode,the following commands are available:
P: Put a file in the calculator
G: Get a file from the calculator
E: Execute a command line

3-280 Full Command and Function ReferenceM Get the calculator memory
L: List the files in the current directory
Access:See also:

XVOL
Type:
Description:

Access:
Input/Output:…µ XSERV
BAUD, RECN, RECV, SEND XRECV, XGET, XPUT
Command
X Volume Coordinates Command: Sets the width of the view volume in the reserved variable
VPAR.
xleft and xright set the x-coordinates for the view volume used in 3D plots. These values are stored
in the reserved variable VPAR.
…µ XVOL
Level 2/Argument 1

See also:

XXRNG
Type:
Description:

Level 1/Argument 2

xleft
xrightEYEPT, XXRNG, YVOL, YYRNG, ZVOLLevel 1/Item 1→

Command
X Range of an Input Plane (Domain) Command: Specifies the x range of an input plane (domain)for GRIDMAP and PARSURFACE plots.
xmin and xmax are real numbers that set the x-coordinates for the input plane. These values are
stored in the reserved variable VPAR.

Access:…µ XXRNG
Input/Output:
Level 2/Argument 1

See also:

ΣXY
Type:
Description:

Access:
Input/Output:

Level 1/Argument 2

Level 1/Item 1

→
xmin
xmax
EYEPT, NUMX, NUMY, XVOL, YVOL, YYRNG, ZVOL
Command
Sum of X times Y command: Sums the products of each of the corresponding values in the
independent- and dependent-variable columns of the current statistical matrix (reserved variable
ΣDAT). The independent column is the column designated as XCOL and the dependent column
is the column designated as YCOL.
…µΣXY
Level 1/Argument 1

Level 1/Item 1→
See also:

ΣX*Y
Type:
Description:

Sum of X*YNΣ, ΣX, XCOL, ΣXY, ΣX2, YCOL, ΣY2
Command
Sum of X times Y command: Sums the products of each of the corresponding values in the
independent- and dependent-variable columns of the current statistical matrix. ΣX*Y is provided
for compatibility with the HP 28. ΣX*Y is the same as ΣXY; see its listing for details.

Access:Full Command and Function Reference 3-281

Σ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 inthe reserved variable ΣPAR. The default dependent variable column number is 2.
…µΣY
Level 1/Argument 1

Level 1/Item 1→
See also:

Σ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-variablecolumns of the current statistical matrix (reserved variable ΣDAT). The dependent column is thecolumn designated as YCOL…µΣY2
Level 1/Argument 1

Level 1/Item 1→
See also:

ΣY^2
Type:
Description:

Sum of Y

Sum of Y2

NΣ, ΣX, XCOL, ΣXY, ΣX2, YCOL
Command
Sum of Squares of y-Values Command: Sums the squares of the values in the dependent-variablecolumns 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.

Access:YCOL
Type:Description:

Access:
Input/Output:

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 thatutilize the YCOL specification in ΣPAR will cause an error.
…µ YCOL
Level 1/Argument 1

See also:

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

YRNG
Type:
Description:

Access:
Input/Output:

Command
y-Axis Display Range Command: Specifies the y-axis display range.
The y-axis display range is stored in the reserved variable PPAR as ymin and ymax 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 ymin and ymax are –3.1 and 3.2, respectively for the HP 48gII and -3.9
and 4.0, respectively for the HP 50g and 49g+.
…µ YRNG
Level 2/Argument 1

See also:

Level 1/Argument 2

ymin
ymax
AUTO, PDIM, PMAX, PMIN, XRNG

Level 1/Item 1→

YSLICEType:
Description:

Command
Y-Slice Plot Command: Sets the plot type to YSLICE.
When plot type is set YSLICE, the DRAW command plots a slicing view of a scalar function of
two variables. YSLICE 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 YSLICE, 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 isviewed.
• xstep determines the interval between plotted x-values within each “slice”.
• ystep determines the number of slices to draw.
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 YSLICE, 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 is0, which specifies an interval of 1 pixel.
• axes is not used.
• ptype is a command name specifying the plot type. Executing the command YSLICE places
YSLICE in ptype.
• depend is a name specifying the dependent variable. The default value is Y.
Access:…µ YSLICE
Input/Output: None
See also:
BAR, CONIC, DIFFEQ, FUNCTION, GRIDMAP, HISTOGRAM, PARAMETRIC,PARSURFACE, PCONTOUR, POLAR, SCATTER, SLOPEFIELD, TRUTH, WIREFRAME
Full Command and Function Reference 3-283

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

See also:

YYRNG
Type:
Description:

Access:
Input/Output:

ynear
yfar
EYEPT, XVOL, XXRNG, YYRNG, ZVOLLevel 1/Item 1→

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.
…µ YYRNG
Level 2/Argument 1

See also:

Level 1/Argument 2

Level 1/Argument 2

ynear
yfar
EYEPT, XVOL, XXRNG, YVOL, ZVOLLevel 1/Item 1

→

ZEROS
Type:
Description:

CommandAccess: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:

Returns the zeros of a function of one variable, without multiplicity.

• If Exact mode is set (flag –105 is clear), attempts to find exact solutions only. This may return anull list, even if approximate solutions exist.
• 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.

Example: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}3-284 Full Command and Function Reference

ZFACTORType:
Description:

Function
Gas Compressibility Z Factor Function: Calculates the gas compressibility correction factor for
non-ideal behavior of a hydrocarbon gas.
xTr is the reduced temperature: the ratio of the actual temperature (T) to the pseudocriticaltemperature (Tc). (Calculate the ratio using absolute temperatures.) xTr must be between 1.05 and
3.0.
yPr is the reduced pressure: the ratio of the actual pressure (P) to the pseudocritical pressure (Pc).
yPr must be between 0 and 30.
xTr and yPr must be real numbers or unit objects that reduce to dimensionless numbers.

Access:…µ ZFACTOR
Flags:
Numerical Results (–3)
Input/Output:

ZVOL
Type:
Description:

Access:
Input/Output:

Level 2/Argument 1

Level 1/Argument 2

xTr

yPr

→

xZfactorxTr'symb'→'ZFACTOR(xTr,symb)''symb'yPr→'ZFACTOR(symb,yPr)''symb1''symb2'→'ZFACTOR(symb1,symb2)'

Command
Z Volume Coordinates Command: Sets the height of the view volume in the reserved variable
VPAR.
xlow and xhigh are real numbers that set the z-coordinates for the view volume used in 3D plots.
These values are stored in the reserved variable VPAR.
…µ ZVOL
Level 2/Argument 1

See also:

Level 1/Item 1

Level 1/Argument 2

xlow
xhigh
EYEPT, XVOL, XXRNG, YVOL, YYRNG

Level 1/Item 1→^(Power)Type:
Function
Description:
Power Analytic Function: Returns the value of the level 2 object raised to the power of the level 1
object. This can also apply to a square matrix raised to a whole-number power.
If either argument is complex, the result is complex.
The branch cuts and inverse relations for wz are determined by this relationship:
wz = exp(z(ln w))
Access:Flags:

Q
Principal Solution (–1), Numerical Results (–3)

Full Command and Function Reference 3-285

Input/Output:
Level 2/Argument 1

See also:

Level 1/Argument 2wz'symb''symb1'x_unitx_unit
EXP, ISOL, LN, XROOTz'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 informationfrom local variables and include that information in the expression, avoiding the problem thatwould occur if the local variables no longer existed when the local names were finally evaluated.
Access:@¦Flags:
Numerical Results (–3)
Input/Output:

See also:(¦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)

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 ---22

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 thesame 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 suchthat:
1. each argument is sent to a distinct result, and2. each possible result is achieved. The points in this restricted domain of SQ are called theprincipal 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

The principal branch used by the calculator for √ was chosen because it is analytic in the regions
where the arguments of the real-valued inverse function are defined. The branch cut for thecomplex-valued square root 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 √. The graph of the domain shows where thebranch cut occurs: the heavy solid line marks one side of the cut, while the feathered lines markthe 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*√Z' for the case s1=1. For the other value of s1, thehalf-plane in the lower graph is rotated. Taken together, the half-planes cover the whole complex
plane, which is the domain of SQ.
View these graphs with domain and range reversed to see how the domain of SQ is restricted tomake an inverse function possible. Consider the half-plane in the lower graph as the restricteddomain Z = (x, y). SQ sends this domain onto the whole complex plane in the range W = (u, v) =SQ(x, y) in the upper graph.
Access:R
Flags:
Principal Solution (–1), Numerical Results (–3)
Input/Output:
Level 1/Argument 1

See also:

SQ, ^, ISOL

Level 1/Item 1

z

→

z

x_unit→x unit'symb'→' ( symb ) '1⁄2

Full Command and Function Reference 3-287

∫(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 interms 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 itis 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 ofother 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 theexpression and evaluating again, or estimate the answer using numerical integration.
Evaluating ∫ in Numerical Results mode (flag –3 set) returns a numerical approximation, and storesthe error of integration in variable IERR. ∫ consults the number format setting to determine how
accurately to compute the result.
Access:…Á(Á is the right-shift of the Ukey).
Flags:
Numerical Result (–3), Number Format (–45 to –50)
Input/Output:
L4/A1

lower limit

L3/A2

L2/A3

L1/A4

upper limit

integrand'name'

L1/I1→'symbintegral'

L = Level; A = Argument; I = Item

Example:See also:

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 ofarithmetic, such as the result of dividing zero by zero, or infinity by infinity. Mathematicaloperations 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example you could define $=1_? Then other currencies could be defined as multiples or fractionsof 1_? The calculator has symbols for Yen, Pounds and Euros; other currencies could be definedusing their names. The unit conversion system would then check conversions between them forconsistency because ? is recognized as a base unit.
Access:Catalog, …µ, or ~…3∞(Infinity)
Type:
Function
Description:
Infinity: used to signify a numeric result that is infinite by the rules of arithmetic, such as the resultof dividing a non-zero number by zero. The calculator recognizes two kinds of infinity: signed
and unsigned. Evaluating '1/0' gives an unsigned infinity '∞'. Selecting infinity from the keyboard,
from the CHARS table, or from the catalog …µ returns '+∞' and the sign can be changed.
Calculations with the unsigned infinity return unsigned infinity or ? as their result. Calculations
with the signed infinity can return ordinary numeric results, as in the example. Positive infinity
and unsigned infinity are equal if tested with ==, but are not identical if tested with SAME.
Access:Keyboard, CHARS, or catalog, …µ

Flags:Exact mode must be set (flag –105 clear),and numeric mode must not be set (flag –3 clear) for mathematical operations to give ∞ as aresult, and for executing ∞ from the keyboard or catalog to give +∞ and not an error.

Example:Command:Find the arc tangent of minus infinity. Assume that radians mode is set.
ATAN(-∞)

Results:-(π/2)

Σ(Summation)
Type:
Function
Description:
Summation Function: Calculates the value of a finite series.
The summand argument smnd can be a real number, a complex number, a unit object, a local or
global name, or an algebraic object. The algebraic syntax for Σ differs from the stack syntax. The
algebraic syntax is: 'Σ(index=initial,final,summand)'Access:…½(½ is the right-shift of the Skey).
Flags:
Symbolic Constants (–2), Numerical Results (–3)
Input/Output:
L4/A1

L3/A2

L2/A3

L1/A4

L1/I1

'indx'

xinit

xfinal

smnd

→

xsum

'indx''init'

xfinalsmnd→'Σ(indx = init, xfinal, smnd)''indx'

xinit'final'smnd→'Σ(indx = xinit, final, smnd)''indx''init''final'smnd→'Σ(indx = init, final, smnd)'

L = Level; A = Argument; I = Item

Example:See also:

The command sequence 'N' 1 5 'A^N' Σ returns'(EXP(6*LN(A))-A)/(A-1)'.
TAYLR, ∫, ∂Σ+
(Sigma Plus)Type:
Command
Description:
Sigma Plus Command: Adds one or more data points to the current statistics matrix (reserved
variable ΣDAT).
For a statistics matrix with m columns, arguments for Σ+ can be entered several ways:
Full Command and Function Reference 3-289

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 realmatrix, or if the number of coordinate values in each data point entered with Σ+ does not matchthe 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

L1/I1

x

→

[ x1, x2, …, xm ]→[[ x1 1, …, x1 m ] [ xn 1, … ,xn m ]]

→

xm

→

x1 … xm–1

L = Level; A = Argument; I = Item

Example:See also:

The sequence CLΣ [ 2 3 4 ] Σ+ 3 1 7 Σ+ creates the matrix[[ 2 3 4 ][ 3 1 7 ]] in ΣDAT.
CLΣ, RCLΣ, STOΣ, Σ–Σ–(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

See also:

π
(Pi)
Type:
Description:

Level 1/Item 1

→

x

→

[ x1 x2 … xm ]CLΣ, RCLΣ, STOΣ, Σ+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

3-290 Full Command and Function Referenceflag –2 or flag –3 is set (to return numerical results), then evaluating 'SIN(π)' returns the numericalapproximation –2.06761537357E–13.
Access:!ì( ìis the left-shift of the #key).
Flags:
Symbolic Constants (–2), Numerical Results (–3)
Input/Output:
Level 1/Argument 1

See also:

Level 1/Item 1

→

'̟'

→

3.14159265359…

e, i, MAXR, MINR, →Qπ∂(Derivative)
Type:
Function
Description:
Derivative Function: Takes the derivative of an expression, number, or unit object with respect toa specified variable of differentiation.
When executed in stack syntax, ∂ executes a complete differentiation: the expression 'symb1' isevaluated repeatedly until it contains no derivatives. As part of this process, if the variable ofdifferentiation name has a value, the final form of the expression substitutes that value substituted
for all occurrences of the variable.
The algebraic syntax for ∂ is '∂name(symb1'). When executed in algebraic syntax, ∂ executes a
stepwise differentiation of symb1, invoking the chain rule of differentiation — the result of one
evaluation of the expression is the derivative of the argument expression symb1, multiplied by a
new subexpression representing the derivative of symb1’s argument.
If ∂ is applied to a function for which the calculator does not provide a derivative, ∂ returns a new
function whose name is der followed by the original function name.
Access:…¿(¿is the right-shift of the Tkey).
Flags:
Numerical Results (–3)
Input/Output:

Example:See also:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1'symb1''name'→'symb2'z'name'→

0→x_unit'name'
0
In Radians mode, the command sequence 'ˆX(SIN(Y))' EVAL returns 0. When Y has
the value 'X^2', the command sequence 'SIN(Y)' 'X' ˆ returns'COS(X^2)*(2*X)'. The differentiation has been executed in stack syntax, so that all of
the steps of differentiation have been carried out in a single operation.
TAYLOR, ∫, Σ!
(Factorial)
Type:
Function
Description:
Factorial (Gamma) Function: Returns the factorial n! of a positive integer argument n, or the
gamma function Γ(x+1) of a non-integer argument x.
For x ≥ 253.1190554375 or n < 0, ! causes an overflow exception (if flag –21 is set, the exception
is treated as an error). For non-integer x ≤ –254.1082426465, ! causes an underflow exception (ifflag –20 is set, the exception is treated as an error).
In algebraic syntax, ! follows its argument. Thus the algebraic syntax for the factorial of 7 is 7!.
For non-integer arguments x, x! = Γ(x + 1), defined for x > –1 as:
Full Command and Function Reference 3-291

∞
–t x

Γ ( x + 1 ) = ∫ e t dt
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

See also:

Level 1/Item 1

n

→

n!

x

→

Γ(x + 1)'symb'→'(symb!)'

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 athermometer 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 thetemperature 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 (Kand º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:
See also:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

x

y

→

xy/100x'symb'→'%(x,symb)''symb'x→'%(symb,x)''symb1''symb2'→'%(symb1, symb2)'xy_unit→(xy/100)_unit

x_unity→(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

The calculator handles units by attaching the unit to a numeric value using the underscore symbol.
For example, the value of 3 kilometers is shown as 3_km, and is created by entering 3 and thenthe underscore character, followed by attaching the kilometer unit.
Access:
Input:
Output:…Ý(Ý is the right-shift of the -key).
Numeric value
Numeric value ready for a unit attachment«»(Program delimiters)
Type:
ObjectDescription:
Program delimiter object: Enters a pair of program delimiter objects.
A program is a set of instructions enclosed by an open program object delimiter and a close
program object delimiter. These can be nested to have a program procedure enclosed within anouter program object.
Access:…å(å is the right-shift of the +key).
Input:
None
Output:A pair of program delimiters<(Less than)Type:
Function
Description:Less Than Function: Tests whether one object is less than another object.
The function < returns a true test result (1) if the first argument is less than 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” means numerically smaller (1 is less than 2). For
real numbers, “less than” also means more negative (–2 is less than –1).
For strings, “less than” means alphabetically previous (“ABC” is less than “DEF”; “AAA” is lessthan “AAB”; “A” is less than “AA”). In general, characters are ordered according to theircharacter 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 temperatures and not differences in temperatures. For compound temperature units, thecalculator assumes temperature units represent temperature differences. For more information on
using temperature units with arithmetic functions, refer to the entry for +.
…Ç(Ç is the right-shift of the Xkey above the 8).
Access:Flags:
Numerical Results (–3)

Full Command and Function Reference 3-293

Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

x#n1“string1”
x'symb''symb1'x_unit1x_unit'symb'

y#n2“string2”'symb'
x'symb2'y_unit2'symb'
x_unitLevel 1/Item 1

→
→
→
→
→
→
→
→
→

0/1
0/1
0/1
'x < symb''symb < x''symb1 < symb2'
0/1'x_unit < symb''symb < x_unit'≤, >, ≥, ==, ≠≤(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 expressionthat can be evaluated to return a test result.
For real numbers and binary integers, “less than or equal” means numerically equal or smaller (1 isless than 2). For real numbers, “less than or equal” also means equally or more negative (–2 is lessthan –1). For strings, “less than or equal” means alphabetically equal or previous (“ABC” is lessthan 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, forexample, 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, thecalculator assumes temperature units represent temperature differences. For more information on
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 2/Argument 1

Level 1/Argument 2

x#n1“string1”
x'symb''symb1'x_unit1x_unit'symb'
See also:<, >, ≥, ==, ≠3-294 Full Command and Function Referencey#n2“string2”'symb'
x'symb2'y_unit2'symb'
x_unitLevel 1/Item 1

→
→
→
→
→
→
→
→
→

0/1
0/1
0/1
'x ≤symb''symb ≤x'
'symb1 ≤symb2'
0/1'x_unit ≤symb''symb ≤x_unit'>(Greater than)Type:
Function
Description:
Greater Than Function: Tests whether one object is greater than another object.
The function > returns a true test result (1) if the first argument is greater than 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, “greater than” means numerically greater (2 is greater than1). For real numbers, “greater than” also means less negative (–1 is greater than –2).
For strings, “greater than” means alphabetically subsequent (“DEF” is greater than “ABC”;“AAB” is greater than “AAA”; “AA” is greater than “A”). In general, characters are orderedaccording to their character codes. This means, for example, that “a” is greater than “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, thecalculator assumes temperature units represent temperature differences. For more information on
using temperature units with arithmetic functions, refer to the entry for +.
…É(É is the right-shift of the Ykey).
Access:Flags:
Numerical Results (–3)
Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

x#n1“string1”
x'symb''symb1'x_unit1x_unit'symb'

y#n2“string2”'symb'
x'symb2'y_unit2'symb'
x_unitLevel 1/Item 1

→
→
→
→
→
→
→
→
→

0/1
0/1
0/1
'x > symb''symb > x'
'symb1 > symb2'
0/1'x_unit > symb''symb > x_unit'<, ≤, ≥, ==, ≠≥(Greater than or Equal)Type:
Function
Description:
Greater Than or Equal Function: Tests whether one object is greater than or equal to anotherobject.
The function ≥ returns a true test result (1) if the first argument is greater than or equal to thesecond 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, “greater than or equal to” means numerically equal or
greater (2 is greater than or equal to 1). For real numbers, “greater than or equal to” also means
equally or less negative (–1 is greater than or equal to –2).
For strings, “greater than or equal to” means alphabetically equal or subsequent (“DEF” is greaterthan or equal to “ABC”; “AAB” is greater than or equal to “AAA”; “AA” is greater than or equal
to “A”). In general, characters are ordered according to their character codes. This means, for
Full Command and Function Reference 3-295

Access:
Flags:
Input/Output:

See also:

example, that “a” is greater than or equal to “B”, since “B” is character code 66, and “a” ischaracter 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, thecalculator assumes temperature units represent temperature differences. For more information on
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

Level 1/Item 1

x

y

→

0/1

#n1

#n2

→

0/1

“string1”“string2”

→

0/1

x

'symb'→'x ≥ symb''symb'

x→'symb ≥ x'

'symb1''symb2'→'symb1 ≥ symb2'

x_unit1y_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 asymbolic 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 iscompared 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, thecalculator assumes temperature units represent temperature differences. For more information on
using temperature units with arithmetic functions, refer to the entry for +.
Access:Flags:!Ä
Numerical Results (–3)

3-296 Full Command and Function Reference( Äis the left-shift of the Wkey).

Input/Output:

See also:

Level 2/Argument 1

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 1/Item 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 numberof 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 ann × 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 thetwo 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)

Full Command and Function Reference 3-297

Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

z2

→

z1 z2

[[ matrix ]][ array ]→[[ matrix × array ]]z[ array ]→[ z × array ][ array ]z→[ array × z ]z'symb'→'z * symb''symb'

z→'symb * z''symb1''symb2'→'symb1 *symb2'

#n1

n2

→

#n3

n1

#n2

→

#n3

#n1

#n2

→

#n3

x_unity_unit→xy_unitx × unityxy_unit→xy_unitx_unity→xy_unit'symb'

x_unit→'symb * x_unit'

x_unit'symb'→'x_unit * symb'+, –, /, =

+
(Add)
Type:
Description:

Function
Add Analytic Function: Returns the sum of the arguments.
The sum of a real number a and a complex number (x, y) is the complex number (x+a, y).
The sum of two complex numbers (x1, y1) and (x2, y2) is the complex number (x1+x2, y1+y2).
The sum of a real array and a complex array is a complex array, where each element x of the realarray is treated as a complex element (x, 0). The arrays must have the same dimensions.
The sum of a binary integer and a real number is a binary integer that is the sum of the twoarguments, truncated to the current wordsize. (The real number is converted to a binary integer
before the addition.)
The sum of two binary integers is truncated to the current binary integer wordsize.
The sum of two unit objects is a unit object with the same dimensions as the second argument.
The units of the two arguments must be consistent.
The sum of two graphics objects is the same as the result of performing a logical OR, except thatthe two graphics objects must have the same dimensions.
Common usage is ambiguous about some units of temperature. When ºC or ºF represents athermometer 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 thetemperature is a unit with no additive constant: 1 ºC=1 K and 1 ºF =1 ºR.
The calculator assumes that the simple temperature units x_ºC and x_ºF represent thermometer
temperatures when used as arguments to the functions <, >, ≤, ≥, ==, and ≠. This means that, inorder to do the calculation, the calculator will first convert any Celsius temperature to Kelvin andany Fahrenheit temperature to Rankine. (For other functions or compound temperature units, such
as x_ºC/min, the calculator assumes temperature units represent temperature differences, so there
is no additive constant involved, and hence no conversion.) The arithmetic operators +, –, %CH,

3-298 Full Command and Function ReferenceAccess:
Flags:
Input/Output:

Example 1:
Example 2:
Example 3:
Example 4:
See also:

and %T treat temperatures as differences, without any additive constant, but require botharguments to be either absolute (K and ºR), both ºC, or both ºF. No other combinations areallowed.
+Numerical Results (–3), Binary Integer Wordsize (–5 through –10)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

z2

→

z1 + z2[ array ]1[ array ]2→[ array ]3z'symb'→'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'.
–, *, /, =, ADD

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 thereal 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 firstargument and the two’s complement of the second argument. (The real number is converted to abinary integer before the subtraction.)Full Command and Function Reference 3-299

Access:
Flags:
Input/Output:

Example 1:
Example 2:
Example 3:
See also:

The difference of two binary integers is a binary integer that is the sum of the first argument andthe two’s complement of the second argument.
The difference of two unit objects is a unit object with the same dimensions as the second
argument. The units of the two arguments must be consistent.
Common usage is ambiguous about some units of temperature. When ºC or ºF represents athermometer 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 thetemperature is a unit with no additive constant: 1 ºC = 1 K and 1 ºF = 1 ºR.
The calculator assumes that the simple temperature units x_ºC and x_ºF represent thermometer
temperatures when used as arguments to the functions <, >, ≤, ≥, ==, and ≠. This means that, inorder to do the calculation, the calculator will first convert any Celsius temperature to Kelvin andany Fahrenheit temperature to Rankine. (For other functions or compound temperature units, such
as x_ºC/min, the calculator assumes temperature units represent temperature differences, so there
is no additive constant involved, and hence no conversion.)
The arithmetic operators +, –, %, %CH, 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)
Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

z2

→

z1 – z2[ array ]1[ array ]2→[ array ]1–2

z'symb'→'z – symb''symb'

z→'symb – z'

'symb1''symb2'→'symb1 – symb2'

#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'
25_ft 8_in - returns 292_in.
[[ 5 1 ][ 3 3 ]] [[ 2 1 ][ 0 1 ]] - returns[[ 3 0 ][ 3 2 ]].
'TOTAL' 'PART' - returns 'TOTAL-PART'.
+, *, /, =/(Divide)Type:
Function
Description:
Divide Analytic Function: Returns the quotient of the arguments: the first argument is divided by
the second argument.
A real number a divided by a complex number (x, y) returns:

3-300 Full Command and Function Referenceaxay ---------------, ----------------
 2
2 2
2
x +y x +y

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:
 x 1 x 2 + y 1 y 2 y 1 x 2 – x 1 y 2- , -------------------------- --------------------------
2
2
 x2 + y2
x +y 
22

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 arrayhas 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 partof the quotient. (The real number is converted to a binary integer before the division.) A divisorof zero returns # 0.
When dividing two unit objects, the scalar parts and the unit parts are divided separately.
Access:/Flags:
Numerical Results (–3)
Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

z2

→

z1 / z2[ array ][[ matrix ]]→[[ matrix–1 ×array ]]z'symb'→'z /symb''symb'

z→'symb /z''symb1''symb2'→'symb1 / symb2'

#n1

n2

→

#n3

n1

#n2

→

#n3

#n1

#n2

→

#n3

x_unit1y_unit2→(x / y)_unit1/unit2xy_unit→(x / y)_1/unit

x_unity→(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, theresult 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 numericalrootfinders.
Full Command and Function Reference 3-301

Common usage is ambiguous about some units of temperature. When ºC or ºF represents athermometer 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 thetemperature 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 (Kand ºR), both ºC, or both ºF. No other combinations are allowed.
Access:…Å
Flags:
Numerical Results (–3)
Input/Output:

See also:(Å is the right-shift of the Wkey).

Level 2/Argument 1

Level 1/Argument 2

Level 1/Item 1

z1

z2

→

z1 = z2z'symb'→'z = symb''symb'

z→'symb = z''symb1''symb2'→'symb1 = symb2'

y_unitx→y_unit1 = xy_unitx_unit→y_unit1 = x_unit'symb'

x_unit→'symb = x_unit'

x_unitDEFINE, EVAL, –'symb'→'x_unit = symb'==(Logical Equality)
Type:
Function
Description:
Logical Equality Function: Tests if two objects are equal.
The function == returns a true result (1) if the two objects are the same type and have the samevalue, 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 anumber (real or complex) or an algebraic, == returns a symbolic comparison expression that canbe evaluated to return a test result. Note that == is used for comparisons, while = separates two
sides of an equation. If the imaginary part of a complex number is 0, it is ignored when thecomplex number is compared to a real number.
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, thecalculator assumes temperature units represent temperature differences. For more information on
using temperature units with arithmetic functions, refer to the entry for +.
Access:Flags:!°TEST ==Numerical Results (–3)

3-302 Full Command and Function Reference( °is the left-shift of the Nkey).

Input/Output:

See also:

Level 2/Argument 1

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 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 agraphic object into PICT or a library or backup object into a port.
Access:K
Input/Output:

See also:

Level 2/Argument 1

Level 1/Argument 2

obj'name'→

obj:nport :namebackup

→

obj

obj
DEFINE, RCL, →, STO

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:
Leveln/Argument1 7 Level1/Argumentn

obj1 … objn
Example 1:

Example 2:

Level 1/Item 1→

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 storesit in local variable y, and executes calculations with x and y in the defining procedure (in this case aprogram). 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

See also:« → x y z 'x*y/2+z' »is a user-defined function. Like a built-in function, a user-defined function can take its arguments
in stack syntax or algebraic syntax, and can take symbolic arguments. In addition, a user-defined
function is differentiable if its defining procedure is an algebraic expression that contains only
differentiable functions.
DEFINE, LOCAL, STO;(Semicolon)
Type:
Command
Description:
Drop Safe Command: Removes the level 1 object from the stack if there is one, otherwise doesnothing.
Access:…&í when flag –51 is clear( íis the right-shift of the #key)…í when flag –51 is set( íis the right-shift of the #key).

Input/Output:
Level 1

obj

Level 1→→

See also:

CLEAR, DROP, DROPN, DROP2

3-304 Full Command and Function Reference

4
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.
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 areavailable.
!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 isanything 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.

See Appendix C in the User’s Guide for further details of the CAS settings, and for other information about theCAS. 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
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. Bydefault 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 beobserved. If an unexpected error occurs, or an unexpected message is seen, check this list.

Computer Algebra System 4-1

•

•

•

•
•

•
•
•
•
•
•
•

•
•

•

Many CAS commands will give numeric results instead of symbolic results if numeric mode is set instead ofbeing cleared. Though these results may be correct, they will not be what the user wants if a symbolic result
is needed. For this reason, the Flags section of most operation descriptions says that numeric mode should
not be set.
If approximate mode is set instead of exact mode, CAS commands will often give reasonable results, but
unexpected results can be obtained, because, for example, powers are real numbers, not integers, forinstance a cube will be treated as x3.0 instead of x3. For this reason, the Flags section of most operation
descriptions says that exact mode should be set. Some commands, like the numeric solvers, will only findapproximate solutions if approximate mode is set.
CAS operations are designed to work with integers if possible, and some CAS operations round their inputs
before using them. FIX 0 mode will round to whole numbers, losing accuracy. STD mode will retain fullaccuracy, so it is the best display mode to use with the CAS and is used in most of the examples in thischapter.
For the same reasons, the general solutions, symbolic constants and symbolic arguments flags (flags –1, –2
and –3) should normally be clear when working with the CAS.
Where possible, integer numbers should be used as input, not real numbers. The functions RND, CEIL and
FLOOR can round a real number to a whole real number, and RI will convert a whole real number to an
integer.
If complex inputs are given, approximate mode may need to be set to find solutions, and complex modemust be set (flag –103 set).
Not only the trigonometry rewriting operations, but some other CAS operations require the angle mode to
be set to radians (flag –17 clear), even if it is not immediately obvious that this is so. For this reason, theFlags section of many operation descriptions says that radians mode should be set.
Some CAS operations will work one step at a time if step-by-step mode is set (flag –100 set). If a result iswanted immediately, and the calculator instead displays one step of the operation, cancel the operation, clear
flag –100, then repeat the operation.
If a mode needs to be changed for an operation to work, the calculator will by default ask if the mode canbe changed. If the Silent mode switch flag (flag –120) is set, the calculator changes the mode without asking.
If the mode switch disallowed flag (flag –123) is set, the mode will not be changed and an error will occur.
All the system flags from –99 to –128 are intended for use by the CAS. It is worth reading Appendix C in
the User’s Guide to learn the detailed effects of these flags on CAS operations and displays.
Remember that in RPN mode, symbolic expressions typed on the command line should be enclosed insingle quote marks ′x + y′. For clarity, it can be helpful to type expressions in single quote marks in
Algebraic mode too.
It is important to write symbolic expressions using the current variable. Some CAS operations will workwith this variable, but treat other variables simply as unknown numbers. If an expression has been enteredusing a variable other than the current variable, it may be simpler to change the current variable in the CAS
MODES form, rather than rewrite the whole expression.
In algebraic mode (flag –95 set), some CAS commands will replace variables with their numeric values
before returning a result, even if “argument to symbolic” mode is set (flag –3 clear). In RPN mode, they will
be returned as variables. Some other CAS commands will always replace variables with their numeric results.
Because of the above, variables used in symbolic operations should not have the same names as variables
stored in the current directory/folder (or in directories above this directory). If, for example, x is the current
variable, and a variable called ′x′ exists in the current directory or in the HOME directory, then the value
stored in ′x′ might be used instead of the symbolic variable x.
The modulo value used in modulus calculations is 13 after the calculator is reset. If the CAS modes are resetwith CASCFG, the modulo is also 13, but if the modes are reset using !RESET as above, the modulo is 3,
otherwise it is the value most recently set. It is important to change this to the required value before carryingout any modulus operations.

4-2 Computer Algebra System

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,
ready for use.
• 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 morethan 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 isalso very similar to the CAS of the HP 40G and HP 40gs models, so programs and books written for them may be
helpful.

Extending the CAS
Users can extend the CAS by writing their own functions or commands. Functions can be written as UDFs (UserDefined Functions); see the description of DEFINE in Chapter 3 of the calculator User’s Guide and thedescriptions of DEFINE and DEF in the Command Reference in Chapter 3 of this reference. The patternmatching commands ↑MATCH and ↓MATCH allow the user to write programs to edit algebraic expressions. Hereis an example of an RPL program using ↑MATCH to replace the square root of a square of a symbol with thesymbol 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 theirdefault values, with the CASCFG command, or with the !RESET key in the CAS settings menu.

Computer Algebra System 4-3

Computer algebra command categories listed by menu
CAS operations are listed here in order of the keyboard menus they appear in. These menus can be selected fromthe CAS menu in G, or directly from the keyboard. A few CAS operations appear in more than one menu. Many
CAS commands are also available from the P menu, or from the „´ menu; these menus are not listed
here, to avoid duplication. The CAS has its own menu commands too, they are included in the alphabetical list ofcommands. Operations that do not appear in any menu can be spelled out or selected from …µ.

Algebra commands, …×
COLLECT..........................3-40
EXPAND..........................3-80
FACTOR..........................3-82
LIN..........................3-131
LNCOLLECT .........................3-136
PARTFRAC ..........................3-164
SOLVE..........................3-229
SUBST..........................3-243
TEXPAND ..........................3-252

Arithmetic commands
Arithmetic Integer commands, !ÞINTEGEREULER..........................3-76
IABCUV..........................3-108
IBERNOULLI..........................3-109
ICHINREM ..........................3-109
IDIV2..........................3-111
IEGCD..........................3-111
IQUOT..........................3-120
IREMAINDER ........................3-121
ISPRIME?
..........................3-122
NEXTPRIME ..........................3-155
PA2B2..........................3-162
PREVPRIME ..........................3-178
Arithmetic Polynomial commands, !ÞPOLYNOMIALABCUV..........................3-5
CHINREM ..........................3-34
CYCLOTOMIC .......................3-48
DIV2..........................3-62
EGCD..........................3-72
FACTOR..........................3-82
FCOEF..........................3-85
FROOTS..........................3-92
GCD..........................3-96

4-4 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, !ÞMODULOADDTMOD .......................... 3-9
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

Calculus commands
Derivation and integration commands, !ÖDERIV. & INTEG.
CURL..........................3-48
DERIV..........................3-56
DERVX..........................3-56
DIV..........................3-62
FOURIER..........................3-91
HESS..........................3-104
IBP..........................3-109
INTVX..........................3-119
LAPL..........................3-127
PREVAL..........................3-177
RISCH..........................3-202
SIGMA..........................3-222
SIGMAVX..........................3-223
Limits and series commands, !ÖLIMITS & SERIESDIVPC..........................3-63
lim..........................3-131
SERIES..........................3-220
TAYLOR0..........................3-250
TAYLR..........................3-250
Differential equations commands, !ÖDIFFERENTIAL EQNSDESOLVE ..........................3-56
ILAP..........................3-114
LAP..........................3-127
LDEC..........................3-129
Graphing commands, !ÖGRAPH
DEFINE..........................3-52
GROBADD ..........................3-101
PLOT..........................3-171
PLOTADD ..........................3-171
SIGNTAB..........................3-224
TABVAL..........................3-246
TABVAR..........................3-247
Other Calculus commands, !Ö
DERVX..........................3-56
INTVX..........................3-119
These two operations are available directly from the CALC menu as well as being in the Derivation andIntegration commands menu.

4-6 Computer Algebra System

Exp and Lin commands, !Ð
EXPLN.......................... 3-81
EXPM.......................... 3-81
LIN.......................... 3-131
LNCOLLECT .......................... 3-136
LNP1.......................... 3-136
TEXPAND .......................... 3-252
TSIMP.......................... 3-260

Matrix-related commands
Create, !Ø CREATEAUGMENT .......................... 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
HADAMARD .......................... 3-102
LSQ.......................... 3-139
MAD.......................... 3-140
RANK.......................... 3-190
RNRM.......................... 3-206
RSD.......................... 3-213
SIZE.......................... 3-226
SNRM.......................... 3-228
SRAD.......................... 3-231

Computer Algebra System 4-7

TRACE
TRAN..........................3-255..........................3-255

Operations, !Ø FACTORIZATION
LQ..........................3-138
LU..........................3-139
QR..........................3-188
qr..........................3-188
SCHUR..........................3-218
SVD..........................3-244
SVL..........................3-244
Quadratic form, !Ø QUADRATIC FORM
AXQ..........................3-26
CHOLESKY ..........................3-34
GAUSS..........................3-95
QXA..........................3-190
SYLVESTER ..........................3-245
Linear Systems, !Ø LINEAR SYSTEMSLINSOLVE ..........................3-133
REF..........................3-198
rref..........................3-210
RREF..........................3-210
SYST2MAT ..........................3-245
Linear Applications, !Ø LINEAR APPLIMAGE..........................3-115
ISOM..........................3-121
KER..........................3-123
MKISOM..........................3-149
Eigenvectors, !Ø EIGENVECTORSDIAGMAP ..........................3-58
EGV..........................3-73
EGVL..........................3-73
JORDAN..........................3-122
PCAR..........................3-165
PMINI..........................3-172
Vector, !Ø VECTOR
BASIS..........................3-27
CROSS..........................3-47
DOT..........................3-67
GRAMSCHMIDT ...................3-99
IBASIS..........................3-109
4-8 Computer Algebra System

Symbolic solve commands, !Î
DESOLVEISOLLDECLINSOLVESOLVEVX
SOLVE
ZEROS

.......................... 3-56.......................... 3-121.......................... 3-129.......................... 3-133.......................... 3-229.......................... 3-229.......................... 3-284

Trigonometry commands
Hyperbolic, …Ñ HYPERBOLIC
ACOSH.......................... 3-8
ASINH.......................... 3-17
ATANH.......................... 3-22
COSH.......................... 3-46
SINH.......................... 3-226
TANH.......................... 3-249
Other Trigonometry commands, …Ñ
ACOS2S.......................... 3-7
ASIN2C.......................... 3-17
ASIN2T.......................... 3-17
ATAN2S.......................... 3-21
HALFTAN .......................... 3-102
SINCOS.......................... 3-225
TAN2SC.......................... 3-248
TAN2SC2.......................... 3-249
TCOLLECT .......................... 3-251
TEXPAND .......................... 3-252
TLIN.......................... 3-254
TRIG.......................... 3-256
TRIGCOS.......................... 3-257
TRIGSIN.......................... 3-257
TRIGTAN.......................... 3-257
TSIMP ....................................... 3-260

Computer Algebra System 4-9

Convert commands, !Ú
Unit conversion tools, !Ú UNITS TOOLSCONVERT ..........................3-45
UBASE..........................3-262
UVAL..........................3-267
UFACT..........................3-263→UNIT..........................3-264
Base conversion tools, !Ú BASE
All operations in the BASE submenus are described in Chapter 3.

Trigonometric conversions, !Ú TRIG CONVACOS2S..........................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, !Ú REWRITE
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

Matrix convert, !Ú MATRIX CONVERTAXL.......................... 3-25
AXQ.......................... 3-26
QXA.......................... 3-190
SYST2MAT .......................... 3-245

Other CAS operations, …µThese operations are in other menus, as described in Access for each one, or can be accessed with…µ.
Other mathematics operations
DEGREE.......................... 3-53
DOMAIN.......................... 3-66
DROITE.......................... 3-69dn.......................... 3-64
EPSX0.......................... 3-74
EXLR.......................... 3-77
EXP2HYP.......................... 3-79
FXND.......................... 3-94
GBASIS.......................... 3-95
GREDUCE .......................... 3-99
LCXM.......................... 3-129
LIMIT.......................... 3-131
LNAME.......................... 3-136
LVAR.......................... 3-140
MSLV.......................... 3-152
P2C.......................... 3-162
POTENTIAL .......................... 3-174
REORDER .......................... 3-199
RREFMOD .......................... 3-211
SEVAL.......................... 3-221
TAN2CS2.......................... 3-248
TCHEBYCHEFF ................... 3-250
TRUNC.......................... 3-259
VPOTENTIAL ........................ 3-271
XNUM.......................... 3-277
XQ.......................... 3-278?
.......................... 3-288∞.......................... 3-289

Computer Algebra System 4-11

CAS menu commands, …µ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
MENUXY..........................3-146
MODULAR ..........................3-150
POLYNOMIAL .......................3-173
REWRITE..........................3-202
TESTS..........................3-251
TRIGO..........................3-257

CAS utility operations
ADDTOREAL .........................3-10
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55.Equation Reference
The Equation Library consists of 15 subjects and more than 100 titles. Each subject and title has a number that you
can use with SOLVEQN to specify the set of equations. These numbers are shown in parentheses after theheadings.

See the end of this section for references given in each subject. Remember that some equations are estimates andassume certain conditions. See the references or other standard texts for assumptions and limitations of theequations. Solutions in the examples have been rounded to four decimal places.
NOTE: You must set system flag –117 in order to enable the soft menus for Equation Library usage.

The next page is a handy one-page table of contents to the equations and groups within the library. The columns
headers provide the subject, the number of variables, the presence or absence of a picture, the number of equations
and the page number where the group can be found. The example shown below should be read as follows:
Subject, var (subj, title) Pic EQ Pg
COLUMNS AND BEAMS, 22 **********(1)***
Elastic Buckling (1,1)
Y
4 5-4
COLUMNS AND BEAMS, 22 **********(1)***

Columns and beams – The group header.
22 – The number of variables in the group.
(1) – Indicates that Columns and beams are the first group.
Elastic Buckling (1,1)

Y

4 5-4

Elastic Buckling – The subject area of the first set of equations.
(1,1) – Indicates that Elastic Buckling is the first subject area within the columns and beams group.
Y – Indicates that a picture is present for this subject area.
4 – Indicates that there are 4 equations in this subject area.
5-4 – Indicates this subject area can be found on page 5-4.
It is provided as a quick reference.

Equation Reference 5-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-6Cantilever Deflection (1,7) Y
1 5-7
Cantilever Slope (1,8)
Y
1 5-7Cantilever Moment (1,9)
Y
1 5-7Cantilever 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-15Resonant 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-17Sinusoidal Voltage (2,22)N
2 5-18Sinusoidal Current (2,23)N
2 5-18FLUIDS, 24 *********************(3)*****
Pressure at Depth (3,1)
Y
1 5-19Bernoulli 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-21FORCES 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-24Mass-Energy Relation (4,8) N
1 5-24GASES, 26 **********************(5)*****
Ideal Gas Law (5,1)
N
2 5-25
Ideal Gas State Change (5,2)N
1 5-26Isothermal Expansion (5,3) N
2 5-26
Polytropic Processes (5,4) N
2 5-26Isentropic 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-285-2 Equation Reference

Subject, var (subj, title) Pic EQ Pg
HEAT TRANSFER, 23 *************(6)*****Heat Capacity (6,1)
N
2 5-29Thermal Expansion (6,2)
Y
2 5-29Conduction (6,3)
Y
2 5-29Convection (6,4)
Y
2 5-30Conduction+Convection (6,5)Y
4 5-30Black Body Radiation (6,6) Y
5 5-31MAGNETISM, 11 *****************(7)*****
Straight Wire (7,1)
Y
1 5-32Force between Wires (7,2) Y
1 5-32Magnetic (B) Field
in Solenoid (7,3)
Y
1 5-33Magnetic (B) Fieldin 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-38Brewster’s Law (9,3)
Y
2 5-38Spherical Reflection (9,4) Y
3 5-39Spherical Refraction (9,5) Y
1 5-39Thin Lens (9,6)
Y
3 5-39OSCILLATIONS, 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-46SOLID GEOMETRY, 12 ***********(12)*****
Cone (12,1)
Y
5 5-47
Cylinder (12,2)
Y
5 5-48
Parallelpiped (12,3)Y
4 5-48Sphere (12,4)Y
4 5-49SOLID STATE DEVICES, 60 ******(13)*****PN Step Junctions (13,1)
Y
8 5-52NMOS 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-58WAVES, 16 ********************(15)***
Transverse Waves (15,1)
Y
4 5-59Longitudinal Waves (15,2) N
4 5-59Sound Waves (15,3)N
4 5-60Columns and Beams (1)Variable

DescriptionºEccentricity (offset) of load

σcr

Critical stressσmax

Maximum stressθ

Slope at x

A

Cross-sectional areaaDistance to point loadcDistance to edge fiber (Eccentric Columns), or
Distance to applied moment (beams)

E

Modulus of elasticity

I

Moment of inertia

K

Effective length factor of column

L

Length of column or bean

M

Applied moment

Mx

Internal bending moment at x

P

Load (Eccentric Columns), or Point load (beams)

Pcr

Critical loadrRadius of gyrationV

Shear force at xw

Distributed loadxDistance along beamyDeflection at x

For simply supported beams and cantilever beams (“Simple Deflection” through “Cantilever Shear”), thecalculations differ depending upon the location of x relative to the loads.
 Applied loads are positive downward.
 The applied moment is positive counterclockwise.
 Deflection is positive upward.
 Slope is positive counterclockwise
 Internal bending moment is positive counterclockwise on the left-hand part.
 Shear force is positive downward on the left-hand part.
Reference: 2.

Equation Reference 5-3

Elastic Buckling (1, 1)
These equations apply to a slender column (K  L / r > 100) with length factor K.

Equations:2

π ⋅E⋅APc r = --------------------2-⋅LK----------- 
 r 

2

π ⋅E⋅IPc 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.

Eccentric Columns (1, 2)
These equations apply to a slender column (K  L / r > 100) with length factor K.

Equations:




P 
1
⋅c 
∈
σ ma x = --- ⋅  1 + ------2--- ⋅  ----------------------------------------------------- 
A 
P 

r
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Simple Deflection (1, 3)

Equation:
y

=

2
2
2
P ⋅ (L – a ) ⋅ x-------------------------------- ⋅ ( x + ( L – a ) – L )6 ⋅ L ⋅ E ⋅ I
2

2

L
c
M ⋅ x
x
– ------------ ⋅  c – ----------- – --- – ----------- 
6 ⋅ L
3
2 ⋅ L
E ⋅ I
w ⋅ x
3
2
– -------------------- ⋅ ( L + x ⋅ ( x – 2 ⋅ L ) )24 ⋅ E ⋅ I

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: y= -0.6005_in.

Simple Slope (1, 4)

Equation:P ⋅ ( L – a)222
Θ = ------------------------- ⋅ ( 3 ⋅ x + ( L – a ) – L )6⋅L⋅E⋅I
2

2

M
x
L
c
– ---------- ⋅  c – ----------- – --- – ----------- E⋅I
2⋅L 3 2⋅Lw
3
2
– -------------------- ⋅ ( L + x ⋅ ( 4 ⋅ x – 6 ⋅ L ) )24 ⋅ E ⋅ I

Equation Reference 5-5

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 )LL
2

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.
Solution: Mx=9782.1945_ft∗lbf

Simple Shear (1, 6)

Equation:P ⋅ (L – a ) M w
V = ------------------------- + ----- + ---- ⋅ ( L – 2 ⋅ x )L
L 2

Example: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.

5-6 Equation ReferenceCantilever Deflection (1, 7)

Equation:
2

2

2

P⋅x
M⋅x
w⋅x
2
2
y = ----------------- ⋅ ( x – 3 ⋅ a ) + ----------------- – -------------------- ⋅ ( 6 ⋅ L – 4 ⋅ L ⋅ x + x )6⋅E⋅I
2 ⋅ E ⋅ I 24 ⋅ E ⋅ I

Example:Given: L=10_ft, E=29000000_psi, I=15_in^4, P=500_lbf, M=800_ft∗lbf, a=3_ft, c=6_ft, w=100_lbf/ft, x=8_ft.
Solution: y= -0.3316_in.

Cantilever Slope (1, 8)

Equation:
P⋅x
M⋅x
w⋅x
2
2
Θ = ----------------- ⋅ ( x – 2 ⋅ a ) + ------------ – ----------------- ⋅ ( 3 ⋅ L – 3 ⋅ L ⋅ x + x )2⋅E⋅IE⋅I 6⋅E⋅I

Example:Given: L=10_ft, E=29000000_psi, I=15_in^4, P=500lbf, M=800_ft∗lbf, a=3_ft, c=6_ft, w=100_lbf/ft, x=8_ft.
Solution: Θ= -0.2652_°.

Cantilever Moment (1, 9)

Equation Reference 5-7

Equation:22
W
Mx = P ⋅ ( x – a ) + M – ----- ⋅ ( L – 2 ⋅ L ⋅ x + x )2

Example:Given: L=10_ft, P=500lbf, M=800_ft∗lbf, a=3_ft, c=6_ft, w=100_lbf/ft, x=8_ft.
Solution: Mx= -200_ft∗lbf

Cantilever Shear (1, 10)

Equation:
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

5-8 Equation ReferenceElectricity (2)Variable

Description∈r

Relative permittivityµr

Relative permeabilityωAngular frequency

ω0Resonant angular frequency

φPhase angle

φp ,φsParallel and series phase angles

ρResistivity∆I

Current change∆tTime change∆V

Voltage changeA

Wire cross-section area (Wire Resistance), or Solenoid cross-section area
(Solenoid Inductance), or Plate area (Plate Capacitor)

C, C1, C2
Cp,CsCapacitance
Parallel and series capacitancesdPlate separation

E

EnergyF

Force between chargesfFrequency

f0

Resonant frequency

I

Current, or Total current (Current Divider)

I1

Current in R1

Imax

Maximum current

L

Inductance, or Length (Wire Resistance, Cylindrical Capacitor)

L1,L2

Inductance

Lp,Ls

Parallel and series inductances

N

Number of turnsnNumber of turns per unit length

P

Power

q

Chargeq1,q2

Point charge
Equation Reference 5-9

Variable

Description

Qp,Qs

Parallel and series quality factorsr
R,R1,R2

Charge distanceResistanceri,roInside and outside radii

Rp,Rs

Parallel and series resistances

t

Time

ti,tf

Initial and final times

V

Voltage, or Total voltage (Voltage Divider)

V1

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)
Equations:
V = I⋅R

P = V⋅I

Example:Given: V=24_V, I=16_A.
Solution: R=1.5_Ω, P=384_W.

5-10 Equation Reference2

P = I ⋅R

2

V
P = -----R

Voltage Divider (2, 3)

Equation:
R1
V1 = V ⋅  ---------------------  R1 + R2 

Example:Given: R1=40_Ω, R2=10_Ω, V=100_V.
Solution: V1=80_V.

Current Divider (2, 4)

Equation:
R2
I1 = I ⋅  ---------------------  R1 + R2 

Example:Given: R1=10_Ω, R2=6_Ω, I=15_A.
Solution: I1=5.6250_A.

Wire Resistance (2, 5)
Equation:ρ⋅L
R = ---------A

Equation Reference 5-11

Example:
Given: ρ=0.0035_Ω∗cm, L=50_cm, A=1_cm^2.
Solution: R=0.175_Ω.

Series and Parallel R (2, 6)

Equation:111------- = ------- + ------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)

Equations:111------ = ------- + ------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Series and Parallel L (2, 8)

Equations:111------- = ------- + ------Lp
L1 L2

Ls = L1 + L2

Example:Given: L1=17_mH, L2=16.5_mH,
Solution: Ls=33.5000_mH, Lp=8.3731_mH.

Capacitive Energy (2, 9)
Equation:
2C⋅V
E = --------------2

Example:Given: E=0.025_J, C=20_µF.
Solution: V=50_V.

Inductive Energy (2, 10)
Equation:2L⋅I
E = -----------2

Example:Given: E= 4_J, L=15_mH.
Solution: I=23.0940_A.

Equation Reference 5-13

RLC Current Delay (2, 11)

The phase delay (angle) is positive for current lagging voltage.
Equations:11-------- – ------XC XL---TA N( φp ) =1--R

XL – XCTA N( φ s ) = ----------------------R
1
X C = -----------ω⋅C

XL = ω ⋅ L

ω = 2⋅π⋅f

Example:Given: f= 1107_Hz, C=80_µf, L=20_ mH, R=5_Ω.
Solution: ω=672.3008_r/s, φs= -45.8292_°, φp= -5.8772_°, XC=18.5929_Ω, XL=13.4460_Ω.

DC Capacitor Current (2, 12)These equations approximate the dc current required to charge the voltage on a capacitor in a certain time interval.
Equations:∆V
I = C ⋅  --------  ∆t 

∆V = – Vf – Vi∆t = tf ⋅ ti

Example:Given: C=15_µf, Vi=2.3_V, Vf=3.2_ V, I=10_A, ti=0_s.
Solution: ∆V=0.9000_V, ∆t=1.3500_µs, tf=1.3500_µs.

Capacitor Charge (2, 13)
Equation:q = C⋅V

Example:Given: C=20_µF, V=100_V.
Solution: q=0.0020_C.

5-14 Equation Reference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:∆IV = –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.

RC Transient (2, 15)

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)

Equation:–t ⋅ R------------- 
1 LI = ---- ⋅  Vf – ( Vf – Vi ) ⋅ eR Example:Given: Vi=0_V, Vf=5_V, R=50_ω, L=50_mH, t=75_µs.
Equation Reference 5-15

Solution: I=0.0072_A.

Resonant Frequency (2, 17)
Equation:
1L⋅Cω 0 = ---------------

1C
Qs = --- ⋅ --R
L

C
Qp = R ⋅ --L

ω 0 = 2 ⋅ π ⋅ f0

Example:Given: L=500_mH, C=8_µF, R=10_ω.
Solution: ω0=500_r / s, Qs=25.0000, Qp=0.0400, f0=79.5775_Hz.

Plate Capacitor (2, 18)

Equation:∈0 ⋅ ∈ r ⋅ A
C = -----------------------dExample:Given: C=25_µF, ∈r=2.26, A=1_cm^2.
Solution: d=8.0042E-9_cm.

Cylindrical Capacitor (2,19)

Equation:
2 ⋅ π ⋅∈ 0 ⋅∈ r ⋅ L
C = --------------------------------------ro
LN ----  ri 

5-16 Equation ReferenceExample:
Given: ∈r=1, ro=1_cm, ri=.999_cm, L=10_cm.
Solution: C=0.0056_µF.

Solenoid Inductance (2, 20)

Equation:2

L = µ0 ⋅ µr ⋅ n ⋅ A ⋅ h

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 ⋅ hro
L = ------------------------------------ ⋅ LN ----  ri 
2⋅π

Example:Given: µr=1, N=5000, h=2_cm, ri= .2_cm, ro=4_cm.
Solution: L=69.3147_mH.

Equation Reference 5-17

Sinusoidal Voltage (2, 22)
Equations:
V = V ma x ⋅ S IN(ω ⋅ t + φ)

ω = 2⋅π⋅f

Example:Given: Vmax=110_V, t=30_µs, f=60_Hz, φ=15_°.
Solution: ω=376.9911_r/s, V=29.6699_V.

Sinusoidal Current (2, 23)
Equations:
I = Ima x ⋅ S IN( ω ⋅ t + φ)

ω = 2⋅π⋅f

Example:Given: t=32_s, Imax=10_A, ω=636_r/s, φ=30_°.
Solution: I=9.5983_A, f=101.2225_Hz.

Fluids (3)Variable

Description∈

RoughnessµDynamic viscosityρDensity∆P

Pressure change∆yHeight change

ΣK

Total fitting coefficientsA

Cross-sectional area

A1,A2
D
D1, D2

Initial and final cross-sectional areas
Diameter
Initial and final diametershDepth relative to P0 reference depthhL

Head loss

L

LengthM

Mass flow ratenKinematic viscosity

P

Pressure at h

P0

Reference pressure

P1, P2
Q

Initial and final pressures
Volume flow rate

5-18 Equation ReferenceVariable

Description

Re

Reynolds number

v1, v2

Initial and final velocities

vavg

Average velocity

W

Power input

y1, y2

Initial and final heights

References: 3,6,9.

Pressure at Depth (3, 1)This equation describes hydrostatic pressure for an incompressible fluid. Depth h is positive downwards from thereference.

Equation:
P = P0 + ρ ⋅ g ⋅ h

Example:Given: h=100_m, ρ=1025.1817_kg/m^3, P0=1_atm.
Solution: P=1106.6848_kPa.

Bernoulli Equation (3, 2)
These equations represent the streamlined flow of an incompressible fluid.

Equation Reference 5-19

Equations:22∆P v 2 – v 1------ + ----------------------- + g ⋅ ∆y = 0
2
ρ
2 
A2 2
v 2 ⋅  1 –  -------  
A1∆P------ + -------------------------------------------- + g ⋅ ∆y = 0
2
ρ
2
A2 2
v 1 ⋅   -------  – 1
A1∆P------ + --------------------------------------------- + g ⋅ ∆y = 02
ρ∆P = P 2 – P 1∆y = y 2 – y 1

M = ρ⋅Q

Q = A2 – v2

Q = A1 – v12

π ⋅ D2A 2 = ----------------42

π ⋅ D1A 1 = ----------------4

Example:Given: P2=25_psi, P1=75_psi, y2=35_ft, y1=0_fr, D1=18_in, ρ=64_lb/ft^3, v1=100_ft/s.
Solution: Q=10602.8752_ft^3/min, M=678584.0132_lb/min, v2=122.4213_ft/s, A2=207.8633_in^2,
D2=16.2684_in, A1=254.4690_in^2, ∆P= -50_psi, ∆y=35_ft.

Flow with Losses (3, 3)
These equations extend Bernoulli’s equation to include power input (or output) and head loss.

Equations:22∆P v 2 – v 1
M ⋅  ------ + ----------------------- + g ⋅ ∆y + h L = W
2
ρ
2 
A2 2


v 2 ⋅  1 –  -------  
 ∆P

A1
M ⋅  ------ + -------------------------------------------- + g ⋅ ∆y + h L = W
2
ρ




2
A1 2


v 1 ⋅   -------  – 1
 ∆P

A2
⋅
⋅
∆
M 
+
+ g y + h L = W
2
ρ




∆P = P 2 – P 1∆y = y 2 – y 1

M = ρ⋅Q

Q = A2 ⋅ v2

Q = A1 ⋅ v1

2

π ⋅ D2A 2 = ----------------4

π ⋅ D1A 1 = ----------------4

5-20 Equation Reference2

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)
These equations adapt Bernoulli’s equation for flow in a round, full pipe, including power input (or output) andfrictional losses. (See “FANNING” in Chapter 3.)

Equations:
2

2
L
⋅D
∆P
ΣK
ρ ⋅ π-------------- ⋅ v a vg ⋅  ------ + g ⋅ ∆y + v a v g ⋅  2 ⋅ f ⋅  ---  + -------   = W
 4 
ρ

 D
2 

∆P = P2 – P1

∆y = y 2 – y 1
2

Q = A ⋅ va vg

π⋅D
A = -------------4

M =ρ ⋅QD ⋅ va vg ⋅ ρ
R e = ----------------------------µ-n = µρ

Example: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.
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.

Forces and Energy (4)Variable

Description

αAngular acceleration

ωAngular acceleration

ωi,ωfInitial and final angular velocities

ρ

Fluid densityτTorqueΘAngular displacementαAcceleration

Equation Reference 5-21

Variable

Description

A

Projected area relative to flowarCentripetal acceleration at r

atTangential acceleration at r

Cd

Drag coefficientE

EnergyF

Force at r or x, or Spring force (Hooke’s Law), or attractive
force (Law of Gravitation), or Drag force (Drag force)I

Moment of inertiakSpring constantKi,KfInitial and final kinetic energies

m, m1, m2
N

Mass
Rotational speed

Ni, NfInitial and final rotational speeds

P

Instantaneous power

Pavg

Average powerr

Radius from rotation axis, orSeparation distance (Law of Gravitation)

t

Time

v

Velocity

vf, v1f, v2f

Final velocity

vi, v1i

Initial velocity

W

Work

x

Displacement

Reference: 3.

Linear Mechanics (4, 1)
Equations:
F = m⋅a
W = Kf – Ki

12
Ki = --- ⋅ m ⋅ vi
2
P = F⋅v

1
2
Kf = --- ⋅ m ⋅ vf
2

W = F⋅xW
Pavg = ----t

vf = vi + a ⋅ t

Example:Given: t=10_s, m=50_lb, a=12.5_ft/s^2, vi=0_ft/s.
Solution: vf=125_ft/s, x=625_ft, F=19.4256_lbf, Ki=0_ft∗lbf, Kf=12140.9961_ft∗lbf, W=12140.9961_ft∗lbf,
Pavg=2.2075_hp.

5-22 Equation ReferenceAngular Mechanics (4, 2)
Equations:2
1
Ki = --- ⋅ I ⋅ ω i2

τ = I⋅α
W = Kf – Ki

P =τ ⋅ ω

ω = 2⋅π⋅N

at = α ⋅ r

2
1
Kf = -- ⋅ I ⋅ ω f
2
WPa v g = ----t

ω i = 2 ⋅ π ⋅ Ni

W = r ⋅Θ

ω f = ω i +α ⋅ t
ω f = 2 ⋅ π ⋅ Nf

Example:Given: I=1750_lb∗in^2, Θ =360_°, r=3.5_in, α=10.5_r/min^2, ωi=0_r / s.
Solution: r=1.1017E–3_ft_∗lbf, Ki=0_ft∗lbf, W=6.9221E–3_ft∗lbf, Kf=6.9221E–3_ft∗lbf,

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.

Centripetal Force (4, 3)
Equations:
2

F = m ⋅ω ⋅ rvr

ω = --

2v
a r = ---r

ω = 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.

Hooke’s Law (4, 4)
The force is that exerted by the spring.

Equations:
F = –k ⋅ x–1
2
W = ------ ⋅ k ⋅ x
2

Example:Given: k=1725_lbf/in, x=125_in.
Solution: F=-2156.25_lbf, W=-112.3047_ft∗lbf.

Equation Reference 5-23

1D Elastic Collisions (4, 5)

Equations:m1 – m2
v1f = ---------------------- ⋅ v1i
m1 + m2

2 ⋅ m1v2f = ---------------------- ⋅ v1i
m1 + m 2

Example:Given: m1=10_kg, m2=25_kg, vli=100_m/s.
Solution: v1f=-42.8571_m/s, v2f=57.1429_m/s.

Drag Force (4, 6)
Equation:2ρ⋅v
F = C d ⋅  ------------  ⋅ A
 2 

Example:Given: Cd=.05, ρ=1000_kg/m^3, A=7.5E6_cm^2, v=35_m/s.
Solution: F=22968750_N.

Law of Gravitation (4, 7)
Equation:m1 ⋅ m2 
F = G ⋅  ------------------2
r

Example:Given: m1=2E15_kg, m2=2E18_kg, r=1000000_km.
Solution: F=266903.6_N.

Mass-Energy Relation (4, 8)
Equation:E = m⋅c

Example:Given: m=9.1E-31_kg.
Solution: E=8.1787E-14_J.

5-24 Equation Reference2Gases (5)Variable

Description

λMean free pathρ

Flow density

ρ0

Stagnation density

A

Flow areaAt

Throat aread

Molecular diameterkSpecific heat ratio

M

Mach number

m

Mass

MW

Molecular weightnNumber of moles, orPolytropic constant (Polytropic Processes)

P

Pressure, or Flow pressure (Isentropic Flow)

P0

Stagnation pressure

Pc

Pseudocritical pressure

Pi, PfInitial and final pressures

T

Temperature, or Flow temperature (Isentropic Flow)

T0

Stagnation temperature

Tc

Pseudocritical temperature

Ti, TfInitial and final temperature

V

VolumeVi, VfInitial and final volumes

vrms

Root-mean-square (rms) velocity

W

Work

References:1, 3.

Ideal Gas Law (5, 1)
Equations:P⋅V = n⋅R⋅T

m = n ⋅ MW

Equation Reference 5-25

Example:
Given: T=16.85_°C, P=1_atm, V=25_1, MW=36_g/gmol.
Solution: n=1.0506_gmol, m=3.7820E-2_kg.

Ideal Gas State Change (5, 2)
Equation:Pf ⋅ VfPi ⋅ Vi---------------- = ---------------Tf
Ti

Example:Given: Pi=1.5_kPa, Pf=1.5kPa, Vi=2_l, Ti=100_°C, Tf=373.15_K.
Solution: Vf=2_1.

Isothermal Expansion (5, 3)
These equations apply to an ideal gas.
Equations:Vf
W = n ⋅ R ⋅ T ⋅ LN  ------  Vi 

m = n ⋅ MW

Example:Given: Vi=2_l, Vf=125_l, T=300_°C, n=0.25_gmol, MW=64_g/gmol.
Solution: W=4926.4942_J, M=0.016_kg.

Polytropic Processes (5, 4)
These equations describe a reversible pressure-volume change of an ideal gas such that P ∗Vn is constant. Special
cases include isothermal processes (n=1), isentropic processes (n=k, the specific heat ratio), and constant-pressure
processes (n=0).
Equations:
Pf
Vf – n----- =  ------ 

Pi
Vi 

Tf
Pf
------ =  -----  Pi 
Ti

n–1-----------n

Example:Given: Pi=15_psi, Pf=35_psi, Vi=1_ft^3, Vf=0.50_ft^3, Ti=75_°F.
Solution: n=1.2224, Tf=164.1117_°F.

Isentropic Flow (5, 5)
The calculation differs at velocities below and above Mach 1. The Mach number is based on the speed of sound in
the compressible fluid.

5-26 Equation ReferenceEquations:k-----------

P
T k–1------ =  ------ 
P0
T0

T
2
------ = -------------------------------------2T0
2 + (k – 1 ) ⋅ M

1-----------

T k–1
--ρ
---- =  ------ 

T0 
ρ0

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.
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:Pf ⋅ VfPi ⋅ 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.

Equation Reference 5-27

Kinetic Theory (5, 8)
These equations describe properties of an ideal gas.
Equations:
2n ⋅ MW ⋅ vrms
P = --------------------------------------3⋅Vvrms =

1
λ = --------------------------------------------------n ⋅ NA 22 ⋅ π ⋅ ---------------- ⋅ d
 V 

3⋅R⋅T
------------------MW

m = n ⋅ MW

Example:Given: P=100_kPa, V=2_1, T=26.85_°C, MW=18_g/gmol, d=2.5_nm.
Solution: vrms=644.7678_m/s, m=1.4433E–3_kg, n=0.0802_gmol, λ=1.4916_nm.

Heat Transfer (6)Variable

DescriptionαExpansion coefficientδElongation

λ1, λ2Lower and upper wavelength limits

λmax

Wavelength of maximum emissive power∆T

Temperature difference

A

Area

c

Specific heateb12

Emissive power in the range λ1 to λ2

eb

Total emissive powerf

Fraction of emissive power in the range λ1 to λ2

h, h1,h3

Convective heat-transfer coefficientk, k1, k2, k3

Thermal conductivity

L, L1, L2, L3

Lengthm

Mass

Q

Heat capacityq

Heat transfer rateT

Temperature

Tc

Cold surface temperature (Conduction), or
Cold fluid temperature
Hot surface temperature, or
Hot fluid temperature (Conduction + Convection)Th
Ti, TfU

Initial and final temperature
Overall heat transfer coefficient

References: 7, 9.

5-28 Equation ReferenceHeat Capacity (6, 1)
Equations:
Q = m ⋅ c ⋅ ∆T

Q = m ⋅ c ⋅ ( Tf – Ti )Example:Given: ∆T=15_°C, Ti=0_°C, m=10_kg, Q=25_kJ.
Solution: Tf=15_°C, c=.1667_kJ/(kg∗K)

Thermal Expansion (6, 2)

Equations:δ = α ⋅ L ⋅ ∆T

δ = α ⋅ L ⋅ ( Tf – Ti )Example:Given: ∆T=15_°C, L=10_m, Tf=25_°C, δ=1_cm.
Solution: Ti=10_°C, α=6.6667E–5_1/°C.

Conduction (6, 3)

Equations:k⋅Aq = ----------- ⋅ ∆TLk⋅A
q = ----------- ⋅ ( Th – Tc )L

Example:Given: Tc=25_°C, Th=75_°C, A=12.5_m^2, L=1.5_cm, k=0.12_W/ (m∗K)
Solution: q=5000_W, ∆T= 50_°C.

Equation Reference 5-29

Convection (6, 4)

Equations:q = h ⋅ A ⋅ ∆T

q = h ⋅ A ⋅ ( Th – Tc )Example: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 twotemperatures are fluid temperatures – if instead you know a surface temperature, set the corresponding convective
coefficient to 10499.

Equations:A ⋅ ∆Tq = -----------------------------------------------------------1 L1 L2 L3 1------ + ------- + ------- + ------- + -----h1 k1 k2 k3 h3q
U = ---------------A ⋅ ∆T

A ⋅ ( Th – Tc )q = -----------------------------------------------------------1 L1 L2 L3 1------ + ------- + ------- + ------- + -----h1 k1 k2 k3 h3q
U = --------------------------------A ⋅ ( Th – Tc )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.

5-30 Equation ReferenceBlack Body Radiation (6, 6)(See “F0λ” in Chapter 3.)

Equations:eb = σ ⋅ T

4

f = F0 λ ( λ 2 ; T ) – F0 λ ( λ 1 ; T )e B1 2 f ⋅ e b=

λ ma x ⋅ T = c 3

q = eb ⋅ A

Example:Given: T=1000_°C, λ1=1000_nm, λ2=600_nm, A=1_cm^2.
Solution: λmax=2276.0523_nm, eb=148984.2703_W/m^2, f=.0036, eb12=537.7264_W/m^2, q=14.8984_W.

Magnetism (7)Variable

Descriptionµr

Relative permeability

B

Magnetic fieldd

Separation distance

Fba

Force

I, Ia, Ib

Current

L

LengthN

Total number of turnsnNumber of turns per unit lengthrDistance from center of wireri, roInside and outside radii of toroidrw

Radius of wire

Reference: 3.

Equation Reference 5-31

Straight Wire (7, 1)
The magnetic field calculation differs depending upon whether the point is inside or outside the wire.

Equation:0r I---------⋅---µ--------⋅--B = µ2⋅π⋅rExample:Given: µr=1, rw= 0.25_cm, r=0.2_cm, I=25_A.
Solution: B= 0.0016_T.

Force between Wires (7, 2)
The force between wires is positive for an attractive force (for currents having the same sign).

Equation:0 ⋅ r ⋅ L ⋅ Ib ⋅ Ia------------µ-------------------------------Fba = µ2⋅π⋅dExample:Given: Ia=10_A, Ib=20_A, µr=1, L=50_cm, d=1_cm.
Solution: Fba=2.0000E–3_N.

5-32 Equation ReferenceMagnetic (B) Field in Solenoid (7, 3)

Equation:B = µ0 ⋅ µr ⋅ I ⋅ n

Example:Given: µr=10, n=50, I=1.25_A.
Solution: B=0.0785_T.

Magnetic (B) Field in Toroid (7, 4)

Equation:0⋅ r⋅I⋅N  2 ------------µ--------------------- ⋅ --------------B = µ ro + r i 2⋅π

Example:Given: µr=10, N=50, ri=5_cm, ro=7_cm, I=10_A.
Solution: B=1.6667E–2_T.

Equation Reference 5-33

Motion (8)Variable

Description

αAngular acceleration

ωAngular velocity (Circular Motion), or
Angular velocity at t (Angular Motion)

ω0

Initial angular velocity

ρ

Fluid densityθAngular position at t

θ0Initial angular position (Angular Motion), or
Initial vertical angel (Projectile Motion)aAcceleration

A

Projected horizontal areaarCentripetal acceleration at r

Cd

Drag coefficient

m

Mass

M

Planet massN

Rotational speed

R

Horizontal range (Projectile Motion), or
Planet radius (Escape Velocity)rRadiust

Timev

Velocity at t (linear Motion), or
Tangential velocity at r (Circular Motion), or
Terminal velocity (Terminal Velocity), orEscape velocity (Escape Velocity)v0

Initial velocity

vx

Horizontal component of velocity at t

vy

Vertical component of velocity at tx

Horizontal position at t

x0

Initial horizontal positionyVertical position at t

y0

Initial vertical position

Reference: 3.

5-34 Equation ReferenceLinear Motion (8, 1)
Equations:1
2
x = x0 + v0 ⋅ t + --- ⋅ a ⋅ t
2

1
2
x = x0 + v ⋅ t + --- ⋅ a ⋅ t
2

1
x = x0 + --- ⋅ ( v0 + v ) ⋅ t
2v = v0 + a ⋅ t

Example:Given: x0=0_m, x=100_m, t=10_s, v0=1_m/s
Solution: v=19_m/s, a=1.8_m/s^2.

Object in Free Fall (8, 2)
Equations:21
y = y0 + v0 ⋅ t + --- ⋅ g ⋅ t2
2

12
y = y0 + v ⋅ t + --- ⋅ g ⋅ t
22v = v0 + 2 ⋅ g ⋅ ( y + y0 )v = v0 + g ⋅ t

Example:Given: y0=1000_ft, y=0_ft, v0=0_ft/s
Solution: t=7.8843_s, v= -253.6991_ft/s.

Projectile Motion (8, 3)

Equations:21
y = y 0 + v0 ⋅ S IN( θ 0 ) ⋅ t – -- ⋅ g ⋅ t
2x = x 0 + v 0 ⋅ C OS ( θ 0 ) ⋅ t

vy = v 0 ⋅ S IN( θ 0 ) – g ⋅ t

vx = v 0 ⋅ C OS ( θ 0 )2v0
R = -------- ⋅ S IN( 2 ⋅ θ 0 )g

Example:Given: x0=0_ft, y0=0_ft, Θ 0 =45_°, v0=200_ft/s, t=10_s.
Solution: R=1243.2399_ft, vx=141.4214_ft/s, vy= -180.3186_ft/s, x=1414.2136_ft, y= -194.4864_ft.

Equation Reference 5-35

Angular Motion (8, 4)
Equations:12

θ = θ 0 + ω 0 ⋅ t + -- ⋅ α ⋅ t122

θ = θ 0 + ω ⋅ t + -- ⋅ α ⋅ t12

θ = θ 0 + -- ⋅ ( ω 0 + ω ) ⋅ t

2

ω = ω 0 +α ⋅ t

Example:Given: Θ 0=0_°, ω0=0_r/min, α=1.5_r/min^2, t=30_s.
Solution: Θ =10.7430_°, ω= 0.7500_r/min.

Circular Motion (8, 5)Equations:2v
a r = ---rv
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.

Terminal Velocity (8, 6)
Equation:
v =

2⋅m⋅g
----------------------Cd ⋅ ρ ⋅ A

Example:Given: Cd=0.15, ρ=0.025lb/ft^3, A=100000_in^2, m=1250_lb.
Solution: v=1757.4709_ft/s.

Escape Velocity (8, 7)
Equation:
v =

2⋅G⋅M
--------------------R

Example:Given: M=1.5E23_lb, R=5000_mi.
Solution: v=3485.1106_ft/s.

5-36 Equation ReferenceOptics (9)Variable

Description

θ1Angle of incidence

θ2Angle of refraction

θB

Brewster angle

θcCritical anglef

Focal lengthmMagnificationn, n1, n2Index of refractionr, r1, r2

Radius of curvatureu

Distance to objectv

Distance to image

For reflection and refraction problems, the focal length and radius of curvature are positive in the direction of theoutgoing light (reflected or refracted). The object distance is positive in front of the surface. The image distance ispositive in the direction of the outgoing light (reflected or refracted). The magnification is positive for an uprightimage. Reference: 3.

Law of Refraction (9, 1)

Equation:n1 ⋅ S IN ( θ 1 ) = n2 ⋅ S IN( θ 2 )Example:Given: n1=1, n2=1.333, θ1=45_°.
Solution: θ2=32.0367_°.

Equation Reference 5-37

Critical Angle (9, 2)

Equation:n1
S IN( θ c ) = ----n2

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.

Equations:n2
TA N( θ B ) = ----n1

θ B + θ 2 = 90

Example:Given: n1=1, n2=1.5.
Solution: θ B=56.3099_°, θ 2=33.6901_°.

5-38 Equation ReferenceSpherical Reflection (9, 4)

Equations:
1 1
1--- + --- = --u v
f1
f = --- ⋅ r
2–v
m = -----u

Example:Given: u=10_cm, v=300_cm, r=19.35_cm.
Solution: m=-30, f=9.6774_cm.

Spherical Refraction (9, 5)

Equation:
n1 n2
n2 – n1------ + ------ = -----------------uvr

Example:Given: u=8_cm, v=12_cm, r=2_cm, n1=1.
Solution: n2=1.5000.

Thin Lens (9, 6)
r1 is for the front surface, and r2 is for the back surface.

Equation Reference 5-39

Equations:
1 1
1--- + --- = --u v
f1
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.

Oscillations (10)Variable

DescriptionωAngular frequency

φPhase angleθCone angleaAcceleration at tf

Frequency

G

Shear modulus of elasticityhCone heightI

Moment of inertia

J

Polar moment of inertiakSpring constantL

Length of pendulum

m

Mass

t

Time

T

Periodv

Velocity at tx

Displacement at t

xm

Displace amplitude

Reference: 3.

5-40 Equation ReferenceMass-Spring System (10, 1)

Equations:
ω =

k
---m

2⋅π
T = ---------ωω = 2⋅π⋅f

Example:Given: k=20_N/m, m=5_kg.
Solution: ω=2_r/s. T=3.1416_s, f=.3183_Hz.

Simple Pendulum (10, 2)

Equations:
ω =

g
--L

2⋅π
T = ----------

ωω = 2⋅π⋅ f

Example:Given: L=15_cm.
Solution: ω=8.0856_r/s. T= 0.7771_s, f=1.2869_Hz.

Equation Reference 5-41

Conical Pendulum (10, 3)

Equations:
ω =

g
-h

h = L ⋅ C OS ( θ )2⋅πT = ----------

ωω = 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)

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)
Equations:x = x m ⋅ C OS ( ω ⋅ t + φ )2

a = – ω ⋅ x m ⋅ C OS ( ω ⋅ t + φ )5-42 Equation Referencev = –ω ⋅ x m ⋅ S IN( ω ⋅ t + φ )ω = 2⋅π⋅f

Example:
Given: xm=10_cm, ω=15_r/s, φ=25_°, t=25_µs.
Solution: x=9.0615_cm, v= -0.6344_m/s, a= -20.3884_m/s^2, f= 2.3873_Hz.

Plane Geometry (11)
Variable

DescriptionβCentral angle of polygonθVertex angle of polygon

A

Area

b

Base length (Rectangle, Triangle), or
Length of semiaxis in x direction (Ellipse)

C

CircumferencedDistance to rotation axis in y directionhHeight (Rectangle, Triangle), or
Length of semiaxis in y direction (Ellipse)

I, Ix

Moment of inertia about x axis

Id

Moment of inertia in x direction at d

Iy

Moment of inertia about y axis

J

Polar moment of inertia at centroid

LSide length of polygonnNumber of sides

P

Perimeterr

Radiusri, roInside and outside radiirs

Distance to side of polygon

rvDistance to vertex of polygonv

Horizontal distance to vertex

Reference: 4.

Equation Reference 5-43

Circle (11, 1)

Equations:
A = π⋅r

42π⋅r
I = -----------4

C = 2⋅π⋅r
4π⋅r
J = -----------2

Id = I + A ⋅ d

2

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.

Ellipse (11, 2)

Equations:2

A = π⋅b⋅h2

b +h
C = 2 ⋅ π ⋅ ----------------2

π⋅b⋅h
2
2
J = ------------------ ⋅ ( b + h )
4

3

π⋅b⋅h
I = -------------------4

Id = I + A ⋅ d

2Equations: 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,

Id=1.1330E–10_mm^4.

5-44 Equation ReferenceRectangle (11, 3)

Equations:3

A = b⋅hP = 2⋅b+2⋅hb⋅h22
J = ---------- ⋅ ( b + h )12b⋅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)

Equations:21-- ⋅ n ⋅ L
4
A = ----------------------------180
T A N  -------- nL--2
r v = -------------------------180

S I N  -------- n

P = n⋅Ln–2nθ = ----------- ⋅ 180

L--2
r s = ---------------------------180
T A N  -------- n360nβ = --------

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_°.

Equation Reference 5-45

Circular Ring (11, 5)

Equations:2π
44
I = --- ⋅ ( ro – ri )42

A = π ⋅ ( ro – ri )π44J = --- ⋅ ( ro – ri )2

Id = I + A ⋅ d

2

Example:Given: ro=4_µ, ri=25.0Å, d=.1_mil.
Solution: A=3.0631E–7_cm^2, I=1.7038E–10_mm^4, J=3.4076E–10_mm^4, Id=3.0648E–10_mm^4.

Triangle (11, 6)

Equations:b⋅hA = ---------23b⋅h
Ix = ------------36

2

2

2

P = b + v + h + ( b – v) + h

2

2
2
b⋅h
Iy = ---------- ⋅ ( b – b ⋅ v + v )
36

b⋅h
2
2
2
J = ---------- ⋅ ( h + b – b ⋅ v + v )36

Id = Ix + A ⋅ d

2

Example:Given: h=4.33012781892_in, v=2.5_in, P=15_in, d=2_in.
Solution: b=5.0000_in, Ix=11.2764_in^4, Iy=11.2764_in^4, J=22.5527_in^4, A=10.8253_in^2,
Id=54.5776_in^4.

5-46 Equation ReferenceSolid Geometry (12)Variable

Description

A

Total surface areab

Base lengthdDistance to rotation axis in z directionhHeight in z direction (Cone, Cylinder), or
Height in y direction (Parallelepiped)

I, IxxMoment of inertia about x axis

Id

Moment of inertia in x direction at d

Izz

Moment of inertia about z axis

m

Mass

r

Radiust

Thickness in z direction

V

VolumeReference: 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

Cylinder (12, 2)

Equations:22

A = 2⋅π⋅r +2⋅π⋅r⋅h

V = π⋅r ⋅h1
2
Izz = --- ⋅ m ⋅ r
2

2
2
1
1
Ixx = --- ⋅ m ⋅ r + ------ ⋅ m ⋅ h
412

Id = Ixx + m ⋅ d

2

Example:Given: r=8.5_in, h=65_in, m=12000_lbs, d=2.5_in.
Solution: V=14753.7045_in^3, A=3925.4200_in^2, Izz=4441750_lb∗in^2, Izz=433500_lb∗in^2,
Id=4516750_lb∗in^2.

Parallelepiped (12, 3)

Equations:
V = b⋅h⋅t
1
2
2
I = ------ ⋅ m ( h + t )12

A = 2 ⋅ ( b ⋅ h + b ⋅ t + h ⋅ t)
Id = I + m ⋅ d

2

Example:Given: b=36_in, h=12_in, t=72_in, m=83_lb, d=7_in.
Solution: V=31104_in^3, A=7776_IN^2, I=36852_lb∗in^2, Id=40919_lb∗in^2.

5-48 Equation ReferenceSphere (12, 4)

Equations:
3
4
V = --- ⋅ π ⋅ r
3

A = 4⋅π⋅r

222
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.

Equation Reference 5-49

Solid State Devices (13)Variable

Description

αF

Forward common-base current gain

αR

Reverse common-base current gainγ

Body factor

λModulation parameterµnElectron mobility

φpFermi potential∆L

Length adjustment (PN Step Junctions), or
Channel encroachment (NMOS Transistors)∆W

Width adjustment (PN Step Junctions), or
Width contraction (NMOS Transistors)aChannel thickness

Aj

Effective junction area

BV

Breakdown voltage

Cj

Junction capacitance per unit area

Cox

Silicon dioxide capacitance per unit area

E1

Breakdown-voltage field factor

Emax

Maximum electric field

G0

Channel conductance

gds

Output conductancegm

TransconductanceI

Diode current

IB

Total base current

IC

Total collector current

ICEO

Collector current (collector-to-base open)

ICO

Collector current (emitter-to-base open)

ICS

Collector-to-base saturation current

ID, IDS

Drain current

IE

Total emitter current

IES

Emitter-to-base saturation current

ISTransistor saturation current

J

Current density

5-50 Equation ReferenceVariable
Js

Description
Saturation current density

Le

Drawn mask length (PN Step Junctions), or
Drawn gate length (NMOS Transistors), or
Channel length (JFETs)
Effectives gate lengthNAP-side doping (PN Step Junctions), or
Substrate doping (NMOS Transistors)

ND

N-side doping (PN Step Junctions), or
N-channel doping (JFETs)

T

Temperature

tox

Gate silicon dioxide thickness

Va

Applied voltage

VBC

Base-to-collector voltage

VBE

Base-to-emitter voltage

Vbi

Built-in voltage

VBS

Substrate voltage

VCEsatCollector-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

Depletion-layer widthLxj

Junction depth

References: 5, 8.

Equation Reference 5-51

PN Step Junctions (13, 1)
These equations for a silicon PN-junction diode use a “two-sided step-junction” model–the doping density changes
abruptly at the junction. The equation assume the current density is determined by minority carries injected acrossthe depletion region and the PN junction is rectangular in its layout, The temperature should be between 77 and 500
K. (See “SIDENS” in Chapter 3.)

Equations:k⋅TNA ⋅ ND
V b i = ---------- ⋅ L N  -------------2---------
q
ni
xd =

2 ⋅ ε si ⋅ ε 0
11------------------------- ⋅ ( V b i – V a ) ⋅  -------- + -------- N A N Dqε si ⋅ ε 0
C j = -----------------xd

2 ⋅ (Vbi – V a)
E m a x = ---------------------------------xd2

1
1
ε si ⋅ ε 0 ⋅ E1
B V = -------------------------------- ⋅  -------- + --------
2⋅q
NA ND

q ⋅ Va ---k----⋅---T---- 
J = Js ⋅ e
– 1



A j = ( W + 2 ⋅ ∆W ) ⋅ ( L + 2 ⋅ ∆L )π ⋅ ( W + L + 2 ⋅ ∆W + 2 ⋅ ∆L ) ⋅ x j + 2 ⋅ π ⋅ x j

2

I = J ⋅ Aj

Example:Given: ND=1E22_cm^–3, NA=1E15_1/cm^3, T=26.85_°C, Js=1E–6_µA/cm^2, Va=-20_V,
E1=3.3E5_V/cm, W=10_µ, ∆W=1_µ, L=10_µ, ∆L=1_µ, xj=2_µ.
Solution: Vbi=.9962_V, xd=5.2551_µ, Cj=2005.0141_pF/cm^2, Emax=79908.5240_V/cm, BV=358.0825_V,
J= -1.0E–12_A/cm^2, Aj=3.1993E–6_cm^2, I= -3.1993E–15_mA.

5-52 Equation ReferenceNMOS Transistors (13, 2)
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 andtransconductance 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.)

Equations:
ε ox ⋅ ε 0
C o x = -------------------to x
2W e 
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

L e = L – 2 ⋅ ∆L

2 ⋅ si ⋅ 0 ⋅ q ⋅ NA
γ = ------------ε------------ε-------------------------Cox
Vt = Vt0 + γ ⋅ ( 2 ⋅ ABS( φ p ) – A BS(VBS ) – 2 ⋅ ABS( φ p ))–k ⋅ Tq

φ p = ------------- ⋅ L N  --------
gm =

NA
ni

gd s = IDS ⋅ λWeC o x ⋅ µ m ⋅  -------- ⋅ ( 1 + λ ⋅ V D S ) ⋅ 2 ⋅ I D S
LeVDsat = 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.

Equation Reference 5-53

Bipolar Transistors (13, 3)
These equations for an NPN silicon bipolar transistor are based on large-signal models developed by J.J. Ebers and
J.L. Moll. The offset-voltage calculation differs depending on whether the transistor is saturated or not. The
equations also include the special conditions when the emitter-base or collector-base junction is open, which areconvenient for measuring transistor parameters.

Equations:q ⋅ VBEq ⋅ VBEq ⋅ VBCq ⋅ V BE ------------------
 ------------------k⋅Tk⋅T
IE = –IES ⋅  e– 1 + αR ⋅ ICS ⋅  e
– 1




 -------------------
 ------------------k⋅Tk⋅T
IC = –ICS ⋅  e– 1 + αF ⋅ IES ⋅  e
– 1





IS = αR ⋅ IES

IS = αR ⋅ ICS

ICO = ICS ⋅ ( 1 – αF ⋅ αR )IB + IE + IC = 0

ICO
ICEO = ---------------1 – αFIC
1 + ------ ⋅ ( 1 – αR ) k⋅TIBVCEsat = ----------- ⋅ LN  ------------------------------------------------------------
q1 – αF αR ⋅  1 – IC------ ⋅  ----------------  IB  αF  

Example:Given: IES=1E–5_nA, ICS=2E–5_nA, T=26.85_°C, αF=.98, αR=.49, IC=1_mA, VBC= –10_V.
Solution: VBE=0.6553_V, IS=0.0000098_nA, ICO=0.000010396_nA, ICEO=0.0005198_nA,

IE= -1.0204_mA, IB=0.0204_mA, VCEsat=0_V.

JFETs (13, 4)
These equations for a silicon N-channel junction field-effect transistor (JFET) are based on the single-sided stepjunction approximation, which assumes the gates are heavily doped compared to the channel doping,. The draincurrent calculation differs depending on whether the gate-junction depletion-layer thickness is less than or greaterthan the channel thickness. The equations assume the channel is uniformly doped and end effects (such as contact,drain, and source resistances) are negligible. (See “SIDENS” in Chapter 3.)

5-54 Equation ReferenceEquations:k⋅T
ND
V b i = ---------- ⋅ L N  --------qni
xdm ax =2 ⋅ ε si ⋅ ε 0------------------------- ⋅ ( V b i – V G S + V D S )q ⋅ NDa⋅W
G 0 = q ⋅ N D ⋅ µ n ⋅  ------------L
 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) 2q ⋅ ND ⋅ a
V D s a t = -------------------------- – ( V b i – V G S )2 ⋅ ε si ⋅ ε 0

2q ⋅ ND ⋅ a
V t = V b i – ------------------------2 ⋅ ε si ⋅ ε 0
2 ⋅ ε si ⋅ ε 0
g m = G 0 ⋅  1 – -------------------------2- ⋅ ( V b i – V G S )q ⋅ ND ⋅ a

Example: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.

Equation Reference 5-55

Stress Analysis (14)
Variable

Description

δElongation∈

Normal strainγ

Shear strainφAngle of twistσ

Normal stress

σ1

Maximum principal normal stress

σ2

Minimum principal normal stressσavg

Normal stress on place of maximum shear stress

σx

Normal stress in x direction

σx1

Normal stress in rotated-x direction

σyNormal stress in y direction

σy1

Normal stress in rotated-y directionτShear stressτ max

Maximum shear stressτ x1y1

Rotated shear stressτ xy

Shear stressθRotation angle

θp1

Angle to plane of maximum principal normal stressθp2

Angle to plane of minimum principal normal stressθsAngle to plane of maximum shear stress

A

Area

E

Modulus of elasticity

G

Shear modulus of elasticity

J

Polar moment of inertia

L

LengthP

Loadr

RadiusT

TorqueReference: 2.

5-56 Equation ReferenceNormal Stress (14, 1)

Equations:
σ = E⋅∈

δ∈ = -L--PA

σ = ---

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.

Shear Stress (14, 2)

Equations:τ = G⋅γr⋅
γ = -------φ-LT⋅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.

Equation Reference 5-57

Equations:
σ x +σ y σ x – σ y
σ x 1 = --------------------- + --------------------- ⋅ C OS ( 2 ⋅ θ ) + τx y ⋅ S IN( 2 ⋅ θ )2

2

σ x 1 +σ y 1 = σ x + σ y
σ x –σ yτx 1 y 1 = –  ----------2----------- ⋅ S IN( 2 ⋅ θ ) + τx y ⋅ σ y

Example:Given: σx=15000_kPa, σy=4755_kPa, τ xy=7500_kPa, θ=30_°.
Solution: σx1=18933.9405_kPa, σy1=821.0595_kPa, τ x1y1= -686.2151_kPa.

Mohr’s Circle (14, 4)Equations:2
σx + σyσx–σyσ 1 = --------------------- + --------------------- + ρx y2

2

σ1+σ2 = σx+σy
τx y
S I N ( 2 ⋅ θ p 1 ) = --------------------------------------------------2
x – σ y 2σ ----------2----------- + τx y
θ p 2 = θ p 1 + 90

σ1 – σ2
τm a x = --------------------

θ s = θ p 1 – 45x+ yσ---------------σ------

2

σ avg =

2

Example:Given: σx=-5600_psi, σy=-18400_psi, τ xy=4800_psi.
Solution: σ1= -4000_psi, σ2= -20000_psi, θp1=18.4349_°, θp2=108.4349_°, τ max=8000_psi,
θs= -26.5651_°, σavg= -12000_psi.

5-58 Equation ReferenceWaves (15)
Variable

DescriptionβSound levelλWavelengthωAngular frequency

ρDensity of medium

B

Bulk modulus of elasticityfFrequency

I

Sound intensitykAngular wave numbersLongitudinal displacement at x and tsmLongitudinal amplitude

t

Time

v

Speed of sound in medium (Sound Waves), or
Wave speed (Transverse Waves, Longitudinal
Waves)

x

PositionyTransverse displacement at x and tymTransverse amplitude

Reference: 3.

Transverse Waves (15,1)
Equations:y = y m ⋅ S IN( k ⋅ x – ω ⋅ t )v = λ⋅f2⋅π
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 = λ⋅f2⋅π
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

Sound Waves (15, 3)
Equations:
v =

2
2
1
I = -- ⋅ ρ ⋅ v ⋅ ω ⋅ s m
2

B
---

ρ

I
10

β = 10 ⋅ LOG ------ ω = 2⋅π⋅f

Example:Given: sm=10_cm, ω=6000_r/s, B=12500_kPa, ρ=65_kg/m^3.
Solution: v=438.5290_m/s, I=5130789412.97_W/m^2, β=217.018_dB, f=954.9297_Hz.

5-60 Equation ReferenceReferences
1. Dranchuk, P.M., R.A. Purvis, and D.B. Robinson. “Computer Calculations of Natural Gas Compressibility
Factors Using the Standing and Katz Correlation,” In Institute of Petroleum Technical Series, no. IP 74-008. 1974.
2. Gere, James M., and Stephen P. Timoshenko. Mechanics of Materials, 2d ed. PWS Engineering, Boston, 1984.
3. Halliday, David, and Robert Resnick. Fundamentals of Physics,
3d ed. John Wiley & Sons, 1988.
4. Meriam, J. L., and L. G. Kraige. Engineering Mechanics, 2d ed. John Wiley & Sons, 1986
5. Muller, Richard S., and Theodore I. Kamins. Device Electronics for Integrated Cicuits, 2d ed. John Wiley & Sons 1986.
6. Serghides, T. K. “Estimate Friction Factor Accurately,” In Chemical Engineering, Mar. 5, 1984.
7. Siegel, Robert, and John Howell. Thermal Radiation Heat Transfer, Vol. 1. National Aeronautics and Space
Administration, 1968.
8. Sze, S. Physics of Semiconductors, 2d ed. John Wiley & Sons, 1981.
9. Welty, Wicks, and Wilson. Fundamentals of Momentum, Heat and Mass Transfer. John Wiley & Sons, 1969.

Equation Reference 5-61

6
6.The Development Library
Introduction
Built into the calculator is a set of functions not accessible to the user by default. These functions are in a librarythat contains low level development tools mainly designed for use in developing System RPL and assembly
programs.
In order to enable this library, you must attach it with the command 256 ATTACH or by setting flag –86. When thelibrary is attached after the next warmstart (or reset), it appears in the APPS menu. You may reset the calculator bypressing $and C at the same time.

Note: The tools and programs in this library are extremely
powerful, and misusing them will cause memory loss.
Back up your calculator before trying these commands.

Equation Reference 6-1

Development Library Command ReferenceA→→

Description:
Address out command: Returns the object stored at a specific address.
Input/Output:
Level 1/Argument 1

Example:#n#3A57Ch A→ returns SIN.

Level 1/Item 1

→

obj

→A

Description:
Get address command: Returns the address of an object.
Input/Output:
Level 1/Argument 1

Example:A→→H
Description:

Level 1/Item 1→
obj{ SIN } OBJ→ DROP →A returns #3A57Ch.

#n

Address to string command: Returns the hex representation of an address (you can then use thiswith the POKE command).
The hex representation of an address is a 5 character string where the address is written
backwards.

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 asymbolic object.
This command will also convert a program or a list to a symbolic object.

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'.

APEEK

Description:
Address PEEK command: Reads the address stored at an address.
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

ARM→
Description:

MASD ARM assembly disassembler command: Disassembles a Code object or a range ofmemory addresses containing ARM machine language to produce the assembly language source
code.
Read later in this chapter for more details.

Input/Output:
Level 1/Argument 1

Example:ASM
Description:

Level 1/Item 1→"string"
Code ARM→ might return " ADD

R0

R0

obj
R0 MOVR0

R1 @".

MASD assemble/compile command: Compiles a string containing System RPL, Saturn assembly,or ARM assembly code into an object that the calculator can use.
Read later in this chapter for details on the format of the string.

Input/Output:
Level 1/Argument 1

Level 1/Item 1→"string"
Level 1/Argument 1

Example:ASM→
Description:"string"→"string""!NO CODE !RPL ::

→
x«

obj
Level 2/Item 1

Level 1/Item 2

obj"debug string""string"x» ; @" ASM returns « ».

{error list}

MASD Saturn assembly disassembler command: Disassembles a Code object or a range ofmemory addresses containing Saturn machine language to produce the assembly language sourcecode. Read later in this chapter for more details.

Input/Output:
Level 1/Argument 1

Example:Level 1/Item 1→
Code
Code ASM→ might return " D0=A D0+5 C=DAT0"string"
A R0=C A".

BetaTesting

Description:
Test string command: Returns a string useful for testing purposes.
Input/Output:
Level 1/Argument 1

Level 1/Item 1→
Example:“string”

BetaTesting returns "Sébastien Eric John…".

CD→→

Description:
Code to hex command: Returns the hex representation of a code (Assembly program) object.
Input/Output:
Level 1/Argument 1

Example:→Code
Code CD→ may return "8F507621301641468…".

Level 1/Item 1“string”

The Development Library 6-3

→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.

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:
Level 1/Argument 1

→

¤n

→
“string”"D9D20003621113" CRC returns ¤ 8B63h.

¤n

Library Object
Example:CRLIB
Description:

Level 1/Item 1

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.

Input/Output:
Level 1/Argument 1

Level 1/Item 1→
Example:ER
Description:

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Input/Output:
Level 1/Argument 1

Example:“string”"8BA207CA93B2130" H→ returns π.

Level 1/Item 1

→

obj

→H

Description:
Object to hex command: Returns the hex representation of a object.
Input/Output:
Level 1/Argument 1

Example:H→→A
Description:

obj
π →H returns "8BA207CA93B2130".

Level 1/Item 1→“string”

String to address command: Returns the address represented by a 5 character hex string.
The hex representation of an address is a 5 character string where the address is written
backwards.

Input/Output:
Level 1/Argument 1

Example:H→→S
Description:“string”"C75A3" H→A returns #3A57Ch.

Level 1/Item 1→

obj

Hex to string command: Returns the string whose data are represented by a 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“string1”
Example:LC~C
Description:

Level 1/Item 1→“string2”"15" S→H returns "Q".

Long complex to complex conversion command: Converts a long complex to a complex and acomplex to a long complex.

Input/Output:
Level 1/Argument 1(x,y)
Example:Level 1/Item 1→→(x.Ey,z.Et)(3.5,26.2) LC~C returns (3.5E0,2.62E1).

(x.Ey,z.Et)
(x,y)

LR~R

Description:Long real to real conversion command: Converts a long real to a real and a real to a long real.
Input/Output:
Level 1/Argument 1

Level 1/Item 1

x

→

x.Ey

integer

→

x.Ey

x.Ey

→

x

The Development Library 6-5

Example:

32.5 LR~R returns 3.25E1.

→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« 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 "ABCDEFG AB".

Level 1/Item 1→“string”

Memory read command: Reads nibbles from a specified address in memory.
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

Level 1/Item 1

→
#n1
#n2
“string”#80711h #10h PEEK returns a string with sixteen hex characters.
Memory read command: Reads nibbles from a specified address in memory in the ARM address
space.
Level 2 must contain the address to read and level 1 must contain the number of bytes to read.

Input/Output:
Level 2/Argument 1

Example:POKE
Description:

Level 1/Argument 2

Level 1/Item 1

→
#n1
#n2
“string”#7300000h #4h PEEKARM returns a string with eight hex characters.
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

Example:Level 1/Argument 2

Level 1/Item 1→“string”#n"8" #100h POKE writes the hex digit 8 to memory address 0x100.

6-6 The Development LibraryPOKEARM
Description:

Memory write command: Writes bytes to a specified address in the ARM memory address space.
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

Example:Level 1/Argument 2

Level 1/Item 1→#n“string”#7300000h "00804421" POKEARM writes the given four bytes to ARM memory
address 0x7300000.

→PRG
Description:

Create program command: This is equivalent to the RPL →LIST command, but it creates a
program object.
This command will also convert a symbolic or a list to a program object.

Input/Output:

Example 1:
Example 2:→RAM
Description:

Leveln+1/Argument1 7Level2/Argumentn

Level1/Argumentn+1

obj1 … objn

n→obj1, ...,objn{obj1, ...,objn}→

obj1, ...,objn

obj1, ...,objn→

obj1, ...,objn

Level 1/Item 1«, 3, 2, +, », 5 →PRG returns « 3 2 + ».
{ 3 2 + } →PRG returns 3 2 +.

Improved NEWOB command: Makes a copy of an object in RAM, wherever the object is.
This command allows you to copy a ROM object into RAM.

Input/Output:
Level 1/Argument 1

Example:R~SB
Description:

Level 1/Item 1

→
obj1
obj2
{ SIN } OBJ→ DROP →RAM returns External … External.
Real to system binary conversion command: Converts a system binary to a real and a real to asystem binary.

Input/Output:
Level 1/Argument 1

Example:SB~B
Description:

Level 1/Item 1

n

→

¤n

integer

→

¤n

→

n

¤n
4893 R~SB returns ¤ 131Dh.

Binary integer to system binary conversion command: Converts a system binary to a binary
integer and a binary integer to a system binary.

The Development Library 6-7

Input/Output:
Level 1/Argument 1#nExample:SERIAL
Description:¤n#EC2Ah SB~B returns ¤ EC2Ah.

Level 1/Item 1

→

¤n

→

#n

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

Level 1/Item 1→

Example:“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.

Input/Output:
Level 1/Argument 1

Example:Level 1/Item 1“string”→'global''global'→“string”"" S~N returns ''.

SREVDescription:
String reverse command: Gives the mirror image of a string.
Input/Output:
Level 1/Argument 1

Example:→S2
Description:“string1”"ABC" SREV returns "CBA".

Level 1/Item 1→“string2”

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”

Example:« » →S2 returns "!NO CODE !RPL ::x«x» ; @".

XLIB~

Description:
XLIB conversion command: Convert reals to an XLIB and vice versa.
Input/Output:
Level 2/Argument 1

Level 1/Argument 2

n

m

→

Xlib

#n

n

→

Xlib

n

#n

→

Xlib

#n

#m

→

Xlib

Level 1/Argument 1

Example 1:
Example 2:
Example 3:

Level 1/Item 1

Level 2/Item 1

→
Xlib
n
#314h #40h XLIB~ returns ZEROS.
1648 2 XLIB~ returns XLIB 1648 2.
{ SYLVESTER } OBJ→ DROP XLIB~ returns 788. 78..

Level 1/Item 2m

CRLIB – Create Library Command
A library is one of the most complex objects in the calculator. One of the basic uses of a library is to group all thefiles of an application.
In order to create a library, you must store in a directory all the variables that will be part of this library. Then, youmust store configuration information in some special variables.
The $TITLE variable must contain a character string defining the title of the library. This string must be less than256 characters long. The first five characters will be used for the name that is shown in the library menu.
The $ROMID variable must contain the library number or your library. This number must be in the range 769 to
1791. In order to avoid conflicts, you should go to www.hpcalc.org to check whether the number is already in use.
This variable may contain either a real or an integer.
The $CONFIG variable contains the library configuration object which is run at warmstart. The basic action that
this program should perform is to attach the library to the home directory. Placing a real or an integer in the$CONFIG variable will cause the CRLIB command to generate a default CONFIG object. This program mustleave the stack intact and is not allowed to produce errors.
The $VISIBLE variable contains a list of all the variables in the current directory that you want to have visible in thelibrary menu.
The $HIDDEN variable contains a list of all the variables in the current directory that you want to have invisible in
the library. They are generally subprograms of your application.
The $EXTPRG variable contains the name of the extension program of the library. This program must be either avisible or an hidden object of the library. See the Extension program section below for more information.
Then, once you have specified the required variables, you can type CRLIB to create the library.
CRLIB places the library on level 1 of the stack.

The Development Library 6-9

Extension program
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"$VISIBLE { ABOUT }$HIDDEN { MessageHandler }$EXTPRG 'MessageHandler'
ABOUT "This library is a statistic enhancement example"
MessageHandler«»

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:
APPS menu
Input:
Output:{ { "String" Action } ... } ZERO
Modified list ZERO

Main Statistics menu
Input:{ { "String" Action } ... } ONE
Output:Modified list ONE
Hypothesis statistics menu
Input:{ { "String" Action } ... } TWO
Output:Modified list TWO
Confidence interval statistics menu
Input:{ { "String" Action } ... } THREE
Output:Modified list THREE
Finance menu
Input:{ { "String" Action } ... } FOUR
Output:Modified list FOUR
Numeric solver menu
Input:{ { "String" Action } ... } FIVE
Output:Modified list FIVE
6-10 The Development Library

MASD – The Machine Language and System RPL Compiler
MASD is used for compiling assembly language and System RPL.

Introduction
Warnings

The operating system can not control what a low level program is doing. Therefore, any programming error is likely
to cause the calculator to crash (with potential memory loss). A careful developer will always save source code in theinternal flash ROM or port 1 for protection before trying low level programs.
This document does not intend to be a programming course — it just presents the syntax of the compiler. Ample
resources are available on the web (www.hpcalc.org) to learn how to program the Saturn CPU in assembler, how toprogram in System RPL or how to program in ARM assembly.
With the introduction of the new ARM based series of calculators, some new things have been included that are notbackward compatible with previous calculators. The careful programmer should be wary of this.
Starting MASD

To compile a program, put the source code on the level 1 of the stack and type ASM (the development librarymust be attached) or use the ASM menu of the Development library.
If you have a new version of MASD packaged as a library 259, the command to type is asm (note the lowercase).
Modes

MASD can be used to compile program in 3 different languages: Saturn ASM, ARM ASM and System RPL.
Although some things are common to all modes, some are not. As a programmer, you should always know thecurrent mode.
Compilation directives instructions are used to switch from one mode to another:!ASM (switch to Saturn ASM mode, referred in the rest of this document as the Saturn mode)!RPL (switch to System RPL mode)!ARM (switches to ARM ASM mode)
In addition, in RPL mode,
CODE% here we are in ASM mode
ENDCODE
Allows switching from RPL mode to Saturn mode (and generate an assembly program object)
SyntaxMASD expects a character string (called source) on the stack level 1. A source is a set of instructions, comments,and separation characters and ends with a carriage return and an @ character. MASD is case sensitive, so be careful,as «loop» and «LOOP» are two different things for MASD. Separation characters are those with an ASCII
number below 32. They include spaces, tabs, line feed and carriage return.
In Saturn mode, some instructions need a parameter. Separation characters between an instruction and theparameter are spaces, tabs, and points. Therefore A+B.A can be used instead of A+B A.
In ARM mode, parameters for the instruction are separated by spaces and commas. In Saturn or ARM mode,
comments can be placed everywhere and begin with % or ; and finish at the end of the current line.
In RPL mode, comments are delimited by ‘(’ ‘)’ as isolated characters and can be multi line. A line that starts witha ‘*’ on the first character will also be considered a comment.

The Development Library 6-11

Directives change the way MASD interprets your source. Theses directives begin with a ! and will be explainedlater.
ErrorsIf 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.
MASD will report a maximum of 16 errors before stopping compilation.
The ER command takes 2 objects as arguments:
The original source code (level 2)
The error list generated by MASD (level 1)
Normally, you should compile using a process similar to: IFERR ASM THEN ER END (this is what theASM2 command does, by the way). Most people will just type the ASM command followed, if error, by the ER
command.
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 themain source or the filename of the buggy source.
Error messages

Message
Invalid FileToo 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 findLabel already defined{ expected} expected( expected[ or ] expected
Forbidden
Bad Expression
Jump too long
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 hexadecimal number is expected
An decimal number is expected
This object can not be locatedThis name is already in use
A { character was expectedA } 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 amatrix object

Define Error
ARM register expected
ARM invalid imediate

You can not do this operation in a DEFINE
No comments.
In ARM mode, constants must be representable on 8 bit withan even number of rotation

Links

Links are secondary source files that MASD can be directed to compile (equivalent to the {$I} directive in Pascal
and #include in C). As there is no linking phase with MASD (like in C), a multi source project will usually have theform of a main source file that contains a certain number of links.
An example of main source would be:"'Constant_definition'initialization'graphic_functions'other@"When a link call is encountered, MASD suspends compilation of the current source, compiles the new source andthen continues compiling the first one.
Program and data in the final object will be in the order in which MASD encounters the links.
Syntax in ASM and ARM mode:'FileNamelinks the file called FileName.

Syntax in RPL mode:
INCLUDE FileNamelinks the file called FileName.

Notes:
1. A link can call other links
2. You can not use more than 64 links in your project
3. To know how MASD looks for files, see the File search section
4. Links are useful to cut projects in independent parts to allow fast and easy access to source code
5. It is beneficial to place all constants definitions at the beginning of the compilation process as this will speed upcompilation and give more flexibility
Labels

A label is a marker in the program. The principal use of labels is to determine jump destinations.
A label is a set of less than 64 characters other than space, ‘+’, ‘-’, ‘*’ and ‘/’. A label begins with a star ‘*’ andends with a separation character.
Syntax in ASM and ARM mode:*BigLoop
is the BigLoop label declaration.
Syntax in RPL mode:
LABEL BigLoop

is the BigLoop label declaration.

Be careful about upper and lower cases!
Three types of labels can be used:• Global labels
A global label is a label that can be used everywhere in the project, like global variables in Pascal or C.
• Local labels
The Development Library 6-13

•

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.
Link labels
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.

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
menu.
3. Labels in System RPL should only be used by people who know what they are doing. They are only used for
fixed address programs (absolute mode) which is pretty advanced programming.
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 (likeTURNMENUOFF for example). In addition, it also contains a set of supported constants and ASM entry points
for the ASM programmer. Please read the extable section in this document to find more information about thislibrary.
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 torepresent 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 inbrackets.

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3. A constant value is stored in 16 nibbles.
4. Having constants starting with something that can be interpreted as a hex number, or an ARM register is not agood 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
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 thevalue 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 librarywill 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 arehexadecimal 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 absolutemode, 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, thisrepresents the final address of the instruction.

The Development Library 6-15

•
•
•
•

•
•
•
•

Entries from the EXTABLE may be used. As the EXTABLE does not have the label names limitations
with operators, in ambiguous case (DUP+#5 may either be an addition DUP + 5, or an entry‘DUP+#5’), add "" around the word: "DUP"+#5.
Calculations are done with 64 bits.
X divide by 0 = $FFFFFFFFFFFFFFFF.
In order to avoid wasting memory, MASD tries to compile expressions as soon as it sees them. If MASD
is not able to compile an expression directly, it’s compiled at the end of the compilation. In order to use
less memory, it’s a good idea to define your constants at the beginning of the sources so MASD cancompile expression using the constants directly.
The only operator symbols not allowed in labels are +, -, * and /; therefore, if you want to use a symbol
operator after a label, you must put the symbol between " in order to ‘limit’ the symbol. Meaningless
Example: "DUP"<<5.
A label/constant with strange char may be ‘protected’ between " chars.
The evaluation stack of MASD allows you to have around 10 pending computations (parenthesis,
operator priority).
MASD only works with integers. You can represent signed values using standard 2’s complement, but be
careful as all operators are unsigned.

MASD recognizes the following operators:
Operator
<<
>>
%
*
/
+
<
>
<=, ‰
>=, Š
=
#, ‹
&
!
^

Priority
7
7
6
5
5
4
4
3
3
3
3
3
3
2
1
1

Notes
Left Shift 1<<5 = $20
Right shift $20>>5 = 1
Modulo (remainder of division) X%0=0
Multiplication
Division X/0=$FFFFFFFFFFFFFFFF
Addition
Subtraction
Is smaller (true=1, false = 0)
Is greater (true=1, false = 0)
Is smaller or equal (true=1, false = 0)
Is greater or equal (true=1, false = 0)
Is equal (true = 1, false = 0)
Is different (true = 1, false = 0)
Logical and
Logical or
Logical xor

Note: Throughout this documentation, you will see discussions about expressions that can be “immediately”
evaluated. This refers to any expression that contains only number and labels/constants that have already been
declared.
Macros and includes

If data are to be included in a project, it can be entered in hex in a source file, using $. However, a simpler way is toinclude data from an external file, called a macro. The macro file must be a character string, a graphic, a code object
or a list.
- In case of a string or a code, MASD includes only the data part (after the length) of the object- In case of a graphic, only the graphic data will be included (no length, no dimensions)

6-16 The Development Library-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.
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

MASD sometimes needs to find a file in the calculator’s memory. The file can be found either by specifying the filename and location, or only the file name to be search in the directory search list.
The initial directory search list contains the current directory, and all parents directory up to the HOME directory.
You can add a directory in the directory search list using !PATH+ RepName where RepName identifies a
directory name using filename rules.
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.
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.
Note: You cannot have more than 16 entries in the directory search path.
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 CODEMASD 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 foundin the source.
!DBGOFF
MASD will not generate code when DISP or DISPKEY arefound 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.aCompile the end of the line if flag a is set.
!?FL=1.aCompile the end of the line if flag a is clear.
!ABSOLUT Addr
Switch to absolute mode. The program begins at the address
Addr. Note: MASD always considers the prolog $02DCC andcode length to be the beginning of the program even if !NO
CODE is set.
!ABSADR Addr
If in absolute mode, add blank nibbles to continue at the
specified address. If not possible, errors.
The Development Library 6-17

!EVEN!ADR!COMPEXP!STAT!DBGINF
!JAZZ
!MASD

In absolute mode, cause an error if the directive is not on an evenaddress.
MASD will generate a source defining all constants and labels
used in the program instead of the program.
Cause MASD to calculate all previous expressions.
Display/update compilation statistics
Causes MASD to generate debugging information (see next
section for more information)
See local variable documentation in RPL mode
See local variable documentation in RPL mode

The !DBGINF directive

If you put the !DBGINF directive into a MASD source, the assembler not only generates your compiled object, but
it also returns a string (on level 1) full of debug information. The structure of this string is asfollows:
5 DOCSTR
5 Length
5 Number of links (source files)n*[
2 Number of characters.. Name of link file]
5 Number of symbols (labels and constants)n*[
2 Number of characters.. Name of symbol
1 Type: 9=Label 2=Constantfor labels: 5 Address of label
for constants: 16 Value of constant]
5 Number of source→code associationsn*[
5 Offset in code (this list is sorted by offset)
2 Number of link this instruction comes from
5 Character offset in link where this instruction starts]
Notes:• If the source string is unnamed, i.e. in TEMPOB, the number of links is 00001 and the number ofcharacters is 00, immediately followed by the symbol table.
• The label symbol table is supposed to be an offset table. However the current MASD may sometimes placeaddresses into this table. The “associations” table correctly contains offsets.
This instruction is intended for the case where someone decides to create a source level debugger.

6-18 The Development LibrarySaturn ASM modeThis section is only applicable to the Saturn ASM mode.
CPU architectureThis section’s purpose is to make experienced ASM programmers familiar with the Saturn architecture, not to teachanyone to program in Saturn ASM.
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.
In addition, there are 16 flags ST0 to ST15 (12-15 being reserved for the system) that are 1 bit registers that areaccessible separately, a carry that is set when operation overflow or tests are validated and can be tested using theGOC (Go On Carry) and GONC (Go On No Carry) jump instruction, a decimal/hexadecimal mode (SETHEXand SETDEC) that affects the way + and – instructions on the A, B, C and D register works (default Is HEX), anda 8 level return stack for GOSUBs (and RTN).
64 bit registers

Most operations on 64 bit registers will act on a specific “field”. A field is a division in a 64 bit register.
If this represents the 16 nibbles of a 64 bit register, the fields cover the register as follows:
F

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:
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:reg1= (reg1 & ~ mask) | ((reg1 & mask) operation (reg2 & mask))
These new fields are available for all instructions that previously used the so called ‘f’ encoding and includes thefollowing 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

Other notes

You should read documentation on the internal structure of RPL objects (www.hpcalc.org has good
documentation)
D0, D1, Ba and Da are used by the system (next RPL instruction pointer, RPL stack pointer (@@object on level 1of the stack), start of free memory and free memory in 5 nibble blocks). The SAVE instruction will save theseregisters in dedicated memory areas, the LOADRPL instruction will restore them and continue the execution in thesystem.
Please consult documentation on memory mapping for more information.
New instructions

In addition to the F fields, the following new instructions have been created:
r=s.f, r=r+s.f, r=r-s.f, r=r*s.f, r=r/s.f, r=r%s.f (modulo) r=-s-1.f (logical not), r=-s.f (mathematical not),r=r<s.f (left shift), r=r>s.f (right shift), r=r^s.f (logical xor).
r=1.f (alias for r=r/r.f) has also been created.
Notes:
1. Any combination of the A, B, C and D registers can be used (notated r and s here)
2. All fields (including F1-F7 fields) are valid
3. MASD will always choose the shortest version of the instruction (e.g.: A=A+B.A will use the standard C0
encoding AND affect the carry)
4. The carry is not affected by these instructions.
The following additional new instructions have been added (see description in the ASM syntax section):
NATIVE? $hex
HST=1.x?HST=1.x { }SETFLD(1-7)
OFF
RPL2
KEYDN
CRTMP
BEEP2

GOSLOW
WSCREENSETTIMESETLNEDSETOFFDHSCREENUNCNFGDGETTIMEREMONSERIALOUTBYT
MOVEUP
MOVEDNARMSYSARMSAT
REMOFF

CONFIGDBIGAPP?
RESETOS
REFRESHDAUTOTESTACCESSSD
PORTTAG?
MIDAPP?

Skips

Skips are a first step from ML to a third generation language, even if they are only another way to write ASM
instructions.
Skips are wonderful as they allow you to:- structure your program- avoid using gotos- make programs and piece of code that can be easily copied and pasted (because there is no label)

6-20 The Development Library

The foundation of Skips is the Block structure. A block is enclosed in { and }, and can be nested within anotherblock. The following instructions deal with blocks.
SKIPS instructions{ ... }SKIP { ... }SKIPL { ... }SKIPC { ... }SKC {... }SKIPNC {... }SKNC { ... }Test SKIPYES {... }Test { ... }Test { ... }Test -> { ... }SKUB { ... }SKUBL { ... }STRING { ... }CODE { ... }STROBJ $PROLOG { ... }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 blockby specifying the number of blocks to exit, after the UP or EXIT instructions.

The Development Library 6-21

These instructions

Are equivalent to{*.Beg3*.Beg2*.Beg1
GOTO.Beg2
GOTO.Beg3
GOTO.End1
GOTO.End3*.End1*.End2*.End3

{
{
UP2
UP3
EXIT1
EXIT3
}
}
}

Notes:
1. EXIT1 is equivalent to EXIT, and UP1 is equivalent to UP.
2. The same rules apply in ARM mode: EXITGE3 for example is a BGE for the exit label 3 blocks down
Using SKELSE, SKEC, SKENC, SKLSE instructions, two blocks create an IFNOT-THEN-ELSE structure.
These
instructions

Are equivalent to

Or in high-level
language?A=0.ASKIPYES{EXIT
UP}
SKELSE
{
A+1.A
EXIT
UP
}

?A=0.A GOYES.Beg2*.Beg1
GOTO.End2 % and not
End1
GOTO.Beg1*.End1
GOTO.End2*.Beg2
A+1.A
GOTO.End2
GOTO.Beg2*.End2

IF NOT A=0 THEN
BEGIN
...
...
END
ELSE
BEGIN
...
...
...
END

Notes:
1. SKELSE places a GOTO between the 2 blocks, SKEC places a GOC, SKENC a GONC and SKLSE placesnothing.
2. UPs are compiled directly when encountered while EXITs and block openings are compiled later on. You
can not have more than 64 pending EXITs and block openings simultaneously.
Tests
A test instruction (?A=0.A) may be followed by:• A GOYES Label, → Label or -> Label instruction• A -> { or → { instruction. In this case, the test is inverted and a skip block is open.
• A RTY or RTNYES instruction.
• A SKIPYES { or { instruction. In this case, a skip block is open.
• A GOTO, GOTOL, GOVLNG, GOSUB, GOSUBL or GOSBVL. In this case, the test is inverted and a proper
jump instruction is generated (ie: ?A=B.A GOTO A is compiled as ?A#B.A { GOTO A }.
• A EXIT or UP.

6-22 The Development Library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 firstencounter.
h is a hexadecimal digit.
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 aresmaller 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.
SyntaxReg=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) MASDLAASC(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 charactersnecessary 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 ofthe register P) of the register, the next one into nibble p+1 mod 16, andetcetera.
Loads the hexadecimal value of x characters into C.
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

The Development Library 6-23

Syntax
Reg=Reg+Cst.f
Reg+Cst.f
Reg=Reg-Cst.f
Reg-Cst.f

Example
A=A+10.A
A+10.A
A=A-10.A
A-FOO.ARegSR.f

ASR.W

RegSL.f

ASL.W

Reg1=Reg1<Reg2.f
Reg1<Reg2.f
Reg1=Reg1>Reg2.f
Reg1>Reg2.f
RegSRB.f
RegSRCRegSLC
Reg1=Reg1&Reg2.f
Reg1&Reg2.f
Reg1=Reg1!Reg2.f
Reg1!Reg2.f

A=A<B.W

A=A!B.X
A!C.B

Logical or on the specified field

Reg1=Reg1^Reg2.f
Reg1^Reg2.f
Reg1=-Reg1.f
Reg1=-Reg1-1.f
Reg1=~Reg1.f
RReg=Reg.f

A=A^B.X
A^C.B

Logical xor on the specified field

C=-C.A
C=-C-1.A
C=~C.A

Mathematical not on the specified field
Logical not on the specified field

R0=A.W

Reg=RReg.f

A=R0.A

RegRRegEX.f

AR0EX.A

Data=Reg.f
Data=Reg.x

DAT1=C.A
DAT0=A.10

Reg= Data.f
Reg Data.x

C=DAT1.A
A=DAT0.10

Sets the specified field of RReg to the value of the specified field of Reg
Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
Sets the specified field of Reg to the value of the specified field of RReg
Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
Exchanged the value of the specified field of RReg with the value of thespecified field of Reg Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
Write the content of the specified field of the specified register in thememory location pointed by Data register (POKE)
Reg can only be A or C
Read the content of the memory location pointed by Data register in thespecified field of the REG register (PEEK)Reg can only be A or C

A=A>B.W
BSRB.XASRC
BSLC
A=A&B.X
A&C.B

6-24 The Development Library

Notes
Note 1: The Saturn processor is not able to add a constant greater than 16
to a register. If cst is greater than 16, MASD will generate as many
instructions as needed.
Note 2: Even if adding constants to a register is very useful, large values
should be avoided because this generates a large program. Prefer anothersolution like LC(5) Cte A+C.A
Note 3: Adding a constant greater than 1 to a P, WP, XS or S field is abugged Saturn instruction (problem with carry propagation). Use these
instructions with care.
Note 4: After adding a constant greater than 16 to a register, the carryshould not be tested (because you do not know if the last generated
instruction generated the carry or not)Note 5: You can put an expression instead of the constant (MASD must beable to evaluate the expression right away). If the expression is negative,
MASD will invert the addition in a subtraction and vice versa.
Note 6: Be careful when using subtraction; it’s easy to be misled. A-5-6.A isequivalent to A+1.A, not A-11.A because the instruction is: A-(5-6).A
Note 7: If using Fn fields, be careful if non nibble bounded masks areused.
Shift register right by 4 bit on the specified field, set SB if bits are lost.
Note: this instruction is not available on the Fn fields
Shift register left by 4 bit on the specified field, set carry if bits are lost.
Note: this instruction is not available on the Fn fields
Shift register left by n bits (as defined by the value of Reg2) on the specified
field
Shift register right by n bits (as defined by the value of Reg2) on thespecified field
Shift register right by 1 bit on the specified field, set SB if bits are lost.
Circular right shift by 1 nibble
Circular left shift by 1 nibble
Logical and on the specified fieldSyntax
DReg=hh
DReg=hhhh
DReg=hhhhh
DReg=(2)Exp
DReg=(4)Exp
DReg=(5)Exp
Dreg=RegDreg=RegS

ExampleD0=AD
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
AD0EX
RegDRexXS
Exchange the first 4 nibbles of Dreg with the 4 first nibbles of Reg
AD1XS
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 beable 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
Please read the section on test above for information on what MUST follow a test instruction.
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

Syntax

Example
SB=1
XM=1
SR=1
MP=1
HST=a
?SB=1
?XM=1
?SR=1
?MP=1
?HST=1.a
P=a
P=P+1 P+1
P=P-1 P-1
?P=a ?P#a
P=C.a C=P.a
CPEX.aC=C+P+1 C+P+1
GOTO label
GOTOL label
GOLONG Lab
GOVLNG hex
GOVLNG =LabelGOVLNG ="COMND"GOSUB label
GOSUBL label
GOSBVL hex
GOSBVL =LabelGOSBVL ="COMND"
GOC label
GONC label
GOTOC label
GOTONC label
RTN
RTNSXM
RTNCC
RTNSC
RTNC
RTNNC
RTI
RTNYES RTY
C=RSTK
RSTK=C
OUT=CS
OUT=C
A=IN
C=IN
SETDEC SETHEXUNCNGF CONFIGRESETSHUTDNINTON INTOFFRSIGOINC label
GOINA label$hhh...hhh
NIBHEX hhh...hh$/hhhh...hhh

6-26 The Development Library

Notes
See above. This is only valid in emulated Saturn

The HP ≠ character can be used instead of #GOTO is limited to 1KB jumps
GOTOL can jump over 16KB of code
This jumps to a specific address
GOSUB is limited to 1KB jumps
GOSUBL is limited to 16KB jumps
GOSBVL jumps to a specific address
GO if Carry set (limited to 64 bytes)
GO if no carry (limited to 64 bytes)
Equivalent to SKNC { GOTO label }Equivalent to SKC { GOTO label }Return from subroutine (GOSUB call)
RTN + XM=1
RTN + set carry
RTN + clear carry
RTN if carry set
RTN if carry not set
Return from interrupt
Return if test true (see test section)
Pop value from RSTK in Ca
Push value from Ca in RSTK
Set the first 2 nibbles of the OUT register to the value of Cb
Set the OUT register to the value of C4
Copy the IN register in Ax or Cx (buggy instruction, do not use if you do
not know what you are doing)
Set the SPU in DECIMAL or HEXADECIMAL mode
Deconfigure/Configure memory modules
Deconfigure ALL memory modules
STOP the CPU waiting for an interrupt
Enable/disable keyboard interrupts
Reset interrupt system
Equivalent to LC(5)label-&. (& is the address of the instruction)
Equivalent to LA(5)label-& (& is the address of the instruction)
Includes hexadecimal data in the program. Example:$12ACD545680B.
Includes hexadecimal data in reverse order. Example: $/123ABC isequivalent to $CBA321.

Syntax

Example$(x)Exp
CON(x)Exp
EXP(x)Exp¢Ascii"Ascii"

GOIN5 lab
G5 labGOIN4 lab
G4 labGOIN3 lab
G3 labGOIN2 lab
G2 labSAVE
LOAD
RPL or LOOP
LOADRPLINTOFF2
INTON2ERROR_C
A=IN2
C=IN2
OUT=C=IN
RES.STR
RES.ROOMRESRAMSHRINK$
COPY<- COPY←COPYDN
COPY-> COPY→COPYUPDISP
DISPKEYSRKLST
SCREENMENU
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 charfrom 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 ErrjmpCEquivalent 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 alsoavailable). 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 isemulated.
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

Example
RPL2
KEYDN

CRTMP

BEEP2

REMON
SERIALOUTBYT

MOVEUP

MOVEDNARMSYSARMSAT

REMOFFGOSLOW
WSCREENSETTIMESETLNED

6-28 The Development Library

Notes
Simulates a LOOP (A=DAT0.A D0+5 PC=(A)).
(C[A]) kbd peeks with immediate rtn CS if keydn.
Also - Sets DOUSEALARM flag if [ON][9] sequence.
Entry: P=0, HEX Mode, C[A]: #kbd peeks (loop count)
Abstract: Creates a hole in the tempob area of the specified size
+ 6 (5 for the link field and 1 for marker nibble).
Sets the link field of the “hole” to size+6 and adjusts
AVMEM, RSKTOP and TEMPTOP.
Entry Conditions: RPL variables in system RAM
C(A) contains desired size of hole
Exit Conditions: carry clear, RPL variables in system RAM
D1 → link field of hole, D0 → object position
B(A), C(A)= desired size+6
Error Exits: Returns with carry set when there’s not enough memory
to create a hole of size+6.
Entry: C[A]: d;d=Beep duration (msec)
D[A]: f
;f=Beep frequency (hz)
P=0
Exit: CARRY:0
Enables the remote control mode (ON+R).
Copy serial number to address pointed to by D1 in Saturn memory.
Purpose: Send byte to IR printerEntry: A[B]: Byte
Exit: CC, P=0, Byte Sent
Alters: P:0, CARRY:0, SETHEX.
Abstract: Used to move block of memory to higher address.
No check is made to ensure that the source and destination do not overlap.
Code is moved from high to low addresses.
Entry Conditions: D0 → end of source + 1
D1 → end of destination + 1
C(A) = number of nibs to move (unsigned)
Exit Conditions: HEX mode, P=0, carry clear
D0 → start of source
D1 → start of destination
Abstract: Used to move block of memory to lower address.
No check is made to ensure that the source and destination do not overlap.
Code is moved from lower to higher addresses.
Entry Conditions: D0 → start of source; D1 → start of destination; C(A)= number of nibs to move (unsigned)
Exit Conditions: P=0, carry clear; D0 → end of source + 1; D1 → end ofdestination + 1
Call a function at global dword address C[0-7]&~3.
The function takes should be of the form: U32 f(U32 pc, Chipset* c) { /*put your code here */ return pc; }Call a function at Saturn address C.A&~7.
The function should have the following format:
U32 f(U32 pc, Chipset* c) { /* put your code here */ return pc; }In RAM asm, this means that as you enter the function, pc is in R0,@Chipset is in R1 and the return address is in LP. R2 and R3 are free touse, and R0 should normally not be modified except if you want to change
the PC when exiting the function.
Stops the remote control (ON+S).
Wait for (C[A]/183) ms.
Return how many columns the screen contains in Ca
Sets the RTC time from C[W] in ticks.
Set number of lines of disp0 from C[B], refresh display.

Syntax

ExampleSETOFFDHSCREENUNCNFGDGETTIME

MIDAPP?
CONFIGDBIGAPP?
RESETOS
REFRESHDAUTOTESTACCESSSD
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 nameCarry: clear if ok, set if wrong name

The Development Library 6-29

ARM mode
ARM architecture

For all user intents and purposes the ARM CPU has sixteen 32 bit registers noted R0 to R15 (R15 is also theprogram counter, R14 is the link register (ie: a BL (GOSUB) instruction copies the return address in R14 before
jumping, a Return From Subroutine is performed by doing MOV PC, LR), and R13 is the Stack pointer).
Each instruction can be conditionally executed depending on the value of 5 flags.
Each instruction can be told to modify or not modify these 5 flags (add the S suffix to the instruction).
Please read the ARM ARM (ARM Architecture and Reference Manual) for more information.
Please look at the ARMSAT Saturn instruction and the ARM mode documentation to see the instruction set and therules of calling ARM code from Saturn code.
Skips
Skips are a first step from ML to a third generation language, even if they are only another way to write ASM
instructions.
Skips are wonderful as they allow you to:- structure your program- avoid using gotos- make programs and piece of code that can be easily copied and past (because there is no label)
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.
SKIPS instructions
Equivalents{ ... }
Defines a block (generates no code)
SK<Cond> { ... }B<cond> .S... *.S
SKUB<Cond> { ... }BL<cond> .S ... *.S

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{
EXIT<Cond>
UP<Cond>}*.Beginning
B<Cond> .End
B<Cond>.Beginning*.End

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.
These instructions
Are equivalent to{{{
UP<Cond>2
UP<Cond>3
EXIT<Cond>1
EXIT<Cond>3}}}*.Beg3*.Beg2*.Beg1
B<Cond> .Beg2
B<Cond> .Beg3
B<Cond> .End1
B<Cond> .End3*.End1*.End2*.End3

Note: EXIT1 is equivalent to EXIT, and UP1 is equivalent to UP.

6-30 The Development LibraryInstruction set

Note: For instruction names, the case does not matter.
Register names are:
R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13 (or SP), R14 (or LP or LR) and R15 (or PC).
Setting the S flag on an instruction causes the instruction to modify the flags.
Every instruction is evaluated ONLY if the attached condition is true. By default, the instruction is always evaluated.
Separation between arguments can be either ‘,’ or spaces.
In the following examples, cond can be any of:
CC
LO

MI

PL

VS

VC

HI

LS

GE

Equal

Not equal

Carry set,
unsigned>=

Carry clear<

Negative

Positive or 0

OverflowNo
overflow

Unsigned >Unsigned
<=

>=

LT

GT

LE

<=

CS
HS

>

NE

<=

EQ

And Oprnd can be of the form:
Description
Immediate value
Logical shift left
Logical shift rightArithmetic shift right
Rotate right
RegisterLogical shift left
Logical shift rightArithmetic shift right
Rotate right

Form
Cte
Note: cte is encoded on 8 bits + a rotation right encodedon 4 bits. This means that not every value is possible.
Rm LSL Cte
Rm < Cte
Rm LSR Cte
Rm > Cte
Rm ASR Cte
Rm >> Cte
Rm ROR Cte
Rm >>> Cte
Rm
Rm LSL Rs
Rm < Rs
Rm LSR Rs
Rm > Rs
Rm ASR Rs
Rm >> Rs
Rm ROR Rs
Rm >>> Rs

The Development Library 6-31

Operation
Copy and shift
Not
Add
Add with carrySub
Sub with carry
Reverse Sub
Rev sub with carry
Multiply
Multiply Add
CompareCmp Negative
Test
Test equivalence
And
Xor
Or
BitClear (~And)
BranchGosub
Load Int

Load Byte

Multiple load
Inc Before
Inc After
Dec Before
Dec After
Store Int

Store Byte

Multiple StoreInc Before
Inc After
Dec Before
Dec After
Multiplication

Assembler
MOV{cond}{S} Rd, <Oprnd>
MVN{cond}{S} Rd, <Oprnd>
ADD{cond}{S} Rd, Rn, <Oprnd>
ADC{cond}{S} Rd, Rn, <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, LabelLDR{cond}B Rd, <a_mode>
LDRB{cond} Rd, LabelLDM{cond}IB Rd{!}, {reg list}
LDM{cond}IA Rd{!}, {reg list}
LDM{cond}DB Rd{!}, {reg list}
LDM{cond}DA Rd{!}, {reg list}
STR{cond} Rd, <a_mode>
STR{cond} Rd, Label

STRB{cond} Rd, <a_mode>
STRB{cond} Rd, Label

STM{cond}IB Rd{!}, {reg list}
STM{cond}IA Rd{!}, {reg list}
STM{cond}DB Rd{!}, {reg list}
STM{cond}DA Rd{!}, {reg list}
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

ActionS flags
d:= <Oprnd>
NZCR
d:= ~<Oprnd>
NZCR
d:= Rn + <Oprnd>
NZCVR
d:= Rn + <Oprnd> + CarryNZCVR
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
R15/PC:= address
R14:=R15/PC, R15/PC:= address
Rd:= [address]
Rd:= data at label. The label address is calculated
relative to the PC. This does not work withconstants
Rd:= [byte at address] 0 extended
Rd:= data at label. The label address is calculated
relative to the PC. This does not work withconstants
Stack operations (Pop)! sets the W bit (updates the baseregister after the transfer)[address]:= Rddata at label:= Rd. The label address is calculated
relative to the PC. This does not work withconstants[address]:= byte value from Rd
data at label:= Rd. The label address is calculated
relative to the PC. This does not work withconstants
Stack operations (Push)! sets the W bit (updates the baseregister after the transfer)
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In all cases, Cte must be a decimal value or an expression that can be evaluated immediately.
A_mode can be:
Form[Rn +/-Cte][Rn +/-Rm][Rn +/-Rm LSL Cte]
[Rn +/-Rm < Cte]
[Rn +/-Rm LSR Cte]
[Rn +/-Rm > Cte]
[Rn +/-Rm ASR Cte]
[Rn +/-Rm >> Cte]
[Rn +/-Rm ROR Cte]
[Rn +/-Rm >>> Cte]
[Rn +/-Cte]!
[Rn +/-Rm]!
[Rn +/-Rm LSL Cte]!
[Rn +/-Rm < Cte]!
[Rn +/-Rm LSR Cte]!
[Rn +/-Rm > Cte]!
[Rn +/-Rm ASR Cte]!
[Rn +/-Rm >> Cte]!
[Rn +/-Rm ROR Cte]!
[Rn +/-Rm >>> Cte]!
[Rn] +/-Cte[Rn] +/-Rm[Rn] +/-Rm LSL Cte[Rn] +/-Rm < Cte[Rn] +/-Rm LSR Cte[Rn] +/-Rm > Cte[Rn] +/-Rm ASR Cte[Rn] +/-Rm >> Cte[Rn] +/-Rm ROR Cte[Rn] +/-Rm >>> Cte

Description
Value of rn + or - constant
Value of rn + or – value of rm
Value of rn + or – value of rm shifted left
Value of rn + or – value of rm shifted right
Value of rn + or – value of rm shifted arithmetically right
Value of rn + or – value of rm rotated right
Value of rn + or – constant
Rn is updated with that value
Value of rn + or – value of rm
Rn is updated with that value
Value of rn + or – value of rm shifted left
Rn is updated with that value
Value of rn + or – value of rm shifted right
Rn is updated with that value
Value of rn + or – value of rm shifted arithmetically right
Rn is updated with that value
Value of rn + or – value of rm rotated right
Rn is updated with that value
The value used is the value of rn, but rn is then updated with Value of rn + or –constant
The value used is the value of rn, but rn is then updated with Value of rn + or –value of rm
The value used is the value of rn, but rn is then updated with Value of rn + or –value of rm shifted left
The value used is the value of rn, but rn is then updated with Value of rn + or –value of rm shifted right
The value used is the value of rn, but rn is then updated with Value of rn + or –value of rm shifted arithmetically right
Value of rn + or – value of rm rotated right
Rn is updated with that value

ARMSAT instruction

When using the ARMSAT instruction, the Saturn pc is in register r0 and the address chipset structure that contains
the state of the Saturn CPU is in r1.
That structure has the following elements at the following offsets:
OffsetElement
0
P_U32 read_map[256+1]; read_map[x] points on the 2Kb of Saturn address space atSaturn address x<<121028
P_U32 write_map[256+1]; read_map[x] points on the 2Kb of Saturn address spaceat Saturn address x<<12 for write purpose (write_map[x]=0 if x points on some nonreadable memory)2056
enum ModulePriority top_map[256+1]; // Type of block on top, to know if new
configured block takes over2316
REG A;
2324
REG B;The Development Library 6-33

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.
REG FIELD[32]; // Field masks.
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 SREAD
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 SCARRYDCCP 4 SDECDCCP #32 SRSCKDCCP 4 SRSTKP
DCCP #256 SFMASKDCCP #128 SFSTART
DCCP #128 SFLENGTH@"

6-34 The Development LibrarySystem RPL mode
MASD can also compile System RPL programs (you should read the book “An Introduction to System RPL”
before trying to write System RPL programs).
The !RPL directive will switch MASD in RPL mode.
Note: if the Flag –92 is set, MASD starts in !RPL and !NO CODE mode.
Instructions
In RPL mode, MASD interprets instructions/tokens in the following order.
Reals and system binary

If the instruction is a decimal number, a system binary is created (MASD will try, if possible, to use the internallydefined system binary). If that number has a decimal point (in the middle, or starts with the decimal point), a real
number is created.
Unnamed local variables

If the instruction is a recall or a set of a local variables defined by {{ the correct instruction is generated.
A local environment is created using:{{ var1 var2 ... varN }}with N<23

These variables have names during compile time, but they are implemented as unnamed local variables, which are
faster to access than named local variables.
A local variable is recalled by typing its name or with an optional ending @. Data can be stored in a local variable bytyping its name, with a leading or ending ! or a leading =.
Notes:
1.

Local variables are available until the next local definition.

2.

The local environment is not closed automatically; use ABND or other provided words.

Example:{{ label1 label2 … labelN }} will become:' NULLLAM <#N> NDUPN DOBIND (or 1LAMBIND if there is only one variable)And:label1label1@=label1!label1
label1!

→→→→→

1GETLAM
1GETLAM
1PUTLAM
1PUTLAM
1PUTLAM

Program example:::{{ A B }}
B A!
ABND
;

::
' NULLLAM TWO NDUPN DOBIND
2GETLAM 1PUTLAM
ABND;

Note that it is your responsibility to destroy the local environment using ABND and that MASD does not handle
multiple level of definition of local variables, nor does it destroy the current environment, even if ABND is used.
Variables defined this way will be valid until a new set of variables is defined.

The Development Library 6-35

Defines

If the instruction matches a define, the correct code is inserted (see the DEFINE instruction)
LabelsIf 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).
extableIf 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.
TokensThen, 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
Unit prolog $02ADAFPTR2 ^constantFlash 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 theinternally defined system binary
PTR cstAddress. PTR 4E2CF generates FC2E4.
ACPTR cst1 cst2
Extended pointer with given hexadecimal values for the address andswitch address
ROMPTR2 ~xlib_name
XLIB object from constant
ROMPTR LibN ObjNXLIB object from value% realReal number%% realLong real number
C% real1 real2
Complex number
C%% real1 real2
Long complex number"..."
Character string. Special characters can be included by typing \ andthe ASCII value on two hexadecimal characters. \ can be inserted bytyping \\ZINT decimalvalue
Integer
ID nameGlobal 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XxlibName
HXS Size Data
GROB Size Data
LIBDAT Size DataBAK Size Data
LIB Size Data
EXT3 Size Data
ARRAY Size Data
LNKARRAY Size Data
MINIFON Size Data
ARRY2 Size Data
ARRY [ ... ]ARRY [ [ . ] [ . ] ]xRplName
CHR character
LABEL labelname
EXTERNAL namexlibname
FEXTERNAL namefptrname
CODE Size Data
CODE
Assembly stuff
ENDCODENIBB Size Data or
NIBHEX Data or
NIBBHEX Data or
CON(Size) Expr
INCLOB FileName
INCLUDE FileName
LABEL label
EQU CstName ExpHex
EQUCP Interleave
CstName
DEFINE name ...

DIR
VARNAME name1 obj1
VARNAME name2 obj2...
ENDDIRXLIB identified by its name. If it is a standard calculator command(like xDUP), the address is used instead of an XLIB object.
Binary integer ($02A4E), Size is in hexadecimal and Data is a set ofhexadecimal characters. Example: HXS 5 FFA21GROB ($02B1E).
Library data ($02B88).
Backup ($02B62).
Library ($02B40).
Extended3 ($02BEE).
Array ($029E8).
Linked Array ($02A0A).
Minifont object
Array object
Array object, which can have 1 or 2 dimensions.
All objects in the array must be of same type
If RplName is an RPL instruction, compiles the RPL instruction (orxlib depending on the instruction)
Character object. See rules on " for more information
Creates a label at this position. Use carefully
Equivalent to DEFINE name ROMPTR2 xlibname
Equivalent to DEFINE name FPTR2 fptrname
Code object ($02DCC).
Include a code object, change to ASM mode and close the code object
on the next ENDCODE.
Includes hexadecimal data directly (no prolog).
Includes the content of the file FileName.
Includes the source of the file FileName to be compiled (Like ' in ASMmode).
Defines a label (like * in ASM mode).
Defines a constant (Like DC in ASM mode).
Defines a constant (Like DCCP in ASM mode).
Associate the data compiled between the name and the end of the linewith the name. After that, if the name is used again, the associated datais placed in the compiled file
Creates a directory containing the objects in the given variables.

The Development Library 6-37

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::
TURNMENUOFF
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 }% if not ok, return to RPLGOSBVL "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% This tests the current pix, returns% if the pixel is white, draw a line
% if it is black
A=R1.A A+A.A C=R2.A C+A.A ASL.A A+C.A % Aa: @ line of pixel in the grob
C=R0.A P=C.0 CSRB.A CSRB.A A+C.A D0=A % D0: point on the pixel to test,% P = number of the pixel to test in% nibble (in Z/4Z)
LC 2481248124812481 P=0% Cp: pixel mask
A=DAT0.B A&C.P ?A=0.P RTY% test the pixel. if white, return
GOSUB LIGNE GOSUB LIGNE% else, draw line twice in Xor mode
GOSBVL "D0->Row1" D0-20% and draw the pixel in black.
A=R0.A C=R1.A GOVLNG aPixonB*LIGNEGOSBVL "D0->Row1" D0-20
A=R0.A B=A.A LA 00041
C=R1.A D=C.A C=0.A
GOVLNG aLineXor
ENDCODE;;@"

6-38 The Development Library% D0 point on the screen% A/B: X coordinates% C/D: Y coordinates% draw the line!

Example of an ARM assembly language program using the MASD compiler"!NO CODE !RPL::
TURNMENUOFF( turn into RPL mode)( open a RPL program )( remove the menu line )CODE% open an assembly program% this program takes control of the screen and% displays a Mandelbrot set using the standard algorithm% ie: for each point from x=-1.5 to 0.5,%
for each point from y=-1 to 1%
if any an, n<256 in the series%
a0=x+iy (complex number), an+1=a0+an²%
has an absolute value > 2, the point is not part of the set% the numbers are stored on 32 bits.
% the numbers are shifted by 12 bits, the lower 12 bits representing% the decimal part of the number (in 1/4096)
SAVE
INTOFFSKUB {*start% save the RPL pointers% disable keyboard interrupts% jump over the ARM code

!ARM
STMDB sp! {R4 R5 R6 R7 R8 LP}% switch to ARM mode
% save registers in the stack

LDR R2, [R1, #2324]% load R2=x (content of saturn% reg B, nibbles 0-7)
% load R3=y (content of saturn% reg B, nibbles 0-7)

LDR R3, [R1, #2340]
MOV R7 R2
MOV R8 R3
MOV R6 256% copy X in r7% copy Y in r8% copy 256 in R6{
MUL R4, R2, R2
MOV R4 R4 >> 12
MUL R5, R3, R3
MOV R5 R5 >> 12% r4= x² << 12% r4= x²

ADD LP R4 R5
CMP LP $4000
EXITGT% LP = x² + y²
% if abs² an > 4% exit

SUB R4 R4 R5% r4= x²-y²

MUL R3 R2 R3% R3= X*YADD R2 R7 R4% r2= X + x²-y² = new x

MOV R3 R3 >> 11
ADD R3 R8 R3% r3= x*y*2% r3= Y+2*x*y = new Y

SUBS R6 R6 1
UPNE

% decrement loop counter% up if not 0% r5= y²

% we have looped 256 times and abs(An)<2, the point is in the set!
LDRB R6 [R1 2408]% clear the flag ST0
BIC R6 R6 1
STRB R6 [R1 2408]
LDMIA sp! {R4 R5 R6 R7 R8 PC} % restore all registers and return}% we have reached a An where abs(An)>2,the point is out of the set

The Development Library 6-39

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% D0 points to ARM instruction% D1 points at a place where% I can copy the program% copy n nibbles

C=0.B SETLNED% hide the header

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
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}% 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% else, turn the pixel off

A+A.S SKNC { D0+1 A+1.S }% next pixel

C=0.W LC 40 B+C.W
C=RSTK C-1.B UPNC

% increment X% count down and loop}
D0+2
C=0.W LC 66 D+C.W
C=R3.W C-1.B R3=C.W UPNC

% next graphic line
% increment Y% count down and loop}
LC FF OUT=C { C=IN2 ?C=0.B UP } % wait for no key down
{ C=IN2 ?C#0.B UP }% Wait for 1 key down
INTON
% restore the keyboard interrupt
LC 10 SETLNED% restore the header size
SCREEN CD0EX D0=00120 DAT0=C.A % restore the screen pointerLOADRPL% return to RPL
ENDCODE( end of ASM program );( end of RPL program )@"6-40 The Development LibraryDisassemblers
ASM→→
The ASM→ disassembler converts Saturn assembly into a source string.
The syntax used is MASD syntax, in mode 0-15. Each line contains an address and an instruction. If the system flag
–71 is set (with -71 SF), addresses are not shown, except for the destinations of jumps. In this case, the resulting
source may be then reassembled if needed.
ASM→ can either disassemble a CODE object or the memory area between 2 given addresses (as binary integers).
Example:-71 CF2 (default)
AE734 GOSBVL 0679B
AE73B LC 01000
AE742 C-A A
AE744 GONC AE742
AE747 GOVLNG 138B9

Level 2Binary integer (start address of thememory area to disassemble)-71 SF2GOSBVL 0679B
LC 01000*AE742C-A A
GONC AE742
GOVLNG 138B9

Level 1
Binary integer end
address
Code object→→→

Level 1
String (disassemble between
the 2 address)
StringARM→→
The ARM→ disassembler converts ARM assembly into a source string.
Each line contains an address and an instruction. If the system flag –71 is set (with -71 SF), addresses are notshown, except for the destinations of jumps. In this case, the resulting source may be then reassembled if needed.
ARM→ can either disassemble a CODE object (which does not make much sense at this point in time) or the
memory area between 2 given Saturn addresses (as binary integer).
Example:-71 CF2 (default)
874FF LDMGEIA R0 ! { R5 R6 R7 LP PC }87507 STMDB R5 { R5 R12 PC }8750F BL
87527
87517 BLGE 87527
8751F BGE
87527
87527 ADD
R0 R0 R08752F MOV
R0 R1
87537 TST
R4 R5Level 2Binary integer (start address of thememory area to disassemble)

Level 1
Binary integer end
address
Code object-71 SF2LDMGEIA R0 ! { R5 R6 R7 LP PC }STMDB R5 { R5 R12 PC }BL
876E3
BLGE 876E3
BGE
876E3
*876E3ADD
R0 R0 R0
MOV
R0 R1
TST
R4 R5
@

→
→
→

Level 1
String (disassemble between
the 2 address)
String

The Development Library 6-41

The Entry Point Library: Extable
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
constants (like TURNMENUOFF for example).
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:nopThis function is here for internal purposes and should not be used. Running this function doesnothing.
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.

Input/Output:
Level 1/Argument 1

Example:GETADR
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.

Input/Output:
Level 1/Argument 1

Example:GETNAMES
Description:→“string”"INNERCOMP" GETADR returns #054AFh.

Level 1/Item 1#nFinds all the entries whose names start with a specific string.
Giving a null string as an input will return a list of all the entry points.

Input/Output:
Level 1/Argument 1

Example: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

A
A. Error and Status Messages
The following table lists the most frequently encountered error and status messages on the calculator. They arearranged alphabetically by name. The second table lists all the built-in messages numerically by message number.
Trailing spaces are indicated with a  character.
Messages Listed Alphabetically

Message

MeaningAcknowledged

Alarm acknowledged.

All Variables known

No unknowns to solve for.

Autoscaling

Calculator is autoscaling x- and/or y- axis.

Awaiting Server Cmd.

Indicates Server mode active.

Bad Argument TypeOne or more stack arguments were incorrect
type for operation.

Bad Argument Value

Argument value out of operation’s range.

Bad Guess(es)Guess(es) supplied to HP Solve application or
ROOT lie outside domain of equation.

# (hex)
619
E405
610
C0C
202
203
A01

Bad Molecular Formula

Formula is invalid or incomplete. Look formismatched parentheses or invalid element
names.

Bad Packet Block check

Computed packet checksum doesn’t matchchecksum in packet.

C01

Can't Edit Null Char.

Attempted to edit a string containing characterā (character code 0).

102

Circular Reference

Attempted to store a variable name into itself.

Connecting

Indicates verifying IR or serial connection.

Constant?

HP Solve application or ROOT returned samevalue at every sample point of current
equation.

E501

129
C0A

A02

Error and Status Messages A-1

Messages Listed Alphabetically (continued)

Message

Meaning# (hex)

Copied to stack%²STK% copied selected equation to stack.

Current equation:

Identifies current equation.

608

Deleting Column

Matrix Writer application is deleting a row.

504

Deleting Row

Name of existing directory variable used asargument.

503

Directory Not Allowed

Name of existing directory variable used asargument.

12A

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.

C15Enter alarm, press SET

Alarm entry prompt.

61A

Enter eqn, press NEW

Store new equation in EQ.

60AEnter value (zoom out if>1), press ENTER

Zoom operations prompt.

622

EQ Invalid for MINIT

EQ must contain at least two equations (orprograms) and two variables.

E403

ExtremumResult 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

623

Messages Listed Alphabetically (continued)
Message
Meaning# (hex)

Implicit ( ) off

Implicit parentheses off.

207

Implicit ( ) on

Implicit parentheses on.

208

Incomplete Subexpression™, ˜ or ` pressed before all function

206

arguments supplied.
Attempted unit conversion withincompatible units.

B02

Infinite Result

Math exception: Calculation such as 1/0
infinite result.

305

Inserting Column

Matrix Writer application is inserting acolumn.

506

Inserting Row

Matrix Writer application is inserting a row.

505

Insufficient Memory

Not enough free memory to execute
operation.

001

Insufficient Σ Data

A Statistics command was executed when
ΣDAT did not contain enough data points
for calculation.

603

Interrupted

The HP Solve application or ROOT wasinterrupted by −A03

Invalid Array Element`returned object of wrong type forcurrent matrix.

502

Invalid Card Data

Machine does not recognize data on plug-in
card.

008

Invalid Date

Date argument not real number in correct
format, or was out of range.

D01

Invalid Definition

Incorrect structure of equation argument
for DEFINE.

12C

Invalid Dimension

Array argument had wrong dimensions.

501

Invalid EQ

Attempted operation from FCN menu
when EQ did not contain algebraic, or,attempted DRAW with CONIC plot typewhen EQ did not contain algebraic.

607

Invalid IOPAR

IOPAR not a list, or one or more objects inlist missing or invalid.

C12

Invalid Mpar

Mpar variable not created by MINIT.

E401

Inconsistent Units

Error and Status Messages A-3

Messages Listed Alphabetically (continued)
Message
Meaning# (hex)Invalid N

Attempted to calculate I%YR with N < 1 orN ≥ 1010.

E604

Invalid Name

Received illegal filename, or server asked tosend illegal filename.

C17

Invalid PPAR

PPAR not a list, or one or more objects inlist 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 TimeTime 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

A-4 Error and Status Messages

Messages Listed Alphabetically (continued)
Message
Meaning
LAST CMD Disabled„® pressed while that recovery feature

LAST STACK Disabled…¯pressed while that recovery feature

LASTARG Disabled…Ëpressed while that recovery featuredisabled.

disabled.

# (hex)125
124

disabled.

205

Low Battery

System batteries too low to safely print or
perform I/O.

C14

Many or No Solutions

A value for I%YR cannot be calculated.
Check the values stored in PV, PMT, andFV. Check for correct signs.

E602

Memory Clear

Memory was cleared.

005

Name Conflict

Execution of | (where) attempted to assign
value to variable of integration orsummation 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 withnonexistent EQ.

104

Plot and HP Solve application status
message.
Insufficient free memory in the specified
port.
Not enough free memory to save copy ofthe stack. LAST STACK is automaticallydisabled.

00B

No Room to Show Stack

Stack objects displayed by type only due tolow 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, andFV. Check for correct signs.

E601

No current equation.
No Room in PortNo Room to Save Stack

609

101

Error and Status Messages A-5

Messages Listed Alphabetically (continued)
Message
Meaning
Non-Empty Directory

Attempted to purge non-empty directory.

# (hex)
12B

Execution of HP Solve application, ROOT,DRAW, or ∫ returned result other than real
number or unit.
Execution of HP Solve application, ROOT,DRAW, or ∫ returned result other than real
number or unit.
Alarm list did not contain alarm specified
by alarm command.

D04

Nonexistent ΣDAT

Statistics command executed when ΣDAT
did not exist.

602

Object In Use

Attempted PURGE or STO into a backup
object when its stored object was in use.

009

Object Not in Port

Attempted to access a nonexistent backup
object or library.

00C( OFF SCREEN )Function value, root, extremum, orintersection was not visible in current
display.

61F

Out of Memory

One or more objects must be purged tocontinue calculator operation.

135

Non-Real Result

Non-Real Result

Nonexistent Alarm

12F
12F

Math exception: Calculation returned result
greater in absolute value than MAXR.
Indicates packet number during send or
receive.
Received bytes’ parity bit doesn’t matchcurrent parity setting.

C10

Plot Type:

Label introducing current plot type.

61D

Port Closed

Possible I/R or serial hardware failure. Run
self-test.

C09

Port Not Available

Used a port command on an empty port, or
one containing ROM instead of RAM.
Attempted to execute a server commandthat itself uses the I/O port.

00A

Positive Underflow

Math exception: Calculation returned
positive, non-zero result less than MINR.

301

Power Lost

Calculator turned on following a power
loss. Memory may have been corrupted.

006

Processing Command

Indicates processing of host command
packet.

C11

Overflow
Packet #Parity Error

A-6 Error and Status Messages

303

C05

Messages Listed Alphabetically (continued)
Message
Meaning
Received a packet whose length was shorter
than a null packet.
Protocol Error
Maximum packet length parameter fromother machine is illegal.
Kermit: More than 255 bytes of retries sent
before calculator received another packet.
Receive Buffer Overrun
SRECV: Incoming data overflowed thebuffer.

# (hex)
C07

C04

Receive Error

UART overrun of framing error.

C03

Receiving

Identifies object name while receiving.

C0E

Retry #

Indicates number of retries while retrying
packet exchange.

C0B

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 tofind point at which current equation
evaluates to zero, but did find twoneighboring 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 andtimed out waiting for XON.

C02

Too Few Arguments

Command required more arguments thanwere available on stack.

201

Too Many Unknowns

Multiple Equation Solver can’t calculate avalue given the current knowns. Supply
another value or add an equation.

E404

Transfer Failed

Ten successive attempts to receive a goodpacket were unsuccessful.

C06

Unable to find root

PROOT is unable to determine all roots ofthe polynomial.

C001

Unable to Isolate

ISOL failed because specified name absent
or contained in argument a function with noinverse.

130

Error and Status Messages A-7

Messages Listed Alphabetically (continued)
Message
Meaning
Undefined ConstantUndefined Element

The name supplied to CONST isn’t in theConstants Library.
The element supplied to PTPROP doesn’t
exist.

# (hex)
E129
E502

Undefined FPTR Name

Executed a Flash Pointer that did not exist.

011

Undefined Local Name

Executed or recalled local name for whichcorresponding local variable did not exist.

003

Undefined Name

Executed or recalled global name for whichcorresponding variable did not exist.

204

Undefined Property

The property number supplied to PTPROP
isn’t in the Periodic Table

E503

Undefined Result

Calculation such as 0/0 generated
mathematically undefined result.

304

Undefined TVM Variable

The variable name supplised to
TVMROOT isn’t N, I%YR, PV, PMT, or
FV.

E607

Undefined XLIB Name

Executed an XLIB name when specified
library absent.

004

Warning:Label introducing current status message.

007

Wrong Argument Count

User-defined function evaluated with anincorrect number of parentheticalarguments.

128

x and y-axis zoom.

Identifies zoom option.

627

x axis zoom.

Identifies zoom option.

625

x axis zoom
w/AUTO.

Identifies zoom option.

624

y axis zoom.

Identifies zoom option.

626

Result returned by the HP Solve application
or ROOT is a root (a point at which current
equation evaluates to

A04

ZERO

zero).
""

A-8 Error and Status Messages

Identifies no execution action when
%EXECS% pressed.

61E

Messages Listed Numerically# (hex)

Message
General 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
Full Check Bad Crc
Cmprs: not a user bank
No or 2 system bankInvalid bankInvalid bank number
Inexisting pack
Pack twice
Ins. Mem.
Erase Fail, Rom faulty
Erase Fail, Low bats
Erase Fail, Locked Block
Write Adr outside ROM
Write Fail, Rom Faulty
Write Fail, Low bats
Write Fail, Locked Block
Invalid DOS Name
File already opened
Invalid File Handle
Invalid File Index

Error and Status Messages A-9

Messages Listed Numerically (continued)# (hex)
026
027
028
029
02A
02B
02C
02D
02E
101
102
103
104
106
107
108
109
10A
10B
10C
10D
10E
10F
110
111
112
113
114
115
116
117
118
119
11A
11B
11C

Message
Invalid File Mode
Disk Full
Disk Format Error
Disk Change
No SD card inserted
Not enough ARM memory
DOS call unsupported
DOS unknown error
Disk Protected
No Room to Save Stack
Can't Edit Null Char.
Invalid User Function
No Current Equation
Invalid Syntax
Real Number
Complex Number
StringReal Array
Complex Array
List
Global Name
Local Name
Program
Algebraic
Binary Integer
Graphic
TaggedUnit
XLIB Name
Directory
Library
Backup
Function
Command
System BinaryLong RealA-10 Error and Status Messages

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

MessageLong Complex
Linked Array
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:

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
AlarmsLast Arguments
Name Conflict
Command Line(#13Eh DOERR is equivalent to CONT)Interrupted
IntegerError and Status Messages A-11

Messages Listed Numerically (continued)# (hex)
141
142
143
144
145
146
147
148
149
14A
14B
14C
14D
14E
14F
150
151

Message
Symbolic Matrix
Font
Aplet
Extended Real
Extended Complex
FlashPtr
Extended Ptr
MiniFont
Extended 1
Extended 2
Extended 3
YES
NO
TRUE
FALSE
Are you sure?
Low Memory Condition
Please Wait...

Object Editing Messages
152
153
154
155
156
157
158

CATALOG

159

Result not editable in EQWNonexistent Find Pattern
Not FoundNonexistent Replace Pattern
Can't Find Selection
Y= not available
Warning:Changes will not be saved

Stack Errors and Messages
201
202
203
204
205

Too Few Arguments

206

Incomplete
Subexpression

207

Implicit () off

208

Implicit () on

Bad Argument Type
Bad Argument Value
Undefined NameLASTARG Disabled

Equation Writer Application Messages

A-12 Error and Status Messages

Messages Listed Numerically (continued)# (hex)

Message
Floating-Point Errors

301
302
303
304
305

Positive Underflow
Negative Underflow
Overflow
Undefined Result
Infinite Result

Array Messages
501
502
503
504
505
506

Invalid Dimension

601
602
603
604
605
606

Invalid Σ Data

Invalid Array Element
Deleting Row
Deleting Column
Inserting Row
Inserting Column

Statistics Messages
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. Enterdata 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)
61A
61B
61C
61D
61E
61F
620
621
622
623
624
625
626
627
628
629
62A
62B
62C
62D
62E
62F

MessageEnter alarm, press SET
Select repeat interval
I/O setup menu
Plot type:
""(OFF SCREEN)
Invalid PTYPEName the stat data,press ENTER
Enter value (zoom outif>1), press ENTER
Copied to stackx axis zoom w/AUTO.
x axis zoom.
y axis zoom.
x and y axis zoom.
IR/wire:
ASCII/binary:
baud:
parity:
checksum type:
translate code:
Enter matrix, then NEW
No Associated Numeric View

Mode and Plot Input Form Prompts
701
702
703
704
705
706
707
708
709
70A
70B
70C
70D
70E

Algebraic
RPN
Standard
Std
Fixed
Fix
Scientific
Sci
EngineeringEng
DegreesRadians
Grads
Rectangular

A-14 Error and Status Messages

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
Header:
Clock
AnalogChoose system font
Display stack using small font?
Use pretty print in the stack?
Edit using small font?

Error and Status Messages A-15

Messages Listed Numerically (continued)# (hex)
735
736
737
738
739
73A
73B
73C
73D
73E
73F
740
741
742
743
744
745
746
747
748
749
74A
74B
74C
74D
74E
74F
750
751
752
753
754
755
756
757
758
759
75A

Message
Edit in full page?
Automatically indent new lines?
Edit in EQW using small font?
Display EQW using small font?
Choose header height
Display ticking clock?
Analog clock?
DISPLAY MODES
Indep var:
Modulo:Verbose
Step/Step
Complex
ApproxIncr Pow
Simp Non-Rational
Rigorous
Numeric
Enter independent variable nameEnter modulo value
Display calculus information?
Perform operations step by step?
Allow complex numbers?
Perform approx calculations?
Increasing polynomial ordering?
Simplify non rational expr?
Don't simplify |X| to X?
Replace constants by values?
CAS MODES
Goto row:
Goto column:
Specify a row to go toSpecify a column to go to
Matrix Writer
Bad range value
Start:Step:
Type:

A-16 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 valueEnter increment value
Choose table format
Enter zoom factor
Display table using small font?
Enter a filename to save data
TABLE SETUP
Automatic
Build Your Own
Function
Polar
Parametric
Diff Eq
Conic
Truth
Histogram
Bar
Scatter
Slopefield
Fast3D
Wireframe
Ps-Contour
Y-Slice
Gridmap
Pr-Surface
Deg
Rad
Grad
Type:
:
EQ:
Indep:
Connect
Simult
H-Tick:Error and Status Messages A-17

Messages Listed Numerically (continued)# (hex)
781
782
783
784
785
786
787
788
789
78A
78B
78C
78D
78E
78F
790
791
792
793
794
795
796
797
798
799
79A
79B
79C
79D
79E
79F
7A0
7A1
7A2
7A3
7A4
7A5
7A6
7A7

Message
V-Tick:PixelsDepnd:
Save Animation
ΣDAT:
Col:
Cols:
F:
H-Var:
V-Var:
Stiff
ˆFˆY:
ˆFˆT:
Choose type of plot
Choose angle measure
Enter function(s) to plot
Enter independent variable name
Connect plot points?
Plot functions simultaneously?
Enter horizontal tick spacing
Enter vertical tick spacing
Tick spacing units are pixels?
Enter dependent variable name
Save slices animation?
Enter data to plot
Enter col to use for horizontal
Enter col to use for vertical
Enter horizontal variable
Enter vertical variable
Use stiff diff eq solver?
Enter derivative w.r.t. solnEnter derivative w.r.t. indep
PLOT SETUP
H-View:
V-View:
Indep Low:
High:
Step:
Pixels

A-18 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
7A8
7A9
7AA
7AB
7AC
7AD
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 valueEnter maximum horizontal valueEnter minimum vertical valueEnter maximum vertical valueEnter minimum indep var valueEnter maximum indep var valueEnter indep var increment
Indep step units are pixels?
Enter minimum depend var valueEnter maximum depend var valueEnter bar widthEnter minimum Z view-volume val
Enter maximum Z view-volume val
Enter X eyepoint coordinate
Enter Y eyepoint coordinate

Error and Status Messages A-19

Messages Listed Numerically (continued)# (hex)
7CD
7CE
7CF
7D0
7D1
7D2
7D3
7D4
7D5
7D6
7D7
7D8
7D9
7DA
7DB
7DC
7DD
7DE
7DF
7E0
7E1
7E2
7E3
7E4
7E5
7E6
7E7
7E8
7E9
7EA
7EB
7EC
7ED
7EE

MessageEnter Z eyepoint coordinate
Enter absolute error tolerance
Enter minimum XX range valueEnter maximum XX range valueEnter minimum YY range valueEnter maximum YY range value
PLOT WINDOW
Default
FUNCTION
POLAR
PARAMETRIC
DIFF EQCONIC
TRUTH
HISTOGRAMBARSCATTERSLOPEFIELD
FAST3DWIREFRAME
PS-CONTOURY-SLICEGRIDMAP
PR-SURFACE
PLOT WINDOW -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 indep var sample countEnter depnd var sample count
Goto Level:
Specify a level to go to
HISTORY

Advanced Statistics Messages
801
802
803

Must be >= 0
Must be bewteen 0 and 1µ0:

A-20 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
804
805
806
807
808
809
80A
80B
80C
80D
80E
80F
810
811
812
813
814
815
816
817
818
819
81A
81B
81C
81D
81E
81F
820
821
822
823
824
825
826
827
828
829

Message:N:Œ:˜:Null hypothesis population mean
Sample mean
Sample Size
Significance level
Population standard deviation
Z-TEST: 1 µ, KNOWN ˜Alternative Hypothesis
1:
˜1:
N1:
Œ:
2:
˜2:
N2:
Sample mean for population 1
Std deviation for population 1
Sample size for population 1
Significance level
Sample mean for population 2
Std deviation for population 2
Sample size for population 2
Z-TEST: 2 µ, KNOWN ˜
π0:
x:
N:
Œ:
Null hyp. population proportion
Success countSample size
Significance level
Z-TEST: 1 P
X1:
N1:
Œ:

Error and Status Messages A-21

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 2Size 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 ˜:˜:

A-22 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
850
851
852
853
854
855
856
857
858
859
85A
85B
85C
85D
85E
85F
860
861
862
863
864
865
866
867
868
869
86A
86B
86C
86D
86E
86F
870
871
872
873
874
875

Message
N:
C:
Sample mean
Population standard deviation
Sample size
Confidence level
CONF. INT.: 1 µ, KNOWN ˜
1:
˜1:
N1:
C:
2:
˜2:
N2:
Sample mean for population 1
Std deviation for sample 1
Size of sample 1
Sample mean for population 2
Std deviation for sample 2Size of sample 2
Confidence level
CONF. INT.: 2 µ, KNOWN ˜x:N:C:Sample success countSample size
Confidence level
CONF. INT.: 1 P
1:
N1:
C:
2:
N2:
Sample 1 success countSample 1 size
Sample 2 success countSample 2 size

Error and Status Messages A-23

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:
PooledSample 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 patternEnter replace pattern
Case sensitive search?
Enter search pattern

A-24 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
89A
89B
89C
89D
89E
89F
8A0
8A1
8A2
8A3
8A4
8A5
8A6
8A7
8A8
8A9
8AA
8AB
8AC
8AD
8AE
8AF
8B0
901-90C
90D

Message
FIND REPLACE
FIND
Goto Line:Specify a line to go to
GOTO LINE
Goto Position:
Specify a position to go to
GOTO POSITION
H-Factor:
V-Factor:
Recenter on cursor
Enter horizontal zoom factor
Enter vertical zoom factor
Recenter plot on cursor?
ZOOM FACTOR
Object:Name:
Directory
Enter New Object
Enter variable nameCreate a new directory?
NEW VARIABLE
Select Object

Statistics Help Messages(Help messages for Hypothesis Tests and ConfidenceIntervals)
Inconclusive result

HP Solve Application Messages
A01
A02
A03
A04
A05
A06
A07
A08
A09

Bad Guess(es)Constant?
Interrupted
Zero
Sign Reversal
Extremum
Left
Right
Expr

Error and Status Messages A-25

Messages Listed Numerically (continued)# (hex)

Message
Unit Management

B01
B02

Invalid Unit

C01
C02
C03
C04
C05
C06
C07
C08
C09
C0A
C0B
C0C
C0D
C0E
C0F
C10
C11
C12
C13
C14
C15
C16
C17

Bad Packet Block check

Inconsistent Units

I/O and Printing
Timeout
Receive Error
Receive Buffer Overrun
Parity Error
Transfer Failed
Protocol Error
Invalid Server Cmd.
Port Closed
Connecting
Retry #
Awaiting Server Cmd.
SendingReceiving
Object Discarded
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

Press [CONT] for menu
reset/delete this field
Reset value
Delete value

A-26 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
B905
B906
B907
B908
B909
B90A
B90B
B90C
B90D
B90E
B90F
B910
B911
B912
B913
B914
B915
B916
B917
B918
B919
B91A
B91B
B91C
B91D
B91E
B91F
B920
B921
B922
B923
B924
B925
B926
B927
B928
B929
B92A
B92B

Message
Reset all
Valid object types:
Valid object type:Any object
Real number(Complex num)
"String"[ Real array ][(Cmpl array)]{ List }Name« Program »'Algebraic'# Binary int_Unit object
Invalid object type
Invalid object value
Calculator Modes
Number Format:
Angle Measure:
Coord System:
Beep
Clock
FM,
Choose number display format
Enter decimal places to display
Choose angle measure
Choose coordinate system
Enable standard beep?
Display ticking clock?
Use comma as fraction mark?
Standard
Std
Fixed
Fix
Scientific
Sci
EngineeringEng

Error and Status Messages A-27

Messages Listed Numerically (continued)# (hex)
B92C
B92D
B92E
B92F
B930
B931
B932
B933
B934

Message
Degrees
Deg
Radians
Rad
Grads
Grad
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

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
27 'X+Y*i' → '(X,Y)'
28 Sequential plot
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
38 Add linefeeds
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

Messages Listed Numerically (continued)# (hex)
B951
B952
B953
B954
B955
B956
B957
B958
B959
B95A
B95B
B95C
B95D
B95E
B95F
B960
B961
B962
B963
B964
B965
B966
B967
B968
B969
B96A
B96B
B96C
B96D
B96E
B96F
B970
B971
B972
B973
B974
B975

Message
53 No extra parens
54 Tiny element → 0
55 Save last args
56 Standard beep on
57 Alarm beep on
58 Show INFO
59 Show variables
60 [Œ][Œ] locks
61 [USR][USR] locks
62 User keys off
63 Custom ENTER off
65 All multiline
66 Stack:x lines str
67 Digital clock
68 No AutoIndent
69 Line edit
70 →GROB 1 line str
71 Show addresses
72 Stack:current fnt
73 Edit:current font
74 Right stack disp
75 Key click off
76 Purge confirm
79 Textbook on
80 EQW cur stk font
81 GRB Alg cur font
82 EQW edit cur font
83 Display grobs on
85 Normal stk disp
90 CHOOSE:cur font
91 MTRW:matrix
92 MASD asm mode
94 Result = LASTCMD
95 RPN mode
97 List:horiz disp
98 Vector:horiz disp
99 CAS:quiet

Error and Status Messages A-29

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
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

Messages Listed Numerically (continued)# (hex)
B99B
B99C
B99D
B99E
B99F
B9A0
B9A1
B9A2
B9A3
B9A4
B9A5
B9A6
B9A7
B9A8
B9A9
B9AA
B9AB
B9AC
B9AD
B9AE
B9AF
B9B0
B9B1
B9B2
B9B3
B9B4
B9B5
B9B6
B9B7
B9B8
B9B9
B9BA
B9BB
B9BC
B9BD
B9BE

Message
37 Double-space prnt
38 No linefeeds
39 No I/O messages
40 Show clock
41 24-hour clock
42 dd.mm.yy format
43 Don't reschedule
44 Save alarm
51 Fraction mark: ,52 Show one line
53 Show all parens
54 Use tiny element
55 No last args
56 Standard beep off
57 Alarm beep off
58 Don't show INFO
59 Show names only
60 [Œ] locks Alpha
61 [USR] locks User
62 User keys on
63 Custom ENTER on
65 Level 1 multiline
66 Stk: 1 line str
67 Analog clock
68 AutoIndent
69 Infinite line edit
70 →GROB x lines str
71 No addresses
72 Stack:mini font
73 Edit:mini font
74 Left stack disp
75 Key click on
76 No purge confirm
79 Textbook off
80 EQW mini stk font
81 GRB Alg mini font

Error and Status Messages A-31

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
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()
117 Soft MENU
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

Object:Obs inName:
1.Send to Calculator…
2.Get from Calculator

A-32 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
BA03
BA04
BA05
BA06
BA07
BA08
BA09
BA0A
BA0B
BA0C
BA0D
BA0E
BA0F
BA10
BA11
BA12
BA13
BA14
BA15
BA16
BA17
BA18
BA19
BA1A
BA1B
BA1C
BA1D
BA1E
BA1F
BA20
BA21
BA22
BA23
BA24
BA25
BA26
BA27

Message
3.Print display
4.Print…
5.Transfer…
6.Start ServerEnter names of vars to send
Vars in
SEND TO CALCULATOR
Port:
Dbl-Space
Delay:
Xlat:
Linef
Baud:
Parity:Len:
Choose print port
Enter object(s) to print
Print extra space between lines?
Enter delay between lines
Choose character translations
Print linefeed between lines?
Choose baud rate
Choose parity
Enter printer line length
PRINT
Type:
OvrW
Fmt:
Chk:
Choose transfer port
Choose type of transfer
Enter names of vars to transfer
Choose transfer format
Choose checksum type
Overwrite existing variables?
TRANSFER
Local vars

Error and Status Messages A-33

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
InfraredIR
Wire
Kermit
XModem
Odd
Even
Mark
Space
Spc
ASCII
ASC
BinaryBin
None
Newline (Ch 10)
Newl
Chr 128-159
→159
→255
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

Messages Listed Numerically (continued)# (hex)
BA4D
BA4E
BA4F
BA50
BA51

Message
2400
4800
9600
USB
SerialStatistics Prompts
BB01
BB02
BB03
BB04
BB05
BB06
BB07
BB08
BB09
BB0A
BB0B
BB0C
BB0D
BB0E
BB0F
BB10
BB11
BB12
BB13
BB14
BB15
BB16
BB17
BB18
BB19
BB1A
BB1B
BB1C
BB1D
BB1E
BB1F
BB20
BB21

1.Single-var…
2.Frequencies…
3.Fit data…
4.Summary stats…
SINGLE-VARIABLE STATISTICS
ΣDAT:
Type:
Mean
Std Dev
Variance
Total
Maximum
MinimumEnter statistical data
Enter variable column
Choose statistics typeCalculate mean?
Calculate standard deviation?
Calculate variance?
Calculate column total?
Calculate column maximum?
Calculate column minimum?
SamplePopulation
FREQUENCIES
X-Min:Bin Count:
Bin Width:
Enter minimum first bin X valueEnter number of bins
Enter bin width
FIT DATA
X-Col:

Error and Status Messages A-35

Messages Listed Numerically (continued)# (hex)
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

Message
Y-Col:
Model:
Enter indep column numberEnter dependent column number
Choose statistical model
Correlation
Covariance
PREDICT VALUESY:Enter indep value or press PREDEnter dep value or press PREDSUMMARY STATISTICS
Calculate:
ΣX
ΣY
ΣX2
ΣY2
ΣXY
NΣ
Calculate sum of X column?
Calculate sum of Y column?
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
5.Hypoth. tests…
6.Conf. interval…

Time and Alarm Prompts
BC01
BC02
BC03
BC04

1.Browse alarms…
2.Set alarm…
3.Set time, date…
SET ALARM

A-36 Error and Status Messages

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 hourEnter minuteEnter second
Choose AM, PM, or 24-hour time
Enter monthEnter dayEnter year
Enter alarm repeat multiple
Enter alarm repeat unit
SET TIME AND DATE
Choose date display format
MondayTuesday
WednesdayThursdayFridaySaturday
SundayNone
AMPM
24-hour time
24-hr
1 January
2 February
3 March
4 April
5 May
6 June7 July8 August
9 September

Error and Status Messages A-37

Messages Listed Numerically (continued)# (hex)
BC2A
BC2B
BC2C
BC2D
BC2E
BC2F
BC30
BC31
BC32
BC33
BC34
BC35
BC36
BC37
BC38
BC39
BC3A
BC3B

Message
10 October
11 November
12 December
Week
Day
Hour
MinuteSecond
Weeks
Days
Hours
MinutesSeconds
Month/Day/Year
M/D/Y
Day.Month.Year
D.M.Y
ALARMS

Symbolic Application Prompts
BD01
BD02
BD03
BD04
BD05
BD06
BD07
BD08
BD09
BD0A
BD0B
BD0C
BD0D
BD0E
BD0F
BD10
BD11
BD12

1.Integrate…
2.Differentiate…
3.Taylor poly…
4.Isolate var…
5.Solve quad…
6.Manip expr…
INTEGRATE
Expr:
Var:
Result:Enter expression
Enter variable nameEnter lower limit
Enter upper limit
Choose result type
Choose disp format for accuracy
DIFFERENTIATE
Value:

A-38 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
BD13
BD14
BD15
BD16
BD17
BD18
BD19
BD1A
BD1B
BD1C
BD1D
BD1E
BD1F
BD20
BD21
BD22
BD23
BD24
BD25
BD26
BD27

MessageEnter variable value
Expression
TAYLOR POLYNOMIAL
Order:
Enter Taylor polynomial order
ISOLATE A VARIABLE
Principal
Get principal solution only?
SOLVE QUADRATICMANIPULATE EXPRESSION
MATCH EXPRESSION
Pattern:
Replacement:
Subexpr First
Cond:
Enter pattern to search forEnter replacement object
Search subexpressions first?
Enter conditional expression
Symbolic
Numeric

Plot Application Prompts
BE01
BE02
BE03
BE04
BE05
BE06
BE07
BE08
BE09
BE0A
BE0B
BE0C
BE0D
BE0E
BE0F

Plot
Type:
:
H-View:
Autoscale
V-View:
Choose type of plot
Choose angle measure
Enter function(s) to plot
Enter minimum horizontal valueEnter maximum horizontal value
Autoscale vertical plot range?
Enter minimum vertical valueEnter maximum vertical value
Plot (x(t), y(t))

Error and Status Messages A-39

Messages Listed Numerically (continued)# (hex)
BE10
BE11
BE12
BE13
BE14
BE15
BE16
BE17
BE18
BE19
BE1A
BE1B
BE1C
BE1D
BE1E
BE1F
BE20
BE21
BE22
BE23
BE24
BE25
BE26
BE27
BE28
BE29
BE2A
BE2B
BE2C
BE2D
BE2E
BE2F
BE30
BE31
BE32
BE33
BE34

MessageEnter complex-valued func(s)Plot y'(t)=f(t,y)
Enter function of INDEP and SOLNEnter derivative w.r.t. SOLNEnter derivative w.r.t. INDEPUse Stiff diff eq solver?
ΣDat:
Col:
Wid:
Enter data to plot
Arrays inEnter column to plot
Enter bar width
Cols:Enter col to use for horizontal
Enter col to use for vertical
Steps:
Enter indep var sample countEnter dep var sample countPlot Options
Lo:
Hi:
Axes
SimultConnect
Pixels
H-Tick:V-Tick:Enter minimum indep var valueEnter maximum indep var value
Draw axes before plotting?
Connect plot points?
Plot functions simultaneously?
Enter indep var increment
Indep step units are pixels?
Enter horizontal tick spacing
Enter vertical tick spacing

A-40 Error and Status Messages

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 nameEnter minimum dep var valueEnter maximum dep var value
H-Var:
V-Var:
Enter max indep var increment
Choose horizontal variable
Choose vertical variable
0 INDEP
1 SOLNSOLN(
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

Messages Listed Numerically (continued)# (hex)
BE5A
BE5B
BE5C
BE5D
BE5E
BE5F
BE60
BE61
BE62
BE63
BE64
BE65
BE66
BE67
BE68
BE69
BE6A
BE6B
BE6C
BE6D
BE6E
BE6F
BE70
BE71
BE72
BE73
BE74
BE75
BE76
BE77

MessageEnter minimum XX range valueEnter maximum XX range valueEnter minimum YY range valueEnter maximum YY range value
XX and YY Plot Options
Zoom Factors
H-Factor:
V-Factor:
Recenter at CrosshairsEnter horizontal zoom factor
Enter vertical zoom factor
Recenter plot at crosshairs?
Reset plot
Dflt
Auto
Function
Polar
Conic
Truth
Parametric
Diff Eq
Histogram
Bar
Scatter
Slopefield
Wireframe
Ps-Contour
Y-Slice
Gridmap
Pr-Surface

Solve Application Prompts
BF01
BF02
BF03
BF04
BF05
BF06

1.Solve equation…
2.Solve diff eq…
3.Solve poly…
4.Solve lin sys…
5.Solve finance…
SOLVE EQUATION

A-42 Error and Status Messages

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

MessageEnter 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 SOLNEnter derivative w.r.t. SOLNEnter derivative w.r.t. INDEPEnter independent var nameEnter initial indep var valueEnter final indep var valueEnter solution var nameEnter initial solution var value
Press SOLVE for final soln valueEnter absolute error tolerance
Enter initial step size
Calculate stiff differential?
fTolerance
Solution
SOLVE AN·X^N+…+A1·X+A0
Coefficients [ an … a1 a0 ]:Roots:
Enter coefficients or press SOLVE

Error and Status Messages A-43

Messages Listed Numerically (continued)# (hex)
BF2C
BF2D
BF2E
BF2F
BF30
BF31
BF32
BF33
BF34
BF35
BF36
BF37
BF38
BF39
BF3A
BF3B
BF3C
BF3D
BF3E
BF3F
BF40
BF41
BF42
BF43
BF44
BF45
BF46
BF47
BF48
BF49
BF4A
BF4B
BF4C
BF4D
BF4E
BF4F
BF50

MessageEnter roots or press SOLVE
Coefficients
Roots
SOLVE SYSTEM A·X=B
A:B:X:Enter coefficients matrix A
Enter constants or press SOLVEEnter solutions or press SOLVE
Constants
Solutions
N:
I%YR:
PV:
PMT:
P/YR:
FV:
Enter no. of payments or SOLVEEnter yearly int rate or SOLVEEnter present value or SOLVEEnter payment amount or SOLVEEnter no. of payments per year
Enter future value or SOLVE
Choose when payments are made
TIME VALUE OF MONEY
N
I%/YR
PV
PMT
FV
End
Begin
Beg
AMORTIZE
Payments:
Principal:

A-44 Error and Status Messages

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:PivotsPress CONT to go on
Test
To be implemented
Unable to factor
Z is not = 1 mod 4

Error and Status Messages A-45

Messages Listed Numerically (continued)# (hex)
DE1E
DE1F
DE20
DE21
DE22
DE23
DE24
DE25
DE26
DE27
DE28
DE29
DE2A
DE2B
DE2C
DE2D
DE2E
DE2F
DE30
DE31
DE32
DE33
DE34
DE35
DE36
DE37
DE38
DE39
DE3A
DE3B
DE3C
DE3D
DE3E
DE3F
DE40
DE41
DE42

Message
Z is not prime
Empty {} of equations
Not reducible to a rational expression
Non unary operator
User function
Non isolable operator
Not exact system
Parameters not allowed
CAS internal error
Invalid ^ for SERIES
Operator not implemented (SERIES)No variable in expr.
No solution foundInvalid derivation arg
No solution in ringNot a linear system
Can't derive int. var
Diff equation order>2
INT:invalid var change
Mode switch cancelled
No name in expression
Invalid user function
Can't find ODE type
Integer too large
Unable to find sign
Non-symmetric matrix
ATAN insufficent order
ASIN at infinity undef
Unsigned inf error
LN[Var] comparison err
Undef limit for var
Bounded var error
Got expr. indep of var
Can't state remainder
LN of neg argument
Insufficient order
ABS of non-signed 0

A-46 Error and Status Messages

Messages Listed Numerically (continued)# (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 HP49GSERIES 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

Error and Status Messages A-47

Messages Listed Numerically (continued)# (hex)

Message

DE67
DE68

Replacing strict with large inequality

DF01
DF02
DF03
DF04
DF05
DF06
DF07
DF08
DF09
DF0A
DF0B
DF0C
DF0D
DF0E
DF0F
DF10
DF11
DF12
DF13
DF14
DF15
DF16
DF17
DF18
DF19
DF1A
DF1B
DF1C
DF1D
DF1E
DF1F
DF20
DF21
DF22

File Manager

No valid environment stored

Filer Application Messages
NO
ABORT
ALL
YES
REN
Already Exists
Overwrite ?
Rename
PICK DESTINATIONAre You Sure?
Search Mode OFF
Search Mode ON
New DIR?
Sort by:
Original
Type
Name
Size
Inv. TypeInv. Name
Inv. Size
Sending with Xmodem:
EDIT
COPY
MOVE
RCL
EVAL
TREE
PURGE
RENAME
NEW
ORDER
SEND

A-48 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
DF23
DF24
DF25
DF26
DF27
DF28
DF29
DF2A
DF2B
DF2C
DF2D
DF2E
DF2F
DF30
DF31
DF32

Message
RECV
HALT
VIEW
EDITB
HEADER
LIST
SORT
XSEND
CHDIR
CANCL
OK
CHECK
WARNING: Formatting
will erase the SD card
Do you want to continue?
FORMAT
Please Wait...

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

Avogadro's number
Boltzmannmolar volume
universal gas
std temperature
std pressure
Stefan-Boltzmann
speed of lightpermittivity
permeability
accel of gravity
gravitation
Planck's
Dirac'selectronic charge
electron massq/me ratio
proton mass
mp/me ratio
fine structure
mag flux quantum
Faraday

Error and Status Messages A-49

Messages Listed Numerically (continued)# (hex)
E117
E118
E119
E11A
E11B
E11C
E11D
E11E
E11F
E120
E121
E122
E123
E124
E125
E126
E127
E128
E129

Message
Rydberg
Bohr radius
Bohr magneton
nuclear magneton
photon wavelength
photon frequency
Compton wavelen
1 radian
2π radians in trig mode
Wien's
k/q
“0/q
q*“0
dielectric const
SiO2 dielec cons
ref intensity
CONSTANTS LIBRARY
Undefined ConstantEquation Library Messages
E301
E302
E303
E304

Starting Solver

E305
E306
E307
E308
E309
E30A

NEAR

OF
Keyword Conflict
No Picture Available

Minehunt Game Prompts
MINE
MINES
SCORE:
YOU MADE IT!!
YOU BLEW UP!!

Multiple-Equation Solver Messages
E401
E402
E403
E404
E405
E406
E407

Invalid Mpar
Single Equation
EQ Invalid for MINIT
Too Many Unknowns
All Variables Known
Illegal During MROOT
Solving for

A-50 Error and Status Messages

Messages Listed Numerically (continued)# (hex)
E408

Message
Searching

Periodic Table Messages
E501
E502
E503

Bad Molecular Formula

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
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 FileToo Many
Unknown Instruction
Invalid Field
Val betw 0-15 expected
Val betw 1-16 expected
Label Expected
Hexa Expected
Decimal Expected
Can't Find
Label already defined{ expected} expected( expected

Error and Status Messages A-51

Messages Listed Numerically (continued)# (hex)
1010F
10110
10111
10112
10113
10114
10115
10116
10117
10118
31401
70000

Message
Forbidden
Bad Expression
Jump too Long
Val betw 1-8 expected
Insuffisant Memory
Matrix Error
Define Error[ or ] expected
ARM register expected
ARM invalid imediate
No Message here(user-defined message created with DOERR)

A-52 Error and Status Messages

B
B. Tables of Units and Constants
Units
Unit (Full Name)

Value in SI Unitsa (are)

100 m2A (ampere)

1A

acre (acre)

4046.87260987 m2

arcmin (minute of arc)

2.90888208666 x 10-4 r

arcs (second of arc)

4.8481368111 x 10-6 r

atm (atmosphere)

101325 kg / m•s2

au (astronomical unit)

1.495979 x 1011 m

Å (Angstrom)1 x 10-10 m

b (barn)1 x 10-28 m2

bar (bar)

100000 kg / m•s2

bbl (barrel).158987294928 m3

Bq (becquerel)

11/s

Btu (international table Btu)

1055.05585262 kg•m2 / s2

bu (bushel).03523907 m3

oC (degree Celsius)

1K or 274.15 K

c (speed of light)

299792458 m / s

C (coulomb)

1 A•scal (calorie)

4.1868 kg•m2 / s2

cd (candela)

1 cd

chain (chain)

20.1168402337 m

Ci (curie)

3.7 x 1010 1 / s

ct (carat).0002 kgcu (US cup)

2.365882365 x 10-4 m3o (degree)1.74532925199 x 10-2 r

d (day)86400 sdB (decibel)

1 (dimensionless value)dyn (dyne).00001 kg / m•s2erg (erg).0000001 kg•m2 / s2eV (electron volt)

1.60217733 x 10-19 kg•m2/s2

F (farad)1 A2•s4 / kg•m2

Tables of Units and Constants B-1

Units (continued)
Unit (Full Name)oF(degrees Fahrenheit)

Value in SI Units
0.555555555556 K or
255.927777778 K

fath (fathom)1.82880365761 m

fbm (board foot).002359737216 m3

fc (footcandle)

10.7639104167 cd•sr / m2

Fdy (faraday)

96487 A•sfermi (fermi)

1 x 10-15 m

flam (footlambert)

3.42625909964 cd / m2

ft (international foot).3048 mftUS (survey foot)).304800609601 m

g (gram).001 kg

ga (standard freefall)

9.80665 m / s2gal (US gallon).003785411784 m3

galC (Canadian gallon).00454609 m3

galUK (UK gallon).004546092 m3

gf (gram-force).00980665 kg•m / s2

gmol (gram-mole)

1 molgrad (gradian)

1.57079632679 x 10-2 r

grain (grain).00006479891 kg

Gy (gray)

1 m2 / s2

H (henry)

1 kg•m2 / A2•s2

h (Hour)

3600 shp (horsepower)

745.699871582 kg•m2 / s3

Hz (hertz)

1/s

in (inch).0254 minHg (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 / s2

knot (nautical miles per hour).514444444444 m / skph (kilometers per hour).277777777778 m / sl (liter).001 m3lam (lambert)

3183.09886184 cd / m2lb (avoirdupois pound).45359237 kg

lbf (pound -force)

4.44822161526 kg•m / s2

B-2 Tables of Units and Constants

Units (continued)
Unit (Full Name)

Value in SI Unitslbmol (pound-mole)

453.59237 mol

lbt (troy pound).3732417216 kg

lm (lumen)

1 cd•srlx (lux)

1 cd•sr / m2lyr (light year)

9.46052840488 x 1015 m

m (meter)1mµ (micron)1 x 10-6 m

mho (mho)

1 A2•s3 / kg•m2

mi (international mile)

1609.344 mmil (mil).0000254 m

min (minute)60 s

miUS (US statute mile)

1609.34721869 m

mmHg (millimeter of mercury (torr), 0 oC)

133.322368421 kg / m•s2

mol (mole)

1 mol

mph (miles per hour).44704 m / s

N (newton)

1 kg•m / s2

nmi (nautical mile)1852 mΩ (ohm)1 kg•m2 / A2•s3

oz (ounce).028349523125 kg

ozfl (US fluid ounce)

2.95735295625 x 10-5 m3

ozt (troy ounce).311034768 kg

ozUK (UK fluid ounce)

2.8413075 x 10-5 m3

P (poise).1 kg / m•s

Pa (pascal)

1 kg / m•s2

pc (parsec)

3.08567818585 x 1016 m

pdl (poundal).138254954376 kg•m / s2ph (phot)

10000 cd•sr / m2

pk (peck).0088097675 m3

psi (pounds per square inch)

6894.75729317 kg•m / s2

pt (pint).000473176473 m3

qt (quart).000946352946 m3r (radian)1r

R (roentgen).000258 A•s / kg

° R (degrees Rankine)

0.555555555556 K

rad (rad).01 m2 / s2

Tables of Units and Constants B-3

Units (continued)
Unit (Full Name)

Value in SI Unitsrd (rod)5.02921005842 m

rem (rem).01 m2 / s2rpm (revolutions per minute)60 1 / ss (second)1s

S (siemens)

1 A2•s3 / kg•m2

sb (stilb)

10000 cd / m2

slug (slug)

14.5939029372 kg

sr (steradian)

1 srst (stere)

1 m3

St (stokes).0001 m2 / s

Sv (sievert)

1 m2 / s2t (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 m3u (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 myr (year)31556925.9747 s? (undefined)

undefined unit

B-4 Tables of Units and Constants

Constants
Constant (Full Name)

Value in SI Units

NA (Avogadro’s number)

6.0221367 x 1023 1 / gmolk (Boltzmann)

1.380658 x 10-23 J / K

Vm (molar volume)

22.4141 l / gmol

R (universal gas)8.31451 J / (gmol•K)

StdT (standard temperature)273.15 K

StdP (standard pressure)101.325 kPa

σ (Stefan-Boltzmann)

5.67051 x 10-8 W / (m2•K4)

c (speed of light)

299792458 m/s

ε0 (permittivity)

8.85418781761 x 10-12 F / mµ0 (permeability)

1.25663706144 x 10-6 H / mg (acceleration of gravity)

9.80665 m / s2

G (gravitation)

6.67259 x 10-11 m3 / (s2•kg)h (Planck’s)

6.6260755 x 10-34 J•shbar (Dirac’s)

1.05457266 x 10-34 J•sq (electronic charge)

1.60217733 x 10-19 Cme (electron mass)

9.1093897 x 10-31 kg

qme (q/me ratio)

175881962000 C / kg

mp (proton mass)1.6726231 x 10-27 kg

mpme (mp/me ratio)

1836.152701

α (fine structure)

0.00729735308

ø (mag flux quantum)

2.06783461 x 10-15 Wb

F (Faraday)

96485.309 C / gmol

R∞ (Rydberg)

10973731.534 1/m

a0 (Bohr radius)

0.0529177249 nmµB (Bohr magneton)

9.2740154 x 10-24 J / TµN (nuclear magneton)

5.0507866 x 10-27 J / T

λ0 (photon wavelength)1239.8425 nm

f0 (photon frequency)

2.4179883 x 1014 Hz

λc (Compton wavelength)0.00242631058 nm

rad (1 radian)

1r

two̟ (2π radians)

6.28318530718 r

angl ( in trig mode)

180 °

c3 (Wien’s)

0.002897756 m•K

kq (k/q)

0.00008617386 J / (K*C)

ε0q (ε0/q)

55263469.6 F / (m*C)

qε0 (q*ε0)

1.4185978 x 10-30 F*C / mεsi (dielectric constant)

11.9

εox (SiO2 dielectric constant)

3.9

I0 (ref intensity)

0.000000000001 W / m2

Tables of Units and Constants B-5

Properties of Elements
Property

Type of
Object *Property
NumberAtomic Number

Real

1

Mass Number †

Real

2

Atomic Weight

Unit

3

Density †Unit

4Oxidation States †String5

Electron Configuration

String6

State

String7

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)String13

FamilyString14

Crystal Structure

String

15

Atomic Volume †

Unit

16

Atomic Radius

Unit

17

Covalent Radius

Unit

18

Thermal Conductivity †

Unit

19

Electrical Conductivity †

Unit

20

First Ionization Potential

Unit

21

Electronegativity (Pauling’s number)

Unit

22

Oxide Behavior

String23

Element Name ‡String24

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 ofg/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.
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

C
C. System Flags
This appendix lists the calculator’s system flags. You can set, clear, and test all flags, although certain flags are used
for specific purposes by the CAS and should not be altered. The default state of the flags is clear — except for flags–17, –27, –34, –90, –95 and –128 and the Binary Integer Math flags (flags –5 through –12).
Flag
–1

–2

System Flags
Description

Principal Solution.
Clear: Symbolic commands return a result representing all possible solutions.
Set: Symbolic commands return only the principal solution.
Symbolic Constants.
Clear: Symbolic constants (e, i, π, MAXR, and MINR) retain their symbolic form
when evaluated, unless the Numerical Results flag –3 is set.
Set: Symbolic constants evaluate to numbers, regardless of the state of the
Numerical results flag –3.

Numerical Results.
Clear: Functions with symbolic arguments, including symbolic constants, evaluate
to symbolic results.
Set: Functions with symbolic arguments, including symbolic constants, evaluate tonumbers.
Not used. (Originally intended to control the careful evaluation mode in the–4
HP 48SX, though it was never implemented.)
Binary Integer Wordsize.
–5through Combined states of flag –5 through –10 (the most significant bit) set the wordsize
from 1 to 64 bits.
–10
Binary Integer Base.
–11
HEX (default): –11 set, –12 set. DEC: –11 clear, –12 clear. OCT: –11 set, –12 clear.
and–12
BIN: –11 clear, –12 set.
Not used.
–13
Financial Payment Mode.
–14
Clear: TVM calculations assume end-of-period payments.
Set: TVM calculations assume beginning-of-period payments.
Coordinate System.
–15
Rectangular: –16 clear.
and–16
Polar/Cylindrical: –15 clear, –16 set.
Polar/Spherical: –15 set, –16 set.
Trigonometric Angle Mode.
–17
Radians (default): –17 set.
andDegrees: –17 clear, –18 clear.
–18
Grads: –17 clear, –18 set.
Vector/Complex.
–19
Clear: →V2 creates a 2-dimensional vector from 2 real numbers.
Set: →V2 creates a complex number from 2 real numbers.

–3

System Flags C-1

Flag
–20

–21

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.

–22

Infinite Result Exception.
Clear: Infinite result exception treated as an error.
Set: Infinite result exception returns ± 9.99999999999E499 and sets flag –26.

–23
–24
–25
–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').

–27

–28
–29

–30
–31
–32

–33
–34

–35

C-2 System Flags

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.

Flag
–36

–37
–38
–39
–40
–41
–42
–43

–44

–45
through
–48
–49
thru
–50
–51
–52

System Flags (continued)
Description
I/O Receive Overwrite.
Clear: If file name received by the calculator matches existing variable name, newvariable name with number extension is created to prevent overwrite.
Set: If file name received by the calculator matches existing variable name,existing variable is overwritten.

Double-Spaced Printing.
Clear: Single-spaced printing.
Set: Double-spaced printing.
Line Feed.
Clear: Linefeed added at end of each print line.
Set: No linefeed added at end of each print line.
I/O Messages.
Clear: I/O messages displayed.
Set: I/O messages suppressed.
Clock Display.
Clear: Clock is not displayed.
Set: Ticking clock displayed at all times, provided the header height is 2.
Clock Format.
Clear: 12-hour clock.
Set: 24-hour clock.
Date Format.
Clear: Month/Day format.
Set: Day/Month format.
Repeat Alarm Not Rescheduled.
Clear: Unacknowledged repeat appointment alarms automatically rescheduled.
Set: Unacknowledged repeat appointment alarms not rescheduled.
Acknowledged Alarms Saved.
Clear: Acknowledged appointment alarms deleted from alarm list.
Set: Acknowledged appointment alarms saved in alarm list.
Number of Decimal Digits.
Combined states of flags –45 through –48 sets the number of decimal digits in
Fix, Scientific, and Engineering modes.
Number Display Format.
Standard: –49 clear, –50 clear.
Fix: –49 set, –50 clear.
Scientific: –49 clear, –50 set.
Engineering: –49 set, –50 set.
Fraction Mark.
Clear: Fraction mark is . (period).
Set: Fraction mark is , (comma).
Single-Line Display.
Clear: Display gives preference to object in level 1, using multiple lines of stackdisplay.
Set: Display of object in level 1 restricted to one line.

System Flags C-3

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 computethe 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. Automaticrounding 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 bypressing ~ 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 bypressing „Ì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.

Flag
–65

–66

–67

–68
–69
–70

–71
–72
–73
–74
–75
–76
–77
–78

System Flags (continued)
Description

Multi-line Mode.
Clear: Displays all levels over multiple lines.
Set: Displays only the first level over multiple lines.
Depends on flag –52.
Multi-line Strings.
Clear: Displays long strings in multiple lines.
Set: Displays long strings in single lines.
Depends on flags –52 and –65.
Digital Clock.
Clear: When the clock is displayed (see flag –40), it is digital-style.
Set: When the clock is displayed (see flag –40), it is analog-style.
Auto-indenting.
Clear: Command line does not automatically indent, like the HP 48GX.
Set: Command line automatically indents.
Full-screen Editing.
Clear: The cursor cannot move out of the text line, like the HP 48GX.
Set: Full-screen editing allowed.
Multi-line Text Grobs.
Clear: →GROB can accept only single-line strings. Newlines are turned into
blobs.
Set: →GROB can accept multi-line strings.
Disassembler Addresses.
Clear: Disassembler shows (non-re-assemblable) addresses.
Set: Disassembler does not show addresses.
Stack Font.
Clear: The stack display uses the current system font.
Set: The stack display uses mini-font.
Command Line Font.
Clear: Command line editing uses the current system font.
Set: Command line editing uses mini-font.
Stack Setting.
Clear: The stack is right-justified, like the HP 48GX calculator.
Set: The stack is left-justified.
Keystroke Beep.
Clear: Silent keyboard.
Set: Key click activated if flag –56 is clear.
File Manager Purge Confirmation.
Clear: File Manager purges need confirmation.
Set: No purge confirmation in File Manager.
Not used. (Originally intended to be a filer confirmation flag in the HP 49G,
though it was never implemented.)
I/O Device for wire. Used only when flag –33 is clear, and only on the HP 50g
and 48gII.
Clear: I/O directed to USB port.
Set: I/O directed to serial port.

System Flags C-5

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 inmulti-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.
Erable Header. Not used.

Flag
–94

–95
–96
–97
–98
–99
–100
–101
–102
–103
–104
–105
–106
–107
–108
–109
–110
–111

System Flags (continued)
Description

Auto-saving.
Clear: In RPN mode, results are stored in LASTCMD.
Set: In RPN mode, results are not stored in LASTCMD.
Entry Mode.
Clear: RPN modeSet (default): Algebraic mode.
Not used. (Originally intended to toggle the softmenu in the editor in the HP 49G,
though it was never implemented.)
Vertical Lists.
Clear: Lists on stack are displayed horizontally only, like the HP 48GX.
Set: Lists are displayed vertically.
Vertical Vectors.
Clear: Vectors on stack are displayed horizontally only, like the HP 48GX.
Set: Vectors are displayed vertically.
Verbose CAS Mode.
Clear: CAS concise mode.
Set: CAS verbose mode.
Step-by-step CAS Mode.
Clear: Step-by-step mode.
Set: Final result mode.
Internal use only. (Set if VXXL success).
GCD Computations.
Clear: GCD computations allowed.
Set: No GCD computations.
Real/Complex Mode.
Clear: Real mode. “R” annunciator in header.
Set: Complex mode. “C” annunciator in header.
Internal use only. (If set, LN→ –INV[–LN]]).
Exact/Approximate Mode.
Clear: Exact mode. “=” annunciator in header.
Set: Approximate mode, like the HP 48GX calculator. “~” annunciator in header.
TSIMP Calls.
Clear: TSIMP calls are allowed in SERIES.
Set: TSIMP calls are not allowed in SERIES.
Internal use only. (Modular computation).
Internal use only. (Testing remainder to be zero).
Numeric/Symbolic Factorization.
Clear: Numeric factorization is not allowed.
Set: Numeric factorization is allowed.
Large Matrices.
Clear: Use normal-size-matrix code, like the HP 48GX calculator.
Set: Use code optimized for large matrices.
Simplifying Inside Non-rational Expressions.
Clear: Recursive simplification in EXPAND and TSIMP.
Set: No recursive simplification in EXPAND and TSIMP.

System Flags C-7

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.
Menu Display Mode.
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.

Four user flags are also used by the system:

Flag
60

61
62
63

User Flags
Description

Units Type.
Clear: The Equation Library and Constants Library use SI units.
Set: The Equation Library and Constants Library use English units.
Units Usage.
Clear: The Equation Library and Constants Library display units.
Set: The Equation Library and Constants Library do not display units.
Payment Mode.
Clear: The Time Value of Money solver uses End payment mode.
Set: The Time Value of Money solver uses Begin payment mode.
State Change Mode.
Clear: Must use the MUSE, MCAL, and ALL softkeys in the Multiple Equation
Solver to change the state of a variable from undefined to user-defined.
Set: Simply pressing a softkey in the Multiple Equation Solver toggles its
undefined/user-defined status, hiding the MUSE and MCAL softkeys, but
making it more difficult to retrieve the variable’s value.

System Flags C-9

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 withthe 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 tostore 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(custom) menu.

MENU, „£

“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 LIBn1, n2, …

Arbitrary integers.

ISOL, QUAD

Nmines

Minehunt game data.

MINEHUNT

Reserved Variables D-1

Reserved Variable

What It Contains

Used By

PPAR

Plotting parameters.

DRAW

PRTPAR

Printing parameters.

PRINT commands

PTPAR

Periodic Table parameters.

PERTBLSTARTED

Program run on EDIT.

EDIT

STARTEQW

CST commands list for EQW. Equation Writer

STARTERR

Program run on error.

Error processing

STARTOFF

Program run at turnoff.

OFF

STARTRECV

Program run at RECV.

Filer, RECVSTARTSEND

Program run at SEND.

Filer, SENDSTARTUP

Program run at reset.

Resets1, s2,…

Arbitrary signs.

ISOL, QUAD

TOFFTime in ticks until OFF.

Turnoff delay

TPAR

Table parameters.

Table of values

VPAR

Viewing parameters.

DRAW

ZPAR

Plot zoom factors.

DRAW

ΣDAT

Statistical data.

Statistics application, DRAW

ΣPAR

Statistical parameters.

Statistics application, DRAW

Contents of the System Reserved Variables
αENTER
This is the vectored ENTER pre-processor. It is active when flags –62 and –63 are set. When ENTER is pressed,
the command line is placed on the stack as a string and αENTER is executed.

ALRMDATALRMDAT does not reside in a particular directory. You cannot access the variable itself, but you can access its
data from any directory using the RCLALARM and STOALARM commands, or through the Alarm Catalog.
ALRMDAT contains a list of these alarm parameters:

D-2 Reserved Variables

Parameter (Command)
date (→DATE)Time (→TIME)

actionRepeatDescription
A real number specifying thedate of the alarm:
MM.DDYYYY (or DD.
MMYYYY if flag –42 is set).
If YYYY is not included, thecurrent year is used.
A real number specifying thetime of the alarm:
HH. MMSS.
A string or object:
 a string creates anappointment alarm, which
beeps and displays thestring any other object creates acontrol alarm, which executes
the object
A real number specifying theinterval between automaticrecurrences of the alarm,
given in ticks (a tick is 1/8192 ofa 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 thattriggered 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 thecustom menu behave as do objects in built-in menus. For example:
 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

You can specify menu labels and key actions independently by replacing a single object within the custom-menu list
with a list of the form {“label-object” action-object }.
To provide different shifted actions for custom menu keys, action-object can be a list containing three action objects inthis order: The unshifted action (required if you want to specify the shifted actions).
 The left-shifted action.
 The right-shifted action.

EQ
EQ contains the current equation or the name of the variable containing the current equation,
EQ supplies the equation for ROOT, as well as for the plotting command DRAW. (ΣDAT supplies the information
when the plot type is HISTOGRAM, BAR, or SCATTER.)
The object in EQ can be an algebraic object, a number, a name, or a program. How DRAW interprets EQ depends
on the plot type.
For graphics use, EQ can also be a list of equations or other objects. If EQ contains a list, then DRAW treats eachobject in turn as the current equation, and plots them successively. However, ROOT in the HP Solve application
cannot solve an EQ containing al list.
To alter the contents of EQ, use the command STEQ.

EXITED

EXITED can be stored in any directory. If there is an EXITED program that exists in the path, it will be called
upon exiting the command line. This can be used in conjunction with STARTED, for instance, to set a header sizeof 0 when entering the command line and restore it to 2 when exiting (in order to increase the editor window size).
Note, this is only valid when entering the command line through a EDIT function.

EXPR
EXPR contains the current algebraic expression (or the name of the variable containing the current expression)used by the SYMBOLIC application and its associated commands. The object in EQ must be an algebraic or a
name.

IOPAR
IOPAR is a variable in the HOME directory that contains a list of the I/O parameters needed for a communications
link with a computer. It is created the first time you transfer data or open the serial port (OPENIO), and is
automatically updated whenever you change the I/O settings. All IOPAR parameters are integers.

D-4 Reserved Variables

Parameter (Command)

Description

Default Valuebaud (BAUD)

The baud rate: 2400, 4800, 9600, 14400,
19200, 38400 or 115200.

115200parity (PARITY)

The parity used: 0=none, 1=odd, 2=even,0
3=mark, 4=space. The value can be positiveor negative: a positive parity is used upon
both transmit and receive; a negative parity
is used only upon transmit.

receive pacing

Controls whether receive pacing is used: anonzero real value enables pacing, whilezero disables it. Receive pacing sends an
XOFF signal when the receive buffer isalmost 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 otherserial I/O transfers.

transmit pacing

Controls whether transmit pacing is used: a 0 (no pacing)nonzero real value enables pacing, whilezero disables it. Transmit pacing stops
transmission upon receipt of XOFF, andresumes transmission upon receipt of XON.
Pacing is not used for Kermit I/O, but isused 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

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.

Reserved Variables D-5

MASD.INI

MASD.INI must contain valid MASD source code. This source code will be parsed/compiled before the source on
the stack. It is useful to always include a basic set of commands or definitions in all compiled source.

MHpar
MHpar stores the status of an interrupted Minehunt game. MHpar is created when you exit Minehunt by pressing
K. If MHpar still exists when you restart Minehunt, the interrupted game resumes and MHpar is purged.

Mpar
Mpar is created when you use the Equation Library’s Multiple-Equation Solver, and it stores the set of equations
you’re using.
When the Equation Library starts the Multiple-Equation Solver, it first stores a list of the equation set in EQ, andstores the equation set, a list of variables, and additional information in Mpar. Mpar is then used to set up the Solver
menu for the current equation set.
Mpar is structured as library data dedicated to the Multiple Equation Solver application. This means that although
you can view and edit Mpar directly, you can edit it only indirectly by executing commands that modify it.
You can also use the MINIT command to create Mpar from a set of equations on the stack.

n1, n2, 7
The ISOL and QUAD commands return general solutions (as opposed to principal solutions) or operations. A generalsolution contains variables for arbitrary integers or arbitrary signs, or both.
The variable n1 represents an arbitrary integer 0, ±1, ±2, etc. Additional arbitrary integers are represented by n2, n3,
etc.
If flag –1 is set, then ISOL and QUAD return principal solutions, in which case the arbitrary integer is always zero.

NminesNmines is a variable you create in the current directory to control the number of mines used in the Minehunt game.
Nmines contains an integer in the range 1 to 64; if Nmines is negative, the mines are visible during the game.

PPAR
PPAR is a variable in the current directory. It contains a list of plotting parameters used by the DRAW command
for all mathematical and statistical plots, by AUTO for autoscaling, and by the interactive(nonprogrammable) graphics operations.

D-6 Reserved Variables

Parameter(Command)Description

Default Value(xmin, ymin) (XRNG,
YRNG)

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 theminimum and maximum values for the independent
variable (the plotting range).

(–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

res (RES)

Resolution. A real number specifying the interval0
between values of the independent variable. For plots ofequations, this determines the plotting interval along thex-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 statisticalplots is different (see below).

axes (AXES)

A complex number specifying the user-unit coordinatesof 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 andvertical 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

Parameters without commands can be modified with a program by storing new values in the list contained in PPAR
(use the PUT command).

Reserved Variables D-7

The $RESET$ operation („&ôL %RESET% ) resets the PPAR parameters (except ptype) to their default values,and erases PICT. (Note: the & means to press and hold the „key while pressing ô).
Note that res behaves differently for the statistical plot types BAR, HISTOGRAM, and SCATTER than for otherplot types. For BAR, res specifies bar width; for HISTOGRAM, res specifies bin width; res does not affect
SCATTER.

PRTPAR
PRTPAR is a variable in the HOME directory that contains a list of printing parameters. It is created automaticallythe first time you use a printing command.
Parameter (Command)

Default
Value

Description

delay time (DELAY)

A real number, in the range 0 to 6.9, specifying thenumber of seconds the calculator waits between
sending lines. This should be at least as long as thetime required to print the longest line. If the delay is
too short for the printer, you will lose data. The delay
setting also affects serial printing if transmit-pacing(in IOPAR) is not being used.

0

remap (OLDPRT stores thecharacter-remapping string
for the HP 82240A Infrared
Printer)

A string defining the current remapping of theEmpty
extended character set for printing. The string canstring.
contain as many characters as you want to remap, withthe first character being the new character 128, thesecond being the new character 129, etc. (Anycharacter number that exceeds the string length will
not be remapped.) See the example below.

line length

A real number specifying the number of characters ina line for serial printing. This does not affect infrared
printing.

80

line termination

A string specifying the line-termination method forserial printing. This does not affect infrared printing.
Note that control character 13 is the carriage returnand 10 is the line feed.

Controlcharacters
13 and 10.

Parameters without modified commands can be modified with a program by storing new values in the list containedin PRTPAR (use the PUT command).
Example: If the remapping string were “ABCDEFGH” and the character to be printed had value 131, then thecharacter actually printed would be “D”, since 131–128=3 and “A” has the value zero. A character code of 136 or
greater would not be remapped since 136–128=8, which exceeds the length of the string.

PTPAR

PTPAR is created when you use the Periodic Table, and it stores the current pointer position information.

STARTED

If it exists, the STARTED variable is evaluated when the command-line editor is evaluated.

D-8 Reserved Variables

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 anargument, 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 asarguments 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)

Reserved Variables D-9

TPAR

TPAR is a variable in the current directory. It contains a list of parameters used by the table of values plotting
operation.
Parameter(Command)starting-value
steptable-format

zoom-factor
font-size
filename

Description
Real number that specifies the first value to show in thetable.
Real number that specifies the amount to incrementfrom starting-value for each row in the table.
0 for “Automatic”, for generating the table based on
automatically-created values, or 1 for “Build Your
Own”, for generating the table based on values stored ina vector stored in filename and saving any user-enteredvalues.
Real number that specifies the zoom factor for the table.
0 for the small font or 1 for the large font.
The name of a variable containing a vector with values
to use for input into the table.

Default Value
0
.1
0

4
0
TAB

VPAR
VPAR is a variable in the current directory. It contains a list of parameters used by the 3D plot types. The main data
structure stored in VPAR describes the “view volume,” the abstract three-dimensional region in which the functionis plotted.
Parameter(Command)Description

Default Value(xleft, xright) (XVOL)Real numbers that specify the width of the view volume.

(–1, 1)(yfar, ynear) (YVOL)Real numbers that specify the depth of the view volume.

(–1, 1)(zlow, zhigh) (ZVOL)Real numbers that specify the height of the view volume. (–1, 1)(xeye, yeye, zeye) (EYEPT)Real numbers that specify the point in space from which
the plot is viewed.

(xstep, ystep)(NUMX, NUMY)

Real numbers that specify the increments between of x- (10, 8)
coordinates and y-coordinates plotted. The increments
are equal to the range for the axes divided by the numberof steps. Used instead of (or in combination with) res.

(xxleft, xxright) (XXRNG)Real numbers that specify the width of the input plane(domain). Used by GRIDMAP and PARSURFACE.

(–1, 1)(yyfar, yynear) (YYRNG)

Real numbers that specify the depth of the input plane(domain). Used by GRIDMAP and PARSURFACE.

(–1, 1)(0, –3, 0)Parameters without commands can be modified programmatically by storing new values in the list contained in
VPAR (use the PUT command).

D-10 Reserved Variables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 Valueh-factor

Real number that specifies the horizontal zoom factor.

4v-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 thevariable 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 anothermatrix.
The command CLΣ clears the current statistical matrix.

Reserved Variables D-11

ΣPAR
ΣPAR is a variable in the current directory that contains either the current statistical parameter list or the name ofthe variable containing this list.
Parameter (Command)

Description

Default
Valuecolumnindep (XCOL)

A real number specifying the independent-variable’s
column number.

1

columndep (YCOL)

A real number specifying the dependent-variable’s
column number.

2intercept (LR)A real number specifying the coefficient of intercept as
determined by the current regression.

0

slope (LR)A real number specifying the coefficient of slope as
determined by the current regression.

0model (LINFIT, etc.)

A command specifying the regression model (LINFIT,
EXPFIT, PWRFIT, or LOGFIT).

LINFIT

D-12 Reserved Variables

CASDIR Reserved Variables
The Computer Algebra System stored its reserved variables in a special directory called CASDIR.
Reserved Variable

What It Contains

Used By

CASINFO

Graphic display temporarystorage.

Step-by-step operations

ENVSTACK

Flags and current path.

PUSH, POP

EPS

Maximum coefficient toround 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 temporarystorage.

Various CAS operations

REALASSUME

List of variables to treat asreal 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.

ENVSTACKENVSTACK is a variable stored in the CAS directory. It is used by PUSH and POP to save the status of flags andthe 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.

IERRIERR contains the error tolerance of integration during numeric integration.
Reserved Variables D-13

MODULO
The variable MODULO contains a real prime number for use with the modular operations. The default value is 13.
It is used by ADDTMOD, DIV2MOD, DIVMOD, EXPANDMOD, FACTORMOD, GCDMOD, INVMOD,MODSTO, MULTMOD, POWMOD, RREFMOD, and SUBTMOD.

PERIOD

Contains the period for CAS periodic operations. The default value is 2π.

PRIMIT

Contains a primitive (subexpression) used temporarily for anti-derivitive expression during CAS operations.

REALASSUME

The variable REALASSUME contains a list of variables which the CAS assumes are real values.

VX

The variable VX contains the name of the default variable to use for CAS commands which operate on a default
variable. It is used by DERVX, INTVX, SIGMAVX, and SOLVEVX.

D-14 Reserved Variables

E
E. Technical ReferenceThis 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).

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
CommandComplex matrix
Complex number
Complex vector
Directory
Graphics Object
Integer
List
Matrix
Program
Quoted global or local
nameReal 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 ofvariable 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 ofuntagged object

Technical Reference E-1

Object Size, continued
Object Type
Size (bytes)

Unit object
real magnitudeeach prefix
each unit nameeach ×, ^, or /each exponent
Unquoted global or
local name
VectorXLIB name

7.5 +2.5 or 10.5
6
5 + number of characters
2.5
2.5 or 10.5
3.5 + number of characters12.5 + 8 × number of elements
5.5

Symbolic Integration Patterns
This table lists the symbolic integration patterns used by the calculator. These are the integrands that the calculator
can integrate symbolically.

φ is a linear function of the variable of integration. The antiderivatives should be divided by the first–ordercoefficient in φ to reduce the expression to its simplest form. Also, patterns beginning with 1 / match INV: forexample, 1 /φ is the same as INV(φ).
Symbolic Integration

Pattern

Antiderivative

ACOS(φ)φ×ACOS(φ)– (1–φ 2)

ALOG(φ)ASIN(φ).434294481904×ALOG(φ)φ×ASIN(φ)+ (1–φ 2)

ATAN(φ)φ×ATAN(φ)–LN(1+φ 2)/2

COS(φ)
1/(COS(φ)×SIN(φ))
COSH(φ)1/(COSH(φ)×SINH(φ))
1/(COSH(φ)2)

SIN(φ)
LN(TAN(φ))
SINH(φ)
LN(TANH(φ))
TANH(φ)

EXP(φ)
EXPM(φ)LN(φ)

EXP(φ)
EXP(φ)
φ×LN(φ)–φ

LOG(φ).434294481904×φ×LN(φ)–φ

SIGN(φ)
SIN(φ)ABS(φ)–COS(φ)1/(SIN(φ)×COS(φ))

LN(TAN(φ))

1/(SIN(φ)×TAN(φ))–INV(SIN(φ))

E-2 Technical ReferenceSymbolic Integration (continued)

Pattern

Antiderivative

1/(SIN(φ)×TAN(φ))–INV(SIN(φ))

1/(SIN(φ)2)–INV(TAN(φ))

SINH(φ)1/(SINH(φ)×COSH(φ))

COSH(φ)
LN(TANH(φ))

1/(SINH(φ)×TANH(φ))–INV(SINH(φ))

SQ(φ)

φ 3/3

TAN(φ)2

TAN(φ)–φTAN(φ)

1/TANH(φ)×SINH(φ))–LN(COS(φ))
INV(COS(φ))
LN(SIN(φ))–INV(SIN(φ))
LN(COSH(φ))
INV(COSH(φ))
LN(SINH(φ))–INV(SINH(φ))φ

2×φ 1.5/3

1/ φ
1/(2× (φ))

2× φ
2× (φ)×.5

φ z(z symbolic)

IFTE(z = = –1,LN(φ),φ (z+1)/(z+1))

φ z(z real, ≠ 0,–1)

φ (z+1)/(z+1)φ0

φ

TAN(φ)/COS(φ)
1/TAN(φ)
1/TAN(φ)×SIN(φ))
TANH(φ)TANH(φ)/COSH(φ)
1/TANH(φ)

–1

LN(φ)

1/φ

LN(φ)

1/(1–φ 2)

ATANH(φ)

1/(1+φ 2)

ATAN(φ)1/(φ 2+1)

ATAN(φ)1/( (φ–1)× (φ+1))

ACOSH(φ)

1/ (1–φ 2)

ASIN(φ)1/ (1+φ 2)

ASINH(φ)

1/ (φ 2+1)

ASINH(φ)φ

Technical Reference E-3

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)– ( SI ( x × i ) × i )CO S ( x × i )TA ( x × i ) × – i
2– i × L ( 1 – x + i × x )ACOS(x)π2--- + i × L ( 1 – x + i × x )2

ATAN(x) ( 1 + i × x )– i × L  ------------------------ 1 + x2 

ASINH(x)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)

ExpansionSI ( x ) × COS ( y ) + COS ( x ) × SI ( x )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 ) × SIH ( x )COSH ( x ) × CO S H ( y ) + SIH ( x ) × SIH ( y )TA H ( x ) + TAH ( y )---------------------------------------------------------------1 + TAH ( x ) × TAH ( y )→TRG Expansions

Function
EXP (x)E-4 Technical Reference

Expansionx
x
C OS  -- + SI  -- × i
 i
 i

Precedence of Operations
Evaluation of an algebraic object is carried according to the order of precedence of the operators — those withhigher precedence are executed first.
Operations with the same order of precedence are executed from left to right.
From highest precedence to lowest, the order of precedence is:
Order

Operation

1.
1.1
1.2
1.3

Unit attachment:
Parenthesized expressions from innermost to outermost
Power (^) from bottom to top (i.e. 1_m^2^3^4 = 1_m^24)
Multiplication (*) and Division (/)

2.

Parenthesized expression from innermost to outermost

3.

Functions that require arguments (i.e. SIN, LOG)

4.

Factorial (!)

5.

Power (^) from top to bottom (i.e. 2^2^3^4 = 2^(2^(3^4))) and Root (√, XROOT)

6.

Negation (-), Multiplication (*), Division (/) and Modulus (MOD)7.

Addition (+) and Subtraction (–)

8.

Relational operators (==, ≠, <, >, ≤, ≥)9.

Logical operators AND and NOT

10.

Logical operators OR and XOR

11.

Left argument of “Where” (|)

12.

Equal (=)

Technical Reference E-5

Source References
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.)
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 andMaterials, Philadelphia, 1989.
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).

E-6 Technical ReferenceF
F. Parallel Processing with Lists
Parallel processing is the idea that, generally, if a command can be applied to one or more individual arguments,
then it can also be extended to be applied to one or more sets of arguments. (Note: some examples assume
approximate mode.)
Some examples: 5 INV returns .2, so { 4 5 8 } INV returns { .25 .2 .125 }.
 4 5 * returns 20, so { 4 5 6 } { 5 6 7 } * returns { 20 30 42 }, and { 4 5 6 } 5* returns { 20 25 30 }.
General rules for parallel processing

As a rule-of-thumb, a given 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 that use an indefinite number of arguments (such as →LIST) do not use parallel list processing.
 The command isn’t a programming branch command (IF, FOR, CASE, NEXT, and so forth).
The remainder of this appendix describes how the many and various commands available on the calculator aregrouped with respect to parallel processing.
Group 1: Commands that cannot parallel process

A command must take arguments before it can parallel process, since a zero-argument command (such as RAND,
VARS, or REC) has no arguments with which to form a group.
Group 2: Commands that must use DOLIST to parallel processThis group of commands cannot use parallel processing directly, but can be “coerced” into it using the DOLIST
command (see Using D later in this appendix). This group consists of several subgroups:
 Stack manipulation commands. A stack manipulation command cannot parallel process because the stack ismanipulated as a whole and list objects are treated the same as any other object. Stack commands (such as
DROP) that take level 1 arguments will not accept level 1 list arguments.
 Commands that operate on a list as a whole. Certain commands accept lists as arguments but treat themno differently than any other data object. They perform their function on the object as a whole without respect toits elements. For example, →STR converts the entire list object to a string rather than converting each individual
element, and the == command tests the level 1 object against the level 2 object regardless of the objects’ types.

 List manipulation commands. List manipulation commands will not parallel process since they operate onlist arguments as lists rather than as sets of parallel data. However, a list manipulation command can be forced toparallel process lists of lists by using the DOLIST command. For example, { { 1 2 3 } { 4 5 6 } }« œLIST » DOLIST returns { 6 120 }.

 Other commands that have list arguments. Because a list can hold any number of objects of any type, it iscommonly used to hold a variable number of parameters of various types. Some commands accept such lists, andbecause of this are insensitive to parallel processing, except by using DOLIST.

 Index-oriented commands. Many array commands either establish the size of an array in rows and columns

or manipulate individual elements by their row and column indices. These commands expect these row andcolumn indices to be real number pairs collected in lists. For example, { 3 4 } RANM will generate a random

Parallel Processing with Lists F-1

integer matrix having 3 rows and 4 columns. Since these commands can normally use lists as arguments, theycannot 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 byusing 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).

Group 4: ADD and + On HP 48S and HP 48SX calculators, the + command has been used to append lists or to append elements tolists. Thus { 1 2 3 } 4 + returns { 1 2 3 4 }. With the advent of parallel processing in the HP 48G
series, the ADD command was created to perform parallel addition instead of +.

This has several ramifications: To add two lists in parallel, you must do one of the following: Use ADD from the !´%LIST% menu.

 Create a custom menu containing the ADD command.
 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 becomeuser-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'.
Group 5: Commands that set modes / states

Commands that store values in system-specific locations so as to control certain modes and machine states cangenerally be used to parallel process data. The problem is that each successive parameter in the list cancels thesetting established by the previous parameter. For example, { 1 2 3 4 5 } FIX is effectively the same as 5
FIX.
Group 6: One-argument, one-result commands

These commands are the easiest to use with parallel processing. Simply provide the command with a list ofarguments 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

Group 7: Two -argument, one result commands

Two-argument commands can operate in parallel in any of three different ways:
 {list } {list } {list } object
 object {list }In the first form, parallel elements are combined by the command:{ 1 2 3 } { 4 5 6 } returns { .04 .1 .18 }.

In the second form, the level 1 object is combined with each element in the level 2 list in succession:{ 1 2 3 } 30 %CH returns { 2900 1400 900 }.

In the third form, the level 2 object is combined with each element of the level 1 list in succession:
50 { 1 2 3 } %T returns { 2 4 6 }.
Group 8: Multiple-argument, one-result commands

Commands that take multiple (3, 4, or 5) arguments can perform parallel processing only if all arguments are lists.
For example, { 'SIN(X)' 'COS(X)' 'TAN(X)' } { X X X } { 0 0 0 } ROOT returns { 0
90 0 }. Notice that lists must be used even though the level 1 and level 2 lists each contain multiples of the sameelement.
Group 9: Multiple-result commands

Any command that allows parallel processing, but produces multiple results from its input data, will return its results
as a single list. For example, { 1 2 3 } { 4 5 6 } R→C C→R produces { 1 4 2 5 3 6 } rather
than the more expected { 1 2 3 } { 4 5 6 }.
The following UNMIX program will unmix the data given the number of expected result lists:« OVER SIZE → l n s« 1 n
FOR j j s
FOR i l i GET n
STEP s n / →LISTNEXT»»
Taking { 1 4 2 5 3 6 } from above as the result of C→R (a command which should return two results),
2 UNMIX gives { 1 2 3 } { 4 5 6 }.
Group 10: Quirky commands

A few commands behave uniquely with respect to parallel processing: DELALARM. This command can take a list of arguments. Note, however, that deletions from early in the alarm

list will change the alarm indices of the later alarm entries. Thus, if there are only three alarms,{ 1 3 } DELALARM will cause an error, whereas { 3 1 } DELALARM will not.

 DOERR. This command forces an error state that causes all running programs and commands to halt. Thus,

even though providing the command with a list argument will cause the command to perform parallel processing,
the first error state will cause the command to abort and none of the rest of the list arguments will be used.

 FREE, MERGE. These commands are for the HP 48SX and do not apply to these calculators.
 RESTORE. This command performs a system warmstart after installing the backup object into memory. All

functions are terminated at that time. Thus, only the first backup object in a list will be restored.

Parallel Processing with Lists F-3

 _ (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 theother 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 theargument 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 » DOLISTSWAP « →TAG » DOLIST
CLLCD 1 « 1 DISP 1 WAIT » DOLIST»»F-4 Parallel Processing with Lists

G
G. Keyboard Shortcuts
Each key on the calculator performs so many different functions that only the most fundamental ones are actuallyshown on the keyboard (on the keys themselves or on the space around the keys). The following is the complete listof the “hidden” functions of the calculator’s keyboard.
Notation: In this appendix, there are two ways of showing key presses:@` means: press Right Shift, release it, then press `.
@&` means: while holding Right Shift, press `.

On-key combinations
The table lists functions that include the $ key. These are not programmable.
Keystrokeƒ& $Definition
Holding these two keys during the entire turn-on routine prevents all added
libraries from being attached AND prevents 'STARTUP' from being
executed. This is useful if the calculator seems to hang up during turn-on.

$& C

Warmstart. Clears the stack, PICT, LASTARG, and other temporary things
like those, and turns off USER Mode. Doesn’t clear any variables. Usefulwhen the calculator is taking too long to finish a complicated function andpressing $ doesn’t seem to interrupt it. Also useful if you lock out the
keyboard with a bad USER mode set of key assignments.

$& D

Displays the current ROM’s version and build numbers, then enters Factory
Test Mode. Press $& C to exit$& F

Like $& D but a friendlier and more complete set of tests, designed forthe end-user. Follow the instructions on the screen. Do NOT format the SD
card unless you wish to lose all of its contents!

$& A& F

Clears the calculator’s RAM, returning everything to the factory state.
Anything in port 2 (flash ROM) will remain untouched.

$& —Print Screen. Send the current display to the current printer$& +Adjusts the display contrast up.

$& -Adjusts the display contrast down.

$& R

Begins a “remote control” mode, where the calculator transmits the screen
bitmap through the USB port and accepts keypresses through the same way.

$& S

Terminates the remote control mode.

$& Ó

($&9)

Forces the very next system interrupt to be ignored. This is intended to allow
the user to shutdown rapidly repeating alarms, but it must be noted that
keystrokes also cause a system interrupt, so be sure NOT to press any key
between pressing $& Ó and the next repeating alarm, or the alarm
will come due and continue repeating.

Keyboard Shortcuts G-1

Other keyboard shortcuts
KeycodeKeystroke

Definition

11.21
through
22.21! & A through F

Accesses the graphing input forms!&£(!& H)

MODES menu (menu 63)

23.21

!&¥

(!&I)

Toggles real/complex mode (flag –103)

25.1

—

31.21

!& §

(!& J)

HOME

33.21

!&«

(!& L)

Last Menu

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, thisdisplays it; otherwise, the menu itself is displayed fullscreen, with the VAR menu also showing the beginningof 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)CHARS menu (menu 62)

43.31

@& ³

( @ & O)` ` (places back-tics on the command line)

43.61

~@& O

Ω (omega)45.1

ƒ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 achoose 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)

Solver menu (menu 74)

74.31

@& Ó

(@& 9)

TIME menu (menu 167)

84.61

~@& 6

G-2 Keyboard Shortcuts

If no command line, interactive stack (same as M
key)

° (degree symbol)

Keycode

Keystroke

Definition

93.61

~@& 2

¡ (upside down exclamation point)

94.61

~@& 3

¿ (upside down question mark)104.31@ & í (@& †); or . (depends on flag –51)

104.61~@&í(@&†); or . (depends on flag –51)

105.31@ & ï(@& `)Toggles exact/approximate mode (flag –105)

Shifted softkeys
This section describes the effect of using the shift keys and menu labels displayed above the A through F keys.
@%VARNAME% = 'varname' !©.
Applies to the VAR menu, CUSTOM menus obtained by pressing !£, or via the programmable MENU or
TMENU commands, and any menu containing a variable (e.g. pressing @%EQ% in the ROOT menu [menunumber 75] yields 'EQ' !©even in program mode.)! %VARNAME% = 'varname' ‰.
Applies to the VAR menu, CUSTOM menus obtained by pressing !£, (the left shift of the Hkey)or via theprogrammable MENU or TMENU commands, and any menu containing a variable (e.g. pressing ! %EQ% in the
ROOT menu [menu number 75] yields 'EQ' ‰ even in program mode.)
The function !î(the left shift of the `key) is really the LASTARG key in RPL mode. It performs the
LASTARG command EXCEPT when pressed immediately after pressing a ‰ or %PURGE% key, including a!varname ‰. If !îis pressed immediately after a ‰, then the PREVIOUS contents of the variable
are returned (if any). If !îis pressed immediately after a %PURGE% key is pressed, then the purged variable
AND ITS CONTENTS are both returned to the stack. This does not apply if the variable is a directory object. The
purpose of these exceptions is to prevent disaster: If you accidentally PURGE a variable, or wipe out a variable’s
contents by accidentally STOing something else into it, you can recover simply by pressing !î.
Pressing %EDIT% by itself is the same as pressing ˜: it performs an EDITB. ! %EDIT% performs an EDIT.
In the ROOT SOLVR ( @& Ï, %ROOT%, %SOLVR% ), pressing %VARNAME% performs 'varname' K.
@%VARNAME% performs 'varname' ! ©. ! %VARNAME% solves for varname in the current equation.
Pressing ANY key (other than $) while the solver is working causes it to display the current solution interval
until a solution is found. Watching the progress of the solver this way lets you avoid waiting for solutions when theprocess is not converging.
Menus that contain mode-toggling keys (e.g. the MISC menu ( !°L%MODES% L%MISC% ) handle the shift
keys in a special way. Pressing ! %MODE% sets the corresponding system flag (unrelated to the previous orsubsequent presence or absence of the “bullet” in the menu key), and in program mode types nn SF where nn is theflag number. @%MODE% performs the opposite: nn CF. Modes that do not behave this way (e.g. STK and CMD)
are not programmable modes.

Keyboard Shortcuts G-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 theseshifted 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 STEPFOR NEXTFOR STEPDO UNTIL END
WHILE REPEAT END
IFERR THEN END
IFERR THEN ELSE END

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.
In program mode, @%UNIT% returns '1_unit' /, while ! %UNIT% returns '1_unit' CONVERT,where “unit” is the unit corresponding to the menu key.

G-4 Keyboard Shortcuts

H
H. The Menu-Number Table
Menu Numbers“*” in the first column means the menu is not one of the keyboard menus and is therefore only available throughthe MENU command.
Menus are identified by keyboard path (used when flag –117 is clear) followed by choose-box path (used when flag
–117 is set) followed by its displayed name.
RS-9 means “press right-shift, let go, then press 9”.
RS&9 means “press right-shift, hold it down, and press 9”.
“Abandoned” means that the menu was used in a former ROM version but has been made obsolete by subsequent
improvements to the operating system.

Syntax Example:
16 [MTH] BASE NXT LOGIC (MTH 6 7 or BASE 7: "LOGIC")
This means that menu 16 can be reached in eight different ways:
In algebraic mode:(1)
MENU(16)(2)
TMENU(16)In RPL mode:(3)
16 MENU(4)
16 TMENU
In either algebraic or RPL mode:
With flag –117 set (soft-menu mode):(5)
Press MTH BASE NXT LOGIC(6)
Press BASE NXT LOGIC
With flag –117 clear (choose-box mode):(7)
Press MTH 6 ENTER 7 ENTER(8)
Press BASE 7 ENTER... and the name shown at the top of the choose box is “LOGIC MENU”.
Note: When a choose-box path is “1”, just press ENTER since the first choice is automatically highlighted in menu
choose boxes.

The Menu-Number Table H-1

Menus 0 through 117

These menus are mostly compatible with the menus in the HP 48G series.
0 LAST MENU
1 CUSTOM (no choose-box version available)
2 VAR (no choose-box version available)
3 MTH (or APPS 10: "MATH")
4 MTH VECTR (MTH 1: "VECTOR")
5 MTH MATRX (MTH 2: "MATRIX")
6 MTH MATRX MAKE (MTH 2 1: "MATRIX MAKE")
7 MTH MATRX NORM (MTH 2 2: "MATRIX NORM")
8 MTH MATRX FACTR (MTH 2 3: "MATRIX FACTOR.")
9 MTH MATRX COL (MTH 2 4: "CREATE COL")
10 MTH MATRX ROW (MTH 2 5: "CREATE ROW")
11 MTH LIST (MTH 3: "LIST")
12 MTH HYP (MTH 4: "HYPERBOLIC")
13 MTH NXT PROB (MTH 7: "PROBABILITY")
14 MTH REAL (MTH 5: "REAL")
15 [MTH] BASE (MTH 6 or BASE: "BASE")
16 [MTH] BASE NXT LOGIC (MTH 6 7 or BASE 7: "LOGIC")
17 [MTH] BASE NXT BIT (MTH 6 8 or BASE 8: "BIT")
18 [MTH] BASE NXT BYTE (MTH 6 9 or BASE 9: "BYTE")
19 MTH NXT FFT (MTH 8: "FFT")
20 MTH NXT CMPLX (MTH 9: "COMPLEX")
21 MTH NXT CONST (MTH 10: "CONSTANTS")
22 PRG (PRG: "PROG")
23 PRG BRCH (PRG 3: "BRANCH")
24 PRG BRCH IF (PRG 3 1: "IF")25 PRG BRCH CASE (PRG 3 2: "CASE")
26 PRG BRCH START (PRG 3 3: "START")
27 PRG BRCH FOR (PRG 3 4: "FOR")
28 TOOL EDIT (no choose-box version available)
29 PRG BRCH DO (PRG 3 5: "DO")* 30 old soft-menu solver (no choose-box version available)
31 PRG BRCH WHILE (PRG 3 6: "WHILE")
32 PRG TEST (PRG 4: "TEST")33 PRG TYPE (PRG 5: "TYPE")
34 PRG LIST (PRG 6: "LIST")
35 PRG LIST ELEM (PRG 6 1: "ELEMENT")
36 PRG LIST PROC (PRG 6 2: "PROC")
37 PRG NXT GROB (PRG 7: "GROB")
38 PRG NXT PICT (PRG 8: "PICTURE")
39 PRG NXT IN (PRG 11: "INPUT")
40 PRG NXT OUT (PRG 12: "OUTPUT")
41 PRG NXT NXT RUN (no choose-box version available)
42 [CONVERT] UNITS (CONVERT 1 or UNITS: "UNITS")
43 [CONVERT] UNITS LENG (CONVERT 1 2 or UNITS 2: "LENGTH")
44 [CONVERT] UNITS AREA (CONVERT 1 3 or UNITS 3: "AREA")
45 [CONVERT] UNITS VOL (CONVERT 1 4 or UNITS 4: "VOLUME")
46 [CONVERT] UNITS TIME (CONVERT 1 5 or UNITS 5: "TIME")
47 [CONVERT] UNITS SPEED (CONVERT 1 6 or UNITS 6: "SPEED")
48 [CONVERT] UNITS NXT MASS (CONVERT 1 7 or UNITS 7: "MASS")
49 [CONVERT] UNITS NXT FORCE (CONVERT 1 8 or UNITS 8: "FORCE")
50 [CONVERT] UNITS NXT ENRG (CONVERT 1 9 or UNITS 9: "ENERGY")

H-2 The Menu-Number Table51 [CONVERT] UNITS NXT POWR (CONVERT 1 10 or UNITS 10: "POWER")
52 [CONVERT] UNITS NXT PRESS (CONVERT 1 11 or UNITS 11: "PRESSURE")
53 [CONVERT] UNITS NXT TEMP (CONVERT 1 12 or UNITS 12: "TEMPERATURE")
54 [CONVERT] UNITS NXT NXT ELEC (CONVERT 1 13 or UNITS 13: "ELECTRIC CURRENT")
55 [CONVERT] UNITS NXT NXT ANGL (CONVERT 1 14 or UNITS 14: "ANGLE")
56 [CONVERT] UNITS NXT NXT LIGHT (CONVERT 1 15 or UNITS 15: "LIGHT")
57 [CONVERT] UNITS NXT NXT RAD (CONVERT 1 16 or UNITS 16: "RADIATION")
58 [CONVERT] UNITS NXT NXT VISC (CONVERT 1 17 or UNITS 17: "VISCOSITY")
59 [CONVERT] UNITS TOOLS (CONVERT 1 1 or UNITS 1: "TOOLS")
60 PRG NXT NXT ERROR IFERR (PRG 14 6: "IF ERROR")
61 PRG NXT NXT ERROR (PRG 14: "ERROR")
62 PRG NXT CHARS (PRG 9: "CHAR")
63 PRG NXT MODES (LS&MODE or PRG 10: "MODES")
64 PRG NXT MODES FMT (LS&MODE 1: "FORMAT")
65 PRG NXT MODES ANGLE (LS&MODE 2: "ANGLE")
66 PRG NXT MODES FLAG (LS&MODE 3: "FLAG")
67 PRG NXT MODES KEYS (LS&MODE 4: "KEYS")
68 PRG NXT MODES MENU (LS&MODE 5: "MENU")
69 PRG NXT MODES MISC (LS&MODE 6: "MISC")
70 PRG MEM (PRG 2: "MEMORY")
71 PRG MEM DIR (PRG 2 5: "DIRECTORY")
72 PRG MEM ARITH (PRG 2 6: "ARITH")
73 PRG/TOOL STACK (PRG 1 1: "STACK")
74 RS&NUM.SLV (similar to RS-NUM.SLV; no name)
75 RS&NUM.SLV ROOT (74 MENU ROOT: "ROOT")
76 RS&NUM.SLV DIFFEQ (74 MENU DIFFEQ: "DIF EQ")
77 RS&NUM.SLV POLY (74 MENU POLY: "POLY")
78 RS&NUM.SLV SYS (74 MENU SYS: "SYS")
79 RS&NUM.SLV TVM (74 MENU TVM: "TVM")
80 RS&NUM.SLV TVM SOLVR (FINANCE is the input-form version)* 81 old soft-menu PLOT (no choose-box version available)* 82 old soft-menu PLOT PTYPE (no choose-box version available)* 83 old soft-menu PLOT PPAR (no choose-box version available)* 84 old soft-menu PLOT 3D (81.02 MENU 3D: "3-D")* 85 old soft-menu PLOT 3D PTYPE (no choose-box version available)* 86 old soft-menu PLOT 3D VPAR (no choose-box version available)* 87 old soft-menu PLOT STAT (81.02 MENU STAT: "PLOT STAT")* 88 old soft-menu PLOT STAT PTYPE (no choose-box version available)* 89 old soft-menu PLOT STAT ΣPAR (no choose-box version available)* 90 old soft-menu PLOT STAT ΣPAR MODL (no choose-box version available)* 91 old soft-menu PLOT STAT DATA (87 MENU DATA: "PLOT ΣDAT")* 92 old soft-menu PLOT FLAG (no choose-box version available)* 93 old SYMBOLIC menu (93 DUP MENU MENU LS&PREV: "SYMBOLIC")
94 PRG NXT NXT TIME (RS&TIME or PRG 13: "TIME")
95 PRG NXT NXT TIME ALRM (RS&TIME 6 or TIME 4 6 or PRG 13 6 or APPS 5 4 6: "ALARM")* 96 old soft-menu STAT (97 MENU STAT: "STATISTIC")* 97 old soft-menu STAT DATA (96 MENU DATA: "STAT DATA")* 98 old soft-menu STAT ΣPAR (no choose-box version available)* 99 old soft-menu STAT ΣPAR MODL (no choose-box version available)*100 old soft-menu STAT 1VAR (96 MENU 1VAR: "STAT 1VAR")*101 old soft-menu STAT PLOT (96 MENU PLOT: "STAT PLOT")*102 old soft-menu STAT FIT (96 MENU FIT: "STAT FIT")*103 old soft-menu STAT SUMS (96 MENU SUMS: "STAT SUM")

The Menu-Number Table H-3

*104 old soft-menu I/O (105 MENU I/O: "INPUT/OUTPUT")*105 old soft-menu I/O SRVR (104 MENU SRVR: "SERVER")*106 old soft-menu I/O IOPAR (no choose-box version available)*107 old soft-menu I/O PRINT (104 MENU PRINT: "PRINT")*108 old soft-menu I/O PRINT PRTPAR (no choose-box version available)*109 old soft-menu I/O SERIAL (104.02 MENU SERIAL: "SERIAL IO")
*110 LIBRARY commands (110 DUP MENU MENU LS&PREV: "LIBRARY")
111 same result as LIB (no choose-box version available)
112 same result as LIB (no choose-box version available)
113 APPS 12 ("EQN LIBRARY")
114 APPS 12 EQLIB (APPS 12 1: "EQN LIB")
115 APPS 12 COLIB (APPS 12 2: "CON LIB")
116 APPS 12 MES (APPS 12 3: "MES LIB")
117 APPS 12 UTILS (APPS 12 4: "UTIL LIB")

Menus 118 through 177

These menus were first introduced in the HP 49G calculator.
*118 abandoned UNITS TOOLS (see menu #59; "TOOLS")
119 APPS CAS (APPS 11: "CAS")
120 S.SLV (S.SLV: "S.SLV")
121 EXP&LN (EXP&LN: "EXP&LN")
122 TRIG (TRIG: "TRIG")
123 CALC (CALC: "CALC")
124 ALG (ALG: "ALG")
125 ARITH (ARITH: "ARITH")
126 ARITH POLY (ARITH 2: "POLYNOMIAL")
127 ARITH INTEG (ARITH 1: "INTEGER")
128 ARITH MODUL (ARITH 3: "MODULAR")
129 MATRICES (MATRICES: "MATRICES")
130 CMPLX (CMPLX: "COMPLEX")
131 CONVERT (CONVERT: "CONVERT")
132 RS&NUM.SLV (NUM.SLV: "NUM.SLV")*133 soft-menu TVM (133 DUP MENU MENU LS&PREV: "FINANCE")
134 SYMB ARITH (SYMB 2: "SYMBOLIC ARITH")*135 abandoned SYMB CONV ("SYMBOLIC CONV")*136 abandoned SYMB DIFF or SYMB CALC ("SYMBOLIC CALC")*137 abandoned SYMB MATRX ("SYMBOLIC MAT")*138 abandoned SYMB MOD ("SYMBOLIC MOD")
139 SYMB TRIG (SYMB 6: "SYMBOLIC TRIG")
140 CONVERT TRIG (CONVERT 3: "TRIG CONVERT")*141 abandoned SYMB UNARY ("SYMBOLIC UNARY")*142 abandoned SYMB BASE (meaning basic, not binary; "SYMBOLIC BASE")
143 SYMB (SYMB: "SYMBOLIC")*144 abandoned PRG (the MODES menu is missing; "PROG")*145 abandoned PRG BRCH (like PRG BRCH but flat; "BRANCH")
146 MATRICES CREAT (MATRICES 1: "MATRIX CREATE")*147 abandoned MATRICES NORM menu (a subset of MATRICES OPER; "MATRIX NORM")
148 MATRICES FACT (MATRICES 3: "MATRIX FACTOR.")*149 abandoned MATRICES COL ("CREATE COL")*150 abandoned MATRICES ROW ("CREATE ROW")
151 SYMB ALG (SYMB 1: "SYMBOLIC ALGEBRA")
152 SYMB CALC (SYMB 3: "SYMBOLIC CALC")
153 SYMB GRAPH (SYMB 4: "SYMBOLIC GRAPH")

H-4 The Menu-Number Table

154 SYMB SOLVE (SYMB 5: "SYMBOLIC SOLVER")
155 SYMB NXT EXPLN (SYMB 7: "SYMBOLIC EXP & LN")
156 MATRICES OPER (MATRICES 2: "MATRIX OPERATIONS")
157 MATRICES QUADF (MATRICES 4: "MATRIX QUAD. FORM")
158 MATRICES LIN-S (MATRICES 5: "MATRIX LINEAR SYS.")
159 MATRICES NXT EIGEN (MATRICES 7: "MATRIX EIGENVECT.")
160 MATRICES NXT VECT (MATRICES 8: "MATRIX VECTOR")
161 TRIG HYP (TRIG 1: "TRIG HYPERBOLIC")
162 CALC DERIV (CALC 1: "DERIV. & INTEG.")163 CALC LIMIT (CALC 2: "LIMITS & SERIES")
164 CALC DIFF (CALC 3: "DIFFERENTIAL EQNS")
165 MATRICES CREAT COL (MATRICES 1 1: "CREATE COL")
166 MATRICES CREAT ROW (MATRICES 1 2: "CREATE ROW")
167 APPS TIME TOOLS (APPS 5 4: "TIME")
168 CONVERT BASE (CONVERT 2: "BASE")
169 CONVERT BASE NXT LOGIC (CONVERT 2 3: "LOGIC")
170 CONVERT BASE NXT BIT (CONVERT 2 4: "BIT")
171 CONVERT BASE NXT BYTE (CONVERT 2 5: "BYTE")
172 CONVERT REWRITE (CONVERT 4: "REWRITE")
173 CONVERT MATRIX (CONVERT 5: "MATRIX CONVERT")
174 ARITH PERM (ARITH 4: "PERMUTATION")
175 MATRICES LINAP (MATRICES 6: "LINEAR APPL")
176 MTH SPECIAL (MTH 11: "SPECIAL FUNCTIONS")
177 CALC GRAPH (CALC 4: "SYMBOLIC GRAPH")

Menus 178 through 255

These menus do not exist and are available for future use by the operating system.

Built-In Library Menus

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)
Note: Stores mnemonics for development with library 256. Must be downloaded
and installed separately.
788 Library 788: Computer Algebra System, an improved version of the Erable library1792 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

The Menu-Number Table H-5

I
I. The Command Menu-Path Table
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.

“Keys” column:
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 thanPREV, etc. “[]” = optional.
!

key ALPHA-RS-2; MTH NXT PROBThis 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 withthe left-shift key held down, also called LS&MODE.

AMORT
79 MENU
This means that AMORT is not in any keyboard menu, but you can find it in numbered menu 79(type 79 MENU to go to that menu).
QUOT«POLYNOMIAL» NXT; ARITH POLY PREVThis means that QUOT is in the POLYNOMIAL menu, a special menu which is neither anumbered 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
Menu: The menu ID containing this command, accessible with the MENU command. If there are multiple,
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.
The Command Menu-Path Table I-1

Command!

Type Library
F 2-99

%

F

2-124

%CH
%T
'

F
F
F

*
*H
*W
+

A
C
C
A

/

A
A

2-126
2-125
1792-201792-21
2-71
2-189
2-190
2-68
2-69
2-70
2-72

;

C

2-388

<

F

2-235

=
==

A
F

2-59
2-233

>

F

2-236

?
ABCUV
ABS

F
C
F

788-137788-48
2-61

ACK

C

2-21

ACKALL

C

2-20

ACOS
ACOS2S

AC

2-88
788-37

ACOSH

A

2-91

Size Keys
2.5 key ALPHA-RS-2
MTH NXT PROB
2.5 key ALPHA-LS-1
MTH REAL
2.5 MTH REAL
2.5 MTH REAL
2.5 key 43.1
2.5
2.5
2.5
2.5

?

First
28C
28C

14
14

key 75.1
alias for SCALEH
alias for SCALEW
key 95.1

2.5 key 85.1
2.5 key 65.1
RS&NUM.SLV SYS
2.5 key RS&SPC
key ALPHA-LS-2
2.5 key 63.3
PRG TEST«TESTS»
2.5 key 62.3
2.5 PRG TEST«TESTS» NXT
2.5 key 64.3
PRG TEST«TESTS»
5.5 key ALPHA-RS-3
5.5 ARITH POLY
2.5 key 65.2
CMPLX
MATRICES OPER
MTH VECTR
MTH REAL NXT
MTH MATRX NORM
MTH NXT CMPLX«CMPLX»
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 key 54.2
5.5 TRIGCONVERT TRIG
«TRIGO»
2.5 MTH HYPTRIG HYP«HYPERBOLIC»

I-2 The Command Menu-Path Table

Menu
13
141
14

28C
28C
28C
-

28C
28C
28C
28C
28C
28C

78

1.05
32

28C

32

28C
28C

32

28C

126
4
7
14.02
20
130
147
156

H
H

1.05
1.05
28C

95

48SX

95

48SX

122
140
12
161

H

28C
1.05
28C

CommandADD

Type Library
C 171-92

Size Keys
5.5 MTH LIST

Menu
11
2219.16128

ADDTMOD

F

788-110

5.5 ARITH MODUL«MODULAR»
5.5 CAT5.5 «MAIN»
2.5 key 61.2: 10^x
5.5 RS&NUM.SLV TVM

ADDTOREAL
ALGB
ALOG
AMORT

C
C
A
C

222-0
788-1282-96
171-75

AND

F

2-229

ANIMATEC

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
ASIN2CC
C
C
A
C

788-133
256-342-171
2-87
788-36

ASIN2TC

788-35

ASINH

A

2-90

ASM
ASM→
ASN

C
C
C

256-30256-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
5.5 256.06 MENU
2.5 CAT
2.5 key 53.2
5.5 TRIGCONVERT TRIG
«TRIGO»
5.5 TRIGCONVERT TRIG
«TRIGO»
2.5 MTH HYPTRIG HYP«HYPERBOLIC»
5.5 256.06 MENU
5.5 256.05 MENU
2.5 LS&MODE KEYS
PRG NXT MODES KEYS
2.5 [MTH/CONVERT] BASE NXT BIT

ASSUME
ATAN

F
A

222-382-89

5.5 «TESTS»
2.5 key 55.2

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
5.5 256.04 MENU
2.5 93.02 MENU

?

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.06256.05
67

1.16
1.05
48SX

17
170

28C
H

1.20
28C

The Command Menu-Path Table I-3

Command
ATAN2SType Library
C 788-34

ATANH

A

2-92

ATICK

C

171-16Size Keys
5.5 TRIGCONVERT TRIG
«TRIGO»
2.5 MTH HYPTRIG HYP«HYPERBOLIC»
5.5 83.02 MENUATTACHAUGMENT
AUTO
AXES
AXL

C
C
C
C
C

2-358
222-192-192
2-186
788-74

2.5
5.5
2.5
2.5
5.5

AXM

C

788-73

5.5

AXQ

C

788-76

5.5

A→
A→H
BAR
BARPLOT
BASIS
BAUD
BEEP
BESTFIT

C
C
C
C
C
C
C
C

256-3
256-4
2-227
2-316
222-17
2-371
2-52
2-323

5.5
5.5
2.5
2.5
5.5
2.5
2.5
2.5

BIN

C

2-144

2.5 [MTH/CONVERT] BASE

BINS
BLANK
BOX
BUFLENBYTES
BetaTesting
B→R

C
C
C
C
C
C
C

2-315
2-209
2-208
2-375
2-38
256-25
2-10

2.5
2.5
2.5
2.5
2.5
5.5
2.5

100 MENU
PRG NXT GROB
PRG NXT PICT
109 MENU
PRG MEM
256.05 MENU
[MTH/CONVERT] BASE

C2P
CASCFG
CASCMD
CASE

C
C
C
C

222-30788-126
222-51
1792-25

5.5
5.5
5.5
2.5

ARITH PERM
«MAIN»TOOL NXT
PRG BRCH CASE

CD→
CEIL
CENTR

C
F
C

256-7
2-104
2-187

5.5 256.02 MENU
2.5 MTH REAL NXT NXT
2.5 83.02 MENU

I-4 The Command Menu-Path Table

110 MENU
MATRICES CREAT
81.02 MENU
83.02 MENUCONVERT MATRX
MATRICES OPER
«MATR»
MATRICES OPER
«MATR»
CONVERT MATRIXMATRICES QUADF«MATR» NXT
256 MENU
256 MENU
88 MENU
101 MENU
MATRICES NXT VECT
106 MENU
PRG NXT OUT NXT
90/99 MENU

Menu
122
140

? FirstH 1.05

12
161

28C

83.02
2219.03
110
146
81.02
83.02
135
156
173
135
156
157
173

48GX

256
256
88
101
160
106
40.02
90
99
15
168
100
37
38
109
70
256.05
15
168
174

25
145.03256.02
14.03
83.02

48SX
1.20
48SX
28C
H 1.05

H

H

1.05

H

1.05

1.05
1.05
48SX
48SX
H 1.20
48SX
28C
48SX
28C
48SX
48SX
48SX
48SX
48SX
1.05
28C
H
H

1.20
1.05
1.20
48SX
1.05
28C
28C

CommandCF

Type Library
C 2-132

Size Keys
2.5 LS&MODE FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
5.5 ARITH POLY
5.5 MATRICES QUADF
5.5 PRG NXT IN

CHINREMCHOLESKYCHOOSE

CC
C

788-58222-11
171-77

CHR

C

2-165

CIRC
CKSM
CLEAR
CLKADJ

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

COLCTCOLLECTC
F

2-333
222-48

COLΣ
COL→

C
C

2-312
171-57

2.5 93 MENU
5.5 ALG«ALGB»
2.5 CAT
5.5 MTH MATRX COL
MATRICES CREAT COL

COMB
COMP→
CON

F
C
C

2-129
256-132-173

2.5 RS&CHARSPRG TYPE NXT
PRG NXT CHARS
5.5 ARITH PERM
2.5 106 MENU
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 104.02 MENU
2.5 alias for CLVAR
2.5 CAT
2.5 91/97 MENU
5.5 «MATHS»«MAIN» NXT
2.5 MATRICES OPER
MTH MATRX NORM

2.5 MTH NXT PROB
5.5 256.03 MENU
2.5 MATRICES CREAT
MTH MATRX MAKE

Menu
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.0340
104.02
-

28C
48SX
28C
48SX
28C

H

1.05

91
97
7
147
156
9
149
165
2219.119149
1652219.11
93
124
9
149
165
2219.113
256.03
6
146

1.20
48SX
28C
48SX

28C
48GX

48GX

H

28C
1.20
28C
48GX

28S
1.05
28C

The Command Menu-Path Table I-5

CommandCOND

Type Library
C 171-38

Size Keys
5.5 MATRICES OPER
MTH MATRX NORM

CONIC
CONJ

C
F

2-221
2-62

2.5 82 MENU
2.5 CMPLX
MTH NXT CMPLX NXT«CMPLX»
5.5 APPS 3
APPS 12 COLIB
115 MENU
5.5 APPS 12 COLIB
115 MENU
5.5 «MATHS»
2.5 key 101.02
2.5 [CONVERT] UNITS TOOLSCONLIB

C

171-24

CONST

C

171-25

CONSTANTS
CONTCONVERT

C
C
C

222-42
2-58
2-11

CORR
COS
COSH

C
A
A

2-289
2-82
2-85

COV
CR
CRC
CRDIR
CRLIB
CROSS

C
C
C
C
C
C

2-290
2-243
256-272-32
256-26
2-122

CSWP

C

171-65

5.5 MTH MATRX COL
MATRICES CREAT COL

CURL

C

788-87

5.5 CALC DERIVCYCLOTOMIC
CYLIN

F
C

222-21
171-18

C→PX
C→R

C
C

2-199
2-159

DARCY

F

171-97

DATE

C

2-17

5.5 ARITH POLY
5.5 LS&MODE ANGLE
MTH VECTR NXT
PRG NXT MODES ANGLE
2.5 PRG NXT PICT NXT
2.5 PRG TYPE NXT
MTH NXT CMPLX
5.5 APPS 12 UTILS
117 MENU
2.5 RS&TIME
PRG NXT NXT TIME
APPS 5 4

2.5 102 MENU
2.5 key 54.1
2.5 MTH HYPTRIG HYP«HYPERBOLIC»
2.5 102 MENU
2.5 107 MENU
5.5 256.05 MENU
2.5 PRG MEM DIR
5.5 256.05 MENU
2.5 MTH VECTRMATRICES NXT VECT

I-6 The Command Menu-Path Table

Menu
7
147
156
2219.07
82
20.02
130

?

First
48GX

48SX
28C

115
2219.0548GX

1152219.05

48GX
H

59
118
102
12
161

1.20
48SX
28C
28C
28C
28C

102
28C
107
28C
256.05
1.16
71
28S
256.05
1.05
4
28C
137
160
9
48GX
149
165
2219.11136
H 1.05162
126
H 1.204.02
48GX
652219.04
38.02
48SX
20
28C
33.02
117
48GX
2219.17
94
48SX
167

CommandDATE+

Type Library
C 2-31Size Keys
2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
5.5 CAT

DBUG

C

221-21

DDAYS

C

2-30

DEC

C

2-145

2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
2.5 [MTH/CONVERT] BASE

DECR
DEDICACE
DEF
DEFINE

C
C
F
C

2-332
222-55222-37
2-343

2.5
5.5
5.5
2.5

DEG

C

2-135

2.5

DEGREEDELALARM

FC

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

DETACHDIAGMAP
DIAG→

C
C
C

2-359
222-12
171-592.5 110 MENU
5.5 MATRICES NXT EIGEN
5.5 MATRICES CREAT NXT
MTH MATRX NXT
MTH MATRX MAKE NXT NXT

DIFF
DIFFEQCC

788-132
171-145.5 «MAIN»
5.5 82 MENUPRG MEM ARITH
CAT«ALGB»
key 93.2
SYMB GRAPH
CALC GRAPH
LS&MODE ANGLE
PRG NXT MODES ANGLECAT
RS&TIME ALRM
PRG NXT NXT TIME ALRM
108 MENU
LS&MODE KEYS
PRG NXT MODES KEYS
83 MENU
PRG/TOOL STACK NXTSYMB CALCCALC DERIV«DIFF»CALCSYMB CALCCALC DERIV«DIFF»S.SLVCALC DIFF«SOLVER»MATRICES OPER
MTH MATRX NORM NXT

Menu
94.02
167.02?

412269.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
H

95

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.022219.1

48SX
28C
H 1.05
H

1.05

H

1.05
28C

48SX
H 1.2048GX

H
82
2219-03

1.05
48GX

The Command Menu-Path Table I-7

CommandDIR
DISP
DISPXY
DISTRIBType Library
C 1792-27
C 2-50C 221-22
F 222-25

DIVC

788-86Size Keys
2.5 CAT
2.5 PRG NXT OUT
5.5 CAT
5.5 CONVERT REWRITE«REWRITE»
5.5 CALC DERIV

DIV2
DIV2MOD

CC

788-38788-114

5.5 ARITH POLY
5.5 ARITH MODUL

DIVIS

C

788-68DIVMODF

788-113

DIVPCF

788-98DOC

1792-7

5.5 ARITH
SYMB ARITH«INTEGER»
5.5 ARITH MODUL«MODULAR»
5.5 CALC LIMIT«DIFF»
2.5 PRG BRCH [DO]DOERR
DOLISTCC

2-42
171-91

2.5 PRG NXT NXT ERROR
5.5 PRG LIST PROCDOMAIN
DOSUBSCC

222-33
171-84

5.5 CAT
5.5 PRG LIST PROC

DOT

C

2-121

2.5 MTH VECTRMATRICES NXT VECTDRAWDRAW3DMATRIXDRAXDROITE
DROP

C
C
C
F
C

2-191
171-1072-193
222-35
2-272

2.5
5.5
2.5
5.5
2.5

DROP2
DROPN
DTAG
DUP

C
C
C
C

2-273
2-277
2-385
2-269

2.5
2.5
2.5
2.5

DUP2
DUPDUP
DUPN
D→R
EDIT

C
C
C
F
C

2-270
2-398
2-278
2-112
221-7

2.5
2.5
2.5
2.5
5.5

EDITB

C

221-9

5.5

I-8 The Command Menu-Path Table

81 MENUCAT
81 MENU«CMPLX»
PRG/TOOL STACK
backspace key when not editing
PRG/TOOL STACK NXT NXT
PRG/TOOL STACK NXT NXT
PRG TYPE NXT
PRG/TOOL STACKENTER key when not editing
PRG/TOOL STACK NXT NXT
PRG/TOOL STACK NXT NXT
PRG/TOOL STACK NXT NXT
MTH REAL NXT NXT
key LS-downarrow
TOOL LS-EDIT
key downarrow
TOOL

Menu

?

First
48SX
40
28C
2269.041.20
172
H 1.20
136
162
126
128
138
125
134

H

1.05

H
H

1.05
1.05

H

1.05

128
H 1.05138
136
H 1.05163
29
28C
145.02
61
48SX
36
48GX
2219.16
H 1.2036
48GX2219.15
4
28C
137
160
81
28C
2219.18 H 1.05
81
28C
H 1.20
73
28C
73.03
73.03
33.02
73

28C
28C
48SX
28C

73.03
73.03
73.03
14.03
2269.02

28C
1.05
28C
28C
1.05

2269.02

1.05

Command
EGCD

Type Library
C 788-46

Size Keys
5.5 ARITH POLY
«POLYNOMIAL»
5.5 MATRICES NXT EIGEN
MTH MATRX NXT

EGVC

171-44

EGVL

C

171-45

5.5 MATRICES NXT EIGEN
MTH MATRX NXT

ELSE

C

1792-2

2.5 PRG BRCH IF
PRG NXT NXT ERROR IFERR

END

C

1792-23
1792-31792-22

2.5 PRG BRCH IF/CASE/DO/WHILE
PRG NXT NXT ERROR IFERRENDSUB

F

171-87

5.5 PRG LIST PROC

ENG

C

2-140

EPSX0
EQNLIBCC

788-136
227-0

EQW

C

221-11

EQ→
ER

C
C

2-168
256-31

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&LNEXP2HYP
EXP2POWC
F
F

788-135
222-62222-26

2.5 LS&MODE FMT
PRG NXT MODES FMT
5.5 «REWRITE»
5.5 APPS 12 EQLIB
114 MENU
5.5 CAT (not the same as the EQW key)
key 43.3
2.5 PRG TYPE NXT
5.5 257 MENU
256.06 MENU
2.5 81 MENU
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 EQWin FILER
142 MENU
5.5 108 DUP MENUXY
2.5 key 51.2: e^x
141 MENU
5.5 «MAIN» NXT
5.5 CAT
5.5 CONVERT REWRITE«REWRITE»

Menu
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

2275

H

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

The Command Menu-Path Table I-9

Command
EXPAN

Type Library
C 2-334

Size Keys
2.5 93/142 MENUEXPANDC

788-0

5.5 ALGSYMB ALG«ALGB»
5.5 ARITH MODUL«MODULAR»
2.5 90/99 MENUEXPANDMOD

F

788-118

EXPFIT

C

2-321

EXPLN

C

788-23

EXPM

A

2-98

EYEPT

C

171-5

5.5 86.02 MENU

F0λF

171-98FACTFACTOR

F
C

2-100
788-1

FACTORMOD

F

788-119

FACTORSFANNINGCF

788-67
171-96

FAST3D
FC?

C
C

2-400
2-134

FC?C

C

2-143

FCOEF

C

788-65FDISTRIBF

222-24FFT

C

171-26

5.5 APPS 12 UTILS
117 MENU
2.5 CAT
5.5 ALGSYMB ALG
ARITH POLY
«ALGB»«INTEGER»«POLYNOMIAL»
in EQW
5.5 ARITH MODUL«MODULAR»
5.5 ARITH
5.5 APPS 12 UTILS
117 MENU
2.5 CAT
2.5 LS&MODE FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
2.5 LS&MODE FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
5.5 ARITH POLY NXT«SOLVER»
5.5 CONVERT REWRITE«REWRITE»
5.5 MTH NXT FFT

FILER

C

221-12

5.5 EXP&LN
CONVERT REWRITESYMB NXT EXPLN«EXP&LN»«REWRITE»
2.5 EXP&LN
MTH HYP NXT

5.5 key 21.2
CAT

I-10 The Command Menu-Path Table

Menu
93
142
124
142
151
128
138
90
99
121
135
155
172

?

First
28C

H

1.05

H

1.05
48SX

H

12.02
121
141
86.02
2219
117
2219.17
124
126
142
151

1.05

28C
48GX
48GX
48GX
H 1.05128
H 1.05138
125
H 1.05
117
48GX
2219.17
1.05
32.03
28C
66
32.03
66

28C

126.02

H

1.05

172

H

1.20

19
2219.052269.03

48GX
1.05

CommandFINDALARM

Type Library
C 2-27FINISH
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-15221-14221-13221-31792-10

FOURIER

F

788-94FP
FREE
FREEZEFROOTS

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-77GBASIS
GCD

C
F

222-58788-44GCDMODF

788-117

GET

C

2-178

GETI

C

2-179

GOR
GRAD

C
C

2-211
2-137

GRAMSCHMIDT

C

222-9

Size Keys
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 105 MENU
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 FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
2.5 LS&MODE FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
2.5 82 MENU
5.5 107 DUP MENUXY
5.5 MTH NXT SPECIAL
5.5 MATRICES QUADF«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

Menu
95

?

First
48SX

105
64

48SX
28C

2219.04
14.03

1.05
28C

2269.032269.032269.032269
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

48SX
H 1.05H 1.16
H 1.05126.02

H
H

1.20
1.05

128
138
6.02
35
146.026.02
35
146.02
37
65

H

1.05

160

H

28C
28C
48SX
48SX
1.20

The Command Menu-Path Table I-11

Command
GRAPH
GREDUCEGREYGRIDMAP

Type Library
C 2-200
C 222-59
C 1792-29
C 171-10

Size Keys
2.5 alias for PICTURE
5.5 CAT
2.5 must be typed in
5.5 85 MENUGROB
GROBADDC
C

1792-29788-124GXOR
HADAMARD

C
C

2-212
788-70HALFTANC

788-32

HALT
HEAD

C
C

1792-14171-81HEADER→HELP
HERMITE

C
C
F

221-5
222-50788-92HESSC

788-89

2.5 CAT
5.5 SYMB GRAPH
CALC GRAPH
2.5 PRG NXT GROB
5.5 MATRICES OPER NXT«MATR»
5.5 TRIGSYMB TRIGCONVERT TRIG
«TRIGO»
2.5 PRG NXT NXT RUN
5.5 RS&CHARS NXTPRG LIST ELEM NXT
PRG NXT CHARS NXT
5.5 CAT
5.5 TOOL NXT
5.5 ARITH POLY NXT«POLYNOMIAL»
5.5 CALC DERIV

HEX

C

2-146

2.5 [MTH/CONVERT] BASE

HILBERTC

788-84

5.5 MATRICES CREAT NXT
MTH MATRX MAKE NXT NXTHISTOGRAMHISTPLOT
HMS+

C
C
C

2-226
2-317
2-116

HMS-

C

2-117

HMS→

C

2-115

HOME
HORNER
HYPERBOLIC
H→
H→A
H→S
IABCUV

C
C
C
C
C
C
C

2-34
788-55222-43
256-1
256-5
256-9
788-49

2.5 88 MENU
2.5 101 MENU
2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
2.5 key LS&UPDIR
5.5 ARITH POLY NXT
5.5 «MATHS»
5.5 256 MENU
5.5 256 MENU
5.5 256.02 MENU
5.5 ARITH INTEG

I-12 The Command Menu-Path Table

Menu

85
2219.02
153
177
37
137
156.02122
139
140? First- 48SX
H 1.20- 1.20
48GX
48SX
H 1.05
H

48SX
1.05

H

1.05

41
35.02
62.02
2219.14
2269

28C
48GX

126.02

H

1.05
1.20
1.05

136.02
162
15
168
6.03
137.02146.0288
101
94.02
167.02

H

1.05
28C

H

1.05
48SX
48SX
28C

94.02
167.0228C

94.02
167.0228C

126.02256
256
256.02
127

H
H

H

28S
1.05
1.20
1.05
1.05
1.05
1.05

CommandIBASISIBERNOULLIIBPType Library
C 222-18
F 222-6
C 788-11

Size Keys
5.5 MATRICES NXT VECT
5.5 ARITH INTEG
5.5 SYMB CALCCALC DERIV NXT«DIFF»
5.5 ARITH INTEG
5.5 ARITH INTEG
2.5 MATRICES CREAT
MTH MATRX MAKE

ICHINREM
IDIV2
IDN

C
C
C

788-59788-39
2-174

IEGCD

C

788-47IFC

1792-05.5 SYMB ARITH
ARITH INTEG«INTEGER»
2.5 PRG BRCH [IF]

IFERR
IFFT

C
C

1792-13171-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-162-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
2.5 83 MENU
5.5 PRG NXT IN

INPUT
INT
INTEGER

C
F
C

2-379
2-386
222-41

INTVX

F

788-4

INV
INVMODAF

2-76
788-116

IP
IQUOT

F
F

2-101
788-41

2.5 PRG NXT IN
2.5 CAT5.5 «ARIT»«MATHS»
5.5 CALCSYMB CALCCALC 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»

Menu
160
127
136.02152
162.02127
127
6137.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.0323.02
28C
145.03136.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.20123
136.02152
162.02128.02
138
14.02
127.02
134

H

1.05

H

28C
1.05

H

28C
1.05

The Command Menu-Path Table I-13

Command
IREMAINDER

Type Library
F 788-43

ISOL

C

2-336

ISOM
ISPRIME?

CF

222-13788-60I→R
JORDANFC

2-390
788-80

KER
KERRM
KEY
KEYEVALKEYTIME→
KGET
KILL
LABEL
LAGRANGE

C
C
C
C
C
C
C
C
C

222-152-374
2-57
788-123
171-109
2-365
2-40
2-201
788-93LANGUAGE→
LAP

C
F

221-1
788-16

LAPL

C

788-88LASTLASTARG

C
C

2-54
2-54

LCD→
LCM

C
F

2-213
788-45LCXM

C

788-85

LC~C
LDEC

C
C

256-23788-18LEGENDRE

F

788-90LGCDLIBEVAL
LIBS
LIMIT

C
C
C
F

788-50171-222-357
788-5

Size Keys
5.5 SYMB ARITH
ARITH INTEG NXT«INTEGER» NXT
2.5 S.SLV«SOLVER»
5.5 MATRICES LINAP
5.5 SYMB ARITH
ARITH INTEG NXT«INTEGER» NXT
2.5 CONVERT REWRITE
5.5 MATRICES NXT EIGEN«MATR» NXT
5.5 MATRICES LINAP
2.5 104.02 MENU
2.5 PRG NXT IN
5.5 123 DUP MENUXY
5.5 CAT
2.5 105 MENU
2.5 PRG NXT NXT RUN
2.5 81.02 MENU
5.5 ARITH POLY NXT
5.5 CAT
5.5 CALC DIFF
«DIFF» NXT NXT
5.5 CALC DERIV NXT
2.5 alias for LASTARG
2.5 key 105.2 in RPL mode
PRG NXT NXT ERROR
2.5 PRG NXT GROB NXT
5.5 ARITH POLY NXT NXT«POLYNOMIAL»«INTEGER» NXT
5.5 137.02 MENU
85 DUP MENUXY
5.5 256.04 MENU
5.5 S.SLVSYMB SOLVECALC DIFF«SOLVER»
5.5 ARITH POLY NXT NXT«POLYNOMIAL»
5.5 ARITH NXT
5.5 CAT
2.5 110 MENU
5.5 alias for lim

I-14 The Command Menu-Path Table

Menu
127.02
134
93
120
175
127.02134172
137.02159
175
104.02
39

?
H

First
1.05
28C

H
H

1.20
1.05

H

1.05
1.05

H

1.20
48SX
28C
H 1.052219.19
1.05
105
48SX
41
28C
81.02
48SX
126.02 H 1.05
142
2269
1.05
136.02 H 1.05
164
136.02 H 1.05
164
- 28C
61
48SX
37.02
126.03

H

28S
1.05

137.02

H

1.05

H

1.05
1.05

H

1.05

256.04120
136.03154
164
126.03125.02 H 1.05
2219.04
48GX
110
48SX
- 1.05

Command
LIN

Type Library
C 788-20

LINE
LINFIT

C
C

2-206
2-319

Size Keys
5.5 ALG
EXP&LNSYMB ALGCONVERT REWRITESYMB NXT EXPLN«EXP&LN»«REWRITE»
2.5 PRG NXT PICT
2.5 90/99 MENU

Menu
121
124
135
151
155
172

LININ

F

171-21

5.5 PRG TEST PREVLINSOLVEC

788-82

LIST→
LN

C
A

2-158
2-94

LNAME
LNCOLLECTC
C

788-109788-22

LNP1

A

2-97

5.5 S.SLVSYMB SOLVE
MATRICES LIN-S«SOLVER»«MATR» NXT NXT
2.5 CAT
2.5 key 51.3
141 MENU
5.5 109 DUP MENUXY
5.5 ALG
EXP&LNSYMB NXT EXPLNCONVERT REWRITE NXT«EXP&LN»«REWRITE»
2.5 EXP&LN
MTH HYP NXT

LOCAL
LOG

C
A

222-602-95

LOGFIT

C

2-320

LQ

C

171-50

5.5 MATRICES FACTMTH MATRX FACTR

LR
LR~R
LSQ

C
C
C

2-302
256-21
171-43

2.5 102 MENU
5.5 256.04 MENU
5.5 MTH MATRX
RS&NUM.SLV SYS
MATRICES OPER NXT

LU

C

171-485.5 MATRICES FACTMTH MATRX FACTR

LVAR

C

788-106

5.5 106 DUP MENUXY

5.5 CAT
2.5 key 61.3
141.02 MENU
2.5 90/99 MENU

?
H

First
1.05

38
48SX
90
48SX
99
32.04
48GX
2219.04120
H 1.05137.02
154
158
28C
28C

141
121
124
155
172.02

H
H

12.02
121
141

1.05
1.05

28C
H

141.029099
81482219.09102
256.045
78
156.022219.088
137.02148
2219.09

1.20
28C
48SX
48GX
28C
1.05
48GX

48GX

H

1.05

The Command Menu-Path Table I-15

CommandMAD

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-127256-282-111
788-102222-47788-131
2-106
2-64
2-296
171-118

MEAN
MEM
MENU

C
C
C

2-297
2-345
2-349

MENUXY
MERGE
MIN
MINEHUNT

C
C
F
C

788-122
2-355
2-107
227-3

MINIFONT→
MINIT

C
C

221-18171-115

MINR
MINΣ
MITM

F
C
C

2-65
2-298
171-116MKISOM
MOD

C
F

222-14
2-110

MODSTOC

788-121

MODULARC

222-44

MOLWT
MROOT

F
C

229-2
171-119

MSGBOXC

171-78MSLV

C

222-32MSOLVRC

171-114MSOLVR2C

227-2

Size Keys
5.5 MATRICES OPER NXT«MATR» NXT NXT
5.5 «ARIT», «CONSTANTS»
5.5 256.05 MENU
2.5 MTH REAL NXT
5.5 102 DUP MENUXY
5.5 «MAIN»
5.5 «MAIN» NXT
2.5 MTH REAL
2.5 MTH NXT CONST NXT
2.5 100 MENU
5.5 APPS 12 MES
116 MENU
2.5 100 MENU
2.5 PRG MEM
2.5 LS&MODE MENUPRG NXT MODES MENU
5.5 788.21 MENU
2.5 CAT – do not use
2.5 MTH REAL
5.5 APPS 12 UTILS
117 MENU
5.5 CAT
5.5 APPS 12 MES
116 MENU
2.5 MTH NXT CONST NXT
2.5 100 MENU
5.5 APPS 12 MES
116 MENU
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
116 MENU
5.5 PRG NXT OUT
5.5 NUM.SLV 6
132 MENU
5.5 APPS 12 EQLIB/MES
114/116 MENU
5.5 CAT

I-16 The Command Menu-Path Table

Menu
137.02156.02

?
H

First
1.05

H

256.05
14.02

14
21.02
100
116
2219.2100
70
68788.21

1.05
1.16
28C
H 1.05H 1.20H 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.2175
H 1.2014
28C
128.02128.02138.02

H

1.05

H

1.20
2.15
48GX

116
2219.240
48GX
2219.14132
H 1.20116
2219.2
2275

48GX
2.00

CommandMULTMOD

Type Library
F 788-112

Size Keys
5.5 ARITH MODUL NXT«MODULAR» NXT
5.5 APPS 12 MES
116 MENU
5.5 MTH NXT PROB NXT
2.5 PRG/TOOL STACK PREV
2.5 key 62.1: +/CMPLX
MTH NXT CMPLX NXT«CMPLX» NXT
2.5 PRG MEM
2.5 PRG BRCH START/FOR

MUSER

C

171-117

NDIST
NDUPN
NEG

C
C
A

171-28
2-399
2-60

NEWOB
NEXT

C
C

2-39
1792-11

NEXTPRIMEF

788-61

NIP
NOT

C
F

2-396
2-231

NOVAL
NSUB

C
F

2-391
171-86

NUM

C

2-164

NUMX

C

171-6

2.5 RS&CHARSPRG TYPE NXT
PRG NXT CHARS
5.5 86.02 MENU

NUMY

C

171-7

5.5 86.02 MENU

NΣ
OBJ→

C
C

2-288
2-169

OCT

C

2-147

2.5 103 MENU
2.5 PRG TYPE
PRG LIST
RS&CHARS NXTPRG NXT CHARS NXT
2.5 [MTH/CONVERT] BASE

OFF
OLDPRTOPENIO
OR

C
C
C
F

2-41
2-239
2-362
2-230

2.5
2.5
2.5
2.5

ORDER
OVER
P2C
PA2B2
PARAMETRICPARITY

C
C
C
F
C
C

2-346
2-275
222-31
788-57
241-3
2-372

2.5
2.5
5.5
5.5
2.5
2.5

5.5 ARITH INTEG NXT«INTEGER» NXT
2.5 PRG/TOOL STACK NXT NXT
2.5 PRG TEST NXT[MTH/CONVERT] BASE NXT LOGIC«TESTS» NXT
2.5 PRG NXT IN
5.5 PRG LIST PROC

PRG NXT NXT RUN NXT
108 MENU
109 MENU
PRG TEST NXT[MTH/CONVERT] BASE NXT LOGIC«TESTS» NXT
PRG MEM DIR NXT
PRG/TOOL STACK
ARITH PERM
ARITH INTEG NXT
82 MENU
106 MENU

Menu? First128.02 H 1.05
138.02
116
48GX
2219.22219.05
48GX
73.04
1.05
20.02
28C
130
70
26
27
145.02127.02
73.03
16
32.02
169
39
36
2219.15
33.02
62

48SX
28C
H

1.05
1.05
28C
48GX
48GX
28C

86.02
2219.0286.02
2219.02
103
33
34
62.02

48GX

15
168
41.02
108
109
16
32.02
169
71.02
73
174
127.02
82
106

28C

48GX
28C
48SX

48SX
48SX
48SX
28C
28C
28C
H 1.20H 1.0548SX
48SX

The Command Menu-Path Table I-17

Command
PARSURFACE

Type Library
C 171-9Size Keys
5.5 85 MENU

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-69PCONTOUR

C

171-13

5.5 85 MENU

PCOV

C

171-31

5.5 102.02 MENU

PDIM
PEEK
PEEKARMPERINFOPERMPERTBL
PEVAL

C
C
C
C
F
C
C

2-195
256-17256-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 PICTCAT
key leftarrow when not editing
5.5 110 MENUPIX?
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

PLOTADDC

788-10

5.5

PMAX
PMIN
PMINI
POKE
POKEARMPOLAR
POLYNOMIAL

C
C
C
C
C
C
C

2-185
2-184
222-20256-16256-35
2-222
222-45

2.5
2.5
5.5
5.5
5.5
2.5
5.5

I-18 The Command Menu-Path Table

PRG NXT PICT
256.03 MENU
256.07 MENUAPPS 13
MTH NXT PROBAPPS 13
RS&NUM.SLV POLY

PRG NXT PICT NXT
PRG NXT PICT NXT
PRG NXT PICT NXT
105 MENUSYMB GRAPH
CALC GRAPHSYMB GRAPH
CALC GRAPHCAT
CAT
MATRICES NXT EIGEN
256.03 MENU
256.06 MENU
82 MENU«ARIT»«MATHS»

Menu? First85
48GX
2219.02124
H 1.05126.0371
28S
137.03 H 1.05
159
77
48GX
126.032219.1285
48GX
2219.03102.0248GX2219.06
38
48SX
256.031.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

159
256.03256.06
82

48GX
48SX
48SX
48SX
48SX
1.05
1.05

28C
28C
H 1.20
1.05
2.00
48SX
H 1.20CommandPOP
POSType Library
C 222-53
C 2-161

POTENTIAL
POWEXPAND

C
F

222-56222-27POWMODF

788-115

PR1

C

2-240

Size Keys
5.5 CAT
2.5 RS&CHARSPRG LIST ELEMPRG NXT CHARS
5.5 CAT
5.5 CONVERT REWRITE NXT«REWRITE»
5.5 ARITH MODUL NXT«MODULAR» NXT
2.5 104/107 MENU

PREDV
PREDX
PREDY
PREVAL

C
C
C
F

2-303
2-305
2-304
788-12

2.5
2.5
2.5
5.5

PREVPRIMEF

788-62

5.5

PRLCD
PROMPT
PROMPTSTO
PROOT

C
C
C
C

2-246
1792-28788-139
171-68

2.5
2.5
5.5
5.5

PROPFRAC

C

788-53

PRST
PRSTC
PRVAR
PSDEV

C
C
C
C

2-242
2-241
2-244
171-295.5 SYMB ARITH
ARITH NXT«POLYNOMIAL» NXT
2.5 107 MENU
2.5 107 MENU
2.5 107 MENU
5.5 100.02 MENU

PSI
PTAYL

F
F

222-4
788-54

PTPROP
PURGE

F
C

229-1
2-344

PUSH
PUT

C
C

222-52
2-176

PUTI

C

2-177

PVAR

C

171-30

5.5 MTH NXT SPECIAL
5.5 ARITH POLY NXT NXT«POLYNOMIAL» NXT
5.5 APPS 13
2.5 TOOLPRG MEM
PRG MEM DIR
5.5 CAT
2.5 PRG LIST ELEM
MATRICES CREAT NXT
MTH MATRX MAKE NXT
2.5 PRG LIST ELEM
MATRICES CREAT NXT
MTH MATRX MAKE NXT
5.5 100.02 MENU

PVARS

C

2-351

2.5 110 MENUCAT
102 MENU
102 MENU
CALC DERIV NXT«DIFF» NXT
ARITH INTEG NXT«INTEGER» NXT
107 MENU (hotkey: ON+uparrow)
PRG NXT IN NXT
139 DUP MENUXY
RS&NUM.SLV POLY
ARITH POLY NXT NXT

Menu

?
H

First
1.20
28C

H
H

1.20
1.20

H

1.05

35
62
172.02128.02138.02104
107.02102
102
136.03162.02127.02
107
39.02

28C
28C
48SX
48SX
H 1.05
H

1.05

28C
48SX
H 1.0548GX

77126.032219.12125.02 H
134

1.05

107
28C
107
28C
107
28C
100.0248GX2219.05176
H 1.16126.03 H 1.05
2.15
28C

70
71
H
6.02
35
146.026.02
35
146.02100.022219.06
110

1.20
28C
28C
48GX
48SX

The Command Menu-Path Table I-19

CommandPVIEW

Type Library
C 2-202

Size Keys
2.5 PRG NXT OUT
PRG NXT PICT NXT
2.5 90/99 MENUPWRFIT

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 FACTMTH MATRX FACTR

QUAD
QUOT

C
F

2-337
788-40

QUOTE

F

2-257

QXA

C

788-75

RAD

C

2-136

RAND
RANK

C
C

2-127
171-42

2.5 93 MENU
5.5 ARITH POLY PREV«POLYNOMIAL» NXT
2.5 «ALGB»
93.03 MENU
5.5 MATRICES QUADFCONVERT 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

RCLKEYSC

2-383

RCLMENU

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 NXTPRG NXT MODES FLAG NXT
2.5 LS&MODE KEYS
PRG NXT MODES KEYS
2.5 LS&MODE MENUPRG NXT MODES MENU
5.5 CAT

I-20 The Command Menu-Path Table

Menu
38.02
40
90
99
38.02

?

First
48SX
48SX

48SX
H 1.1648GX

81482219.0993
126.04 H

28C
1.05

93.03

48SX

157
173

H

1.05

65

28C

13
7.02
147
156.022219.086
146.032219.09

28C
48GX

48GX
48SX
28C
48GX

75
10
150
166
2219.1210150
1662219.12
71

48GX

28C

95

48SX

66.02

28C

67

48SX

68

48SX
H

1.20

CommandRCLΣType Library
C 2-286

Size Keys
2.5 91/97 MENU RS-ΣDAT

RCWS

C

2-149

2.5 [MTH/CONVERT] BASE NXT

RDM

C

2-172

RDZ
RE

C
F

2-128
2-154

RECN
RECT

C
C

2-366
171-17

RECV
REF

C
C

2-367
788-72

REMAINDER

F

788-42

RENAMEREORDERREPEATC
F
C

221-19788-105
1792-6

2.5 MTH MATRX MAKE
MATRICES CREAT NXT NXT
2.5 MTH NXT PROB
2.5 CMPLX NXTMTH NXT CMPLX«CMPLX» NXT
2.5 104.02 MENU
5.5 LS&MODE ANGLE
MTH VECTR NXT
PRG NXT MODES ANGLE
2.5 104 MENU
5.5 MATRICES LIN-S«MATR»
5.5 ARITH POLY PREV«POLYNOMIAL» NXT
5.5 CAT
5.5 105 DUP MENUXY
2.5 PRG BRCH WHILE

REPL

C

2-157

RES
RESTORERESULTANTREVLIST

C
C
F
C

2-188
2-354
222-5
171-93REWRITE
RISCH

C
F

222-40788-13

RKF

C

171-32

5.5 «MAIN» NXT
5.5 CALC DERIV NXT«DIFF» NXT
5.5 RS&NUM.SLV DIFFEQRKFERRC

171-34

5.5 RS&NUM.SLV DIFFEQRKFSTEPC

171-33

5.5 RS&NUM.SLV DIFFEQ

RL

C

2-1

2.5 [MTH/CONVERT] BASE NXT BIT

RLB

C

2-2

2.5 [MTH/CONVERT] BASE NXT BYTE

RND

F

2-108

2.5 MTH REAL NXT NXT

2.5 RS&CHARSPRG LISTPRG NXT GROB
PRG NXT CHARS
MTH MATRX MAKE NXT
MATRICES CREAT NXT NXT
2.5 83 MENU
2.5 PRG MEM NXT
5.5 ARITH POLY PREV
5.5 MTH LIST
PRG LIST PROC

Menu
? First
91
28C
97
15.02
28C
168.02
628C
146.03
13
28C
20
28C
130.02141.02104.02
48SX
4.02
48GX
65
2219.03
104
48SX
137.03 H 1.05
158
126.04 H 1.05
2269.04H
31
145.02
6.02
34
37
62
146.03

1.05
1.05
28C
48SX

83
48GX
70.02
48SX
126.04 H 1.16
11
48GX
36
2219.16
H 1.20136.03 H 1.05
162.02
76
48GX
2219.06
76
48GX
2219.06
76
48GX
2219.06
17
28C
170
18
28C
171
14.03
28C

The Command Menu-Path Table I-21

CommandRNRM

Type Library
C 2-118

Size Keys
2.5 MTH MATRX NORM
MATRICES OPER NXT

ROLL
ROLLD
ROMUPLOAD
ROOT
ROT
ROW+

C
C
C
C
C
C

2-280
2-281
171-1112-251
2-274
171-61

2.5
2.5
5.5
2.5
2.5
5.5

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

CC

788-120
171-35

5.5 120 DUP MENUXY
5.5 RS&NUM.SLV DIFFEQRRKSTEPC

171-36

5.5 RS&NUM.SLV DIFFEQRSBERRC

171-37

5.5 RS&NUM.SLV DIFFEQ

RSD

C

2-123

RSWP

C

171-64

2.5 MTH MATRX NXT
RS&NUM.SLV SYS
MATRICES OPER NXT
5.5 MTH MATRX ROW NXT
MATRICES CREAT ROW NXT

RULES
R~SB
R→B

C
C
C

2-335
256-192-9

2.5 CAT
5.5 256.04 MENU
2.5 [MTH/CONVERT] BASE

R→C

C

2-153

R→D

F

2-113

2.5 PRG TYPE NXT
MTH NXT CMPLX
2.5 MTH REAL NXT NXT

I-22 The Command Menu-Path Table

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

Menu
7
147
156.0273.02
73.02
2219.19
75
73
10
150
166
2219.1110150
1662219.1110150
1662219.1

?

28C
28C
1.16
28C
28C
48GX

48GX

48GX

1.05
28C

17
170
18
171
8
158
2219.09

28C
48GX
H

76
2219.0676
2219.0776
2219.07
5.02
78
156.0210.02
150.02166.022219.11256.04
15
168
20
33.02
14.03

First
28C

1.05
48GX
48GX
48GX
28C
48GX

48SX
1.05
28C
28C
28C

Command
R→I
SAME
SBRK
SB~B
SCALE
SCALEHSCALEWSCATRPLOTSCATTER
SCHUR

Type Library
F 2-389
C 2-228
C 2-377
C 256-20
C 2-194
C 2-189
C 2-190
C 2-318
C 2-225
C 171-51

SCI

C

2-139

SCLΣ
SCONJ
SCROLL

C
C
C

2-313
2-326
788-125

SDEV
SEND
SEQ

C
C
C

2-299
2-364
171-83SERIALSERIESCC

256-29788-7

SERVER
SEVAL
SF

C
F
C

2-369
788-100
2-131

SHOW
SIDENS

CF

2-338
171-99SIGMA
SIGMAVX
SIGN

F
F
F

222-2
222-1
2-78

SIGNTABC

788-95SIMP2SIMPLIFYC
F

788-51
222-34Size Keys
2.5 CONVERT REWRITE NXT NXT
2.5 PRG TEST NXT
2.5 109 MENU
5.5 256.04 MENU
2.5 83.02 MENU
2.5 83.02 MENU
2.5 83.02 MENU
2.5 101 MENU
2.5 88 MENU
5.5 MATRICES FACTMTH MATRX FACTR
2.5 LS&MODE FMT
PRG NXT MODES FMT
2.5 CAT
2.5 PRG MEM ARITH NXT
5.5 TOOL VIEW is the same as SCROLL DROP
125 DUP MENUXY
2.5 100 MENU
2.5 104 MENU
5.5 PRG LIST PROC NXT
5.5 256.05 MENU
5.5 SYMB CALCCALC LIMIT«DIFF» NXT
2.5 105 MENU
5.5 100 DUP MENUXY
2.5 LS&MODE FLAGPRG TEST NXT NXT
PRG NXT MODES FLAG
2.5 93 MENU
5.5 APPS 12 UTILS
117 MENU
5.5 CALC DERIV NXT
5.5 CALC DERIV NXT NXT
2.5 CMPLX NXTMTH REAL NXT
MTH NXT CMPLX NXT«CMPLX» NXT
5.5 SYMB GRAPH
CALC GRAPH
5.5 ARITH NXT
5.5 in EQWCONVERT REWRITE NXT«REWRITE»
«EQW»

Menu
172.0332.02
109256.04
83.02
83.02
83.02
101
88
8
148
2219.09
64

?

First
1.05
28C
48SX
1.05
48SX
1.05
1.05
48SX
48SX
48GX
28C

72.02
H

28C
28C
1.05

100
28C
104
48SX
36.02
48GX
2219.14256.051.16
136.03 H 1.05
152
163
105
48SX
H 1.05
32.03
28C
66
93
28C
117
48GX
2219.17162.02 H 1.16
162.03 H 1.16
14.02
28C
20.02
130.02142
153
177
125.02172.02

H

1.05

H
H

1.05
1.20

The Command Menu-Path Table I-23

Command
SIN
SINCOSType Library
A 2-81
C 788-24

SINH

A

2-84

SINV
SIZE

C
C

2-324
2-160

SL

C

2-5

Size Keys
2.5 key 53
5.5 TRIG NXTCONVERT TRIGSYMB NXT EXPLN«TRIGO»«REWRITE»
2.5 MTH HYPTRIG HYP«HYPERBOLIC»
2.5 PRG MEM ARITH NXT
2.5 RS&CHARS
MTH MATRX MAKE
PRG LIST ELEMPRG NXT CHARSPRG NXT GROB NXT
MATRICES OPER NXT NXT
2.5 [MTH/CONVERT] BASE NXT BIT

SLB

C

2-6

2.5 [MTH/CONVERT] BASE NXT BYTESLOPEFIELD

C

171-12

5.5 85 MENU

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-63SOLVEQNC

227-1

SOLVERSOLVEVXCC

788-134
788-8

SORT

C

171-94

5.5 S.SLVSYMB SOLVEALG NXT«SOLVER»
5.5 APPS 12 EQLIB
114 MENU
5.5 «MAIN»
5.5 S.SLVSYMB SOLVE«SOLVER»
5.5 MTH LIST
PRG LIST PROC NXTSPHEREC

171-19

SQ
SR

A
C

2-80
2-7

SRAD

C

171-40

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

I-24 The Command Menu-Path Table

Menu

?

122.02
140
155

H

First
28C
1.05

12
161

28C

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.02156.032219.07120
H 1.05124.02142.02
154
2275.01
48GX
H 1.05120
H 1.05142.02
154
11
48GX
36.02
2219.16
4.02
48GX
65
2219.04
28C
17
28C
170
7
48GX
147.02156.032219.07

Command
SRB

Type Library
C 2-8

Size Keys
2.5 [MTH/CONVERT] BASE NXT BYTE

SRECV
SREPL

C
C

2-361
221-16

2.5 109 MENU
5.5 RS&CHARS NXTPRG NXT CHARS NXT
5.5 256.03 MENU
2.5 PRG BRCH [START]

SREV
START

C
C

256-151792-9

STD

C

2-141

STEP

C

1792-12

2.5 LS&MODE FMT
PRG NXT MODES FMT
2.5 PRG BRCH START/FOR

STEQ

C

2-250

2.5 RS&NUM.SLV ROOT LS-EQ

STIME
STO

C
C

2-376
2-341

STO*
STO+
STOSTO/STOALARM

C
C
C
C
C

2-330
2-327
2-328
2-329
2-25

STOF

C

2-151

STOKEYS

C

2-381

STORE
STOVX
STOΣ

F
C
C

222-36
222-642-283

2.5 109 MENU
2.5 key 32.1
PRG MEM DIR
2.5 PRG MEM ARITH
2.5 PRG MEM ARITH
2.5 PRG MEM ARITH
2.5 PRG MEM ARITH
2.5 RS&TIME ALRM
PRG NXT NXT TIME ALRM
2.5 LS&MODE FLAG NXTPRG NXT MODES FLAG NXT
2.5 LS&MODE KEYS
PRG NXT MODES KEYS
5.5 «ALGB» NXT
5.5 CAT
2.5 91/97 MENU LS-ΣDAT

STREAM

C

171-88

5.5 PRG LIST PROC

STR→
STRM
STURM
STURMAB
STWS

C
C
C
C
C

2-163
255-0
222-22222-23
2-148

2.5
5.5
5.5
5.5
2.5

SUB

C

2-156

SUBST

F

788-2

2.5 RS&CHARSPRG LISTPRG NXT GROB
PRG NXT CHARS
MATRICES CREAT NXT NXT
MTH MATRX MAKE NXT
5.5 ALG NXTSYMB ALG«ALGB» NXT

CATAPPS 14
ARITH POLY PREVARITH POLY PREV
[MTH/CONVERT] BASE NXT

Menu
18
171
109
62.02
2269.03

?

First
28C
48SX
1.05
1.05
28C

26
145
64

28C

26
27
145.0275 +[LS]-EQ
109
71

28C

48SX
28C

72
72
72
72
95

28C
28C
28C
28C
48SX

66.02

28C

67

48SX

28C

H
H
91
97
36
2219.15

1.20
1.20
28C
48GX

126.04126.0415.02
168.02
6.02
34
37
62
146.03H
H

124.02
151

H

28C
2.15
1.20
1.20
28C
28C

1.05

The Command Menu-Path Table I-25

Command
SUBTMOD

Type Library
F 788-111

Size Keys
5.5 ARITH MODUL NXT«MODULAR» NXT
5.5 MATRICES FACTMTH MATRX FACTR

SVD

C

171-46

SVL

C

171-47

5.5 MATRICES FACT NXT
MTH MATRX FACTR NXTSWAPSYLVESTER

C
C

2-271
788-78SYSEVAL
SYST2MAT

CC

2-49
222-10S~NS→H
TABVALC
C
C

256-22
256-8
788-97

2.5 PRG/TOOL STACK
5.5 MATRICES QUADF«MATR» NXT
2.5 CAT
5.5 CONVERT MATRX
MATRICES LIN-S
5.5 256.04 MENU
5.5 256.02 MENU
5.5 SYMB GRAPH NXTCALC GRAPH NXTTABVARC

788-96TAIL

C

171-82TAN
TAN2CS2TAN2SCA
CC

2-83
222-28788-31TAN2SC2

C

788-33

TANH

A

2-86

TAYLOR0

F

788-6

TAYLR

C

2-339

TCHEBYCHEFF

F

788-91

TCOLLECTC

788-26

TDELTA

F

171-100

5.5 SYMB GRAPH NXTCALC GRAPH NXT«DIFF» NXT
5.5 RS&CHARS NXTPRG LIST ELEM NXT
PRG NXT CHARS NXT
2.5 key 55.1
5.5 «TRIGO» NXT
5.5 SYMB TRIG
TRIG NXTCONVERT TRIG NXT«TRIGO» NXT
5.5 SYMB TRIG
TRIG NXTCONVERT TRIG NXT«TRIGO» NXT
2.5 MTH HYPTRIG HYP«HYPERBOLIC»
5.5 CALC LIMITSYMB CALC NXT«DIFF» NXT
2.5 CALC LIMIT
5.5 «POLYNOMIAL» NXT
91 DUP MENUXY
5.5 TRIG NXT«TRIGO» NXT
5.5 APPS 12 UTILS NXT
117.02 MENU

I-26 The Command Menu-Path Table

Menu
128.02

?
H

First
1.05

8
48GX
148
2219.088.02
48GX
148.022219.0873
28C
157
H 1.05
28C
1.20

158
H
173
256.041.05
256.021.05
142.02 H 1.05
153.02177.02142.02 H 1.05
153.02177.02
35.02
48GX
62.02
2219.1428C
H 1.20122.02 H 1.05
139140.02122.02139140.02H

12161136.04152.02163
93
163
122.02
117
2219.17

1.05

28C
H

1.05
28C

H

1.05

H

1.05
48GX

Command
TESTS
TEVAL
TEXPAND

Type Library
C 222-46
C 788-101
C 788-19

Size Keys
5.5 «MATHS» NXT
5.5 101 DUP MENUXY
5.5 EXP&LN
SYMB ALGSYMB TRIG
ALG NXTTRIG NXTSYMB NXT EXPLN«EXP&LN»«TRIGO» NXT«ALGB» NXT
2.5 PRG NXT OUT
2.5 PRG BRCH IF/CASE
PRG NXT NXT ERROR IFERR

TEXT
THEN

C
C

2-217
1792-26
1792-1
1792-24

TICKS

C

2-18

TIME

C

2-16

TINC

F

171-101

TLIN

C

788-25

TLINE
TMENU

C
C

2-207
2-348

TOT
TRACE

C
C

2-300
171-39TRAN

C

788-695.5 MATRICES OPER NXT NXT
MTH MATRX NORM NXT«MATR»

TRANSIO
TRIG

C
C

2-373
788-27

TRIGCOS

C

788-28

TRIGO

C

788-130

2.5 106 MENU
5.5 SYMB TRIG
TRIG NXT NXTCONVERT TRIG NXT«TRIGO» NXT NXT
5.5 TRIG NXT NXTCONVERT TRIG NXT«TRIGO» NXT NXT
5.5 «MAIN»

2.5 RS&TIME
PRG NXT NXT TIME
APPS 5 4
2.5 RS&TIME
PRG NXT NXT TIME
APPS 5 4
5.5 APPS 12 UTILS NXT
117.02 MENU
5.5 SYMB TRIG
TRIG NXTCONVERT TRIG NXT«TRIGO» NXT
2.5 PRG NXT PICT
2.5 LS&MODE MENUPRG NXT MODES MENU
2.5 100 MENU
5.5 MATRICES OPER NXT NXT
MTH MATRX NORM NXT

Menu

121
122.02124.02
139
151
155

?
H
H
H

40
24
25
60
145
94
167

First
1.20
1.05
1.05

48SX
28C

48SX

94
167

48SX

117.0248GX2219.17122.02 H 1.05
139140.02
38
68

48SX
48SX

100
28C
7.02
48GX
147.02156.032219.077.02
H 1.05137.03147.02156.03
106
48SX
122.03 H 1.05
139140.02122.03140.02

H

1.05

H

1.05

The Command Menu-Path Table I-27

Command
TRIGSIN

Type Library
C 788-29

Size Keys
5.5 TRIG NXT NXTCONVERT 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
99 DUP MENUXY
2.5 82 MENU
5.5 EXP&LN NXT
TRIG NXT NXTCONVERT 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

TRIGTANC

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

TVMBEGC

171-72TVMENDC

171-73

TVMROOTC

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 TOOLSUFL1→MINIFUNASSIGNUNASSUME
UNBINDUNPICK
UNROT
UNTIL

C
F
F
C
C
C
C

221-20222-49222-39222-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 STACKPRG 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 CATRS&NUM.SLV TVM LS-BEG
5.5 CATRS&NUM.SLV TVM RS-BEG
5.5 RS&NUM.SLV TVM

I-28 The Command Menu-Path Table

Menu
122.03140.02

?
H

First
1.05

122.03

H

1.05

6
14.03

28C
48SX
H 1.0582
121.02122.03140.03

H

48SX
1.05

94.03
167.03

48SX

71.02
80
2219.122219.13

48SX
48GX

2219.1348GX

792219.13
32.02
33.03
59
118
59
118
2269.04

48GX

48GX

28C
48SX
48SX
H
H
H

73.02
73
29
145.02

59
118

1.05
1.20
1.20
1.20
1.05
1.05
28C
48SX
28C
28C
28C
28C
48SX

CommandType Library
VANDERMONDEC 788-83
VAR
VARS
VER
VERSION
VISIT
VISITBVPOTENTIAL
VTYPE
V→
WAIT
WHILE

C
C
F
C
C
C
C
C
C
C
C

2-301
2-36
788-140
171-15221-8221-10222-57
2-167
2-180
2-55
1792-5Size Keys
5.5 MATRICES CREAT NXT NXT
MTH MATRX MAKE NXT NXT«MATR» NXT NXT
2.5 100.02 MENU
2.5 PRG MEM DIR NXT
5.5 140 DUP MENUXY
5.5 CAT
5.5 key LS-downarrow
5.5 CAT
5.5 CAT
2.5 PRG TYPE NXT NXT
2.5 MTH VECTR
2.5 PRG NXT IN
2.5 PRG BRCH [WHILE]WIREFRAME

C

171-8

5.5 85 MENU

WSLOG
XCOL

C
C

2-19
2-306

2.5 CAT
2.5 89/98 MENU

XGET
XLIB~
XMIT
XNUM

C
C
C
C

171-112256-332-360
788-103

5.5
5.5
2.5
5.5

XOR

F

2-232

XPON
XPUT
XQ

F
C
C

2-105
171-113788-104

XRECV

C

171-80

XRNG
XROOT

C
A

2.5 83 MENU
2.5 key 52.3: x-root-of-y

XSEND

C

2-218
2-74
2-75
171-79

XSERV
XVOL

C
C

171-110171-0

5.5 CAT
5.5 86 MENU

XXRNG

C

171-3

5.5 86 MENU

YCOL

C

2-307

2.5 89/98 MENU

YRNG

C

2-219

2.5 83 MENUCAT
256.06 MENU
109 MENU«REWRITE»
142.02 MENU
2.5 PRG TEST NXT[MTH/CONVERT] BASE NXT LOGIC

2.5 MTH REAL NXT
5.5 CAT5.5 «REWRITE»
142.02 MENU
5.5 104.02 MENU

5.5 104.02 MENU

Menu
6.03
137.03146.03100.02
71.02

?
H

First
1.05

28C
28S
H 1.052219.03
48GX
2269.02
1.05
2269.021.05
H 1.20
33.03
48SX
4
48SX
39
28C
31
28C
145.0285
48GX
2219.02
48SX
89
48SX
98
2219.191.16
256.06
1.16
109
48SX
142.02 H 1.05
16
32.02
169
14.02
2219.19142.02 H

28C
28C
1.16
1.05

104.022219.1483

48GX

104.022219.142219.19
86
2219
86
2219
89
98
83

48GX

48SX
48SX

1.16
48GX
48GX
48SX
48SX

The Command Menu-Path Table I-29

CommandYSLICE

Type Library
C 171-11

Size Keys
5.5 85 MENU

YVOL

C

171-1

5.5 86 MENU

YYRNG

C

171-4

5.5 86 MENU

ZEROS

C

788-64ZFACTORF

171-95

ZVOL

C

171-2

5.5 SYMB SOLVE
S.SLV NXT«SOLVER»
5.5 APPS 12 UTILS
117 MENU
5.5 86 MENU

^
_
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-104rrefC

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
117.02 MENU
2.5 ALPHA-LS-E
MTH NXT CONST«CONSTANTS»
5.5 APPS 12 UTILS NXT
117.02 MENU
2.5 key 23.2
CMPLX
MTH NXT CONST«CMPLX»«CONSTANTS»
5.5 APPS 12 UTILS NXT
117.02 MENU
5.5 SYMB CALCCALC LIMIT«DIFF» NXT
5.5 MATRICES FACT
5.5 APPS 12 UTILS NXT
117.02 MENU
5.5 SYMB SOLVE
MATRICES LIN-S«MATR»
2.5 key 23.3
«ALGB» NXT
93.02 MENU
2.5 key 52.1
2.5 key 55.3
2.5 key 53.3
2.5 91/97 MENU
2.5 91/97 MENU

I-30 The Command Menu-Path Table

Menu? First85
48GX
2219.02
86
48GX
2219
86
48GX
2219
120.02 H 1.05
142.03154
117
48GX
2219.16
86
48GX
2219
28C
28C
117.0248GX2219.1821
28C
117.022219.18
21
130

48GX
28C

117.0248GX2219.18136.03 H 1.20
152
163
148
H 1.20117.0248GX2219.18154
H 1.05
158
93.02

28C
28C
28C

91
97
91
97

28C
28C
28C

Command
ΣLINE
ΣLIST

Type Library
C 2-314C 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-41792-16
256-2
256-11
2-170
256-6
171-56

→DATE

C

2-22

→DIAG

C

171-58

→FONT
→GROB
→H
→HEADER

C
C
C
C

221-2
2-215
256-0
221-4

Size Keys
2.5 102 MENU
5.5 MTH LIST

Menu
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

103 MENU
alias for ΣX2
103 MENU
alias for ΣXY
103 MENU
103 MENU
alias for ΣY2
103 MENU
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.0233
256.029149
1652219.1
94
167

1.05
1.05
28C
1.05
48GX

5.02
6.03
146
2219.1
2269
37
256
2269

48GX

28C

256 MENU
256.02 MENUPRG TYPE
256.02 MENU
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
256 MENU
CAT

48SX

1.05
48SX
1.05
1.05

The Command Menu-Path Table I-31

Command→HMS

Type Library
C 2-114→KEYTIME→LANGUAGE
→LCD
→LIST

C
C
C
C

171-108
221-0
2-214
2-154

→LST
→MINIFONT→NDISP
→NUM

C
C
C
C

256-10221-17
221-6
2-53

→PRG
→Q

C
C

256-122-263

Size Keys
2.5 RS&TIME NXT
PRG NXT NXT TIME NXTAPPS 5 4 NXT
5.5 CAT
5.5 CAT
2.5 PRG NXT GROB NXT
2.5 PRG TYPE
PRG LIST
5.5 256.02 MENU
5.5 CAT
5.5 CAT
2.5 key 105.3
CONVERT REWRITE NXT
5.5 256.03 MENU
2.5 CONVERT REWRITE NXT

→Qп

C

2-264

2.5 CONVERT REWRITE NXT

→RAM
→ROW

C
C

256-14
171-54

5.5 256.03 MENU
5.5 MTH MATRX ROW
MATRICES CREAT ROW

→S2
→STR

C
C

256-32
2-162

→TAG
→TIME

C
C

2-384
2-23

→UNIT

C

2-13

5.5 256.06 MENU
2.5 PRG TYPE
RS&CHARS NXTPRG NXT CHARS NXT
2.5 PRG TYPE
2.5 RS&TIME
PRG NXT NXT TIME
APPS 5 4
2.5 PRG TYPE[CONVERT] UNITS TOOLS→V2→V3↓MATCH↑MATCH
∆LIST

C
C
C
C
C

2-181
2-182
2-266
2-265
171-85

2.5
2.5
2.5
2.5
5.5

ΠLIST

C

171-90

5.5 MTH LIST∞F

788-138«»CC

1792-18
1792-171792-19

5.5 key 102.2«CONSTANTS»
2.5 key 95.3
2.5 key 95.3

I-32 The Command Menu-Path Table

MTH VECTR
MTH VECTR
93.02 MENU
93.02 MENU
MTH LIST

Menu
94.02
167.02

?

First
28C

2219.19
2269
37.02
33
34
256.022269.04
2269.02172.02

1.05
1.05
28S
28C

256.0393.02
172.0293.02
172.02
256.0310150
1662219.1
256.06
33
62.02

1.05
48SX

1.05
1.05
1.05
28C

48SX
1.05
48GX

1.16
28C

33
94
167

48SX
48SX

33
59
118
4
4
93.02
93.02
11
2219.15112219.16

48SX
48SX
48SX
48SX
48SX
48GX
48GX
H

1.05
28C
28C

J
J. ASCII Character Codes and Translations
The following table shows the relation between character codes (results of NUM, arguments to CHR) andcharacters (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 heading
start of text
end of text
end of transmissionenquiry
acknowledge
bellbackspacetablinefeedvertical tab
form feed
carriage return
shift out
shift indevice escapedevice control 1
device control 2
device control 3
device control 4
neg. acknowledge
synchronous idle
end trans. block
cancelend of medium
substituteescapecursor (insert)
cursor (overtype)ellipsis (left)
ellipsis (right)
space
exclamation markquotation
numberdollars
percent
ampersandapostrophe
left parenthesis
right parenthesis
asterisk

Character Codes (0-127)
Code
Description
43+ plus44, comma45- hyphen46. period47/ 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
: colon59; semicolon
60< less than61
= equal to62> greater than63
? question mark64
@ 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\ backslash93] right bracket
94^ caret95_ underscore96` grave accent
97
a a
98
b b
99
c c
100 d d101 e e102 f f
103 g g104 h h105 i i
106 j j107 k k108 l l109 m m
110 n n111 o o112 p p113 q q
114 r r115 s s
116 t t117 u u118 v v
119 w w
120 x x
121 y y122 z z123 { left brace
124 | pipe
125 } right brace
126 ~ tilde
127  shaded box

ASCII Character Codes and Translations J-1

The following table shows the relation between character codes (results of NUM, arguments to CHR) andcharacters (results of CHR, arguments to NUM), as well as the translation codes to be used to transmit characters
between the calculator and a remote device, for the upper half of the character set.
Character Codes 128-255 With ASCII Character Translations

Code Trans. Description
128  \<) angle
129  \x- x bar
130 ‚ \.V gradient131 ƒ \v/ square root
132 „ \.S integration
133 Σ \GS Sigma
134 ► \|> store
135 π \pi pi
136 ˆ \.d derivation
137 ‰ \<= less than or equal
138 Š \>= greater than orequal
139 ‹ \=/ not equal
140 Œ \Ga alpha141 → \-> right arrow142 ← \<- left arrow
143 ↓ \|v down arrow
144 ↑ \|^ up arrow
145 ‘ \Gg gamma
146 ’ \Gd delta
147 “ \Ge epsilon
148 ” \Gn eta
149 • \Gh theta
150 – \Gl lambda
151 — \Gr rho
152 ˜ \Gs sigma
153 ™ \Gt tau
154 š \Gw omega
155 › \GD Delta
156 œ \PI Pi
157  \GW Omega
158 ā \[] box
159 Ÿ \oo infinity
160  \160 euro
161 ¡ \161 upside-down
exclamation
162 ¢ \162 cents
163 £ \163 pounds
164 ¤ \164 general currency
165 ¥ \165 yen
166 ¦ \166 broken pipe
167 § \167 section
168 ¨ \168 dieresis/umlaut
169 © \169 copyright

Code Trans. Description
170 ª \170 feminine ordinal
171 « \<< begin program
172 ¬ \172 logical negation
173 − \173 negative
174 ® \174 registeredtrademark175 ¯ \175 macron
176 ° \^o degree
177 ± \177 plus/minus
178 ² \178 superscript 2
179 ³ \179 superscript 3
180 ´ \180 acute accent
181 µ \Gm mu
182 ¶ \182 paragraph
183 · \183 dot
184 ¸ \184 cedilla
185 ¹ \185 superscript 1
186 º \186 masculine ordinal
187 » \>> end program
188 ¼ \188 vulgar 1/4
189 ½ \189 vulgar 1/2
190 ¾ \190 vulgar 3/4
191 ¿ \191 upside-downquestion
192 À \192 A grave
193 Á \193 A acute194 Â \194 A circumflex
195 Ã \195 A tilde
196 Ä \196 A dieresis/umlaut
197 Å \197 A ring
198 Æ \198 A-E ligature
199 Ç \199 C cedilla
200 È \200 E grave
201 É \201 E acute202 Ê \202 E circumflex
203 Ë \203 E dieresis/umlaut
204 Ì \204 I grave
205 Í \205 I acute206 Î \206 I circumflex
207 Ï \207 I dieresis
208 Ð \208 Eth
209 Ñ \209 N tilde
210 Ò \210 O grave
211 Ó \211 O acute

J-2 ASCII Character Codes and Translations

Code Trans. Description
212 Ô \212 O circumflex
213 Õ \213 O tilde
214 Ö \214 O dieresis/umlaut
215 × \.x multiplication
216 Ø \O/ O slash
217 Ù \217 U grave
218 Ú \218 U acute219 Û \219 U circumflex
220 Ü \220 U dieresis/umlaut
221 Ý \221 Y acute
222 Þ \222 Thorn
223 ß \Gb beta
224 à \224 a grave
225 á \225 a acute
226 â \226 a circumflex
227 ã \227 a tilde
228 ä \228 a dieresis/umlaut
229 å \229 a ring
230 æ \230 a-e ligature
231 ç \231 c cedilla
232 è \232 e grave
233 é \233 e acute234 ê \234 e circumflex
235 ë \235 e umlaut
236 ì \236 i grave
237 í \237 i acute238 î \238 i circumflex
239 ï \239 i dieresis
240 ð \240 eth
241 ñ \241 n tilde
242 ò \242 o grave
243 ó \243 o acute244 ô \244 o circumflex
245 õ \245 o tilde
246 ö \246 o dieresis/umlaut
247 ÷ \:- division
248 ø \248 o slash
249 ù \249 u grave
250 ú \250 u acute251 û \251 u circumflex
252 ü \252 u dieresis/umlaut
253 ý \253 y acute254 þ \254 thorn
255 ÿ \255 y dieresis

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
Add ................................................................................. 3-298
ADD....................................................................................3-9
ADDTMOD ................................................................... 3-10
ADDTOREAL............................................................... 3-10
alarmsacknowledging .......................................................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→HEADER..................................................................3-103→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alpha keyboard
automatically locking..................................................1-42
ALRMDAT.......................................................................D-2
alternant..........................................................................3-269
AMORT ...........................................................................3-11
AND .................................................................................3-11
angular motion.................................................................5-36
ANIMATE.......................................................................3-12
animation................................................................2-31, 2-39
annunciators
user flags.......................................................................1-27
ANS...................................................................................3-12
APEEK .............................................................................. 6-2
APLY ................................................................................2-20
applications ......................................................................1-53
APPLY..............................................................................3-13
ARC...................................................................................3-13
ARCHIVE .......................................................................3-14
ARG ..................................................................................3-14
arguments
verifying........................................................................2-24
ARIT .................................................................................3-15
ARM→ ..................................................................... 6-3, 6-41
arraysapplying a program to ................................................2-20
manipulating ......................................................2-12, 2-34
maximum and minimum elements...........................2-16
sorting elements ..........................................................2-16
ARRY→ ...........................................................................3-15
ASIN .................................................................................3-15
ASIN2C............................................................................3-17
ASIN2T ............................................................................3-17
ASINH..............................................................................3-17
ASM .................................................................................... 6-3
asm (internal) ...................................................................6-42
ASM→...................................................................... 6-3, 6-41
ASM2 ................................................................................6-42
ASN...................................................................................3-18
ASR ...................................................................................3-19
Assembler.........................................................................6-11
Assembler syntax ............................................................6-11
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

Index - 2

B
B→R................................................................................. 3-30
BAR .................................................................................. 3-26
BARPLOT....................................................................... 3-27
BASIS ............................................................................... 3-27
BAUD .............................................................................. 3-27
BDISP .................................................................................2-7
BEEP................................................................................ 3-28
beeperin programs ................................................................. 1-48
BER .................................................................................. 2-29
Bernoulli equation .......................................................... 5-19
Bessel functions .............................................................. 2-29
BESTFIT ......................................................................... 3-28
BetaTesting.........................................................................6-3
BIN ................................................................................... 3-28
binary integers
comparing.................................................................... 1-12
custom display................................................................2-5
representing flags.............................................. 1-28, 1-29
wordsize ....................................................................... 1-12
binary operations
and ................................................................................ 3-11
convert to real ............................................................. 3-30
converting to binary................................................. 3-214
exclusive OR ............................................................. 3-277
not............................................................................... 3-157
regular or.................................................................... 3-161
rotate...................................................3-204, 3-205, 3-209
set wordsize............................................................... 3-242
shift....................................................... 3-19, 3-227, 3-232
BINS................................................................................. 3-29
bipolar transistors ........................................................... 5-54
black body........................................................................ 3-82
black body radiation....................................................... 5-31
BLANK............................................................................ 3-29
BOX ................................................................................. 3-29
branching structures
conditional structures ...................................... 1-13, 1-35
loop structures ............................................................ 1-17
program element............................................................1-2
BRCH menu.......................................................... 1-13, 1-17
Brewster angle................................................................. 5-38
buckling...............................................................................5-4
BUFLEN ......................................................................... 3-30
business
amortization ................................................................ 3-11
time value of money................................................. 3-261
BYTES ............................................................................. 3-30

C
C$ ...................................................................................... 3-31
C→PX.............................................................................. 3-49
C→R................................................................................. 3-49
C2P ................................................................................... 3-31

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
CLKADJ ..........................................................................3-37
CLLCD.............................................................................3-37
clock
adjusting .......................................................................3-37
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
comments ...........................................................................1-7
COMP→.............................................................................6-4
comparison functions .......................................... 1-11, 1-12
compiled local variable structures
defining procedure ..................................................... 1-10
Compiler directives ........................................................ 6-17
computercreating 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

CROSS..............................................................................3-47
CST.....................................................................................D-3
CSWP................................................................................3-47
CURL................................................................................3-48
current.............................................................5-9, 5-31, 5-50
cursor (command line) ...................................................1-42
custom menus
in programs..................................................................1-52
menu-based applications............................................1-53
customization
keyboard .......................................................................3-18
cycle.......................................................................3-31, 3-163
CYCLOTOMIC..............................................................3-48
CYLIN..............................................................................3-48
cylinder..............................................................................5-48

D
D→R.................................................................................3-71
DARCY ............................................................................3-49
DATE ...............................................................................3-49
DATE+............................................................................3-50
DBUG ..............................................................................3-50
DDAYS ............................................................................3-51
debugging ...............................................................1-31, 1-32
DEC ..................................................................................3-51
DECR ...............................................................................3-51
DEDICACE....................................................................3-52
DEF ..................................................................................3-52
DEFINE ..........................................................................3-52
defining procedures
compiled local variables in ........................................1-10
local variable structures................................................ 1-7
local variables i .............................................................. 1-9
definite loops .............................2-1, 2-18, 2-32, 2-34, 2-39
with counters ....................................................... 2-8, 2-12
DEG .................................................................................3-53
DEGREE.........................................................................3-53
degree-minute-seconds.................................................3-107
DELALARM...................................................................3-53
DELAY ............................................................................3-54
DELKEYS.......................................................................3-54
DEPND ...........................................................................3-55
DEPTH ............................................................................3-55
DERIV .............................................................................3-56
Derivative .......................................................................3-291
DERVX............................................................................3-56
DESOLVE ......................................................................3-56
DET ..................................................................................3-57
DETACH.........................................................................3-57
DIAG→ ...........................................................................3-58
DIAGMAP ......................................................................3-58
DIFF .................................................................................3-59
DIFFEQ...........................................................................3-59
diodes................................................................................5-52
DIR....................................................................................3-60

Index - 4

Directives......................................................................... 6-17
Disassembler ................................................................... 6-41
DISP ................................................................................. 3-60
display
area numbers ............................................................... 1-39
clearing ......................................................................... 1-49
freezing......................................................................... 1-39
DISPXY........................................................................... 3-61
DISTRIB.......................................................................... 3-61
DIV................................................................................... 3-62
DIV2................................................................................. 3-62
DIV2MOD...................................................................... 3-62
Divide ............................................................................. 3-300
DIVIS............................................................................... 3-63
DIVMOD........................................................................ 3-63
DIVPC ............................................................................. 3-63
dn ...................................................................................... 3-64
DO.................................................................................... 3-64
do looping.................................................... 1-22, 2-14, 2-29
DOERR ........................................................................... 3-65
DOLIST........................................................................... 3-65
DOMAIN........................................................................ 3-66
DOSUBS ......................................................................... 3-66
DOT ................................................................................. 3-67
drag force......................................................................... 5-24
DRAW ............................................................................. 3-68
DRAW3DMATRIX ...................................................... 3-68
DRAX .............................................................................. 3-68
DROITE.......................................................................... 3-69
DROP .................................................................. 3-69, 3-304
DROP2 ............................................................................ 3-69
DROPN........................................................................... 3-70
DTAG .............................................................................. 3-70
DUP.................................................................................. 3-70
DUP2................................................................................ 3-70
DUPDUP ........................................................................ 3-71
DUPN .............................................................................. 3-71

E
e ........................................................................................ 3-71
EDIT ................................................................................ 3-72
EDITB ............................................................................. 3-72
editing
programs .........................................................................1-6
EGCD .............................................................................. 3-72
EGV ................................................................................. 3-73
EGVL............................................................................... 3-73
EIZ ................................................................................... 1-54
elastic buckling...................................................................5-4
elastic collisions............................................................... 5-24
electricity .....................................................................5-3, 5-9
ellipse ................................................................................ 5-44
ELSE ................................................................................ 3-73
END................................................................................. 3-73
ENDSUB......................................................................... 3-74

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 Libraryreferences ....................................................................... 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
errorsactions 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
evaluationof local variables............................................................ 1-9of 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
custom menus .............................................................1-53
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

FF0λ .................................................................................... 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

Fibonacci numbers ........................................................... 2-1
FIBT.................................................................................... 2-4
Filename conventions ....................................................6-17
FILER...............................................................................3-87
FINDALARM.................................................................3-87
FINISH ............................................................................3-87
FIX ....................................................................................3-87
flags
annunciators.................................................................1-27
binary integer form .....................................................1-29
clearing..........................................................................1-27
control behavior..........................................................1-27
controlling logic with........................................2-16, 2-18
default states ................................................................. C-1
preserving and restoring status ......................... 2-6, 2-34
program control ..........................................................1-27
recalling states....................................................1-28, 1-29
restoring states.............................................................1-28
setting......................................1-27, 2-8, 2-16, 2-18, 2-37
storing states ................................................................1-28
system .................................................................1-27, 1-28
testing........................................................1-27, 2-16, 2-18
types ..............................................................................1-27
user ................................................................................1-27
FLASHEVAL..................................................................3-88
FLOOR ............................................................................3-88
fluids..................................................................................5-18
focal length.......................................................................5-37
FONT→ ..........................................................................3-89
FONT6.............................................................................3-88
FONT7.............................................................................3-89
FONT8.............................................................................3-89
FOR...................................................................................3-90
for looping....1-20, 1-21, 2-8, 2-12, 2-18, 2-32, 2-33, 2-39
electrostatic force ............................................................5-10
force ..............................................................5-21, 5-22, 5-32
FOURIER........................................................................3-91
Fourier transform............................................................3-86
Fourier transform, inverse...........................................3-113
FP ......................................................................................3-91
fractionsconverting ......................................................3-187, 3-278
FREE ................................................................................3-91
free fall motion................................................................5-35
FREEZE ..........................................................................3-91
frequency
resonant ........................................................................5-16
friction losses ...................................................................5-21
FROOTS..........................................................................3-92
FS? .....................................................................................3-92
FS?C ..................................................................................3-93
FUNCTION....................................................................3-93
FXND...............................................................................3-94

Index - 6GGAMMA.......................................................................... 3-95
Gamma function........................................................... 3-291
garbage collection ......................................................... 3-146
gas compressibility........................................................ 3-285
gas-compressibility factor.............................................. 5-27
gases.................................................................................. 5-25
GAUSS............................................................................. 3-95
GBASIS............................................................................ 3-95
GCD ................................................................................. 3-96
GCDMOD ...................................................................... 3-96
geometry................................................................. 5-43, 5-47
GET.................................................................................. 3-97
GETADR ........................................................................ 6-42
GETI ................................................................................ 3-97
GETNAME .................................................................... 6-42
GETNAMES.................................................................. 6-42
global variables
action in programs.........................................................1-1
disadvantages in programs...........................................1-7
GOR ................................................................................. 3-98
GRAD.............................................................................. 3-98
GRAMSCHMIDT ......................................................... 3-99
GRAPH ........................................................................... 3-99
graphics
animation ..................................................................... 3-12
appending .................................................................. 3-101
blank ............................................................................. 3-29
box drawing................................................................. 3-29
clearing PICT .............................................................. 3-75
custom.......................................................................... 2-39
display text......................................................... 3-60, 3-61
displaying ................................................................... 3-128
drawing arc .................................................................. 3-13
exclusive OR ............................................................. 3-101
freeze display............................................................... 3-91
line drawing ............................................................... 3-254
pixel check ................................................................. 3-170
pixel off...................................................................... 3-171
pixel on....................................................................... 3-171
screenshot.................................................................. 3-128
subset.......................................................................... 3-242
graphics commands
parallel processing with ............................................... F-2graphics objects
manipulating............................................ 2-32, 2-34, 2-39
gravitation .................................................... 5-24, 5-35, 5-36
Greater than .................................................................. 3-295
Greater than or Equal.................................................. 3-295
GREDUCE..................................................................... 3-99
GRIDMAP.................................................................... 3-100
GROB ............................................................................ 3-101
GROBADD .................................................................. 3-101
GXOR............................................................................ 3-101

H
H→ ..................................................................................... 6-4
H→A .................................................................................. 6-5
H→S ................................................................................... 6-5
HADAMARD...............................................................3-102
HALFTAN ....................................................................3-102
HALT .............................................................................3-102
HALT annunciator .........................................................1-31
halting programs .............................................................1-32
harmonic motion.............................................................5-40
HEAD ............................................................................3-103
head loss ...........................................................................5-20
HEADER→..................................................................3-103
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

Ii ... ....................................................................................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

L
LABEL ...........................................................................3-126
Labels ................................................................................6-13
LAGRANGE ................................................................3-126
LANGUAGE→ ...........................................................3-126
LAP .................................................................................3-127
LAPL...............................................................................3-127
LAST...............................................................................3-127
last argument
recalling........................................................................... 2-8
LASTARG .....................................................................3-128
LC~C .................................................................................. 6-5
LCD→............................................................................3-128
LCM ................................................................................3-129
LCXM.............................................................................3-129
LDEC .............................................................................3-129
LEGENDRE ................................................................3-130
length factor....................................................................... 5-4
Less than.........................................................................3-293
Less than or Equal ........................................................3-294
LGCD.............................................................................3-130
LIBEVAL.......................................................................3-130
LIBS ................................................................................3-131
light....................................................................................5-37
lim....................................................................................3-131
LIMIT .............................................................................3-131
LIN..................................................................................3-131
LINE...............................................................................3-132
linear motion....................................................................5-35
linear structure.................................................................1-13
LINFIT...........................................................................3-133
LININ.............................................................................3-133
Links..................................................................................6-13
LINSOLVE ...................................................................3-133
list concatenation ..............................................................F-2
list processing programming example .........................2-20
LIST→............................................................................3-133
lists
action in programs ........................................................ 1-1
adding ............................................................................. 3-9
concatenation...............................................................3-23
parallel processing.........................................................F-1
reversing .....................................................................3-202
sorting ...............................................................2-11, 3-230
LN ...................................................................................3-135
LNAME .........................................................................3-136
LNCOLLECT...............................................................3-137
LNP1...............................................................................3-137
LOCAL...........................................................................3-137
Local Names, Evaluating................................................. 1-9
local variable structures
advantages ...................................................................... 1-8
as user-defined functions...........................................1-10
calculations with............................................................ 1-2
create local variables ..................................................... 1-7
Index - 8

defining procedure ................................................1-7, 1-9
entering ...........................................................................1-7
operation.................................................................1-2, 1-7
program element............................................................1-2
syntax.......................................................................1-2, 1-7
local variables .....................................................................2-6
action in programs.........................................................1-1
compiled ...................................................................... 1-10
creating............................................................................1-7
evaluating ..................................................................... 2-14
exist temporarily ............................................1-7, 1-8, 1-9
naming.............................................................................1-7
nested ................................................................. 2-29, 2-34
passing between programs........................................ 2-33
storing objects in .............................................. 2-14, 2-26
LOG ............................................................................... 3-138
LOGFIT ........................................................................ 3-138
logic
controlling.................................................................... 2-18
controlling with flags ....................................... 2-16, 2-19
functions ........................................ 2-16, 2-18, 2-25, 2-26
Logical Equality ............................................................ 3-302
logical functions.................................................... 1-11, 1-12
longitudinal waves .......................................................... 5-59
loop structurescounters................................ 1-18, 1-19, 1-20, 1-21, 1-25
definite.......................... 1-17, 2-2, 2-18, 2-32, 2-34, 2-39
do looping.................................................................... 1-22
for looping......................................................... 1-20, 1-21
indefinite ................................ 1-17, 1-22, 2-5, 2-14, 2-16
keystroke input............................................................ 1-49
negative steps .................................................... 1-19, 1-21
program element....................................................1-1, 1-2
start looping ................................................................ 1-19
start looping ................................................................ 1-18
summation alternative ............................................... 1-26
test commands in ............................................. 1-22, 1-24
while looping............................................................... 1-24
lowercase lettersin names ..........................................................................1-7
LQ................................................................................... 3-139
LR.................................................................................... 3-139
LR~R...................................................................................6-5
LSQ................................................................................. 3-139
LST ................................................................................... 1-53
LU ................................................................................... 3-140
LVAR ............................................................................. 3-140

M
Mach number .................................................................. 5-26
Macros.................................................................... 6-16, 6-22
MAD............................................................................... 3-141
magnetic field ........................................................ 5-31, 5-33
magnetism........................................................................ 5-31
magnification................................................................... 5-37

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
matrixtranspose ....................................................................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
memoryattach 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
MENU............................................................................3-146
menu descriptions
PRG BRCH .................................................................1-13
PRG TEST ..................................................................1-11
menu-based applications................................................1-53
menus
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
last menu...................................................................... 1-52
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
MENUXY ..................................................................... 3-147
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

N

P

names
action in programs ........................................................ 1-1
NAMES............................................................................2-25
nBASE ..............................................................................2-22
NDIST............................................................................3-154
NDUPN .........................................................................3-155
NEG ...............................................................................3-155
nested structures....................................................2-28, 2-29
New MASD instructions ...............................................6-26
newlines .................................................................... 1-3, 1-40
NEWOB.........................................................................3-155
NEXT.............................................................................3-156
NEXTPRIME ...............................................................3-156
NIP..................................................................................3-156
Nmines ..............................................................................D-6
NMOS transistors...........................................................5-53
nop.....................................................................................6-42
NOT................................................................................3-157
Not equal........................................................................3-296
NOVAL..........................................................................3-157
NPN bipolar transistors.................................................5-54
NSUB..............................................................................3-158
nullspace .........................................................................3-123
NUM...............................................................................3-158
number bases
converting between ....................................................2-22
numbers
action in programs ........................................................ 1-1
NUMX............................................................................3-159
NUMY............................................................................3-159
NΣ ...................................................................................3-157

P2C ................................................................................. 3-163
PA2B2 ............................................................................ 3-163
PAD.....................................................................................2-5
parallel addition................................................................. F-2
parallel processing ............................................................ F-1
DOLIST................................................................. F-1, F-4
multiple-result commands........................................... F-3
parallelepiped................................................................... 5-48
PARAMETRIC ............................................................ 3-163
PARITY......................................................................... 3-164
PARSURFACE............................................................. 3-164
PARTFRAC .................................................................. 3-165
PATH................................................................... 3-165, 6-17
PCAR.............................................................................. 3-166
PCOEF .......................................................................... 3-166
PCONTOUR................................................................ 3-166
PCOV............................................................................. 3-167
PDIM ............................................................................. 3-168
PEEK ..................................................................................6-6
PEEKARM ........................................................................6-6
pendulum ............................................................... 5-41, 5-42
Percent............................................................................ 3-292
PERINFO ..................................................................... 3-168
PERIOD......................................................................... D-14
periodic table................................................................. 3-168
properties................................................................... 3-183
PERM............................................................................. 3-168
permutation ............................................... 3-31, 3-36, 3-163
PERTBL ........................................................................ 3-168
PEVAL........................................................................... 3-169
PGDIR........................................................................... 3-169
phaes delay....................................................................... 5-14
PHONES......................................................................... 1-46
Pi (constant) .................................................................. 3-290
PICK............................................................................... 3-169
PICK3 ............................................................................ 3-169
PICT ............................................................................... 3-170
PICTURE...................................................................... 3-170
PIE.................................................................................... 2-34
pie charts.......................................................................... 2-34
PINIT............................................................................. 3-170
PIX?................................................................................ 3-170
PIXOFF......................................................................... 3-171
PIXON........................................................................... 3-171
PKT ................................................................................ 3-171
plane geometry................................................................ 5-43
PLOT ............................................................................. 3-172
PLOTADD ................................................................... 3-172
plotting
axes ............................................................................... 3-68
axis tick-mark .............................................................. 3-22
bar plots ....................................................................... 3-26
conic ............................................................................. 3-43
contour....................................................................... 3-166

O
OBJ→.............................................................................3-159
object type numbers .......................................................1-13
objects
action in programs ........................................................ 1-1
entering in programs .................................................... 1-3
testing types .................................................................1-13
type numbers ...............................................................1-13
OCT ................................................................................3-160
OFF.................................................................................3-160
Ohm’s law ........................................................................5-10
OLDPRT........................................................................3-160
OPENIO........................................................................3-161
optics.................................................................................5-37
OR ...................................................................................3-161
ORDER..........................................................................3-162
oscillations........................................................................5-40
outputlabeling............................................................................ 2-4
OVER.............................................................................3-162

Index - 10

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
pressurehydrostatic....................................................................5-19
PREVAL ........................................................................3-178
PREVPRIME ................................................................3-178
PRG annunciator ...................................................... 1-3, 1-6
PRG BRCH menu ..........................................................1-13
PRG TEST MENU........................................................1-11
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 techniquesapplied 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
custom menus................................................... 2-16, 2-18
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
temporary menus........................................................ 2-34
testing flags........................................................ 2-16, 2-18

Index - 11

using arrays...................................................................2-12
using calculator clock ................................................... 2-4
using flags.....................................................................2-20
using other programs ....................... 2-4, 2-8, 2-15, 2-26
using statistics commands .........................................2-34
utility programs ...........................................................2-26
vectored enter..............................................................2-37
while loops ..................................................................... 2-5
programs
newlines in...................................................................... 1-3
programs
action for object types.................................................. 1-1
applying to elements of a matrix ..............................2-20
are sequence of objects ................................................ 1-1
beeping .........................................................................1-48
calculation styles............................................................ 1-2
causing errors...............................................................1-33
checksums ...................................................................... 2-1
comments in .................................................................. 1-7
conditional structures.......................................1-13, 1-35
creating on computer ................................................... 1-7
cursor position during input .....................................1-42
debugging .....................................................................1-31
default input.................................................................1-40
displaying input forms ................................................1-45
displaying menus.................1-48, 1-52, 2-17, 2-18, 2-34
displaying output.....................................1-49, 1-50, 1-51
displaying string output..............................................1-50
editing ............................................................................. 1-6
elapsed time ................................................................... 2-4
entering........................................................................... 1-3
entry modes ................................................................... 1-6
entry modes during input ..........................................1-42
error actions.................................................................1-33
executing......................................................................... 1-3
finding roots in............................................................2-38
flags in...........................................................................1-27
getting input.........................1-37, 1-39, 1-40, 1-48, 1-49
HALT annunciator .....................................................1-31
halting ...........................................................................1-32
in local variable structure..................................... 1-2, 1-7
input as strings.............................................................1-40
introduction ................................................................... 1-1
killing...................................................................1-31, 1-32
labeling output.............................................................1-50
local variable structures................................................ 1-7
loop structures.............................................................1-17
naming ............................................................................ 1-3
not evaluating local variables ...................................... 1-9
objects in ........................................................................ 1-1
on the stack.................................................................... 1-2
pausing for output ......................................................1-51
prompting.......................................1-37, 1-38, 1-39, 1-40
resuming.....................1-31, 1-32, 1-37, 1-39, 1-53, 1-55
scope of local variables in............................................ 1-9

Index - 12

single-step execution........................................ 1-31, 1-32
size ...................................................................................2-1
stopping ..........................................................................1-4
storing..............................................................................1-3
structures in....................................................................1-2
subroutines .................................................................. 1-29
test commands............................................................ 1-11
trapping errors .................................................. 1-35, 1-36
turning off calculator ................................................. 1-55
user-defined functions............................................... 1-10
using as arguments ................................... 2-8, 2-14, 2-38
using as subroutines ..........................2-4, 2-8, 2-15, 2-26
utility............................................................................. 2-26
verifying ..........................................................................2-1
verifying input................................................... 1-42, 2-24
viewing ............................................................................1-6
waiting for keystrokes................................................ 1-48
projectile motion............................................................. 5-35
PROMPT....................................................................... 3-179
prompting .................................................... 1-37, 1-39, 1-40
PROMPTSTO .............................................................. 3-179
PROOT.......................................................................... 3-179
PROPFRAC.................................................................. 3-180
PRST............................................................................... 3-180
PRSTC............................................................................ 3-181
PRTPAR ........................................................................... D-8
PRVAR........................................................................... 3-181
PSDEV........................................................................... 3-181
pseudoprime.................................................................. 3-122
Psi.................................................................................... 3-182
PSI................................................................................... 3-182
PTAYL........................................................................... 3-182
PTPAR .............................................................................. D-8
PTPROP ........................................................................ 3-183
PURGE.......................................................................... 3-183
PUSH.............................................................................. 3-184
PUT ................................................................................ 3-184
PUTI............................................................................... 3-185
PVAR ............................................................................. 3-185
PVARS ........................................................................... 3-186
PVIEW........................................................................... 3-186
PWRFIT......................................................................... 3-187
PX→C............................................................................ 3-187

Q
QR................................................................................... 3-188
qr ... ................................................................................. 3-188
QUAD............................................................................ 3-189
QUOT............................................................................ 3-189
QUOTE......................................................................... 3-189
QXA ............................................................................... 3-190

R
R~SB ...................................................................................6-7
R→B............................................................................... 3-214

R→C ...............................................................................3-215
R→D...............................................................................3-215
R→I ................................................................................3-215
RAD ................................................................................3-190
RAND ............................................................................3-190
random number.............................................................3-190
range................................................................................3-115
RANK.............................................................................3-191
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
RCLMENU....................................................................3-194
RCLVX...........................................................................3-195
RCLΣ ..............................................................................3-195
RCWS .............................................................................3-195
RDM ...............................................................................3-195
RDZ ................................................................................3-196
RE....................................................................................3-196
reactance...........................................................................5-14
real gases...........................................................................5-25
real numbers
manipulating ................................................................2-22
REALASSUME .............................................................D-14
recalling
flag states......................................................................1-28
menu numbers.............................................................1-52
RECN .............................................................................3-197
RECT..............................................................................3-197
rectangle............................................................................5-45
recursion................................................................... 2-2, 2-28
RECV..............................................................................3-197
REF .................................................................................3-198
reflection...........................................................................5-39
refraction ..........................................................................5-37
REMAINDER ..............................................................3-198
RENAME ......................................................................3-198
REORDER....................................................................3-199
REPEAT ........................................................................3-199
REPL ..............................................................................3-199
RES .................................................................................3-200
resistancewire................................................................................5-11
resonant frequency..........................................................5-16
RESTORE .....................................................................3-201
RESULTANT ...............................................................3-201
REVLIST .......................................................................3-202
REWRITE .....................................................................3-202
ring.....................................................................................5-46
RISCH ............................................................................3-202

RKF ................................................................................ 3-203
RKFERR ....................................................................... 3-203
RKFSTEP...................................................................... 3-204
RL.................................................................................... 3-204
RLB................................................................................. 3-205
RND ............................................................................... 3-205
RNRM............................................................................ 3-206
ROLL ............................................................................. 3-206
ROLLD.......................................................................... 3-206
ROM version................................................................. 3-270
ROMUPLOAD ............................................................ 3-206
ROOT ............................................................................ 3-207
root-finder
in programs ................................................................. 2-38
ROOTR ........................................................................... 2-38
roots
in programs ................................................................. 2-38
ROT................................................................................ 3-207
rounding......................................................................... 3-205
ROW- ............................................................................. 3-207
ROW+ ........................................................................... 3-208
ROW→.......................................................................... 3-208
RPL mode........................................................................ 6-35
RPL>.............................................................................. 3-209
RPN syntax
converting to ............................................................... 2-27
RR ................................................................................... 3-209
RRB ................................................................................ 3-209
rref................................................................................... 3-210
RREF.............................................................................. 3-210
RREFMOD................................................................... 3-211
RRK................................................................................ 3-211
RRKSTEP ..................................................................... 3-212
RSBERR ........................................................................ 3-213
RSD ................................................................................ 3-213
RSWP ............................................................................. 3-214
RULES ........................................................................... 3-214
RUN menu ...................................................................... 1-33

S
S~N .....................................................................................6-8
S→H....................................................................................6-8
SAME............................................................................. 3-215
Saturn instruction set ..................................................... 6-23
SB~B ...................................................................................6-7
SBRK.............................................................................. 3-216
SCALE ........................................................................... 3-216
SCALEH........................................................................ 3-216
SCALEW ....................................................................... 3-216
SCATRPLOT................................................................ 3-217
SCATTER ..................................................................... 3-217
SCHUR .......................................................................... 3-218
SCI .................................................................................. 3-218
SCLΣ .............................................................................. 3-218
SCONJ ........................................................................... 3-219

Index - 13

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
receive .............................................................3-197, 3-232
send .................................................................3-219, 3-276
timeout........................................................................3-235
XMODEM receive.......................................3-276, 3-279
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
sizeof 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
solvingdifferential equations ................................................. 3-56
finding zeros.............................................................. 3-229
linear equations......................................................... 3-133
multiple equations .................................................... 3-153
system......................................................................... 3-152
SORT.............................................................................. 3-230
soundbeep .............................................................................. 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+ (Add) ...................................................................... 3-298< (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
SRAD ............................................................................. 3-231
SRB ................................................................................. 3-232
SRECV........................................................................... 3-232
SREPL............................................................................ 3-233
SREV...................................................................................6-8

SSEC .................................................................................1-44

ßßENTER .................................................................2-37, D-3

S
SST ..................................................................................3-233
SST↓................................................................................3-233
stackcalculations on............................................................... 1-2
stack operations
depth .............................................................................3-55
drop...................................................................3-69, 3-304
drop n ...........................................................................3-70
drop two.......................................................................3-69
duplicate .......................................................................3-70
duplicate n....................................................................3-71
duplicate n, return n .................................................3-155
duplicate twice.............................................................3-71
duplicate two................................................................3-70
nip................................................................................3-156
over .............................................................................3-162
pick..............................................................................3-169
pick three....................................................................3-169
roll down ....................................................................3-206
roll up..........................................................................3-206
rotate ...........................................................................3-207
swap ............................................................................3-244
un-pick........................................................................3-264
un-rotate .....................................................................3-265
stack syntax
in local variable structures ........................................... 1-2
test commands ............................................................1-11
START............................................................................3-234
start looping ...................................................1-18, 1-19, 2-2
STARTED ........................................................................D-8
STARTEQW ....................................................................D-9
STARTERR......................................................................D-9
STARTOFF......................................................................D-9
STARTRECV...................................................................D-9
STARTSEND ..................................................................D-9
STARTUP.........................................................................D-9
state change............................................................5-26, 5-27
statistics
add to matrix..............................................................3-289
best fit .........................................................................3-132
frequency bins .............................................................3-29
linear fit.......................................................................3-133
purge matrix.................................................................3-38
remove from matrix .................................................3-290
standard deviation.....................................................3-181
sum..................................................... 3-275, 3-281, 3-282
STD.................................................................................3-234
STEP...............................................................................3-235
step junction...........................................................5-52, 5-54

STEQ ............................................................................. 3-235
STIME............................................................................ 3-235
STO ................................................................................ 3-236
STO-............................................................................... 3-239
STO* .............................................................................. 3-239
STO/ .............................................................................. 3-239
STO+ ............................................................................. 3-238
STOALARM................................................................. 3-236
STOF.............................................................................. 3-237
STOKEYS..................................................................... 3-237
Store................................................................................ 3-303
STORE........................................................................... 3-238
storing
programs .........................................................................1-3
STOVX .......................................................................... 3-238
STOΣ.............................................................................. 3-240
STR→............................................................................. 3-240
strain ................................................................................. 5-56
STREAM ....................................................................... 3-241
stress ..........................................................................5-3, 5-56
STRING .......................................................................... 6-21
string operations
concatenating ............................................................ 3-298
converting.................................................................. 3-240
first character ............................................................ 3-103
length.......................................................................... 3-226
parsing........................................................................ 3-240
position ...................................................................... 3-174
replace ........................................................................ 3-233
substring..................................................................... 3-242
tail................................................................................ 3-247
strings
action in programs.........................................................1-1
as program output ...................................................... 1-49
input converted to...................................................... 1-40
manipulating...................................................................2-5
STROBJ ........................................................................... 6-21
STURM .......................................................................... 3-241
STURMAB .................................................................... 3-242
STWS.............................................................................. 3-242
SUB................................................................................. 3-242
subroutines .............................................2-4, 2-8, 2-15, 2-26
debugging..................................................................... 1-32
in programs ................................................................. 1-29
operation...................................................................... 1-29
single-step execution.................................................. 1-31
SUBST............................................................................ 3-243
SUBTMOD ................................................................... 3-244
Subtract .......................................................................... 3-299
Summation..................................................................... 3-289
SVD ................................................................................ 3-244
SVL ................................................................................. 3-244
SWAP ............................................................................. 3-244
SYLVESTER ................................................................ 3-245
SYSEVAL...................................................................... 3-245

Index - 15

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
temperaturedelta.............................................................................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
TEST menu......................................................................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
timeadding ...............................................................3-50, 3-107
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
TMENU......................................................................... 3-255
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-50transverse 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

UNTIL............................................................................3-265
UPDIR............................................................................3-265
UPs ..........................................................................6-21, 6-30
user input
reading key .................................................................3-123
waiting.........................................................................3-272
user-defined errors..........................................................1-33
user-defined functions
internal structure ...............................................1-10, 1-11
utility programs................................................................2-26
UTPC..............................................................................3-265
UTPF ..............................................................................3-266
UTPN .............................................................................3-266
UTPT ..............................................................................3-267
UVAL .............................................................................3-267

V
V→..................................................................................3-267
VANDERMONDE.....................................................3-269
VAR ................................................................................3-269
variables
action in programs ........................................................ 1-1
decrementing ...............................................................1-25
incrementing ................................................................1-25
VARS ..............................................................................3-270
vectored enter..................................................................2-37
VER.................................................................................3-270
VERSION......................................................................3-270
VFY...................................................................................2-26
waves.................................................................................5-59
VISIT ..............................................................................3-271
VISITB ...........................................................................3-271
VOL .................................................................................... 1-4
voltage....................................................................... 5-9, 5-51
VPOTENTIAL.............................................................3-271
VSPH ................................................................................1-41
VTYPE...........................................................................3-272
VX ....................................................................................D-14

W
WAIT..............................................................................3-272
waiting
displaying output.........................................................1-51
for keystrokes ....................................................1-48, 1-49
WALK ..............................................................................2-39
WGT .................................................................................1-53
Where..............................................................................3-286
WHILE...........................................................................3-273
while looping ........................................................... 1-24, 2-5
WIREFRAME...............................................................3-273
WSLOG..........................................................................3-274

X
XCOL............................................................................. 3-276
XGET ............................................................................ 3-276
XLIB~.................................................................................6-9
XMIT.............................................................................. 3-276
XNUM ........................................................................... 3-277
XOR ............................................................................... 3-277
XPON ............................................................................ 3-278
XPUT ............................................................................. 3-278
XQ .................................................................................. 3-278
XRECV.......................................................................... 3-279
XRNG............................................................................ 3-279
XROOT......................................................................... 3-279
XSEND.......................................................................... 3-280
XSERV........................................................................... 3-280
XVOL............................................................................. 3-281
XXRNG......................................................................... 3-281

Y
YCOL............................................................................. 3-282
YRNG ............................................................................ 3-283
YSLICE.......................................................................... 3-283
YVOL............................................................................. 3-284
YYRNG ......................................................................... 3-284

Z
ZEROS .......................................................................... 3-284
ZFACTOR .................................................................... 3-285
ZVOL............................................................................. 3-285

ΑαENTER................................................................. 2-37, D-2

ΠΠLIST ............................................................................ 3-134

ΣΣ- (Sigma Minus).......................................................... 3-290
Σ (Summation).............................................................. 3-289
Σ+ (Sigma Plus)............................................................ 3-289
ΣLINE ........................................................................... 3-132
ΣLIST............................................................................. 3-134
ΣX................................................................................... 3-275
ΣX*Y.............................................................................. 3-281
ΣX^2 .............................................................................. 3-276
ΣX2................................................................................. 3-275
ΣXY................................................................................ 3-281
ΣY ................................................................................... 3-282
ΣY^2............................................................................... 3-282
ΣY2................................................................................. 3-282

Index - 17