HP 15c Scientific manual Indirect Flag Control With, Indirect Display Format Control With

Page 109

Section 10: The Index Register and Loop Control 109

To Labels. If the RI value is positive, t V and G V will transfer execution to the label which corresponds to the number in the Index register (see the above table).

For instance, if the Index register contains 20.00500, then a tV instruction will transfer program execution to ´b A. See the chart on page 107.

To Line numbers. If the RI value is negative, tV causes branching to that line number (using the absolute value of the integer portion of the value in RI).

For instance, if RI contains –20.00500, then a tV instruction will transfer program execution to program line 020.

Indirect Flag Control With V

F V, " V, or ? V will set, clear, or test the flag (0 to 9) specified in RI (by the magnitude of the integer portion).

Indirect Display Format Control With V

´• V, ´ i V, and ´ ^ V will format the

display in their customary manner (refer to pages 58–59), using the number in RI (integer part only) for n, which must be from 0 to 9.*

Loop Control With Counters: I and e

The I (increment and skip if greater than) and e (decrement and skip if less than or equal to) functions control loop execution by referencing and altering a loop control number in a given register. Program execution (skipping a line or not) then depends on that number.

The key sequence is ´{ I, e} register number. This number is 0 to 9, .0 to .9, V,or %.

The Loop Control Number. The format of the loop control number is:

 

±nnnnn

is the current counter value,

nnnnn.xxxyy, where

xxx

is the test (goal) value, and

 

yy

Is the increment of decrement value

*Except when using f(section 14)

