|
5 600 brands
1 870 000 user's guides |
|
|
|||||||||||||||
|
Search a brand
Advanced Search
|
Our partners wish to propose you the following products
|
User manual HP 48GII GRAPHING CALCULATOR - 49G+ & 48GII_ADVANCED USER'S REFERENCE MANUAL__E_F2228-90010.PDF
Diplodocs help download the user guide HP 48GII GRAPHING CALCULATOR - 49G+ & 48GII_ADVANCED USER'S REFERENCE MANUAL__E_F2228-90010.PDF.
You may also download the following manuals related to this product:
This product, although classified under the brand HP, may have been manufactured by COMPAQ, HEWLETT PACKARD after mergers, acquisitions, or a change in name.
Preview of the first 3 pages of manual
You either have JavaScript turned off or an old version of Adobe Flash Player Get the latest Flash Player.
User guide HP 48GII GRAPHING CALCULATOR - 49G+ & 48GII_ADVANCED USER'S REFERENCE MANUAL__E_F2228-90010.PDF
Detailed instructions for use are in the User's Guide. hp 49g+/ hp 48gII graphing calculator
advanced user's reference manual
H
Edition 1.1 HP part number F2228-90010
Printed Date: 2006/3/20
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 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. HEWLETT-PACKARD CO. SHALL NOT BE LIABLE FOR ANY ERRORS OR FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS MANUAL OR THE EXAMPLES CONTAINED HEREIN. © Copyright 1993-1998, 2005, 2006 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: Gene Wright, Tony Hutchins, Wlodek Mier-Jedrzejowicz, Jordi Hidalgo, Ted Kerber, Joe Horn, Richard Nelson, Bruce Horrocks and Jake Schwartz. Printing History Edition 1 September 2005 Edition 1.1 March 2006
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-8 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-21 Using Loop Counters ................................................................................................................................................ 1-24 Using Summations Instead of Loops ........................................................................................................................ 1-25 Using Flags.......................................................................................................................................................................1-25 Types of Flags........................................................................................................................................................... 1-26 Setting, Clearing, and Testing Flags ......................................................................................................................... 1-26 Recalling and Storing the Flag States ....................................................................................................................... 1-27 Using Subroutines ............................................................................................................................................................1-28 Single-Stepping through a Program .................................................................................................................................1-29 Trapping Errors ................................................................................................................................................................1-32 Causing and Analyzing Errors .................................................................................................................................. 1-32 Making an Error Trap ............................................................................................................................................... 1-33 Input .................................................................................................................................................................................1-35 Data Input Commands............................................................................................................................................... 1-35 Using PROMPT ... CONT for Input ........................................................................................................................ 1-35 Using DISP FREEZE HALT ... CONT for Input .................................................................................................... 1-37 Using INPUT ... ENTER for Input .......................................................................................................................... 1-38 Using INFORM and CHOOSE for Input.................................................................................................................. 1-42 Beeping to Get Attention .......................................................................................................................................... 1-45 Stopping a Program for Keystroke Input .........................................................................................................................1-46 Using WAIT for Keystroke Input ............................................................................................................................. 1-46 Using KEY for Keystroke Input ............................................................................................................................... 1-46 Output ....................................................................................................................................................................... 1-46 Data Output Commands............................................................................................................................................ 1-47 Labeling Output with Tags ....................................................................................................................................... 1-47 Labeling and Displaying Output as Strings .............................................................................................................. 1-48 Pausing to Display Output ........................................................................................................................................ 1-48 Using MSGBOX to Display Output ......................................................................................................................... 1-49 Using Menus with Programs ............................................................................................................................................1-49 Using Menus for Input .............................................................................................................................................. 1-50 Using Menus to Run Programs ................................................................................................................................. 1-50 Turning Off the hp49g+/hp48gII from a Program ...........................................................................................................1-52 2. RPL Programming Examples ................................................................................................................................................ 2-1 Fibonacci Numbers ............................................................................................................................................................2-1
Contents -1
FIB1 (Fibonacci Numbers, Recursive Version).......................................................................................................... 2-1 FIB2 (Fibonacci Numbers, Loop Version) ................................................................................................................. 2-2 FIBT (Comparing Program-Execution Time)............................................................................................................. 2-3 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-14 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-24 Converting Procedures from Algebraic to RPN .............................................................................................................. 2-27 Bessel Functions .............................................................................................................................................................. 2-29 Animation of Successive Taylor's Polynomials ............................................................................................................... 2-30 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-4 ABS ................................................................................................................................................................................... 3-4 ACK ................................................................................................................................................................................... 3-4 ACKALL ............................................................................................................................................................................ 3-4 ACOS ................................................................................................................................................................................ 3-5 ACOS2S ........................................................................................................................................................................... 3-6 ACOSH ............................................................................................................................................................................. 3-6 ADD ................................................................................................................................................................................... 3-7 ADDTMOD ....................................................................................................................................................................... 3-8 ADDTOREAL ................................................................................................................................................................... 3-8 ALGB................................................................................................................................................................................. 3-8 ALOG ................................................................................................................................................................................ 3-8 AMORT ............................................................................................................................................................................. 3-8 AND ................................................................................................................................................................................... 3-8 ANIMATE.......................................................................................................................................................................... 3-9 ANS ................................................................................................................................................................................. 3-10 APPLY............................................................................................................................................................................. 3-10 ARC ................................................................................................................................................................................. 3-10 ARCHIVE........................................................................................................................................................................ 3-11 ARG................................................................................................................................................................................. 3-11 ARIT ................................................................................................................................................................................ 3-12 ARRY .......................................................................................................................................................................... 3-12 ARRY .......................................................................................................................................................................... 3-12 ASIN ................................................................................................................................................................................ 3-12 ASIN2C ........................................................................................................................................................................... 3-14 ASIN2T ........................................................................................................................................................................... 3-14
Contents - 2
ASINH..............................................................................................................................................................................3-14 ASN .................................................................................................................................................................................3-14 ASR .................................................................................................................................................................................3-15 ASSUME.........................................................................................................................................................................3-16 ATAN ...............................................................................................................................................................................3-16 ATAN2S ..........................................................................................................................................................................3-17 ATANH ............................................................................................................................................................................3-17 ATICK ..............................................................................................................................................................................3-18 ATTACH..........................................................................................................................................................................3-18 AUGMENT......................................................................................................................................................................3-19 AUTO...............................................................................................................................................................................3-19 AXES ...............................................................................................................................................................................3-20 AXL ..................................................................................................................................................................................3-20 AXM .................................................................................................................................................................................3-20 AXQ .................................................................................................................................................................................3-20 BAR .................................................................................................................................................................................3-20 BARPLOT .......................................................................................................................................................................3-21 BASIS ..............................................................................................................................................................................3-22 BAUD...............................................................................................................................................................................3-22 BEEP ...............................................................................................................................................................................3-22 BESTFIT .........................................................................................................................................................................3-22 BIN ...................................................................................................................................................................................3-22 BINS ................................................................................................................................................................................3-23 BLANK.............................................................................................................................................................................3-23 BOX .................................................................................................................................................................................3-23 BUFLEN ..........................................................................................................................................................................3-24 BYTES.............................................................................................................................................................................3-24 BR ................................................................................................................................................................................3-24 C2P..................................................................................................................................................................................3-24 CASCFG .........................................................................................................................................................................3-25 CASCMD ........................................................................................................................................................................3-25 CASE...............................................................................................................................................................................3-25 CEIL.................................................................................................................................................................................3-25 CENTR ............................................................................................................................................................................3-26 CF ....................................................................................................................................................................................3-26 %CH ................................................................................................................................................................................3-26 CHINREM .......................................................................................................................................................................3-27 CHOLESKY ....................................................................................................................................................................3-27 CHOOSE ........................................................................................................................................................................3-27 CHR .................................................................................................................................................................................3-27 CIRC ................................................................................................................................................................................3-28 CKSM ..............................................................................................................................................................................3-28 CLEAR ............................................................................................................................................................................3-28 CLKADJ ..........................................................................................................................................................................3-28 CLLCD.............................................................................................................................................................................3-29 CLOSEIO ........................................................................................................................................................................3-29 CL ..................................................................................................................................................................................3-29 CLVAR ............................................................................................................................................................................3-29 CMPLX ............................................................................................................................................................................3-29 CNRM..............................................................................................................................................................................3-30 COL..............................................................................................................................................................................3-30 COL..............................................................................................................................................................................3-30 COL ...............................................................................................................................................................................3-30 COL+ ...............................................................................................................................................................................3-31 COLCT ............................................................................................................................................................................3-31 COLLECT .......................................................................................................................................................................3-31 COL ...............................................................................................................................................................................3-31 COMB..............................................................................................................................................................................3-32
Contents - 3
CON................................................................................................................................................................................. 3-32 COND.............................................................................................................................................................................. 3-33 CONIC............................................................................................................................................................................. 3-33 CONJ............................................................................................................................................................................... 3-34 CONLIB........................................................................................................................................................................... 3-34 CONST ........................................................................................................................................................................... 3-35 CONSTANTS................................................................................................................................................................. 3-35 CONT .............................................................................................................................................................................. 3-35 CONVERT ...................................................................................................................................................................... 3-35 CORR.............................................................................................................................................................................. 3-35 COS................................................................................................................................................................................. 3-36 COSH.............................................................................................................................................................................. 3-36 COV................................................................................................................................................................................. 3-37 CR.................................................................................................................................................................................... 3-37 CRDIR............................................................................................................................................................................. 3-37 CROSS ........................................................................................................................................................................... 3-37 CSWP ............................................................................................................................................................................. 3-38 CURL............................................................................................................................................................................... 3-38 CYCLOTOMIC............................................................................................................................................................... 3-38 CYLIN.............................................................................................................................................................................. 3-38 CPX ............................................................................................................................................................................. 3-38 CR................................................................................................................................................................................ 3-39 DARCY ........................................................................................................................................................................... 3-39 DATE............................................................................................................................................................................... 3-39 DATE........................................................................................................................................................................... 3-39 DATE+ ............................................................................................................................................................................ 3-40 DBUG.............................................................................................................................................................................. 3-40 DDAYS............................................................................................................................................................................ 3-40 DEC ................................................................................................................................................................................. 3-41 DECR .............................................................................................................................................................................. 3-41 DEDICACE..................................................................................................................................................................... 3-41 DEF ................................................................................................................................................................................. 3-41 DEFINE........................................................................................................................................................................... 3-41 DEG................................................................................................................................................................................. 3-42 DEGREE......................................................................................................................................................................... 3-42 DELALARM .................................................................................................................................................................... 3-42 DELAY ............................................................................................................................................................................ 3-42 DELKEYS ....................................................................................................................................................................... 3-42 DEPND ........................................................................................................................................................................... 3-43 DEPTH............................................................................................................................................................................ 3-44 DERIV ............................................................................................................................................................................. 3-44 DERVX............................................................................................................................................................................ 3-44 DESOLVE....................................................................................................................................................................... 3-44 DET ................................................................................................................................................................................. 3-44 DETACH ......................................................................................................................................................................... 3-44 DIAG............................................................................................................................................................................ 3-45 DIAG............................................................................................................................................................................ 3-45 DIAGMAP ....................................................................................................................................................................... 3-45 DIFF................................................................................................................................................................................. 3-45 DIFFEQ........................................................................................................................................................................... 3-46 DIR................................................................................................................................................................................... 3-47 DISP ................................................................................................................................................................................ 3-47 DISPXY........................................................................................................................................................................... 3-47 DISTRIB.......................................................................................................................................................................... 3-48 DIV................................................................................................................................................................................... 3-48 DIV2................................................................................................................................................................................. 3-48 DIV2MOD ....................................................................................................................................................................... 3-48 DIVIS ............................................................................................................................................................................... 3-48
Contents - 4
DIVMOD..........................................................................................................................................................................3-48 DIVPC..............................................................................................................................................................................3-48 dn .....................................................................................................................................................................................3-48 DO....................................................................................................................................................................................3-48 DOERR ...........................................................................................................................................................................3-49 DOLIST ...........................................................................................................................................................................3-49 DOMAIN..........................................................................................................................................................................3-50 DOSUBS.........................................................................................................................................................................3-50 DOT .................................................................................................................................................................................3-50 DRAW .............................................................................................................................................................................3-51 DRAW3DMATRIX .........................................................................................................................................................3-51 DRAX...............................................................................................................................................................................3-51 DROITE...........................................................................................................................................................................3-52 DROP ..............................................................................................................................................................................3-52 DROP2 ............................................................................................................................................................................3-52 DROPN ...........................................................................................................................................................................3-52 DTAG...............................................................................................................................................................................3-52 DUP .................................................................................................................................................................................3-53 DUP2 ...............................................................................................................................................................................3-53 DUPDUP.........................................................................................................................................................................3-53 DUPN ..............................................................................................................................................................................3-53 DR ................................................................................................................................................................................3-54 e .......................................................................................................................................................................................3-54 EDIT.................................................................................................................................................................................3-54 EDITB ..............................................................................................................................................................................3-55 EGCD ..............................................................................................................................................................................3-55 EGV .................................................................................................................................................................................3-55 EGVL ...............................................................................................................................................................................3-55 ELSE................................................................................................................................................................................3-55 END .................................................................................................................................................................................3-56 ENDSUB .........................................................................................................................................................................3-56 ENG .................................................................................................................................................................................3-56 EPSX0.............................................................................................................................................................................3-56 EQNLIB ...........................................................................................................................................................................3-56 EQW ................................................................................................................................................................................3-57 EQ ................................................................................................................................................................................3-57 ERASE ............................................................................................................................................................................3-57 ERR0 ...............................................................................................................................................................................3-57 ERRM ..............................................................................................................................................................................3-57 ERRN ..............................................................................................................................................................................3-58 EULER ............................................................................................................................................................................3-58 EVAL................................................................................................................................................................................3-58 EXLR ...............................................................................................................................................................................3-59 EX&LN.............................................................................................................................................................................3-59 EXP..................................................................................................................................................................................3-59 EXP2HYP .......................................................................................................................................................................3-60 EXP2POW ......................................................................................................................................................................3-60 EXPAN ............................................................................................................................................................................3-60 EXPAND .........................................................................................................................................................................3-60 EXPANDMOD ................................................................................................................................................................3-60 EXPFIT............................................................................................................................................................................3-60 EXPLN.............................................................................................................................................................................3-60 EXPM ..............................................................................................................................................................................3-60 EYEPT.............................................................................................................................................................................3-61 F0...................................................................................................................................................................................3-61 FACT ...............................................................................................................................................................................3-61 FACTOR .........................................................................................................................................................................3-62 FACTORMOD ................................................................................................................................................................3-62
Contents - 5
FACTORS ...................................................................................................................................................................... 3-62 FANNING ....................................................................................................................................................................... 3-62 FAST3D .......................................................................................................................................................................... 3-62 FCOEF............................................................................................................................................................................ 3-63 FC?.................................................................................................................................................................................. 3-63 FC?C ............................................................................................................................................................................... 3-63 FDISTRIB ....................................................................................................................................................................... 3-64 FFT .................................................................................................................................................................................. 3-64 FILER .............................................................................................................................................................................. 3-64 FINDALARM .................................................................................................................................................................. 3-64 FINISH ............................................................................................................................................................................ 3-65 FIX ................................................................................................................................................................................... 3-65 FLASHEVAL .................................................................................................................................................................. 3-65 FLOOR............................................................................................................................................................................ 3-66 FONT6 ............................................................................................................................................................................ 3-66 FONT7 ............................................................................................................................................................................ 3-66 FONT8 ............................................................................................................................................................................ 3-66 FONT........................................................................................................................................................................... 3-67 FONT........................................................................................................................................................................... 3-67 FOR ................................................................................................................................................................................. 3-67 FOURIER ....................................................................................................................................................................... 3-68 FP .................................................................................................................................................................................... 3-68 FREE............................................................................................................................................................................... 3-68 FREEZE.......................................................................................................................................................................... 3-68 FROOTS......................................................................................................................................................................... 3-69 FS? .................................................................................................................................................................................. 3-69 FS?C ............................................................................................................................................................................... 3-69 FUNCTION..................................................................................................................................................................... 3-70 FXND............................................................................................................................................................................... 3-71 GAMMA .......................................................................................................................................................................... 3-71 GAUSS ........................................................................................................................................................................... 3-71 GBASIS........................................................................................................................................................................... 3-71 GCD................................................................................................................................................................................. 3-71 GCDMOD ....................................................................................................................................................................... 3-71 GET ................................................................................................................................................................................. 3-71 GETI ................................................................................................................................................................................ 3-72 GOR ................................................................................................................................................................................ 3-73 GRAD.............................................................................................................................................................................. 3-73 GRAMSCHMIDT ........................................................................................................................................................... 3-73 GREDUCE ..................................................................................................................................................................... 3-73 GRIDMAP....................................................................................................................................................................... 3-73 GROB.......................................................................................................................................................................... 3-74 GROB.............................................................................................................................................................................. 3-74 GROBADD ..................................................................................................................................................................... 3-74 GXOR.............................................................................................................................................................................. 3-75 HADAMARD................................................................................................................................................................... 3-75 HALFTAN ....................................................................................................................................................................... 3-75 HALT ............................................................................................................................................................................... 3-75 HEAD .............................................................................................................................................................................. 3-75 HEADER..................................................................................................................................................................... 3-76 HEADER..................................................................................................................................................................... 3-76 HELP ............................................................................................................................................................................... 3-76 HERMITE ....................................................................................................................................................................... 3-76 HESS............................................................................................................................................................................... 3-76 HEX ................................................................................................................................................................................. 3-76 HILBERT......................................................................................................................................................................... 3-77 HISTOGRAM ................................................................................................................................................................. 3-77 HISTPLOT ...................................................................................................................................................................... 3-77
Contents - 6
HMS...............................................................................................................................................................................3-78 HMS+ ..............................................................................................................................................................................3-78 HMS.............................................................................................................................................................................3-79 HMS.............................................................................................................................................................................3-79 HOME..............................................................................................................................................................................3-79 HORNER ........................................................................................................................................................................3-79 i.........................................................................................................................................................................................3-80 IABCUV...........................................................................................................................................................................3-80 IBASIS.............................................................................................................................................................................3-80 IBERNOULLI ..................................................................................................................................................................3-80 IBP ...................................................................................................................................................................................3-80 ICHINREM ......................................................................................................................................................................3-80 IDN...................................................................................................................................................................................3-80 IDIV2................................................................................................................................................................................3-81 IEGCD .............................................................................................................................................................................3-81 IF ......................................................................................................................................................................................3-81 IFERR..............................................................................................................................................................................3-81 IFFT .................................................................................................................................................................................3-82 IFT....................................................................................................................................................................................3-83 IFTE .................................................................................................................................................................................3-83 ILAP .................................................................................................................................................................................3-83 IM .....................................................................................................................................................................................3-83 IMAGE.............................................................................................................................................................................3-84 INCR ................................................................................................................................................................................3-84 INDEP..............................................................................................................................................................................3-84 INFORM ..........................................................................................................................................................................3-85 INPUT..............................................................................................................................................................................3-86 INT ...................................................................................................................................................................................3-86 INTEGER ........................................................................................................................................................................3-87 INTVX ..............................................................................................................................................................................3-87 INV ...................................................................................................................................................................................3-87 INVMOD..........................................................................................................................................................................3-87 IP......................................................................................................................................................................................3-87 IQUOT .............................................................................................................................................................................3-87 IREMAINDER.................................................................................................................................................................3-87 ISOL.................................................................................................................................................................................3-87 ISOM................................................................................................................................................................................3-88 ISPRIME? .......................................................................................................................................................................3-88 IR..................................................................................................................................................................................3-88 JORDAN .........................................................................................................................................................................3-88 KER .................................................................................................................................................................................3-88 KERRM ...........................................................................................................................................................................3-88 KEY..................................................................................................................................................................................3-89 KEYEVAL........................................................................................................................................................................3-89 KEYTIME ....................................................................................................................................................................3-89 KEYTIME ....................................................................................................................................................................3-89 KGET...............................................................................................................................................................................3-90 KILL .................................................................................................................................................................................3-90 LABEL .............................................................................................................................................................................3-90 LAGRANGE....................................................................................................................................................................3-90 LANGUAGE................................................................................................................................................................3-91 LANGUAGE................................................................................................................................................................3-91 LAP ..................................................................................................................................................................................3-91 LAPL ................................................................................................................................................................................3-91 LAST................................................................................................................................................................................3-91 LASTARG .......................................................................................................................................................................3-91 LCD..............................................................................................................................................................................3-92 LCD..............................................................................................................................................................................3-92
Contents - 7
LCM ................................................................................................................................................................................. 3-92 LCXM .............................................................................................................................................................................. 3-92 LDEC............................................................................................................................................................................... 3-92 LEGENDRE ................................................................................................................................................................... 3-92 LGCD .............................................................................................................................................................................. 3-92 LIBEVAL ......................................................................................................................................................................... 3-92 LIBS................................................................................................................................................................................. 3-93 lim .................................................................................................................................................................................... 3-93 LIMIT ............................................................................................................................................................................... 3-93 LIN ................................................................................................................................................................................... 3-93 LINE................................................................................................................................................................................. 3-93 LINE .............................................................................................................................................................................. 3-93 LINFIT ............................................................................................................................................................................. 3-94 LININ ............................................................................................................................................................................... 3-94 LINSOLVE ...................................................................................................................................................................... 3-94 LIST ............................................................................................................................................................................. 3-94 LIST ............................................................................................................................................................................. 3-94 LIST............................................................................................................................................................................... 3-95 LIST .............................................................................................................................................................................. 3-95 LIST............................................................................................................................................................................... 3-95 LN .................................................................................................................................................................................... 3-95 LNAME............................................................................................................................................................................ 3-96 LNCOLLECT .................................................................................................................................................................. 3-97 LNP1 ............................................................................................................................................................................... 3-97 LOCAL ............................................................................................................................................................................ 3-97 LOG ................................................................................................................................................................................. 3-97 LOGFIT ........................................................................................................................................................................... 3-98 LQ .................................................................................................................................................................................... 3-98 LR .................................................................................................................................................................................... 3-98 LSQ ................................................................................................................................................................................. 3-99 LU .................................................................................................................................................................................... 3-99 LVAR ............................................................................................................................................................................. 3-100 MAD............................................................................................................................................................................... 3-100 MAIN ............................................................................................................................................................................. 3-100 MANT ............................................................................................................................................................................ 3-100 MAP............................................................................................................................................................................... 3-100 MATCH....................................................................................................................................................................... 3-100 MATCH....................................................................................................................................................................... 3-101 MATHS ......................................................................................................................................................................... 3-101 MATR ............................................................................................................................................................................ 3-101 MAX............................................................................................................................................................................... 3-101 MAXR............................................................................................................................................................................ 3-102 MAX ............................................................................................................................................................................ 3-102 MCALC ......................................................................................................................................................................... 3-102 MEAN............................................................................................................................................................................ 3-103 MEM .............................................................................................................................................................................. 3-103 MENU............................................................................................................................................................................ 3-103 MENUXY ...................................................................................................................................................................... 3-104 MERGE......................................................................................................................................................................... 3-104 MIN ................................................................................................................................................................................ 3-104 MINEHUNT .................................................................................................................................................................. 3-104 MINIFONT ................................................................................................................................................................ 3-105 MINIFONT ................................................................................................................................................................ 3-105 MINIT............................................................................................................................................................................. 3-105 MINR ............................................................................................................................................................................. 3-106 MIN.............................................................................................................................................................................. 3-106 MITM ............................................................................................................................................................................. 3-106 MKISOM ....................................................................................................................................................................... 3-106
Contents - 8
MOD ..............................................................................................................................................................................3-106 MODSTO ......................................................................................................................................................................3-107 MODULAR....................................................................................................................................................................3-107 MROOT.........................................................................................................................................................................3-107 MSGBOX ......................................................................................................................................................................3-107 MSLV.............................................................................................................................................................................3-107 MSOLVR.......................................................................................................................................................................3-107 MULTMOD....................................................................................................................................................................3-108 MUSER .........................................................................................................................................................................3-108 NDISP........................................................................................................................................................................3-108 NDIST............................................................................................................................................................................3-108 NDUPN .........................................................................................................................................................................3-109 NEG ...............................................................................................................................................................................3-109 NEWOB.........................................................................................................................................................................3-109 NEXT .............................................................................................................................................................................3-110 NEXTPRIME ................................................................................................................................................................3-110 NIP .................................................................................................................................................................................3-110 NOT ...............................................................................................................................................................................3-110 NOVAL ..........................................................................................................................................................................3-111 N ..................................................................................................................................................................................3-111 NSUB.............................................................................................................................................................................3-111 NUM...........................................................................................................................................................................3-111 NUM...............................................................................................................................................................................3-112 NUMX ............................................................................................................................................................................3-112 NUMY ............................................................................................................................................................................3-112 OBJ ............................................................................................................................................................................3-113 OCT ...............................................................................................................................................................................3-113 OFF................................................................................................................................................................................3-113 OLDPRT........................................................................................................................................................................3-114 OPENIO ........................................................................................................................................................................3-114 OR..................................................................................................................................................................................3-114 ORDER .........................................................................................................................................................................3-115 OVER ............................................................................................................................................................................3-115 P2C ................................................................................................................................................................................3-115 PA2B2 ...........................................................................................................................................................................3-115 PARAMETRIC..............................................................................................................................................................3-116 PARITY .........................................................................................................................................................................3-116 PARSURFACE ............................................................................................................................................................3-117 PARTFRAC ..................................................................................................................................................................3-118 PATH .............................................................................................................................................................................3-118 PCAR.............................................................................................................................................................................3-118 PCOEF ..........................................................................................................................................................................3-118 PCONTOUR.................................................................................................................................................................3-118 PCOV ............................................................................................................................................................................3-119 PDIM..............................................................................................................................................................................3-119 PERM ............................................................................................................................................................................3-120 PEVAL...........................................................................................................................................................................3-120 PGDIR ...........................................................................................................................................................................3-120 PICK ..............................................................................................................................................................................3-121 PICK3 ............................................................................................................................................................................3-121 PICT...............................................................................................................................................................................3-121 PICTURE ......................................................................................................................................................................3-121 PINIT..............................................................................................................................................................................3-122 PIX? ...............................................................................................................................................................................3-122 PIXOFF .........................................................................................................................................................................3-122 PIXON ...........................................................................................................................................................................3-122 PKT ................................................................................................................................................................................3-122 PLOT .............................................................................................................................................................................3-123
Contents - 9
PLOTADD..................................................................................................................................................................... 3-123 PMAX ............................................................................................................................................................................ 3-123 PMIN ............................................................................................................................................................................. 3-123 PMINI ............................................................................................................................................................................ 3-124 POLAR.......................................................................................................................................................................... 3-124 POLYNOMIAL.............................................................................................................................................................. 3-125 POP ............................................................................................................................................................................... 3-125 POS ............................................................................................................................................................................... 3-125 POTENTIAL ................................................................................................................................................................. 3-125 POWEXPAND.............................................................................................................................................................. 3-125 POWMOD..................................................................................................................................................................... 3-125 PR1................................................................................................................................................................................ 3-125 PREDV.......................................................................................................................................................................... 3-126 PREDX.......................................................................................................................................................................... 3-126 PREDY.......................................................................................................................................................................... 3-127 PREVAL........................................................................................................................................................................ 3-127 PREVPRIME ................................................................................................................................................................ 3-127 PRLCD.......................................................................................................................................................................... 3-128 PROMPT ...................................................................................................................................................................... 3-128 PROMPTSTO .............................................................................................................................................................. 3-128 PROOT ......................................................................................................................................................................... 3-128 PROPFRAC ................................................................................................................................................................. 3-129 PRST............................................................................................................................................................................. 3-129 PRSTC.......................................................................................................................................................................... 3-129 PRVAR.......................................................................................................................................................................... 3-129 PSDEV .......................................................................................................................................................................... 3-130 PSI ................................................................................................................................................................................. 3-130 Psi.................................................................................................................................................................................. 3-130 PTAYL........................................................................................................................................................................... 3-130 PURGE ......................................................................................................................................................................... 3-131 PUSH ............................................................................................................................................................................ 3-131 PUT ............................................................................................................................................................................... 3-131 PUTI .............................................................................................................................................................................. 3-132 PVAR............................................................................................................................................................................. 3-133 PVARS.......................................................................................................................................................................... 3-133 PVIEW........................................................................................................................................................................... 3-134 PWRFIT ........................................................................................................................................................................ 3-134 PXC ........................................................................................................................................................................... 3-134 Q ................................................................................................................................................................................ 3-135 Q .............................................................................................................................................................................. 3-135 qr.................................................................................................................................................................................... 3-135 QR ................................................................................................................................................................................. 3-136 QUAD............................................................................................................................................................................ 3-136 QUOT............................................................................................................................................................................ 3-136 QUOTE ......................................................................................................................................................................... 3-136 QXA ............................................................................................................................................................................... 3-137 RAD ............................................................................................................................................................................... 3-137 RAND ............................................................................................................................................................................ 3-137 RANK ............................................................................................................................................................................ 3-137 RANM............................................................................................................................................................................ 3-138 RATIO ........................................................................................................................................................................... 3-138 RCEQ............................................................................................................................................................................ 3-139 RCI................................................................................................................................................................................. 3-139 RCIJ............................................................................................................................................................................... 3-139 RCL ............................................................................................................................................................................... 3-139 RCLALARM.................................................................................................................................................................. 3-140 RCLF ............................................................................................................................................................................. 3-140 RCLKEYS..................................................................................................................................................................... 3-141
Contents - 10
RCLMENU ....................................................................................................................................................................3-141 RCLVX ..........................................................................................................................................................................3-141 RCL .............................................................................................................................................................................3-141 RCWS ...........................................................................................................................................................................3-142 RDM...............................................................................................................................................................................3-142 RDZ ...............................................................................................................................................................................3-142 RE ..................................................................................................................................................................................3-143 RECN ............................................................................................................................................................................3-143 RECT.............................................................................................................................................................................3-143 RECV.............................................................................................................................................................................3-144 REF................................................................................................................................................................................3-144 REMAINDER................................................................................................................................................................3-144 RENAME.......................................................................................................................................................................3-144 REORDER....................................................................................................................................................................3-144 REPEAT........................................................................................................................................................................3-144 REPL .............................................................................................................................................................................3-144 RES ...............................................................................................................................................................................3-145 RESTORE ....................................................................................................................................................................3-146 RESULTANT ................................................................................................................................................................3-146 REVLIST .......................................................................................................................................................................3-146 REWRITE .....................................................................................................................................................................3-147 RISCH ...........................................................................................................................................................................3-147 RKF................................................................................................................................................................................3-147 RKFERR .......................................................................................................................................................................3-147 RKFSTEP .....................................................................................................................................................................3-148 RL...................................................................................................................................................................................3-148 RLB................................................................................................................................................................................3-148 RND ...............................................................................................................................................................................3-149 RNRM............................................................................................................................................................................3-149 ROLL .............................................................................................................................................................................3-150 ROLLD ..........................................................................................................................................................................3-150 ROMUPLOAD ..............................................................................................................................................................3-150 ROOT ............................................................................................................................................................................3-150 ROT ...............................................................................................................................................................................3-151 ROW............................................................................................................................................................................3-151 ROW+............................................................................................................................................................................3-151 ROW ..........................................................................................................................................................................3-151 ROW ..........................................................................................................................................................................3-152 RPL>..............................................................................................................................................................................3-152 RR..................................................................................................................................................................................3-152 RRB ...............................................................................................................................................................................3-153 rref..................................................................................................................................................................................3-153 RREF.............................................................................................................................................................................3-153 RREFMOD....................................................................................................................................................................3-153 RRK ...............................................................................................................................................................................3-153 RRKSTEP.....................................................................................................................................................................3-154 RSBERR .......................................................................................................................................................................3-155 RSD ...............................................................................................................................................................................3-155 RSWP............................................................................................................................................................................3-156 RULES ..........................................................................................................................................................................3-156 RB ..............................................................................................................................................................................3-156 RC ..............................................................................................................................................................................3-156 RD ..............................................................................................................................................................................3-157 RI................................................................................................................................................................................3-157 SAME ............................................................................................................................................................................3-157 SBRK.............................................................................................................................................................................3-157 SCALE...........................................................................................................................................................................3-158 SCALEH........................................................................................................................................................................3-158
Contents - 11
SCALEW....................................................................................................................................................................... 3-158 SCATRPLOT................................................................................................................................................................ 3-158 SCATTER..................................................................................................................................................................... 3-159 SCHUR ......................................................................................................................................................................... 3-159 SCI................................................................................................................................................................................. 3-160 SCL ............................................................................................................................................................................. 3-160 SCONJ.......................................................................................................................................................................... 3-160 SCROLL ....................................................................................................................................................................... 3-160 SDEV............................................................................................................................................................................. 3-161 SEND ............................................................................................................................................................................ 3-161 SEQ ............................................................................................................................................................................... 3-161 SERIES......................................................................................................................................................................... 3-162 SERVER ....................................................................................................................................................................... 3-162 SEVAL........................................................................................................................................................................... 3-162 SF .................................................................................................................................................................................. 3-162 SHOW ........................................................................................................................................................................... 3-162 SIDENS......................................................................................................................................................................... 3-163 SIGMA........................................................................................................................................................................... 3-163 SIGMAVX ..................................................................................................................................................................... 3-163 SIGN.............................................................................................................................................................................. 3-163 SIGNTAB ...................................................................................................................................................................... 3-164 SIMP2 ........................................................................................................................................................................... 3-164 SIMPLIFY ..................................................................................................................................................................... 3-164 SIN................................................................................................................................................................................. 3-164 SINCOS ........................................................................................................................................................................ 3-164 SINH.............................................................................................................................................................................. 3-164 SINV .............................................................................................................................................................................. 3-165 SIZE............................................................................................................................................................................... 3-165 SL................................................................................................................................................................................... 3-165 SLB................................................................................................................................................................................ 3-166 SLOPEFIELD............................................................................................................................................................... 3-166 SNEG ............................................................................................................................................................................ 3-167 SNRM............................................................................................................................................................................ 3-167 SOLVE .......................................................................................................................................................................... 3-167 SOLVEQN .................................................................................................................................................................... 3-167 SOLVER ....................................................................................................................................................................... 3-168 SOLVEVX..................................................................................................................................................................... 3-168 SORT ............................................................................................................................................................................ 3-168 SPHERE ....................................................................................................................................................................... 3-168 SQ.................................................................................................................................................................................. 3-168 SR.................................................................................................................................................................................. 3-169 SRAD ............................................................................................................................................................................ 3-169 SRB ............................................................................................................................................................................... 3-169 SRECV.......................................................................................................................................................................... 3-169 SREPL .......................................................................................................................................................................... 3-170 START .......................................................................................................................................................................... 3-170 STD ............................................................................................................................................................................... 3-171 STEP ............................................................................................................................................................................. 3-172 STEQ............................................................................................................................................................................. 3-172 STIME ........................................................................................................................................................................... 3-172 STO ............................................................................................................................................................................... 3-172 STOALARM.................................................................................................................................................................. 3-173 STOF............................................................................................................................................................................. 3-173 STOKEYS..................................................................................................................................................................... 3-174 STORE.......................................................................................................................................................................... 3-174 STOVX.......................................................................................................................................................................... 3-174 STO+............................................................................................................................................................................. 3-174 STO ............................................................................................................................................................................. 3-174 STO*.............................................................................................................................................................................. 3-175
Contents - 12
STO/ ..............................................................................................................................................................................3-175 STO .............................................................................................................................................................................3-176 STR............................................................................................................................................................................3-176 STR............................................................................................................................................................................3-176 STREAM .......................................................................................................................................................................3-176 STURM..........................................................................................................................................................................3-177 STURMAB ....................................................................................................................................................................3-177 STWS ............................................................................................................................................................................3-177 SUB ...............................................................................................................................................................................3-177 SUBST ..........................................................................................................................................................................3-178 SUBTMOD....................................................................................................................................................................3-178 SVD ...............................................................................................................................................................................3-178 SVL ................................................................................................................................................................................3-178 SWAP ............................................................................................................................................................................3-179 SYSEVAL......................................................................................................................................................................3-179 SYLVESTER ................................................................................................................................................................3-179 SYST2MAT...................................................................................................................................................................3-179 %T..................................................................................................................................................................................3-179 TABVAL ........................................................................................................................................................................3-180 TABVAR........................................................................................................................................................................3-180 TAG............................................................................................................................................................................3-180 TAIL ...............................................................................................................................................................................3-180 TAN................................................................................................................................................................................3-180 TAN2CS2......................................................................................................................................................................3-181 TAN2SC ........................................................................................................................................................................3-181 TAN2SC2......................................................................................................................................................................3-181 TANH.............................................................................................................................................................................3-181 TAYLOR0......................................................................................................................................................................3-181 TAYLR...........................................................................................................................................................................3-181 TCHEBYCHEFF ..........................................................................................................................................................3-182 TCOLLECT...................................................................................................................................................................3-182 TDELTA ........................................................................................................................................................................3-182 TESTS...........................................................................................................................................................................3-182 TEVAL ...........................................................................................................................................................................3-182 TEXPAND.....................................................................................................................................................................3-183 TEXT..............................................................................................................................................................................3-183 THEN.............................................................................................................................................................................3-183 TICKS ............................................................................................................................................................................3-183 TIME ..............................................................................................................................................................................3-183 TIME ..........................................................................................................................................................................3-183 TINC ..............................................................................................................................................................................3-184 TLIN ...............................................................................................................................................................................3-184 TLINE ............................................................................................................................................................................3-184 TMENU..........................................................................................................................................................................3-184 TOT................................................................................................................................................................................3-185 TRACE ..........................................................................................................................................................................3-185 TRAN.............................................................................................................................................................................3-185 TRANSIO ......................................................................................................................................................................3-185 TRIG ..............................................................................................................................................................................3-186 TRIGCOS......................................................................................................................................................................3-186 TRIGO ...........................................................................................................................................................................3-186 TRIGSIN........................................................................................................................................................................3-186 TRIGTAN ......................................................................................................................................................................3-186 TRN ...............................................................................................................................................................................3-186 TRNC.............................................................................................................................................................................3-186 TRUNC..........................................................................................................................................................................3-187 TRUTH ..........................................................................................................................................................................3-187 TSIMP............................................................................................................................................................................3-188
Contents - 13
TSTR ............................................................................................................................................................................. 3-188 TVARS .......................................................................................................................................................................... 3-188 TVM ............................................................................................................................................................................... 3-188 TVMBEG....................................................................................................................................................................... 3-189 TVMEND....................................................................................................................................................................... 3-189 TVMROOT ................................................................................................................................................................... 3-189 TYPE ............................................................................................................................................................................. 3-189 UBASE .......................................................................................................................................................................... 3-190 UFACT .......................................................................................................................................................................... 3-190 UFL1MINIF............................................................................................................................................................... 3-191 UNASSIGN................................................................................................................................................................... 3-191 UNASSUME................................................................................................................................................................. 3-191 UNBIND ........................................................................................................................................................................ 3-191 UNIT .......................................................................................................................................................................... 3-191 UNPICK ........................................................................................................................................................................ 3-191 UNROT ......................................................................................................................................................................... 3-191 UNTIL............................................................................................................................................................................ 3-192 UPDIR ........................................................................................................................................................................... 3-192 UTPC............................................................................................................................................................................. 3-192 UTPF ............................................................................................................................................................................. 3-192 UTPN............................................................................................................................................................................. 3-193 UTPT ............................................................................................................................................................................. 3-193 UVAL ............................................................................................................................................................................. 3-194 V................................................................................................................................................................................. 3-194 V2............................................................................................................................................................................... 3-195 V3............................................................................................................................................................................... 3-195 VANDERMONDE ........................................................................................................................................................ 3-195 VAR ............................................................................................................................................................................... 3-196 VARS............................................................................................................................................................................. 3-196 VER ............................................................................................................................................................................... 3-196 VERSION ..................................................................................................................................................................... 3-196 VISIT ............................................................................................................................................................................. 3-196 VISITB........................................................................................................................................................................... 3-197 VPOTENTIAL............................................................................................................................................................... 3-197 VTYPE .......................................................................................................................................................................... 3-197 WAIT ............................................................................................................................................................................. 3-197 WHILE........................................................................................................................................................................... 3-198 WIREFRAME ............................................................................................................................................................... 3-198 WSLOG......................................................................................................................................................................... 3-199 X .................................................................................................................................................................................. 3-200 X2 ................................................................................................................................................................................ 3-200 XCOL............................................................................................................................................................................. 3-201 XGET............................................................................................................................................................................. 3-201 XMIT.............................................................................................................................................................................. 3-201 XNUM............................................................................................................................................................................ 3-202 XOR............................................................................................................................................................................... 3-202 XPON ............................................................................................................................................................................ 3-202 XPUT............................................................................................................................................................................. 3-203 XQ.................................................................................................................................................................................. 3-203 XRECV.......................................................................................................................................................................... 3-203 XRNG............................................................................................................................................................................ 3-203 XROOT ......................................................................................................................................................................... 3-204 XSEND.......................................................................................................................................................................... 3-204 XSERV.......................................................................................................................................................................... 3-205 XVOL............................................................................................................................................................................. 3-205 XXRNG ......................................................................................................................................................................... 3-205 XY................................................................................................................................................................................ 3-205 Y .................................................................................................................................................................................. 3-206
Contents - 14
Y2 ................................................................................................................................................................................3-206 YCOL.............................................................................................................................................................................3-206 YRNG ............................................................................................................................................................................3-206 YSLICE..........................................................................................................................................................................3-207 YVOL .............................................................................................................................................................................3-207 YYRNG..........................................................................................................................................................................3-208 ZEROS ..........................................................................................................................................................................3-208 ZFACTOR.....................................................................................................................................................................3-208 ZVOL .............................................................................................................................................................................3-208 ^ (Power) ...................................................................................................................................................................3-209 | (Where) ..................................................................................................................................................................3-209 (Square Root) ......................................................................................................................................................3-210 (Integrate) ..............................................................................................................................................................3-211 ? (Undefined) ..........................................................................................................................................................3-212 (Infinity).............................................................................................................................................................3-212 (Summation) ........................................................................................................................................................3-212 + (Sigma Plus) ....................................................................................................................................................3-212 (Sigma Minus) .................................................................................................................................................3-213 (Pi) ..........................................................................................................................................................................3-213 (Derivative) ...........................................................................................................................................................3-213 ! (Factorial)...............................................................................................................................................................3-214 % (Percent)...............................................................................................................................................................3-214 _ (Unit attachment) ................................................................................................................................................3-215 « » (Program delimeters)......................................................................................................................................3-215 < (Less than) ...........................................................................................................................................................3-215 (Less than or Equal).............................................................................................................................................3-216 > (Greater than) ......................................................................................................................................................3-217 (Greater than or Equal)........................................................................................................................................3-218 (Not equal).............................................................................................................................................................3-219 * (Multiply) ................................................................................................................................................................3-219 + (Add) .....................................................................................................................................................................3-220 (Subtract) ...............................................................................................................................................................3-222 / (Divide)...................................................................................................................................................................3-223 = (Equal) ..................................................................................................................................................................3-223 == (Logical Equality) ............................................................................................................................................3-224 ! (Store) ....................................................................................................................................................................3-225 (Create Local)......................................................................................................................................................3-225 4. Computer Algebra Commands .............................................................................................................................................. 4-1 Introduction ........................................................................................................................................................................4-1 CAS Operations .................................................................................................................................................................4-1 CAS Settings ......................................................................................................................................................................4-2 Selecting CAS Settings ............................................................................................................................................... 4-2 The CAS directory, CASDIR...................................................................................................................................... 4-2 Points to note when choosing settings ........................................................................................................................ 4-3 Using the CAS....................................................................................................................................................................4-4 Examples and Help ..................................................................................................................................................... 4-4 Compatibility with Other Calculators ......................................................................................................................... 4-4 Extending the CAS...................................................................................................................................................... 4-4 Dealing with unexpected CAS results or messages .................................................................................................... 4-4 ABCUV ............................................................................................................................................................................4-12 ACOS2S..........................................................................................................................................................................4-12 ADDTMOD......................................................................................................................................................................4-12 ADDTOREAL .................................................................................................................................................................4-13 ALGB ...............................................................................................................................................................................4-13 ARIT.................................................................................................................................................................................4-13 ASIN2C ...........................................................................................................................................................................4-14 ASIN2T............................................................................................................................................................................4-14 ASSUME.........................................................................................................................................................................4-14
Contents - 15
ATAN2S.......................................................................................................................................................................... 4-15 AUGMENT ..................................................................................................................................................................... 4-15 AXL.................................................................................................................................................................................. 4-15 AXM................................................................................................................................................................................. 4-16 AXQ ................................................................................................................................................................................. 4-16 BASIS.............................................................................................................................................................................. 4-16 C2P.................................................................................................................................................................................. 4-17 CASCFG......................................................................................................................................................................... 4-17 CASCMD ........................................................................................................................................................................ 4-17 CHINREM....................................................................................................................................................................... 4-17 CHOLESKY.................................................................................................................................................................... 4-18 CIRC................................................................................................................................................................................ 4-18 COLLECT ....................................................................................................................................................................... 4-19 CONSTANTS................................................................................................................................................................. 4-19 CURL............................................................................................................................................................................... 4-19 CYCLOTOMIC............................................................................................................................................................... 4-20 DEDICACE..................................................................................................................................................................... 4-20 DEF ................................................................................................................................................................................. 4-20 DEGREE......................................................................................................................................................................... 4-21 DERIV ............................................................................................................................................................................. 4-21 DERVX............................................................................................................................................................................ 4-21 DESOLVE....................................................................................................................................................................... 4-22 DIAGMAP ....................................................................................................................................................................... 4-22 DIFF................................................................................................................................................................................. 4-23 DISTRIB.......................................................................................................................................................................... 4-23 DIV................................................................................................................................................................................... 4-23 DIV2................................................................................................................................................................................. 4-23 DIV2MOD ....................................................................................................................................................................... 4-24 DIVIS ............................................................................................................................................................................... 4-24 DIVMOD ......................................................................................................................................................................... 4-25 DIVPC ............................................................................................................................................................................. 4-25 DOMAIN ......................................................................................................................................................................... 4-25 DROITE .......................................................................................................................................................................... 4-26 dn ..................................................................................................................................................................................... 4-26 EGCD.............................................................................................................................................................................. 4-27 EPSX0............................................................................................................................................................................. 4-27 EULER ............................................................................................................................................................................ 4-28 EXLR ............................................................................................................................................................................... 4-28 EXP&LN.......................................................................................................................................................................... 4-28 EXP2HYP ....................................................................................................................................................................... 4-28 EXP2POW...................................................................................................................................................................... 4-29 EXPAND ......................................................................................................................................................................... 4-29 EXPANDMOD................................................................................................................................................................ 4-30 EXPLN ............................................................................................................................................................................ 4-30 FACTOR ......................................................................................................................................................................... 4-30 FACTORMOD................................................................................................................................................................ 4-31 FACTORS ...................................................................................................................................................................... 4-31 FCOEF............................................................................................................................................................................ 4-31 FDISTRIB ....................................................................................................................................................................... 4-32 FOURIER ....................................................................................................................................................................... 4-32 FROOTS......................................................................................................................................................................... 4-33 FXND............................................................................................................................................................................... 4-33 GAUSS ........................................................................................................................................................................... 4-33 GBASIS........................................................................................................................................................................... 4-34 GCD................................................................................................................................................................................. 4-34 GCDMOD ....................................................................................................................................................................... 4-35 GRAMSCHMIDT ........................................................................................................................................................... 4-35 GREDUCE ..................................................................................................................................................................... 4-35 HADAMARD................................................................................................................................................................... 4-36
Contents - 16
HALFTAN........................................................................................................................................................................4-36 HELP ...............................................................................................................................................................................4-36 HERMITE........................................................................................................................................................................4-37 HESS...............................................................................................................................................................................4-37 HILBERT.........................................................................................................................................................................4-37 HORNER ........................................................................................................................................................................4-38 IABCUV...........................................................................................................................................................................4-38 IBASIS.............................................................................................................................................................................4-38 IBERNOULLI ..................................................................................................................................................................4-39 IBP ...................................................................................................................................................................................4-39 ICHINREM ......................................................................................................................................................................4-40 IDIV2................................................................................................................................................................................4-40 IEGCD .............................................................................................................................................................................4-40 ILAP .................................................................................................................................................................................4-41 IMAGE.............................................................................................................................................................................4-41 INT ...................................................................................................................................................................................4-41 INTEGER ........................................................................................................................................................................4-42 INTVX ..............................................................................................................................................................................4-42 INVMOD..........................................................................................................................................................................4-42 IQUOT .............................................................................................................................................................................4-43 IREMAINDER.................................................................................................................................................................4-43 ISOM................................................................................................................................................................................4-43 ISPRIME? .......................................................................................................................................................................4-44 JORDAN .........................................................................................................................................................................4-44 KER .................................................................................................................................................................................4-45 LAGRANGE....................................................................................................................................................................4-45 LAP ..................................................................................................................................................................................4-45 LAPL ................................................................................................................................................................................4-46 LCM .................................................................................................................................................................................4-46 LCXM...............................................................................................................................................................................4-46 LDEC ...............................................................................................................................................................................4-47 LEGENDRE....................................................................................................................................................................4-47 LGCD...............................................................................................................................................................................4-48 LIMIT................................................................................................................................................................................4-48 lim.....................................................................................................................................................................................4-48 LIN ...................................................................................................................................................................................4-48 LINSOLVE ......................................................................................................................................................................4-49 LNAME ............................................................................................................................................................................4-49 LNCOLLECT ..................................................................................................................................................................4-49 LOCAL.............................................................................................................................................................................4-50 LVAR ...............................................................................................................................................................................4-50 MAD.................................................................................................................................................................................4-51 MAIN................................................................................................................................................................................4-51 MATHS............................................................................................................................................................................4-51 MATR ..............................................................................................................................................................................4-52 MENUXY.........................................................................................................................................................................4-52 MKISOM..........................................................................................................................................................................4-53 MODSTO ........................................................................................................................................................................4-53 MODULAR......................................................................................................................................................................4-53 MSLV...............................................................................................................................................................................4-54 MULTMOD......................................................................................................................................................................4-54 NEXTPRIME ..................................................................................................................................................................4-55 P2C ..................................................................................................................................................................................4-55 PA2B2 .............................................................................................................................................................................4-55 PARTFRAC ....................................................................................................................................................................4-56 PCAR...............................................................................................................................................................................4-56 PMINI...............................................................................................................................................................................4-56 POLYNOMIAL................................................................................................................................................................4-57 POTENTIAL....................................................................................................................................................................4-57
Contents - 17
POWEXPAND................................................................................................................................................................ 4-57 POWMOD....................................................................................................................................................................... 4-58 PREVAL.......................................................................................................................................................................... 4-58 PREVPRIME .................................................................................................................................................................. 4-58 PROPFRAC ................................................................................................................................................................... 4-59 PTAYL............................................................................................................................................................................. 4-59 QUOT.............................................................................................................................................................................. 4-59 QXA ................................................................................................................................................................................. 4-60 RCLVX ............................................................................................................................................................................ 4-60 REF ................................................................................................................................................................................. 4-60 REMAINDER.................................................................................................................................................................. 4-61 REORDER ..................................................................................................................................................................... 4-61 RESULTANT.................................................................................................................................................................. 4-61 REWRITE ....................................................................................................................................................................... 4-62 RISCH ............................................................................................................................................................................. 4-62 RREF............................................................................................................................................................................... 4-62 rref ................................................................................................................................................................................... 4-63 RREFMOD ..................................................................................................................................................................... 4-63 SERIES........................................................................................................................................................................... 4-64 SEVAL............................................................................................................................................................................. 4-64 SIGMA............................................................................................................................................................................. 4-65 SIGMAVX ....................................................................................................................................................................... 4-65 SIGNTAB ........................................................................................................................................................................ 4-65 SIMP2 ............................................................................................................................................................................. 4-66 SIMPLIFY ....................................................................................................................................................................... 4-66 SINCOS .......................................................................................................................................................................... 4-67 SOLVE ............................................................................................................................................................................ 4-67 SOLVEVX....................................................................................................................................................................... 4-68 STORE............................................................................................................................................................................ 4-68 STOVX............................................................................................................................................................................ 4-68 STURM ........................................................................................................................................................................... 4-69 STURMAB ...................................................................................................................................................................... 4-69 SUBST ............................................................................................................................................................................ 4-69 SUBTMOD ..................................................................................................................................................................... 4-70 SYLVESTER .................................................................................................................................................................. 4-70 SYST2MAT .................................................................................................................................................................... 4-71 TABVAL .......................................................................................................................................................................... 4-71 TABVAR ......................................................................................................................................................................... 4-71 TAN2CS2 ....................................................................................................................................................................... 4-72 TAN2SC.......................................................................................................................................................................... 4-72 TAN2SC2 ....................................................................................................................................................................... 4-73 TAYLOR0 ....................................................................................................................................................................... 4-73 TCHEBYCHEFF ............................................................................................................................................................ 4-73 TCOLLECT..................................................................................................................................................................... 4-74 TESTS............................................................................................................................................................................. 4-74 TEXPAND....................................................................................................................................................................... 4-74 TLIN................................................................................................................................................................................. 4-74 TRIG................................................................................................................................................................................ 4-75 TRIGCOS ....................................................................................................................................................................... 4-75 TRIGO............................................................................................................................................................................. 4-76 TRIGSIN ......................................................................................................................................................................... 4-76 TRIGTAN ........................................................................................................................................................................ 4-76 TRUNC ........................................................................................................................................................................... 4-77 TSIMP ............................................................................................................................................................................. 4-77 UNASSIGN..................................................................................................................................................................... 4-77 UNASSUME................................................................................................................................................................... 4-78 UNBIND .......................................................................................................................................................................... 4-78 VANDERMONDE .......................................................................................................................................................... 4-78 VER ................................................................................................................................................................................. 4-79
Contents - 18
VPOTENTIAL .................................................................................................................................................................4-79 XNUM ..............................................................................................................................................................................4-79 XQ ....................................................................................................................................................................................4-80 ZEROS ............................................................................................................................................................................4-80 ? .......................................................................................................................................................................................4-81 .......................................................................................................................................................................................4-81 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-8 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 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-14 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
Contents - 19
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 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-49 PN Step Junctions (13, 1) ......................................................................................................................................... 5-51 NMOS Transistors (13, 2) ........................................................................................................................................ 5-52 Bipolar Transistors (13, 3) ........................................................................................................................................ 5-53 JFETs (13, 4) ............................................................................................................................................................ 5-53 Stress Analysis (14) ......................................................................................................................................................... 5-54 Normal Stress (14, 1) ................................................................................................................................................ 5-55 Shear Stress (14, 2) ................................................................................................................................................... 5-56
Contents - 20
Stress on an Element (14, 3) ..................................................................................................................................... 5-56 Mohr's Circle (14, 4) ................................................................................................................................................. 5-57 Waves (15) .......................................................................................................................................................................5-57 Transverse Waves (15,1)........................................................................................................................................... 5-58 Longitudinal Waves (15, 2) ...................................................................................................................................... 5-58 Sound Waves (15, 3)................................................................................................................................................. 5-58 References ........................................................................................................................................................................5-59 6. The Development Library ..................................................................................................................................................... 6-1 Section 1 - Introduction......................................................................................................................................................6-1 Section 2 The tools of the development library ..............................................................................................................6-1 APEEK...............................................................................................................................................................................6-1 PEEK..................................................................................................................................................................................6-1 POKE .................................................................................................................................................................................6-1 PEEKARM.........................................................................................................................................................................6-2 POKEARM ........................................................................................................................................................................6-2 A.....................................................................................................................................................................................6-2 A.....................................................................................................................................................................................6-2 RAM...............................................................................................................................................................................6-2 AH ..................................................................................................................................................................................6-2 HA ..................................................................................................................................................................................6-2 CD ..................................................................................................................................................................................6-3 CD ..................................................................................................................................................................................6-3 H.....................................................................................................................................................................................6-3 H.....................................................................................................................................................................................6-3 SH...................................................................................................................................................................................6-3 HS...................................................................................................................................................................................6-3 SREV .................................................................................................................................................................................6-3 MAKESTR.........................................................................................................................................................................6-4 SERIAL..............................................................................................................................................................................6-4 S2....................................................................................................................................................................................6-4 XLIB~ ................................................................................................................................................................................6-4 CRC....................................................................................................................................................................................6-4 S~N ....................................................................................................................................................................................6-4 R~SB ..................................................................................................................................................................................6-5 SB~B ..................................................................................................................................................................................6-5 LR~R..................................................................................................................................................................................6-5 LC~C..................................................................................................................................................................................6-5 COMP ............................................................................................................................................................................6-5 ALG................................................................................................................................................................................6-5 PRG ................................................................................................................................................................................6-6 LST.................................................................................................................................................................................6-6 Section 3 - CRLIB..............................................................................................................................................................6-6 Section 4 - ASM.................................................................................................................................................................6-8 Section 5 Disassemblers................................................................................................................................................6-34 ASM .............................................................................................................................................................................6-34 ARM.............................................................................................................................................................................6-35 Section 6 The Entry Point Library: Extable ..................................................................................................................6-35 nop....................................................................................................................................................................................6-35 GETNAME ......................................................................................................................................................................6-35 GETADR..........................................................................................................................................................................6-36 GETNAMES ....................................................................................................................................................................6-36 A. Error and Status Messages................................................................................................................................................... A-1 B. Table of Units ...................................................................................................................................................................... B-1 C. System Flags........................................................................................................................................................................ C-1 D. Reserved Variables.............................................................................................................................................................. D-1 Contents of the Reserved Variables .................................................................................................................................. D-2 ENTER............................................................................................................................................................................ D-2 ALRMDAT ....................................................................................................................................................................... D-2
Contents - 21
ENTER............................................................................................................................................................................ D-3 CST ................................................................................................................................................................................... D-3 ENVSTACK ..................................................................................................................................................................... D-4 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 REALASSUME................................................................................................................................................................ 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 VPAR................................................................................................................................................................................ D-9 ZPAR .............................................................................................................................................................................. D-10 DAT.............................................................................................................................................................................. D-10 PAR .............................................................................................................................................................................. D-11 E. Technical Reference .............................................................................................................................................................E-1 Object Sizes .......................................................................................................................................................................E-1 Symbolic Integration Patterns............................................................................................................................................E-2 Trigonometric Expansions .................................................................................................................................................E-4 Source References..............................................................................................................................................................E-5 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 Index .................................................................................................................................................................................. Index-1
Contents - 22
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 a built-in command might do. In the hp49g+/hp48gII, a program is an object that does the same thing.
Understanding Programming
An hp49g+/hp48gII program is an object with « » delimiters containing a sequence of numbers, commands, and other objects 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 Object Command Number Algebraic or `Algebraic` String List Program Global name (quoted) Global name (unquoted) Action Executed. 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.
Local name (quoted) Local name (unquoted)
Put on the stack. Contents put on the stack
As you can see from this table, most types of objects are simply put on the stack -- but built-in commands and programs 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 «12» « "Hello" {A B}» « '1+2' » « '1+2' NUM» ««12+»» « « 1 2 + » EVAL » Results 2: 1: 2: 1: 1: 1: 1: 1: 1 2 "Hello" {AB} '1+2' 3 «12+» 3
Programs can also contain structures. A structure is a program segment with a defined organization. Two basic kinds of structure are available: Local variable structure. The command defines local variable names and a corresponding algebraic or program object that's evaluated using those variables. ! Branching structures. Structure words (like DO... UNTIL...END) define conditional or loop structures to control the order of execution within a program.
!
A local variable structure has one of the following organizations inside a program: « name1 ... namen ' algebraic ' » « name1 ... namen « program » » The " command removes n objects from the stack and stores them in the named local variables. The algebraic or program object in the structure is automatically evaluated because it's an element of the structure even though algebraic and program objects are put on the stack in other situations. Each time a local variable name appears in the algebraic or program object, the variable's contents are substituted. So the following program takes two numbers from the stack and returns a numeric result: « a b 'ABS(a-b)' »
Calculations in a Program
Many calculations in programs take data from the stack. Two typical ways to manipulate stack data are: Stack commands. Operate directly on the objects on the stack. Local variable structures. Store the stack objects in temporary local variables, then use the variable names to represent the data in the following algebraic or program object. Numeric calculations provide convenient examples of these methods. The following programs use two numbers from the stack to calculate the hypotenuse of a right triangle using the formula x 2 + y 2. « SQ SWAP SQ + » « x y « x SQ y SQ + » » « x y '(x^2+y^2)' » The first program uses stack commands to manipulate the numbers on the stack the calculation uses stack syntax. The second program uses a local variable structure to store and retrieve the numbers the calculation uses stack syntax. The third program also uses a local variable structure -- the calculation uses algebraic syntax. Note that the underlying formula is most apparent in the third program. This third method is often the easiest to write, 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 TM 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 command line 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 hp49g+/hp48gII 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 we show: 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), SORT (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 radius r using
V= 4 3
r3
If you were going to calculate the volume manually after entering the radius on the stack, you might press these keys: 3Q!ì*4`3/*@ï Enter the same keystrokes in a program. (@ë just starts a new line.) @% 3Q!ì*4#3/* @ë @ï Put the program on the stack. ` Store the program in variable VOL. Then put a radius of 4 on the stack and run the VOL program. OVOL K 4 J %VOL% The program is « 3 ^ oe * 4 3 / * NUM » Example: Replace the program from the previous example with one that's easier to read. Enter a program that uses a local variable structure to calculate the volume of a sphere. The program is « r '4/3*oe*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 TM@ë@ï 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.
12 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
volume
The diagram indicates that SPH takes no arguments from the stack and returns the volume of the spherical cap to level 1. (SPH assumes that you've stored the numerical value for the radius in variable R and the numerical value for the 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 this first listing, the keystrokes are also shown. Program: « '1/3 *oe*H^2 *(3*R-H)' Keys: @% O1 /3 Comments: Begins the program. Begins the algebraic expression to calculate the volume.
*!ì Multiplies by h2. *H Q2 *!Ü Multiplies by 3r - h, completing 3 * R - the calculation and ending the H TMTM expression. @ï Converts the expression with to a number. Ends the program. Puts the program on the stack. Stores the program in variable SPH.
NUM »
` OSPH K
RPL Programming 1-5
This is the program: « '1/3*oe*H^2*(3*R-H)' NUM » Now use SPH to calculate the volume of a spherical cap of radius r = 10 and height h = 3. First, store the data in the appropriate variables. Then select the VAR menu and execute the program. The answer is returned to level 1 of the stack. 10 O R K 3OHK J %SPH%
Viewing and Editing Programs
You view and edit programs the same way you view and edit other objects -- using the command line. To view or edit a program: 1. View the program: ! If the program is in level 1, press ~ (or use the EDIT command). ! If the program is stored in a variable, use the Filer (!¡) to select the variable and press EDIT (`), or press J, then @ and the variable's menu key (a shortcut to recall a variable's contents to level 1), followed by ~. Alternatively, with the variable name in level 1 press ,, ~ (or use the EDITB, VISIT or VISITB command). 2. Optional: Make changes. 3. Press ` to save any changes (or press - to discard changes) and return to the stack, or to Filer if you used Filer to select the program. Filer lets you change a stored program without having to do a store operation. From the stack you can change a program and then store the new version in a different variable. While you're editing a program, you may want to switch the command-line entry mode between Program-entry mode (for editing most objects) and Algebraic/Program-entry mode (for editing algebraic objects). The PRG and ALG annunciators indicate the current mode. To switch between entry modes:
!
Press @Í.
Example: Edit SPH from the previous example so that it stores the number from level 1 into variable H and the number from level 2 into variable R. Select SPH from the soft keys. J @%SPH% ~ Move the cursor past the first program delimiter and insert the new program steps. TMOH TMK OR TMK Save the edited version of SPH in the variable. Then, to verify that the changes were saved, view SPH in the command line. `J!%SPH%
1-6 RPL Programming
@%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 hp49g+/hp48gII. 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 hp49g+/hp48gII processes text entered in the command line -- either from keyboard entry or transferred from a computer -- it strips away the @ characters and the text they surround. However, @ characters are not affected 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. (By convention, 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. For example, if the stack looks like this: RPL Programming 1-7
then a creates local variable a = 20. ab creates local variables a = 6 and b = 20. abc crates 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
r
Level 1
h
" "
Level 1
volume
Program: « rh
Comments: Creates local variables r and h for the radius of the sphere and height of the cap.
'1/3*oe*h^2*(3*r-h)' Expresses the defining procedure. In this program, the defining procedure for the local variable structure is an algebraic expression. NUM » OSPHLVK Stores the program in variable SPHLV. Converts expression to a number.
Now use SPHLV to calculate the volume of a spherical cap of radius r =10 and height h = 3. Enter the data on the stack in the correct order, then execute the program. 10 `3 J%SPHLV%
Evaluating Local Names
Local names are evaluated differently from global names. When a global name is evaluated, the object stored in the corresponding variable is itself evaluated. (You've seen how programs stored in global variables are automatically evaluated when the name is evaluated.) 1-8 RPL Programming
When a local name is evaluated, the object stored in the corresponding variable is returned to the stack but is not evaluated.When a local variable contains a number, the effect is identical to evaluation of a global name, since putting a number on the stack is equivalent to evaluating it. However, if a local variable contains a program, algebraic expression, or global variable name -- and if you want it evaluated -- the program should execute EVAL after the object is put on the stack.
Defining the Scope of Local Variables
Local variables exist only inside the defining procedure. Example: The following program excerpt illustrates the availability of local variables in nested defining procedures (procedures within procedures). Because local variables a, b, and c already exist when the defining procedure for local variables d, e, and f is executed, they're available for use in that procedure.
Program: «
. . .
Comments:
No local variables are available. Defines local variables a, b, c. Local variables a, b, c are available in this procedure. Defines local variables d, e, f. Local variables a, b, c and d, e, f are available in this procedure. Only local variables a, b, c are available. No local variables are available.
abc « ab+c+ def 'a/(d*e+f)'
ac/»
. .
»
.
RPL Programming 1-9
Example: In the following program excerpt, the defining procedure for local variables d, e, and f calls a program that you previously created and stored in global variable P1.
Program: «
. .
Comments:
abc « ab+c+ def '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.
ac/»
.
» 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 or store 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 a compiled 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 a user-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 those arguments either from the stack or in algebraic syntax. However, it does not have a derivative. (The defining program must, like algebraic defining procedures, return only one result to the stack.) There's an advantage to using a program as the defining procedure for a local variable structure: The program can contain commands not allowed in algebraic expressions. For example, loop structures are not allowed in algebraic expressions.
Using Tests and Conditional Structures
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, p.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
If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual HP 48GII GRAPHING CALCULATOR. HP offer a product for which we do not have the user manual? Let us know what you are looking for: site Internet, histoire, actualité, filiales, site Internet, mode d'emploi, driver, avis des utilisateurs, meilleur prix des produits, forum d'assistance aux problèmes, annuaire des marques, annuaire des constructeurs, répertoire des marques, répertoire des constructeurs, site Internet de la marque, site Internet du constructeur Diplodocs allows you to download user manual HP 48GII GRAPHING CALCULATOR, user guide HP 48GII GRAPHING CALCULATOR, instructions HP 48GII GRAPHING CALCULATOR, owner's manual HP 48GII GRAPHING CALCULATOR, online manual HP 48GII GRAPHING CALCULATOR.Access web reviews HP 48GII GRAPHING CALCULATOR, COMPAC, COMPAG, HELWET PACKARD, HELWETT, HELWETT PACKARD, HEWLET PACKARD, HEWLETT-PACKARD, Printer & Plotter. |
![]() |
Include the add-on to download manuals from your site, forum or blog | ![]() |
Frequently Asked Questions | ![]() |
Contact Diplodocs team | ![]() |
Last searches Last additions |
![]() |
Sitemap | ![]() |
|||
| Brands starting with A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # | |||||||||||||
|
|
Copyright © 2005 - 2008 - Diplodocs -
All Rights Reserved. Designated trademarks and brands are the property of their respective owners. |