HP Prime PPL Reference Programmer's guide · 1102 commands, functions & variables by topic · from the HP Prime User Guide (2018)

Page 1 explains the HP Prime Programming Language (PPL): program structure, objects, variables and scope, operators, tests, branching, loops, functions, errors, input/output, graphics, strings, lists & matrices, apps & views, user keys, CAS access, base integers, idioms; a drawing of the keyboard sits under the navigation bar and the Toolbox menu tree follows the guide. The following pages index every command, function and system variable in the User Guide's Functions & Commands, Programming, Variables, Lists, Matrices, Units and Geometry chapters by category and subgroup. Hover any entry for its syntax, description and example. The last pages cover Python — MicroPython, the hpprime bridge, every module — and the calculator itself: its files and its electronics.

Type: Home / PPL (UPPERCASE, Home + programs + CAS) CAS (lowercase; from PPL use CAS.name() or CAS("…")) App function (qualify: App.name) Statement / keyword Variable Python italic also listed elsewhere
Colour keythe machineprogrammingmathematicsdata objectssymbolic, solvers & financevariables & memoryinput, output & interfaceplotting & graphicsreference & systemnative code & hardware
AppsInfoHomeSettingsSymbSetupPlotSetupNumSetupHelpUserViewCopyMenuPasteEscClearCASSettingsVarsCharsAMemBUnitsCx t θ nDefineDa b/c°′″EDelⁿ√FSINASINGCOSACOSHTANATANILNJLOG10ˣKL+/−|x|M( )' 'N,EvalOEnterEEXSto▸P7ListQ8{ }R9! ∞ →S÷x⁻¹TALPHAalpha4MatrixU5[ ]V6≤ ≥ ≠W×XShift1ProgramY2iZ3π#Base:OnOff0Notes"".=_+Ans;HP PRIME

The keyboard

Each key carries up to three functions: its own legend, the blue one printed on its lower-left after Shift, and the orange letter or symbol at its lower-right after ALPHA. The black block at the top holds the app keys — Symb, Plot, Num are the three views of the current app, gives each its Setup — with the rocker wheel for the cursor and Help, Esc, CAS, Home, View, Menu around it. The bottom line of the screen is a row of six touch buttons that change with the view.

then keyblue function (ASIN, List, Matrix, Program, Units, Chars…); twice locks itALPHA key · ALPHA ALPHAone orange letter · alpha lock (ALPHA again to leave)ALPHA keylowercase letterToolbox · Templ · Varsthe tool-box icon opens the Toolbox menus · the template icon the math templates · Vars the variables menuEsc · Oncancel / clear the line (Esc clears) · On is Off; On also interrupts a running programEnter · Enter ≈evaluate · force a numeric result from the CASHelplong context help for whatever is selected; Help toggles User-key mode

Key codes for GETKEY run 0 (Apps) to 50 (+), left to right and top to bottom — see User Keys & Key Codes.

PPL Programmer's Reference

HP Prime Programming Language — syntax, semantics, idioms

Program Structure

EXPORT NAME(a, b) // header: name + parameters BEGIN LOCAL x, y:=0;locals (optionally initialized) x := a*b; every statement ends with ; RETURN x+y; value of the program call END; // END; closes the block
ElementNotes
EXPORT f(…)Global: callable from Home, other programs, the User menu (Toolbox ▸ User). Without EXPORT the function is private to the file.
f(…); above headerForward declaration — needed when a function is called before it is defined in the file.
EXPORT V; / EXPORT V:=1;Global user variable (Vars ▸ User). Put it above the function that assigns it.
// textComment to end of line.
#pragma mode(…)Pins separator / integer settings for the compile (Shift Menu ▸ Insert pragma).
Name rulesLetters, digits, _; must start with a letter; case-sensitive. Reserved names (A–Z, L1, M1, Xmin…) cannot be program or variable names.

Running

  • Home: type NAME(3,4) Enter — a program with parameters prompts for them when run from the catalog.
  • Program Catalog ▸ Run looks for a function called START(); with several EXPORTed functions it lists them.
  • Value returned = the RETURN value, else the last statement's value.
  • Several EXPORTed functions in one file appear as a folder in the User menu (delete the auto template first).

Editor keys

Cmds menu (Strings, Drawing, Matrix, App, Integer, I/O, More) · Tmplt menu (Block, Branch, Loop, Variable, Function) inserts structures with blanks · Check = syntax check · Shift Menu = Create user key / Insert pragma · Shift 1 = Program catalog.

Objects & Literals

TypeLiteral / exampleNotes
Real3.14 1ᴇ−3 −512 significant digits, exponent ±499. TYPE=0. Home vars A–Z, θ.
Integer#1101b #FFh #17o #42d #FF:24hBase-marked binary integer; wordsize 1–64 (:bits). TYPE=1.
String"text" "say ""hi""" "a\nb"Double the quote to embed it; \n newline, \\ backslash. Join with +. TYPE=2.
Complex(3,4) 3+4*iZ0–Z9. TYPE=3.
Vector / matrix[1,2,3] [[1,2],[3,4]]M0–M9. Elements M1(i,j). TYPE=4.
List{1,"a",{2,3}}Any mix of types, nestable. L0–L9. TYPE=6.
Expression'X^2+1' F1(X)Single quotes prevent evaluation. Store in F0–F9, E0–E9 etc.
Function objectx→x^2 (CAS)Mapping used by map/apply/select… TYPE=8.
Unit5_m 3_km/hNumber_unit. CONVERT(5_m,1_ft). TYPE=9.
Graphic (GROB)G0G9Screen is G0. Not assignable with := (use DIMGROB/BLIT).
Color#FF0000 RGB(255,0,0) #FF:24hColors are integers 0xRRGGBB; alpha in high byte for PIXON.
Sexagesimal54°52′34.68″Shift a b/c key; →HMS/HMS→.
Interval / range1..5 x=0..2*πCAS ranges for seq, solve guesses, delrows…

TYPE(obj) → 0 Real · 1 Integer · 2 String · 3 Complex · 4 Matrix · 5 Error · 6 List · 8 Function · 9 Unit · 14.x CAS object. CAS type(x) returns DOM_… names.

Variables & Scope

LOCAL i, s:="", L:={};local to the function; untyped A := 5; 5 ▶ A; sto(5, A);three ways to store L1(3) := 7; M1(2,1) := 0;element assignment Function.Xminqualified app variable MYPROG.countanother program's variable EXPORT SIDES;above the header: global user var EXPORT ratio:=0.15;global with initial value
KindWhere / rules
Home (system)Reserved, typed, global: A–Z θ real · Z0–Z9 complex · L0–L9 lists · M0–M9 matrices · G0–G9 graphics · settings (HAngle, HFormat, Base…). Cannot hold another type or be deleted.
AppReserved per app (Xmin, F1, C1, Root…). Same name in several apps ⇒ qualify: Polar.Xmin. Setting one changes the app.
CASLowercase names, untyped, may stay symbolic. Home sees them too (5*q).
UserCreated by assignment in Home (asks to confirm) or EXPORTed from a program; listed under Vars ▸ User next to the program. Untyped.
LocalLOCAL inside a function; disappears on exit; can hold any type; convention: lowercase names.
  • Uppercase X, Y, Z… are Home reals — the same X the Function app plots. Prefer LOCALs to avoid clobbering.
  • Names are case-sensitive: MaxTemp ≠ maxTemp.
  • Later EXPORT of the same name wins over an earlier program's.
  • Reset a user variable: Vars ▸ User ▸ Delete, or DelHVars("name"); app vars via DelAVars.
  • Introspection: HVars, AVars, Programs, Notes, AFiles read/write by name or index.

Operators & Precedence

#Highest → lowest (same level: left to right)
1( ) — innermost first
2! x⁻¹
3ⁿ√ (NTHROOT)
4^ 10ⁿ (ALOG)
5negation, * / MOD (and implied multiplication 2X)
6+
7< > ≤ ≥ == ≠ <> =
8AND NOT
9OR XOR
10left argument of | (where)
11:=
−5^2 → −25; (−5)^2 → 25parenthesize negatives 2X ≡ 2*X; AB ≡ A*Bimplied multiplication 6 < 8 < 11 → 1chained comparisons allowed {1,2}+{10,20} → {11,22}; 5*{1,2}lists/matrices vectorize M1.*M2 M1./M2 M1.^2element-wise matrix ops "ab"+"cd" → "abcd"; "n="+5+ concatenates strings (numbers coerced) M1*M2, M1/M2 (=M1*M2⁻¹), M1^-1matrix products / inverse 7 MOD 3 → 1; %(20,50) → 10modulo, percent x^2+1 | x=3where: substitute

= builds an equation (for solve/E1); == tests equality; := assigns. In RPN entry mode operators execute immediately (Home only).

Tests & Logic

x == 3; x <> 3; x ≠ 31 (true) or 0 (false) a < b AND NOT c; p OR q; p XOR qany non-zero is true 0 ≤ A ≤ 1chained range test EQ({1,2},{1,2}) → 1; {1,2}=={1,3} → {1,0}list equality vs element-wise IFTE(x<0, −x, x)inline if TYPE(v)==2; type(v)==DOM_STRINGtype tests (Home / CAS) POS(L1, v) > 0; contains(L1,v)membership INSTRING(s,"x") > 0substring test ISKEYDOWN(4); GETKEY == 30key tests ISCHECK(1); isPrime(n); even(n)app / CAS predicates
  • Tests yield 0/1 reals; IF/WHILE/UNTIL treat any non-zero as true.
  • IF with a list test: both branches must return single objects or equal-length lists (element-wise selection).
  • Comparisons of strings are lexical; of lists element-wise.
  • Complex results from real inputs (e.g. ASIN(2)) need HComplex=1, else an error.

Conditionals

IF test THEN commands; END; IF test THEN commands1; ELSE commands2; END; CASE IF t1 THEN c1; END;first true branch runs, then CASE ends IF t2 THEN c2; END;up to 127 branches DEFAULT c3;optional END; IFTE(test, a, b) IFERR c1; THEN c2; [ELSE c3;] END;
CASE IF A<0 THEN RETURN "negative"; END; IF 0≤A≤1 THEN RETURN "small"; END; DEFAULT RETURN "large"; END;
  • No ELSE IF keyword — nest ELSE IF … END; END; or use CASE.
  • Every END takes a semicolon.
  • PIECEWISE(c1,e1,…) and when(c,a,b) are the CAS/Symbolic-view equivalents of IFTE.

Loops

FOR k FROM 1 TO 10 [STEP 2] DO … END; FOR k FROM 10 DOWNTO 1 [STEP 2] DO … END; WHILE test DO … END; REPEAT … UNTIL test; BREAK; BREAK(2);leave 1 / n loop levels CONTINUE;next iteration
// count-controlled with real steps FOR X FROM Xmin TO Xmax STEP (Xmax-Xmin)/318 DO PIXON(X, SIN(X)); END; // sentinel loop REPEAT INPUT(n,"Sides","N=","≥ 4",4); UNTIL n≥4; // wait for a key WHILE GETKEY==-1 DO END; // or: WAIT(-1) / FREEZE // iterate a list FOR j FROM 1 TO SIZE(L1) DO s:=s+L1(j); END;
  • The loop variable is any variable (LOCAL recommended); the FOR bound is evaluated once; the counter is left at its last value.
  • Vectorized alternatives are faster: MAKELIST, ΣLIST, EXECON, map, MAKEMAT.
  • ITERATE(expr, var, start, n) applies expr n times.

Functions & Subroutines

ROLLDIE(); // forward-declare private helper EXPORT ROLLMANY(n, sides) BEGIN LOCAL k, roll, res; res := MAKELIST(0,X,1,2*sides,1); FOR k FROM 1 TO n DO roll := ROLLDIE(sides)+ROLLDIE(sides); res(roll) := res(roll)+1; END; RETURN res; END; ROLLDIE(n) BEGIN RETURN 1+RANDINT(n-1); END;
  • Parameters are positional, untyped, passed by value; no defaults or optional args (test TYPE yourself, or pass a list).
  • RETURN expr; ends the function; RETURN; alone returns nothing. Recursion is allowed.
  • Functions can return any object — return a list to give back several results (RETURN {a,b};).
  • Names must be unique across all programs; a helper without EXPORT is visible only in its file.
  • Calling another program's exported function: just call it (it must be compiled/present). Program stored source is not shared — only exported names.
  • DEFINE (Shift x t θ n) creates simple one-line user functions without a program.
  • Program is compiled on save; a syntax error prevents running.

Errors & Debugging

IFERR M2 := M1^-1; THEN MSGBOX("Singular matrix, code "+Ans); ELSE MSGBOX("ok"); END;
  • Inside THEN, Ans holds the error number.
  • Uncaught runtime errors stop the program with a message; syntax errors are caught by Check in the editor.
  • Debug in the Program Catalog (or DEBUG(prog)) steps line by line: Step, Skip, Vars (watch), Stop, Continue. KILL; stops a debug run.
  • CAS: breakpoint/halt pause CAS programs.
  • Timing: TEVAL(expr) seconds; TICKS ms since boot (t:=TICKS; …; (TICKS-t)/1000).
  • Print debugging: PRINT(x) writes to the terminal (Esc/any key hides it; PRINT() clears).
  • Common runtime errors: Bad argument type/count, Invalid dimension, Undefined name, Insufficient memory, Infinite result. Assigning the wrong type to a typed Home var (list into A) errors.
  • MEMORY() free RAM/flash; VERSION firmware.

Input

INPUT(r, "Circle", "r=", "Enter radius", 1, 5) // var, title, label, help, reset, initial → 1 OK / 0 Cancel INPUT({A,B}, "Two values", {"A:","B:"}, {"help A","help B"}, {0,0}, {1,2}); INPUT({ {n,[0],{20,40,1}}, {flag,0,{65,15,1}}, {c,{"Red","Blue"},{20,40,2}} }, "Options", {"n","on","color"}); // field forms: {var,[types],{x%,w%,line}} edit · {var,0/1,pos} checkbox // {var,n>1,pos} radio group of n · {var,{items},pos} chooser CHOOSE(k, "Pick", "Euler", "Gauss", "Newton"); // k := 1..n, 0 = cancel MSGBOX("Really?", 1) // OK/Cancel → 1/0 EDITLIST(L1); EDITMAT(M1, {"Title",{"r1","r2"},{"c1","c2"}}, 0); k := GETKEY; // key id 0..50, −1 = none (non-blocking) IF ISKEYDOWN(4) THEN … END; // Esc held? m := MOUSE; // {{x,y,x0,y0,type},…} type: 0 new 1 done 2 drag 3 stretch 4 rotate 5 long WAIT(2); WAIT(0) = 1 min; WAIT(-1) → key/mouse event (newer fw)
  • INPUT type matrices: [0] real, [2] string (quotes hidden), [-1] any; several allowed [0,2].
  • Max 7 lines per page; more create pages (title may be a list of titles).
  • Run from Home with parameters missing ⇒ the calculator prompts for them.

Output & Text

