HP Prime Graphing Calculator User Guide Supplement
6 GeometryPreparation 1. P r e s s SK.2. On the first CAS settings page, set the number format to Standard and the number of decimal places to 4.Ope
96 Inference appMenu keys The menu key options are as follows:Prediction intervalMenu name Prediction intervalThis option calculates a prediction inte
Inference app 97Results When is tapped, the results are as follows:Menu keys The menu key options are as follows:Field nameDefinitionCThe input conf
98 Inference app
Functions and commands 993Functions and commandsMany mathematical functions are available from the calculator’s keyboard. These are described in “Keyb
100 Functions and commands– used in programming– used in the Matrix Editor– used in the List Editor– and some additional functions and commandsSee “Ct
Functions and commands 101Abbreviations used in this chapterIn describing the syntax of functions and commands, the following abbreviations and conven
102 Functions and commandsThe examples below show the results you would get in Home view. If you are in the CAS, the results are given in simplified s
Functions and commands 103efgSine, cosine, tangent. Inputs and outputs depend on the current angle format: degrees or radians.SIN(value)COS(value)TAN(
104 Functions and commandsSjSquare root. Also accepts complex numbers.)√valueExample:√320 returns 17.88854382kx raised to the power of y. Also accepts
Functions and commands 105Math menuPress D to open the Toolbox menus (one of which is the Math menu). The functions and commands available on the Math
Geometry 77. Tap a n y w h e r e o n t h e graph, press E and then press J.Notice that a point is added to the graph and given a name (B in this e
106 Functions and commandsROUND can also round to a number of significant digits if places is a negative integer (as shown in the second example below
Functions and commands 107press K. This opens the computer algebra system. If you want to return to Home view to make further calculations, press H.Mi
108 Functions and commandsCONJ(3+4*i) returns (3-4*i)Real Part Real part x, of a complex number, (x+y*i).RE(x+y*i)Example:RE(3+4*i) returns 3Imaginary
Functions and commands 109SEC Secant: 1/cosx.SEC(value)ASEC Arc secant.ASEC(value)COT Cotangent: cosx/sinx. COT(value)ACOT Arc cotangent.ACOT(value) H
110 Functions and commandsCombination The number of combinations (without regard to order) of n things taken r at a time.COMB(n,r)Example: Suppose you
Functions and commands 111Example:RANDNORM(0,1) returns a random number from the standard Normal distribution.Seed Sets the seed value on which the ra
112 Functions and commandsBinomial Binomial probability density function. Computes the probability of k successes out of n trials, each with a probabi
Functions and commands 113Cumulative distribution function. Returns the lower-tail probability of the probability density function for the value x,
114 Functions and commandsT Inverse cumulative Student's t distribution function. Returns the value x such that the Student's-t lower-tail p
Functions and commands 115MatrixThese functions work on matrix data stored in matrix variables. For more information, see the Matrices chapter of the
8 Geometrymovement of point B. To deselect point B, either press J or tap point B and press E.Note that whatever you do, point B remains constrained t
116 Functions and commandsCAS menuPress D to open the Toolbox menus (one of which is the CAS menu). The functions on the CAS menu are those most commo
Functions and commands 117factor(x^4-1) gives (x-1)*(x+1)*(x^2+1) Substitute Substitutes a value for a variable in an expression.Syntax: subst(Expr,Va
118 Functions and commandsCalculusDifferentiate With one expression as argument, returns derivative of the expression with respect to x. With one expr
Functions and commands 119Series Returns the series expansion of an expression in the vicinity of a given equality variable. With the optional third a
120 Functions and commandsGradient Returns the gradient of an expression. With a list of variables as second argument, returns the vector of partial d
Functions and commands 121F(b)–F(a) Returns F(b)–F(a).preval(Expr(F(var)),Real(a),Real(b),[Var])Example:preval(x^2-2,2,3) gives 5LimitsRiemann Sum Ret
122 Functions and commandsInverse Laplace Returns the inverse Laplace transform of an expression.ilaplace(Expr,[Var],[IlapVar])Example:ilaplace(1/(x^2
Functions and commands 123Zeros With an expression as argument, returns the real zeros of the expression; that is, the solutions when the expression i
124 Functions and commandsDifferentialEquationReturns the solution to a differential equation.deSolve(Eq,[TimeVar],Var)Example:desolve(y''+y
Functions and commands 125texpand Expands a transcendental expression.texpand(Expr)Example:texpand(sin(2*x)+exp(x+y)) returns exp(x)*exp(y)+ 2*cos(x)*
Geometry 916. Ta p a n d cho o s e Point > pointYou now need to specify the x and y coordinates of the new point. The former is defined as the
126 Functions and commandsasinx → atanx Returns an expression with asin(x) rewritten as:asin2atan(Expr)Example:asin2atan(2*asin(x)) returnssinx → cosx
Functions and commands 127Tangentatanx → asinx Returns an expression with atan(x) rewritten as:atan2asin(Expr)Example:atan2asin(atan(2*x)) returnsatan
128 Functions and commandstrigx → cosx Returns an expression simplified using the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x). Cos(x) is giv
Functions and commands 129trigexpand Returns a trigonometric expression in expanded form.trigexpand(Expr)Example:trigexpand(sin(3*x)) gives (4*cos(x)^
130 Functions and commandsGCD Returns the greatest common divisor of two or more integers.gcd(Intgr1, Intgr2,…)Example:gcd(32,120,636) returns 4 LCM R
Functions and commands 131DivisionQuotient Returns the integer quotient of the Euclidean division of two integers.iquo(Intgr1, Intgr2)Example:iquo(63,
132 Functions and commandsCoefficients Given a polynomial in x, returns a vector containing the coefficients. If the polynomial is in a variable other
Functions and commands 133CreatePoly to Coef Given a polynomial, returns a vector containing the coefficients of the polynomial. With a variable as se
134 Functions and commandsRandom Returns a vector of the coefficients of a polynomial of degree Integer and where the coefficients are random integers
Functions and commands 135Degree Returns the degree of a polynomial.degree(Poly)Example:degree(x^3+x) gives 3Factor by Degree For a given polynomial i
10 Geometry23. Between parentheses, add the name of the tangent, namely GC, and tap .Notice that the current slope is calculated and displayed. The v
136 Functions and commandsSpecialCyclotomic Returns the list of coefficients of the cyclotomic polynomial of an integer.cyclotomic(Integer)Example:cyc
Functions and commands 137Lagrange Given a vector of abscissas and a vector of ordinates, returns the Lagrange polynomial for the points specified in
138 Functions and commandsPlotFunction Used to define a function graph in the Symbolic view of the Geometry app. Plots the graph of an expression writ
Functions and commands 139Function app functionsThe Function app functions provide the same functionality found in the Function app's Plot view u
140 Functions and commandsSolve app functionsThe Solve app has a single function that solves a given equation or expression for one of its variables.
Functions and commands 141The syntax for many, but not all, the spreadsheet functions follows this pattern:functionName(input,[optional parameters])In
142 Functions and commandsAVERAGE Calculates the arithmetic mean of a range of numbers.AVERAGE([input])For example, AVERAGE(B7:B23) returns the arithm
Functions and commands 143STAT1 The STAT1 function provides a range of one-variable statistics. It can calculate all or any of , Σ, Σ², s, s², σ, σ²,
144 Functions and commandsFor example if you specify "h n Σ x", the first column will contain row headers, the first row will be the number
Functions and commands 1457y= L/(1 + a*exp(b*x))8 y= a*sin(b*x+c)+d9y= cx^2+bx+a10 y= dx^3+cx^2+bx+a11y= ex^4+dx^3+cx^2+bx+a• Configuration: a string
Geometry 1131. Tap p o i n t B and then press E to select it.32.Use the cursor keys to move point B along the graph. Note that with each move, the r
146 Functions and commandsPredY Returns the predicted Y for a given x.PredY(mode, x, parameters)• Mode governs the regression model used:1 y= sl*x+int
Functions and commands 147HypZ1mean The one-sample Z-test for a mean. HypZ1mean( , n,μ0,σ,α,mode, [”configuration”])The input parameters can be a rang
148 Functions and commandsMode: Specifies which alternative hypothesis to use:• 1: μ1 < μ2• 2: μ1 > μ2• 3: μ1 ≠ μ2• Configuration: a string that
Functions and commands 149• Configuration: a string that controls what results are shown and the order in which they appear. An empty string "&qu
150 Functions and commands• prob: the lower-tail probability• cZ: The critical Z-value associated with the input α-level• cp1: The lower critical valu
Functions and commands 151HypT2mean The two-sample T-test for the difference of two means.HypT2mean((x1,x2,s1,s2, n1,n2, α,pooled,mode,[”configuration
152 Functions and commands• h: header cells will be created• Z: the critical Z-value• zXl: the lower bound of the confidence interval• zXh: the upper
Functions and commands 153• zXh: the upper bound of the confidence interval• zXm: the midpoint of the confidence interval• std: the standard deviation
154 Functions and commandsExample:ConfT1mean(0.461368, 0.2776, 50, 0.95, "")ConfT2mean The two-sample Student’s T confidence interval for th
Functions and commands 155Do1VStats Do1-variable statistics. Performs the same calculations as tapping in the Numeric view of the Statistics 1Var app
12 Geometryderivative of 3sin(x). Tap point B and then press E to deselect it.Plot view in detailIn Plot view you can directly draw objects on the scr
156 Functions and commandsStatistics 2Var app functionsThe Statistics 2Var app has a number of functions. Some are designed to calculate summary stati
Functions and commands 157SetIndep Set independent column. Sets the independent column for one of the statistical analyses S1-S5 to one of the column
158 Functions and commandsExample:HypZ1mean(0.461368, 50, 0.5, 0.2887, 0.05, 1) returns {1, -.9462…, 0.4614, 0.8277…, 1.6448…, 0.5671…}HYPZ2mean The t
Functions and commands 159Mode: Specifies which alternative hypothesis to use:• 1: π < π0• 2: π > π0• 3: π ≠ π0Example:HypZ1prop(21, 50, 0.5, 0.
160 Functions and commandsMode: Specifies which alternative hypothesis to use:• 1: μ < μ0• 2: μ > μ0• 3: μ ≠ μ0Example:HypT1mean(0.461368, 0.277
Functions and commands 161ConfZ1mean The one-sample Normal confidence interval for a mean. Returns a list containing (in order):• The lower critical Z
162 Functions and commandsConfZ2prop The two-sample Normal confidence interval for the difference of two proportions. Returns a list containing (in or
Functions and commands 163of expected counts. Returns a list containing the chi-square statistic value, the probability, and the degrees of freedom.Ch
164 Functions and commandsLinRegrTConfInt The linear regression confidence interval for the intercept. Given a list of explanatory variable data (X),
Functions and commands 165Example: LinRegrTMeanResp({1, 2, 3, 4}, {3, 2, 0, -2}, 2.5, 0.95) returns {2.5, 0.95, 4.302..., 2, 0.75, 0.193..., −0.083, 1
Geometry 13objects in the bottom right corner of the display. You can select any or all of these objects by pressing E. You can tap the screen and the
166 Functions and commands• r: the correlation coefficient• R2: the coefficient of determinationThe values for AltHyp are as follows:• AltHyp=0 for μ&
Functions and commands 167The arguments PPYR, CPYR, and BEG are optional; if not supplied, PPYR=12, CPYR=PPYR, and BEG=0.CalcFV Solves for the future
168 Functions and commandsExample:DoFinance(FV) returns the future value of an investment in the same way as tapping in the Numeric view of the Finan
Functions and commands 169command name. These commands all return a list of the three unknown values (lengths of sides and/or measures of angles).AAS
170 Functions and commandsExample:SSA(1, 2, 30) returns {1.732…, 90, 60}SSS Side-Side-Side Takes as arguments the lengths of the three sides of a tria
Functions and commands 171Quadratic Explorer functionsSOLVE Solve quadratic. Given the coefficients of a quadratic equation ax2+bx+c=0, returns the re
172 Functions and commandsF1(X) is drawn in the Plot view and has a column of function values in the Numeric view of the Function app. With another ap
Functions and commands 173commands” on page 39, and those specific to programming are described in “Program commands” on page 267.Some of the options
174 Functions and commands.* List or matrix multiplication symbol. Returns the term-by-term multiplication of two lists or two matrices.List1.*List2 o
Functions and commands 175> Strict greater than inequality test. Returns 1 if the left side of the inequality is greater than the right side, and 0
14 Geometrythe slider. You can set the speed and pause for the animation, as well as its type. To start or stop an animation, select it, tap , and the
176 Functions and commandsAND Logical And. Returns 1 if the left and right sides both evaluate to true and returns 0 otherwise.Expr1 AND Expr2Example:
Functions and commands 177canonical_form Returns a second degree trinomial in canonical form.canonical_form(Trinomial,[Var])Example:canonical_form(2*x
178 Functions and commandsExample:col returns [2,5,8]colDim Returns the number of columns of a matrix.colDim(Matrix)Example:colDim returns 3comDenom R
Functions and commands 179With two additional complex numbers as third and fourth arguments, returns a matrix as described for two arguments, but only
180 Functions and commandsBoolean test, each element in the vector or matrix is tested and the number of elements that pass the test is returned.count
Functions and commands 181Example:crationalroot(2*x^3+(-5-7*i)*x^2+(-4+14*i)*x+8-4*i) returns cumSum Accepts as argument either a list or a vector and
182 Functions and commandsDirac Returns the value of the Dirac delta function for a real number.Dirac(Real)Example:Dirac(1) gives 0e Enters the mathem
Functions and commands 183eigVl Returns the Jordan matrix associated with a matrix when the eigenvalues are calculable.eigVl(Matrix)EVAL Evaluates an
184 Functions and commandsexponential_regressionGiven a set of points, returns a vector containing the coefficients a and b of y=b*a^x, the exponentia
Functions and commands 185Examples: factorial(4) returns 24factorial(1.2) returns 1.10180249088fMax Given an expression in x, returns the value of x f
Geometry 15circle and D are deleted, but the defining points—the center and radius points—remain.Clearing all objectsTo clear the app of all geometric
186 Functions and commandsfsolve Returns the numerical solution of an equation or a system of equations. With the optional third argument you can spec
Functions and commands 187Example:gramschmidt returns halftan2hypexp Returns an expression with sine, cosine, and tangent rewritten in terms of half-
188 Functions and commandsHeaviside Returns the value of the Heaviside function for a given real number (i.e. 1 if x>=0, and 0 if x<0).Heaviside
Functions and commands 189identity Given an integer n, returns the identity matrix of dimension n.identity(Integer)Example:identity(3) returns iegcd R
190 Functions and commandsiquorem Returns the Euclidean quotient and remainder of two integers.iquorem(Integer1, Integer2)Example:iquorem(63, 23) retu
Functions and commands 191lgcd Returns the greatest common divisor of a set of integers or polynomials, contained in a list, a vector, or just entered
192 Functions and commandsExample:list2mat({1,8,4,9},1) returns lname Returns a list of the variables in an expression. lname(Expr)Example:lname(exp(x
Functions and commands 193Example:logistic_regression([0.0,1.0,2.0,3.0,4.0],0.0,1.0) gives [-17.77/(1+exp(-0.496893925384*x+2.82232341488+3.1415926535
194 Functions and commandsExample:matpow([[1,2],[3,4]],n) gives [[(sqrt(33)-3)*((sqrt(33)+5)/2)^n*-6/(-12*sqrt(33))+(-(sqrt(33))-3)*((-(sqrt(33))+5)/2
Functions and commands 195MINREAL Returns the minimum real number (closest to zero) that the HP Prime calculator is capable of representing in Home an
Legal noticesThe information contained herein is subject to change without notice. The only war-ranties for HP products and services are set forth in
16 GeometryPlot view: buttons and keysButton or key Purpose Opens the Commands menu. See “Plot view: Cmds menu” on page 23.Opens the Options menu for
196 Functions and commandsExample:mult_conjugate returns nDeriv Given an expression, a variable of differentiation, and a real number h, returns an a
Functions and commands 197OR Logical Or. Returns 1 if either or both sides evaluates to true and 0 otherwise.Expr1 OR Expr2Example:3 +1==4 OR 8 < 5
198 Functions and commandsplotinequationShows the graph of the solution of inequations with 2 variables. plotinequation(Expr,[x=xrange,y=yrange],[xste
Functions and commands 199polygonplot Used in the Geometry app Symbolic view. Given an n × m matrix, draws and connects the points (xk, yk), where xk
200 Functions and commandspotential Returns a function whose gradient is the vector field defined by a vector and a vector of variables.potential(Vect
Functions and commands 201With a matrix as the first argument, returns the element-by-element product of the matrix.product(Expr, Var, Min, Max, Step)
202 Functions and commandsquartile1 Given a list or vector, returns the first quartile of the elements of the list or vector. Given a matrix, returns
Functions and commands 203QUOTE Returns an expression unevaluated.quote(Expr)randexp Given a positive real number, returns a random real number accord
204 Functions and commandsExample:reduced_conic(x^2+2*x-2*y+1) returnsref Performs Gaussian reduction of a matrix. ref(Matrix)Example:ref returns rem
Functions and commands 205Example:resultant(x^3+x+1, x^2-x-2,x) returns -11revlist Reverses the order of the elements in a list or vector.revlist(List
Geometry 17The Options menuWhen you select an object, a new menu key appears: . Tap this key to view and select options for the selected object, such
206 Functions and commandsrowSwap Given a matrix and two integers, returns the matrix obtained from the given matrix after swapping the two rows indic
Functions and commands 207items of the above nature, solves the system of recurrent sequences.seqsolve(Expr, Vector, Condition) or seqsolve(List1, Lis
208 Functions and commandsspline Given two lists or vectors (one for the x-values and one for the y-values), as well as a variable and an integer degr
Functions and commands 209Example:sturmseq(x^3-1,x) gives [1 [[1 0 0 -1] [3 0 0] 9] 1]subMat Extracts from a matrix a sub matrix whose diagonal is def
210 Functions and commandstail Given a list, string, or sequence of objects, returns a vector with the first element deleted.tail(List) or tail(Vector
Functions and commands 211type Returns the type of an expression (e.g. list, string).type(Expr)Example:type("abc") gives DOM_STRINGunapply R
212 Functions and commandsExample:0 XOR 1 returns 1zip Applies a bivariate function to the elements of two lists or vectors and returns the results in
Functions and commands 213expression vari Inserts the imaginary number i.–1Returns the inverse of an expression.(Expr)–1Creating your own functionsY
214 Functions and commands5. Tap .You can run your function by entering it on the entry line in Home view, or be selecting it from the USER menu. You
Variables 2154VariablesVariables are objects that have names and contain data. They are used to store data, either for later use or to control setting
18 GeometryPlot Setup viewThe Plot Setup view enables you to configure the appearance of Plot view.The fields and options are as follows:•X Rng: There
216 Variablesyou evaluate that result (using the EVAL command), the CAS will now return {2,4,6}.User variables are explicitly created by the user. You
Variables 217Working with user variablesExample 2: Create a variable called ME and assign π2 to it.1. P r e s s H to display Home view.2. Assign π2
218 VariablesEntering HAngle:=0 E forces the setting to return to radians.You can see what value has been assigned to a variable—whether Home, app, or
Variables 219Qualifying variablesSome app variable names are shared by multiple apps. For example, the Function app has a variable named Xmin, but so
220 VariablesHome variablesThe Home variables are accessed by pressing a and tapping .Category Names Real A to Z and θFor example, 7.45 AComplex Z0
Variables 221App variablesThe app variables are accessed by pressing a and tapping . They are grouped below by app. Note that if you have customized
222 VariablesFunction app. The app function EXTREMUM does not store results to this variable.Isect Contains the value from the last use of the Isect f
Variables 223Spreadsheet app variablesSolve app variablesCategory NamesNumeric ColWidthRowCellRowHeightColModes AAngleAComplexADigitsAFormatCategory N
224 VariablesAdvanced Graphing app variablesCategory NamesSymbolic V1V2V3V4V5V6V7V8V9V0Plot AxesCursorGridDotsGridLinesLabelsRecenterXmaxXminXtickXzoo
Variables 225Statistics 1Var app variablesCategory NamesResults [explained below]NbItemMinValQ1MedValQ3MaxValΣXΣX2MeanXsXσXserrXSymbolic H1H2H3H4H5H1T
Geometry 19Symbolic view in detailEvery object—whether a point, segment, line, polygon, or curve—is given a name, and its definition is displayed in S
226 VariablesResultsNbItem Contains the number of data points in the current 1-variable analysis (H1-H5).MinVal Contains the minimum value of the data
Variables 227Statistics 2Var app variablesCategory NamesResults[explained below]NbItemCorrCoefDetsCovσCovΣXYMeanXΣXΣX2sXσXserrXMeanYΣYΣY2sYσYserrYSymb
228 VariablesResultsNbItem Contains the number of data points in the current 2-variable analysis (S1-S5).Corr Contains the correlation coefficient fro
Variables 229ΣY Contains the sum of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5).ΣY2 Contains the sum of the square
230 VariablesNumericAlphaConfExpListMean1Mean2n1n2μ0π0ObsListObsMatPooleds1s2σ1σ2x1x2XlistYlistXvalModes AAngleAComplexADigitsAFormatCategory Names
Variables 231ResultsCoefDet Contains the value of the coefficient of determination.ContribList Contains a list of the chi-square contributions by cate
232 VariablesserrLine Contains the standard error of the line for the linear t-test.serrSlope Contains the standard error of the slope for either the
Variables 233Parametric app variablesCategory Names Symbolic X1Y1X2Y2X3Y3X4Y4X5Y5X6Y6X7Y7X8Y8X9Y9X0Y0Plot AxesCursorGridDotsGridLinesLabelsMethodRecen
234 VariablesPolar app variablesFinance app variablesCategory Names Symbolic R1R2R3R4R5R6R7R8R9R0Plot θminθmaxθstepAxesCursorGridDotsGridLinesLabelsMe
Variables 235Linear Solver app variablesTriangle Solver app variablesLinear Explorer app variablesQuadratic Explorer app variablesCategory NamesNumeri
20 GeometryThe object-creation commands available in Symbolic view can be seen by tapping . The syntax for each command is given in “Geometry functio
236 VariablesTrig Explorer app variablesSequence app variablesCategory NamesModes AAngleAComplexADigitsAFormatCategory Names Symbolic U1U2U3U4U5U6U7U8
Programming in HP PPL 2375Programming in HP PPL This chapter describes the HP Prime Programming Language (HP PPL). In this chapter you’ll learn about:
238 Programming in HP PPLSome built-in commands employ an alternative syntax whereby function arguments do not appear in parentheses. Examples include
Programming in HP PPL 239Open the Program CatalogPress Sx (Program) to open the Program Catalog.The Program Catalog displays a list of program names.
240 Programming in HP PPLSave creates a copy of the selected program with a new name you are prompted to give.Rename renames the selected program.Sort
Programming in HP PPL 241Creating a new programIn the following few sections, we will create a simple program that counts to three as an introduction
242 Programming in HP PPLThe Program EditorUntil you become familiar with the HP Prime commands, the easiest way to enter commands is to select them f
Programming in HP PPL 243Press J to return to the main menu.The commands in this menu are described in “Commands under the Cmds menu”, beginning on pa
244 Programming in HP PPL1. To c o n t i n u e t h e MYPROGRAM example (which we began on page 241), use the cursor keys to position the cursor wher
Programming in HP PPL 245In this example we’ll select a LOOP command from the menu.3. Select Loop and then select FOR from the sub-menu. Notice that a
Geometry 21automatically updated to reflect the new properties of that object. Consider circle C in the illustration at the right. To calculate the ar
246 Programming in HP PPL8. Fill in the arguments of the MSGBOX command, and type a semicolon at the end of the command (S+).9. Tap to check the syn
Programming in HP PPL 2474. Tap three times to step through the FOR loop. Notice that the number shown increments by 1 each time.After the program te
248 Programming in HP PPL1. In the Program Catalog, select MYPROGRAM.SxSelect MYPROGRAM 2. Tap . If there is more than one EXPORT function in a file,
Programming in HP PPL 249The message box appears. Note that when each message box is displayed, you still have to dismiss it by tapping or pressing
250 Programming in HP PPL: Cut the selection. : Copy the selection.4. Select what you want to copy or cut (using the options listed immediately above)
Programming in HP PPL 251To share a programYou can send programs between calculators just as you can send apps, notes, matrices, and lists. The HP Pri
252 Programming in HP PPLpage 215.)In a program you can declare variables for use only within a particular function. This is done using a LOCAL declar
Programming in HP PPL 253Note that EXPORT command for the variable RADIUS appears before the heading of the function where RADIUS is assigned. After y
254 Programming in HP PPLProgram ROLLDIE We’ll first create a program called ROLLDIE. It simulates the rolling of a single die, returning a random in
Programming in HP PPL 255L2(roll)+1 ▶ L2(roll);END;END;By omitting the EXPORT command when a function is declared, its visibility can be restricted to
22 GeometryNote that the syntax used here is the same as you use in the CAS to calculate the properties of geometric objects. The Geometry functions a
256 Programming in HP PPLFOR k FROM 1 TO n DOROLLDIE(sides)+ROLLDIE(sides) ▶ roll;results(roll)+1 ▶ results(roll);END;RETURN results;END;ROLLDIE(N)BEG
Programming in HP PPL 257To activate persistent user mode, press SWSW. Notice that U appears in the title bar. The user keyboard will now remain acti
258 Programming in HP PPLTipA quick way to write a program to re-assign a key is to press Z and select Create user key when you are in the Program Edi
Programming in HP PPL 259.K_Dot KS_Dot KA_Dot KSA_Dot\K_Down KS_Down KA_Down KSA_DownEK_Enter KS_Enter KA_Enter KSA_EnterHK_Home KS_Home KA_Home KSA_H
260 Programming in HP PPLApp programsAn app is a unified collection of views, programs, notes, and associated data. Creating an app program allows you
Programming in HP PPL 261Using dedicated program functionsThere are nine dedicated program function names, as shown in the table below. These function
262 Programming in HP PPLCustomizing an appWhen an app is active, its associated program appears as the first item in the Program Catalog. It is withi
Programming in HP PPL 2631. In the Application Librray, select the Statistics 1Var app but don’t open it.I Select Statistics 1Var.2. Tap . 3. Enter a
264 Programming in HP PPLThese views will be activated by pressing M and P, but the function Plot() in our app program will actually launch the latter
Programming in HP PPL 265 FOR k FROM 1 TO ROLLS DO roll:=ROLLDIE(SIDES)+ROLLDIE (SIDES); D2(roll-1):= D2(roll-1)+1; END; Xmin:= -0.1; Xmax:=
Geometry 23Editing a calculation1. Highlight the calculation that you want to edit.2. Tap to change the calculation or tap to change the label.3.
266 Programming in HP PPLBEGIN Xmin:=-0.1; Xmax:= MAX(D1)+1; Ymin:= −0.1; Ymax:= MAX(D2)+1; STARTVIEW(1,1);END;Symb()BEGIN SetSample(H1,D1); Se
Programming in HP PPL 2672. Press V to see the custom app menu. Here you can reset the app (Start), set the number of sides of the dice, the number of
268 Programming in HP PPLCommands under the Tmplt menuBlockThe block commands determine the beginning and end of a sub-routine or function. There is a
Programming in HP PPL 269CASE Syntax: CASE IF test1 THEN commands1 END;IF test2 THEN commands2 END;…[DEFAULT commands]END;Evaluates test1. If true, ex
270 Programming in HP PPLExample 1: This program determines which integer from 2 to N has the greatest number of factors.EXPORT MAXFACTORS(N)BEGINLOCA
Programming in HP PPL 271RECT();xincr := (Xmax - Xmin)/318;yincr := (Ymax - Ymin)/218;FOR X FROM Xmin TO Xmax STEP xincr DOFOR Y FROM Ymin TO Ymax STE
272 Programming in HP PPL END; d+1▶ d; END; RETURN sum==n;END;The following program displays all the perfect numbers up to 1000:EXPORT PERFECTNUMS(
Programming in HP PPL 273VariableThese commands enable you to control the visibility of a user-defined variable.LOCAL Local.Syntax: LOCAL var1,var2,…v
274 Programming in HP PPLExport X2M1(X)BEGINRETURN X^2-1;END; VIEW Syntax: VIEW “text”, functionname();Replaces the View menu of the current app and a
Programming in HP PPL 275Returns the number of characters in string.Example: DIM("12345") returns 5, DIM("""") and DIM(&
24 Geometryentered using a keyboard shortcut. For example, you can select the triangle drawing tool by pressing n. See “Plot view: buttons and keys” o
276 Programming in HP PPLReturns the last n characters of string str. If n <= 0, returns empty string. If n > DIM(str), returns strExample: RIGH
Programming in HP PPL 277DrawingThere are 10 built-in graphics variables in the HP Prime, called G0–G9. G0 is always the current screen graphic.G1 to
278 Programming in HP PPLReturns an integer number that can be used as the color parameter for a drawing function, based on Red-, Green- and Blue-comp
Programming in HP PPL 279Copies the region of srcGRB between point sx1, sy1 and sx2, sy2 into the region of trgtGRB between points dx1, dy1 and dx2, d
280 Programming in HP PPLFILLPOLY_PFILLPOLY Syntax: FILLPOLY_P([G],{(x1, y1), (x2, y2),…(xn, yn)}, Color, [Alpha])FILLPOLY([G],{(x1, y1), (x2, y2),…(x
Programming in HP PPL 281GROBW_PGROBW Syntax: GROBW(G) GROBW_P(G)Returns the width of G.G can be any of the graphics variables and is optional. The de
282 Programming in HP PPLThe advanced form of LINE_P allows the multiple lines to be rendered at the same time with a potential 3D transformation of t
Programming in HP PPL 283If zstring is provided, per pixel z clipping happens using the z value string (see the following).LINE_P returns a string tha
284 Programming in HP PPLG can be any of the graphics variables and is optional. The default is G0, the current graphic.x1, y1 are optional. The defau
Programming in HP PPL 285EXPORT BOX()BEGINRECT();RECT_P(40,90,320,240,#000000,#FF0000);WAIT;END;SUBGROB_PSUBGROB Syntax: SUBGROB(srcGRB [ ,x1, y1, x2,
Geometry 25Random Points Press E to randomly create a point in Plot view. Continue pressing E to create more random points. Press J when you are done.
286 Programming in HP PPLc1 can be any color specified as #RRGGBB. The default is black (#000000).width is optional and if not specified, no clipping
Programming in HP PPL 287TRIANGLE_PTRIANGLE Syntax: TRIANGLE_P([G], x1, y1, x2, y2, x3, y3, c1, [c2, c3], [Alpha], ["ZString", z1, z2, z3])
288 Programming in HP PPLNote that {Color, [Alpha], triangle_1, ..., triangle_n} is also a valid form to avoid respecifying the same color for each tr
Programming in HP PPL 289MatrixSome matrix commands take as their argument the matrix variable name on which the command is applied. Valid names are t
290 Programming in HP PPLnumber. REPLACE also works with lists, graphics, and strings. For example, REPLACE("123456", 2, "GRM") -&
Programming in HP PPL 291Starts the nth view of the current app. If draw? is true (that is, not 0), it will force an immediate redrawing of the screen
292 Programming in HP PPLDiceSimulation program” on page 264.IntegerBITAND Syntax: BITAND(int1, int2, … intn)Returns the bitwise logical AND of the sp
Programming in HP PPL 293B→R Syntax: B→R(#integerm)Converts an integer in base m to a decimal integer (base 10). The base marker m can be b (for binar
294 Programming in HP PPLI/OI/O commands are used for inputting data into a program, and for outputting data from a program. They allow users to inter
Programming in HP PPL 295EDITLIST Syntax: EDITLIST(listvar)Starts the List Editor loading listvar and displays the specified list. If used in programm
About this guideThe information in this guide updates the information in the following chapters of the HP Prime Calculator User Guide:•Geometry•Infere
26 GeometryAltitude Tap on a point (A) and press E. Tap on a segment and press E. A line is drawn through the point (A) perpendicular to the segment (
296 Programming in HP PPLINPUT Syntax: INPUT(var,[“title”], [“label”], [“help”], [reset_value][initial_value])INPUT({vars},[“title”], [{“labels”}], [{
Programming in HP PPL 297ISKEYDOWN Syntax: ISKEYDOWN(key_id); Returns true (non-zero) if the key whose key_id is provided is currently pressed, and fa
298 Programming in HP PPLPRINT Syntax: PRINT(expression or string);Prints the result of expression or string to the terminal.The terminal is a program
Programming in HP PPL 299More%CHANGE Syntax: %CHANGE(x,y)The percentage change in going from x to y.Example: %CHANGE(20,50) returns 150.%TOTAL Syntax:
300 Programming in HP PPLsecond list. The plus operator between them adds the two elements until there are no more pairs. With two lists, the numbers
Programming in HP PPL 301TYPE Syntax: TYPE(object)Returns the type of the object:0: Real1: I n t e g e r2: String3: Complex4: Matrix5: Error6: List8:
302 Programming in HP PPLvariables represent the definitions and settings you make when working with apps interactively. As you work through an app, t
Programming in HP PPL 303App variablesNot all app variables are used in every app. S1Fit, for example, is only used in the Statistics 2Var app. Howeve
304 Programming in HP PPLGridLines Turns the background line grid in Plot View on or off. In Plot Setup view, check (or uncheck) GRID LINES. In a prog
Programming in HP PPL 305Nmin/NmaxSequenceDefines the minimum and maximum values for the independent variable.Appears as the N RNG fields in the Plot
Geometry 27Parallelogram Tap at one vertex and press E. Tap at another vertex and press E. Tap at a third vertex and press E. The location of the four
306 Programming in HP PPLθmin/θmaxPolarSets the minimum and maximum independent values. In Plot Setup view enter values for θ Rng.In a program, type:
Programming in HP PPL 307Xmin/Xmax Sets the minimum and maximum horizontal values of the plot screen. In Plot Setup view, enter values for X Rng.In a
308 Programming in HP PPLSymbolic view variablesAltHypInferenceDetermines the alternative hypothesis used for hypothesis testing. In Symbolic View, se
Programming in HP PPL 309H1Type...H5TypeStatistics 1VarSets the type of plot used to graphically represent the statistical analyses H1 through H5. In
310 Programming in HP PPLS1Type...S5TypeStatistics 2VarSets the type of fit to be used by the FIT operation in drawing the regression line. From Symbo
Programming in HP PPL 311With Method=1, the constants and their meanings are as follows:0 Z-Int:1 1 Z-Int:2 Z-Int:1 3 Z-Int:4 T-Int:1 5 T-Int:With Met
312 Programming in HP PPLNumeric view variablesC0...C9Statistics 2VarContain lists of numerical data. In Numeric view, enter numerical data in C0 thro
Programming in HP PPL 313NumYStartAdvanced GraphingSets the starting value for the Y-values in a table in Numeric view.From Numeric Setup view, enter
314 Programming in HP PPLNumXZoomAdvanced GraphingSets the zoom factor for the values in the X column in the Numeric view.From Numeric Setup view, typ
Programming in HP PPL 315Mean1Sets the value of the mean of a sample for a 1-mean hypothesis test or confidence interval. For a 2-mean test or interva
28 GeometryRegular PolygonDraws a regular polygon given the first two vertices and the number of sides, where the number of sides is greater than 1. I
316 Programming in HP PPLπ0Sets the assumed proportion of successes for the One-proportion Z-test. From the Numeric view, set the value of π0.In a pro
Programming in HP PPL 317σ1Sets the population standard deviation for a hypothesis test or confidence interval. For a test or interval involving the d
318 Programming in HP PPLFinance app variablesThe following variables are used by the Finance app. They correspond to the fields in the Finance app Nu
Programming in HP PPL 319PMT Payment value. Sets the value of each payment in a cash flow. From the Numeric view of the Finance app, enter a value for
320 Programming in HP PPLwhere matrix is either a matrix or the name of one of the matrix variables M0-M9.Triangle Solver app variablesThe following v
Programming in HP PPL 321The value of this variable will be interpreted according to the angle mode setting (Degrees or Radians). From the Triangle So
322 Programming in HP PPLRECT Corresponds to the status of in the Numeric view of the Triangle Solver app. Determines whether a general triangle solv
Programming in HP PPL 323HComplex Sets the complex number mode for the Home view. In Home Settings, check or uncheck the Complex field. Or, in a progr
324 Programming in HP PPLEntry Contains an integer that indicates the entry mode. In Home Settings, select an option for Entry.In a program, enter:0
Programming in HP PPL 325Symbolic Setup variablesThe following variables are found in the Symbolic setup of an app. They can be used to overwrite the
Geometry 29Tap at each vertex of the triangle, pressing E after each tap. The excircle is drawn tangent to the side defined by the last two vertices t
326 Programming in HP PPLAFormat Defines the number display format used for number display in the Home view and to label axes in the Plot view.From Sy
Index 327IndexAAdvanced Graphing appvariables, summary of 224algebra functions 116–117alternative hypothesis 72antilogarithmcommon 102natural 102appco
328 Indexcommon 171creating your own 213Finance app 166–168Function app 139geometric 39–68hyperbolic 109Inference app 157–162integer 129–131keyboard 1
Index 329variables 220local variables 252logarithmicfunctions 102loop commands 269, 270–272MMath menu 105–115matricescommands 289–290swap row 290varia
330 IndexSolve appfunctions 140variables, summary of 223solve functions 122–124Spreadsheet appfunctions 140–154variables 223Statistics 1Varfunctions 1
30 GeometryIn the example at the right, circle C has been drawn and point D is a point placed on C (using the Point On function described above). Poin
Geometry 31Example: plotfunc(3*sin(x)) draws the graph of y=3*sin(x)Parametric Syntax: plotparam(f(Var)+i*g(Var), Var= Start..Stop, [tstep=Value])Take
32 GeometryExample:plotseq(1-x/2, x={3 -1 6}, 5) plots y=x and y=1–x/2 (from x=–1 to x=6), then draws the first 5 terms of the cobweb plot for u(n)=1-
Geometry 33List Syntax: plotlist(Matrix 2xn)Plots a set of n points and connects them with segments. The points are defined by a 2xn matrix, with the
34 GeometryReflection A reflection is a transformation which maps an object or set of points onto its mirror image, where the mirror is either a point
Geometry 354. Press P to return to Plot view to see the rotated square.Dilation A dilation (also called a homothety or uniform scaling) is a transform
36 Geometry3. Tap the point that is to be projected and press E. Note the new point added to the target object.Inversion An inversion is a mapping inv
Geometry 373. Tap a point and press E to see its polar line.4. Tap a line and press E to see its pole.In the illustration to the right, point K is the
38 GeometryRadius Tap a circle and press E to select it. The radius of the circle is displayed.Perimeter Tap a circle and press E to select it. The pe
Geometry 39its result. The test returns 1 if the objects are parallel; otherwise, it returns 0.Perpendicular Tap a straight object (segment, line, and
40 GeometryThe sample syntax provided has been simplified. Geometric objects are referred to by a single uppercase character (such as A, B,C and so on
Geometry 41PointPointCreates a point, given the coordinates of the point. Each coordinate may be a value or an expression involving variables or measu
42 GeometryCenterSyntax: center(Circle)Plots the center of a circle. The circle can be defined by the circle command or by name (for example, GC).Exam
Geometry 43LineDraws a line. The arguments can be two points, a linear expression of the form a*x+b*y+c, or a point and a slope as shown in the exampl
44 Geometryperpendicular(3+2i,line(x–y=1)) draws a line through the point whose coordinates are (3, 2) that is perpendicular to the line whose equatio
Geometry 45Examples:bisector(A,B,C) draws the bisector of ∡ BAC.bisector(0,-4i,4) draws the line given by y=–xPolygonTriangleDraws a triangle, given i
Contents 1Contents1GeometryGetting started with the Geometry app ... 5Plot view in detail...
46 GeometryQuadrilateralDraws a quadrilateral from a set of four points.quadrilateral(point1, point2, point3, point4)Example:quadrilateral(GA, GB, GC,
Geometry 47rectangle(point1, point2, point3) or rectangle(point1, point2, realk)Examples:rectangle(GA, GB, GE) draws a rectangle whose first two verti
48 Geometrycomputed automatically and are saved into the CAS variables p and q.CurveCircleDraws a circle, given the endpoints of the diameter, or a ce
Geometry 49IncircleAn incircle is a circle that is tangent to each of a polygon’s sides. The HP Prime can draw an incircle that is tangent to the side
50 GeometryParabolaDraws a parabola, given a focus point and a directrix line, or the vertex of the parabola and a real number that represents the foc
Geometry 51plots the parametric equation over the interval specified in the second argument.Syntax: plotparam(f(Var)+i*g(Var), Var= Start..Stop, [tste
52 GeometryExample: plotimplicit((x+5)^2+(y+4)^2-1) plots a circle, centered at the point (-5, -4), with a radius of 1SlopefieldPlots the graph of the
Geometry 53Example: plotlist([[0,3],[2,1],[4,4],[0,3]]) draws a triangleSliderCreates a slider bar that can be used to control the value of a paramete
54 GeometryExample:rotate(GA, angle(GB, GC, GD),GK) rotates the geometric object labeled K, about point A, through an angle equal to ∡ CBD.DilationDil
Geometry 55In general, the inversion of point A through center C, with scale factor k, maps A onto A’, such that A’ is on line CA and CA*CA’=k, where
2 Contents3 Functions and commandsKeyboard functions...101Math menu ...
56 GeometryCoordinatesGiven a vector of points, returns a matrix containing the x- and y-coordinates of those points. Each row of the matrix defines o
Geometry 57if GA is the point at (0, 0) and GB is defined as plotfunc(4–x^2/4), then distance (GA, GB) returns 3.464… or 2√3.RadiusReturns the radius
58 GeometryExamples:If GA is defined to be the unit circle, then area(GA) returns π.area(4-x^2/4, -4,4) returns 14.666…AngleReturns the measure of a d
Geometry 59On circleTakes a set of points as argument and tests if they are all on the same circle. Returns 1 if the points are all on the same circle
60 GeometryExample:is_isoscelesl(point(0,0), point(4,0), point(2,4)) returns 3.EquilateralTakes three points and tests whether or not they are vertice
Geometry 61Example:if GA is a point at (1, –2), then affix(GA) returns 1–2i.barycenterCalculates the hypothetical center of mass of a set of points, e
62 Geometryequilateral_triangleDraws an equilateral triangle defined by one of its sides; that is, by two consecutive vertices. The third point is cal
Geometry 63harmonic_conjugateReturns the harmonic conjugate of 3 points. Specifically, returns the harmonic conjugate of point3 with respect to point1
64 GeometryExample:is_harmonic(point(0, 0), point(3, 0), point(4, 0), point(12/5, 0)) returns 1is_harmonic_circle_bundleReturns 1 if the circles build
Geometry 65is_rhombusTests whether or not a set of four points are vertices of a rhombus. Returns 0 if they are not, 1 if they are, and 2 if they are
Contents 3Statistics 1Var app variables... 225Statistics 2Var app variables...
66 GeometryorthocenterReturns the orthocenter of a triangle; that is, the intersection of the three altitudes of a triangle. The argument can be eithe
Geometry 67poleReturns the pole of the given line with respect to the given circle.pole(circle, line)Example:pole(circle(x^2+y^2=1), line(x=3)) return
68 GeometryverticesReturns a list of the vertices of a polygon.vertices(polygon)vertices_abcaReturns the closed list of the vertices of a polygon.vert
Inference app 692Inference appThe Inference app calculates hypothesis tests, confidence intervals, and chi-square tests, in addition to both tests and
70 Inference appGetting started with the Inference appLet’s conduct a Z-Test on one mean using the sample data.Open the Inference app1. Open the Infer
Inference app 71If you choose one of the hypothesis tests, you can choose an alternative hypothesis to test against the null hypothesis. For each test
72 Inference appfor an alternative hypothesis based on a quantitative comparison of two quantities. The null hypothesis is always that the two quantit
Inference app 73The table below describes the fields in this view for the sample data.The Numeric view is where you enter the sample statistics and po
74 Inference appPlot the test results7. Display a graphical view of the test results: PThe graph of the distribution is displayed, with the test Z-val
Inference app 75Enter data 3. In column D1, enter the boiling points found during the experiments.82.5 E 83.1 E 82.6 E 83.7 E 82.4 E83 E Calculate sta
4 Contents
76 Inference app8. Tap on Type and select T-Int: 1 μImport the data9. Open Numeric view:M10.Specify the data you want to import:Tap .11. F r o m t h
Inference app 77Display results graphically17. D i s p l ay th e con f i d e n c e interval in Plot view.P The 90% confidence interval is [82.48…, 8
78 Inference appInputs The inputs are:Results The results are:Two-Sample Z-TestMenu name Z-Test: μ1 – μ2On the basis of two samples, each from a sepa
Inference app 79Inputs The inputs are:Results The results are:One-Proportion Z-TestMenu name Z-Test: 1 πOn the basis of statistics from a single sampl
80 Inference appInputs The inputs are:Results The results are:Two-Proportion Z-TestMenu name Z-Test: π1– π2On the basis of statistics from two samples
Inference app 81Results The results are:One-Sample T-TestMenu name T-Test: 1 μThis test is used when the population standard deviation is not known. O
82 Inference appYou select one of the following alternative hypotheses against which to test the null hypothesis:H0: μ < μ0H0: μ > μ0H0: μ ≠ μ0I
Inference app 83You select one of the following alternative hypotheses against which to test the null hypothesis:H0: μ1< μ2H0: μ1> μ2H0: μ1≠ μ2I
84 Inference appConfidence intervalsThe confidence interval calculations that the HP Prime can perform are based on the Normal Z-distribution or Stude
Inference app 85Inputs The inputs are:Results The results are:One-Proportion Z-IntervalMenu name Z-Int: 1πThis option uses the Normal Z-distribution t
Geometry 51GeometryThe Geometry app enables you to draw and explore geometric constructions. A geometric construction can be composed of any number of
86 Inference appResults The results are:Two-Proportion Z-IntervalMenu name Z-Int: π1 – π2This option uses the Normal Z-distribution to calculate a con
Inference app 87One-Sample T-IntervalMenu name T-Int: 1 μThis option uses the Student’s t-distribution to calculate a confidence interval for μ, the t
88 Inference appInputs The inputs are:Results The results are:Chi-square testsAn HP Prime calculator can perform tests on categorical data based on th
Inference app 89Inputs With Expected Probability selected, the Numeric view inputs are as follows:Results When is tapped, the results are as follows
90 Inference appInputs The Numeric view inputs are as follows:Results When is tapped, the results are as follows:Menu keys The menu key options are
Inference app 91To import the data into the Inference app:1. Open the Statistics 2Var app and press H to enter Home view.2. Type L1:=C1 and press E.3.
92 Inference appMenu keys The menu key options are as follows:Confidence interval for slopeMenu name Interval: SlopeThis option calculates a confidenc
Inference app 93Inputs The Numeric view inputs are as follows:Results When is tapped, the results are as follows:Menu keys The menu key options are
94 Inference appConfidence interval for interceptMenu name Interval: InterceptThis option calculates a confidence interval for the intercept of the tr
Inference app 95Menu keys The menu key options are as follows:Confidence interval for a mean responseMenu name Interval: Mean responseThis option calc
Comentários a estes Manuais