Image 109
Contents HP Part Number 00015-90001 Edition 2.4, Sep HP-15C Owner’s HandbookLegal Notice Introduction Contents Display and Continuous Memory ContentsProgram Branching and Controls Program EditingSubroutines Calculating With Complex Numbers Indirect Display ControlCalculating With Matrices Numerical Integration Appendix C Memory Allocation Contents Appendix a Error ConditionsAppendix D a Detailed Look at Appendix E a Detailed Look at fFunction Summary and Index Contents Appendix F BatteriesProgramming Summary and Index Subject IndexQuick Look at HP-15C Problem SolverTo Compute Keystrokes Display Manual SolutionsKeystrokes Display Programmed Solutions001-42,21,11 KeystrokesDisplay002 003 004 005 006 007 008 009 8313 300.51HP-15C a Problem Solver Part l HP-15C Fundamentals Getting Started Power On and OffKeyboard Operation SectionChanging Signs Prefix KeysKeying in Exponents I O m ´ P I l F T s ? t H bClear Keys Digit entry not terminated Display Clearing ` and −Clears only the last digit One-Number Functions CalculationsTwo-Number Functions 653226.0000 22.0000 5000 17 +13.0000 78.0000Number Alteration Functions Numeric FunctionsGeneral Functions One-Number FunctionsTime and Angle Conversions Trigonometric OperationsPressing Calculates 7069 Degrees/Radians ConversionsRadians 40.5000Hyperbolic Functions Logarithmic FunctionsTwo-Number Functions Power FunctionPercentages To Calculate Keystrokes DisplayEnters the base number the price Polar and Rectangular Coordinate ConversionsCalculates 3% of $15.76 the tax Polar Conversion. PressingKeystrokes Display Automatic Memory Stack Stack Manipulation Automatic Memory Stack Last X, and Data StorageAutomatic Memory Stack Registers Always displayedMemory Stack, Last X, and Data Storage Stack Manipulation FunctionsLost Lost 287.0000 Last X Register and K22.2481 12.900013.9 + Calculator Functions and the Stack20.6475 +15 X15 Order of Entry and the v Key7 + Nested Calculations65.0000 69.0000Arithmetic Calculations With Constants 5 ‛15 Keys 1000 Keystrokes Display Growth factor000 Storing and Recalling Numbers Storage Register Operations322.5000 520.8750Storage and Recall Arithmetic Clearing Data Storage RegistersFor recall arithmetic For storage arithmeticOverflow and Underflow Problems24 l-0 15.0000Memory Stack, Last X, and Data Storage Probability Calculations Statistics Functions60.0000 270,725.0000 Random Number Generator5764 3422Registers Accumulating StatisticsRegister Contents Metric tons per Hectare, y 20.00 40.00 60.00 80.00 Kg per hectare20 z 61v 40 z 7.21 60 z 7.78 80 z l Σy220 w 20 z Correcting Accumulated StatisticsStandard Deviation Mean40.00 31.62 Linear RegressionStandard deviation about the mean nitrogen ApplicationLinear Estimation and Correlation Coefficient Statistics Functions 70 ´j Other ApplicationsDisplay Control Display Continuous MemoryFixed Decimal Display Engineering Notation Display Scientific Notation Display234568 234567Special Displays Round-Off ErrorMantissa Display AnnunciatorsDigit Separators Error Display12,345.67 12.345.6700Continuous Memory Low-Power IndicationStatus Resetting Continuous Memory Page Part ll HP-15C Programming Mechanics Programming BasicsCreating a Program Loading a Program´b a Programming BasicsRunning a Program Intermediate Program Stops002 003 004 005 006 007 008 300.51 300.51 ´A How to Enter DataProgram Memory Totals Radius, r Height, h Base Area Volume Surface Area004 005 002007-44,40 010Or G a Program Instructions Further InformationInstruction Coding Keycode 25 second row, fifth key Memory Configuration60 ´ m% Initial Memory Configuration´ m % Program Boundaries19 ´ m% 19.0000Abbreviated Key Sequences Unexpected Program Stops´bA ´b3 End of memory Polynomial Expressions and Horners Method User Mode¤ @ y ∕ LOG %001-42,21,12 Nonprogrammable Functions002 003 004 005 006 007 008 009 0000 12,691.0000Problems Moving to a Line in Program Memory Program EditingDeleting Program Lines ExamplesInserting Program Lines Or use  Single-Step Operations Âhold Line PositionRelease ResultInitializing Calculator Status Insertions and Deletions+ i n InterestPV 1 + i n ´bA D ´4 O0 2* O1 2÷ * ´ ´ l0 l1 ´r * n 100 270Branching Program Branching ControlsTest Conditional Tests n will clear flag number n FlagsExample Branching and Looping 013-43,30 010-45,20014 016-44,40Formula is Example Flags004-42,21,15 002-43005-43, 4 006-42,21250.0000 Go to48.0000 10,698.3049Conditional Branching LoopingSystem Flags Flags 8 Program Branching and Controls Go To Subroutine and Return SubroutinesSubroutine Execution ´b.1Subroutine Limits 002- R 000 001- ´b9003- O0 004´b.5 ´ b.4Nested Subroutines Subroutine ReturnV and % Keys Index Register Loop Control106 Program Loop Control Indirect Program Control With the Index RegisterIndex Register Storage and Recall Index Register and Loop ControlExchanging the X-Register Index Register ArithmeticIndirect Branching With Indirect Display Format Control With Indirect Flag Control WithLoop Control With Counters I and e Start count at zero Count by twos Count up to Nnnnn x x x y y 5 0 0Iterations Examples Register OperationsStoring and Recalling Keystrokes Display 12.3456Exchanging the X-Register Example Loop Control with eStorage Register Arithmetic −− 011- 42 Loop control number in R2012-42, 5 013- 2215 O Example Display Format Control64.8420 0000 50.0000 Index Register Contents Indirect Display Control Index Register and Loop Control 118 Part lll HP-15C Advanced Functions Calculating With Complex Numbers Complex Stack and Complex ModeCreating the Complex Stack 120Complex Numbers and the Stack Deactivating Complex ModeEntering Complex Numbers ´ % hold 8.0000 release Z 8 Y 7 X Keys Manipulating the Real and Imaginary Stacks Stack Lift in Complex ModeOr other operation Clearing a Complex Number− 4 v Continue with any operation Continue with any operation´ %hold release Entering Complex Numbers with −. The clearing functions −0000 17.0000 144.0000 Followed by another number Entering a Real Number´ Continue with any operation Entering a Pure Imaginary NumberStoring and Recalling Complex Numbers Operations With Complex Numbers´ O L 2 ´+ * ÷ y ¤x N o ∕ @ a7000 20000428 0491Complex Results from Real Numbers Polar and Rectangular Coordinate Conversions5708 ´ % hold Release1.5708Cos θ + i sin θ = re iθ Polar + ib = ∠ θ 2981 8452+ 3.1434 872.0000 352.00002361 4721For Further Information 138 Calculating With Matrices= A-1B Keystrokes Display Deactivates Complex ModeRunning Matrix Dimensions11.2887 2496Number Rows Columns Dimensioning a MatrixChanging Matrix Dimensions Displaying Matrix Dimensions´mA Keystrokes l B DisplayStoring and Recalling All Elements in Order Storing and Recalling Matrix Elements⎡ a Checking and Changing Matrix Elements Individually Keystrokes Display Storing a Number in All Elements of a Matrix Matrix OperationsMatrix Descriptors Result Matrix One-Matrix Operations Copying a MatrixCalculating with Matrices LB b Scalar OperationsLA a Elements of Result MatrixKeystrokes Display Subtracts 1 from the elements Arithmetic OperationsLB b 2 LA a 2 Matrix Multiplication Keystrokes Display l a a = AT BSolving the Equation AX = B 2400 24 OA86 OA 8600274 OB 233 OB 331 OB 120.32 OB 112.96 OB 151.36 OB ´Á Week Cabbage kg 186 141 215 Broccoli kg 116 Calculating the ResidualCalculations With Complex Matrices Using Matrices in LU FormThen Z can be represented in the calculator by Storing the Elements of a Complex MatrixPressing Transforms Into LA a = ⎢Complex Transformations Between ZP and Z Inverting a Complex Matrix ´ a Multiplying Complex Matrices´U lC LC lC lC lC lC lC lC ´U Keystrokes lA lB Display Displays descriptor of matrix aZZ −1 Solving the Complex Equation AX = BAX = B 170.0000 200.00001311 03720437 1543Calculating with Matrices Using Matrix Descriptors in the Index Register Using a Matrix Element With Register OperationsMiscellaneous Operations Involving Matrices Conditional Tests on Matrix Descriptors Stack Operation for Matrix CalculationsCalculating with Matrices Using Matrix Operations in a Program Keystrokes Results Summary of Matrix Functions´m a Calculates residual in result matrix For Further Information Finding the Roots An Equation Using180 Clear program memory Finding the Roots of an Equation001-42,21 ´b0002 003 005 006 007Desired root Finding the Roots of an Equation´ bA Keystrokes ¥000 001-42,21,11 003 004Brings another t-value 5000 1 e tInto X-register 200 t000 001-42,21 002 003 004 005 When No Root Is FoundError Choosing Initial Estimates Label X + 8 003 004 005 007008 009 6 x + 8Finding the Roots of an Equation Using in a Program Memory Requirements Restriction on the UseNumerical Integration Using f194 002 003 004 1416 7652 4040Begin subroutine with a label $ ÷ 38254401 6054 Accuracy of f ´ i ´ f 7091 8826382 Using f in a ProgramMemory Requirements Error 0 Improper Mathematics Operation Error ConditionsAppendix a 205Error 2 Improper Statistics Operation Error 1 Improper Matrix OperationError 4 Improper Line Number or Label Call Error 3 Improper Register Number or Matrix ElementError 5 Subroutine Level Too Deep Error 6 Improper Flag NumberPr Error Power Error Digit Entry Termination Stack Lift Last X RegisterStack Lift Appendix BEnabling Operations Disabling OperationsNeutral Operations Stack Stack Enabled. disabled 53.1301 No stack LiftAppendix B Stack Lift and the Last X Register Keys Nnn Clear u ¥\ k + H ∆ \ h ÷ À P* q r c ‘ / N z ∕ P\ o j Last X RegisterMemory Space Memory AllocationAppendix C RegistersAppendix C Memory Allocation Memory Status W Memory ReallocationM % Function ´m% 1.0000 Whold 1 64 Restrictions on Reallocation19 ´ m Automatic Program Memory Reallocation Program MemoryTwo-Byte Program Instructions Memory Requirements for the Advanced FunctionsIf executed TogetherAppendix C Memory Allocation How Works Detailed Look atAppendix D 220Appendix D a Detailed Look at Accuracy of the Root X4 = 000 006 007 008 009 010-43,30 011 012-43,30 013 1718´ v B Interpreting Results0681 − 45 For 0 x Branch for x ≥ Test for x range3x 45x 2 + End subroutineInitial estimates 000.00001358 Possible rootAppendix D a Detailed Look at Bring x-value into X-register ´ b.0 001-42,21,.0 002 003 004 005007 008 009 010 013 014 015 01610 v ´ ‛ 20 017 018Finding Several Roots Error 0000 1250 5626002 003 004 005 006 007 Fx = xx a3 =6667 Second root Same initial estimatesStores root for deflation Deflated function valueDeflation for third root Limiting the Estimation Time Counting Iterations For Advanced InformationSpecifying a Tolerance How f Works Detailed Look at fAppendix E 240X = π1 0π cos4θ − x sinθ dθ Accuracy, Uncertainty, and Calculation Time´ i ´ f 0000 1416´ Clear u Hold Keystrokes Display Return approximation toKeystrokes ´ i Display ´ f ´ Clear u hold7807 7858Uncertainty and the Display Format Functions values for example Δx = 0.5×10−n ×10m = aδx dxb = ab 0.5×10−n + m x dx Conditions That Could Cause Incorrect Results ∞ xe− xdx 001-42,21 002- 1 003 004 005 Appendix E a Detailed Look at f Appendix E a Detailed Look at f Conditions That Prolong Calculation Time Keys upper limit into Keys lower limit intoApproximation to integral UncertaintyAppendix E a Detailed Look at f Obtaining the Current Approximation to an Integral For Advanced Information Installing New Batteries Low-Power IndicationBatteries BatteriesAppendix F Batteries 2.C 3.H Verifying Proper Operation Self-TestsComplex Functions Function Summary and IndexConversions Digit EntryIndex Register Control Display ControlLogarithmic Exponential Functions Mantissa. PressingMatrix Functions Mathematics146 To ZP page164 Number AlterationTo XT Probability PercentageStack Manipulation Clear uStorage StatisticsTrigonometry 269 Programming Summary and IndexProgramming Summary and Index 271 Subject IndexSubject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Subject Index Federal Communications Commission Notice Product Regulatory Environment InformationModifications Avis Canadien Canadian NoticeBody number is inserted between CE European Union Regulatory Notice
Related manuals
Manual 63 pages 42.15 Kb