PRINT("Area = "+A);terminal (scrolling text) PRINT();clear terminal MSGBOX("Done");modal box, waits for OK TEXTOUT_P("Hi", 10, 20, 2, #FF0000, 100, #FFFFFF);text,x,y,font,color,clip width,bg TEXTOUT("y=x²", 0, 0);Cartesian coords in current plot window RECT(); FREEZE;clear screen; keep drawing until keypress DRAWMENU("Run","Quit","","","","Help");6 soft labels; read taps via MOUSE / GETKEY STRING(2/3, 2, 4) → "0.6667"mode 0 cur 1 Std 2 Fix 3 Sci 4 Eng 5 Float 6 Round (+7 fraction, +14 mixed) STRING(F1) STRING(L1) STRING(M1)object → its text form EXPR("2+3") → 5; EXPR("X+10")string → evaluated format(9.3456,"s3") → "9.35"CAS f/s/e formats x := TEXTOUT_P(s, x, y);returns x after the text
  • Fonts: 0 = Home-settings font, 1 small, 2 large (newer firmware accepts sizes 10–22 / 1–7).
  • Screen 320×240 px; the bottom 22 px is the soft-menu area; the status bar is not drawable.
  • After the program ends the screen is redrawn — use FREEZE or WAIT to hold graphics.
  • Number display in strings follows HFormat/HDigits unless STRING mode/precision given.

Graphics

G0 = screen, G1–G9 off-screen buffers (lost at power-off). Two coordinate systems: plain names use the current app's Cartesian window (Xmin…Ymax); _P versions use pixels (0,0 top-left → 319,239). Colors: RGB(r,g,b[,a]) or #RRGGBB; alpha ≥128 in RGB = transparent.

RECT([G],x1,y1,x2,y2,edge,fill)RECT() clears screen; RECT(G1) clears G1 DIMGROB_P(G1, 320, 240, #FFFFFF)allocate/size a GROB (or from list data) PIXON_P(x,y[,c]) PIXOFF_P GETPIX_Ppixels LINE_P([G],x1,y1,x2,y2[,c])line (also multi-line/3D form) ARC_P([G],x,y,r[,a1,a2,c])circle / arc, angles in current mode TRIANGLE_P(x1,y1,x2,y2,x3,y3,c[,c2,c3][,α])filled, optional gradient & alpha FILLPOLY_P({(x1,y1),(x2,y2),…}, c[,α])filled polygon TEXTOUT_P(txt,[G],x,y[,font,c,w,bg])text; returns end x BLIT_P([G0,dx1,dy1,dx2,dy2],[G1,sx1,sy1,sx2,sy2,c,α])copy region (sprites; c = transparent color) SUBGROB_P(G0,x1,y1,x2,y2,G2)copy part of a GROB into another INVERT_P([G,x1,y1,x2,y2])reverse video GROBW_P(G) GROBH_P(G)size C→PX(x,y) PX→C(x,y)convert coordinates FREEZE;hold the display

Double buffering

DIMGROB_P(G1,320,240,#FFFFFF); // back buffer REPEAT RECT_P(G1); … draw on G1 …; BLIT_P(G0,G1); UNTIL GETKEY≥0;

Optional args fill left to right: RECT_P(40,90,#000000) = x1,y1,edge. Plot-view background images: ImageName/ImageDisplay vars. Geometry-app plots use plotfunc, polygon… (CAS).

Strings

DIM("abc") → 3length (SIZE works too) LEFT(s,n) RIGHT(s,n) MID(s,pos[,n])slices, 1-based INSTRING("banana","na") → 3find (0 = not found) REPLACE("12345",3,"99") → "12995"overwrite from position ROTATE("12345",2) → "34512"rotate left (negative = right) UPPER(s) LOWER(s)case CHAR(65) → "A"; CHAR({72,105}) → "Hi"codes → string ASC("AB") → {65,66}string → codes "n="+n; s+CHAR(10)concatenate; newline STRING(expr[,mode,prec])number/object → string EXPR("3*4") → 12string → value / expression cat("x=",3) → "x=3"CAS concat s(3) → code of 3rd charindexing a string gives the character code (see L1(2,4) in the guide) STRINGFROMID(56)built-in UI strings by id latex(expr)LaTeX text (CAS)
  • Escapes: "" quote, \n, \\. Strings compare with ==, < lexically.
  • Build long strings in a loop with +; for many pieces collect in a list.
  • Number formatting: STRING(x,2,3) = FIX 3; STRING(x,3,4) = SCI 4.
  • Program source is itself a string: Programs("NAME"), notes via Notes("name").

Lists & Matrices

L1:={}; L1(0):=7index 0 assigns past the end = append L1 := CONCAT(L1, {v})append (also L1(SIZE(L1)+1):=v) MAKELIST(X^2, X, 1, 10, 1)build from formula L1(3); L1({2,4}); L1(2,3)element, sublist 2..4, nested index SIZE(L1); POS(L1,x); SORT(L1); REVERSE(L1)basics ΣLIST πLIST ΔLIST cumSumreductions DIFFERENCE INTERSECT UNIONset ops (Home) EXECON("&1*2", L1); EXECON("&1+&2",L1,L2)elementwise expression map(L1, x→x^2); select(x→x>2, L1)CAS functional forms L1 + 1; L1 * L2; SIN(L1)vectorized arithmetic
M1 := MAKEMAT(I*J, 3, 3); IDENMAT(3)create (I,J = row,col) M1(2,3); M1(2,3):=5; M1(2)element, assign, row SIZE(M1) → {rows,cols}; TRN DET RANK RREFinfo ADDROW(M1,[1,2,3],2) DELCOL(M1,1) SWAPROW REDIM(M1,{4,4})commands: modify the variable in place SUB(M2, M1, {1,1}, {2,2})submatrix M1*M2 M1^-1 M1.*M2 |M1|algebra EIGENVAL EIGENVV LU QR SVD LSQ CROSS dotnumeric linear algebra

Functions return values and leave variables alone (TRN(M1)); commands (ADDROW, DELCOL, SCALE, SWAPCOL, REDIM, REPLACE, SUB) change the named variable. Vectors are 1-row: [1 2 3]. Lists hold anything; matrices hold numbers.

Apps & Views

STARTAPP("Function")launch app (runs its START()) STARTVIEW(1, 1)view n, redraw Function.CHECK(1); UNCHECK(2); ISCHECK(3)select Symbolic definitions F1 := "SIN(X)"; 'SIN(X)' ▶ F1define a plot function Xmin:=-5; Xmax:=5; Ymin:=-2; Ymax:=2;plot window D1 := L1; H1 := {'D1','',1,0,#FF:24h}Stats 1Var data & analysis Do1VStats(H1); MeanX; sXrun stats, read results S1 := {'C1','C2','',1,'',#FF:24h,1,#FF:24h}Stats 2Var: linear fit SOLVE(X^2-2,X,1); E1:='X^2=2'Solve app RECURSE(U,U(N-1)*N,1,2) ▶ U1Sequence app Spreadsheet.A1:=5; =SUM(A1:A9)Spreadsheet (qualified cell name from Home/programs)
STARTVIEW nViewnView
0Symbolic7View menu
1Plot8…13Special views (Split Plot Detail, Split Plot Table, Autoscale, Decimal, Integer, Trig in Function)
2Numeric−1Home
3Symbolic Setup−2Home Settings
4Plot Setup−3Memory Manager
5Numeric Setup−4App Library
6App Info−5…−8Matrix, List, Program, Notes catalogs

Custom app program

// App Library ▸ Save (base app) → app program is 1st in catalog EXPORT DiceSim() BEGIN END; VIEW "Roll", ROLL() BEGIN … STARTVIEW(1,1); END; // View menu entry START() BEGIN D1:={}; STARTVIEW(6,1); END; // hooks: START RESET Symb Plot() BEGIN Xmin:=0; STARTVIEW(1,1); END; // SymbSetup Plot PlotSetup Num NumSetup Info

View functions take no parameters — pass data through EXPORTed variables. Export those from a separate program called in START() so values persist. Icons/notes: ANote, AFiles("icon.png").

User Keys & Key Codes

KEY K_Sin // Shift Menu ▸ Create user key writes this BEGIN RETURN "ALOG("; // text inserted when the key is pressed in User mode END;

Prefixes: K_ plain · KS_ Shift · KA_ Alpha · KSA_ Shift+Alpha. Names (case-sensitive): Apps Symb Up Help Esc Home Plot Left Right View Cas Num Down Menu Vars Math Templ Xttn Abc Bksp Power Sin Cos Tan Ln Log Sq Neg Paren Comma Enter Eex 0–9 Div Alpha Mul Minus On Dot Space Plus. Activate: Shift Help (User) = one-shot user mode (1U in the title bar); Shift Help Shift Help = persistent (↑U) until pressed again.

GETKEY / ISKEYDOWN codes (0 = top-left … 50 = bottom-right)

RowCodes
Apps Symb ▲ Help0 1 2 3
Esc Home Plot ◀ ▶4 5 6 7 8
View CAS Num ▼ Menu9 10 11 12 13
Vars Toolbox Templ xtθn a b/c ⌫14 15 16 17 18 19
x^y SIN COS TAN LN LOG20 21 22 23 24 25
x² +/− ( ) , Enter26 27 28 29 30
EEX 7 8 9 ÷31 32 33 34 35
ALPHA 4 5 6 ×36 37 38 39 40
Shift 1 2 3 −41 42 43 44 45
On 0 . Space +46 47 48 49 50

Soft-menu taps and screen touches come through MOUSE (or WAIT(-1) on newer firmware), not GETKEY.

CAS from PPL

CAS.factor(x^2-1)call any CAS function CAS("int(sin(x),x,0,pi)")evaluate CAS text (safest quoting) CAS.simplify('(X^2-1)/(X-1)')quote to stop Home evaluating X r := CAS.solve('x^2=2', 'x');result comes back as CAS object / list EXPR("solve(x^2=2,x)")alternative CAS.zeros(...); CAS.diff(F1(X),X)works with app functions approx(...) evalf(...) exact(...)numeric ↔ exact CAS.purge(x); restartclear CAS variables assume(n, integer); additionally(n>5)domain hints
  • CAS names are lowercase and case-sensitive (solve, not SOLVE — that is the Solve app's function). Home functions are uppercase and also usable inside CAS.
  • Uppercase single letters (X, Y…) are Home reals — inside CAS calls they evaluate to their current values unless quoted; CAS variables are lowercase and can stay symbolic.
  • CAS results are exact (fractions, √) by default; wrap with approx() or evalf, or store into a Home real to force a number.
  • CAS view has its own settings (Shift CAS): Exact, Complex, Use i, Simplify level, Increasing, Number Format, epsilon, recursion limits.
  • Program in pure CAS: newer firmware #CAS … #END blocks; older: create the function in CAS view with name(x):=….
  • Menu Display setting (Home Settings p.2) toggles descriptive vs command names in Math/CAS menus.

Base Integers

#1101b #17o #FFh #42d #FF:16hliteral with base marker (:bits wordsize) #4Dh * #11101b → #8B9hmixed bases: result in base of first operand #100b/#11b → #1binteger division truncates BITAND BITOR BITXOR BITNOT BITSL BITSRbitwise ops (variadic AND/OR/XOR) B→R(#1101b) → 13; R→B(13) → #Dhconvert to/from real SETBASE(#34o,1) → #11100b1 bin 2 oct 3 hex SETBITS(#1111b,15) GETBITS GETBASEwordsize / query Base:=3; Bits:=32; Signed:=1Home settings vars (Base 0 bin 1 oct 2 dec 3 hex) hamdist(#12h,#38h) → 3; shift(#5h,2)CAS extras
  • Default base is set in Home Settings ▸ Integers (hex by default), wordsize 32, optional signed (± reduces range one bit).
  • Numbers without # are reals; mixing a real in gives a real result.
  • Shift − (Base) on a highlighted result opens the Edit Integer dialog (bit view, shift, one's/two's complement).
  • Colors are convenient as hex integers: #FF0000h is not needed — drawing commands accept plain #FF0000.

Idioms

t:=TICKS; …; MSGBOX((TICKS-t)/1000)time a section WHILE GETKEY==-1 DO END;wait for any key REPEAT k:=GETKEY; UNTIL k≠-1;same, keeping the code IF k==4 THEN BREAK; END;Esc exits a loop RECT(); TEXTOUT_P(s,10,10); FREEZE;show text until a key L1:=CONCAT(L1,{x}); L1(0):=xappend (L1(0):=x also appends) L1({2,SIZE(L1)})tail of a list ΣLIST(L1)/SIZE(L1)mean without the Stats app MAKELIST(RANDINT(1,6),X,1,10,1)10 dice 1+RANDINT(5) RANDINT(1,6)random 1–6 STRING(x,2,2)+" s"format with 2 decimals IFERR EXPR(s) THEN 0 END;safe parse of user text Anslast result / error number in IFERR M1(i,j):=M1(i,j)+1update an element EXECON("&1^2",L1)square every element HAngle:=1force degrees from a program Programs("NAME"):=srcwrite a program from a string x:=INPUT(v,"t","v="); IF x==0 THEN RETURN; END;honor Cancel Function.Xmin:=-1set another app's window 0 ▶ Axes (yes: 0 turns axes ON)watch inverted flags: Axes, GridDots, Labels(1 on 2 off)

Newer Firmware Notes

The bundled User Guide is the 2018 edition (firmware 13333). Physical Primes and the 2.1.14425 macOS emulator run later firmware. Additions below are widely documented by HP/community but are not in the guide — verify on your unit. Python has its own section at the end of this sheet, checked on firmware 2.2; the lines here are only the PPL-side syntax.

#PYTHON myscript // MicroPython in a PPL file (fw 2.1.14588+) from hpprime import * // eval("PPL"), keyboard(), mouse(), pixon… print(eval("L1")) // read a Home variable #END EXPORT RUNPY() BEGIN PYTHON(myscript); END; // PYTHON(name,args…) #CAS cube(x):=x^3; // CAS-language definitions in a PPL file #END
  • A program whose first line is #PYTHON is a pure Python program (Python App / hpprime module; from hpprime import * and from graphic import *).
  • WAIT(-1) blocks until a key or touch and returns the key code, or a list {type,x,y} for mouse events.
  • TEXTSIZE(str,font) → {w,h}; TEXTOUT fonts 1–7 / pixel sizes 10–22 in later builds.
  • Later firmware also added: ICON resources in app files, larger Programs/Notes support, more STRING options, MOUSE improvements, Python hpprime graphics (fillrect, blit).
  • Emulator/desktop: paste source into the Program editor (Shift 1 ▸ New), or use HP Connectivity Kit; sources are compiled to bytecode on the device.

Toolbox Menus

the menu tree behind the Toolbox key, drawn — plus every other menu a key opens

How the Prime’s menus work

The Prime has no soft-key menus in the 48/50 sense: the six touch buttons along the bottom of the screen belong to the current view, and the big function menus live behind the Toolbox key (the little tool-box icon, row of Vars). It opens a full-screen menu with five tabs — Math, CAS, App, User, Catlg — each a list of categories that cascade to the right into their entries and sub-menus. Navigate by touch, or with the cursor keys and Enter; every entry is numbered, so typing 2 then 3 inside Math picks Arithmetic → Modulus without looking. Esc leaves the menu; there is no “up” key — the tabs are always one tap away.

Picking an entry pastes the function into the entry line with its parentheses (MOD(, simplify(). By default the menus show the descriptive names used in the trees below; turn off Menu Display in Home Settings to see the command names from the index instead. Math functions are UPPERCASE and work everywhere; CAS functions are lowercase and, from a program, are called as CAS.name().

Working with lists

Toolbox Math 6 (List)Make List · Sort · Reverse · Concatenate · Position · Size · ΔLIST · ΣLIST · ΠLIST 7 (List catalog)L0–L9 with the list editor; 8 types the braces { }Toolbox Catlg then type Ljumps the alphabetical catalogue to the L commandsin a programMAKELIST(X², X, 1, 5), SORT, REVERSE, CONCAT, POS, SIZE, ΔLIST, ΣLIST, ΠLIST — see Lists in the index

Menu contents follow the HP Prime User Guide (2018): “Math menu”, “CAS menu”, “App menu” in Functions & commands, and the List and Matrix chapters. Newer firmware adds entries (Python, Graph 3D) without changing the tree.

Every menu a key opens

Toolbox keythe five Toolbox menus: Math · CAS · App (functions of every app: Function, Solve, Spreadsheet, Statistics 1Var/2Var, Inference, Finance, Linear Solver, Triangle Solver, Common) · User (your EXPORTed functions) · Catlg (everything, A–Z) Varsvariables in tabs: Home (Real, Complex, List, Matrix, Notes, Programs, Settings…) · CAS · App (the current app’s) · User Templthe math-template picker: fractions, roots, |x|, Σ, ∏, ∫, derivatives, limits, matrices, piecewise Appsthe App Library; Apps shows an app’s Info Menuthe context menu of the current view; Menu = Paste (the clipboard history) Symb · Plot · Numthe three views of the current app; gives each view’s Setup form 7 List 4 Matrixthe List and Matrix catalogs (L0–L9, M0–M9) with their editors 1 Program 0 Notesthe Program catalog (with the editor and Debug) and the Notes catalog Vars Charsthe character map, by page: Greek, math, arrows, box drawing… Templ Unitsthe Units menu: Length, Area, Volume, Time, Speed, Mass, Force, Energy, Power, Pressure, Temperature, Electricity, Light, Angle, Viscosity, Radiation — plus the Tools sub-menu (CONVERT, MKSA, UFACTOR, USIMPLIFY) Toolbox Memthe Memory Manager; xtθn Define opens the function definer Home CASHome Settings (4 pages) · CAS Settings 9 6 3small pop-ups: ! ∞ → · ≤ ≥ ≠ · Base (#, b/o/d/h) · π Helpcontext help for the current key, command or app; Help arms User-key mode (1U / ↑U)

is the blue Shift key; the orange ALPHA key gives the orange letters. Shifted functions are printed in blue on the key itself, alpha letters in orange at its corner — see the keyboard at the top of the page.

Toolbox → Math

8 categories
Toolbox press the Toolbox key, then the Math tab · tap a tab, then a category · type an entry’s number to pick it · Esc leavesMathCASAppUserCatlgNumbers1 Ceiling2 Floor3 IP4 FP5 Round6 Truncate7 Mantissa8 ExponentArithmetic1 Maximum2 Minimum3 Modulus4 Find Root5 Percentage6 ▸ Complex7 ▸ ExponentialComplex6 ▸1 Argument2 Conjugate3 Real Part4 Imaginary Part5 Unit VectorExponential7 ▸1 ALOG2 EXPM13 LNP1Trigonometry1 CSC2 ACSC3 SEC4 ASEC5 COT6 ACOTHyperbolic1 SINH2 ASINH3 COSH4 ACOSH5 TANH6 ATANHProbability1 Factorial2 Combination3 Permutation4 ▸ Random5 ▸ Density6 ▸ Cumulative7 ▸ InverseRandom4 ▸1 Number2 Integer3 Normal4 SeedDensity5 ▸1 Normal2 T3 χ²4 F5 Binomial6 Geometric7 PoissonCumulative6 ▸1 Normal2 T3 χ²4 F5 Binomial6 Geometric7 PoissonInverse7 ▸1 Normal2 T3 χ²4 F5 Binomial6 Geometric7 PoissonList1 Make List2 Sort3 Reverse4 Concatenate5 Position6 Size7 ΔLIST8 ΣLIST9 ΠLISTMatrix1 Transpose2 Determinant3 RREF4 ▸ Create5 ▸ Basic6 ▸ Advanced7 ▸ Factorize8 ▸ VectorCreate4 ▸1 Make2 Identity3 Random4 Jordan5 Hilbert6 Isometric7 VandermondeBasic5 ▸1 Norm2 Row Norm3 Column Norm4 Spectral Norm5 Spectral Radi…6 Condition7 Rank8 Pivot9 TraceAdvanced6 ▸1 Eigenvalues2 Eigenvectors3 Jordan4 Diagonal5 Cholesky6 Hermite7 Hessenberg8 SmithFactorize7 ▸1 LQ2 LSQ3 LU4 QR5 SCHUR6 SVD7 SVLVector8 ▸1 Cross Product2 Dot Product3 L2Norm4 L1Norm5 Max NormSpecial1 Beta2 Gamma3 Psi4 Zeta5 erf6 erfc7 Ei8 Si9 Ci

Toolbox → CAS

7 categories
Toolbox press the Toolbox key, then the CAS tab · tap a tab, then a category · type an entry’s number to pick it · Esc leavesMathCASAppUserCatlgAlgebra1 Simplify2 Collect3 Expand4 Factor5 Substitute6 Partial Fract…7 ▸ ExtractExtract7 ▸1 Numerator2 Denominator3 Left Side4 Right SideCalculus1 Differentiate2 Integrate3 Limit4 Series5 Summation6 ▸ Differential7 ▸ Integral8 ▸ Limits9 ▸ TransformDifferential6 ▸1 Curl2 Divergence3 Gradient4 HessianIntegral7 ▸1 By Parts u2 By Parts vLimits8 ▸1 Riemann Sum2 Taylor3 Taylor of Quo…Transform9 ▸1 Laplace2 Inverse Lapla…3 FFT4 Inverse FFTSolve1 Solve2 Zeros3 Complex Solve4 Complex Zeros5 Numerical Sol…6 Differential …7 ODE Solve8 Linear SystemRewrite1 lncollect2 powexpand3 texpand4 ▸ Exp & Ln5 ▸ Sine6 ▸ Cosine7 ▸ Tangent8 ▸ TrigExp & Ln4 ▸1 eʸ·ˡⁿˣ→xʸ2 xʸ→eʸ·ˡⁿˣ3 exp2trig4 expexpandSine5 ▸1 asinx→acosx2 asinx→atanx3 sinx→cosx·tanxCosine6 ▸1 acosx→asinx2 acosx→atanx3 cosx→sinx/tanxTangent7 ▸1 atanx→asinx2 atanx→acosx3 tanx→sinx/cosx4 halftanTrig8 ▸1 trigx→sinx2 trigx→cosx3 trigx→tanx4 atrig2ln5 tlin6 tcollect7 trigexpand8 trig2expInteger1 Divisors2 Factors3 Factor List4 GCD5 LCM6 ▸ Prime7 ▸ DivisionPrime6 ▸1 Test if Prime2 Nth Prime3 Next Prime4 Previous Prime5 EulerDivision7 ▸1 Quotient2 Remainder3 aⁿ MOD p4 Chinese Remai…Polynomial1 Find Roots2 Coefficients3 Divisors4 Factor List5 GCD6 LCM7 ▸ Create8 ▸ Algebra9 ▸ SpecialCreate7 ▸1 Poly to Coef2 Coef to Poly3 Roots to Coef4 Roots to Poly5 Random6 MinimumAlgebra8 ▸1 Quotient2 Remainder3 Degree4 Factor by Deg…5 Coef. GCD6 Zero Count7 Chinese Remai…Special9 ▸1 Cyclotomic2 Groebner Basis3 Groebner Rema…4 Hermite5 Lagrange6 Laguerre7 Legendre8 Chebyshev Tn9 Chebyshev UnPlot1 Function2 Contour

Command Reference

1243 entries · 1102 unique names · 22 categories · hover for details

Program Structure & Flow

56

Structure

EXPORTMake a function global (Toolbox ▸ User menu)
BEGIN ENDDelimit a function body / block
RETURNReturn a value and leave the function
;Statement separator
//Comment: from // to the end of the line is ignored by the compiler
#pragmaCompiler directive placed at the top of a program: forces the digit-grouping separator and integer settings the program was written with, so it compiles the same on any calculator (Program Editor: Shift Menu ▸ Insert pragma)
KILLStop step-by-step (debug) execution
DEBUGRuns a program under the debugger from Home or another program (same as Debug in the Program Catalog): step through lines, watch variables

Branch

IF THENRun commands when test is non-zero
IF THEN ELSETwo-way branch (list tests select element-wise)
CASEMulti-way branch: first true IF runs, optional DEFAULT (≤127 branches)
IFTEInline conditional (function form of IF)
IFERRRun commands1; on error run commands2 (error number in Ans)
IFERR ELSEError trap with an ELSE branch for the no-error case

Loops

FORCounted loop from start to finish, +1 each pass
FOR STEPCounted loop with explicit increment
FOR DOWNCounted loop counting down, −1 each pass
FOR STEP DOWNCounted loop counting down by increment
WHILELoop while test is true (test before each pass)
REPEATLoop until test is true (test after each pass)
BREAKExit the loop (BREAK(n): n levels)
CONTINUEJump to the next iteration

Variables & scope

LOCALDeclare variables local to the function
EXPORTMake variables global (Vars ▸ User); place above the header
:=Assign: variable := expression
Store: value ▶ variable (Shift EEX)
stoCAS store: sto(value, var)
CopyVarCopies the first variable into the second variable without evaluation
purgeUnassign a CAS variable
restartPurge all CAS variables

App programs

STARTApp-program hook: runs when the app is started (tapping Start in the Application Library, or STARTAPP)
RESETApp-program hook: runs when the app is reset (Reset in the Application Library)
SymbApp-program hook: function named Symb() in the app program runs when the Symb key is pressed (Symbolic view)
SymbSetupApp-program hook: runs when Shift Symb (Symbolic Setup) is pressed
PlotApp-program hook: runs when the Plot key is pressed
PlotSetupApp-program hook: runs when Shift Plot (Plot Setup) is pressed
NumApp-program hook: runs when the Num key is pressed (Numeric view)
NumSetupApp-program hook: runs when Shift Num (Numeric Setup) is pressed
InfoApp-program hook: runs when Shift Apps (Info) is pressed
VIEWAdd a View-menu entry that runs a function of the app program
KEYPrefix for user-key definitions: KEY K_Name BEGIN RETURN "text"; END;

CAS from PPL

CASCall a CAS function or read a CAS variable from Home/PPL
QUOTEReturn an expression unevaluated
EVALEvaluate an expression
EXPRParses a string into a number or expression and returns the result evaluated
CAS mapping arrow x→expr (anonymous function)
#CASNewer firmware: everything between #CAS and #END in a PPL source is compiled as CAS-language code (lowercase, exact arithmetic), so a program can define CAS functions/programs alongside PPL functions

Python

#PYTHONNewer firmware (2021+, v2.1.14588 and later): embeds a MicroPython program inside a PPL source file
PYTHONNewer firmware: runs an embedded #PYTHON block by name from PPL, optionally passing arguments (available in the Python code via sys.argv / hpprime module)

Debugging

breakpointUsed in programming to insert an intentional stopping or pausing point
haltUsed in programming to go into step-by-step debugging mode
TEVALSeconds taken to evaluate an expression
TICKSMilliseconds since boot
TYPEType number of an object (0 real 1 int 2 str 3 cplx 4 mat 6 list 8 fn 9 unit)
VERSIONFirmware/hardware/CAS version strings
MEMORYFree memory / storage as a list, or one of them

Operators & Tests

55

Arithmetic

+Addition symbol
Subtraction symbol
*Multiplication symbol
/Division symbol
^Power symbol
Square (x² key)
x⁻¹Reciprocal / matrix inverse (Shift ÷)
Inserts a square root sign
NTHROOTThe nth root of x (Shift x^y key inserts the ⁿ√ template; NTHROOT is the typed form)
!Factorial (Γ(x+1) for non-integers)
%x percent of y
%TOTALy as a percentage of x
%CHANGEPercent change from x to y
MODRemainder of value1/value2
NEGUnary minus
( )Inserts opening parenthesis
Power-of-10 exponent entry (EEX key)

Element-wise (matrices)

.*Term by term multiplication for matrices
./Term by term division for matrices
.^Term by term exponentiation for matrices
hadamardHadamard bound, or element-wise product

Store & assign

:=Assign: variable := expression
Store: value ▶ variable (Shift EEX)
stoCAS store: sto(value, var)

Comparison

==Equality test
<>Inequality test
Inequality test
<Strict less-than-inequality test
<=Less than or equal inequality test
Less than or equal inequality test
>Strict greater than inequality test
>=Greater than or equal inequality test
Greater than or equal inequality test
=Equality symbol
EQTests two lists for equality element by element; returns 1 or 0 (== on lists compares element-wise and returns a list)
compareCompares two objects and returns 1 if type(Obj1)<type(Obj2) or if type(Obj1)=type(Obj2) and Obj1<Obj2; otherwise, it returns 0

Logic

ANDLogical And
ORLogical Or
NOTReturns the logical inverse of a Boolean expression
XORExclusive or

Where / substitution

|Where: substitute values / state a domain for variables in an expression
whenCAS inline conditional when(test,a,b)
PIECEWISEPiecewise function from (condition, expression) pairs
IFTEInline conditional (function form of IF)
interval2centerReturns the center of an interval a..b

RPN stack (Home, RPN entry)

DUPRPN stack: duplicate level 1 (press Enter with an empty entry line)
DROPRPN stack: remove level 1 (Backspace with empty entry line)
SWAPYou can swap the position of the objects on stack level 1 with those on stack level 2
ROLLThere are two roll commands: • Tap to move the selected item to stack level 1
PICKCopies the selected item to stack level 1
DUPNDuplicates all items between (and including) the highlighted item and the item on stack level 1
DROPNDeletes all items in the stack from the highlighted item down to and including the item on stack level 1
→LISTRPN stack: builds a list from the highlighted item down to level 1
ECHOPlaces a copy of the selected result on the entry line and leaves the source result highlighted
CLEARRPN: Shift Esc clears the whole stack/history

Real Numbers

73

Rounding & parts

CEILINGRound up to integer
FLOORRound down to integer
IPInteger part
FPFractional part
ROUNDRound to n decimals (negative n = significant digits)
TRUNCATETruncate to n decimals
truncTruncate to n decimals (CAS)
iPartInteger part (CAS)
MANTMantissa
XPONExponent (power of 10)
exactDecimal → exact rational/real
floatReal (float) domain marker for assume/type
evalfNumeric evaluation to n significant digits
formatReal → string with f/s/e format

Compare & sign

MAXMaximum of values or a list
MINMinimum
ABSAbsolute value / modulus / Frobenius norm
SIGNSign (−1,0,1) or unit complex vector
MODRemainder of value1/value2
a b/cToggle last result decimal ↔ fraction ↔ mixed (Shift: ↔ D°M′S″)

Exponential & log

LNNatural logarithm
LOGCommon (base-10) logarithm
e^Natural exponential e^x (Shift LN)
EXPeˣ (CAS/Home)
ALOG10^x
EXPM1eˣ−1
LNP1ln(1+x)
logbLogarithm to base b
sqrtSquare root
surdnth root: x^(1/n)
exp2powe^(n·ln x) → xⁿ
pow2expa^b → e^(b·ln a)

Trigonometric

SINSine
COSCosine
TANTangent
ASINArc sine: sin⁻¹x
ACOSArc cosine: cos⁻¹x
ATANArc tangent: tan⁻¹x
CSCCosecant
ACSCArc cosecant
SECSecant
ASECArc secant
COTCotangent
ACOTArc cotangent

Hyperbolic

SINHHyperbolic sine
ASINHInverse hyperbolic sine
COSHHyperbolic cosine
ACOSHInverse hyperbolic cosine
TANHHyperbolic tangent
ATANHInverse hyperbolic tangent

Angle & HMS

→HMSDecimal → D°M′S″
HMS→D°M′S″ → decimal
HAngleSets the angle format for the Home view
AAngleSets the angle mode

Constants

ππ
PIπ (CAS)
eEuler constant e
iImaginary unit
MAXREALLargest representable real (Home 9.99999999999E499)
MINREALSmallest positive real (Home 1E−499)

Special functions

BetaBeta function Β(a,b)
GammaGamma function Γ(a)
PsiPolygamma: nth derivative of digamma at a
ZetaRiemann zeta ζ(x)
erfError function
erfcComplementary error function
EiExponential integral
SiSine integral
CiCosine integral
Airy_AiAiry function Ai
Airy_BiAiry function Bi
DiracDirac delta
HeavisideHeaviside step (1 for x≥0)

Complex Numbers

15

Parts

REReal part
IMImaginary part
ARGArgument (angle) of a complex number
CONJComplex conjugate
ABSAbsolute value / modulus / Frobenius norm
SIGNSign (−1,0,1) or unit complex vector
evalcComplex expression → re + i·im
affixPoint → complex number

Convert

polar_pointPolar (r,θ) → point
rectangular_coordinates[r,θ] → [x,y]
polar_coordinatesPoint → [r,θ]
normalizeVector / complex divided by its norm
mult_c_conjugateMultiply top and bottom by the complex conjugate
HComplexEnables a complex result from a real input
AComplexSets the complex number mode

Probability & Statistics

86

Combinatorics

!Factorial (Γ(x+1) for non-integers)
factorialFactorial / gamma (CAS)
COMBCombinations C(n,r)
PERMPermutations P(n,r)
randpermRandom permutation of 0..n−1
signatureSignature of a permutation

Random numbers

RANDOMRandom real (0–1, 0–a, a–b, or n of them)
RANDINTRandom integer (0/1, 0–a, a–b, or n of them)
RANDNORMRandom normal variate N(μ,σ)
RANDSEEDSeed the random generator
srandSeed the CAS random generator
randbinomialRandom binomial variate
randchisquareRandom χ² variate
randexpRandom exponential variate
randfisherRandom F variate
randgeometricRandom geometric variate
randpoissonRandom Poisson variate
randstudentRandom t variate
randvectorVector of random integers/reals
ranmRandom vector or matrix
randMatRandom integer matrix stored in a variable
randpolyRandom polynomial coefficients

Density (pdf)

NORMALDNormal pdf (μ,σ default 0,1)
STUDENTStudent's t pdf
CHISQUAREχ² pdf
FISHERF pdf
BINOMIALBinomial probability of k successes
GEOMETRICGeometric pdf
POISSONPoisson probability of k events
betadBeta pdf
cauchyCauchy pdf
exponentialExponential pdf
gammadGamma pdf
negbinomialNegative binomial pdf
uniformUniform pdf
weibullWeibull pdf

Cumulative (cdf)

NORMALD_CDFNormal lower-tail cdf
STUDENT_CDFStudent's t cdf
CHISQUARE_CDFχ² cdf
FISHER_CDFF cdf
BINOMIAL_CDFBinomial cdf (k or k1..k2)
GEOMETRIC_CDFGeometric cdf
POISSON_CDFPoisson cdf
betad_cdfBeta cdf
cauchy_cdfCauchy cdf
exponential_cdfExponential cdf
gammad_cdfGamma cdf
negbinomial_cdfNegative binomial cdf
uniform_cdfUniform cdf
weibull_cdfWeibull cdf

Inverse cdf

NORMALD_ICDFInverse normal cdf
STUDENT_ICDFInverse t cdf
CHISQUARE_ICDFInverse χ² cdf
FISHER_ICDFInverse F cdf
BINOMIAL_ICDFInverse binomial cdf
GEOMETRIC_ICDFInverse geometric cdf
POISSON_ICDFInverse Poisson cdf
betad_icdfInverse beta cdf
cauchy_icdfInverse Cauchy cdf
exponential_icdfInverse exponential cdf
gammad_icdfInverse gamma cdf
negbinomial_icdfInverse negative binomial cdf
uniform_icdfInverse uniform cdf
weibull_icdfInverse Weibull cdf

Descriptive

meanMean of a list (weights optional) or of matrix columns
medianMedian
stddevSample standard deviation
stddevpPopulation standard deviation
varianceVariance
quartile1First quartile
quartile3Third quartile
quartiles[min, Q1, median, Q3, max]
quantileQuantile at a value 0–1
correlationCorrelation coefficient
covarianceCovariance
covariance_correlation[covariance, correlation]
cumSumCumulative sums

Regression & fit

linear_regressionFit y=a·x+b → [a,b]
exponential_regressionFit y=b·aˣ → [a,b]
logarithmic_regressionFit y=a·ln x+b
logistic_regressionLogistic fit y′/y=a·y+b
polynomial_regressionBest-fit polynomial of degree n
power_regressionFit y=b·xᵐ → [m,b]
linear_interpolateRegular samples of a polygonal line
splineNatural spline through points
lagrangeLagrange interpolating polynomial

Lists

44

Build

L0…L9Reserved list Home variables
MAKELISTList from an expression over a range
seqVector of expr for var over an interval and step
CONCATConcatenate lists
appendAppend an element to a list/vector
prependPrepend an element
tableAssociative array indexed by strings/reals
list2matSplit a list into rows of n → matrix
mat2listMatrix elements → vector
→LISTRPN stack: builds a list from the highlighted item down to level 1

Access & search

SIZENumber of elements of a list or string; {rows,cols} of a matrix; for a vector the length
lengthLength of a list, string or sequence
POSPosition of an element (0 if absent)
containsIndex of first occurrence (0 if absent)
memberIndex of element in list (element first)
headFirst element
tailAll but the first element
selectElements satisfying a test
removeRemove a value or elements passing a test
suppressDelete first occurrence of an element
shiftShift list elements (or bits of an integer)
revlistReverse a list/vector
REVERSEReverse a list
SORTSort ascending
SUBExtract a sub-object (list, matrix, string, graphic) into a variable
REPLACEOverwrite part of a matrix/vector/list/string from a start position

Set operations

UNIONUnion without duplicates
INTERSECTCommon elements
DIFFERENCEElements not common to both lists

Reduce

ΣLISTSum of elements
πLISTProduct of elements
ΔLISTFirst differences
deltalistDifferences of consecutive terms
cumSumCumulative sums
sumDiscrete sum Σ expr for var=a..b (2 args: discrete antiderivative)
productProduct of expr over a range, or of a list/matrix
countSum of f over elements, or count passing a test

Apply a function

mapApply a function or test to each element
applyApply a function to each element
zipApply a binary function element-wise to two lists
EXECONEvaluate an &-expression over list elements
EVALLISTEvaluate each element of a list
ITERATEApply expr to var n times

Editor

EDITLISTStarts the List Editor loading listvar and displays the specified list

Strings

23

Build & convert

STRINGObject or number → string, with number-format options
EXPRParses a string into a number or expression and returns the result evaluated
catConcatenate objects into a string
formatReal → string with f/s/e format
latexExpression → LaTeX string
CHARReturns the string corresponding to the character codes in vector, or the single code of integer
ASCReturns a list containing the ASCII codes of string
STRINGFROMIDReturns, in the current language, the built-in string associated in the internal string table with the specified integer
+Addition symbol

Inspect

DIMReturns the number of characters in string
SIZENumber of elements of a list or string; {rows,cols} of a matrix; for a vector the length
INSTRINGReturns the index of the first occurrence of str2 in str1
headFirst element
tailAll but the first element
lengthLength of a list, string or sequence

Slice & edit

LEFTReturn the first n characters of string str
RIGHTReturns the last n characters of string str
MIDExtracts n characters from string str starting at index pos
ROTATEPermutation of characters in string str
REPLACEReplaces part of object1 with object2 beginning at start
SUBExtract a sub-object (list, matrix, string, graphic) into a variable
LOWERConverts uppercase characters in a string to lowercase
UPPERConverts lowercase characters in a string to uppercase

Matrices & Vectors

94

Create

M0…M9Reserved matrix/vector Home variables
MAKEMATMatrix from an expression in I (row) and J (col)
IDENMATIdentity matrix of size n
identityIdentity matrix
matrixp×q matrix of a value or a mapping of (j,k)
randMatRandom integer matrix stored in a variable
ranmRandom vector or matrix
randvectorVector of random integers/reals
JordanBlockJordan block matrix
hilbertHilbert matrix
vandermondeVandermonde matrix
mkisomMatrix of an isometry
companionCompanion matrix of a polynomial
diagList → diagonal matrix; matrix → diagonal vector

Shape & elements

SIZENumber of elements of a list or string; {rows,cols} of a matrix; for a vector the length
rowDimNumber of rows
colDimNumber of columns
rowRow n (or rows in an interval)
colColumn n as a vector
TRNTranspose (conjugate transpose for complex)
transposeTranspose (no conjugation)
REDIMResize a matrix/vector (pads with 0)
SUBExtract a sub-object (list, matrix, string, graphic) into a variable
subMatSubmatrix by corner indices
REPLACEOverwrite part of a matrix/vector/list/string from a start position
list2matSplit a list into rows of n → matrix
mat2listMatrix elements → vector

Row / column commands

ADDCOLInsert a column before column n
ADDROWInsert a row before row n
DELCOLDelete a column
DELROWDelete a row
delcolsDelete column(s)
delrowsDelete row(s)
SWAPCOLSwap two columns
SWAPROWSwap two rows
rowSwapSwap two rows
SCALEMultiply a row by a value
mRowMultiply a row by an expression
SCALEADDrow1 := value·row1 + row2
rowAddAdd row i to row j
pivotGaussian elimination pivoting on (n,m)
EDITMATOpen the Matrix Editor on a matrix (title, headers, read-only); returns it

Basic

DETDeterminant
invInverse of a matrix or expression
x⁻¹Reciprocal / matrix inverse (Shift ÷)
RANKRank
TRACETrace
RREFReduced row-echelon form
refRow-echelon form (Gaussian reduction)
|matrix|Returns the Frobenius norm of a matrix
ROWNORMRow norm (max row sum of |aᵢⱼ|)
COLNORMColumn norm
SPECNORMSpectral norm
SPECRADSpectral radius
CONDCondition number (1-norm)
matpowMatrix power by Jordan form
.*Term by term multiplication for matrices
./Term by term division for matrices
.^Term by term exponentiation for matrices
hadamardHadamard bound, or element-wise product

Eigen & forms

EIGENVALEigenvalues (vector)
EIGENVV{eigenvectors, eigenvalues}
eigenvalsEigenvalues
eigenvectsEigenvectors
eigVlJordan matrix of a matrix
jordan[change of basis, Jordan form]
charpolyCharacteristic polynomial coefficients
pminMinimal polynomial of a matrix
choleskyCholesky factor L (A=L·Lᵀ)
ihermiteHermite normal form over Z
hessenbergHessenberg reduction [P,B]
ismithSmith normal form over Z

Factorize & solve

LU{L,U,P} with P·A=L·U
luPA=LU decomposition
LQ{L,Q,P} with P·A=L·Q
QRQR factorization: returns R, stores Q,R in vars
SCHURSchur decomposition
SVDSingular value decomposition {U,S,V}
SVLSingular values
LSQLeast-squares solution of A·X=B
simultSolve linear system(s) in matrix form
linsolveSolve a linear system of equations
basisBasis of the span of the rows
ibasisBasis of the intersection of two spans
kerKernel (null space)
imageImage (column space)
gramschmidtOrthonormal basis for a scalar product

Vectors

CROSSCross product
dotDot product
l1norml1 norm
l2norml2 (Euclidean) norm
maxnorml∞ norm
normalizeVector / complex divided by its norm
vectorVector between two points

CAS: Algebra & Rewrite

78

Simplify & expand

simplifySimplify an expression
normalExpanded irreducible (normal) form
ratnormalRewrite as an irreducible rational fraction
expandExpand products and powers
collectCollect like terms; factor over the current field
factorFactor a polynomial
cFactorFactor over the complex numbers
sqrfreeSquare-free factorization (group equal exponents)
texpandExpand transcendental functions (sin(2x), exp(x+y)…)
linLinearize exponentials: exp(x)^n·exp(y) → exp(nx+y)
tsimplifyRewrite transcendentals as complex exponentials & simplify
canonical_formQuadratic trinomial → a(x−h)²+k
reorderReorder variables of an expression as given

Fractions

numerNumerator of a simplified fraction
denomDenominator of a simplified fraction
partfracPartial-fraction decomposition
cpartfracPartial fractions over the complex field
propfracA/B → Q + R/B (proper fraction)
f2nd[numerator, denominator] of a rational fraction
comDenomSum of fractions → one fraction over a common denominator
mult_conjugateMultiply top and bottom by the conjugate of a square-root expression
mult_c_conjugateMultiply top and bottom by the complex conjugate
exactDecimal → exact rational/real

Equations & parts

leftLeft side of an equation / left end of an interval
rightRight side of an equation / right end of an interval
partnth subexpression of an expression
has1 if the variable occurs in the expression
lnameList of variable names in an expression
lvarList of variable-dependent subfunctions in an expression
algvarMatrix of variables ordered by algebraic extension
substSubstitute a value for a variable
|Where: substitute values / state a domain for variables in an expression
idIdentity function: returns its argument(s) as a vector

Exp & log rewrite

lncollectln a + n·ln b → ln(a·bⁿ)
lnexpandln(3x) → ln 3 + ln x
powexpanda^(b+c) → a^b·a^c
exp2powe^(n·ln x) → xⁿ
pow2expa^b → e^(b·ln a)
expexpandexp(3x) → exp(x)^3
exp2trige^(ix) → cos x + i·sin x
sincosComplex exponentials → sin and cos
hyp2expsinh/cosh/tanh → exponentials
halftan_hyp2exptrig → tan(x/2), hyperbolics → exp

Trig rewrite

trigexpandExpand sin(3x), cos(a+b)…
tlinLinearize trig products and powers
tcollectLinearize and collect sin/cos of the same angle
trigsinSimplify with sin²+cos²=1, preferring sin
trigcosSimplify with sin²+cos²=1, preferring cos
trigtanSimplify with sin²+cos²=1, preferring tan
trig2expsin/cos/tan → complex exponentials
halftansin, cos, tan → tan(x/2)
shift_phaseApply a π/2 phase shift to a trig expression
sin2costansin x → cos x·tan x
cos2sintancos x → sin x / tan x
tan2sincostan x → sin x / cos x
tan2sincos2tan x → sin 2x / (1+cos 2x)
tan2cossin2tan x → (1−cos 2x) / sin 2x

Inverse-trig rewrite

asin2acosasin x → π/2 − acos x
asin2atanasin x → atan(x/√(1−x²))
acos2asinacos x → π/2 − asin x
cos2atanacos x → π/2 − atan(x/√(1−x²))
atan2asinatan x → asin(x/√(1+x²))
atan2acosatan x → π/2 − acos(x/√(1+x²))
atrig2lnInverse trig → natural logarithms

Variables & assumptions

assumeState an assumption about a CAS variable (assume(n,integer))
additionallyAdd a further assumption (additionally(n>5))
purgeUnassign a CAS variable
restartPurge all CAS variables
stoCAS store: sto(value, var)
QUOTEReturn an expression unevaluated
EVALEvaluate an expression
evalfNumeric evaluation to n significant digits
unapplyExpression + variable → function object
function_diffDerivative of a function as a mapping
typeCAS type of an object (DOM_LIST, DOM_STRING…)
floatReal (float) domain marker for assume/type
whenCAS inline conditional when(test,a,b)
PIECEWISEPiecewise function from (condition, expression) pairs

CAS: Calculus

40

Derivatives

diffDerivative / partial derivative (x$3 = third order)
Partial-derivative template
nDerivNumeric derivative (f(x+h)−f(x−h))/2h
function_diffDerivative of a function as a mapping
fMaxx that maximizes an expression
fMinx that minimizes an expression

Integrals

intIndefinite or definite integral
Integral (template key or int)
ibpuIntegration by parts given u
ibpdvIntegration by parts given v
prevalF(b) − F(a)
rombergNumeric definite integral (Romberg)
residueResidue of an expression at a point

Limits & series

limitLimit at a point or ±∞ (dir −1 left, 0 both, 1 right)
seriesSeries expansion at a point (default order 5)
taylorTaylor expansion (default x=0, order 5)
divpcTaylor polynomial of a quotient of polynomials
padePadé rational approximation
order_sizeRemainder O-term of a series
bounded_functionMarker returned by limit for a bounded function
sum_riemannClosed form of a sum seen as a Riemann sum

Sums & products

sumDiscrete sum Σ expr for var=a..b (2 args: discrete antiderivative)
ΣSummation template
productProduct of expr over a range, or of a list/matrix
seqVector of expr for var over an interval and step

Vector calculus

gradGradient (vector of partial derivatives)
curlCurl of a vector field
divergenceDivergence of a vector field
hessianHessian matrix
laplacianLaplacian
potentialScalar potential of a gradient field
vpotentialVector potential U with curl(U)=V

Transforms

laplaceLaplace transform
ilaplaceInverse Laplace transform
fftDiscrete Fourier transform (or in Z/pZ)
ifftInverse discrete Fourier transform
ztransz-transform of a sequence
fourier_annth Fourier cosine coefficient aₙ
fourier_bnnth Fourier sine coefficient bₙ
fourier_cnnth complex Fourier coefficient cₙ

Solvers

29

Symbolic

solveSolve equation(s) exactly; guess or interval allowed
zerosReal zeros of an expression / system
cSolveComplex solutions of equation(s)
cZerosComplex zeros of an expression / system
linsolveSolve a linear system of equations
deSolveSolve an ordinary differential equation
rsolveClosed form of a recurrence relation
seqsolveClosed form of a recurrence (x = previous term)

Numeric

fSolveNumeric solve (guess/interval; bisection/newton/newtonj)
fsolveNumeric solve of an equation or system
newtonNewton iteration root estimate
FNROOTNumeric root of an expression near a guess
odesolveNumeric ODE solution at a final value
SOLVESolve-app: solve En for var from a guess
prootNumeric roots of a polynomial (or coefficient vector)
POLYROOTZeros of a polynomial given by coefficient vector

App solvers

Solve2x2Solve a 2×2 linear system
Solve3x3Solve a 3×3 linear system
LinSolveSolve a 2×2/3×3 system from an augmented matrix
QuadSolveReal roots of ax²+bx+c
QuadDeltaDiscriminant b²−4ac
LinearSlopeSlope through two points
LinearYIntercepty-intercept from a point and slope
AASTriangle from angle, angle, side
ASATriangle from angle, side, angle
SASTriangle from side, angle, side
SSATriangle from side, side, angle
SSSTriangle from three sides
DoSolveSolve the current Triangle Solver problem

Polynomials

55

Roots & coefficients

prootNumeric roots of a polynomial (or coefficient vector)
POLYROOTZeros of a polynomial given by coefficient vector
POLYCOEFCoefficients of the polynomial with the given roots
pcoefRoots → coefficients
fcoeffRoots/poles with orders → rational function
frootRoots and poles of a rational function with multiplicities
coeffCoefficient vector of a polynomial (or one coefficient)
lcoeffLeading coefficient
symb2polyPolynomial → coefficient vector
poly2symbCoefficient vector → polynomial
degreeDegree of a polynomial
valuationLowest-degree exponent
complexrootComplex roots with multiplicities / isolating rectangles
crationalrootComplex rational roots
sturmabNumber of sign changes / roots in [a,b]
sturmseqSturm sequence

Evaluate

POLYEVALEvaluate a coefficient polynomial at a value
pevalEvaluate a coefficient polynomial at a value
hornerEvaluate a polynomial by Horner's method
ptaylTaylor polynomial Q with P(x)=Q(x−a)

Divide & GCD

quoPolynomial quotient
remPolynomial remainder
quorem[quotient, remainder] of polynomials
gcdGCD of polynomials
lcmLCM of polynomials
egcdExtended polynomial GCD [U,V,D]
abcuvU,V with A·U+B·V=C
modgcdPolynomial GCD (modular algorithm)
ezgcdMultivariate polynomial GCD (EZ-GCD)
lgcdGCD of a list/vector of integers or polynomials
divisDivisors of a polynomial
factorsFactors with multiplicities
factor_xnFactor out xⁿ
contentGCD of the coefficients
icontentGCD of the integer coefficients
primpartPolynomial divided by its content
resultantResultant of two polynomials
sylvesterSylvester matrix
chinremPolynomial Chinese remainder

Special polynomials

cyclotomicCoefficients of the nth cyclotomic polynomial
hermiteHermite polynomial Hₙ
laguerreLaguerre polynomial
legendreLegendre polynomial Pₙ
tchebyshev1Chebyshev Tₙ
tchebyshev2Chebyshev Uₙ
lagrangeLagrange interpolating polynomial
splineNatural spline through points
randpolyRandom polynomial coefficients

Gröbner & forms

gbasisGröbner basis
greduceRemainder modulo a Gröbner basis
GFGalois field GF(pⁿ)
a2qSymmetric matrix → quadratic form
q2aQuadratic form → matrix
gaussQuadratic form as sum of squares (Gauss)
pminMinimal polynomial of a matrix

Integers & Number Theory

27

Divisibility

idivisList of divisors of an integer
ifactorPrime factorization of an integer
ifactorsPrime factors with multiplicities [p1,m1,p2,m2…]
gcdGreatest common divisor of integers
lcmLeast common multiple of integers
igcdGCD of integers, rationals or polynomials
iegcdExtended GCD [u,v,d] with au+bv=d
lgcdGCD of a list/vector of integers or polynomials
iquoInteger quotient
iremInteger remainder
iquorem[quotient, remainder]
iabcuv[u,v] with au+bv=c
even1 if even
odd1 if odd

Primes

isPrimePrimality test
ithprimenth prime (n ≤ 200000)
nextprimeNext prime after n
prevprimePrevious prime before n
eulerEuler's totient φ(n)

Modular

powmodaⁿ mod p
ichinremChinese remainder for [a,p],[b,q]
chremChinese remainders for two lists
fracmodFraction a/b with n ≡ a/b (mod p)
pa2b2Prime p≡1 (mod 4) → [a,b] with a²+b²=p
jacobi_symbolJacobi symbol
legendre_symbolLegendre symbol (or Legendre polynomial)
hamdistHamming distance between two integers

Binary Integers (#)

16

Base & wordsize

BaseDefault integer base (0 bin 1 oct 2 dec 3 hex)
BitsInteger wordsize
SignedSigned integers on/off
SETBASEDisplay an integer in another base
GETBASEBase of an integer (0 default 1 bin 2 oct 3 hex)
SETBITSSet the wordsize of an integer
GETBITSWordsize used by an integer
B→RBase-marked integer → decimal real
R→BReal → integer in the default base

Bitwise

BITANDBitwise AND
BITORBitwise OR
BITXORBitwise XOR
BITNOTBitwise NOT
BITSLShift left n bits
BITSRShift right n bits
shiftShift list elements (or bits of an integer)

Input & Output

15

Dialogs

INPUTDialog box: one or many fields → variables; returns 1 OK / 0 Cancel
CHOOSEChoose box; var gets item number (0 = Cancel)
MSGBOXMessage box; optional OK/Cancel returns 1/0
EDITLISTStarts the List Editor loading listvar and displays the specified list
EDITMATOpen the Matrix Editor on a matrix variable

Keys & touch

GETKEYKey id 0–50 of first buffered key, −1 if none (non-blocking)
ISKEYDOWNReturns true (non-zero) if the key whose key_id is provided is currently pressed, and false (0) if it is not
MOUSETouch/pointer state: {x,y,x0,y0,type} lists
WAITPause n seconds (0 = 1 min; −1 = until key/touch on newer fw)

Text output

PRINTWrite to the terminal (no argument clears it)
TEXTOUTDraw text (Cartesian coords); returns end x
TEXTOUT_PDraw text at pixel x,y with font/color/clip/background; returns end x
TEXTSIZENewer firmware: returns {width, height} in pixels of a string drawn in the given font (0=current, 1=small … up to 7 in later firmware)
FREEZEHold the drawn screen until a key is pressed
DRAWMENUDraws a six-button menu at the bottom of the display, with labels string1, string2, …, string6

Graphics (G0–G9)

37

Screen & GROBs

G0…G9Graphics variables (GROBs)
RECTDraw / fill a rectangle in Cartesian coords; RECT() clears the screen
RECT_PDraw / fill a rectangle in pixel coords; RECT_P(G1) clears G1
DIMGROBCreate/size a GROB (Cartesian) filled with a color or list data
DIMGROB_PCreate/size a GROB w×h pixels filled with a color or list data
GROBWWidth of a GROB
GROBW_PWidth of a GROB in pixels
GROBHHeight of a GROB
GROBH_PHeight of a GROB in pixels
SUBGROBCopy an area of a GROB into another GROB (Cartesian)
SUBGROB_PCopy an area of a GROB into another GROB (pixels)
BLITCopy a region of one GROB into another (Cartesian), transparent color & alpha
BLIT_PCopy a region of one GROB into another (pixels), transparent color & alpha
INVERTReverse video of a region (Cartesian)
INVERT_PReverse video of a region (pixels)
FREEZEHold the drawn screen until a key is pressed

Colors & coordinates

RGBReturns an integer number that can be used as the color parameter for a drawing function, based on Red-, Green-, and Blue-component values (each 0 to 255)
C→PXConverts from Cartesian coordinates to screen coordinates
PX→CConverts from screen coordinates to Cartesian coordinates

Pixels & lines

PIXONSet a pixel (Cartesian) to a color
PIXON_PSet a pixel (x,y) to a color
PIXOFFSet a pixel to white (Cartesian)
PIXOFF_PSet a pixel to white (pixels)
GETPIXColor of a pixel (Cartesian)
GETPIX_PColor of a pixel (pixels)
LINEDraw a line (Cartesian); advanced form draws many lines with 3D transform
LINE_PDraw a line (pixels); advanced form draws many lines with 3D transform

Shapes

ARCCircle or arc (Cartesian center, radius in pixels)
ARC_PCircle or arc (pixel coordinates)
TRIANGLEFilled triangle (Cartesian), gradient colors, alpha, z-clipping
TRIANGLE_PFilled triangle (pixels), gradient colors, alpha, z-clipping
FILLPOLYFilled polygon from a list of points (Cartesian)
FILLPOLY_PFilled polygon from a list of pixel points

Text

TEXTOUTDraw text (Cartesian coords); returns end x
TEXTOUT_PDraw text at pixel x,y with font/color/clip/background; returns end x
TEXTSIZENewer firmware: returns {width, height} in pixels of a string drawn in the given font (0=current, 1=small … up to 7 in later firmware)
DRAWMENUDraws a six-button menu at the bottom of the display, with labels string1, string2, …, string6

Apps & Views

117

Launch & views

STARTAPPLaunch an app by name (runs its START())
STARTVIEWOpen view n of the current app (0 Symb 1 Plot 2 Num 3–5 setups 6 Info 7 Views 8+ special; −1 Home …)
VIEWAdd a custom option to the View menu (block form)
CHECKSelect (check) Symbolic definition n
UNCHECKDeselect Symbolic definition n
ISCHECK1 if Symbolic definition n is checked

App content variables

AVarsApp variables: list names, read/write by index or name
DelAVarsDelete an app variable by index or name
AFilesFiles attached to the app: names, contents, store
AFilesBBinary access to app files: size, read bytes, write bytes
DelAFilesDelete a file attached to the app
ANoteANote returns the note associated with an HP app
AProgramAProgram returns the program associated with an HP Prime app

Function app

AREAFunction-app function: signed area (numeric integral) between Fn and the x-axis — or between Fn and Fm — from a to b
EXTREMUMFunction-app function: x-value of the extremum of Fn nearest to guess (Fcn ▸ Extremum)
ISECTFunction-app function: x-value where Fn and Fm intersect, nearest to guess (Fcn ▸ Intersection)
ROOTFunction-app function: root of Fn nearest to guess (Fcn ▸ Root)
SLOPEFunction-app function: numeric derivative (slope) of Fn at x (Fcn ▸ Slope)
F0…F9Function-app definitions in X [Function]

Sequence app

RECURSESequence-app function used to define a sequence Un in a program: gives the recurrence expression (in terms of N, U(N-1), U(N-2)) and the first one or two terms
U0…U9Sequence definitions in N (set with RECURSE) [Sequence]

Solve app

SOLVESolve-app: solve En for var from a guess
E0…E9Solve-app equations [Solve]

Statistics 1Var

Do1VStatsCompute 1-var statistics for Hn into result vars
SetFreqSet the frequency column/value of Hn
SetSampleSet the data column of Hn
H1…H5Stats 1Var analyses: {'data','freq',plottype,option,color} [Statistics 1Var]
D0…D9Stats 1Var data columns (lists) [Statistics 1Var]

Statistics 2Var

Do2VStatsCompute 2-var statistics for Sn into result vars
SetDependSet the dependent column of Sn
SetIndepSet the independent column of Sn
PredXPredict x from y using the first active fit
PredYPredict y from x using the first active fit
ResidResiduals of an analysis
S1…S5Stats 2Var analyses: {'x','y','freq',fit,'expr',color,mark,fitcolor} [Statistics 2Var]
C0…C9Stats 2Var data columns (lists) [Statistics 2Var]

Inference

DoInferenceRun the current Inference calculation into result vars
HypZ1meanThe one-sample Z-test for a mean
HypZ2meanThe two-sample Z-test for means
HypZ1propThe one-proportion Z-test
HypZ2propThe two-sample Z-test for comparing two proportions
HypT1meanThe one-sample t-test for a mean
HypT2meanThe two-sample T-test for means
ConfZ1meanThe one-sample Normal confidence interval for a mean
ConfZ2meanThe two-sample Normal confidence interval for the difference of two means
ConfZ1propThe one-sample Normal confidence interval for a proportion
ConfZ2propThe two-sample Normal confidence interval for the difference of two proportions
ConfT1meanThe one-sample Student’s T confidence interval for a mean
ConfT2meanThe two-sample Student’s T confidence interval for the difference of two means
Chi2GOFChi-square goodness of fit test
Chi2TwoWayChi-square two-way test
LinRegrTConfSlopeThe linear regression confidence interval for the slope
LinRegrTConfIntThe linear regression confidence interval for the intercept
LinRegrTMeanRespThe linear regression confidence interval for a mean response
LinRegrTPredIntThe linear regression prediction interval for a future response
LinRegrTTestThe linear regression t-test

Finance (TVM)

CalcFVSolves for the future value of an investment or loan
CalcIPYRSolves for the interest rate per year of an investment or loan
CalcNbPmtSolves for the number of payments in an investment or loan
CalcPMTSolves for the value of a payment for an investment or loan
CalcPVSolves for the present value of an investment or loan
DoFinanceSolve TVM for a variable (like tapping Solve)
TvmFVSolves for the future value of an investment or loan
TvmIPYRSolves for the interest rate per year of an investment or loan
TvmNbPmtSolves for the number of payments in an investment or loan
TvmPMTSolves for the value of a payment for an investment or loan
TvmPVSolves for the present value of an investment or loan

Finance (other)

IntConvNomReturns the nominal interest rate
IntConvEffReturns the effective interest rate
IntConvCPYRReturns the number of compounding periods in a year
DateDaysDays between dates (optional 360-day calendar)
CashFlowIRRReturns the Internal Rate of Return
CashFlowMIRRReturns the Modified Internal Rate of Return
CashFlowFMRRReturns the Financial Management Rate of Return
CashFlowTotalCalculates the total of all inputs
CashFlowNPVCalculates the Net Present Value
CashFlowNFVCalculates the Net Future Value
CashFlowNUSCalculates the Net Uniform Series
CashFlowPBCalculates the Discounted Payback period
DepreciateReturns the depreciation schedule when given the method of calculation, the depreciable cost at the time of purchase, the expected return amount from the salvage sale of the asset, the expected life in years, the moment of first use, and the factor of depreciation as a percentage
BrkEvFixedReturns the fixed cost to develop and market a product
BrkEvQuantReturns the quantity of units sold
BrkEvCostReturns the cost per unit
BrkEvPriceReturns the unit price
BrkEvProfitReturns the profit
ChangePriceCalculates sales price given item cost and either markup or margin percentage
ChangeCostCalculates item cost given sales price and either markup or margin percentage
PercentMarginReturns the margin, a percentage of cost; that is, ((Price - Cost)/Cost) * 100
PercentMarkupReturns the markup, a percentage of price; that is, ((Price - Cost)/Price) * 100
ChangeOldReturns the old number in a percent change calculation when given the new number and percentage
ChangeNewReturns the new number in a percent change calculation when given the old number and percentage
PercentTotalCalculates the part-total percentage
PercentChangeCalculates the percent change
BondYieldReturns the yield percent to maturity (or call) date at a given price
BondPriceReturns the bond price per 100.00 face value at a given yield percentage
BlackScholesReturns both the call price and put price for options

Spreadsheet

CellSpreadsheet cell access; also Spreadsheet.A1 from Home/programs
SUMCalculates the sum of a range of numbers
AVERAGECalculates the arithmetic mean of a range of numbers
AMORTAmortization
STAT1The STAT1 function provides a range of one-variable statistics based on lists of data
STAT2The STAT2 function provides a range of two-variable statistics
REGRSAttempts to fit the input data to a specified function (default is linear)
PredYReturns the predicted Y for a given x
PredXReturns the predicted x for a given y
HypZ1meanThe one-sample Z-test for a mean
HypZ2meanThe two-sample Z-test for the difference of two means
HypZ1propThe one-sample Z-test for a proportion
HypZ2propThe two-sample Z-test for comparing two proportions
HypT1meanThe one-sample t-test for a mean
HypT2meanThe two-sample T-test for the difference of two means
ConfZ1meanThe one-sample Normal confidence interval for a mean
ConfZ2meanThe two-sample Normal confidence interval for the difference of two means
ConfZ1propThe one-sample Normal confidence interval for a proportion
ConfZ2propThe two-sample Normal confidence interval for the difference of two proportions
ConfT1meanThe one-sample Student’s T confidence interval for a mean
ConfT2meanThe two-sample Student’s T confidence interval for the difference of two means

Geometry (CAS)

110

Points

pointPoint from coordinates
point2dRandom-position points
elementPoint on an object / slider a..b
midpointMidpoint
centerCenter of a circle
single_interOne intersection point near a point
interAll intersections of two curves
division_pointPoint dividing AB in ratio k
barycenterWeighted barycenter
isobarycenterCentroid of points
orthocenterOrthocenter
harmonic_conjugateHarmonic conjugate of a point/line
harmonic_divisionHarmonic division
polar_pointPolar (r,θ) → point

Lines

segmentSegment
half_lineRay
lineLine (2 points, equation, or point+slope)
parallelParallel through a point
perpendicularPerpendicular through a point
perpen_bisectorPerpendicular bisector
tangentTangent(s) to a curve
median_lineMedian line
altitudeAltitude
bisectorAngle bisector
exbisectorExterior angle bisector
LineHorzHorizontal line y=a
LineVertVertical line x=a
LineTanTangent line to f at a value
polarPolar line of a point
radical_axisRadical axis of two circles
vectorVector between two points

Polygons

triangleTriangle
isosceles_triangleIsosceles triangle
right_triangleRight triangle
equilateral_triangleEquilateral triangle
quadrilateralQuadrilateral
parallelogramParallelogram
rhombusRhombus
rectangleRectangle
squareSquare
polygonPolygon from points
isopolygonRegular polygon
open_polygonOpen polygonal line
convexhullConvex hull
verticesVertices of a polygon
vertices_abcaClosed vertex list

Curves

circleCircle
circumcircleCircumcircle
excircleExcircle
incircleIncircle
ellipseEllipse
hyperbolaHyperbola
parabolaParabola
conicConic from an equation
reduced_conicReduced form of a conic
locusLocus of a point
polePole of a line
powerpcPower of a point w.r.t. a circle

Plots

plotfuncPlot y=f(x)
plotparamParametric plot
plotpolarPolar plot
plotseqSequence (cobweb) plot
plotimplicitImplicit plot
plotinequationPlot inequality region
plotcontourContour plot
plotfieldSlope field
plotodeODE solution plot
plotlistPolyline through points
polygonplotPolylines from matrix columns
polygonscatterplotScatter+polyline from matrix columns

Transforms

translationTranslate by a vector
reflectionReflect in a line or point
rotateRotate about a point
homothetyDilation (scale about a point)
similaritySimilarity (scale + rotate)
projectionOrthogonal projection onto a curve
inversionInversion in a circle
reciprocationPole/polar reciprocation

Measure

abscissax-coordinate
ordinatey-coordinate
coordinatesCoordinates of points
affixPoint → complex number
equationCartesian equation of an object
parameqParametric equation
polar_coordinatesPoint → [r,θ]
distanceDistance
distance2Squared distance
radiusRadius
perimeterPerimeter
slopeSlope
areaArea of a polygon/circle or under a curve
angleAngle at a vertex
arcLenArc length
extract_measureValue of a measurement variable

Tests

is_collinearPoints collinear?
is_concyclicPoints on one circle?
is_elementPoint on object?
is_parallelLines parallel?
is_perpendicularLines perpendicular?
is_orthogonalOrthogonal lines/circles?
is_isoscelesIsosceles?
is_equilateralEquilateral?
is_parallelogramParallelogram? (1) rhombus 2 rectangle 3 square 4
is_rectangleRectangle?
is_rhombusRhombus?
is_squareSquare?
is_conjugateConjugate points/lines w.r.t. a circle?
is_harmonicHarmonic division?
is_harmonic_circle_bundleHarmonic circle bundle?
is_harmonic_line_bundleHarmonic line bundle?

Time, Date & Units

15

Clock

TICKSMilliseconds since boot
TimeClock time as H°MM′SS″ (read or set)
DateSystem date YYYY.MMDD (read or set)
TOffAuto-off delay in ms
WAITPause n seconds (0 = 1 min; −1 = until key/touch on newer fw)

Dates (YYYY.MMDD)

DATEADDAdd days to a YYYY.MMDD date
DAYOFWEEKDay of week 1=Mon…7=Sun
DELTADAYSDays between two dates
DateDaysDays between dates (optional 360-day calendar)

Sexagesimal

→HMSDecimal → D°M′S″
HMS→D°M′S″ → decimal

Units

CONVERTConvert a measurement to another unit (also bases, continued fractions)
MKSAExpress in base MKSA units
UFACTORFactor a compound unit into constituent units
USIMPLIFYSimplify a unit expression

Variables & System

39

Home variables

A…ZReserved real-number Home variables A to Z (and θ)
θReal Home variable θ (theta), same family as A–Z. Independent variable of the Polar app
Z0…Z9Reserved complex-number Home variables
L0…L9Reserved list Home variables
M0…M9Reserved matrix/vector Home variables
G0…G9Graphics variables (GROBs)
AnsLast result; Ans(n) = nth history item; error number inside IFERR

Home settings

HAngleSets the angle format for the Home view
HFormatSets the number display format used in the Home view
HDigitsSets the number of digits for a number format other than Standard in the Home view
HSeparatorHome setting: digit-grouping / decimal separator style (index into the 11 built-in separator formats on Home Settings page 1)
HComplexEnables a complex result from a real input
EntryContains an integer that indicates the entry mode
BaseDefault integer base (0 bin 1 oct 2 dec 3 hex)
BitsInteger wordsize
SignedSigned integers on/off
LanguageContains an integer indicating the system language
DateSystem date YYYY.MMDD (read or set)
TimeClock time as H°MM′SS″ (read or set)
TOffAuto-off delay in ms

App symbolic setup

AAngleSets the angle mode
AComplexSets the complex number mode
ADigitsContains the number of decimal places to use for the Fixed, Scientific, or Engineering number formats in the app’s Symbolic Setup
AFormatDefines the number display format used for number display in the Home view and to label axes in the Plot view

Introspection

HVarsHome user variables: names, read/write, function params
DelHVarsDelete a home user variable by index or name
NotesNotes by index or name; assign to create/replace/delete
ProgramsProgram sources by index or name; assign to create/replace/delete
AVarsApp variables: list names, read/write by index or name
DelAVarsDelete an app variable by index or name
AFilesFiles attached to the app: names, contents, store
AFilesBBinary access to app files: size, read bytes, write bytes
DelAFilesDelete a file attached to the app
ANoteANote returns the note associated with an HP app
AProgramAProgram returns the program associated with an HP Prime app
MEMORYFree memory / storage as a list, or one of them
VERSIONFirmware/hardware/CAS version strings
TYPEType number of an object (0 real 1 int 2 str 3 cplx 4 mat 6 list 8 fn 9 unit)
typeCAS type of an object (DOM_LIST, DOM_STRING…)

App Variables: Plot & Numeric

69

Ranges & axes

Xmin, XmaxSets the minimum and maximum horizontal values of the plot screen
Ymin, YmaxSets the minimum and maximum vertical values of the plot screen
XtickSets the distance between tick marks for the horizontal axis
YtickSets the distance between tick marks on the vertical axis
XzoomSets the horizontal zoom factor
YzoomIn Plot View, press then . Scroll to Set Factors, select it and tap . Enter the value for Y Zoom and tap
AxesTurns axes on or off
LabelsDraws labels in Plot View showing X and Y ranges
GridDotsTurns the background dot grid in Plot view on or off
GridLinesTurns the background line grid in Plot View on or off
CursorSets the type of cursor
RecenterRecenters at the cursor when zooming
MethodGraphing method: 0 adaptive 1 fixed segments 2 fixed dots [Function, Solve, Parametric, Polar, Statistics 2Var]

Independent variable

Tmin, TmaxSets the minimum and maximum independent variable values [Parametric]
TstepSets the step size for the independent variable [Parametric]
θmin, θmaxSets the minimum and maximum independent values [Polar]
θstepSets the step size for the independent variable [Polar]
Nmin, NmaxDefines the minimum and maximum values for the independent variable [Sequence]
SeqPlotEnables you to choose between a Stairstep or a Cobweb plot [Sequence]
Hmin, HmaxDefines the minimum and maximum values for histogram bars [Statistics 1Var]
HwidthSets the width of histogram bars [Statistics 1Var]
S1mark…S5markSets the mark to use for scatter plots [Statistics 2Var]
PixSizeSets the dimensions of each square pixel in the Geometry app [Geometry]
ScrollTextDetermines whether the current command in Plot view scrolls automatically or manually [Geometry]

Background image

ImageNameControls which image is set as the background in Plot view [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageDisplayControls how a background image is displayed [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageOpacityControls the opacity of a background image in Plot view (if any) [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageXminControls where the left edge of a background image is set when the XY Range option is selected in Plot view [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageXmaxControls where the right edge of a background image is set when the XY Range option is selected in Plot view [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageYminControls where the bottom edge of a background image is set when the XY Range option is selected in Plot view [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]
ImageYmaxControls where the top edge of a background image is set when the XY Range option is selected in Plot view [Function, Advanced Graphing, Graph 3D, Statistics 1Var, Statistics 2Var, Parametric, Polar, Sequence]

Graph 3D

ZminContains the minimum z-value for Plot view [Graph 3D]
ZmaxContains the maximum z-value for Plot view [Graph 3D]
ZtickContains the tick mark spacing for the z-axis [Graph 3D]
ZzoomContains the zoom factor for the z-axis [Graph 3D]
BoxAxesControls how the three axes are drawn [Graph 3D]
BoxDotsControls how grid dots are drawn on the box frame [Graph 3D]
BoxFrameControls how the box frame is drawn [Graph 3D]
BoxLinesControls how the grid lines are drawn [Graph 3D]
BoxScaleControls the scale factor used to draw the box frame [Graph 3D]
BoxSidesControls which faces of the box frame are colored [Graph 3D]
KeyAxesControls whether the key axes are displayed in the top-left corner of Plot view [Graph 3D]
PoseXaxisContains the x-coordinate of the endpoint of the rotation vector [Graph 3D]
PoseYaxisContains the y-coordinate of the endpoint of the rotation vector [Graph 3D]
PoseZaxisContains the z-coordinate of the endpoint of the rotation vector [Graph 3D]
PoseTurnContains the angle of rotation (in radians) of the pose axis [Graph 3D]
SurfaceContains a list that defines the color scheme [Graph 3D]
FZ0…FZ9Graph 3D definitions in X and Y [Graph 3D]

Numeric view

NumStartSets the starting value for a table in Numeric view [Function Parametric Polar Sequence]
NumStepSets the step size (increment value) for the independent variable in Numeric view [Function Parametric Polar Sequence]
NumZoomSets the zoom factor in the Numeric view [Function Parametric Polar Sequence]
NumTypeSets the table format [Function Parametric Polar Sequence Advanced Graphing]
NumIndepSpecifies the list of independent values (or two-value sets of independent values) to be used by Build Your Own Table [Function Parametric Polar Sequence Advanced Graphing]
NumXStartSets the starting number for the X-values in a table in Numeric view [Advanced Graphing Graph 3D]
NumYStartSets the starting value for the Y-values in a table in Numeric view [Advanced Graphing Graph 3D]
NumXStepSets the step size (increment value) for the independent X variable in Numeric view [Advanced Graphing Graph 3D]
NumYStepSets the step size (increment value) for the independent Y variable in Numeric view [Advanced Graphing Graph 3D]
NumXZoomAdvanced Graphing
NumYZoomSets the zoom factor for the values in the Y column in the Numeric view [Advanced Graphing]

Symbolic definitions

F0…F9Function-app definitions in X [Function]
E0…E9Solve-app equations [Solve]
R0…R9Polar definitions in θ [Polar]
X0,Y0…X9,Y9Parametric definitions in T [Parametric]
U0…U9Sequence definitions in N (set with RECURSE) [Sequence]
H1…H5Stats 1Var analyses: {'data','freq',plottype,option,color} [Statistics 1Var]
S1…S5Stats 2Var analyses: {'x','y','freq',fit,'expr',color,mark,fitcolor} [Statistics 2Var]
FZ0…FZ9Graph 3D definitions in X and Y [Graph 3D]

Data columns

C0…C9Stats 2Var data columns (lists) [Statistics 2Var]
D0…D9Stats 1Var data columns (lists) [Statistics 1Var]

App Variables: Results & Inputs

150

Function results

RootContains the value from the last use of the Root function from the menu in the Plot view of the Function app
IsectContains the value from the last use of the Isect function from the menu in the Plot view of the Function app
SlopeContains the value from the last use of the Slope function from the menu in the Plot view of the Function app
SignedAreaContains the value from the last use of the Signed Area function from the menu in the Plot view of the Function app
ExtremumContains the value from the last use of the Extremum function from the menu in the Plot view of the Function app

Stats 1Var results

NbItemContains the number of data points in the current 1-variable analysis (H1-H5)
MinValContains the minimum value of the data set in the current 1-variable analysis (H1-H5)
Q1Contains the value of the first quartile in the current 1-variable analysis (H1-H5)
MedValContains the median in the current 1-variable analysis (H1-H5)
Q3Contains the value of the third quartile in the current 1-variable analysis (H1-H5)
MaxValContains the maximum value in the current 1-variable analysis (H1-H5)
ΣXContains the sum of the data set in the current 1-variable analysis (H1-H5)
ΣX2Contains the sum of the squares of the data set in the current 1-variable analysis (H1-H5)
MeanXContains the mean of the data set in the current 1-variable analysis (H1-H5)
sXContains the sample standard deviation of the data set in the current 1-variable analysis (H1-H5)
σXContains the population standard deviation of the data set in the current 1-variable analysis (H1-H5)
serrXContains the standard error of the data set in the current 1-variable analysis (H1-H5)
ssXContains the sum of the squared deviations of x for the current statistical analysis (H1–H5)

Stats 2Var results

NbItemContains the number of data points in the current 2-variable analysis (S1-S5)
CorrContains the correlation coefficient from the latest calculation of summary statistics
CoefDetContains the coefficient of determination from the latest calculation of summary statistics
sCovContains the sample covariance of the current 2-variable statistical analysis (S1-S5)
σCovContains the population covariance of the current 2-variable statistical analysis (S1-S5)
ΣXYContains the sum of the X·Y products for the current 2-variable statistical analysis (S1-S5)
MeanXContains the mean of the independent values (X) of the current 2-variable statistical analysis (S1-S5)
ΣXContains the sum of the independent values (X) of the current 2-variable statistical analysis (S1-S5)
ΣX2Contains the sum of the squares of the independent values (X) of the current 2-variable statistical analysis (S1-S5)
sXContains the sample standard deviation of the independent values (X) of the current 2-variable statistical analysis (S1-S5)
σXContains the population standard deviation of the independent values (X) of the current 2-variable statistical analysis (S1-S5)
serrXContains the standard error of the independent values (X) of the current 2-variable statistical analysis (S1-
ssXContains the sum of the squared deviations of x for the current statistical analysis (S1–S5)
MeanYContains the mean of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
ΣYContains the sum of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
ΣY2Contains the sum of the squares of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
sYContains the sample standard deviation of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
σYContains the population standard deviation of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
serrYContains the standard error of the dependent values (Y) of the current 2-variable statistical analysis (S1-S5)
ssYContains the sum of the squared deviations of y for the current statistical analysis (S1–S5)

Inference inputs

MethodInference method: 0 hyp test 2 conf interval 3 χ² 4 regression [Inference]
InfTypeDetermines the type of hypothesis test or confidence interval [Inference]
AltHypDetermines the alternative hypothesis used for hypothesis testing [Inference]
AlphaSets the alpha level for the hypothesis test
ConfSets the confidence level for the confidence interval
Mean1Sets the value of the mean of a sample for a 1-mean hypothesis test or confidence interval
Mean2For a 2-mean test or interval, sets the value of the mean of the second sample
μ0Sets the assumed value of the population mean for a hypothesis test
n1Sets the size of the sample for a hypothesis test or confidence interval
n2For a test or interval involving the difference of two means or two proportions, sets the size of the second sample
π0Sets the assumed proportion of successes for the One-proportion Z-test
PooledDetermine whether or not the samples are pooled for tests or intervals using the Student’s T-distribution involving two means
s1Sets the sample standard deviation for a hypothesis test or confidence interval
s2For a test or interval involving the difference of two means or two proportions, sets the sample standard deviation of the second sample
σ1Sets the population standard deviation for a hypothesis test or confidence interval
σ2For a test or interval involving the difference of two means or two proportions, sets the population standard deviation of the second sample
x1Sets the number of successes for a one-proportion hypothesis test or confidence interval
x2For a test or interval involving the difference of two proportions, sets the number of successes of the second sample
XlistContains the list of explanatory data (X) for the regression tests and intervals
YlistContains the list of response data (Y) for the regression tests and intervals
XvalFor the confidence interval for the mean response and prediction interval for a future response, contains the value of the explanatory variable (X) under scrutiny
ObsListContains the observed count data for the chi-square goodness of fit test
ObsMatContains the observed counts by category for the chi-square two-way test
ExpListContains the expected counts by category for the chi-square goodness of fit test
ProbListContains the expected probabilities by category for the chi-square goodness of fit test

Inference results

ResultFor hypothesis tests, contains 0 or 1 to indicate rejection or failure to reject the null hypothesis
TestScoreContains the Z- or t-distribution value calculated from the hypothesis test or confidence interval inputs
TestValueContains the value of the experimental variable associated with the TestScore
ProbContains the probability associated with the TestScore value
CritScoreContains the value of the Z- or t-distribution associated with the input α-value
CritVal1Contains the lower critical value of the experimental variable associated with the negative TestScore value which was calculated from the input α-level
CritVal2Contains the upper critical value of the experimental variable associated with the positive TestScore value which was calculated from the input α-level
DFContains the degrees of freedom for the t-tests
CorrContains the value of the correlation coefficient
CoefDetContains the value of the coefficient of determination
SlopeContains the value of the slope of the regression line for either the linear t-test or the confidence interval for slope
InterContains the value of the intercept of the regression line for either the linear t-test or the confidence interval for the intercept
serrLineContains the standard error of the line for the linear t-test
serrSlopeContains the standard error of the slope for either the linear t-test or the confidence interval for slope
serrInterContains the standard error of the intercept for either the linear t-test or the confidence interval for the intercept
serrYContains the standard error of ŷ for either the confidence interval for a mean response or the prediction interval for a future response
YvalContains the value of ŷ for either the confidence interval for a mean response or the prediction interval for a future response
ContribListContains a list of the chi-square contributions by category for the chi-square goodness of fit test
ContribMatContains a matrix of the chi-square contributions by category for the chi-square two-way test
ExpListContains a list of the expected counts by category for the chi-square goodness of fit test
ExpMatContains the matrix of expected counts by category for the chi-square two-way test

Finance TVM

NbPmtNumber of payments
IPYRInterest per year
PVPresent value of an investment
PMTPayment amount
FVFuture value
PPYRPayments per year
CPYRCompounding periods per year
BEGDetermines whether interest is compounded at the beginning or end of the compounding period
GSizeGroup size for the amortization table

Finance other

NomIntNominal interest rate
EffIntEffective interest rate
IntCPYRNumber of times the interest compounds per year
DateOneThe first date used in a date calculation
DateTwoThe second date used in a date calculation
DateDiffThe difference between the two dates
Date360Determines whether to use a standard Gregorian or 360-day year
CFDataCash-flow data: list of {flow,count}; CFData(n[,1|2]) access
InvestIntThe cash flow investment interest rate
SafeIntThe cash flow safe interest rate
CFPYRThe number of cash flows per year
CostAssetThe depreciable cost of an asset at time of purchase
SalvageAssetThe amount of money an asset can be sold or salvaged for at the end of its life
FirstAssetThe month the asset is first placed into service
LifeAssetThe expected useful life of a product
FactorDeprThe declining balance factor as a percentage, used with the declining balance methods
FirstDateAssetThe date of first use for French-style depreciation, entered as YYYY.MMDD
FixedCostThe fixed cost of developing and marketing a product
QuantityThe number of units sold
VariableCostThe manufacturing cost per unit
SalePriceThe sales price per unit
ProfitThe expected profit
CostThe cost of an item in markup calculations
PriceThe sales price in markup calculations
MarginThe margin in markup calculations based on cost
MarkupThe markup percentage in markup calculations
OldValueThe old value in percent-change calculations and the total in part-total calculations
NewValueThe new value in percent-change calculations and the part number in part-total calculations
TotalThe percentage of the total in part-total calculations
ChangeThe percent change in percent-change calculations
SetDateThe settlement date of a bond
MatDateThe maturity date or call date of a bond
CpnPerThe coupon percentage
CallPriceThe call price or value
YieldBondThe yield percent to maturity of a bond
PriceBondThe price per 100.00 value of a bond
Bond360Determines whether to use a standard Gregorian or 360-day year
SemiAnnualDetermines whether payments are made on an annual or semiannual basis
AccruedThe accrued interest of a bond
ModifiedThe modified Macaulay duration of a bond
MacaulayThe Macaulay duration of a bond
StockPriceThe stock price
StrikePriceThe strike price
TimeMarketThe time to maturity of an option
RiskFreeThe risk free interest rate
VolatilityThe volatility of an asset
DividendThe dividend percentage
BSCallPriceThe call price of an option
BSPutPriceThe put price of an option

Linear & Triangle Solver

LSystemContains a 2x3 or 3x4 matrix which represents a 2x2 or 3x3 linear system
SideAThe length of Side a
SideBThe length of Side b
SideCThe length of Side c
AngleAThe measure of angle A. Sets the measure of angle A. The value of this variable will be interpreted according to the angle mode setting (Degrees or Radians)
AngleBThe measure of angle B. Sets the measure of angle B. The value of this variable will be interpreted according to the angle mode setting (Degrees or Radians)
AngleCThe measure of angle C. Sets the measure of angle C. The value of this variable will be interpreted according to the angle mode setting (Degrees or Radians)
TriTypeCorresponds to the status of in the Numeric view of the Triangle Solver app

Python on the HP Prime

MicroPython 1.9.4 · the hpprime bridge · every importable module — module lists and hpprime signatures probed on this Prime (firmware 2.2) on 2026-08-30

Where Python lives — and three ways to run it

Firmware 2.1.14181 (2021) and later carry MicroPython 1.9.4 — Python 3.4 syntax — as the Python app plus a bridge module, hpprime. Your Prime reports sys.version 3.4.0, sys.implementation (micropython, 1.9.4), sys.platform 'HP Prime' and a 1,024,512-byte heap.

#PYTHON blockname // 1. a block inside any PPL programimport sysprint("hi", sys.argv)#ENDEXPORT run(a)BEGIN PYTHON(blockname, a); // run it; the arguments arrive in sys.argvEND;#PYTHON EXPORT f(a, b) // 2. the same block callable like a function#END // then simply f(1, 2) from PPL or HomePYTHON({blockname, 4000000}, a) // heap in bytes for this run (G1 ≤ ~16 MB, G2 ≤ ~250 MB)

3. The Python app (Apps → Python): Symb is the script editor (Tmplt and Cmds menus; select a command and press Help for its page), Num is the console — single-line entry, output history above. The console auto-imports every script of the app as import name, so call name.func() or type from name import * yourself. Plot opens the app settings, where the heap size is set. On interrupts a running script.

Block names carry no .py; PYTHON(name) takes the bare name, unquoted. Keep the block name different from the EXPORT name. From the Mac, tools/tohp --program file.py wraps a script this way and sends it; the Connectivity Kit edits programs and drops .py files onto the Python app.

The bridge: hpprime.eval and passing values

hpprime.eval("expr")evaluate any Home/PPL expression or statement and return its value as a Python object — an int for integers and colours, float, str, list for {…}, nested lists for matriceseval("L1") eval("A")read a Home variableeval("A:=7") eval("L1:={1,2,3}")store into Home variables (also AVars("name"):=…)eval('CAS.eval("int(ln(x),x)")')run the CAS from Python — or import cas; cas.caseval("int(ln(x),x)")eval("NORMALD_CDF(2)") eval("RGB(255,0,0)")every command in the index is one string awayeval("TICKS") eval("Time")millisecond counter · clock as decimal hours (19.9030 = 19:54:11) — there is no time moduleeval("WAIT(0.1)") eval("GETKEY") eval("ISKEYDOWN(4)")delay · last key code or −1 · is Esc heldeval('MSGBOX("done")') eval('INPUT(A,"t","a=")')dialogs and input forms come from PPLsys.argvthe PYTHON(name, a, b, …) arguments, as strings/numbers in a list — index from 0print(…)goes to the Python console (Num view) or the terminal a PPL program was printing toinput("a: ")prompts on the terminal and returns a str — cast with int() / float()r := PYTHON(block, …)always 0 — a block’s last expression is not returned to PPL; hand results back through variables, AVars or Noteseval("Programs") eval("Notes") eval("HVars") eval("AFiles")catalogs as Python lists of nameseval("HAngle") eval("Bits") eval("Date")settings come back as floats: HAngle 0.0 = radians · Bits 32.0 · Date 2026.083 = YYYY.MMDD

Getting a result back to PPL: store it with eval("V:=…") or eval('AVars("X"):=…'), or write a Note with eval('Notes("R"):="…"') (how this sheet’s probes reported). Inside that PPL text a backslash or a double quote ends the string early — strip them (repr() of a multi-line string puts \n in) — and numbers like 2e+1 can trip the parser: format them yourself or go through cas.caseval.

Graphics with hpprime — the G0–G9 buffers

The first argument of every drawing call is the graphic number: 0 is the screen, 1–9 are the off-screen buffers G1G9 shared with PPL. Colours are 24-bit ints (0xFF0000 red, or eval("RGB(r,g,b)")); the screen is 320 × 240, (0,0) top-left. Each function has a _c twin using the Cartesian window from set_cartesian.

dimgrob(G, w, h, color)create/resize G1–G9pixon(G, x, y, color)one pixelline(G, x1, y1, x2, y2, color)linerect(G, x, y, w, h, color) fillrect(G, x, y, w, h, edge, fill)rectangles — outline in one colour, or filled with edge + fillcircle(G, x, y, r, color) arc(G, x, y, r, a1, a2, color)circles and arcstextout(G, x, y, text, color)text in the current font — five arguments, nothing more (checked on this unit); there is no font parameterblit(G1, x, y, G2)copy G2 onto G1 — draw a frame on G1, then blit(0, 0, 0, 1)strblit(G1, x, y, w, h, G2) strblit2(G1, x, y, w, h, G2, x2, y2, w2, h2)scaled copy of all, or a part, of G2grobw(G) grobh(G)size of a buffereval("GETPIX_P(G1,x,y)")there is no pixel read in hpprime — borrow PPL’sgraphic.draw_line(x1, y1, x2, y2, c) …the KhiCAS-style module draws on the screen with Casio-like names — see the index

Keys and touch

k = hpprime.keyboard()non-blocking bitmask of every key held right nowif k & (1 << 4): …test a key by its GETKEY code (Esc = 4, Enter = 30, ▲ 2 ▼ 12 ◀ 7 ▶ 8)k & (1<<41) k & (1<<36)Shift and ALPHA are ordinary bits; several keys at once are finehpprime.mouse()touch: a list for two fingers (x, y, … or −1 when up) — poll it in a loopeval("GETKEY")PPL-style: the last key pressed, −1 if nonewhile True: … if eval("ISKEYDOWN(4)"): breakthe usual exit testOnalways interrupts the script — it is not readable

Codes: Apps 0 · Symb 1 · ▲ 2 · Help 3 · Esc 4 · Home 5 · Plot 6 · ◀ 7 · ▶ 8 · View 9 · CAS 10 · Num 11 · ▼ 12 · Menu 13 · Vars 14 · Toolbox 15 · Templ 16 · xtθn 17 · a b/c 18 · ⌫ 19 · xʸ 20 · SIN 21 · COS 22 · TAN 23 · LN 24 · LOG 25 · x² 26 · +/− 27 · ( ) 28 · , 29 · Enter 30 · EEX 31 · 7 32 · 8 33 · 9 34 · ÷ 35 · ALPHA 36 · 4 37 · 5 38 · 6 39 · × 40 · Shift 41 · 1 42 · 2 43 · 3 44 · − 45 · On 46 · 0 47 · . 48 · ␣ 49 · + 50

The language — MicroPython 1.9.4 is Python 3.4

x = 3; y = 2.5; z = 3+4jints are arbitrary precision (sys.maxsize 2³¹−1 for the fast path), floats are double, complex built in7 // 2 7 % 2 2 ** 10 divmod(7, 2)integer division, modulo, power"abc"[1:] "a,b".split(",") "{} {:.2f}".format(a, b) "%d" % nstrings: slicing, methods, .format and % — no f-strings (they arrived in 1.17)[x*x for x in range(5) if x%2] {k: v for …} {a, b}list / dict / set comprehensions; generators with (…) and yielddef f(a, b=1, *args, **kw): return adefaults, *args, **kwargs, keyword arguments, lambda, closures, nonlocal, globalclass P(Base): def __init__(self, x): self.x = xclasses, inheritance, super(), properties, @staticmethod / @classmethod, __str__, __eq__, __lt__…try: … except ValueError as e: … finally: …exceptions, raise, custom exception classes, assertwith open(…) as f:context managers work (uio files); no real file system thoughfor i, v in enumerate(lst): … zip map filter sorted(key=) reversed any all min max sumthe usual iteration toolkitint("ff", 16) bin(x) hex(x) x.to_bytes(4, "little") bytes / bytearray / memoryviewbits and bytes; ustruct for recordsdir(obj) help(obj) type(x) isinstance eval("1+1") exec(src)introspection and dynamic code (eval here is Python’s, not hpprime.eval)

Not in 3.4 / 1.9.4: f-strings, the walrus :=, async/await keywords beyond the basics, type hints are parsed but ignored, dataclasses, match. Recursion is shallow (~77 levels on a G1, ~99 on a G2) unless PYTHON() is given a bigger stack.

Standard modules — as imported on this Prime

Present (probe, 2026-08-30): hpprime, cas, graphic, matplotl, linalg, arit, math, cmath, urandom, sys, gc, micropython, array, ucollections, uerrno, uhashlib, uio, ure, ustruct, utimeq, builtins. Everything else in the MicroPython manual is absent — notably time, utime, os, json, random, collections, io, re, struct, itertools, functools, string, copy: use the u-prefixed names (urandom, ucollections, uio, ure, ustruct) and reach PPL for time.

mathfloats only — use ** and // on ints — acos acosh asin asinh atan atan2 atanh ceil copysign cos cosh degrees e erf erfc exp expm1 fabs floor fmod frexp gamma isfinite isinf isnan ldexp lgamma log log10 log2 modf pi pow radians sin sinh sqrt tan tanh trunccmathcomplex numbers: 3+4j, abs(z), z.real — cos e exp log log10 phase pi polar rect sin sqrtrandom / urandomimport random or urandom — same module — choice getrandbits randint random randrange seed uniformsysplatform == 'HP Prime'; argv carries PYTHON() arguments — argv byteorder exc_info exit implementation maxsize modules path platform print_exception stderr stdin stdout version version_infogcheap accounting — see Limits — collect disable enable isenabled mem_alloc mem_free thresholdmicropythonconst(1) makes a compile-time constant — const heap_lock heap_unlock kbd_intr mem_info opt_level pystack_use qstr_info stack_usearraytyped arrays: array("i", [1,2,3]) — arrayucollectionsimport ucollections — OrderedDict deque namedtupleuerrnoerrno constants — EACCES EADDRINUSE EAGAIN EALREADY EBADF ECONNABORTED ECONNREFUSED ECONNRESET EEXIST EHOSTUNREACH EINPROGRESS EINVAL EIO EISDIR ENOBUFS ENODEV ENOENT ENOMEM ENOTCONN EOPNOTSUPP EPERM ETIMEDOUT errorcodeuhashlibSHA-256 only — sha256uioin-memory files; StringIO for building text — BytesIO FileIO StringIO TextIOWrapper openuresmall regex engine: groups, classes, no lookahead — DEBUG compile match searchustructbinary packing — calcsize pack pack_into unpack unpack_fromutimeqtimer queue used by schedulers — utimeqbuiltinsplus the exception classes — ArithmeticError AssertionError AttributeError BaseException EOFError Ellipsis Exception GeneratorExit ImportError IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError NotImplemented NotImplementedError OSError OverflowError RuntimeError StopAsyncIteration StopIteration SyntaxError SystemExit TypeError UnicodeError ValueError ZeroDivisionError abs all any bin bool bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type zip

HP’s own modules — hpprime, cas, graphic, matplotl, linalg, arit

hpprime (arc arc_c blit blit_c circle circle_c dimgrob dimgrob_c eval fillrect fillrect_c get_cartesian grobh grobh_c grobw grobw_c keyboard line line_c mouse pixon pixon_c rect rect_c set_cartesian strblit strblit2 strblit2_c strblit_c textout textout_c) is HP’s bridge and fast-drawing module, detailed in the cards above. The other five come from Bernard Parisse’s Xcas/KhiCAS work and mirror what NumWorks and Casio users know:

cascaseval xcas eval_expr — the CAS from Python, results as strings; get_key is a stub (returns 0)graphicblack blue clear clear_screen cyan draw_arc draw_circle draw_filled_arc draw_filled_circle draw_filled_polygon draw_filled_rectangle draw_line draw_pixel draw_polygon draw_rectangle draw_string fill_rect get_pixel green magenta red set_pixel show show_screen white yellow — pixel drawing on the screen with Casio/KhiCAS names, colour constants included; show_screen() waits for a keymatplotlarrow axis bar barplot boxplot boxwhisker clf grid hist histogram linear_regression_plot plot scatter scatterplot show text vector — a pyplot subset: plot, scatter, bar, hist, boxplot, text, arrow, axis, grid, showlinalgabs add apply arange conj cross det dot egv eig eigenvects eye fft horner identity idn ifft im imag inv linspace matrix mul ones pcoeff peval pi proot rand ranm ranv re real rref shape size solve sub transpose zeros — a numpy.linalg stand-in: matrix, zeros, eye, inv, det, solve, eig, rref, fft…aritasc char euler gcd iegcd ifactor isprime lcm nextprime nprimes prevprime — integer arithmetic: gcd, lcm, iegcd, isprime, ifactor, nextprime, euler

Function-by-function detail is in the Python index below; the Cmds menu of the Python app lists the same names and Help explains each one.

Limits and gotchas

  • Heap: 1 MB by default in the app (about 1,016 KB free after import gc); raise it in Plot settings or per call with PYTHON({name, bytes}). gc.mem_free() tells you where you stand; gc.collect() reclaims.
  • No clock, no sleep: time is absent. Busy-wait on eval("TICKS"), or eval("WAIT(0.1)").
  • Console is one line: multi-line statements only in scripts; copy a history line back with the touch menu.
  • Names: the console imports scripts as modules — qualify calls or from x import *. Blocks in PPL programs are invisible to the app.
  • Types across the bridge: eval returns int for whole numbers (including based numbers and colours), float otherwise; lists ↔ lists; strings need quoting inside the PPL text: eval('"abc"').
  • Keys from the Mac: remote key injection drops uppercase A and E (firmware 2.2) — tohp works around it; irrelevant on the keyboard itself.
  • Blocking calls: graphic.show_screen(), matplotl.show() and input() wait for a key — a script driven over USB looks frozen until someone presses one.
  • Exam mode can disable Python; scripts survive firmware updates.

Idioms

import hpprime as ht0 = h.eval("TICKS")while h.eval("TICKS") - t0 < 500: pass # 0.5 s delayh.dimgrob(1, 320, 240, 0xFFFFFF) # double bufferfor i in range(100): h.fillrect(1, 0, 0, 320, 240, 0xFFFFFF, 0xFFFFFF) h.circle(1, 160 + i, 120, 20, 0, 0xFF0000) h.blit(0, 0, 0, 1) if h.keyboard() & (1 << 4): break # Escxs = h.eval("L1") # list in from Homeh.eval("L2:={" + ",".join(str(x*x) for x in xs) + "}") # list outimport casprint(cas.caseval("solve(x^2-2=0,x)")) # CAS as textfrom linalg import *A = matrix([[2,1],[1,3]]); print(solve(A, [1,2]), det(A))import matplotl as pltplt.plot([0,1,2,3],[0,1,4,9]); plt.grid(True); plt.show() # show() waits for a key

Python Index

hpprime, cas, graphic, matplotl, linalg, arit and the standard modules · filter with the box above

Python: hpprime

19

Bridge

evaleval(ppl_text) — Evaluate a PPL/Home expression or statement and return its value converted to a Python object (int, float, str, list, tuple/matrix); the door to every command in the index

Input

keyboardkeyboard() — Non-blocking: an int bitmask of every key currently held; test key n (GETKEY code 0–50) with keyboard() & (1 << n); Shift, ALPHA included, On stops the script instead
mousemouse() — Touch state for two fingers as a pair of tuples — ((), ()) while nothing touches, each tuple filled with the finger’s position and state while it does; poll it, it never blocks

Graphics

dimgrobdimgrob(G, w, h, color) — Create or resize graphic G1–G9 to w×h pixels filled with color (24-bit int); not for G0, the screen
grobwgrobw(G) — Width in pixels of graphic G (0 = screen, 320)
grobhgrobh(G) — Height in pixels of graphic G (0 = screen, 240)
pixonpixon(G, x, y, color) — Light one pixel of G at (x, y); G = 0 draws straight on the screen
lineline(G, x1, y1, x2, y2, color) — Line on G from (x1, y1) to (x2, y2)
rectrect(G, x, y, w, h, color) — Rectangle at (x, y), w×h, in one colour — six arguments (verified)
fillrectfillrect(G, x, y, w, h, edge, fill) — Filled rectangle with separate edge and fill colours — seven arguments (verified)
circlecircle(G, x, y, r, color) — Circle of radius r centred on (x, y) — five arguments (verified)
arcarc(G, x, y, r, a1, a2, color) — Arc of radius r from angle a1 to a2 — seven arguments (verified)
textouttextout(G, x, y, text, color) — Draw text on G at (x, y) in the current font — exactly five arguments, no font or background parameter (verified on George’s Prime); size the font from PPL with eval("TEXTSIZE…") or draw on a buffer and strblit it
blitblit(G1, x, y, G2) — Copy graphic G2 onto G1 at (x, y) — blit(0, 0, 0, 1) shows an off-screen frame in one go
strblitstrblit(G1, x, y, w, h, G2) — Stretch-blit: all of G2 scaled into the w×h box at (x, y) of G1 — six arguments
strblit2strblit2(G1, x, y, w, h, G2, x2, y2, w2, h2) — Stretch-blit of the x2,y2,w2×h2 part of G2 — ten arguments (undocumented, present on fw 2.2)
get_cartesianget_cartesian() — The Cartesian window used by the _c functions, as [xmin, ymin, xmax, ymax] — [-8, -1.5, 8, 1.5] on a fresh unit
set_cartesianset_cartesian(xmin, ymin, xmax, ymax) — Define the Cartesian window for the _c functions (four arguments, same order as get_cartesian returns)
*_cpixon_c line_c rect_c fillrect_c circle_c arc_c textout_c blit_c strblit_c strblit2_c dimgrob_c grobw_c grobh_c — Every drawing function has a _c twin that takes Cartesian (plot-window) coordinates instead of pixels — the PPL _P / plain split

Python: cas & graphic

19

cas

casevalcaseval(text) — Evaluate text in the CAS and return the result as a string
xcasxcas(text) — Same engine, Xcas syntax; the three entry points behave alike
eval_expreval_expr(text) — Evaluate a CAS expression
get_keyget_key() — Documented as a key read; returns 0 immediately on current firmware — use hpprime.keyboard()

graphic

clear_screenclear_screen() — Clear the drawing area
show_screenshow_screen() — Push the drawing to the display (show() is an alias)
set_pixelset_pixel(x, y, c) — Set pixel (x, y) to colour c; set_pixel() alone refreshes
get_pixelget_pixel(x, y) — Read a pixel colour
draw_pixeldraw_pixel(x, y, c) — Same as set_pixel
draw_linedraw_line(x1, y1, x2, y2, c) — Line
draw_rectangledraw_rectangle(x, y, w, h, c) — Rectangle outline
draw_polygondraw_polygon([[x1,y1],[x2,y2],…], c) — Polygon outline
draw_filled_polygondraw_filled_polygon([[x,y],…], c) — Filled polygon
draw_circledraw_circle(x, y, r, c) — Circle
draw_filled_circledraw_filled_circle(x, y, r, c) — Filled disc
draw_arcdraw_arc(x, y, rx, ry, t1, t2, c) — Elliptic arc, angles in radians
draw_filled_arcdraw_filled_arc(x, y, rx, ry, t1, t2, c) — Filled elliptic sector
draw_stringdraw_string(s, x, y, c) — Text at (x, y)
coloursblack white red green blue cyan magenta yellow — Colour constants of the module

Python: matplotl, linalg, arit

34

matplotl

plotplot(x, y [, style]) — Line plot through the points
scatterscatter(x, y) — Points (scatterplot alias)
barbar(x, h) — Bar chart (barplot alias)
histhist(data, bins) — Histogram (histogram alias)
boxplotboxplot(data) — Box-and-whisker (boxwhisker alias)
linear_regression_plotlinear_regression_plot(x, y) — Points plus the fitted line
arrowarrow(x, y, dx, dy) — Arrow
vectorvector(x, y, dx, dy) — Vector from a point
texttext(x, y, s) — Label at (x, y)
axisaxis([xmin, xmax, ymin, ymax]) — Set (or read) the window
gridgrid(True) — Toggle the grid
clfclf() — Clear the figure
showshow() — Display the figure

linalg

matrixmatrix([[…],[…]]) — Build a matrix; also the type name
zeros ones eye identity idnzeros(n, m) ones(n, m) eye(n) — Constant / identity matrices
arange linspacearange(a, b, step) linspace(a, b, n) — Vectors of evenly spaced values
rand ranm ranvrand() ranm(n, m) ranv(n) — Random scalar / matrix / vector
add sub mul dot crossadd(A, B) sub(A, B) mul(A, B) dot(u, v) cross(u, v) — Arithmetic (operators work too)
transpose inv det rreftranspose(A) inv(A) det(A) rref(A) — Transpose, inverse, determinant, row-reduce
solvesolve(A, b) — Solve A·x = b
eig egv eigenvectseig(A) egv(A) eigenvects(A) — Eigenvalues / eigenvectors
fft ifftfft(v) ifft(v) — Fourier transform
applyapply(f, A) — Map a function over the elements
shape sizeshape(A) size(A) — Dimensions
re im real imag conj absre(A) im(A) conj(A) abs(A) — Complex parts, element-wise
pcoeff proot peval hornerpcoeff(roots) proot(coeffs) peval(p, x) horner(p, x) — Polynomials as coefficient vectors
pipi — π

arit

gcd lcmgcd(a, b) lcm(a, b) — Greatest common divisor / least common multiple
iegcdiegcd(a, b) — Extended gcd: (u, v, d) with u·a + v·b = d
isprimeisprime(n) — Primality test
nextprime prevprime nprimesnextprime(n) prevprime(n) nprimes(n) — Neighbouring primes / count of primes ≤ n
ifactorifactor(n) — Prime factorisation
eulereuler(n) — Euler’s totient φ(n)
asc charasc(s) char(n) — Character code conversions

Python: standard modules

15

Importable on this Prime (verified)

mathimport math — floats only — use ** and // on ints · members: acos acosh asin asinh atan atan2 atanh ceil copysign cos cosh degrees e erf erfc exp expm1 fabs floor fmod frexp gamma isfinite isinf isnan ldexp lgamma log log10 log2 modf pi pow radians sin sinh sqrt tan tanh trunc
cmathimport cmath — complex numbers: 3+4j, abs(z), z.real · members: cos e exp log log10 phase pi polar rect sin sqrt
urandomimport urandom — import random or urandom — same module · members: choice getrandbits randint random randrange seed uniform
sysimport sys — platform == 'HP Prime'; argv carries PYTHON() arguments · members: argv byteorder exc_info exit implementation maxsize modules path platform print_exception stderr stdin stdout version version_info
gcimport gc — heap accounting — see Limits · members: collect disable enable isenabled mem_alloc mem_free threshold
micropythonimport micropython — const(1) makes a compile-time constant · members: const heap_lock heap_unlock kbd_intr mem_info opt_level pystack_use qstr_info stack_use
arrayimport array — typed arrays: array("i", [1,2,3]) · members: array
ucollectionsimport ucollections — import ucollections · members: OrderedDict deque namedtuple
uerrnoimport uerrno — errno constants · members: EACCES EADDRINUSE EAGAIN EALREADY EBADF ECONNABORTED ECONNREFUSED ECONNRESET EEXIST EHOSTUNREACH EINPROGRESS EINVAL EIO EISDIR ENOBUFS ENODEV ENOENT ENOMEM ENOTCONN EOPNOTSUPP EPERM ETIMEDOUT errorcode
uhashlibimport uhashlib — SHA-256 only · members: sha256
uioimport uio — in-memory files; StringIO for building text · members: BytesIO FileIO StringIO TextIOWrapper open
ureimport ure — small regex engine: groups, classes, no lookahead · members: DEBUG compile match search
ustructimport ustruct — binary packing · members: calcsize pack pack_into unpack unpack_from
utimeqimport utimeq — timer queue used by schedulers · members: utimeq
builtinsimport builtins — plus the exception classes · members: ArithmeticError AssertionError AttributeError BaseException EOFError Ellipsis Exception GeneratorExit ImportError IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError NotImplemented NotImplementedError OSError OverflowError RuntimeError StopAsyncIteration StopIteration SyntaxError SystemExit TypeError UnicodeError ValueError ZeroDivisionError abs all any bin bool bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type zip

Absent

not available — time / utime (no sleep, no clock — use hpprime.eval("TICKS") and eval("Time")), os, json, itertools, functools, operator, string, copy, datetime, threading, asyncio, numpy (use linalg), matplotlib (use matplotl), turtle and kandinsky (present in the firmware strings, not importable on 2.1.14730)

Files & Hardware

what the calculator stores, and what it is made of

Software files on the Prime

Everything you create is an object in the calculator’s flash file system, and every object has a file form the Connectivity Kit shows as a folder tree: Programs, Notes, Lists, Matrices, Apps (each a folder), Variables, settings, exam configurations. This unit reports itself as software 2.2 (revision 15157, built 2024-09-01), CAS 1.5.0, MicroPython 1.9.4, hardware version C.

HP Prime memoryflash file system · Memory Manager (Shift Toolbox)backed up as a folder of filesApps (Apps key)Function, Solve, Statistics…, Pythoneach app = Name.hpappdir folder↳ inside an appName.hpapp — its variables & stateName.hpappprgm — its programName.hpappnote — its Info noteicon.png + attached files (AFiles)Python app: your .py scripts live herePrograms (Shift 1)name.hpprgm — PPL source, UTF-16#PYTHON … #END blocks insidePrograms("name") from PPLNotes (Shift 0)name.hpnote — rich textNotes("name") reads/writesLists · MatricesL0–L9 .hplist (Shift 7)M0–M9 .hpmatrix (Shift 4)Home variables (Vars)A–Z reals, Z0–Z9 complex, G0–G9 graphicsuser variables → HVars, calc.hpvarsCAS variables (CAS view) · AVars per appSettingscalc.hpsettings · cas.hpsettingssettings (name, serial) · Custom Modeexam-mode configurationsBackupsMemory Manager → Backups catalogor a .zip from the Connectivity Kitfirmware: PRIME_OS.ROM + PRIME_APP.DAT

From a program, the same tree is a set of lists: Programs, Notes, AFiles, AVars, HVars each return the names (Python gets them as lists through hpprime.eval); VERSION returns the About text.

ObjectFile · whereFormatReach it
Program.hpprgm — Program catalog ( 1)UTF-16LE text, BOM optional; PPL source, may hold #PYTHON…#END and #cas…#end blocksPrograms("name") reads/writes the source from PPL; the Connectivity Kit editor; tohp --program from the Mac
AppName.hpappdir — a folder (Apps key)Name.hpapp (the app’s variables and state, binary), Name.hpappprgm (its program), Name.hpappnote (its Info note), icon.png, plus any attached filesAFiles / AFilesB list, read and write the attached files; AVars the variables; the Connectivity Kit app editor has Modes, Program, Info, Files, Variables tabs
Python script.py — attached to the Python appplain text; the app’s Symb view edits them, the Num console imports them (import name — call name.func())drop .py files onto the Python app in the Connectivity Kit; or keep Python inside a .hpprgm as a #PYTHON block
Note.hpnote — Notes catalog ( 0)UTF-16LE rich textNotes("name") from PPL — a handy place for a script to write results (this sheet’s probe did exactly that)
List / MatrixL0–L9 .hplist · M0–M9 .hpmatrix ( 7 / 4)small binary records (an empty list is 8 bytes, an empty matrix 24)the List and Matrix editors; L1 := {…} from Home or a program
Home variablescalc.hpvarsbinary container (4-byte magic 7C 61 8A B2, shared by settings and app files)A–Z, Z0–Z9 (complex), user variables; Vars key → Home
Settingscalc.hpsettings · cas.hpsettings · settings · Custom Modebinary; “settings” carries the calculator name and serial number Home (Home Settings), CAS; Custom Mode is the exam/custom mode definition
Exam & classexam-mode configurations, .hppoll / .hpresultConnectivity Kit objectsExam Mode ( Esc from the Apps screen), polls sent by a teacher
BackupBackups catalog on the calculator · .zip from the Connectivity Kita snapshot of everything aboveMemory Manager ( Toolbox) → Backups; libhpcalcs “recv backup” drops every object as a file
FirmwarePRIME_OS.ROM + PRIME_APP.DAT (about 12 MB)signed OS imageinstalled by the Connectivity Kit, or from a USB drive on a G2; the calculator keeps user data across updates

Moving things: drag between the Connectivity Kit’s calculator pane and content pane; calculator-to-calculator over the USB cable or the wireless kit via Memory Manager (Clone / Send); from the command line with libhpcalcs (send file = menu 5, full backup = menu 7; single-file receive fails on fw 2.2). The Prime is a USB HID device, never a disk. Memory Manager ( Toolbox) shows what is using memory and holds on-calculator backups.

Electronics — CPU, memory and I/O

Two generations share one design: a single ARM system-on-chip with everything on it, one RAM chip, one NAND flash chip, and a keyboard/power board — HP used ordinary documented parts, no custom ASIC. The G1 (2013) is a 400 MHz ARM9; the G2 (2018) is a 528 MHz Cortex-A7 with eight times the RAM and roughly three times the speed.

SoC — system on chipG1: Samsung S3C2416XH-40, ARM926EJ-S @ 400 MHzG2: NXP i.MX 6ULL MCIMX6Y2, Cortex-A7 @ 528 MHzCPU + caches + MMU · LCD controller · USB OTGSDRAM & NAND controllers · GPIO keyboard scanADC (battery) · RTC · PWM backlight · timersSDRAM (RAM)G1: Hynix H5MS2562NFR — 32 MB mobile DDRG2: 256 MB DDR3memory busNAND flash (storage)G1: Samsung K9F2G08U0C — 256 MBG2: 512 MB · OS + apps + your files8-bit NAND busDisplay 3.5″ 320×240 TFT16-bit colour, LED backlight (PWM)capacitive multi-touch panel on topRGB + touch I²Cmicro-USB ABUSB 2.0 HID device to a PC (VID 03F0)G2 also host: USBOpen/USBSend/USBReceiveUSB PHYWireless Kit2.4 GHz moduleon the USB portKeyboard — 51 keysGPIO matrix rows × columnscodes 0–50, keyboard() bitmaskBattery & powerLi-ion 3.7 V — 1500 mAh (G1) · ≈2000 mAh (G2)charger from USB, ADC monitors the cellCrystal / RTCclock source; Time, Date,TICKS millisecond counterReset pinhole · On keyreset reboots, keeps memoryOn interrupts programs and Python

HP Prime G1

ModelNW280AA (2013) · mainboard EA656MB, keyboard/power board EA656KB
SoCSamsung S3C2416XH-40 — ARM926EJ-S (ARMv5TEJ) at 400 MHz, 16 KB I / 16 KB D cache, MMU, 2-D accelerator, LCD controller, USB 2.0 device + host, NAND controller, ADC, RTC
RAMHynix H5MS2562NFR-E3M — 32 MB mobile DDR SDRAM (256 Mb, 4 M × 4 banks × 16)
FlashSamsung K9F2G08U0C-SCB0 — 256 MB (2 Gb) SLC NAND; OS + user files
BatteryLi-ion 3.7 V 1500 mAh (5.55 Wh), WiseWod 484461AR, IEC 1ICP6/51/63 — up to ~15 h
FirmwareHP OS on a bare-metal RTOS; newRPL has a G1 port that drives this hardware directly

HP Prime G2

Model2AP18AA (2018), later G8X92AA
SoCNXP i.MX 6ULL MCIMX6Y2 — ARM Cortex-A7 (ARMv7-A) at 528 MHz, NEON, MMU; LCD (eLCDIF), USB OTG, NAND (GPMI), ADC, PWM, RTC on chip
RAM256 MB DDR3 SDRAM
Flash512 MB NAND
BatteryLi-ion 3.7 V ≈ 2000 mAh — ~24 h of continuous use
FirmwareFreeRTOS-based HP OS; U-Boot/Linux have been booted on it; about 3× the G1’s speed

Both

Display3.5″ 320 × 240 TFT, 16-bit colour (114 ppi), LED backlight (PWM)
Touchcapacitive multi-touch panel (two fingers — mouse() reports both)
Keyboard51 keys scanned as a GPIO matrix; codes 0–50 top-left to bottom-right; keyboard() returns the whole matrix as a bitmask
USBmicro-AB, USB 2.0. To a computer the Prime is a HID device (VID 03F0 HP) — not a disk; the Connectivity Kit, libhpcalcs and this sheet’s tohp talk HID reports. The G2 is also a host: USBOpen / USBSend / USBReceive drive an attached device
WirelessHP Prime Wireless Kit: a 2.4 GHz module on the calculator’s USB port paired to a PC dongle (classroom use)
Otherreal-time clock (Time, Date, TICKS ms counter), no beeper, no SD slot, reset pinhole above the battery door

Sources: TI-Planet’s teardown of the DVT prototype (board and chip references), Wikipedia’s HP Prime article (G2 SoC, memory), TI-Planet’s G2 review, the newRPL Prime-G1 port in your tree (which drives the S3C2416 directly), the USB HID notes in retro/hp-prime. The G2’s RAM/NAND part numbers and both touch controllers are not published in any teardown I could find.