EasyManua.ls Logo

HP 15c Collector's Edition User Manual

HP 15c Collector's Edition
308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #110 background imageLoading...
Page #110 background image
98 Section 8: Program Branching and Controls
Looping
Looping is an application of branching which uses a t instruction to
repeat a portion of the program. A loop can continue indefinitely, or may
be conditional. A loop is frequently used to repeat a calculation with
different variables. At the same time, a counter, which increments with
each loop, may be included to keep track of loop iterations. This counter
can then be checked with a conditional test to determine when to exit the
loop. (This is shown in the example on page 112.)
Conditional Branching
There are two general applications for conditional branching. One is to
control loops, as explained above. A conditional test can check for either
a certain calculated value or a certain loop count.
The other major use is to test for options and pursue one. For example, if
a salesperson made a variable commission depending on the amount of
sale, you could write a program which takes the amount of sale, compares
it to a test value, and then calculates a specific commission depending on
whether the sale is less than or greater than the test value.
Tests. A conditional test takes what is in the X-register (“x”) and
compares it either to zero (such as ~) or to y”, that is, what is in the
Y-register (such as £). For an x:y comparison, therefore, you must
have the x- and y-values juxtaposed in the X- and Y-registers. This might
require that you store a test value and then recall it (bringing it into the X-
register). Or, the value might be in the stack and be moved, as necessary,
using ®, ), or (.
Tests With Complex Numbers and Matrix Descriptors. Four of the
conditional tests also work with complex numbers and matrix descriptors:
~, T 0 (x 0), T 5 (x = y), and T 6 (x y). Refer to
Sections 11 and 12 for more information.
Flags
As a conditional test can be used to pick an option by comparing
two numbers in a program, a flag can be used to pick an option externally.
Usually, a flag is set or cleared first thing in a program by choosing a
different starting point (using different labels) depending on the
condition or mode you want (refer to the example on page 95).

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the HP 15c Collector's Edition and is the answer not in the manual?

HP 15c Collector's Edition Specifications

General IconGeneral
ModelHP 15c Collector's Edition
CategoryCalculator
TypeScientific
Power SourceBattery
ManufacturerHP
DisplayLCD
Functionscomplex numbers, matrix operations

Summary

Introduction

This Handbook

Outlines the structure of the manual, detailing its parts and how to use it for learning.

The HP Community

Discusses user groups and websites for HP calculator enthusiasts and information sharing.

Part I: HP 15c Fundamentals

Section 1: Getting Started

Covers basic operations like powering on, keyboard layout, and primary/alternate functions.

Section 2: Numeric Functions

Explains essential numeric operations including logs, trig, powers, and conversions.

Section 3: The Automatic Memory Stack, LAST X, and Data Storage

Details the RPN stack, LAST X register, and data storage operations.

Part II: HP 15c Programming

Section 6: Programming Basics

Introduces core programming concepts: creating, loading, running programs, and memory.

Section 8: Program Branching and Controls

Covers controlling program flow using branching, loops, and conditional tests.

Part III: HP 15c Advanced Functions

Section 11: Calculating With Complex Numbers

Covers entering, manipulating, and performing calculations with complex numbers.

Section 12: Calculating With Matrices

Explains matrix operations, including dimensioning, element access, and calculations.

Section 13: Finding the Roots of an Equation

Details using the SOLVE function for numerical root finding and equation solving.

Section 14: Numerical Integration

Explains how to perform numerical integration using the ∫f(x)dx key and subroutines.

Appendix A: Error Conditions

Error 8: No Root

Explains the error when the SOLVE function cannot find a root.

Error 0: Improper Mathematics Operation

Lists and explains errors related to mathematical operations and illegal arguments.

Appendix D: A Detailed Look at SOLVE

How SOLVE Works

Explains the numerical technique and logic behind the SOLVE algorithm.

Finding Several Roots

Discusses methods for finding multiple roots of an equation using the SOLVE function.

Related product manuals