Aplet view configuration ...1-17 Mathematical calculations ...1-18 Using fractions...1-24 Complex numbers...1-27 Catalogs and editors ...1-28 Differences between the HP 38G and the HP 39G/40G...1-29 2 Aplets and their views Aplet views...2-1 About the Symbolic view ...2-1 Defining an expression (Symbolic view)...2-1 Evaluating expressions ...2-3...
Page 4
3 Function aplet About the Function aplet ...3-1 Getting started with the Function aplet...3-1 Function aplet interactive analysis ...3-8 Plotting a piecewise defined function example ...3-11 4 Parametric aplet About the Parametric aplet ...4-1 Getting started with the Parametric aplet...4-1 5 Polar aplet Getting started with the polar aplet...5-1 6 Sequence aplet...
Page 5
9 Inference aplet About the Inference aplet ...9-1 Getting started with the Inference aplet...9-2 Importing Sample Statistics from the Statistics aplet ...9-5 Hypothesis tests ...9-9 One–Sample Z–Test ...9-9 Two–Sample Z–Test...9-10 One–Proportion Z–Test ...9-11 Two–Proportion Z–Test...9-12 One–Sample T–Test ...9-13 Two–Sample T–Test...9-14 Confidence intervals...9-16 One–Sample Z–Interval...9-16 Two–Sample Z–Interval ...9-17...
Page 6
11 Variables and memory management Introduction ...11-1 Storing and recalling variables ...11-2 The VARS menu ...11-4 Memory Manager ...11-9 12 Matrices Introduction ...12-1 Creating and storing matrices...12-2 Working with matrices ...12-4 Matrix arithmetic ...12-6 Solving systems of linear equations...12-8 Matrix functions and commands ...12-9 Argument conventions...12-10 Matrix functions...12-10 Examples ...12-13...
Page 7
15 Programming Introduction ...15-1 Program catalog ...15-2 Creating and editing programs ...15-4 Using programs ...15-7 Working with programs...15-8 About customizing an aplet ...15-9 Aplet naming convention...15-10 Customizing an aplet example...15-10 Programming commands...15-14 Aplet commands ...15-14 Branch commands...15-17 Drawing commands ...15-19 Graphic commands ...15-20 Loop commands...15-22 Matrix commands ...15-23...
Page 8
Regulatory information ...R-1 USA ...R-1 Canada ...R-1 LED safety...R-2 Warranty ...R-2 CAS ...R-4 Resetting the HP 39G/40G ...R-4 To erase all memory and reset defaults ...R-5 If the calculator does not turn on ...R-5 Glossary ...R-6 Operating details...R-7 Batteries ...R-7 Menu maps of the VARS menu...R-8...
Preface The HP 39G/40G is a feature-rich graphing calculator. It is also a powerful mathematics learning tool. The HP 39G/40G is designed so that you can use it to explore mathematical functions and their properties. You can get more information on the HP 39G/40G from Hewlett-Packard’s Calculators web site.
Hewlett-Packard Company 2000, all rights reserved. The programs that control your HP 39G/40G are copyrighted and all rights are reserved. Reproduction, adaptation or translation of those programs without prior written permission of Hewlett Packard is prohibited.
HOME HOME is the calculator’s home view and is common to all aplets. If you want to perform calculations, or you want to quit the current activity (such as an aplet, a program, or an editor), press HOME.
HOME display. Press the N O T E The HP 40G is packaged with a computerized algebra system (CAS). Press This User’s Guide contains images from the HP39G and do not display the ) to increase (or to clear the edit line.
Annunciators. Annunciators are symbols that appear above the title bar and give you important status information. Annunciator (( )) The keyboard Menu keys Menu key labels Menu keys Aplet control Alpha key Shift key Getting started Description Shift in effect for next keystroke. To cancel, press again.
Page 14
• On the calculator keyboard, the top row of keys are called menu keys. Their meanings depend on the context—that’s why their tops are blank. The menu keys are sometimes called “soft keys”. • The bottom line of the display shows the labels for the menu keys’...
Page 15
The entry and edit keys are: CANCEL CLEAR CHARS Getting started Meaning Cancels the current operation if the calculator is on by pressing Pressing , then calculator off. Accesses the function printed in blue above a key. Returns to the HOME view, for performing calculations.
Page 16
There are two shift keys that you use to access the operations and characters printed above the keys: HELPWITH The HP 39G built-in help is available in HOME only. It provides syntax help for built-in math functions. Access the HELPWITH command by pressing and then the math key for which you require syntax help.
Page 17
H I N T When using the MATH menu, or any menu on the HP 39G/ 40G, pressing an alpha key takes you straight to the first menu option beginning with that alpha character. With this method, you do not need to press corresponds to the command’s beginning alpha character.
Menus A menu offers you a choice of items. Menus are displayed in one or two columns. • means more items below. • means more items above. To search a menu • Press or the beginning of the list. Highlight the item you want to select, then press •...
Input forms An input form shows several fields of information for you to examine and specify. After highlighting the field to edit, you can enter or edit a number (or expression). You can also select options from a list ( to check ( Reset input To reset a default field value in an input form, move the cursor...
Page 20
Setting Number Format Decimal Mark 1-10 Options (Continued) The number format mode you set is the number format used in both HOME and the current aplet. Standard. Full-precision display. Fixed. Displays results rounded to a number of decimal places. Example: 123.456789 becomes 123.46 in Fixed 2 format.
You select the aplet that you want to work with. Aplets come from a variety of sources: • Built-in the HP 39G/40G (initial purchase). • Aplets created by saving existing aplets, which have been modified, with specific configurations. See “Creating new aplets based on existing aplets”...
Page 22
Quad Explorer and Trig Explorer. You cannot modify configuration settings for these aplets. A great many more teaching aplets can be found at HP’s web site and other web sites created by educators, together with accompanying documentation, often with student work sheets.
Page 23
H I N T More detailed documentation, and an accompanying student work sheet can be found at HP’s web site. When first started, the aplet is arrow keys, the keys and the to change the shape of the graph.
Page 24
Trig Explorer The Trig Explorer aplet is used to investigate the behaviour aplet of the graph of and d change, both by manipulating the equation and seeing the change in the graph, or by manipulating the graph and seeing the change in the equation. When the user presses in the shown right is displayed.
Aplet library Aplets are stored in the Aplet library. To open an aplet Press aplet and press From within an aplet, you can return to HOME any time by pressing Aplet views When you have configured an aplet to define the relation or data that you want to explore, you can display it in different views.
Page 26
Note view Press This note is transferred with the aplet if it is sent to another calculator or to a PC. A note view contains text to supplement an aplet. See “Notes and sketches” on page 14-1 for further information.
To save aplet You can save an aplet configuration that you have used, and configuration transfer the aplet to other HP 39G/40G calculators. See “Sending and receiving aplets” on page 16-5. Getting started keys ( , and...
The home base for the calculator is the HOME view ). You can do all calculations here, and you can access all Entering • Enter an expression into the HP 39G/40G in the same left-to-right order that you would write the expression. expressions This is called algebraic entry. •...
Page 29
A(B+4) will not give A*(B+4). Instead an error message is displayed: “Invalid User Function”. This is because the calculator interprets A(B+4) as meaning ‘evaluate function A at the value B+4’, and function A does not exist. When in doubt, insert the * sign manually.
Page 30
7. AND and NOT. 8. OR and XOR. 9. Left argument of | (where). 10. Equals, =. Largest and The smallest number the HP 39G/40G can represent is –499 1 × 10 smallest largest number is 9.99999999999 × 10 numbers still displayed as this number.
Clearing • numbers cursor is positioned after the last character, the character to the left of the cursor, that is, it performs the same as a backspace key. • CANCEL • including the display history. Using The HOME display ( output history.
Page 32
Example See how You can use the last result as the first expression in the edit line without pressing , (or other operators that require a preceding argument) automatically enters You can reuse any other expression or value in the HOME display by highlighting the expression (using the arrow keys), then pressing 21 for more details.
Page 33
Storing a value You can save an answer in a variable and use the variable in later calculations. There are 27 variables available for storing in a variable real values. These are A to Z and . See Chapter 11, “Variables and memory management”...
It’s a good habit to clear the display history ( whenever you have finished working in HOME. It saves display history calculator memory to clear the display history. Remember that all your previous inputs and results are saved until you clear them.
Page 35
Setting The fraction precision setting determines the precision in which the HP 39G/40G converts a decimal value to a fraction. fraction The greater the precision value that is set, the closer the precision fraction is to the decimal value. By choosing a precision of 1 you are saying that the fraction only has to match 0.234 to at least 1 decimal place (3/13 is...
Fraction When entering fractions: calculations • You use the the denominator part of the fraction. • To enter a mixed fraction, for example, 1 in the format (1+ For example, to perform the following calculation: 1. Set the mode Number format to fraction. Fraction 2.
6. Complex numbers Complex results The HP 39G/40G can return a complex number as a result for some math functions. A complex number appears as an ordered pair (x, y), where x is the real part and y is the imaginary part.
Catalogs and editors The HP 39G/40G has several catalogs and editors. You use them to create and manipulate objects. They access features and stored values (numbers or text or other items) that are independent of aplets.
When the regression curve is selected, the values displayed in the Plot view status line are the PREDY values. On the HP 38G, the Trace function would select known data points only. Inference aplet To complement the Statistics aplet, a new Inference aplet has been added.
Aplets and their views Aplet views This section examines the options and functionality of the three main views for the Function, Polar, Parametric, and Sequence aplets: Symbolic, Plot, and Numeric views. About the Symbolic view The Symbolic view is the defining view for the Function, Parametric, Polar, and Sequence aplets.
Page 42
In this case, the calculator inserts the first two terms based on the expression that you define. Aplets and their views...
Evaluating expressions In aplets In the Symbolic view, a variable is a symbol only, and does not represent one specific value. To evaluate a function in Symbolic view, press function, then in terms of their independent variable. 1. Choose the Function aplet.
Page 44
SYMB view The following table details the menu keys that you use to work with the Symbolic view. keys CHARS CLEAR Meaning Copies the highlighted expression to the edit line for editing. Press when done. Checks/unchecks the current expression (or set of expressions). Only checked expression(s) are evaluated in the Plot and Numeric views.
About the Plot view After entering and selecting (check marking) the expression in the Symbolic view, press the graph or the interval that is displayed, you can change the Plot view settings. You can plot up to ten expressions at the same time. Select the expressions you want to be plotted together.
Page 46
Field NRNG TSTEP STEP SEQPLOT XTICK YTICK Those items with space for a checkmark are settings you can turn on or off. Press Field SIMULT INV. CROSS CONNECT LABELS AXES GRID Reset plot To reset the default values for all plot settings, press settings CLEAR for a field, highlight the field, and press...
Exploring the graph Plot view gives you a selection of keys and menu keys to explore a graph further. The options vary from aplet to aplet. PLOT view The following table details the keys that you use to work with the graph.
Trace a graph You can trace along a function using the moves the cursor along the graph. The display also shows the current coordinate position (x, y) of the cursor. Trace mode and the coordinate display are automatically set when a plot is drawn.
Page 49
Option X-Zoom In X-Zoom Out Y-Zoom In Y-Zoom Out Square Factors... Auto Scale Decimal Aplets and their views Meaning (Continued) Divides horizontal and vertical scales by the X-factor and Y-factor. For instance, if zoom factors are 4, then zooming in results in 1/4 as many units depicted per pixel.
Page 50
Option Integer Trig Un-zoom ZOOM examples The following screens show the effects of zooming options on a plot of Plot of Zoom In: Un-zoom: Un-zoom (Press bottom of the Zoom list.) Zoom Out: Now un-zoom. 2-10 Meaning (Continued) Rescales horizontal axis only, making each pixel =1 unit.
Page 51
X-Zoom In: X-Zoom In Now un-zoom. X-Zoom Out: X-Zoom Out Now un-zoom. Y-Zoom In: Y-Zoom In Now un-zoom. Y-Zoom Out: Y-Zoom Out Zoom Square: Square Aplets and their views 2-11...
Page 52
To box zoom The Box Zoom option lets you draw a box around the area you want to zoom in on by selecting the endpoints of one diagonal of the zoom rectangle. 1. If necessary, press 2. Press 3. Position the cursor on one corner of the rectangle. Press 4.
Other views for scaling and splitting the graph The preset viewing options menu ( for drawing the plot using certain pre-defined configurations. This is a shortcut for changing Plot view settings. For instance, if you have defined a trigonometric function, then you could select Trig to plot your function on a trigonometric scale.
Page 54
Split the screen The Plot-Detail view can give you two simultaneous views of the plot. 1. Press graph is plotted twice. You can now zoom in on the right side. 2. Press of split screen with Zoom In. – The Plot menu keys are available as for the full plot (for tracing, coordinate display, equation display, and so on).
Overlay plots If you want to plot over an existing plot without erasing that plot, then use Note that tracing follows only the current functions from the current aplet. Decimal scaling Decimal scaling is the default scaling. If you have changed the scaling to Trig or Integer, you can change it back with Decimal.
Setting up the table (numeric view setup) Press any of the table settings. Use the Numeric Setup input form to configure the table. 1. Highlight the field to edit. Use the arrow keys to move from field to field. – If there is a number to enter, type it in and press –...
Exploring the table of numbers NUM view The following table details the menu keys that you use to work with the table of numbers. menu keys Zoom within a Zooming redraws the table of numbers in greater or lesser detail. table ZOOM options The following table lists the zoom options:...
The display on the right is a Zoom In of the display on the left. The ZOOM factor is 4. H I N T To jump to an independent variable value in the table, use the arrow keys to place the cursor in the independent variable column, then enter the value to jump to.
Clear data Press “Build Your Own” menu keys CLEAR Aplets and their views to erase the data from a table. CLEAR Meaning Puts the highlighted independent value (X, T, , or N) into the edit line. Pressing replaces this variable with its current value. Inserts a row of zero values at the position of the highlight.
Example: plotting a circle Plot the circle, x To plot both the positive and negative y values, you need to define two equations as follows: – 1. In the Function aplet, specify the functions. Function 2. Reset the graph setup to the default settings. 3.
Function aplet About the Function aplet The Function aplet enables you to explore up to 10 real–valued, rectangular functions y in terms of x. For example Once you have defined a function you can: • create graphs to find roots, intercepts, slope, signed area, and extrema •...
Page 62
Define the 2. There are 10 function definition fields on the Function aplet’s Symbolic view screen. They are labeled F1(X) to expressions F0(X). Highlight the function definition field you want to use, and enter an expression. (You can press delete an existing line, or Set up the plot You can change the scales of the x and y axes, graph resolution, and spacing of axis ticks.
Page 63
Change the 6. You can change the scale to see more or less of your graphs. In this example, choose Auto Scale. (See scale “VIEWS menu options” on page 2-13 for a description of Auto Scale). Scale Trace a graph 7.
Page 64
To find the 10. Find the greater of the two roots of the quadratic greater of the two function. roots of the Note: Move the cursor to the graph of the quadratic quadratic equation by pressing the function cursor so that it is near key.
Page 65
To find the slope 13. Find the slope of the quadratic function at the intersection of the quadratic point. function Select Slope The slope value is displayed at the bottom of the screen. To find the signed 14. To find the area between the two functions in the range area of the two –2 x –1, first move the cursor to functions...
Page 66
18. Display the numerical value of the integral. Note: See “Shading area” on page 3-10 for another method of calculating area. To find the 19. Move the cursor to the quadratic equation and find the extremum of the extremum of the quadratic. quadratic Select Extremum The coordinates of the...
Page 67
22. Match the table settings to the pixel columns in the graph view. Explore the 23. Display a table of numeric values. table To navigate 24. Move to X = –5.9. around a table 6 times To go directly to a 25.
To change font 27. Display table numbers in large font. size To display the 28. Display the symbolic definition for the F1 column. symbolic definition of a column The symbolic definition of F1 is displayed at the bottom of the screen. Function aplet interactive analysis From the Plot view ( FCN menu to find roots, intersections, slopes, and areas for a...
Page 69
Access FCN The FCN variables are contained in the VARS menu. variables To access FCN variables in HOME: Select Plot FCN variable To access FCN variable in the Function aplet’s Symbolic view: Select Plot FCN FCN functions The FCN functions are: Function Root Extremum...
Page 70
Function Signed area Intersection Shading area You can shade a selected area between functions. This process also gives you an approximate measurement of the area shaded. 1. Open the Function aplet. The Function aplet opens in the Symbolic view. 2. Select the expressions whose curves you want to study. 3.
Plotting a piecewise defined function example Suppose you wanted to graph the following piecewise defined function. 1. Open the Function aplet. Function 2. Highlight the line you want to use, and enter the expression. (You can press line, or Note: You can use the menu key to assist in the entry of equations.
Parametric aplet About the Parametric aplet The Parametric aplet allows you to explore parametric equations. These are equations in which both x and y are defined as functions of t. They take the forms Getting started with the Parametric aplet The following example uses the parametric equations Note: This example will produce a circle.
Page 74
Set angle 3. Set the angle measure to degrees. measure Select Degrees Set up the plot 4. Display the graphing options. You can see the Plot Setup input form has two fields not included in the Function aplet, TRNG and TSTEP. TRNG specifies the range of t values.
Page 75
Overlay plot 8. Plot a triangle graph over the existing circle graph. Select Overlay Plot A triangle is displayed rather than a circle (without changing the equation) because the changed value of TSTEP ensures that points being plotted are 120 apart instead of nearly continuous.
Polar aplet Getting started with the polar aplet Open the Polar 1. Open the Polar aplet. aplet Like the Function aplet, the Polar aplet opens in the Symbolic view. Define the 2. Define the polar equation expression Specify plot 3. Specify the plot settings. In this example, we will use the default settings, except for the RNG fields.
Page 78
Explore the 5. Display the Plot view menu key labels. graph The Plot view options available are the same as those found in the Function aplet. See “Exploring the graph” on page 2-7 for further information. Display the 6. Display the table of values numbers The Numeric view options available are the...
Sequence aplet About the Sequence aplet The Sequence aplet allows you to explore sequences. You can define a sequence named, for example, U1: • in terms of n • in terms of U1(n-1) • in terms of U1(n-2) • in terms of another sequence, for example, U2(n) •...
Page 80
Define the 2. Define the Fibonacci sequence, in which each term (after the first two) is the sum of the preceding two terms: expression In the Symbolic view of the Sequence aplet, highlight the (1) field and begin defining your sequence. Note: You can use the keys to assist in the entry of equations.
Page 81
Plot the 4. Plot the Fibonacci sequence. sequence 5. In Plot Setup, set the SEQPLOT option to Cobweb. Display the 6. Display the table of numeric values for this example. table Sequence aplet SETUP PLOT Select Cobweb...
Solve aplet About the Solve aplet The Solve aplet solves an equation or an expression for its unknown variable. You define an equation or expression in the symbolic view, then supply values for all the variables except one in the numeric view. Solve works only with real numbers.
Getting started with the Solve aplet Suppose you want to find the acceleration needed to increase the speed of a car from 16.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m. The equation to solve is: Open the 1.
Page 85
Solve the 5. Solve for the unknown variable (A). unknown variable Therefore, the acceleration needed to increase the speed of a car from 16.67 m/sec (60 kph) to 27.78 m/sec (100 kph) in a distance of 100 m is approximately 2.47 Because the variable A in the equation is linear, once values are substituted into V, U and D, we know that we need not look for any other solutions.
Page 86
7. Trace along the graph representing the left member of the equation until the cursor nears the intersection. Note the value of A displayed near the bottom left corner of the screen. The Plot view provides a convenient way to find an approximation to a solution before using the Numeric view Solve option.
Use an initial guess You can usually obtain a faster and more accurate solution if you supply an estimated value for the unknown variable before pressing the initial guess. Before plotting, make sure the unknown variable is highlighted in the numeric view. Plot the equation to help you select an initial guess when you don’t know the range in which to look for the solution.
Solve found a point where the value of the equation approximates a local minimum (for positive values) or maximum (for negative values). This point may or may not be a root. Or: Solve stopped searching at 9.99999999999E499, the largest number the calculator can represent. Solve aplet...
Page 89
If Solve could not find a solution, you will see one of the following two messages. Message Bad Guess(es) Constant? H I N T It is important to check the information relating to the solve process. For example, the solution that the Solve aplet finds is not a solution, but the closest that the function gets to zero.
Plotting to find guesses The main reason for plotting in the Solve aplet is to help you find initial guesses and solutions for those equations that have difficult-to-find or multiple solutions. Consider the equation of motion for an accelerating body: where x is distance, v acceleration.
Page 91
3. Use the Plot view to find an initial guess for T. First set appropriate X and Y ranges in the Plot Setup. Since we have an equation, produce two graphs: one for this example, one of the graphs will be Therefore, make the YRNG –5 to 35.
All home variables (other than those for aplet settings, like Xmin and Ytick) are global, which means they are shared variables throughout the different aplets of the calculator. A value that is assigned to a home variable anywhere remains with that variable wherever its name is used.
Statistics aplet About the Statistics aplet The Statistics aplet can store up to ten separate data sets at one time. It can do one-variable or two-variable statistical analysis of one or more sets of data. The Statistics aplet starts with the Numeric view which is used to enter data.
Page 94
Open the 1. Open the Statistics aplet and clear existing data by pressing Statistics aplet Select Statistics The Statistics aplet starts in the Numerical view. At any time the Statistics aplet is configured for only one of two types of statistical explorations: one-variable ( variable ( view toggles between these two options and shows the...
Page 95
Choose fit and 4. Select a fit in the Symbolic setup view. data columns Select Linear You can define up to five explorations of two-variable data, named S1 to S5. In this example, we will create just one: S1. 5. Specify the columns that hold the data you want to analyze.
Page 96
Plot the graph 9. Plot the graph. Draw the 10. Draw the regression curve (a curve to fit the data points). regression curve This draws the regression line for the best linear fit. Display the 11. Return to the Symbolic view. equation for best linear fit 12.
Predict values 13. To find the predicted sales figure if advertising were to go up to 6 minutes: Stat-Two) PREDY) 14. Return to the Plot view. 15. Jump to the indicated point on the regression line. Observe the predicted y- value in the left bottom corner of the screen.
Page 98
Statistics aplet’s NUM view keys The Statistics aplet’s Numeric view keys are: CLEAR Meaning Copies the highlighted item into the edit line. Inserts a zero value above the highlighted cell. Sorts the specified independent data column in ascending or descending order, and rearranges a specified dependent (or frequency) data column accordingly.
Page 99
Example You are measuring the height of students in a classroom to find the mean height. The first five students have the following measurements 160cm, 165cm, 170cm, 175cm, 180cm. 1. Open the Statistics aplet. Statistics 2. Enter the measurement data. 3.
Page 100
4. Press statistics window and press the data set definitions. The first column indicates the associated column of data for each data set definition, and the second column indicates the constant frequency, or the column that holds the frequencies. The keys you can use from this window are: to close the key to see Meaning...
Page 101
CLEAR To continue our example, suppose that the heights of the rest of the students in the class are measured, but each one is rounded to the nearest of the five values first recorded. Instead of entering all the new data in C1, we shall simply add another column, C2, that holds the frequencies of our five data points in C1.
Page 102
8. Display the computed statistics. You can scroll down to the mean. The mean height is approximately 167.63cm. 9. Setup a histogram plot for the data. Enter set up information appropriate to your data. 10. Plot a histogram of the data. Angle Setting You can ignore the angle measurement mode unless your Fit definition (in Symbolic view) involves a trigonometric...
Insert data Highlight the entry following the point of insertion. Press then enter a number. It will write over the zero that was inserted. Sort data 1. In Numeric view, highlight the column you want to sort, and press values 2.
Page 104
Fit models Eight fit models are available: Fit model Linear Logarithmic Exponential Power Quadratic Cubic Logistic User Defined To define your 1. In Numeric view, make sure own fit 2. Display the Symbolic view. 3. Highlight the Fit expression (Fit1, etc.) for the desired data set.
Computed statistics One-variable Statistic MEAN PVAR SVAR PSDEV SSDEV MEDIAN When the data set contains an odd number of values, the data set’s median value is not used when calculating Q1 and Q3 in the table above. For example, for the following data set: {3,5,7,8,15,16,17} only the first three items, 3, 5, and 7 are used to calculate Q1, and only the last three terms, 15, 16, and 17 are used to...
Page 106
Two-variable Statistic MEANX MEANY SCOV PCOV CORR RELERR 8-14 Definition Mean of x- (independent) values. Sum of x-values. Sum of x -values. Mean of y- (dependent) values. Sum of y-values. Sum of y -values. Sum of each xy. Sample covariance of independent and dependent data columns.
Plotting You can plot: • histograms ( • box-and-whisker plots ( • scatter plots of data ( Once you have entered your data ( set ( statistics ( can select up to five scatter or box-and-whisker plots at a time. You can plot only one histogram at a time.
Plot types Histogram One-variable statistics. The numbers below the plot mean that the current bar (where the cursor is) starts at 0 and ends at 2 (not including 2), and the frequency for this column, (that is, the number of data elements that fall between 0 and 2) is 1.
Fitting a curve to 2VAR data In the Plot view, press checked two-variable data set(s). See “To choose the fit” on page 8-11. The expression in Fit2 shows that the slope=1.98082191781 and the y-intercept=2.2657. Correlation The correlation coefficient is stored in the CORR variable. It is coefficient a measure of fit to a linear curve only.
Setting up the plot (Plot setup view) The Plot Setup view ( same plotting parameters as it does for the other built-in aplets. See “Setting up the plot (Plot view setup)” on page 2-5. Settings unique to the Statistics aplet are as follows: Plot type (1VAR) STATPLOT enables you to specify either a histogram or a box-and-whisker plot for one-variable statistics (when...
Trouble-shooting a plot If you have problems plotting, check that you have the following: • The correct view). • The correct fit (regression model), if the data set is two- variable. • Only the data sets to compute or plot are checkmarked (Symbolic view).
Exploring the graph The Plot view has menu keys for zooming, tracing, and coordinate display. There are also scaling options under . These options are described in“Exploring the graph” on page 2-7. Statistics aplet’s PLOT view keys CLEAR (2var statistics only) 8-20 Meaning Erases the plot.
Calculating predicted values The functions PREDX and PREDY estimate (predict) values for X or Y given a hypothetical value for the other. The estimation is made based on the curve that has been calculated to fit the data according to the specified fit. Find predicted 1.
It is useful for gaining an understanding of what the test does, and for demonstrating the test. The calculator’s on–line help provides a description of what the example data represents.
Getting started with the Inference aplet This example describes the Inference aplet’s options and functionality by stepping you through an example using the example data for the Z–Test on 1 mean. Open the 1. Open the Inference aplet. Inference aplet Select Inferential The Inference aplet opens in the Symbolic view.
Page 117
If you choose one of the hypothesis tests, you can choose the alternative hypothesis to test against the null hypothesis. For each test, there are three possible choices for an alternative hypothesis based on a quantitative comparison of two quantities. The null hypothesis is always that the two quantities are equal.Thus, the alternative hypotheses cover the various cases for the two quantities being unequal: <, >, and .
Page 118
Enter data 4. Enter the sample statistics and population parameters that define the chosen test or interval. The table below lists the fields in this view for our current Z–Test: 1 Field name By default, each field already contains a value. These values constitute the example database and are explained in the Display on-line...
Statistics-based aplet can be imported for use in the Inference aplet. The following example illustrates the process. A calculator produces the following 6 random numbers: 0.529, 0.295, 0.952, 0.259, 0.925, and 0.592 Open the 1. Open Statistics aplet. Note: Reset current settings.
Page 120
Enter data 2. In the C1 column, enter the random numbers produced by the calculator. H I N T If the Decimal Mark setting in the Modes input form MODES 3. If necessary, select 1–variable statistics. Do this by pressing the fifth menu key until its menu label.
Page 121
Choose 7. Choose an inference method. inference Select CONF INTERVAL method and type 8. Choose a distribution statistic type. Select T-Int: 1 Set up the 9. Set up the interval calculation. Note: The default values are sample data from the on-line help example. interval calculation Import the data...
Page 122
11. Specify a 90% confidence interval in the C: field. C: field Display 12. Display the confidence interval in the Numeric view. Note: The interval setting is 0.5. Numeric view Display Plot 13. Display the confidence interval in the Plot view. view You can see, from the second text row, that the...
You use hypothesis tests to test the validity of hypotheses that relate to the statistical parameters of one or two populations. The tests are based on statistics of samples of the populations. The HP 39G/40G hypothesis tests use the Normal Z–distribution or Student’s t-distribution to calculate probabilities.
Results The results are: Result Test Z Prob Critical Z Critical Two–Sample Z–Test Menu name Z–Test: 1– 2 On the basis of two samples, each from a separate population, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis.
Results The results are: Result Test Z Prob Critical Z One–Proportion Z–Test Menu name Z–Test: P On the basis of statistics from a single sample, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis. The null hypothesis is that the proportion of successes in the two populations is equal You select one of the following alternative hypotheses against...
Results The results are: Result Test P Test Z Prob Critical Z Two–Proportion Z–Test Menu name Z–Test: P1–P2 On the basis of statistics from two samples, each from a different population, the 2 proportion Z–Test measures the strength of the evidence for a selected hypothesis against the null hypothesis.
Results The results are: Result Test P1–P2 Test Z Prob Critical Z One–Sample T–Test Menu name T–Test: 1 The One–sample T–Test is used when the population standard deviation is not known. On the basis of statistics from a single sample, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis.
Results The results are: Result Test T Prob Critical T Critical Two–Sample T–Test Menu name T–Test: 1 – 2 The Two–sample T–Test is used when the population standard deviation is not known. On the basis of statistics from two samples, each sample from a different population, this test measures the strength of the evidence for a selected hypothesis against the null hypothesis.
Page 129
Inputs The inputs are: Field name _Pooled? Results The results are: Result Test T Prob Critical T Inference aplet Definition Sample 1 mean. Sample 2 mean. Sample 1 standard deviation. Sample 2 standard deviation. Sample 1 size. Sample 2 size. Significance level.
Confidence intervals The confidence interval calculations that the HP 39G/40G can perform are based on the Normal Z–distribution or Student’s t–distribution. One–Sample Z–Interval Menu name Z–INT: 1 This option uses the Normal Z–distribution to calculate a confidence interval for , the true mean of a population, when the true population standard deviation, , is known.
Two–Sample Z–Interval Menu name Z–INT: This option uses the Normal Z–distribution to calculate a confidence interval for the difference between the means of two populations, deviations, Inputs The inputs are: Field name Results The results are: Result Critical Z Inference aplet –...
One–Proportion Z–Interval Menu name Z–INT: 1 P This option uses the Normal Z–distribution to calculate a confidence interval for the proportion of successes in a population for the case in which a sample of size, n, has a number of successes, x. Inputs The inputs are: Field name...
Two–Proportion Z–Interval Menu name Z–INT: P1 – P2 This option uses the Normal Z–distribution to calculate a confidence interval for the difference between the proportions of successes in two populations. Inputs The inputs are: Field name Results The results are: Result Critical Z Inference aplet...
One–Sample T–Interval Menu name T–INT: 1 This option uses the Student’s t–distribution to calculate a confidence interval for , the true mean of a population, for the case in which the true population standard deviation, , is unknown. Inputs The inputs are: Field name Results The results are:...
Two–Sample T–Interval Menu name T–INT: 1 – 2 This option uses the Student’s t–distribution to calculate a confidence interval for the difference between the means of two populations, deviations, Inputs The inputs are: Field name _Pooled Results The results are: Result Critical T Inference aplet...
Using mathematical functions Math functions The HP 39G/40G contains many math functions. The functions are grouped in categories. For example, the Matrix category contains functions for manipulating matrices. The Probability category (shown as Prob. on the MATH menu) contains functions for working with probability.
Page 138
To select a 1. Press function appear in alphabetical order. Press through the categories. To skip directly to a category, press the first letter of the category’s name. Note: You do not need to press 2. The list of functions (on the right) applies to the currently highlighted category (on the left).
Math functions by category Following are definitions for all categories of functions except List, Matrix, and Statistics, each of which appears in its own chapter. Except for the keyboard operations, which do not appear in the MATH menu, all other functions are listed by their category in the MATH menu.
Keyboard functions The most frequently used functions are available directly from the keyboard. Many of the keyboard functions also accept complex numbers as arguments. Add, Subtract, Multiply, Divide. Also accepts complex numbers, lists and matrices. value1+ value2, etc. Natural exponential. Also accepts complex numbers. e^value Example e^5 returns 148.413159103...
Page 141
Arc sine: sin ASIN /2, or –100 to 100 grads. Inputs and outputs depend on the current angle format. Also accepts complex numbers. ASIN(value) Example ASIN(1) returns 90 (Degrees mode). Arc cosine: cos ACOS 0 to 200 grads. Inputs and outputs depend on the current angle format.
Page 142
Power (x raised to y). Also accepts complex numbers. value^power Example 2^8 returns 256 Absolute value. For a complex number, this is ABS(value) ABS((x , y)) Example ABS(–1) returns 1 ABS((1,2)) returns 2.2360679775 Takes the nth root of x. root NTHROOT value Example 3 NTHROOT 8 returns 2 10-6...
Calculus functions The symbols for differentiation and integration are available directly form the keyboard— well as from the MATH menu. Differentiates expression with respect to the variable of differentiation. From the command line, use a formal name (S1, etc.) for a non-numeric result. See “Finding derivatives” on page 10-23.
Complex number functions These functions are for complex numbers only. You can also use complex numbers with all trigonometric and hyperbolic functions, and with some real-number and keyboard functions. Enter complex numbers in the form (x,y), where x is the real part and y is the imaginary part. Argument.
Constants The HP 39G/40G has an internal numeric representation for these constants. Natural logarithm base. Internally represented as 2.71828182846. Imaginary value for MAXREAL Maximum real number. Internally represented as 9.99999999999 x 10 MAXREAL MINREAL Minimum real number. Internally represented as MINREAL Internally represented as 3.14159265359.
ALOG Antilogarithm (exponential). This is more accurate than 10^x due to limitations of the power function. ALOG(value) Natural exponential. This is more accurate than limitations of the power function. EXP(value) EXPM1 Exponent minus 1 : e when x is close to zero. EXPM1(value) LNP1 Natural log plus 1 : ln(x+1).
Loop functions The loop functions display a result after evaluating an expression a given number of times. ITERATE Repeatedly for #times evaluates an expression in terms of variable. The value for variable is updated each time, starting with initialvalue. ITERATE(expression,variable,initialvalue, #times) Example ITERATE(X...
Polynomial functions Polynomials are products of constants (coefficients) and variables raised to powers (terms). POLYCOEF Polynomial coefficients. Returns the coefficients of the polynomial with the specified roots. POLYCOEF ([roots]) Example To find the polynomial with roots 2, –3, 4, –5: POLYCOEF([2,-3,4,-5]) returns[1,2,-25, -26,120], representing x POLYEVAL...
H I N T The results of POLYROOT will often not be easily seen in HOME due to the number of decimal places, especially if they are complex numbers. It is better to store the results of POLYROOT to a matrix. For example, POLYROOT([1,0,0,-8] the three complex cube roots of 8 to matrix M1 as a complex vector.
Page 150
H I N T The setting of Time will be different for each calculator, so using RANDSEED(Time) is guaranteed to produce a set of numbers which are as close to random as possible. You can set the seed using the command RANDSEED.
Real-number functions Some real-number functions can also take complex arguments. CEILING Smallest integer greater than or equal to value. CEILING(value) Examples CEILING(3.2) returns 4 CEILING(-3.2) returns -3 Degrees to radians. Converts value from Degrees angle format to Radians angle format. DEG RAD(value) Example DEG RAD(...
Page 152
Hours-minutes-seconds to decimal. Converts a number or expression in H.MMSSs format (time or angle that can include fractions of a second) to x.x format (number of hours or degrees with a decimal fraction). HMS (H.MMSSs) Example HMS (8.30) returns 8.5 Decimal to hours-minutes-seconds.
Page 153
Modulo. The remainder of value1/value2. value1 MOD value2 Example 9 MOD 4 returns 1 x percent of y; that is, x/100*y. %(x,y) Example %(20,50) returns 10 %CHANGE Percent change from x to y, that is, 100(y–x)/x. %CHANGE(x,y) Example %CHANGE(20,50) returns 150 %TOTAL Percent total : (100)y/x.
SIGN Sign of value. If positive, the result is 1. If negative, –1. If zero, result is zero. For a complex number, this is the unit vector in the direction of the number. SIGN(value) SIGN((x,y)) Examples SIGN (–2) returns –1 SIGN((3,4)) returns (.6,.8) TRUNCATE Truncates value to decimal places.
Symbolic functions The symbolic functions are used for symbolic manipulations of expressions. The variables can be formal or numeric, but the result is usually in symbolic form (not a number). You will find the symbols for the symbolic functions = and | (where) in the CHARS menu ( = ( equals ) Sets an equality for an equation.
QUOTE Encloses an expression that should not be evaluated numerically. QUOTE(expression) Examples QUOTE(SIN(45)) SIN(45) rather than the value of SIN(45). Another method is to enclose the expression in single quotes. For example, X^3+2*X expression X^3_2*X into F1(X) in the Function aplet. | ( where ) Evaluates expression where each given variable is set to the given value.
Compares value1 and value2. Returns 1 if they are both non- zero, otherwise returns 0. value1 AND value2 IFTE If expression is true, do the trueclause; if not, do the falseclause. IFTE(expression , trueclause , falseclause ) Example IFTE(X>0,X Returns 1 if value is zero, otherwise returns 0. NOT value Returns 1 if either value1 or value2 is non-zero, otherwise returns 0.
To perform symbolic calculations, for example symbolic variables differentiations and integrations, you need to use formal names. The HP 39G/40G has six formal names available for use in symbolic calculations. These are S0 to S5. When you perform a calculation that contains a formal name, the HP 39G/40G does not carry out any substitutions.
Finding derivatives The HP 39G/40G can perform symbolic differentiation on some functions. There are two ways of using the HP 39G/40G to find derivatives. • You can perform differentiations in HOME by using the formal variables, S1 to S5. •...
Page 160
2. Define F2(X) as the derivative of F(1). 3. Select F2(X) and evaluate it. 4. Press view the entire function.) You could also just define F1 x 10-24 to display the result. (Use the arrow keys to HP 39G HP 40G Using mathematical functions...
Page 161
X=0 will not always evaluate to zero and may result in an unwanted constant. To see this, consider: Using mathematical functions – use: – )is set to Comma, use instead of to close the HP 39G HP 40G ---- - --------------- – – – ------------------- – 10-25...
Page 162
The ‘extra’ constant of 6.4 results from the substitution into (x – 2) and should be disregarded if an indefinite integral is required. 10-26 Using mathematical functions...
The calculator uses this memory to store variables, perform computation, and store history. A variable is an object that you create in memory to hold data. The HP 39G/40G has two types of variables, home variables and aplet variables. •...
Storing and recalling variables You can store numbers or expressions from a previous input or result into variables. Numeric A number stored in a variable is always stored as a 12-digit Precision mantissa with a 3-digit exponent. Numeric precision in the display, however, depends on the display mode (Standard, Fixed, Scientific, Engineering, or Fraction).
Page 165
To store the If the value you want to store is in the HOME view display results of a history, for example the results of a previous calculation, you need to copy it to the command line, then store it. calculation 1.
The VARS menu You use the VARS menu to access all variables in the calculator. The VARS menu is organised by category. For each variable category in the left column, there is a list of variables in the right column. You select a variable category and then select a variable in the category.
Page 167
5. Choose whether to place the variable name or the variable value on the command line. – Press contents to appear on the command line. – Press name to appear on the command line. 6. Press line. The selected object appears on the command line. Note: The VARS menu can also be used to enter the names or values of variables into programs.
Page 168
4. Enter data for L2. 5. Press 6. Open the variable menu and select L1. 7. Copy it to the command line. Note: Because the option is highlighted, the variable’s name, rather than its contents, is copied to the command line. 8.
Page 169
Home It is not possible to store data of one type in a variable of another type. For example, you use the Matrix catalog to variables create matrices. You can create up to ten matrices, and you can store these in variables M0 to M9. You cannot store matrices in variables other than M0 to M9.
Page 170
Aplet variables Aplet variables store values that are unique to a particular aplet. These include symbolic expressions and equations (see below), settings for the Plot and Numeric views, and the results of some calculations such as roots and intersections. See the Reference Information chapter for more information about aplet variables.
Memory Manager You can use the Memory Manager to determine the amount of available memory on the calculator. You can also use Memory Manager to organize memory. For example, if the available memory is low, you can use the Memory Manager to determine which aplets or variables consume large amounts of memory.
Matrices Introduction You can perform matrix calculations in HOME and in programs. The matrix and each row of a matrix appear in brackets, and the elements and rows are separated by commas. For example, the following matrix: is displayed in the history as: [[1,2,3],[4,5,6]] (If the Decimal Mark in MODES is set to Comma, then the row separators are periods.)
Prompts for a matrix type, then opens an empty matrix with the highlighted name. Transmits the highlighted matrix to another HP 39G/40G or a disk drive. See “Sending and receiving aplets” on page 16-5. Receives a matrix from another HP 39G/40G or a disk drive. See “Sending and receiving aplets”...
Page 175
To create a matrix 1. Press in the matrix Matrix catalog lists the 10 available matrix variables, M0 to M9. catalog 2. Highlight the matrix variable name you want to use and press 3. Select the type of matrix to create. –...
You can send matrices between calculators just as you can matrix send aplets, programs, lists, and notes. 1. Align the HP 39G calculators’ infrared ports. 2. Open the Matrix catalogs on both calculators. 3. Highlight the matrix to send. 4. Press 5.
Page 177
To display a • In the Matrix catalog ( matrix matrix name and press • In HOME, enter the name of the matrix variable and press To display one In HOME, enter matrixname(row,column). For example, if element M2 is [[3,4],[5,6]], then M2(1,2) To create a matrix 1.
Matrix arithmetic You can use the arithmetic functions (+, –, ×, / ) with matrix arguments. Division left–multiplies by the inverse of the divisor. You can enter the matrices themselves or enter the names of stored matrix variables. The matrices can be real or complex.
Page 179
To multiply two To multiply the two matrices M1 and M2 that you created for matrices the previous example, use the following keystrokes: To multiply a matrix by a vector, enter the matrix first, then the vector. The number of elements in the vector must equal the number of columns in the matrix.
Solving systems of linear equations Example Solve the following linear system: 4x y – 1. Open the Matrix catalog and choose to create a vector in the M1 variable. 2. Create the vector of the constants in the linear system. 3.
6. Return to HOME and enter the calculation to left multiply the constants vector by the inverse of the coefficients matrix. 7. Evaluate the calculation. The result is a vector of the solutions: • • • An alternative method, is to use the RREF function. See “RREF”...
About commands Matrix commands are listed in the CMDS menu ( ), in the matrix category. CMDS See “Matrix commands” on page 15-23 for details of the matrix commands available for use in programming. Functions differ from commands in that a function can be used in an expression.
Page 183
EIGENVAL Displays the eigenvalues in vector form for matrix. EIGENVAL(matrix) EIGENVV Eigenvectors and Eigenvalues for a square matrix. Displays a list of two arrays. The first contains the eigenvectors and the second contains the eigenvalues. EIGENVV(matrix) IDENMAT Identity matrix. Creates a square matrix of dimension size ×...
Page 184
QR Factorization. Factors an m×n matrix into three matrices: {[[m×m orthogonal]],[[m×n uppertrapezoidal]],[[n×n permutation]]}. QR(matrix) RANK Rank of a rectangular matrix. RANK(matrix) ROWNORM Row Norm. Finds the maximum value (over all rows) for the sums of the absolute values of all elements in a row. ROWNORM(matrix) RREF Reduced Row Echelon Form.
TRACE Finds the trace of a square matrix. The trace is equal to the sum of the diagonal elements. (It is also equal to the sum of the eigenvalues.) TRACE(matrix) Transposes matrix. For a complex matrix, TRN finds the conjugate transpose. TRN(matrix) Examples Identity Matrix...
Page 186
Reduced-Row The following set of equations Echelon Form can be written as the augmented matrix which can then stored as a real matrix in M1. You can use the RREF function to change this to reduced row echelon form, storing it as M2 for convenience.
Lists You can do list operations in HOME and in programs. A list consists of comma-separated real or complex numbers, expressions, or matrices, all enclosed in braces. A list may, for example, contain a sequence of real numbers such as {1,2,3}.
Page 188
HOME. Meaning Opens the highlighted list for editing. Transmits the highlighted list to another HP 39G/40G or a PC. See “Sending and receiving aplets” on page 16-5 for further information. Receives a list from another HP 39G/ 40G or a PC.
Page 189
List edit keys When you press edit to create or change a list, the following keys are available to you: CLEAR Create a list in 1. Enter the list in the edit line. Start and end the list with braces (the shifted HOME element with a comma.
Displaying and editing lists To display a list • In the List catalog, highlight the list name and press • In HOME, enter the name of the list and press To display one In HOME, enter listname(element#). For example, if L2 is element {3,4,5,6}, then L2(2) To edit a list...
Page 191
To insert an 1. Open the List catalog. element in a list 2. Press want to edit (L1, etc.) and press contents. 3. Press insertion position. New elements are inserted above the highlighted position. In this example, an element, with the value of 9, is inserted between the first and second elements in the list.
Transmitting lists You can send lists to calculators or PCs just as you can aplets, programs, matrices, and notes. 1. Align the HP 39G calculators’ infrared ports. 2. Open the List catalogs on both calculators. 3. Highlight the list to send.
List functions Following are details of list functions. You can use them in HOME, as well as in programs. You can type in the name of the function, or you can copy the name of the function from the List category of the MATH menu.
Page 194
CONCAT Concatenates two lists into a new list. CONCAT(list1 , list2) Example CONCAT({1,2,3},{4}) returns {1,2,3,4}. LIST Creates a new list composed of the differences between the sequential elements in list1. The new list has one fewer elements than list1. The first differences for {x –x ...
Page 195
LIST Calculates the product of all elements in list. LIST(list) Example LIST({2,3,4}) returns 24. Returns the position of an element within a list. The element can be a value, a variable, or an expression. If there is more than one instance of the element, the position of the first occurrence is returned.
Finding statistical values for list elements To find values such as the mean, median, maximum, and minimum values of the elements in a list, use the Statistics aplet. Example In this example, use the Statistics aplet to find the mean, median, maximum and minimum values of the elements in the list, L1.
Page 197
4. In the Symbolic view, define H1 (for example) as C1 (sample) and 1 (frequency). Make sure that H1 is checkmarked. 5. Go to the Numeric view to display calculated statistics. See “One-variable” on page 8-13 for the meaning of each computed statistic.
Notes and sketches Introduction The HP 39G/40G has text and picture editors for entering notes and sketches. • Each aplet has its own independent Note view and Sketch view. Notes and sketches that you create in these views are associated with the aplet. When you save the aplet, or send it to another calculator, the notes and sketches are saved or sent as well.
Page 200
Note edit keys CLEAR CMDS CHARS 14-2 Meaning Space key for text entry. Displays next page of a multi-page note. Alpha-lock for letter entry. Lower-case Alpha-lock. Backspaces cursor and deletes character. Deletes current character. Starts a new line. Erases the entire note. Menu for entering variable names, and contents of variables.
Aplet sketch view You can attach pictures to an aplet in its Sketch view SKETCH aplet. Press any other view key or view Sketch keys CLEAR To draw a line 1. In an aplet, press 2. In Sketch view, press where you want to start the line 3.
Page 202
To draw a box 1. In Sketch view, press where you want any corner of the box to be. 2. Press 3. Move the cursor to mark the opposite corner for the box. You can adjust the size of the box by moving the cursor. 4.
Page 203
To label parts of a 1. Press sketch Alpha shift on, press (for lowercase). To make the label a smaller character size, turn off before pressing large font size). The smaller character size cannot display lowercase letters. 2. Press 3. Position the label where you want it by pressing the 4.
To import a You can copy the contents of a graphics variable into the graphics variable Sketch view of an aplet. 1. Open the Sketch view of the aplet ( graphic will be copied here. 2. Press and highlight the name of the variable (G1, etc.). 3.
Page 205
Opens the selected note for editing. Begins a new note, and asks for a name. Transmits the selected note to another HP 39G/40G or PC. Receives a note being transmitted from another HP 39G/40G or PC. Deletes the selected note.
Page 206
To import a note You can import a note from the Notepad into an aplet’s Note view, and vice-versa. Suppose you want to copy a note named “Assignments” from the Notepad into the Function Note view: 1. In the Function aplet, display the Note view 2.
Programming Introduction This chapter describes how to program using the HP 39G/ 40G. In this chapter you’ll learn about: • using the Program catalog to create and edit programs • programming commands • storing and retrieving variables in programs •...
Editline contains the last expression that you entered from the edit line in HOME, or the last data you entered in an input form. (If you press without entering any data, the HP 39G/40G runs the contents of Editline.) Editline is a built-in function.
Page 209
Opens the highlighted program for editing. Prompts for a new program name, then opens an empty program. Transmits the highlighted program to another HP 39G/40G or to a disk drive. Receives the highlighted program from another HP 39G/40G or from a disk drive.
Create a new 1. Press program 2. Press The HP 39G/40G prompts you for a name. A program name can contain special characters, such as a space. However, if you use special characters and then run the program by typing it in HOME, you must enclose the program name in double quotes ("...
Page 211
Enter Until you become familiar with the HP 39G/40G commands, the easiest way to enter commands is to use the Commands commands menu from the Program editor. You can always type in commands using alpha characters. 1. From the Program editor, press Program Commands menu.
Page 212
Editing keys The editing keys are: CLEAR CMDS 15-6 Meaning Inserts the character at the editing point. Inserts space into text. Displays previous page of the program. Displays next page of the program. Moves up or down one line. Moves right or left one character. Alpha-lock for letter entry.
HOME, the HP 39G/40G displays the contents of Ans (Home variable containing the last result), when the program has finished. If you start the program from the Program catalog, the HP 39G/40G returns you to the Program catalog when the program ends. Debug a If you run a program that contains errors, the program will stop and you will see an error message.
Program catalog. PROGRM to open the Variable menu. to quickly scroll to Program. , then highlight the program you want to copy. , then press on the sending calculator and to open the Program catalog. PROGRM Programming...
Delete all You can delete all programs at once. programs 1. In the Program catalog, press 2. Press Delete the You can clear the contents of a program without deleting the program name. contents of a program 1. Press 2. Highlight a program, then press 3.
Aplet naming convention To assist users in keeping track of aplets and associated programs, use the following naming convention when setting up an aplet’s programs: • Start all program names with an abbreviation of the aplet name. We will use APL in this example. •...
Page 217
3. Create a program called EXP.ME2 with contents as shown. This program sets the numeric view options for the aplet, and runs the program that you can use to configure the angle mode. 4. Create a program called EXP.ANG which the previous two programs call.
Page 218
SETVIEWS ’ ’ ’ ’ ; ;’ ’ ’ ’ ; 18; Sets the first menu option to be "Auto scale". This is the fourth standard Function aplet view menu option and the 18 "Auto scale", specifies that it is to be included in the new menu.
Page 219
You only need to run this program once to configure your aplet’s VIEWS menu. Once the aplet’s VIEWS menu is configured, it remains that way until you run SETVIEWS again. You do not need to include this program for your aplet to work, but it is useful to specify that the program is attached to the aplet, and transmitted when the aplet is transmitted.
Programming commands This section describes the commands for programming with HP 39G/40G. You can enter these commands in your program by typing them or by accessing them from the Commands menu. Aplet commands These commands control aplets. CHECK Checks (selects) the corresponding function in the current aplet.
Page 221
• All the programs that are called from the VIEWS menu are transferred when the aplet is transferred, for example to another calculator or to a PC. • As part of the VIEWS menu configuration, you can specify programs that you want transferred with the aplet, but are not called as menu options.
Page 222
Auto-run programs If the Prompt item is “Start”, then the ProgramName program runs whenever you start the aplet. This is useful for setting up a program to configure the aplet. Users can select the Start item from the Views menu to reset the aplet if they change configurations.
View numbers The views are numbered as follows: UNCHECK Unchecks (unselects) the corresponding function in the current aplet. For example, Uncheck 3 would uncheck F3 if the current aplet is Function. UNCHECK n Branch commands Branch commands let a program make a decision based on the result of one or more tests.
Page 224
IFERR... Many conditions are automatically recognized by the HP THEN... 39G/40G as error conditions and are automatically treated as errors in programs. END... IFERR...THEN...END allows a program to intercept error conditions that otherwise would cause the program to abort.
Xmin, Xmax, Ymin, and Ymax values. The following examples assume the HP 39G/40G default settings with the Function aplet as the current aplet. Draws a circular arc, of given radians, whose centre is at (x,y) The arc is drawn from start_angle_measurement, and end_angle_measurement.
FREEZE Halts the program, freezing the current display. Execution resumes when any key is pressed. LINE Draws a line from (x1, y1) to (x2, y2). LINE x1;y1;x2;y2 PIXOFF Turns off the pixel at the specified coordinates (x,y). PIXOFF x;y PIXON Turns on the pixel at the specified coordinates (x,y).
Page 227
Creates a graphic from expression, using font_size, and stores the resulting graphic in graphicname. Font sizes are 1, 2, or 3. If the fontsize argument is 0, the HP 39G/40G creates a graphic display like that created by the SHOW operation.
ZEROGROB graphicname;width;height: Loop commands Loop structures allow a program to execute a routine repeatedly. The HP 39G/40G has three loop structures. The example programs below illustrate each of these structures incrementing the variable A from 1 to 12. DO…UNTIL Do ...
FOR…TO…STEP FOR name=start-expression TO end-expression ...END [STEP increment]; loop-clause END FOR A=1 TO 12 STEP 1; DISP 3;A: Note that the STEP parameter is optional. If it is omitted, a step value of 1 is assumed. BREAK Terminates loop. BREAK Matrix commands The matrix commands take variables M0–M9 as arguments.
Page 230
RANDMAT Creates random matrix with a specified number of rows and columns and stores the result in name (name must be M0...M9). The entries will be integers ranging from –9 to 9. RANDMAT name;rows;columns REDIM Redimensions the specified matrix or vector to size. For a matrix, size is a list of two integers {n1,n2}.
Print commands These commands print to an HP infrared printer, for example the HP 82240B printer. Note: The HP 40G does not have an infrared port and will not print to an infrared printer. PRDISPLAY Prints the contents of the display.
Page 232
Example "COMIC STRIPS"; "DILBERT"; "CALVIN&HOBBES"; "BLONDIE"; DISP Displays textitem in a row of the display at the line_number. A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings. Lines are numbered from the top of the screen, 1 being the top and 7 being the bottom.
Page 233
FREEZE This command prevents the display from being updated after the program runs. This allows you to view the graphics created by the program. Cancel FREEZE by pressing any key. FREEZE GETKEY Waits for a key, then stores the keycode rc.p in name, where r is row number, c is column number, and p is key-plane number.
Page 234
MSGBOX Displays a message box containing textitem. A text item consists of any number of expressions and quoted strings of text. The expressions are evaluated and turned into strings of text. For example, "AREA IS:" 2+2 becomes AREA IS: 4. Use to type the quote marks "...
Stat-One and Stat-Two commands The following commands are used for analysis of one- variable and two-variable statistical data. Stat-One commands DO1VSTATS Calculates STATS using datasetname and stores the results in the corresponding variables: N , Tot , Mean , PVar , SVar , PSDev, SSDev, Min , Q1, Median, Q3, and Max .
Storing and retrieving variables in programs The HP 39G/40G has both Home variables and Aplet variables. Home variables are used for real numbers, complex numbers, graphics, lists, and matrices. Home variables keep the same values in HOME and in aplets.
Page 237
Coord Turns the coordinate-display mode in Plot view on or off. From Plot view, use the Menu mean key to toggle coordinate display on an off. In a program, type Extremum Contains the last value found by the Extremum operation in the Plot-FCN menu.
Page 238
Hwidth Sets the width of histogram bars. From Plot Setup in 1VAR stats set a value for Hwidth In a program, type Hwidth Indep Defines the value of the independent variable used in tracing mode. In a program, type Indep InvCross Toggles between solid crosshairs or inverted crosshairs.
Page 239
Nmin / Nmax Defines the minimum and maximum independent variable values. Appears as the NRNG fields in the Plot Setup input form. From Plot Setup, enter values for NRNG. In a program, type where Recenter Recenters at the crosshairs locations when zooming. From Plot-Zoom-Set Factors, check (or uncheck) Recenter In a program, type...
Page 240
Simult Toggles between simultaneous and sequential graphing of all selected expressions. From Plot Setup, check (or uncheck) _SIMULT In a program, type Slope Contains the last value found by the Slope function in the Plot–FCN menu. StatPlot Toggles type of 1–variable statistics plot between Histogram or Box–and–Whisker.
Page 241
Tmin / Tmax Defines the minimum and maximum independent variable values. Appears as the TRNG field in the Plot Setup input form. From Plot Setup, enter values for TRNG. In a program, type where Tracing Turns tracing mode on or off in Plot view. In a program, type Tstep Defines the step size for an independent variable.
Page 242
Xtick Defines the distance between tick marks for the horizontal axis. From the Plot Setup input form, enter a value for Xtick. In a program, type Ytick Defines the distance between tick marks for the vertical axis. From the Plot Setup input form, enter a value for Ytick. In a program, type Xmin / Xmax Defines the minimum and maximum horizontal values of the...
Xzoom Sets the horizontal zoom factor. From Plot-ZOOM-Set Factors, enter the value for XZOOM. In a program, type where Yzoom Sets the vertical zoom factor. From Plot-ZOOM-Set Factors, enter the value for YZOOM. In a program, type Symbolic-view variables The following aplet variables available in the Symbolic view. Angle Sets the angle mode.
Page 244
X1, Y1...X9,Y9 Can contain any expression. Independent variable is T. X0,Y0 Example ’SIN(4*T)’ X1(T) R1...R9, R0 Can contain any expression. Independent variable is . Example ’2*SIN(2* )’ U1...U9, U0 Can contain any expression. Independent variable is N. Example RECURSE (U,U(N-1)*N,1,2) E1...E9, E0 Can contain any equation or expression.
Numeric-view variables The following aplet variables control the Numeric view. The value of the variable applies to the current aplet only. C1...C9, C0 C0 through C9, for columns of data. Can contain lists. Enter data in the Numeric view In a program, type LIST C n where n = 0, 1, 2, 3 ...
Page 246
Format Defines the number display format. From Solve’s Numeric Setup view, choose Standard, Fixed, Scientific, or Engineering in the Number Format field. In a program, store the constant name (or its number) into the variable Format. 1. Standard 2. Fixed 3.
Page 247
NumRow Defines the highlighted row in Numeric view. In a program, type NumRow where NumStart Defines the starting value for a table in Numeric view. From Num Setup, enter a value for NUMSTART. In a program, type NumStart NumStep Defines the step size (increment value) for an independent variable in Numeric view.
StatMode Toggles between 1–variable and 2–variable statistics in the Statistics aplet. Does not appear in the Plot Setup input form. Corresponds to the View. In a program, store the constant name (or its number) into the variable StatMode. 1VAR =1, 2VAR=2. Example 1VAR Note variables...
Extending aplets Aplets are the application environments where you explore different classes of mathematical operations. You can extend the capability of the HP 39G/40G in the following ways: • Create new aplets, based on existing aplets, with specific configurations such as angle measure, graphical or tabular settings, and annotations.
Page 250
Alphabetically or chronologically sorts the items in the Aplet Library menu list. Transmits the highlighted aplet to another HP 39G/40G or a storage device. Receives the aplet sent from another HP 39G/40G or storage device. Opens the selected aplet.
Page 251
3. Decide whether you want the aplet to operate in Degrees, Radians, or Grads. Select Degrees 4. Ensure the TRIANGLES aplet is saved in the Aplet Library. The Solve aplet can now be reset and used for other problems. Example: To use To use the aplet, simply select the appropriate formula, the customized change to the Numeric view and solve for the missing...
H I N T Notes and sketches that you attach to an aplet become part of the aplet. When you transfer the aplet to another calculator, the associated note and sketch are transferred as well. Downloading e-lessons from the web In addition to the standard aplets that come with the calculator, you can download aplets from the world wide web.
A convenient way to distribute or share problems in class and to turn in homework is to transmit (copy) aplets directly from one HP 39G to another. This takes place via the infrared port. You can also send aplets to, and receive aplets from, a remote storage device (aplet disk drive or computer).
Sorting items in the aplet library menu list Once you have entered information into an aplet, you have defined a new version of an aplet. The information is automatically saved under the current aplet name, such as “Function.” To create additional aplets of the same type, you must give the current aplet a new name.
Any modifications to the calculator not expressly approved by Hewlett-Packard could void the authority to operate the HP 39G/40G in these regions. This calculator generates, uses, and can radiate radio frequency energy and may interfere with radio and television reception.
Replacement products may be either new or like-new. 2. HP warrants to you that HP software will not fail to execute its programming instructions after the date of purchase, for the period specified above, due to defects in material and workmanship when properly installed and used.
Page 257
3. HP does not warrant that the operation of HP products will be uninterrupted or error free. If HP is unable, within a reasonable time, to repair or replace any product to a condition as warranted, you will be entitled to a refund of the purchase price upon prompt return of the product.
EXCLUDE, RESTRICT OR MODIFY AND ARE IN ADDITION TO THE MANDATORY STATUTORY RIGHTS APPLICABLE TO THE SALE OF THIS PRODUCT TO YOU. The HP 40G is packaged with a computerized algebra system (CAS). Refer to the CAS User Manual for further information. Resetting the HP 39G/40G If the calculator “locks up”...
If the calculator does not turn on If the HP 39G/40G does not turn on follow the steps below until the calculator turns on. You may find that the calculator turns on before you have completed the procedure. If the calculator still does not turn on, please contact Customer Support for further information.
(or periods in Comma mode), such as CROSS(matrix1,matrix2). The basic starting point of the calculator. Go to HOME to do calculations. For aplet management: to start, save, reset, send and receive aplets. A set of values separated by commas (periods if the Decimal Mark is Comma) and enclosed in braces.
Battery operates at 4.5V dc, 60mA maximum. Batteries When battery power is low, the (( )) annunciator stays on, even when the calculator is off. There is also a warning Reference information A choice of options given in the display.
Warning: Low Bat. The HP 39G/40G uses three AAA batteries. Be sure all three are of the same brand and type. Rechargeable batteries are not recommended because of their lower capacity and more sudden demise.
Category Graphic Library List Matrix Modes Notepad Program Real Function aplet variables The function aplet variables are: Category Plot Reference information Available name (Continued) G1...G9, G0 Function Parametric Polar Sequence Solve Statistics User-named L1...L9, L0 M1...M9, M0 Date HAngle HDigits HFormat Ierr Time...
Menu maps of the MATH menu Math functions The math functions are: Category Calculus Complex Constant Hyperb. List Loop Matrix Reference information Available name TAYLOR CONJ MAXREAL MINREAL ACOSH TANH ASINH ALOG ATANH COSH EXPM1 SINH LNP1 CONCAT REVERSE LIST SIZE MAKELIST LIST...
Page 270
Category Polynom. Prob. Real Stat-Two Symbolic Tests Trig R-16 Available name (Continued) POLYCOEF POLYFORM POLYEVAL POLYROOT COMB UTPC UTPF PERM UTPN RANDOM UTPT CEILING DEG RAD FLOOR FNROOT %CHANGE FRAC %TOTAL RAD DEG ROUND SIGN MANT TRUNCATE XPON PREDX PREDY QUAD ISOLATE QUOTE...
Program constants The program constants are: Category Angle Format SeqPlot S1...5fit StatMode StatPlot Reference information Available name Degrees Grads Radians Standard Fixed Fraction Cobweb Stairstep Linear QuadFit LogFit Cubic ExpFit Logist Power User Stat1Var Stat2Var Hist BoxW R-17...
Selected status messages The status messages are: Message Bad Argument Type Bad Argument Value Infinite Result Insufficient Memory Insufficient Statistics Data Invalid Dimension Invalid Statistics Data Invalid Syntax Name Conflict No Equations Checked Reference information Meaning Incorrect input for this operation. The value is out of range for this operation.
Page 274
Meaning (Continued) Function value, root, extremum, or intersection is not visible in the current screen. Problem with data reception from another calculator. Re-send the data. The command requires more arguments than you supplied. The global variable named does not exist.
Index absolute value 10-6 add 10-4 algebraic entry 1-18 alpha characters typing 1-6 alphabetical sorting 16-6 angle measure 1-9 in statistics 8-10 setting 1-11 animation 14-5 creating 14-5 annunciators 1-3 Ans (last answer) 1-22 antilogarithm 10-4 10-10 aplet attaching notes 16-4 clearing 16-4 copying 16-5 definition of R-6...
Page 276
calculus operations 10-8 catalogs 1-28 chronological sorting 16-6 circle drawing 14-4 clearing aplet 16-4 characters 1-21 display 1-21 display history 1-24 edit line 1-21 lists 13-6 plot 2-6 cobweb graph 6-2 coefficients polynomial 10-12 columns changing position 15-24 combinations 10-13 comma mode with matrices 13-7 commands...
Page 277
deleting aplet 16-6 lists 13-6 matrices 12-4 programs 15-9 statistical data 8-10 delimiters, programming 15-1 derivatives definition of 10-7 in Function aplet 10-24 in Home 10-23 determinant square matrix 12-10 differentiation 10-7 display 15-20 adjusting contrast 1-2 annunciator line 1-2 capture 15-20 clearing 1-2 date and time 15-26...
Page 278
fixed number format 1-10 font size change 3-8 14-5 forecasting 8-21 fraction number format 1-10 full-precision display 1-10 function analyse graph with FCN tools 3-3 definition 2-2 definition of R-6 entering 1-18 gamma 10-13 intersection point 3-4 math menu R-15 quadratic 3-4 slope 3-5 syntax 10-3...
Page 280
list arithmetic with 13-7 calculate sequence of elements 13-8 calculating product of 13-9 composed from differences 13-8 concatenating 13-8 counting elements in 13-9 creating 13-1 13-3 13-4 13-5 deleting 13-6 deleting list items 13-3 displaying 13-4 displaying list elements 13-4 editing 13-3 finding statistical values in list ele- ments 13-10...
Page 281
multiplying and dividing by scalar 12-6 multiplying by vector 12-7 multiplying row by value and adding result to second row 15-24 multiplying row number by value 15-24 negating elements 12-7 opening Matrix Editor 15-26 redimension 15-24 replacing portion of matrix or vector 15-24 sending or receiving 12-4 singular value decomposition 12-12...
Page 282
in Solve aplet 7-5 scientific 1-10 Standard 1-10 numeric precision 11-9 Numeric view adding X values 2-19 automatic 2-17 build your own table 2-19 display defining function for column 2-18 recalculating 2-19 setup 2-17 2-19 automatic 1-1 power 1-1 On/Cancel 1-1 One-Proportion Z-Interval 9-18 One-Sample T-Interval 9-20 One-Sample T-Test 9-13...
Page 283
polar variables Axes 15-30 Connect 15-30 Grid 15-31 in menu map R-11 Indep 15-32 Labels 15-33 Recenter 15-33 Ycross 15-36 polynomial coefficients 10-12 evaluation 10-12 form 10-12 roots 10-12 Taylor 10-7 polynomial functions POLYCOEF 10-12 POLYEVAL 10-12 POLYFORM 10-12 POLYROOT 10-12 position argument 15-20 power (x raised to y) 10-6 precedence 1-20...
Page 284
8-12 regulatory information Canada R-1 USA R-1 relative error statistical 8-17 resetting aplet 16-4 calculator R-4 If calculator does not turn on R-5 memory R-5 result copying to edit line 1-21 reusing 1-21 root interactive 3-9 nth 10-6 variable 15-33...
Page 285
sketches creating 14-5 creating a blank graphic 15-22 creating a set of 14-5 erasing a line 15-20 labeling 14-5 opening view 14-3 sets 14-5 storing in graphics variable 14-5 slope interactive 3-9 soft key labels 1-2 solve error messages 7-7 initial guesses 7-5 interpreting intermediate guesses interpreting results 7-6...