HP 35s scientific calculator user's guide H Edition 1 HP part number F2215AA-90001
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, NONINFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. HEWLETT-PACKARD CO.
Contents Part 1. Basic Operation 1. Getting Started............................................................1-1 Important Preliminaries ............................................................. 1-1 Turning the Calculator On and Off ....................................... 1-1 Adjusting Display Contrast................................................... 1-1 Highlights of the Keyboard and Display ..................................... 1-2 Shifted Keys ...................................................
Complex number display format (, , ·‚)....................1-24 SHOWing Full 12–Digit Precision .......................................1-25 Fractions ...............................................................................1-26 Entering Fractions..............................................................1-26 Messages..............................................................................1-27 Calculator Memory ................................................................
Using the MEM Catalog ........................................................... 3-4 The VAR catalog................................................................. 3-4 Arithmetic with Stored Variables................................................ 3-6 Storage Arithmetic .............................................................. 3-6 Recall Arithmetic................................................................. 3-7 Exchanging x with Any Variable ...............................................
5. Fractions.....................................................................5-1 Entering Fractions ....................................................................5-1 Fractions in the Display.............................................................5-2 Display Rules ......................................................................5-2 Accuracy Indicators.............................................................5-3 Changing the Fraction Display..............................................
Operator Precedence ........................................................ 6-14 Equation Functions............................................................ 6-16 Syntax Errors.................................................................... 6-19 Verifying Equations................................................................ 6-19 7. Solving Equations........................................................7-1 Solving an Equation.................................................................
Dot product ......................................................................10-4 Angle between vectors.......................................................10-5 Vectors in Equations ...............................................................10-6 Vectors in Programs................................................................... 10-7 Creating Vectors from Variables or Registers ............................10-8 11.Base Conversions and Arithmetic and Logic................
Part 2. Programming 13.Simple Programming.................................................13-1 Designing a Program ............................................................. 13-3 Selecting a Mode ............................................................. 13-3 Program Boundaries (LBL and RTN) ..................................... 13-4 Using RPN, ALG and Equations in Programs ........................ 13-4 Data Input and Output ......................................................
Clearing One or More Programs.......................................13-23 The Checksum ................................................................13-23 Nonprogrammable Functions ................................................13-24 Programming with BASE .......................................................13-24 Selecting a Base Mode in a Program.................................13-25 Numbers Entered in Program Lines ....................................13-25 Polynomial Expressions and Horner's Method..
15.Solving and Integrating Programs..............................15-1 Solving a Program ................................................................. 15-1 Using SOLVE in a Program ..................................................... 15-6 Integrating a Program ............................................................ 15-7 Using Integration in a Program.............................................. 15-10 Restrictions on Solving and Integrating ................................... 15-11 16.
B. User Memory and the Stack.........................................B-1 Managing Calculator Memory................................................... B-1 Resetting the Calculator ............................................................ B-2 Clearing Memory..................................................................... B-3 The Status of Stack Lift .............................................................. B-4 Disabling Operations...........................................................
How SOLVE Finds a Root ......................................................... D-1 Interpreting Results................................................................... D-3 When SOLVE Cannot Find a Root ............................................. D-8 Round–Off Error .................................................................... D-13 E. More about Integration................................................ E-1 How the Integral Is Evaluated....................................................
12 Contents
Part 1 Basic Operation
1 Getting Started v Watch for this symbol in the margin. It identifies examples or keystrokes that are shown in RPN mode and must be performed differently in ALG mode. Appendix C explains how to use your calculator in ALG mode. Important Preliminaries Turning the Calculator On and Off To turn the calculator on, press . ON is printed on the bottom of the key. To turn the calculator off, press . That is, press and release the shift key, then press (which has OFF printed in yellow above it).
Highlights of the Keyboard and Display Shifted Keys Each key has three functions: one printed on its face, a left–shifted function (yellow), and a right–shifted function (blue). The shifted function names are printed in yellow above and in blue on the bottom of each key. Press the appropriate shift key ( or ) before pressing the key for the desired function. For example, to turn the calculator off, press and release the shift key, then press .
Pressing or turns on the corresponding or annunciator symbol at the top of the display. The annunciator remains on until you press the next key. To cancel a shift key (and turn off its annunciator), press the same shift key again. Alpha Keys Left-shifted function Right-shifted function Letter for alphabetic key Most keys display a letter in their bottom right corner, as shown above. Whenever you need to type a letter (for example, a variable or a program label), the A..
Backspacing and Clearing Among the first things you need to know are how to clear an entry, correct a number, and clear the entire display to start over. Keys for Clearing Key Description Backspace. If an expression is in the process of being entered, erases the character to the left of the entry cursor ( _ ). Otherwise, with a completed expression or the result of a calculation in line 2, replaces that result with a zero. and exits menus.
Keys for Clearing (continued) Key Description The CLEAR menu ( ) contains options for clearing x (the number in the X-register), all direct variables, all of memory, all statistical data, all stacks and indirect variables. If you press (), a new menu is displayed so you can verify your decision before erasing everything in memory. During program entry, is replaced by .
Using Menus There is a lot more power to the HP 35s than what you see on the keyboard. This is because 16 of the keys are menu keys. There are 16 menus in all, which provide many more functions, or more options for more functions. HP 35s Menus Menu Name Menu Description Chapter Numeric Functions L.R. ̂ ̂ 12 Linear regression: curve fitting and linear estimation. x,y 12 Arithmetic mean of statistical x– and y–values; weighted mean of statistical x–values.
Programming Instructions FLAGS 14 x?y Functions to set, clear, and test flags. ≠≤<>≥= 14 x?0 Comparison tests of the X–and Y–registers. ≠≤<>≥= 14 Comparison tests of the X–register and zero. Other functions MEM 1, 3, 12 Memory status (bytes of memory available); catalog of variables; catalog of programs (program labels).
Some menus, like the CONST and SUMS, have more than one page. Entering these Õ and Ö cursor keys to navigate to an item on the current menu page; use the Ø and × menus turns on the or annunciator. In these menus, use the keys to access the next and previous pages in the menu. Example: In this example, we use the DISPLAY menu to fix the display of numbers to 4 decimal places and then compute 6÷7. The example closes using the DISPLAY menu to return to full floating point display of numbers.
backs out of the 2–level CLEAR or MEM menu, one level at a in the table on page 1–5. time. Refer to Pressing Pressing or cancels any other menu. Keys: 8 or Display: _ _ Pressing another menu key replaces the old menu with the new one.
To select ALG mode: Press 9{() to set the calculator to ALG mode. When the calculator is in ALG mode, the ALG annunciator is on. Example: Suppose you want to calculate 1 + 2 = 3. key, enter the second number, and finally press the arithmetic operator key: . In RPN mode, you enter the first number, press the In ALG mode, you enter the first number, press finally press the , enter the second number, and key.
Undo key The Undo Key The operation of the Undo key depends on the calculator context, but serves largely to recover from the deletion of an entry rather than to undo any arbitrary operation. See The Last X Register in Chapter 2 for details on recalling the entry in line 2 of the display after a numeric function is executed.
The Display and Annunciators First Line Second Line The display comprises two lines and annunciators. Entries with more than 14 characters will scroll to the left. During input, the entry is displayed in the first line in ALG mode and the second line in RPN mode. Every calculation is displayed in up to 14 digits, including an sign (exponent), and exponent value up to three digits. Annunciators The symbols on the display, shown in the above figure, are called annunciators.
HP 35s Annunciators Annunciator Meaning Chapter The " (Busy)" annunciator appears while an operation, equation, or program is executing. When in Fraction–display mode (press 5 ), only one of the " " or " " halves of the " "' annunciator will be turned on to indicate whether the displayed numerator is slightly less than or slightly greater than its true value. If neither part of " " is on, the exact value of the fraction is being displayed. Left shift is active. 1 Right shift is active.
HP 35s Annunciators (continued) Annunciator , Meaning Chapter There are more characters to the left or right in the display of the entry in line 1 or line 2. Both of these annunciators may appear simultaneously, indicating that there are characters to the left and right in the display of an entry. Entries in line 1 with missing characters will show an ellipsis (…) to indicate missing characters.
Keying in Numbers The minimum and maximum values that the calculator can handle are ±9.99999999999499. If the result of a calculation is beyond this range, the error message “” appears momentarily along with the annunciator. The overflow message is then replaced with the value closest to the overflow boundary that the calculator can display. The smallest numbers the calculator can distinguish from zero are ±10 -499.
Keys: Display: Description: _ Shows number being entered. Rounds number to fit the display format. Automatically uses scientific notation because otherwise no significant digits would appear. Keying in Powers of Ten The key is used to enter powers of ten quickly. For example, instead of entering one million as 1000000 you can simply enter . The following example illustrates the process as well as how the calculator displays the result.
Other Exponent Functions . To calculate the result of any number raised to a power (exponentiation), use (see To calculate an exponent of ten (the base 10 antilogarithm), use chapter 4). Understanding Entry Cursor As you key in a number, the cursor (_) appears and blinks in the display. The cursor shows you where the next digit will go; it therefore indicates that the number is not complete. Keys: Display: _ Description: Entry not terminated: the number is not complete.
Performing Arithmetic Calculations The HP 35s can operate in either RPN mode or in Algebraic mode (ALG). These modes affect how expressions are entered. The following sections illustrate the entry differences for single argument (or unary) and two argument (or binary) operations. Single Argument or Unary Operations Some of the numerical operations of the HP 35s require a single number for input, such as , , &and k.
Example: Calculate 3.42, first in RPN mode and then in ALG mode. Keys: 9() Display: Description: Enter RPN mode (if necessary) Enter the number Press the square operator 9() Enter the square operation Insert the number between the Switch to ALG mode parentheses Press the Enter key to see the result In the example, the square operator is shown on the key as but displays as SQ().
Example Calculate 2+3 and 6C4, first in RPN mode and then in ALG mode. Keys: 9() Display: Description: Switch to RPN mode (if necessary) Enter 2, then place 3 in the x-register. Note the flashing cursor after the 3; don’t press Enter! Press the addition key to see the result. _ x 9() Enter 6, then place 4 in the x-register. _ Press the combinations key to see the result. Switch to ALG mode Expression and result are both shown.
Key In RPN, RPN Program In ALG, Equation, ALG Program yx ^ x√y INT÷ XROOT(, ) For commutative operations such as IDIV(, ) and , the order of the operands does not affect the calculated result. If you mistakenly enter the operand for a noncommutative two argument operation in the wrong order in RPN mode, simply press the key to exchange the contents in the x- and y-registers.
Scientific Format () SCI format displays a number in scientific notation (one digit before the "" or "" radix mark) with up to 11 decimal places and up to three digits in the exponent. After the prompt, _, type in the number of decimal places to be displayed. For 10 or 11 places, press or . (The mantissa part of the number will always be less than 10.
Example: This example illustrates the behavior of the Engineering format using the number 12.346E4. It also shows the use of the @ and 2 functions. This example uses RPN mode. Keys: Display: Description: _ Choose Engineering format Enter 4 (for 4 significant digits after the 1st) } @ or 2 @ Enter 12.
Example Enter the number 12,345,678.90 and change the decimal point to the comma. Then choose to have no thousand separator. Finally, return to the default settings. This example uses RPN mode. Keys: Display: Description: Select full floating point precision (ALL format) 8( ) The default format uses the comma as the thousand separator and the period as the radix. 8() Change to use the comma for the radix.
Example Display the complex number 3+4i in each of the different formats. Keys: Display: 9() 6 Enable ALG mode 8 ( ) 8 () or 8× ×Õ Description: Enter the complex number. It displays as 3i4, the default format. Change to x+yi format. θ Change to rθ a format. The radius is 5 and the angle is approximately 53.13°.
8() All significant digits; trailing zeros dropped. 8() Î (hold) Four decimal places, no exponent. Reciprocal of 58.5. Shows full precision until you release Fractions The HP 35s allows you to enter and operate on fractions, displaying them as either decimals or fractions. The HP 35s displays fractions in the form a b/c, where a is an integer and both b and c are counting numbers. In addition, b is such that 0≤b
Example Enter the mixed numeral 12 3/8 and display it in fraction and decimal forms. Then enter ¾ and add it to 12 3/8. This example uses RPN mode. Keys: Display: Description: The decimal point is interpreted in the normal way. When _ display switches to fraction mode. Upon entry, the number is displayed using the current display format. É Switch to fraction display mode.
Any other key also clears the message, though the key function is not entered If no message is displayed, but the annunciator appears, then you have pressed an inactive or invalid key. For example, pressing will display because the second decimal point has no meaning in this context. All displayed messages are explained in appendix F, "Messages". Calculator Memory The HP 35s has 30KB of memory in which you can store any combination of data (variables, equations, or program lines).
Clearing All of Memory Clearing all of memory erases all numbers, equations, and programs you've stored. It does not affect mode and format settings. (To clear settings as well as data, see "Clearing Memory" in appendix B.) To clear all of memory: 1. Press (). You will then see the confirmation prompt , which safeguards against the unintentional clearing of memory. 2. Press Ö () .
1-30 Getting Started
2 RPN: The Automatic Memory Stack This chapter explains how calculations take place in the automatic memory stack in RPN mode. You do not need to read and understand this material to use the calculator, but understanding the material will greatly enhance your use of the calculator, especially when programming. In part 2, "Programming", you will learn how the stack can help you to manipulate and organize data for programs.
Pa r t 3 T Pa r t 2 “Oldest” number Pa r t 1 0 .0 0 0 0 Pa r t 3 Z Y Pa r t 2 Pa r t 1 0 .0 0 0 0 Pa r t 3 Pa r t 2 Pa r t 1 0 .0 0 0 0 Displayed Pa r t 3 X Pa r t 2 Displayed Pa r t 1 0 .0 0 0 0 The most "recent" number is in the X–register: this is the number you see in the second line of the display. Every register is separated into three parts: A real number or a 1-D vector will occupy part 1; part 2 and part 3 will be null in this case.
The X and Y–Registers are in the Display The X and Y–Registers are what you see except when a menu, a message, an equation line ,or a program line is being displayed. You might have noticed that several function names include an x or y. This is no coincidence: these letters refer to the X– and Y–registers. For example, raises ten to the power of the number in the X–register. Clearing the X–Register () always clears the X–register to zero; it is also used to program this instruction.
What was in the X–register rotates into the T–register, the contents of the T–register rotate into the Z–register, etc. Notice that only the contents of the registers are rolled — the registers themselves maintain their positions, and only the X– and Y–register's contents are displayed. R (Roll Up) The (roll up) key has a similar function to except that it "rolls" the stack contents upward, one register at a time.
Arithmetic – How the Stack Does It The contents of the stack move up and down automatically as new numbers enter the X–register (lifting the stack) and as operators combine two numbers in the X– and Y–registers to produce one new number in the X–register (dropping the stack). Suppose the stack is filled with the numbers 1, 2, 3, and 4. See how the stack drops and lifts its contents while calculating 1. The stack "drops" its contents. The T–(top) register replicates its contents. 2.
How ENTER Works You know that separates two numbers keyed in one after the other. In terms of the stack, how does it do this? Suppose the stack is again filled with 1, 2, 3, and 4. Now enter and add two new numbers: 5+6 1 lost 2 lsot T 1 2 3 3 3 Z 2 3 4 4 3 Y 3 4 5 5 4 X 4 5 1 1. 5 2 3 6 11 4 Lifts the stack. 2. Lifts the stack and replicates the X–register. 3. Does not lift the stack. 4. Drops the stack and replicates the T–register.
Filling the stack with a constant The replicating effect of together with the replicating effect of stack drop (from T into Z) allows you to fill the stack with a numeric constant for calculations. Example: Given bacterial culture with a constant growth rate of 50% per day, how large would a population of 100 be at the end of 3 days? Replicates T – register T 1.5 1.5 1.5 1.5 1.5 Z Y X 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1 1. 1.5 1.5 100 2 3 150 225 4 337.
1 T Z Y X 1 1 1 1. 1 2 1 2 2 3 1 C 4 0 1 3 3 5 Lifts the stack 2. Lifts the stack and replicates the X–register. 3. Overwrites the X–register. 4. Clears x by overwriting it with zero. 5. Overwrites x (replaces the zero.) The LAST X Register The LAST X register is a companion to the stack: it holds the number that was in the X–register before the last numeric function was executed.
Correcting Mistakes with LAST X Wrong Single Argument Function to retrieve the number so you can execute the correct function. (Press first if you want to If you execute the wrong single argument function, use clear the incorrect result from the stack.) Since and don't cause the stack to drop, you can recover from these functions in the same manner as from single argument functions. Example: Suppose that you had just computed ln 4.7839 × (3.879 × 105) and wanted to find by mistake.
Example: Suppose you made a mistake while calculating 16 × 19 = 304 There are three kinds of mistakes you could have made: Wrong Mistake: Correction: Calculation: Wrong function Wrong first number Ù Wrong second number Reusing Numbers with LAST X You can use to reuse a number (such as a constant) in a calculation.
Keys: Display: Description: Enters first number. Intermediate result. Brings back display from before Final result. . Example: Two close stellar neighbors of Earth are Rigel Centaurus (4.3 light–years away) and Sirius (8.7 light–years away). Use c, the speed of light (9.5 × 1015 meters per year) to convert the distances from the Earth to these stars into meters: To Rigel Centaurus: 4.3 yr × (9.5 × 1015 m/yr). To Sirius: 8.7 yr × (9.
Keys: Display: Description: _ Light–years to Rigel Centaurus. Speed of light, c. Meters to R. Centaurus. Retrieves c. Meters to Sirius. Chain Calculations in RPN Mode In RPN mode, the automatic lifting and dropping of the stack's contents let you retain intermediate results without storing or reentering them, and without using parentheses. Work from the Parentheses Out For example, evaluate (12 + 3) × 7.
Keys: Display: Description: Pressing the function key produces the answer. This result can be used in further calculations. Now study the following examples. Remember that you need to press only to separate sequentially-entered numbers, such as at the beginning of an expression. The operations themselves (, , etc.) separate subsequent numbers and save intermediate results. The last result saved is the first one retrieved as needed to carry out the calculation.
Then multiplies the intermediate answers together for the final answer. Exercises Calculate: (16.3805x 5) = 181.0000 0.05 Solution: Calculate: [(2 + 3) × (4 + 5)] + [(6 + 7) × (8 + 9)] = 21.5743 Solution: Calculate: (10 – 5) ÷ [(17 – 12) × 4] = 0.2500 Solution: or Order of Calculation We recommend solving chain calculations by working from the innermost parentheses outward.
4 ÷ [14 + (7 × 3) – 2] by starting with the innermost parentheses (7 × 3) and working outward, just as you would with pencil and paper. The keystrokes were . If you work the problem from left–to–right, press . This method takes one additional keystroke. Notice that the first intermediate result is still the innermost parentheses (7 × 3).
Intermediate result. Final result. More Exercises Practice using RPN by working through the following problems: Calculate: (14 + 12) × (18 – 12) ÷ (9 – 7) = 78.0000 A Solution: Calculate: 2 23 – (13 × 9) + 1/7 = 412.1429 A Solution: Calculate: (5.4 × 0.8) ÷ (12.5 − 0.73 ) = 0.5961 Solution: or Calculate: 8.33 × (4 − 5.2) ÷ [(8.33 − 7.46) × 0.32] = 4.5728 4.3 × (3.15 − 2.75) − (1.71× 2.
A Solution: RPN: The Automatic Memory Stack 2-17
2-18 RPN: The Automatic Memory Stack
3 Storing Data into Variables The HP 35s has 30 KB of memory, in which you can store numbers, equations, and programs. Numbers are stored in locations called variables, each named with a letter from A through Z. (You can choose the letter to remind you of what is stored there, such as B for bank balance and C for the speed of light.) Example: This example shows you how to store the value 3 in the variable A, first in RPN mode and then in ALG mode.
In ALG mode, you can store an expression into a variable; in this case, the value of the expression is stored in the variable rather than the expression itself. Example: Keys: Display: Description: Enter the expression, then proceed as in the previous example. Each pink letter is associated with a key and a unique variable. (The A..Z annunciator in the display confirms this.
Keys: Display: Description: _ _ A A _ Avogadro's number. “” prompts for variable. Stores a copy of Avogadro's number in A. This also terminates digit entry . Clears the number in the display. A..Z The A..Z annunciator Turns on Copies Avogadro's number from A the display. To recall the value stored in a variable, use the Recall command.
Keys: Display: 9() _ G Description: Switch to RPN mode In RPN mode, pastes the command into the edit line. No need to press . Viewing a Variable The VIEW command () displays the value of a variable without recalling that value to the x-register. The display takes the form Variable=Value. If the number has too many digits to fit into the display, use Õ or Ö to view the missing digits. To cancel the VIEW display, press or .
Example: In this example, we store 3 in C, 4 in D, and 5 in E. Then we view these variables via the VAR Catalog and clear them as well. This example uses RPN mode. Keys: Display: Description: Clear all direct variables ( ) C D E u() Store 3 in C, 4 in D, and 5 in E. Enter the VAR catalog.
To leave the VAR catalog at any time, press either or . An alternate method to clearing a variable is simply to store the value zero in it. Finally, you can clear all direct variables by pressing (). If all direct variables have the value zero, then attempting to enter the VAR catalog will display the error message “ ”. If the value of a variable has too many digits to display completely, you can use Õ and Ö to view the missing digits.
A 15 A 12 Result: 15 – 3 that is, A – x T t T t Z z Z z Y y Y y X 3 X 3 A Recall Arithmetic Recall arithmetic uses , , , or to do arithmetic in the X–register using a recalled number and to leave the result in the display. Only the X–register is affected. The value in the variable remains the same and the result replaces the value in the x-register.
Example: Suppose the variables D, E, and F contain the values 1, 2, and 3. Use storage arithmetic to add 1 to each of those variables. Keys: D E F D E F D E F Display: Description: Stores the assumed values into the variable. Adds1 to D, E, and F. Displays the current value of D. Clears the VIEW display; displays Xregister again.
Example: Keys: Display: Description: A A Stores 12 in variable A. _ Displays x. A Exchanges contents of the X–register and variable A. Exchanges contents of the X–register and variable A. A 12 A 3 T t T t Z z Z z Y y Y y X 3 X 12 A The Variables "I" and "J" There are two variables that you can access directly: the variables I and J.
3-10 Storing Data into Variables
4 Real–Number Functions This chapter covers most of the calculator's functions that perform computations on real numbers, including some numeric functions used in programs (such as ABS, the absolute–value function). These functions are addressed in groups, as follows: Exponential and logarithmic functions. Quotient and Remainder of Divisions. Power functions. ( and ) Trigonometric functions. Hyperbolic functions. Percentage functions.
To Calculate: Natural logarithm (base e) Common logarithm (base 10) Natural exponential Common exponential (antilogarithm) Press: Quotient and Remainder of Division You can use ()and () to produce the integer quotient and integer remainder, respectively, from the division of two integers. 1. Key in the first integer. to separate the first number from the second. 3. Key in the second number. (Do not press .) 2. Press 4. Press the function key.
To Calculate: Press: 152 10 6 54 2 –1.4 (–1.4)3 Result: In RPN mode, to calculate a root x of a number y (the xth root of y), key in y x, then press . For y < 0, x must be an integer. To Calculate: 196 3 − 125 4 625 −1.4 .37893 Press: Result: Trigonometry Entering π Press to place the first 12 digits of π into the X–register.
Setting the Angular Mode The angular mode specifies which unit of measure to assume for angles used in trigonometric functions. The mode does not convert numbers already present (see "Conversion Functions" later in this chapter). 360 degrees = 2π radians = 400 grads To set an angular mode, press 9. A menu will be displayed from which you can select an option.
Example: Show that cosine (5/7)π radians and cosine 128.57° are equal (to four significant digits). Keys: Display: 9() 9() Description: Sets Radians mode; RAD annunciator on. 5/7 in decimal format. Cos (5/7)π. Switches to Degrees mode (no annunciator). Calculates cos 128.57°, which is the same as cos (5/7)π.
Hyperbolic Functions With x in the display: To Calculate: Press: Hyperbolic sine of x (SINH). Hyperbolic cosine of x (COSH). Hyperbolic tangent of x (TANH). Hyperbolic arc sine of x (ASINH). Hyperbolic arc cosine of x (ACOSH). Hyperbolic arc tangent of x (ATANH).
Keys: Display: 8() Description: Rounds display to two decimal places. Calculates 6% tax. Total cost (base price + 6% tax). Suppose that the $15.76 item cost $16.12 last year. What is the percentage change from last year's price to this year's? Keys: Display: 8() Description: Note This year's price dropped about 2.2% from last year's price. Restores FIX 4 format.
Physics Constants There are 41 physics constants in the CONST menu. You can press to view the following items. CONST Menu Items Description Speed of light in vacuum Standard acceleration of gravity Newtonian constant of gravitation Value 299792458 m s–1 9.80665 m s–2 6.673×10 –11 m3 kg– 1s–2 0.022413996 m3 mol–1 Molar volume of ideal gas Avogadro constant ∞ Rydberg constant Elementary charge 1.602176462×10–19 C Electron mass 9.
Items Description Value –4.49044813×10–26 J T–1 Muon magnetic moment 2.817940285×10–15 m Classical electron radius Characteristic impendence of vacuum λ Compton wavelength 2.426310215×10–12 m λ Neutron Compton wavelength 1.319590898×10–15 m λ Proton Compton wavelength 1.321409847×10–15 m 7.
Conversion Functions The HP 35s supports four types of conversions. You can convert between: rectangular and polar formats for complex numbers degrees, radians, and gradients for angle measures decimal and hexagesimal formats for time (and degree angles) various supported units (cm/in, kg/lb, etc) With the exception of the rectangular and polar conversions, each of the conversions is associated with a particular key.
To convert between rectangular and polar coordinates: The format for representing complex numbers is a mode setting. You may enter a complex number in any format; upon entry, the complex number is converted to the format determined by the mode setting. Here are the steps required to set a complex number format: 1. Press 8 and then choose either ( ) or () in ( ) 2. Input your desired coordinate value (x 6 y, x y 6 or r ?a) 3.
() θ Sets complex coordinate mode. 6 θ 8 Convert xiy (rectangular) to rθ a (polar). Example: Conversion with Vectors. Engineer P.C. Bord has determined that in the RC circuit shown, the total impedance is 77.8 ohms and voltage lags current by 36.5º. What are the values of resistance R and capacitive reactance XC in the circuit? Use a vector diagram as shown, with impedance equal to the polar magnitude, r, and voltage lag equal to the angle, θ, in degrees.
Time Conversions The HP 35s can convert between decimal and hexagesimal formats for numbers. This is especially useful for time and angles measured in degrees. For example, in decimal format an angle measured in degrees is expressed as D.ddd…, while in hexagesimal the same angle is represented as D.
To convert an angle between degrees and radians: Example In this example, we convert an angle measure of 30° to π/6 radians. Keys: Display: _ µ Description: Enter the angle in degrees. Convert to radians. Read the result as 0.5236, a decimal approximation of π/6.
Probability Functions Factorial To calculate the factorial of a displayed non-negative integer x (0 ≤ x ≤ 253), press * (the right–shifted key). Gamma To calculate the gamma function of a noninteger x, Γ(x), key in (x – 1) and press *. The x! function calculates Γ(x + 1). The value for x cannot be a negative integer. Probability Combinations To calculate the number of possible sets of n items taken r at a time, enter n first, x, then r (nonnegative integers only).
The RANDOM function uses a seed to generate a random number. Each random number generated becomes the seed for the next random number. Therefore, a sequence of random numbers can be repeated by starting with the same seed. You can store a new seed with the SEED function. If memory is cleared, the seed is reset to zero. A seed of zero will result in the calculator generating its own seed. Example: Combinations of People. A company employing 14 women and 10 men is forming a six–person safety committee.
Parts of Numbers These functions are primarily used in programming. Integer part To remove the fractional part of x and replace it with zeros, press (). (For example, the integer part of 14.2300 is 14.0000.) Fractional part To remove the integer part of x and replace it with zeros, press (). (For example, the fractional part of 14.2300 is 0.2300) Absolute value To replace a number in the x-register with its absolute value, press .
Greatest integer To obtain the greatest integer equal to or less than given number, press (). Example: This example summarizes many of the operations that extract parts of numbers. To calculate: Press: () The fractional part of 2.47 () The absolute value of –7 The sign value of 9 () The greatest integer equal to The integer part of 2.47 or less than –5.
5 Fractions In Chapter 1, the section Fractions introduced the basics of entering, displaying, and calculating with fractions. This chapter gives more information on these topics. Here is a short review of entering and displaying fractions: To enter a fraction, press twice: once after the integer part of a mixed number and again between the numerator and denominator of the fractional part of the number. To enter 2 3/8, press . To enter 5/8, press either or .
If you didn't get the same results as the example, you may have accidentally changed how fractions are displayed. (See "Changing the Fraction Display" later in this chapter.) The next topic includes more examples of valid and invalid input fractions. Fractions in the Display In Fraction–display mode, numbers are evaluated internally as decimal numbers, then they're displayed using the most precise fractions allowed.
Entered Value Internal Value Displayed Fraction 2 3/8 2.37500000000 14 15/32 14.4687500000 54/12 4.50000000000 6 18/5 9.60000000000 34/12 2.83333333333 15/8192 0.00183105469 12345678 12345/3 12349793.0000 16 3/16384 16.0001831055 Accuracy Indicators The accuracy of a displayed fraction is indicated by the and annunciators at the right of the display.
This is especially important if you change the rules about how fractions are displayed. (See "Changing the Fraction Display" later.) For example, if you force all fractions to have 5 as the denominator, then 2/3 is displayed as because the exact fraction is approximately 3.3333/5, "a little above" 3/5. Similarly, –2/3 is displayed as because the true numerator is "a little above" 3. Sometimes an annunciator is lit when you wouldn't expect it to be.
To set the maximum denominator value, enter the value and then press . Fraction-display mode will be automatically enabled. The value you enter cannot exceed 4095. To recall the /c value to the X–register, press . To restore the default value to 4095, press or enter any value greater than 4095 as the maximum denominator. Again, Fraction-display mode will be automatically enabled. The /c function uses the absolute value of the integer part of the number in the X– register.
2. In ALG mode, you can use the result of a calculation as the argument for the /c function. With the value in line 2, simply press . The value in line 2 is displayed in Fraction format and the integer part is used to determine the maximum denominator. 3. You may not use either a complex number or a vector as the argument for the / c command. The error message “ ” will be displayed. Choosing a Fraction Format The calculator has three fraction formats.
To Get This Fraction Format: Most precise Factors of denominator Fixed denominator Change These Flags: 8 9 Clear Set Set — Clear Set You can change flags 8 and 9 to set the fraction format using the steps listed here. (Because flags are especially useful in programs, their use is covered in detail in chapter 14.) to get the flag menu. 2. To set a flag, press () and type the flag number, such as 8. To clear a flag, press () and type the flag number.
Examples of Fraction Displays The following table shows how the number 2.77 is displayed in the three fraction formats for two /c values. Fraction Format Most Precise How 2.77 Is Displayed /c = 4095 /c = 16 2 77/100 (2.7700) 2 10/13 (2.7692) Factors of Denominator 2 1051/1365 (2.7699) 2 3/4 (2.7500) Fixed Denominator 2 3153/4095 (2.7699) 2 12/16 (2.7500) The following table shows how different numbers are displayed in the three fraction formats for a /c value of 16.
Example: Suppose you have a 56 3/4–inch space that you want to divide into six equal sections. How wide is each section, assuming you can conveniently measure 1/16– inch increments? What's the cumulative roundoff error? Keys: Display: Description: Sets Flag 8 Sets up fraction format for 1/16– inch increments. (Flags 8 and 9 should be the same as for the previous example.) D Stores the distance in D. The sections are a bit wider than 9 7/16 inches.
Fractions in Programs You can use a fraction in a program just as you can in an equation; numerical values are shown in their entered form. When you're running a program, displayed values are shown using Fraction– display mode if it's active. If you're prompted for values by INPUT instructions, you may enter fractions. The program’s result is displayed using the current display format. A program can control the fraction display using the /c function and by setting and clearing flags 7, 8, and 9.
6 Entering and Evaluating Equations How You Can Use Equations You can use equations on the HP 35s in several ways: For specifying an equation to evaluate (this chapter). For specifying an equation to solve for unknown values (chapter 7). For specifying a function to integrate (chapter 8). Example: Calculating with an Equation. Suppose you frequently need to determine the volume of a straight section of pipe. The equation is V = .25 π d2 l where d is the inside diameter of the pipe, and l is its length.
Keys: Display: Description: Selects Equation mode, shown by or the current equation in the EQN annunciator. line 2 Begins a new equation, _ D π_ turns on the A..Z annunciator so you can enter a variable name. types Digit entry uses the "_" entry cursor. ends the number. _ π _ types . π Terminates and displays the equation.
Summary of Equation Operations All equations you create are saved in the equation list. This list is visible whenever you activate Equation mode. You use certain keys to perform operations involving equations. They're described in more detail later. When displaying equations in the equation list, two equations are displayed at a time. The currently active equation is shown on line 2. Key Operation Enters and leaves Equation mode. Evaluates the displayed equation.
Entering Equations into the Equation List The equation list is a collection of equations you enter. The list is saved in the calculator's memory. Each equation you enter is automatically saved in the equation list. To enter an equation: You can make an equation as long as you want – it is limited only by the amount of available memory. 1. Make sure the calculator is in its normal operating mode, usually with a number in the display. For example, you can't be viewing the catalog of variables or programs.
Numbers in Equations You can enter any valid number in an equation, including base 2, 8 and 16, real, complex, and fractional numbers. Numbers are always shown using ALL display format, which displays up to 12 characters. To enter a number in an equation, you can use the standard number–entry keys, including , , and . Do not use for subtraction. Functions in Equations You can enter many HP 35s functions in an equation. A complete list is given under “Equation Functions” later in this chapter.
Parentheses in Equations You can include parentheses in equations to control the order in which operations are performed. Press 4 to insert parentheses. (For more information, see "Operator Precedence" later in this chapter.) Example: Entering an Equation. Enter the equation r = 2 × c ×(t – a)+25 Keys: Display: Description: π Shows the last equation used in the equation list. _ Starts a new equation with variable R.
To display equations: 1. Press . This activates Equation mode and turns on the EQN annunciator. The display shows an entry from the equation list: if the equation pointer is at the top of the list. The current equation (the last equation you viewed). 2. Press × or Ø to step through the equation list and view each equation. The list "wraps around" at the top and bottom. marks the "top" of the list. To view a long equation: 1.
Editing and Clearing Equations You can edit or clear an equation that you're typing. You can also edit or clear equations saved in the equation list. However, you cannot edit or clear the two builtin equations 2*2 lin. solve and 3*3 lin. solve. If you attempt to insert a equation between the two built-in equations, the new equation will be inserted after 3*3 lin. solve. To edit an equation you're typing: 1. Press Öor Õ to move the cursor allowing you to insert characters before the cursor. 2.
To clear a saved equation: Scroll the equation list up or down until the desired equation is in line 2 of the display, and then press . To clear all saved equations: . Select (). The menu is displayed. Select Ö (Y) . In EQN mode, press Example: Editing an Equation. Remove 25 in the equation from the previous example. Keys: Display: Ö _ _ Description: Shows the current equation in the equation list.
Expressions. The equation does not contain an "=". For example, x3 + 1 is an expression. When you're calculating with an equation, you might use any type of equation — although the type can affect how it's evaluated. When you're solving a problem for an unknown variable, you'll probably use an equality or assignment. When you're integrating a function, you'll probably use an expression.
Type of Equation Result for Equality: g(x) = f(x) g(x) – f(x) Example: x2 + y2 = r2 Assignment: y = f(x) Example: A = 0.5 × b x h Result for x2 + y2– r2 f(x) y – f(x) 0.5 × b × h A – 0.5 × b × h Expression: f(x) f(x) Example: x3 + 1 x3 + 1 Also stores the result in the left–hand variable, A for example. To evaluate an equation: 1. Display the desired equation. (See "Displaying and Selecting Equations" above.) 2. Press or . The equation prompts for a value for each variable needed.
If the equation is an assignment, only the right–hand side is evaluated. The result is returned to the X–register and stored in the left–hand variable, then the variable is viewed in the display. Essentially, finds the value of the left–hand variable. If the equation is an equality or expression, the entire equation is evaluated — just as it is for . The result is returned to the X–register. Example: Evaluating an Equation with ENTER.
Example: Evaluating an Equation with XEQ. Use the results from the previous example to find out how much the volume of the pipe changes if the diameter is changed to 35.5 millimeters. Keys: Display: Description: Displays the desired equation. Starts evaluating the equation to find its value. Prompts for all variables. Keeps the same V, prompts for D. Stores new D, Prompts for L.
To change the number, type the new number and press . This new number writes over the old value in the X–register. You can enter a number as a fraction if you want. If you need to calculate a number, use normal keyboard calculations, then press . For example, you can press 2 5 in RPN mode, or press 2 5 in ALG mode. Before pressing , the expression will display in line 2, and after pressing , the result of the expression will display in line 2. To cancel the prompt, press .
Order Operation 1 Parentheses Example 2 Functions 3 Power ( 4 Unary Minus () 5 Multiply and Divide , 6 Add and Subtract , 7 Equality ) So, for example, all operations inside parentheses are performed before operations outside the parentheses.
Equation Functions The following table lists the functions that are valid in equations. Appendix G, "Operation Index" also gives this information.
Eight of the equation functions have names that differ from their equivalent operations: RPN Operation Equation function x2 SQ x SQRT ex EXP 10 x ALOG 1/x INV y XROOT yx ^ INT÷ IDIV X Example: Perimeter of a Trapezoid. The following equation calculates the perimeter of a trapezoid.
Parentheses used to group items Single letter name Optional explicit multiplication Division is done before addition The next equation also obeys the syntax rules. This equation uses the inverse function, , instead of the fractional form, . Notice that the SIN function is "nested" inside the INV function. (INV is typed by .) Example: Area of a Polygon.
You can enter the equation into the equation list using the following keystrokes: Õ Syntax Errors The calculator doesn't check the syntax of an equation until you evaluate the equation. If an error is detected, is displayed and the cursor is displayed at the first error location. You have to edit the equation to correct the error. (See "Editing and Clearing Equations" earlier in this chapter.
Keys: ( ×as required) (hold) (release) Display: π Displays the desired equation. Display equation's checksum π Redisplays the equation. 6-20 Description: and length. Leaves Equation mode.
7 Solving Equations In chapter 6 you saw how you can use to find the value of the left–hand variable in an assignment–type equation. Well, you can use SOLVE to find the value of any variable in any type of equation. For example, consider the equation x2 – 3y = 10 If you know the value of y in this equation, then SOLVE can solve for the unknown x. If you know the value of x, then SOLVE can solve for the unknown y.
then press the key for the unknown variable. For example, press X to solve for x. The equation then prompts for a value for 2. Press every other variable in the equation. 3. For each prompt, enter the desired value: If the displayed value is the one you want, press . If you want a different value, type or calculate the value and press (For details, see "Responding to Equation Prompts" in chapter 6.) You can halt a running calculation by pressing . or .
Keys: Display: () Ö() Description: Clears memory. Selects Equation mode. _ G _ Starts the equation. Checksum and length. Terminates the equation and displays the left end. g (acceleration due to gravity) is included as a variable so you can change it for different units (9.8 m/s2 or 32.2 ft/s2 ). Calculate how many meters an object falls in 5 seconds, starting from rest.
Keys: Display: Description: Displays the equation. Solves for T; prompts for D. Stores 500 in D; prompts for V. Retains 0 in V; prompts for G. Retains 9.8 in G; solves for T. Example: Solving the Ideal Gas Law Equation.
A 2–liter bottle contains 0.005 moles of carbon dioxide gas at 24°C. Assuming that the gas behaves as an ideal gas, calculate its pressure. Since Equation mode is turned on and the desired equation is already in the display, you can start solving for P: Keys: P Display: value value Description: Solves for P; prompts for V. value value Stores 2 in V; prompts for N. Stores .005 in N; prompts for R. Stores .
Stores 291.1 in T; solves for N. Calculates density in grams per liter. Calculates mass in grams, N × 28. Solving built-in Equation The built-in equations are: “2*2 lin. solve” (Ax+By=C, Dx+Ey=F) and “3*3 lin. Solve”(Ax+By+Cz=D, Ex+Fy+Gz=H, Ix+Jy+Kz=L). If you select one of them, the , and key will have no effect.
Ø value Stores 4 in E ;prompts for F. Stores 11 in F and calculates x and y. value of y Understanding and Controlling SOLVE SOLVE first attempts to solve the equation directly for the unknown variable. If the attempt fails, SOLVE changes to an iterative (repetitive) procedure. The procedure starts by evaluating the equation using two initial guesses for the unknown variable. Based on the results with those two guesses, SOLVE generates another, better guess.
The Y–register (press ) contains the previous estimate for the root or equals to zero. This number should be the same as the value in the X–register. If it is not, then the root returned was only an approximation, and the values in the X– and Y–registers bracket the root. These bracketing numbers should be close together. The Z– register (press again) contains D-value of the equation at the root. For an exact root, this should be zero.
These sources are used for guesses whether you enter guesses or not. If you enter only one guess and store it in the variable, the second guess will be the same value since the display also holds the number you just stored in the variable. (If such is the case, the calculator changes one guess slightly so that it has two different guesses.) Entering your own guesses has the following advantages: By narrowing the range of search, guesses can reduce the time to find a solution.
Example: Using Guesses to Find a Root. Using a rectangular piece of sheet metal 40 cm by 80 cm, form an open–top box having a volume of 7500 cm3. You need to find the height of the box (that is, the amount to be folded up along each of the four sides) that gives the specified volume. A taller box is preferred to a shorter one. H _ 40 40 2 H H 80 _ 2 H H H 80 If H is the height, then the length of the box is (80 – 2H) and the width is (40 – 2H).
4 H Õ H _ _ Terminates and displays the equation. Checksum and length. It seems reasonable that either a tall, narrow box or a short, flat box could be formed having the desired volume. Because the taller box is preferred, larger initial estimates of the height are reasonable. However, heights greater than 20 cm are not physically possible because the metal sheet is only 40 cm wide.
The dimensions of the desired box are 50 × 10 × 15 cm. If you ignored the upper limit on the height (20 cm) and used initial estimates of 30 and 40 cm, you would obtain a height of 42.0256 cm — a root that is physically meaningless. If you used small initial estimates such as 0 and 10 cm, you would obtain a height of 2.9774 cm — producing an undesirably short, flat box. If you don't know what guesses to use, you can use a graph to help understand the behavior of the equation.
8 Integrating Equations Many problems in mathematics, science, and engineering require calculating the definite integral of a function.
Integrating Equations ( ∫ FN) To integrate an equation: 1. If the equation that defines the integrand's function isn't stored in the equation list, key it in (see "Entering Equations into the Equation List" in chapter 6) and leave Equation mode. The equation usually contains just an expression. 2. Enter the limits of integration: key in the lower limit and press , then key in the upper limit. and, if necessary, scroll through the equation list (press × or Ø) to display the desired equation. 4.
Example: Bessel Function. The Bessel function of the first kind of order 0 can be expressed as 1 J0 ( x ) = π ∫ π 0 cos( x sin t )dt Find the Bessel function for x–values of 2 and 3. Enter the expression that defines the integrand's function: cos (x sin t ) Keys: ()Ö() Display: Description: Clears memory. Selects Equation mode. X ÕÕ Types the equation.
Prompts for value of X. value ∫ x = 2. Starts integrating; calculates result for ∫ π 0 f (t ) The final result for J0 (2). Now calculate J0(3) with the same limits of integration. You must re-specify the limits of integration (0, π) since they were pushed off the stack by the subsequent division by π.
Enter the expression that defines the integrand's function: sin x x If the calculator attempted to evaluate this function at x = 0, the lower limit of integration, an error ( ) would result. However, the integration algorithm normally does not evaluate functions at either limit of integration, unless the endpoints of the interval of integration are extremely close together or the number of sample points is extremely large. Keys: Display: Description: Selects Equation mode.
Accuracy of Integration Since the calculator cannot compute the value of an integral exactly, it approximates it. The accuracy of this approximation depends on the accuracy of the integrand's function itself, as calculated by your equation. This is affected by round– off error in the calculator and the accuracy of the empirical constants. Integrals of functions with certain characteristics such as spikes or very rapid oscillations might be calculated inaccurately, but the likelihood is very small.
Example: Specifying Accuracy. With the display format set to SCI 2, calculate the integral in the expression for Si(2) (from the previous example). Keys: 8 Display: Description: Sets scientific notation with two decimal places, specifying that the function is accurate to two decimal places. Rolls down the limits of integration from the Z–and T–registers into the X–and Y–registers. X Displays the current Equation.
Keys: Display: Description: 8 () Specifies accuracy to four decimal places. The uncertainty from the last example is still in the display. Rolls down the limits of integration from the Z– and T–registers into the X– and Y–registers. X Displays the current equation. ∫ Calculates the result. Restores FIX 4 format. Restores Degrees mode.
9 Operations with Complex Numbers The HP 35s can use complex numbers in the form It has operations for complex arithmetic (+, –, ×, ÷), complex trigonometry (sin, cos, tan), and the mathematics functions –z, 1/z, z1z 2 , ln z, and e z. (where z1 and z2 are complex numbers). The form, x+yi, is only available in ALG mode. To enter a complex number: Form: 1. Type the real part. 2. Press6. 3. Type the imaginary part. Form: 1. Type the real part. 2. Press 3. Type the imaginary part. 4.
The Complex Stack A complex number occupies part 1 and part 2 of a stack level. In RPN mode, the complex number occupying part 1 and part 2 of the X-register is displayed in line 2, while the complex number occupying part 1 and part 2 of the Y-register is displayed in line 1.
Functions for One Complex Number, z To Calculate: Press: = Change sign, –z Inverse, 1/z Natural log, ln z Natural antilog, ez Sin z Cos z Tan z Absolute value, ABS(z) Argument value, ARG(z) To do an arithmetic operation with two complex numbers: 1. Enter the first complex number, z1 as described before. 2. Enter the second complex number z2 as described before. 3.
Examples: Here are some examples of trigonometry and arithmetic with complex numbers: Evaluate sin (2i3) Keys: 8 ( ) 6 Display: Description: Sets display format. Result is 9.1545 i –4.1689.
6 Enters 3i-2/3 Result is 11.7333i-3.8667 Evaluate e z −2 , where z = (1i 1). Keys: Display: 6 Description: ENTER 1i1Intermediate result of Z–2,result is 0i-5 Final result is 0.8776 i– 0.4794. Using Complex Numbers in Polar Notation Many applications use real numbers in polar form or polar notation.
y L2 170 lb 62 o 185 lb 143 o L1 x L3 100 lb Keys: 261 o Display: 9 () 8 Description: Sets Degrees mode. Sets complex mode ( ) ? θ θ ? θ θ ? θ θ θ Õ Enters L1 Enters L2. Enters L3 and adds L2 + L3 Adds L1 + L2 + L3.
Evaluate 1i1+3θ 10+5θ 30 Keys: Display: 9 () 8 Description: Sets Degrees mode. Sets complex mode ( ) 6 θ Enters 1i1 θ ? ? θ θ θ θ θ Enters 3θ 10 Enters 5θ 30 and adds 3θ 10 Adds 1i1,result is 9.2088θ 25.8898 Complex Numbers in Equations You can type complex numbers in equations.
Complex Number in Program In a program, you can type a complex number. For example, 1i2+3θ 10+5 θ 30 in program is: Program lines: (ALG mode) Description Begins the program When you are running a program and are prompted for values by INPUT instructions, you can enter complex numbers. The values and format of the result are controlled by the display setting. The program that contains the complex number can also be solved and integrated.
10 Vector Arithmetic From a mathematical point of view, a vector is an array of 2 or more elements arranged into a row or a column. Physical vectors that have two or three components and can be used to represent physical quantities such as position, velocity, acceleration, forces, moments, linear and angular momentum, angular velocity and acceleration, etc. To enter a vector: 3 1. Press 2. Enter the first number for the vector. 3. Press and enter a second number for a 2-D or 3-D vector. 4.
Calculate [1.5,-2.2]+[-1.5,2.2] Keys: Display: 9() 3 3 Description: Switches to RPN mode(if necessary) Enters [1.5,-2.2] Enters [-1.5,2.2] Adds two vectors Calculate [-3.4,4.5]-[2.3,1.4] Keys: 9() 3 Õ 3 Display: Switches to ALG mode _ Enters [-3.4,4.5] Enters [2.3,1.
Calculate [3,4]x5 Keys: Display: 9() 3 Description: Switches to RPN mode Enters [3,4] Enters 5 as a scalar _ Performs multiplication Calculate [-2,4]÷2 Keys: 9() 3 Õ Display: Description: Switches to ALG mode _ Enters [-2,4] Enters 5 as a scalar Performs division Absolute value of the vector The absolute value function “ABS”, when applied to
Dot product Function DOT is used to calculate the dot product of two vectors with the same length. Attempting to calculate the dot product of two vectors of different length causes an error message “ ”. For 2-D vectors: [A, B], [C, D], dot product is defined as [A, B] [C, D]= A x C +B x D. For 3-D vectors: [A, B, X], [C, D,Y], dot product is defined as [A, B, X] [C, D, Y]= A x C +B x D+X x Y 1. Enter the first Vector 2. Press 3.
Presses for dot product ,and the dot product of two vectors is 28 Angle between vectors The angle between two vectors, A and B, can be found as ACOS(A B/ A B θ = ) Find the angle between two vectors: A=[1,0],B=[0,1] Keys: 9() 9 () 3 Õ 3 Õ 3 Õ 3 Display: Description: Switches to ALG mode Sets Degrees mode Arc cosine function Enters vector A [1,0] Enters vector B [0,1] for dot product of A and B
3 Finds the magnitude of vector [0,5] Multiplies two vectors Divides two values The angle between two vectors is 36.8699 Vectors in Equations Vectors can be used in equations and in equation variables exactly like real numbers. A vector can be entered when prompted for a variable. Equations containing vectors can be solved, however the solver has limited ability if the unknown is a vector.
Vectors in Programs Vectors can be used in program in the same way as real and complex numbers For example, [5, 6] +2 x [7, 8] x [9, 10] in a program is: Program lines: Description: Begins the program [5,6] A vector can be entered when prompted for a value for a variable. Programs that contain vectors can be used for solving and integrating.
Creating Vectors from Variables or Registers It is possible to create vectors containing the contents of memory variables, stack registers, or values from the indirect registers, in run or program modes. In ALG mode, begin entering the vector by pressing similarly to ALG mode, except that the pressing 3. RPN mode works d key must be pressed first, followed by 3 . To enter an element containing the value stored in a lettered variable, press h and the variable letter.
11 Base Conversions and Arithmetic and Logic The BASE menu ( ) allows you to enter numbers and force the display of numbers in decimal, binary, octal and hexadecimal base. The LOGIC menu(>) provides access to logic functions. BASE Menu Menu label Description Decimal mode. This is the normal calculator mode Hexadecimal mode. The HEX annunciator is displayed when this mode is active. Numbers are displayed in hexadecimal format.
placed at the end of a number means that this number is an octal number. To enter an octal number, type the number followed by “” placed at the end of a number means that this number is a binary number. To enter a binary number, type the number followed by “” Examples: Converting the Base of a Number. The following keystrokes do various base conversions. Convert 125.9910 to hexadecimal, octal, and binary numbers.
The entire binary number does () Ö () you can use annunciator indicates that the number continues to the right. Displays the rest of the number. The full number is 10010011111111b. Õ not fit. The Displays the first 14 digits again. Restores base 10. menu to enter base-n sign b/o/d/h following the operand to represent 2/8/10/16 base number in any base mode. A number without a base sign is a decimal number Note: In ALG mode: 1.
LOGIC Menu Menu label Description Logical bit-by-bit "AND" of two arguments. For example: AND(1100b,1010b)=1000b Logical bit-by-bit "XOR" of two arguments. For example: XOR(1101b,1011b)=110b Logical bit-by-bit "OR" of two arguments. For example: OR(1100b,1010b)=1110b Returns the one's complement of the argument. Each bit in the result is the complement of the corresponding bit in the argument.
The result of an operation is always an integer (any fractional portion is truncated). Whereas conversions change only the display of the number but not the actual number in the X–register, arithmetic does alter the number in the X–register. If the result of an operation cannot be represented in valid bits, the display shows and then shows the largest positive or negative number possible.
() () b () () the numbers. Result in binary base. Result in hexadecimal base. Restores decimal base. Changes to base 2; BIN annunciator on. This terminates digit entry, so no is needed between The Representation of Numbers Although the display of a number is converted when the base is changed, its stored form is not modified, so decimal numbers are not truncated — until they are used in arithmetic calculations.
() Õ Õ () 2's complement (sign changed). Binary version; indicates more digits. The number is negative since the highest bit is 1. Displays the rest of the number by scrolling one screen Displays the rightmost window; Negative decimal number.
In BIN/OCT/HEX, If a number entered in decimal base is outside the range given above, then it produces the message . Any operation using causes an overflow condition, which substitutes the largest positive or negative number possible for the too-big number. Windows for Long Binary Numbers The longest binary number can have 36 digits. Each 14–digit display of a long number is called a window.
12 Statistical Operations The statistics menus in the HP 35s provide functions to statistically analyze a set of one– or two–variable data(real numbers): Mean, sample and population standard deviations. Linear regression and linear estimation ( x̂ and ŷ ). Weighted mean (x weighted by y). Summation statistics: n, Σx, Σy, Σx2, Σy2, and Σxy. Entering Statistical Data One– and two–variable statistical data are entered (or deleted) in similar fashion using the (or ) key.
Entering One–Variable Data ()to clear existing statistical data. 2. Key in each x–value and press . 1. Press 3. The display shows n, the number of statistical data values now accumulated. Pressing actually enters two variables into the statistics registers because the value already in the Y–register is accumulated as the y–value.
To correct statistical data: 1. Reenter the incorrect data, but instead of pressing , press . This deletes the value(s) and decrements n. 2. Enter the correct value(s) using . If the incorrect values were the ones just entered, press them, then press to retrieve to delete them. (The incorrect y–value was still in the Y– register, and its x–value was saved in the LAST X register.
Reenters the first data pair. There is still a total of two data pairs in the statistics registers. Statistical Calculations Once you have entered your data, you can use the functions in the statistics menus. Statistics Menus Menu Key L.R. Description The linear–regression menu: linear estimation ̂ ̂ and curve–fitting . See ''Linear Regression'' later in this chapter. x ,y The mean menu: . See "Mean" below.
Example: Mean (One Variable). Production supervisor May Kitt wants to determine the average time that a certain process takes. She randomly picks six people, observes each one as he or she carries out the process, and records the time required (in minutes): 15.5 9.25 10.0 12.5 12.0 8.5 Calculate the mean of the times. (Treat all data as x–values.) Keys: () ( ) Display: Description: Clears the statistics registers. Enters the first time.
ÕÕ ( ) Four data pairs accumulated. Calculates the mean price weighted for the quantity purchased. Sample Standard Deviation Sample standard deviation is a measure of how dispersed the data values are about the mean sample standard deviation assumes the data is a sampling of a larger, complete set of data, and is calculated using n – 1 as a divisor. Press () for the standard deviation of x–values.
Population Standard Deviation Population standard deviation is a measure of how dispersed the data values are about the mean. Population standard deviation assumes the data constitutes the complete set of data, and is calculated using n as a divisor. Press ÕÕ (σ) for the population standard deviation of the x– values. Press ÕÕÕ (σ) for the population standard deviation of the y–values. Example: Population Standard Deviation.
L.R. (Linear Regression) Menu Menu Key Description ̂ Estimates (predicts) x for a given hypothetical value of y, based on the line calculated to fit the data. ̂ Estimates (predicts) y for a given hypothetical value of x, based on the line calculated to fit the data. Correlation coefficient for the (x, y) data. The correlation coefficient is a number in the range –1 through +1 that measures how closely the calculated line fits the data. Slope of the calculated line.
ÕÕ () Enters data; displays n. Five data pairs entered. ̂ ̂ Õ ̂ ̂ Displays linear–regression menu. Correlation coefficient; data closely approximate a straight line. Slope of the line. Õ ̂ ̂ y–intercept. y 8.50 X 7.50 (70, y) r = 0.9880 6.50 m = 0.0387 5.50 b = 4.8560 x 4.
What if 70 kg of nitrogen fertilizer were applied to the rice field? Predict the grain yield based on the above statistics. Keys: Õ ( ̂ ) Display: Description: _ Enters hypothetical x–value. ̂ ̂ The predicted yield in tons per hectare. Limitations on Precision of Data Since the calculator uses finite precision, it follows that there are limitations to calculations due to rounding.
Summation Values and the Statistics Registers The statistics registers are six unique locations in memory that store the accumulation of the six summation values. Summation Statistics Pressing gives you access to the contents of the statistics registers: () to recall the number of accumulated data sets. Press Õ () to recall the sum of the x–values. Press ÕÕ () to recall the sum of the y–values.
× × × × × Views Σy2 register. Views Σx2 register. Views Σy register. Views Σx register. Views n register. Leaves VAR catalog. Access to the Statistics Registers The statistics register assignments in the HP 35s are shown in the following table. Summation registers should be referred to by names and not by numbers in expression, equations and programs.
You can load a statistics register with a summation by storing the number (-27 through -32) of the register you want in I or J and then storing the summation (value 7 or A). Similarly, you can press 7 or A (or 7 or A ) to view (or recall)a register value — the display is labeled with the register name. The SUMS menu contains functions for recalling the register values. See "Indirectly Addressing Variables and Labels" in chapter 14 for more information.
12-14 Statistical Operations
Part 2 Programming
13 Simple Programming Part 1 of this manual introduced you to functions and operations that you can use manually, that is, by pressing a key for each individual operation. And you saw how you can use equations to repeat calculations without doing all of the keystrokes each time. In part 2, you'll learn how you can use programs for repetitive calculations — calculations that may involve more input or output control or more intricate logic.
RPN mode π ALG mode π This very simple program assumes that the value for the radius is in the X– register (the display) when the program starts to run. It computes the area and leaves it in the X–register. In RPN mode, to enter this program into program memory, do the following: Keys: (In RPN mode) Display: Description: Clears memory. Activates Program–entry mode (PRGM annunciator on). Resets program pointer to PRGM TOP.
XÕ Resets program pointer to PRGM TOP. π Area = πx2 Exits Program–entry mode. Try running this program to find the area of a circle with a radius of 5: Keys: (In ALG mode) Display: X Description: This sets the program to its beginning. Stores 5 into X The answer! We will continue using the above program for the area of a circle to illustrate programming concepts and methods.
Program Boundaries (LBL and RTN) If you want more than one program stored in program memory, then a program needs a label to mark its beginning (such as ) and a return to mark its end (such as ). Notice that the line numbers acquire an to match their label. Program Labels Programs and segments of programs (called routines) should start with a label. To record a label, press: letter–key The label is a single letter from A through Z.
Using RPN operations (which work with the stack, as explained in chapter 2). Using ALG operations (as explained in appendix C). Using equations (as explained in chapter 6). The previous example used a series of RPN operations to calculate the area of the circle. Instead, you could have used an equation in the program. (An example follows later in this chapter.) Many programs are a combination of RPN and equations, using the strengths of both. Strengths of RPN Operations Use less memory. Execute faster.
For output, you can display a variable with the VIEW instruction, you can display a message derived from an equation, you can display process in line 1, you can display the program result in line 2, or you can leave unmarked values on the stack. These are covered later in this chapter under "Entering and Displaying Data." Entering a Program Pressing toggles the calculator into and out of Program–entry mode — turns the PRGM annunciator on and off.
5. End the program with a return instruction, which sets the program pointer back to after the program runs. Press 6. Press . (or ) to cancel program entry. Numbers in program lines are stored precisely as you entered them, and they're displayed using ALL or SCI format. (If a long number is shortened in the display, press to view all digits.) To enter an equation in a program line: 1. Press to activate Equation–entry mode. The EQN annunciator turns on. 2.
Now, erase line A002, and line A004 changes to “A003 GTO A002” Function Names in Programs The name of a function that is used in a program line is not necessarily the same as the function's name on its key, in its menu, or in an equation. The name that is used in a program is usually a fuller abbreviation than that which can fit on a key or in a menu. Example: Entering a Labeled Program.
Cancels program entry (PRGM annunciator off). A different checksum means the program was not entered exactly as given here. Example: Entering a Program with an Equation. The following program calculates the area of a circle using an equation, rather than using RPN operations like the previous program. Keys: (In RPN mode) Display: Description: Activates Program–entry mode; sets pointer to top of memory. Labels this program routine E (for "equation").
Running a Program To run or execute a program, program entry cannot be active (no program–line numbers displayed; PRGM off). Pressing will cancel Program–entry mode. Executing a Program (XEQ) Press label to execute the program labeled with that letter: To execute a program from it’s beginning press label . For example, press A . The display will show ” ” and execution will start at the top of Label A.
Testing a Program If you know there is an error in a program, but are not sure where the error is, then a good way to test the program is by stepwise execution. It is also a good idea to test a long or complicated program before relying on it. By stepping through its execution, one line at a time, you can see the result after each program line is executed, so you can verify the progress of known data whose correct results are also known. 1.
Ø (hold) (release) Ø (hold) (release) Ø (hold) (release) π Value of π. 25π. End of program. Result is correct. Entering and Displaying Data The calculator's variables are used to store data input, intermediate results, and final results. (Variables, as explained in chapter 3, are identified by a letter from A through Z, but the variable names have nothing to do with program labels.
Using INPUT for Entering Data The INPUT instruction ( Variable ) stops a running program and displays a prompt for the given variable. This display includes the existing value for the variable, such as where "R" is the variable's name, "?" is the prompt for information, and 0.0000 is the current value stored in the variable. Press (run/stop) to resume the program. The value you keyed in then writes over the contents of the X–register and is stored in the given variable.
2. In the beginning of the program, insert an INPUT instruction for each variable whose value you will need. Later in the program, when you write the part of the calculation that needs a given value, insert a variable instruction to bring that value back into the stack. Since the INPUT instruction also leaves the value you just entered in the Xñregister, you don't have to recall the variable at a later time ó you could INPUT it and use it when you need it.
To cancel the INPUT prompt, press . The current value for the variable remains in the X–register. If you press to resume the program, the canceled INPUT prompt is repeated. If you press during digit entry, it clears the number to zero. Press again to cancel the INPUT prompt.
Using Equations to Display Messages Equations aren't checked for valid syntax until they're evaluated. This means you can enter almost any sequence of characters into a program as an equation — you to start the equation. Press number and math keys to get numbers and symbols. Press before each letter. Press to end the equation. enter it just as you enter any equation. On any program line, press If flag 10 is set, equations are displayed instead of being evaluated.
Keys: (In RPN mode) Display: Calculates the volume. R H V R 4 R H S () V O L A R E A () V S () Description: π Checksum and length of equation. Store the volume in V. Calculates the surface area. π Checksum and length of equation. Stores the surface area in S. Sets flag 10 to display equations.
Now find the volume and surface area–of a cylinder with a radius of 2 1/2 cm and a height of 8 cm. Keys: (In RPN mode) Display: C value value Description: Starts executing C; prompts for R. (It displays whatever value happens to be in R.) Enters 2 1/2 as a fraction. Prompts for H. Message displayed. Volume in cm3. Surface area in cm2.
Stopping or Interrupting a Program Programming a Stop or Pause (STOP, PSE) Pressing (run/stop) during program entry inserts a STOP instruction. This will display the contents of the X-register and halt a running program until you resume it by pressing from the keyboard. You can use STOP rather than RTN in order to end a program without returning the program pointer to the top of memory. Pressing during program entry inserts a PSE (pause) instruction.
Editing a Program You can modify a program in program memory by inserting, deleting, and editing program lines. If a program line contains an equation, you can edit the equation. To delete a program line: 1. Select the relevant program or routine and press Ø or × to locate the program line that must be changed. Hold the cursor key down to continue scrolling. 2. Delete the line you want to change —press directly (Undo function is active). The pointer then moves to the preceding line.
3. Moving the cursor”_” and press repeatedly to delete the unwanted number or function, then retype the rest of the program line. (After pressing , Undo function is active) Notice: 1. When the cursor is active in the program line, Ø or × key will be disabled. 2. When you are editing a program line (cursor active), and the program line is will have no effect. If you want to erase the program line, press and the program line will be erased. 3.
Press to move the program pointer to . Press label nnn to move to a specific line. If Program–entry mode is not active (if no program lines are displayed), you can also move the program pointer by pressing label line number. Canceling Program–entry mode does not change the position of the program pointer. Memory Usage If during program entry you encounter the message , then there is not enough room in program memory for the line you just tried to enter.
where 67 is the number of bytes used by the program. Clearing One or More Programs To clear a specific program from memory 1. Press (2) and display (using Ø and × ) the label of the program. . 3. Press to cancel the catalog or to back out. 2. Press To clear all programs from memory: 1. Press 2. Press to display program lines (PRGM annunciator on). () to clear program memory. 3. The message prompts you for confirmation. Press Ö () . 4.
For example, to see the checksum for the current program (the "cylinder" program): Keys: (In RPN mode) () (hold) Display: Description: Displays label C, which takes 67 bytes. Checksum and length. If your checksum does not match this number, then you have not entered this program correctly.
This allows you to write programs that accept numbers in any of the four bases, do arithmetic in any base, and display results in any base. When writing programs that use numbers in a base other than 10, set the base mode both as the current setting for the calculator and in the program (as an instruction). Selecting a Base Mode in a Program Insert a BIN, OCT, or HEX instruction into the beginning of the program.
Polynomial Expressions and Horner's Method Some expressions, such as polynomials, use the same variable several times for their solution. For example, the expression Ax4 + Bx3 + Cx2 + Dx + E uses the variable x four different times. A program to calculate such an expression using RPN operations could repeatedly recall a stored copy of x from a variable. Example: Write a program using RPN operations for 5x4 + 2x3, then evaluate it for x = 7.
Keys: (In RPN mode) A X X Display: Description: 5 x4 X 5x4 () x3 2x3 5x4 + 2x3 Displays label A, which takes 46 bytes. Checksum and length. Cancels program entry. Now evaluate this polynomial for x = 7.
A more general form of this program for any equation Ax4 + Bx3 + Cx2 + Dx + E would be: Checksum and length: 9E5E 51 13-28 Simple Programming
14 Programming Techniques Chapter 13 covered the basics of programming. This chapter explores more sophisticated but useful techniques: Using subroutines to simplify programs by separating and labeling portions of the program that are dedicated to particular tasks. The use of subroutines also shortens a program that must perform a series of steps more than once. Using conditional instructions (comparisons and flags) to determine which instructions or subroutines should be used.
If you plan to have only one program in the calculator memory, you can separate the routine in various labels. If you plan to have more than one program in the calculator memory, it is better to have routines part of the main program label, starting at a specific line number. A subroutine can itself call other subroutines. The flow diagrams in this chapter use this notation: 1 1 Program execution branches from this line to the line number marked 1 ("from 1").
MAIN program (Top level) End of program Attempting to execute a subroutine nested more than 20 levels deep causes an error. Example: A Nested Subroutine. The following subroutine, labeled S, calculates the value of the expression a2 + b2 + c 2 + d 2 as part of a larger calculation in a larger program. The subroutine calls upon another subroutine (a nested subroutine), labeled Q, to do the repetitive squaring and addition.
In RPN mode, 2 4 6 1 3 5 A2. A2 + B2. A2 + B2 + C2 A2 + B2 + C2+ D2 A 2 + B 2 + C 2 + D2 246 Starts subroutine here. Enters A. Enters B. Enters C. Enters D. Recalls the data. Returns to main routine. 135 Nested subroutine Adds x2. Returns to subroutine S.
A Programmed GTO Instruction The GTO label instruction (press label line number) transfers the execution of a running program to the specified program line. The program continues running from the new location, and never automatically returns to its point of origination, so GTO is not used for subroutines. For example, consider the "Curve Fitting" program in chapter 16.
To : . To a specific line number: label line number (line number < 1000). For example, A. For example, press A . The display will show ” ” . If you want to go to the first line of a label, for example. A001: (press and hold), the display will show ” ”.
Comparison tests. These compare the X–and Y–registers, or the X–register and zero. Flag tests. These check the status of flags, which can be either set or clear. Loop counters. These are usually used to loop a specified number of times. Tests of Comparison (x?y, x?0) There are 12 comparisons available for programming. Pressing or displays a menu for one of the two categories of tests: x?y for tests comparing x and y. x?0 for tests comparing x and 0.
Keys: Display: In RPN mode ÕÕ(<) In ALG mode ÕÕ(<) Example: The "Normal and Inverse–Normal Distributions" program in chapter 16 uses the x
Flags A flag is an indicator of status. It is either set (true) or clear (false). Testing a flag is another conditional test that follows the "Do if true" rule: program execution proceeds directly if the tested flag is set, and skips one line if the flag is clear. Meanings of Flags The HP 35s has 12 flags, numbered 0 through 11. All flags can be set, cleared, and tested from the keyboard or by a program instruction. The default state of all 12 flags is clear.
Flag Status Clear (Default) Set Fraction–Control Flags 7 Fraction display off; display real numbers in the current display format. Fraction display on; display real numbers as fractions. 14-10 Programming Techniques 8 9 Fraction denominators not greater than the /c value. Reduce fractions to smallest form. Fraction denominators are factors of the /c Value. No reduction of fractions. (Used only if flag 8 is set.
Flag 10 controls program execution of equations: When flag 10 is clear (the default state), equations in running programs are evaluated and the result put on the stack. When flag 10 is set, equations in running programs are displayed as messages, causing them to behave like a VIEW statement: 1. Program execution halts. 2. The program pointer moves to the next program line. 3. The equation is displayed without affecting the stack. You can clear the display by pressing or .
Annunciators for Set Flags Flags 0, 1, 2, 3 and 4 have annunciators in the display that turn on when the corresponding flag is set. The presence or absence of 0, 1, 2, 3 or 4 lets you know at any time whether any of these five flags is set or not. However, there is no such indication for the status of flags 5 through 11. The states of these flags can be determined by executing the FS? instruction from the keyboard. (See "Using Flags" below.
It is good practice in a program to make sure that any conditions you will be testing start out in a known state. Current flag settings depend on how they have been left by earlier programs that have been run. You should not assume that any given flag is clear, for instance, and that it will be set only if something in the program sets it. You should make sure of this by clearing the flag before the condition arises that might set it. See the example below. Example: Using Flags.
If you replace lines S002 and S003 by SF0 and SF1, then flags 0 and 1 are set so lines S006 and S010 take the natural logarithms of the X- and Y-inputs.
Program Lines: (In RPN mode) Description: Begins the fraction program. Clears three fraction flags. Displays messages. Selects decimal base. Prompts for a number. Prompts for denominator (2 – 4095). Displays message, then shows the decimal number.
Use the above program to see the different forms of fraction display: Keys: (In RPN mode) F Display: value value () Description: Executes label F; prompts for a fractional number (V). Stores 2.53 in V; prompts for denominator (D). Stores 16 as the /c value. Displays message, then the decimal number.
This routine is an example of an infinite loop. It can be used to collect the initial data. After entering the three values, it is up to you to manually interrupt this loop by pressing label line number to execute other routines. Conditional Loops (GTO) When you want to perform an operation until a certain condition is met, but you don't know how many times the loop needs to repeat itself, you can create a loop with a conditional test and a GTO instruction.
Loops with Counters (DSE, ISG) (decrement; skip if less than or equal When you want to execute a loop a specific number of times, use the (increment; skip if greater than) or to) conditional function keys. Each time a loop function is executed in a program, it automatically decrements or increments a counter value stored in a variable. It compares the current counter value to a final counter value, then continues or exits the loop depending on the result.
ii is the interval for incrementing and decrementing (must be two digits or unspecified). This value does not change. An unspecified value for ii is assumed to be 01 (increment/decrement by 1). Given the loop–control number ccccccc.fffii, DSE decrements ccccccc to ccccccc — ii, compares the new ccccccc with fff, and makes program execution skip the next program line if this ccccccc ≤ fff. Given the loop–control number ccccccc.
Press L, then press Z to see that the loop–control number is now 11.0100. Indirectly Addressing Variables and Labels Indirect addressing is a technique used in advanced programming to specify a variable or label without specifying beforehand exactly which one. This is determined when the program runs, so it depends on the intermediate results (or input) of the program. Indirect addressing uses four different keys: 0, 7, 1 , and A.
STO I RCL I STO +,–, × ,÷ I RCL +,–, × ,÷ I INPUT I VIEW I ∫ FN d I SOLVE I DSE I ISG I x<>I The Indirect Address, (I) and (J) Many functions that use A through Z (as variables or labels) can use (I) or (J) to refer to A through Z (variables or labels) or statistics registers indirectly. The function (I) or (J) uses the value in variable I to J to determine which variable, label, or register to address. The following table shows how.
If I/J contains: Then (I)/(J) will address: -1 . . . -26 -27 variable A or label A . . . variable Z or label Z n register -28 -29 -30 Σx register Σy register Σx2 register -31 -32 0 . . . 800 I<-32 or I>800 or variables undefined J<-32 or I>800 or variables undefined Σy2 register Σxy register Unnamed Indirect variables start . . .
STO(I)/(J) RCL(I)/(J) STO +, –,× ,÷, (I)/(J) RCL +, –,× ,÷, (I)/(J) X<>(I)/(J) FN=(I)/(J) INPUT(I)/(J) VIEW(I)/(J) DSE(I)/(J) ISG(I)/(J) SOLVE(I)/(J) ∫ FN d(I)/(J) You can not solve or integrate for unnamed variables or statistic registers. Program Control with (I)/(J) Since the contents of I can change each time a program runs — or even in different parts of the same program — a program instruction such as STO (I) or (J) can store value to a different variable at different times.
Program Lines: (In RPN mode) Description: Defined the storage address range “0-100” and saved “12345” into address 100. Saves “67890” into address 150. The defined indirect storage range is now “0-150”. Stores 0 into indirect register 100. The defined range is still “0-150”.
15 Solving and Integrating Programs Solving a Program In chapter 7 you saw how you can enter an equation — it's added to the equation list — and then solve it for any variable. You can also enter a program that calculates a function, and then solve it for any variable. This is especially useful if the equation you're solving changes for certain conditions or if it requires repeated calculations. To solve a programmed function: 1. Enter a program that defines the function.
1. Begin the program with a label. This label identifies the function that you want SOLVE to evaluate (label). 2. Include an INPUT instruction for each variable, including the unknown. INPUT instructions enable you to solve for any variable in a multi–variable function. INPUT for the unknown is ignored by the calculator, so you need to write only one program that contains a separate INPUT instruction for every variable (including the unknown).
To begin, put the calculator in Program mode; if necessary, position the program pointer to the top of program memory. Keys: (In ALG mode) Display: Description: Sets Program mode. Type in the program: Program Lines: (In ALG mode) Description: Identifies the programmed function.
Stores .005 in N; prompts for R. value value Stores .0821 in R; prompts for T. Calculates T. Stores 297.1 in T; solves for P. Pressure is 0.0610 atm. Example: Program Using Equation. Write a program that uses an equation to solve the "Ideal Gas Law." Keys: (In RPN mode) H (1) P V N R T Display: Description: Selects Program–entry mode.
Keys: (In RPN mode) L H P L Display: Description: Stores previous pressure. Selects program “H.” Selects variable P; prompts for V. Retains 2 in V; prompts for N. Retains .005 in N; prompts for R. Retains .0821 in R; prompts for T. Calculates new T. Stores 287.1 in T; solves for new P. Calculates pressure change of the gas when temperature drops from 297.1 K to 287.
Using SOLVE in a Program You can use the SOLVE operation as part of a program. If appropriate, include or prompt for initial guesses (into the unknown variable and into the X–register) before executing the SOLVE variable instruction.
Program Lines: (In RPN mode) Checksum and length: 62A0 11 Checksum and length: 221E 11 Checksum and length: D45B 18 Description: Setup for X. Index for X. Branches to main routine. Setup for Y. Index for Y. Branches to main routine. Main routine. Stores index in I Defines program to solve. Solves for appropriate variable. Displays solution.
2. Select the program that defines the function to integrate: press label. (You can skip this step if you're reintegrating the same program.) 3. Enter the limits of integration: key in the lower limit and press , then key in the upper limit. 4. Select the variable of integration and start the calculation: press variable. Notice that FN= is required if you're integrating a programmed function, but not if you're integrating an equation from the equation list.
A function programmed as an equation is usually included as an expression specifying the integrand — though it can be any type of equation. If you want the equation to prompt for variable values instead of including INPUT instructions, make sure flag 11 is set. 4. End the program with a RTN. Program execution should end with the value of the function in the X–register. Example: Program Using Equation.
Using Integration in a Program Integration can be executed from a program. Remember to include or prompt for the limits of integration before executing the integration, and remember that accuracy and execution time are controlled by the display format at the time the program runs.
Recalls lower limit of integration. Recalls upper limit of integration. (X = D.) Specifies the function. ∫ Integrates the normal function using the dummy variable D. Restrictions on Solving and Integrating The SOLVE variable and ∫ FN d variable instructions cannot call a routine that contains another SOLVE or ∫ FN instruction. That is, neither of these instructions can be used recursively.
15-12 Solving and Integrating Programs
16 Statistics Programs Curve Fitting This program can be used to fit one of four models of equations to your data. These models are the straight line, the logarithmic curve, the exponential curve and the power curve. The program accepts two or more (x, y) data pairs and then calculates the correlation coefficient, r, and the two regression coefficients, m and b. The program includes a routine to calculate the estimates x̂ and ŷ . (For definitions of these values, see "Linear Regression" in chapter 12.
Exponential Cur ve Fit E Straight Line Fit S y y y = Be Mx y = B + Mx x Logarithmic Curve Fit L y x Power Curve Fit P y y = Bx M y = B + MIn x x x To fit logarithmic curves, values of x must be positive. To fit exponential curves, values of y must be positive. To fit power curves, both x and y must be positive. A error will occur if a negative number is entered for these cases.
Program Listing: Program Lines: (In RPN mode) Description This routine sets, the status for the straight–line model. Clears flag 0, the indicator for ln X. Clears flag 1, the indicator for In Y. Branches to common entry point Z. Checksum and length: 8E85 12 This routine sets the status for the logarithmic model. Sets flag 0, the indicator for ln X.
Program Lines: (In RPN mode) Description If flag 0 is set . . . . . . takes the natural log of the X–input. Stores that value for the correction routine. Prompts for and stores Y. If flag 1 is set . . . . . . takes the natural log of the Y–input. Accumulates B and R as x,y–data pair in statistics registers. Loops for another X, Y pair.
Program Lines: (In RPN mode) Description Displays, prompts for, and, if changed, stores x–value in X. If flag 0 is set . . . Branches to K001 Branches to M001 Stores ŷ –value in Y. Displays, prompts for, and, if changed, stores y–value in Y. If flag 0 is set . . . Branches to O001 Branches to N001 Stores x̂ in X for next loop. Loops for another estimate.
Program Lines: (In RPN mode) Description Checksum and length: 889C 18 This subroutine calculates x̂ for the logarithmic model. This subroutine calculates ŷ for the exponential model. Calculates ŷ = BeMX. Calculates x̂ = e(Y – B) ÷ M Returns to the calling routine.
Program Lines: (In RPN mode) Description Calculates x̂ = (Y/B ) 1/M Goes to O005 Checksum and length: 8524 21 Determines if D001 or B001 should be run If flag 1 is set . . . Executes D001 Executes B001 Goes to Y006 Checksum and length: 4BFA 15 Determines if C001 or A001 should be run If flag 1 is set . . .
Flags Used: Flag 0 is set if a natural log is required of the X input. Flag 1 is set if a natural log is required of the Y input. If flag 1 is set in routine N, then I001 is executed. If flag 1 is clear, G001 is executed. Program instructions: 1. Key in the program routines; press 2. Press when done. and select the type of curve you wish to fit by pressing: S for a straight line; L for a logarithmic curve; E for an exponential curve; or P for a power curve. 3. Key in x–value and press . 4.
13. For a new case, go to step 2. Variables Used: B M R X Regression coefficient (y–intercept of a straight line); also used for scratch. Regression coefficient (slope of a straight line). Correlation coefficient; also used for scratch. The x–value of a data pair when entering data; the Y hypothetical x when projecting ŷ ; or x̂ (x–estimate) when given a hypothetical y.
Enters y–value of data pair. Enters x–value of data pair. Enters y–value of data pair. Now intentionally enter 379 instead of 37.9 so that you can see how to correct incorrect entries.
Calculates regression coefficient B. Calculates regression coefficient M. Prompts for hypothetical x–value. Stores 37 in X and calculates ŷ . Stores 101 in Y and calculates x̂ . Example 2: Repeat example 1 (using the same data) for logarithmic, exponential, and power curve fits.
y "U pper tail" area Q [x] x x Q (x ) = 0.5 − 1 σ 2π ∫ x x 2 e −(( x − x )÷σ ) ÷2dx This program uses the built–in integration feature of the HP 35s to integrate the equation of the normal frequency curve. The inverse is obtained using Newton's method to iteratively search for a value of x which yields the given probability Q(x).
Program Listing: Program Lines: (In RPN mode) Description This routine initializes the normal distribution program. Stores default value for mean. Prompts for and stores mean, M. Stores default value for standard deviation. Prompts for and stores standard deviation, S. Stops displaying value of standard deviation. Checksum and length: 70BF 26 This routine calculates Q(X) given X.
Program Lines: (In RPN mode) Description Adds the correction to yield a new Xguess. Tests to see if the correction is significant. Goes back to start of loop if correction is significant. Continues if correction is not significant. Displays the calculated value of X. Loops to calculate another X.
Program Lines: (In RPN mode) Description Returns to the calling routine. Checksum and length: B3EB 31 Flags Used: None. Remarks: The accuracy of this program is dependent on the display setting. For inputs in the area between ±3 standard deviations, a display of four or more significant figures is adequate for most applications. At full precision, the input limit becomes ±5 standard deviations.
4. After the prompt for S, key in the population standard deviation and press . (If the standard deviation is 1, just press .) 5. To calculate X given Q(X), skip to step 9 of these instructions. 6. To calculate Q(X) given X, 7. D. After the prompt, key in the value of X and press . The result, Q(X), is displayed. 8. To calculate Q(X) for a new X with the same mean and standard deviation, press and go to step 7. 9. To calculate X given Q(X), press I. 10.
D value Accepts the default value of zero for M. Accepts the default value of 1 for S. Starts the distribution program and prompts for X. Enters 3 for X and starts computation of Q(X). Displays the ratio of the population smarter than everyone within three standard deviations of the mean. Multiplies by the population. Displays the approximate number of blind dates in the local population that meet the criteria.
Keys: (In RPN mode) S D Display: value Description: Starts the initialization routine. Stores 55 for the mean. Stores 15.3 for the standard deviation. Starts the distribution program and prompts for X. Enters 90 for X and calculates Q(X). Thus, we would expect that only about 1 percent of the students would do better than score 90.
This program allows you to input data, correct entries, and calculate the standard deviation and weighted mean of the grouped data. Program Listing: Program Lines: (In ALG mode) Description Start grouped standard deviation program. Clears statistics registers (-27 through -32). Clears the count N. Checksum and length: E5BC 13 Input statistical data points. Stores data point in X. Stores data–point frequency in F.
Program Lines: (In ALG mode) Description Updates ∑ xi 2fi in register -30. Increments (or decrements) N. Displays current number of data pairs. Goes to label line numberI for next data input. Checksum and length: F6CB 84 Calculates statistics for grouped data. Grouped standard deviation. Displays grouped standard deviation. Weighted mean.
Flags Used: None. Program Instructions: 1. Key in the program routines; press when done. S to start entering new data. 3. Key in xi –value (data point) and press . 2. Press 4. Key in fi –value (frequency) and press . 5. Press after VIEWing the number of points entered. 6. Repeat steps 3 through 5 for each data point. If you discover that you have made a data-entry error (xi or fi) after you have pressed in step 4, press U and then press again.
Group xi fi Keys: (In ALG mode) S 1 5 17 2 8 26 Display: value value 3 13 37 4 15 43 5 22 73 6 37 115 Description: Prompts for the first xi. Stores 5 in X; prompts for first fi. Stores 17 in F; displays the counter. Prompts for the second xi. Prompts for second fi. Displays the counter. Prompts for the third xi. Prompts for the third fi. Displays the counter.
G Displays the counter. Prompts for the fifth xi. Prompts for the fifth fi. Displays the counter. Prompts for the sixth xi. Prompts for the sixth fi. Displays the counter. Calculates and displays the grouped standard deviation (sx) of the six data points. Calculates and displays weighted mean ( x ). Clears VIEW.
16-24 Statistics Programs
17 Miscellaneous Programs and Equations Time Value of Money Given any four of the five values in the "Time–Value–of–Money equation" (TVM), you can solve for the fifth value. This equation is useful in a wide variety of financial applications such as consumer and home loans and savings accounts.
Equation Entry: Key in this equation: Keys: (In RPN mode) P 4 4 I Õ NÕ I F 4 I Õ N B (hold) Display: or current equation _ Description: Selects Equation mode. Starts entering equation.
The order in which you're prompted for values depends upon the variable you're solving for. SOLVE instructions: 1. If your first TVM calculation is to solve for interest rate, I, press I. 2. Press . If necessary, press × or Ø to scroll through the equation list until you come to the TVM equation. 3. Do one of the following five operations: a. Press b. Press N to calculate the number of compounding periods. I to calculate periodic interest.
Variables Used: N I The number of compounding periods. The periodic interest rate as a percentage. (For example, if the annual interest rate is 15% and there are 12 payments per year, the periodic interest rate, i, is 15÷12=1.25%.) The initial balance of loan or savings account. The periodic payment. The future value of a savings account or balance of a loan. B P F Example: Part 1. You are financing the purchase of a car with a 3–year (36–month) loan at 10.5% annual interest compounded monthly.
value Stores 0 in F; prompts for B. Calculates B, the beginning loan balance. Stores 5750 in B; calculates monthly payment, P. The answer is negative since the loan has been viewed from the borrower's perspective. Money received by the borrower (the beginning balance) is positive, while money paid out is negative.
Part 2. What interest rate would reduce the monthly payment by $10? Keys: (In RPN mode) Display: Description: I Displays the leftmost hart of the TVM equation. Selects I; prompts for P. Rounds the payment to two decimal places. Calculates new payment. Stores –176.89 in P; prompts for N. Retains 36 in N; prompts for F. Retains 0 in F; prompts for B.
Retains 0.56 in I; prompts for N. Stores 24 in N; prompts for B. Retains 5750 in B; calculates F, the future balance. Again, the sign is negative, indicating that you must, pay out this money. Sets FIX 4 display format. 8 () Prime Number Generator This program accepts any positive integer greater than 3. If the number is a prime number (not evenly divisible by integers other than itself and 1), then the program returns the input value.
LBL Y VIEW Prime Note: x is the value in the X-register.
Program Listing: Program Lines: (In ALG mode) Description This routine displays prime number P. Checksum and length: 2CC5 6 This routine adds 2 to P. Checksum and length: EFB2 9 Checksum and length: > This routine stores the input value for P.
Flags Used: None. Program Instructions: 1. Key in the program routines; press when done. 2. Key in a positive integer greater than 3. P to run program. Prime number, P will be displayed. 4. To see the next prime number, press . 3. Press Variables Used: P D Prime value and potential prime values. Divisor used to test the current value of P. Remarks: No test is made to ensure that the input is greater than 3.
Cross Product in Vectors Here is an example showing how to use the program function to calculate the cross product. Cross product: v 1 × v 2 = (YW – ZV )i + (ZU – XW)j + (XV – YU)k where v1 = X i + Y j + Z k and v 2=U i + V j + W k Program Lines: (In RPN mode) Description Defines the beginning of the rectangular input/display routine. Displays or accepts input of X. Displays or accepts input of Y. Displays or accepts input of Z.
Program Lines: (In RPN mode) Description Defines the beginning of the cross–product routine. Calculates (YW – ZV), which is the X component. Calculates (ZU – WX), which is the Y component. Stores (XV – YU), which is the Z component. Stores X component.
Keys: Display: Description: R Run R routine to input vector value Input v2 of x-component z Input v2 of y-component Input v2 of z-component Run E routine to exchange v2 in U, V, and W variables Input v1 of x-component E Input v1 of y-component C Input v1 of z-component Run C routine to calculate x component of cross product Calculate y-component of cross product Calculate
17-14 Miscellaneous Programs and Equations
Part 3 Appendixes and Reference
A Support, Batteries, and Service Calculator Support You can obtain answers to questions about using your calculator from our Calculator Support Department. Our experience shows that many customers have similar questions about our products, so we have provided the following section, "Answers to Common Questions." If you don't find an answer to your question, contact the Calculator Support Department listed on page A–8.
A: Exponent of ten; that is, 2.51 × 10–13. Q: The calculator has displayed the message . What should I do? A: You must clear a portion of memory before proceeding. (See appendix B.) Q: Why does calculating the sine (or tangent) of π radians display a very small number instead of 0? A: π cannot be represented exactly with the 12–digit precision of the calculator.
Changing the Batteries The calculator is powered by two 3-volt lithium coin batteries, CR2032. Replace the batteries as soon as possible when the low battery annunciator ( ) appears. If the battery annunciator is on, and the display dims, you may lose data. If data is lost, the message is displayed. Once you've removed the batteries, replace them within 2 minutes to avoid losing stored information. (Have the new batteries readily at hand before you open the battery compartment.
Warning Do not mutilate, puncture, or dispose of batteries in fire. The batteries can burst or explode, releasing hazardous chemicals. 5. Insert a new CR2032 lithium battery, making sure that the positive sign (+) is facing outward. 6. Remove and insert the other battery as in steps 4 through 5. Make sure that the positive sign (+) on each battery is facing outward. 7. Replace the battery compartment cover. 8. Press .
3. Remove the batteries (see "Changing the Batteries") and lightly press a coin against both battery contacts in the calculator. Replace the batteries and turn on the calculator. It should display . 4. If the calculator still does not respond to keystrokes, use a thin, pointed object to press the RESET hole. Stored data usually remain intact. Reset Hole If these steps fail to restore calculator operation, it requires service.
→→→9→×→Ö→Õ→→→ →6→Ø→→→→→→→ →→→4→→→ → →→→→ → → → →→→→→→ → → → → If you press the keys in the proper order and they are functioning properly, the calculator displays followed by two–digit numbers. (The calculator is counting the keys using hexadecimal base.) If you press a key out of order, or if a key isn't functioning properly, the next keystroke displays a fail message (see step 4). 4.
Warranty HP 35s Scientific Calculator; Warranty period: 12 months 1. HP warrants to you, the end-user customer, that HP hardware, accessories and supplies will be free from defects in materials and workmanship after the date of purchase, for the period specified above. If HP receives notice of such defects during the warranty period, HP will, at its option, either repair or replace products which prove to be defective. Replacement products may be either new or like-new. 2.
6. HP MAKES NO OTHER EXPRESS WARRANTY OR CONDITION WHETHER WRITTEN OR ORAL. TO THE EXTENT ALLOWED BY LOCAL LAW, ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY, SATISFACTORY QUALITY, OR FITNESS FOR A PARTICULAR PURPOSE IS LIMITED TO THE DURATION OF THE EXPRESS WARRANTY SET FORTH ABOVE. Some countries, states or provinces do not allow limitations on the duration of an implied warranty, so the above limitation or exclusion might not apply to you.
EMEA China 010-68002397 Hong Kong 2805-2563 Indonesia +65 6100 6682 Japan +852 2805-2563 Malaysia +65 6100 6682 New Zealand 09-574-2700 Philippines +65 6100 6682 Singapore 6100 6682 South Korea 2-561-2700 Taiwan +852 2805-2563 Thailand Vietnam +65 6100 6682 +65 6100 6682 Country : Telephone numbers Austria 01 360 277 1203 Belgium 02 620 00 86 Belgium 02 620 00 85 Czech Republic 296 335 612 Denmark 82 33 28 44 Finland 09 8171 0281 France 01 4993 9006 Germany 069 9530 7
Switzerland (German) LA A-10 01 439 5358 Switzerland (Italian) 022 567 5308 United Kingdom 0207 458 0161 Country : Telephone numbers Anguila 1-800-711-2884 Antigua 1-800-711-2884 Argentina 0-800- 555-5000 Aruba 800-8000 ♦ 800-711-2884 Bahamas 1-800-711-2884 Barbados 1-800-711-2884 Bermuda 1-800-711-2884 Bolivia 800-100-193 Brazil 0-800-709-7751 British Virgin Islands 1-800-711-2884 Cayman Island 1-800-711-2884 Curacao 001-800-872-2881 + 800-711-2884 Chile 800-360-999 Colo
NA Haiti 183 ♦ 800-711-2884 Honduras 800-0-123 ♦ 800-711-2884 Jamaica 1-800-711-2884 Martinica 0-800-990-011 ♦ 877-219-8671 Mexico 01-800-474-68368 (800 HP INVENT) Montserrat 1-800-711-2884 Netherland Antilles 001-800-872-2881 ♦ 800-711-2884 Nicaragua 1-800-0164 ♦ 800-711-2884 Panama 001-800-711-2884 Paraguay (009) 800-541-0006 Peru 0-800-10111 Puerto Rico 1-877 232 0589 St. Lucia 1-800-478-4602 St Vincent 01-800-711-2884 St. Kitts & Nevis 1-800-711-2884 St.
Regulatory information Federal Communications Commission Notice This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.
Houston, TX 77269-2000 or call HP at 281-514-3333 To identify your product, refer to the part, series, or model number located on the product. Canadian Notice This Class B digital apparatus meets all requirements of the Canadian InterferenceCausing Equipment Regulations. Avis Canadien Cet appareil numérique de la classe B respecte toutes les exigences du Règlement sur le matériel brouilleur du Canada.
Japanese Notice こ の装置は、 情報処理装置等電波障害自主規制協議会 (VCCI) の基準に基づ く ク ラ ス B 情報技術装置です。 こ の装置は、 家庭環境で使用する こ と を目的 と し てい ますが、 こ の装置がラ ジオやテ レ ビ ジ ョ ン受信機に近接 し て使用 さ れる と 、 受信 障害を引き起 こ す こ と があ り ます。 取扱説明書に従っ て正 し い取 り 扱い を し て く だ さ い。 Disposal of Waste Equipment by Users in Private Household in the European Union This symbol on the product or on its packaging indicates that this product must not be disposed of with your other household waste.
B User Memory and the Stack This appendix covers The allocation and requirements of user memory, How to reset the calculator without affecting memory, How to clear (purge) all of user memory and reset the system defaults, and Which operations affect stack lift. Managing Calculator Memory The HP 35s has 30KB of user memory available to you for any combination of stored data (variables, equations, or program lines). SOLVE, ∫ FN, and statistical calculations also require user memory.
To see the memory requirements of specific equations in the equation list: 1. Press to activate Equation mode. ( or the left end of the current equation will be displayed.) 2. If necessary, scroll through the equation list (press × or Ø ) until you see the desired equation. 3. Press to see the checksum (hexadecimal) and length (in bytes) of the equation. For example, . To see the total memory requirements of specific programs: 1.
Clearing Memory The usual way to clear user memory is to press (). However, there is also a more powerful clearing procedure that resets additional information and is useful if the keyboard is not functioning properly. If the calculator fails to respond to keystrokes, and you are unable to restore operation by resetting it or changing the batteries, try the following MEMORY CLEAR procedure.
Category CLEAR ALL MEMORY CLEAR (Default) Angular mode Base mode Contrast setting Decimal point Thousand separator Denominator (/c value) Display format Flags Complex mode Fraction–display mode Random–number seed Equation pointer Equation list FN = label Program pointer Program memory Stack lift Stack registers Variables Indirect Variables Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged Unchanged EQN LIST TOP Cleared Null PRGM TOP Cleared Enabled Clear
Disabling Operations The five operations , /, -, () and () disable stack lift. A number keyed in after one of these disabling operations writes over the number currently in the X–register. The Y–, Z– and T– registers remain unchanged. In addition, when and act like CLx, they also disable stack lift. The INPUT function disables stack lift as it halts a program for prompting (so any number then entered writes over the X-register), but it enables stack lift when the program resumes.
The Status of the LAST X Register The following operations save x in the LAST X register in RPN mode: +, –, × , ÷ ex, 10x x , x2, LN, LOG yx, SIN, COS, TAN ASIN, ACOS, ATAN ̂ ̂ SINH, COSH, TANH ASINH, ACOSH, ATANH %, %CHG Σ+, Σ– HMS , ! IP, FP, SGN, INTG, RND, ABS RCL+, –, ×, ÷ DEG, RAD ARG CMPLX SIN, COS, TAN cm, in nCr nPr CMPLX +, –, × ,÷ kg, lb l, gal X I/x, INT÷, Rmdr y HMS CMPLX ex, LN, yx, 1/x °C, KM °F MILE Notice that /c does not affect the LAST X register.
Accessing Stack Register Contents The values held in the four stack registers, X, Y, Z and T, are accessible in RPN mode in an equation or program using the REGX, REGY, REGZ and REGT commands. d first. Then, pressing < produces a menu in the display showing the X–, Y–, Z–, T–registers. Pressing Õ or Ö will move the underline symbol, indicating which register is presently selected.
B-8 User Memory and the Stack
C ALG: Summary About ALG This appendix summarizes some features unique to ALG mode, including, Two argument arithmetic Exponential and Logarithmic functions ( ,, ,) Trigonometric functions Parts of numbers Reviewing the stack Operations with complex numbers Integrating an equation Arithmetic in bases 2, 8, and 16 Entering statistical two–variable data 9() to set the calculator to ALG mode. When the calculator is Press in ALG mode, the ALG annunciator is on.
5. Unary Minus +/6. ×, ÷ 7. +, – 8. = Doing Two argument Arithmetic in ALG This discussion of arithmetic using ALG replaces the following parts that are affected by ALG mode. Two argument arithmetic operations are affected by ALG mode: Simple arithmetic Power functions ( , ) Percentage calculations (or ) Permutations and Combinations ( x, {) Quotient and Remainder of Division ((÷) , ()) Simple Arithmetic Here are some examples of simple arithmetic.
Power Functions In ALG mode, to calculate a number y raised to a power x, key in y press x, then . To Calculate: Press: Display: 123 641/3 (cube root) Õ64 Percentage Calculations The Percent Function. The key divides a number by 100.
Permutations and Combinations Example: Combinations of People. A company employing 14 women and 10 men is forming a six–person safety committee. How many different combinations of people are possible? Keys: xÕ Display: Description: Total number of combinations possible. Quotient and Remainder Of Division You can use (÷) and () to produce either the quotient or remainder of division operations involving two integers. (÷)Integer 1 Õ Integer 2.
If you were to key in , the calculator would calculate the result, -107.6471. However, that’s not what you want. To delay the division until you’ve subtracted 12 from 85, use parentheses: Keys: Display: Description: 4 No calculation is done. Õ _ Calculates 85 − 12. _ Calculates 30/73. Calculates 30/(85 − 12) × 9. You can omit the multiplication sign (×) before a left parenthesis.
Trigonometric Functions Assume the unit of the angle is 9() Press: Display: Sine of x. To Calculate: Cosine of x. Tangent of x. Arc sine of x. Arc cosine of x. Arc tangent of x. Hyperbolic functions To Calculate: Hyperbolic sine of x (SINH). Hyperbolic cosine of x (COSH). Hyperbolic tangent of x (TANH). Hyperbolic arc sine of x (ASINH).
Parts of numbers To calculate: The integer part of 2.47 The fractional part of 2.47 The absolute value of –7 Press: Display: () () The sign value of 9 () The greatest integer equal to () or less than –5.3 Reviewing the Stack The or key produces a menu in the display— X–, Y–, Z–, T–registers, to let you review the entire contents of the stack.
The value of X-, Y-, Z-, T-register in ALG mode is the same in RPN mode. After normal calculation, solving, programming, or integrating, the value of the four registers will be the same as in RPN or ALG mode and retained when you switch between ALG and RPN logic modes. Integrating an Equation 1. Key in an equation. (see "Entering Equations into the Equation List" in chapter 6) and leave Equation mode. 2. Enter the limits of integration: key in the lower limit and press , then key in the upper limit.
To do an operation with one complex number: 1. Select the function. 2. Enter the complex number z. 3. Press to calculate. 4. The calculated result will be displayed in Line 2 and the displayed form will be the one that you have set in 9. To do an arithmetic operation with two complex numbers: 1. Enter the first complex number, z1. 2. Select the arithmetic operation. 3. Enter the second complex number, z2. 4. Press to calculate. 5.
Keys: Display: Description: 8Ë Sets display form ( ) 4 6 Õ4 66 Result is 2.5000 + 9.0000 i Examples: Evaluate (4 - 2/5 i) × (3 - 2/3 i) Keys: 4 6Õ4 6 Display: Description: Result is 11.7333 i–3.
F () E9A () Result. 77608 – 43268=? () () () Sets base 8: OCT annunciator on. Converts displayed number to octal. 1008 ÷ 58=? () () Integer part of result. 5A016 + 100110002 =? () A0 () () () Set base 16; HEX annunciator on. Result in hexadecimal base.
4. The display shows n the number of statistical data pairs you have accumulated. 5. Continue entering x, y–pairs. n is updated with each entry. If you wish to delete the incorrect values that were just entered, press z 4. After deleting the incorrect statistical data, the calculator will display the last statistical data entered in line 1 (top line of the display) and value of n in line 2. If there are no statistical data, the calculator will display n=0 in line 2.
Linear Regression Linear regression, or L.R. (also called linear estimation), is a statistical method for finding a straight line that best fits a set of x,y–data. To find an estimated value for x (or y), key in a given hypothetical value for y (or x) ,press , then press ( ̂ ) (or Õ ( ̂ )). To find the values that define the line that best fits your data, press followed by (), (), or ().
C-14 ALG: Summary
D More about Solving This appendix provides information about the SOLVE operation beyond that given in chapter 7. How SOLVE Finds a Root SOLVE first attempts to solve the equation directly for the unknown variable. If the attempt fails, SOLVE changes to an iterative(repetitive) procedure. The iterative operation is to execute repetitively the specified equation. The value returned by the equation is a function f(x) of the unknown variable x.
If f(x) has one or more local minima or minima, each occurs singly between adjacent roots of f(x) (figure d, below). f (x) f (x) x x b a f (x) f (x) x x d c Function Whose Roots Can Be Found In most situations, the calculated root is an accurate estimate of the theoretical, infinitely precise root of the equation. An "ideal" solution is one for which f(x) = 0.
Interpreting Results The SOLVE operation will produce a solution under either of the following conditions: If it finds an estimate for which f(x) equals zero. (See figure a, below.) If it finds an estimate where f(x) is not equal to zero, but the calculated root is a 12–digit number adjacent to the place where the function's graph crosses the x–axis (see figure b, below).
Keys: X X X Display: Description: Select Equation mode. Enters the equation. Checksum and length. Cancels Equation mode. Now, solve the equation to find the root: Keys: Display: Description: X _ Initial guesses for the root. X Selects Equation mode; displays the left end of the equation. Solves for X; displays the result. Example: An Equation with Two Roots.
Keys: X X Display: Description: Selects Equation mode. Enters the equation. Checksum and length. Cancels Equation mode. Now, solve the equation to find its positive and negative roots: Keys: Display: Description: X _ Your initial guesses for the positive root. Selects Equation mode; displays the equation. X Calculates the positive root using guesses 0 and 10. f(x) = 0.
Values of f(x) may be approaching infinity at the location where the graph changes sign (see figure b, below). This situation is called a pole. Since the SOLVE operation determines that there is a sign change between two neighboring values of x, it returns the possible root. However, the value for f(x) will be relatively large. If the pole occurs at a value of x that is exactly represented with 12 digits, then that value would cause the calculation to halt with an error message.
Now, solve to find the root: Keys: Display: Description: X _ Your initial guesses for the root. X Selects Equation mode; displays the equation. Finds a root with guesses 0 and 5. Shows root, to 11 decimal places. The previous estimate is slightly bigger. f(x) is relatively large. Note the difference between the last two estimates, as well as the relatively large value for f(x).
Checksum and length. Cancels Equation mode. Now, solve to find the root. Keys: Display: Description: Your initial guesses for the root. X _ X Selects Equation mode; displays the equation. No root found for f(x). When SOLVE Cannot Find a Root Sometimes SOLVE fails to find a root. The following conditions cause the message : The search terminates near a local minimum or maximum (see figure a, below).
f (x) f (x) x x b a f (x) x c Case Where No Root Is Found Example: A Relative Minimum. Calculate the root of this parabolic equation: x2 – 6x + 13 = 0. It has a minimum at x = 3. Enter the equation as an expression: Keys: X X Display: Description: Selects Equation mode. Enters the equation.
Checksum and length. Cancels Equation mode. Now, solve to find the root: Keys: Display: Description: Your initial guesses for the root. X _ X Selects Equation mode; displays the equation. Search fails with guesses 0 and 10 Example: An Asymptote. Find the root of the equation 10 − 1 =0 X Enter the equation as an expression. Keys: X X Display: Selects Equation mode. Enters the equation.
Watch what happens when you use negative values for guesses: Keys: Display: Description: X Your negative guesses for the root. X Selects Equation mode; displays the equation. Solves for X; displays the result. Example: Find the root of the equation. [x ÷ (x + 0.3)] − 0.5 = 0 Enter the equation as an expression: Keys: X4 X ÕÕ Display: Description: Selects Equation mode. Enters the equation.
Now attempt to find a negative root by entering guesses 0 and –10. Notice that the function is undefined for values of x between 0 and –0.3 since those values produce a positive denominator but a negative numerator, causing a negative square root. Keys: Display: Description: Selects Equation mode; displays the left end of the equation. No root found for f(x). X _ X Example: A Local "Flat" Region.
Solve for X using initial guesses of 10–8 and –10–8. Keys: (In RPN mode) X J X Display: Description: Enters guesses. _ Selects program "J" as the function. Solves for X; displays the result. Round–Off Error The limited (12–digit) precision of the calculator can cause errors due to rounding off, which adversely affect the iterative solutions of SOLVE and integration.
D-14 More about Solving
E More about Integration This appendix provides information about integration beyond that given in chapter 8. How the Integral Is Evaluated The algorithm used by the integration operation, ∫ , calculates the integral of a function f(x) by computing a weighted average of the function's values at many values of x (known as sample points) within the interval of integration.
As explained in chapter 8, the uncertainty of the final approximation is a number derived from the display format, which specifies the uncertainty for the function. At the end of each iteration, the algorithm compares the approximation calculated during that iteration with the approximations calculated during two previous iterations.
f (x) x With this number of sample points, the algorithm will calculate the same approximation for the integral of any of the functions shown. The actual integrals of the functions shown with solid blue and black lines are about the same, so the approximation will be fairly accurate if f(x) is one of these functions.
Try it and see what happens. Enter the function f(x) = xe–x. Keys: Display: X X Description: Select equation mode. Enter the equation. End of the equation. Checksum and length. Cancels Equation mode. Set the display format to SCI 3, specify the lower and upper limits of integration as zero and 10499, than start the integration.
f (x) x The graph is a spike very close to the origin. Because no sample point happened to discover the spike, the algorithm assumed that f(x) was identically equal to zero throughout the interval of integration. Even if you increased the number of sample points by calculating the integral in SCI 11 or ALL format, none of the additional sample points would discover the spike when this particular function is integrated over this particular interval.
Note that the rapidity of variation in the function (or its low–order derivatives) must be determined with respect to the width of the interval of integration. With a given number of sample points, a function f(x) that has three fluctuations can be better characterized by its samples when these variations are spread out over most of the interval of integration than if they are confined to only a small fraction of the interval. (These two situations are shown in the following two illustrations.
In many cases you will be familiar enough with the function you want to integrate that you will know whether the function has any quick wiggles relative to the interval of integration. If you're not familiar with the function, and you suspect that it may cause problems, you can quickly plot a few points by evaluating the function using the equation or program you wrote for that purpose.
X ∫ Integral. (The calculation takes a minute or two.) Uncertainty of approximation. This is the correct answer, but it took a very long time. To understand why, compare the graph of the function between x = 0 and x = 103, which looks about the same as that shown in the previous example, with the graph of the function between x = 0 and x = 10: f (x) x 0 10 You can see that this function is "interesting" only at small values of x.
Because the calculation time depends on how soon a certain density of sample points is achieved in the region where the function is interesting, the calculation of the integral of any function will be prolonged if the interval of integration includes mostly regions where the function is not interesting. Fortunately, if you must calculate such an integral, you can modify the problem so that the calculation time is considerably reduced.
E-10 More about Integration
F Messages The calculator responds to certain conditions or keystrokes by displaying a symbol comes on to call your attention to the message. For significant conditions, the message remains until you clear it. Pressing or message. The clears the message and the previous display content will be shown. Pressing any other key clears the message but the function of the key will not be executed.
Indicates the "top" of equation memory. The memory scheme is circular, so is also the "equation" after the last equation in equation memory. The calculator is calculating the integral of an equation or program. This might take a while. A running CALCULATE,SOLVE or ∫ FN operation was interrupted by pressing or in ALG, RPN, EQN, or PGM mode. Data error: Attempted to save or calculate error data.
Exponentiation error: Attempted to raise 0 to the 0th power or to a negative power. Attempted to raise a negative number to a non– integer power. Attempted to raise complex number (0 + i 0) to a number with a negative real part. Attempted an operation with an invalid indirect value ((I) is not defined). Attempted an operation with an invalid indirect value ((J) is not defined). Attempted to take a logarithm of zero or (0 + i0).
SOLVE (include EQN and PGM mode)cannot find the root of the equation using the current initial guesses (see page ). These conditions include: bad guess, solution not found, point of interest, left unequal to right. A SOLVE operation executed in a program does not produce this error; the same condition causes it instead to skip the next program line (the line following the instruction variable).
Statistics error: Attempted to do a statistics calculation with n = 0. Attempted to calculate sx sy, x̂ , ŷ , m, r, or b with n = 1. Attempted to calculate r, x̂ or xw with x–data only (all y–values equal to zero). Attempted to calculate x̂ , ŷ , r, m, or b with all x– values equal. A syntax error was detected during evaluation of an expression, equation,, or ". Pressing or clears the error message and allows you to correct the error.
F-6 Messages
G Operation Index This section is a quick reference for all functions and operations and their formulas, where appropriate. The listing is in alphabetical order by the function's name. This name is the one used in program lines. For example, the function named FIX n is executed as 8 (1) n. Nonprogrammable functions have their names in key boxes. For example, .
Name Keys and Description Page Ø Displays next entry in catalog; moves to next equation in equation list; moves program pointer to next line (during program entry); executes the current program line (not during program entry). 1–28 6–3 13–11 13–20 Ö orÕ Moves the cursor and does not delete any content. 1–14 Ö or Õ Scrolls the display to show more digits to the left and right; displays the rest of an equation or binary number; goes the next menu page in the CONST and SUMS menus.
Name Σx2 Keys and Description ÕÕÕ () Page 12–11 1 12–11 1 Returns the sum of squares of x– values. Σxy ÕÕÕÕÕ () Returns the sum of products of x–and y–values. Σy ÕÕ () Returns the sum of y–values. 12–11 1 Σy2 ÕÕÕÕ () 12–11 1 σx ÕÕ (σ) 12–7 1 12–7 1 Returns the sum of squares of y– values.
Name A through Z Keys and Description Page variable Value of named 6–4 1 4–17 1 4–4 1 4–6 1 variable. ABS Absolute value. Returns x . ACOS Arc cosine. Returns cos –1x. ACOSH Hyperbolic arc cosine. Returns cosh –1 x. 9() Activates Algebraic mode. ALOG Common exponential. 1–9 6–16 1 Returns 10 raised to the specified power (antilogarithm). ALL 8() 1–23 Displays all significant digits. May have to scroll right (Õ) to see all of the digits.
Name b Keys and Description Page 11–2 () 1 Indicates a binary number Displays the base–conversion menu. 11–1 BIN () 11–1 Selects Binary (base 2) mode. Turns on calculator; clears x; clears messages and prompts; cancels menus; cancels catalogs; cancels equation entry; cancels program entry; halts execution of an equation; halts a running program. /c Denominator. 1–1 1–4 1–8 1–29 6–3 13–7 13–19 5–4 Sets denominator limit for displayed fractions to x.
Name CLVARx Keys and Description Page () 1–4 Clears indirect variables whose address is greater than the x address to zero. CLSTK CM () Clears all stack levels to zero. 2–7 Converts inches to 4–14 1 4–15 1 centimeters. nCr x Combinations of n items taken r at a time. Returns n! ÷ (r! (n – r)!). COS Cosine. Returns cos x. 4–3 1 COSH Hyperbolic 4–6 1 cosine. Returns cosh x. Accesses the 41 physics constants.
Name ENG n Keys and Description Page 1–22 8()n Selects Engineering display with n digits following the first digit (n = 0 through 11). @and2 Causes the exponent display for the number being displayed to change in multiple of 3. 1–22 Separates two numbers keyed in sequentially; completes equation entry; evaluates the displayed equation (and stores result if appropriate).
Name FS? n Keys and Description () n Page 14–12 If flag n (n = 0 through 11) is set, executes the next program line; if flag n is clear, skips the next program line. Converts liters to gallons. GAL 4–14 GRAD 9 ()Sets Grads angular mode. label nnn Sets program pointer to line nnn of program label. 13–21 Sets program pointer to PRGM TOP. 13–21 h () 1 4–4 11–1 1 Indicates a hexadecimal number HEX () 11–1 Selects Hexadecimal (base 16) mode.
Name Keys and Description Page INT÷ (÷) Produces the quotient of a division operation involving two integers. 4–2 1 INTG () Obtains the 4–18 1 greatest integer equal to or less than given number. INPUT variable 13–13 variable Recalls the variable to the X–register, displays the variable's name and value, and halts program execution. Pressing (to resume program execution) or Ø (to execute the current program line) stores your input in the variable. (Used only in programs.
Name LBL label Keys and Description label Page 13–3 Labels a program with a single letter for reference by the XEQ, GTO, or FN= operations. (Used only in programs.) LN Natural logarithm. Returns log e x. 4–1 1 LOG Common logarithm. 4–1 1 Returns log10 x. Displays menu for linear regression. 12–4 m ÕÕÕ () Returns the slope of the regression line: [Σ(xi– x )(yj– y )]÷Σ(xi– x )2 12–7 1 ;Converts kilometers to 4–14 1 MILE miles.
Name OR Keys and Description Page 11–4 > () 1 Logic operator Turns the calculator off. 1–1 nPr { Permutations of n items 4–15 1 taken r at a time. Returns n!÷(n – r)!. Activates or cancels (toggles) Program–entry mode. PSE Pause. Halts program execution briefly to display x, variable, or equation, then resumes. (Used only in programs.
Name RCL+ variable Keys and Description variable Page 3–7 Returns x + variable. RCL– variable variable. 3–7 Returns x – variable. RCLx variable variable. RCL÷ variable variable. 3–7 Returns x × variable. 3–7 Returns x ÷ variable. RMDR () Produces the remainder of a division operation involving two integers. 6–16 1 RND Round.
Name Keys and Description Page SCI n 8() n Selects Scientific display with n decimal places. (n = 0 through 11.) 1–22 SEED Restarts the random– 4–15 number sequence with the seed SF n x . 14–12 () n Sets flag n (n = 0 through 11). SGN () Indicates the 4–17 1 sign of x. Shows the full mantissa (all 12 digits) of x (or the number in the current program line); displays hex checksum and decimal byte length for equations and programs. SIN Sine.
Name STOP Keys and Description Run/stop. Page 13–19 Begins program execution at the current program line; stops a running program and displays the X–register. Displays the summation menu. 12–4 sx () Returns sample standard deviation of x–values: 12–6 1 12–6 1 4–3 1 4–6 1 ∑ (x sy i − x )2 ÷ (n − 1) Õ () Returns sample standard deviation of y–values: ∑ (y TAN i − y )2 ÷ (n − 1) Tangent. Returns tan x. Hyperbolic TANH tangent. Returns tanh x.
Name x̂ Keys and Description (ˆ) Page 12–11 1 4–15 1 Given a y–value in the X–register, returns the x–estimate based on the regression line: x̂ = (y – b) ÷ m. ! * Factorial (or gamma). Returns (x)(x – 1) ... (2)(1), or Γ (x + 1). XROOT The argument1 root of argument2. 6–16 1 xw ÕÕ ( w )Returns 12–4 1 Displays the mean (arithmetic average) menu. 12–4 x<> variable x exchange. weighted mean of x values: (Σyixi) ÷ Σyi. 3–8 Exchanges x with a variable.
Name x=y? Keys and Description Page ÕÕÕÕÕ () 14–7 If x=y, executes next program line; if x≠y, skips next program line. Displays the "x?0" comparison tests menu. 14–7 x≠0? (≠) If x≠0, executes next program line; if x=0, skips the next program line. 14–7 x≤0? Õ (≤) If x≤0, executes next program line; if x>0, skips next program line. 14–7 x<0? ÕÕ (<) 14–7 If x<0, executes next program line; if x≥0, skips next program line.
Name ŷ Keys and Description Õ ( ̂ ) Page 12–11 1 4–2 1 Given an x–value in the X–register, returns the y–estimate based on the regression line: yx ŷ = m x + b. Power. Returns y raised to the xth power. Notes: 1. Function can be used in equations.
G-18 Operation Index
Index Special Characters ∫ FN. See integration % functions 4-6 1-15 in fractions 1-26 π 4-3, A-2 annunciator in fractions 5-2 in fractions 5-3 annunciators equations 6-7 binary numbers 11-8 equations 13-7 . See backspace key _. See digit-entry cursor . See integration annunciators 1-3 annunciator 1-1, A-3 A A…Z annunciator 1-3, 3-2, 6-4 absolute value (real number) 4-17 addressing indirect 14-20, 14-21, 14-23 ALG 1-9 compared to equations 13-4 in programs 13-4 Algebraic mode 1-9 ALL format.
binary numbers.
temperature units 4-14 time format 4-13 volume units 4-14 coordinates converting 4-10 correlation coefficient 12-8, 16-1 cosine (trig) 4-4, 9-3, C-6 curve fitting 12-8, 16-1 D Decimal mode.
memory in 13-16 multiple roots 7-9 no root 7-8 numbers in 6-5 numeric value of 6-10, 6-11, 7-1, 7-7, 13-4 operation summary 6-3 parentheses 6-5, 6-6, 6-15 precedence of operators 6-14 prompt for values 6-11, 6-13 prompting in programs 14-11, 15-1, 15-8 roots 7-1 scrolling 6-7, 13-7, 13-16 solving 7-1, D-1 stack usage 6-11 storing variable value 6-12 syntax 6-14, 13-16 TVM equation 17-1 types of 6-9 uses 6-1 variables in 6-3, 7-1 with (I)/(J) 14-23 error messages F-1 errors clearing 1-4 correcting 2-8, F-1 e
G finds PRGM TOP 13-6, 13-21, 146 finds program labels 13-10, 1322, 14-5 finds program lines 13-22, 14-5 gamma function 4-15 go to. See GTO grads (angle units) 4-4, A-2 Grandma Hinkle 12-7 Greatest integer 4-18 grouped standard deviation 16-18 GTO 14-4, 14-17 guesses (for SOLVE) 7-2, 7-7, 7-8, 712, 15-6 H help about calculator A-1 HEX annunciator 11-1 hex numbers. See numbers arithmetic 11-4 converting to 11-2 range of 11-7 typing 11-1 hexadecimal numbers.
logarithmic functions 4-1, 9-3, C-5 logic AND 11-4 NAND 11-4 NOR 11-4 NOT 11-4 OR 11-4 XOR 11-4 loop counter 14-18, 14-23 looping 14-16, 14-17 Łukasiewicz 2-1 M program catalog 1-28, 13-22 reviews memory 1-28 variable catalog 1-28 mantissa 1-25 mass conversions 4-14 math complex-number 9-1 general procedure 1-18 intermediate results 2-12 long calculations 2-12 order of calculation 2-14 real-number 4-1 stack operation 2-5, 9-2 maximum of function D-8 mean menu 12-4 means (statistics) calculating 12-4 norm
1-18 periods and commas in 1-23, A-1 precision D-13 prime 17-7 range of 1-17, 11-7 real 4-1 recalling 3-2 reusing 2-6, 2-10 rounding 4-18 showing all digits 1-25 storing 3-2 truncating 11-6 typing 1-15, 1-16, 11-1 O Ä 1-1 OCT annunciator 11-1, 11-4 octal numbers.
deleting 1-28 deleting all 1-5 deleting equations 13-7, 13-20 deleting lines 13-20 designing 13-3, 14-1 editing 1-4, 13-7, 13-20 editing equations 13-7, 13-20 entering 13-6 equation evaluation 14-11 equation prompting 14-11 equations in 13-4, 13-7 errors in 13-19 executing 13-10 flags 14-9, 14-12 for integration 15-7 for SOLVE 15-1, D-1 fractions with 5-8, 13-15, 14-9 functions not allowed 13-24 indirect addressing 14-20, 14-21, 14-23 inserting lines 13-6, 13-20 interrupting 13-19 lengths 13-22, 13-23, B-2
rolling the stack 2-3, C-7 root functions 4-3 roots.
size limit 2-4, 9-2 unaffected by VIEW 13-15 stack lift. See stack default state B-4 disabling B-4 enabling B-4 not affecting B-5 operation 2-5 standard deviations calculating 12-6, 12-7 grouped data 16-18 normal distribution 16-11 standard-deviation menu 12-6, 12-7 statistical data.
solving for 7-1, 15-1, 15-6, D-1 storing 3-2 storing from equation 6-12 typing name 1-3 viewing 3-4, 13-15, 13-18 vectors absolute value 10-3 addition, subtraction 10-1 angle between two vectors 10-5 coordinate conversions 4-12, 9-5 creating vectors from variables or registers 10-8 cross product 17-11 dot product 10-4 in equation 10-6 in program 10-7 VIEW displaying program data 13-15, 13-18, 15-6 displaying variables 3-4 no stack effect 13-15 stopping programs 13-15 volume conversions 4-14 testing 14-7 un
Index-12