HP-15C Reference the 1982 Voyager scientific · 157 functions, keystroke by keystroke

The most capable calculator HP put in a shirt pocket: RPN with a four-level stack, complex arithmetic on a parallel imaginary stack, five matrices addressed by descriptor, a root finder and a numerical integrator — all in 448 bytes, or 672 on the 2023 Collector's Edition. This sheet is a working guide to the machine and then an index of every function, with the gold f and blue g prefixes written as the keyboard prints them. Hover any entry for the full description and its handbook page.

f gold, printed above the key g blue, printed below it
Sources: HP 15c Collector's Edition Owner's Handbook and Advanced Functions Handbook (HP, 2023), the 1982 HP-15C Owner's Handbook and Advanced Functions Handbook where the machines differ, and A. Thimet's HP-15C Quick Reference. Page numbers are the Collector's Edition Owner's Handbook.
Colour keythe machineentry, stack & displayprogrammingmathematicsdata objectssymbolic, solvers & financevariables & memoryreference & system

The Keyboard

39 keys, three legends each · drawn to the proportions of the machine · the small grey number on each key is its keycode — row, then column
3.141592654
hp15C
CLEAR
A√x̄11
BexLN12
C10xLOG13
Dyx%14
E1/xΔ%15
MATRIXCHSABS16
FIX7DEG7
SCI8RAD8
ENG9GRD9
SOLVE÷x≤y10
LBLSSTBST21
HYPGTOHYP⁻¹22
DIMSINSIN⁻¹23
(i)COSCOS⁻¹24
ITANTAN⁻¹25
RESULTEEXπ26
x≷4SF4
DSE5CF5
ISG6F?6
∫xy×x=020
PSER/SP/R31
ΣGSBRTN32
PRGMR↓R↑33
REGx≷yRND34
PREFIXCLx35
RAN #ENTERLST x36
→R1→P1
→H.MS2→H2
→RAD3→DEG3
Re≷ImTEST30
ON  
f 42
g 43
FRACSTOINT44
USERRCLMEM45
x!00
ŷ,r·s48
L.R.Σ+Σ−49
P y,x+C y,x40
gold, reached with f — printed on the case above the keyblue, reached with g — printed on the key itselfkeycode as a program line shows it

HP-15C Programmer's Guide

the machine, and how to make it do things

Anatomy four things the keyboard does not tell you

The four-level stack

There is no expression to edit and no parentheses to balance. Four registers — T, Z, Y, X — hold the working numbers, X is what the display shows, and every function takes its arguments from the bottom of that pile and drops the answer back into it. A fifth register, LAST X, quietly keeps whatever X held before the last operation.

key 4
T
Z
Y
X4
stack lifts on the next entry
ENTER
T
Z
Y4
X4
X copied to Y, lift disabled
key 3
T
Z
Y4
X3
writes over X, no lift
×
T
Z
Y
X12
Y and X consumed, stack drops

The subtlety that bites everyone is that ENTER disables stack lift. It is one of only four operations that do — ENTER, CLx, Σ+ and Σ−. After any of them the next number written overwrites X instead of pushing it up, which is exactly what you want when separating two operands and exactly what you do not expect anywhere else.

T is sticky: when the stack drops, T copies itself downward rather than emptying. Put a constant in T and it feeds every subsequent operation for free — the trick behind most short 15C programs.

Appendix B of the Owner's Handbook, p. 209, has the complete lists of enabling, disabling and neutral operations.

The loop-control number

DSE and ISG do not take three arguments. They take one register holding a single number whose digits are read as three fields — and nothing in the keystrokes hints at it.

counterlimitstep00000.00000ccccc.fffii  — one register, three numbers
a worked value00000.02203start at 0up to 22by 3

ISG adds the step, then skips the next line if the counter has passed the limit. DSE subtracts it and skips when the counter reaches or falls below the limit. A step of 00 means one. So the loop body sits after the test and ends with a GTO back to it — the skipped line is the jump.

Because it is only a number, the loop bounds can be computed, stored with STO, or kept in the Index register and shared. That is the whole looping mechanism: no keywords, just a register read three ways.

One pool, two uses

Data registers and program lines are not separate resources. They are the same registers, seven bytes each, split by a movable boundary — and matrices, the imaginary stack, SOLVE and ∫ all take their space from the same side of it. Free a data register and you gain seven bytes of program; use a matrix and your program gets shorter.

permanentR2 … R ddmatrices · imaginary stack · SOLVE · ∫RIR0R1data storagecommon pooldd = 19 at startuu free, pp in use
dduuppb197800-0f MEM on the Collector's Edition — 1982 shows 19 46 0-0

dd is the highest-numbered data register, uu the uncommitted registers left, pp the registers now holding program, and b the bytes remaining before another uncommitted register is swallowed. f DIM (i) moves the boundary — but only outward into unused space: registers already holding program lines will not convert back.

1982: 64 allocatable registers, 448 bytes. Collector's Edition: 96 registers, 672 bytes, 99 including the three permanent ones. Appendix C, p. 213.

Program lines are keycodes

A program is not stored as names. Each line shows the row and column of the keys you pressed, which is why reading a listing means reading the keyboard.

001-42,21,11f LBL A42 = the f prefix, 21 = the LBL key at row 2 key 1, 11 = A at row 1 key 1
009- 43 32g RTN43 = the g prefix, 32 = the RTN key
004- 36ENTERan unshifted key is its own two-digit code
002- 1digit 1digits record as themselves, not as a keycode

The two prefix keys have codes of their own — 42 for gold f and 43 for blue g — and everything else is row, column. Digits are the exception: they record as the digit itself. Most instructions merge into a single byte however many keys you pressed, which is how 448 bytes holds a usable program.

The line number, then the codes: 001-42,21,11 is line 1, f LBL A. Commas separate the keystrokes of one merged instruction.

The machine

The HP-15C is the top of the 1982 Voyager line — the flat, landscape calculators with an LCD and no LEDs. It packs complex arithmetic, matrices, a root finder and a numerical integrator into a machine the size of a cheque book, and it did so well enough that HP reissued it twice: the Limited Edition in 2011 and the Collector's Edition in 2023.

RPN, 4-level stackno parentheses, no expression to edit448 bytes / 64 registers1982 original672 bytes / 96 registersCollector's Edition — 50% more10 digits, ±99 exponentinternally; the display shows what you ask forContinuous Memoryprograms and data survive being switched off5 matrices A–Eup to 8×8 for inverse, determinant and divisionSOLVE and a root finder and an integrator, in firmware, in 1982

This sheet is written against the Collector's Edition handbooks and flags the places where the 1982 machine differs.

Reading the keyboard

Every key has up to three meanings: the one printed on it, the gold one printed above it reached with f, and the blue one printed below it reached with g. This sheet writes them the same way.

f √x̄gold — printed above the keyg 1/xblue — printed below the keyf CLEAR PREFIXcancels a prefix pressed by mistake, and shows the full mantissaf USERswaps the plain and gold meanings of A–E

Four gold labels sit under a bracket marked CLEAR — Σ, PRGM, REG and PREFIX — and are always written here with the word CLEAR in front of them.

Entering numbers

Key the digits, then ENTER to push the number up and start another. There is no equals key: the operation comes last.

3 ENTER 4 +7 — the classicEEXstarts the exponent; CHS after it makes the exponent negativeCHSsigns the mantissa during entry, negates X afterwardsrubs out the last digit, or clears X once entry has ended

Only the digit keys, the radix point, EEX and CHS continue a number. Everything else terminates entry, which is what tells the calculator your next keystroke starts a new number.

Display formats

The display never changes the number — only how much of it you see. Ten significant digits are always there underneath.

f FIX nn decimal placesf SCI nmantissa and exponentf ENG nexponent forced to a multiple of threef CLEAR PREFIXhold to see all ten mantissa digitsg RNDmake the rounded display the actual value

The format also sets how hard works: it integrates to the precision you are displaying, so FIX 2 is fast and rough, FIX 9 slow and fine.

Storage and the Index register

Twenty registers answer directly to a keystroke — R0R9 and R.0R.9. Beyond those, everything goes through the Index register.

STO 3 · RCL 3directSTO + 3arithmetic inside the register, X untouchedRCL × 3arithmetic into X, register untouched, no stack liftSTO Ithe Index register — outside the numbered poolSTO (i)store into the register Rᵢ points atf x≷ (i)exchange with it

RI also drives indirect branching, indirect display formats, matrix element addressing and loop counters. It is the closest thing the 15C has to a pointer.

The stack rules that matter

Most of the time the stack looks after itself. Three facts cover the times it does not.

ENTER CLx Σ+ Σ−the four operations that disable stack liftT duplicates on dropa constant parked in T feeds every operationg LST xthe argument of the last function, always kept

Display and angle modes, the CLEAR sequences, MEM, PSE, SST/BST, GTO · nnn, P/R and USER are neutral — they leave the lift state exactly as they found it, so you can check something mid-calculation without disturbing anything.

See Anatomy. Full lists: Appendix B, p. 209.

Writing a program

g P/R puts the machine in PRGM mode, where keystrokes are recorded instead of executed. There is no editor beyond insert and delete.

g P/Rtoggle PRGM and RUNf LBL Aa label — 0–9, .0–.9 or A–EGTO · 000go to a line without recording anythingSST · g BSTstep forward, step backdelete the displayed linef CLEAR PRGMin PRGM, erase everythingR/Srun, or halt from inside a programg RTNend the program or return from a subroutine

Programs are addressed by label, and AE double as the five user keys: f A runs the program at LBL A, or just A in USER mode.

Branching, tests and loops

The 15C conditional is the RPN one: a test skips the next line when it is false. The line after a test is the true branch, and it is almost always a GTO.

g x≤y · g x=0the two on the keyboardf TEST nthe other ten, 0–9g F? nskip if flag n is clearf ISG n · f DSE nloop on ccccc.fffiiGSB ncall — seven levels deepGTO (i)branch on the Index register

Two documented traps: a conditional as the last line of a program misbehaves — put a RTN after it — and GSB (i) does not accept the negative line numbers that GTO (i) does. Appendix H, p. 271.

Flags

Ten flags. Eight are yours; two are the machine talking back.

g SF n · g CF nset, clear — n is 0–9g F? nskip the next line if flag n is clearflag 8Complex mode. Set it or clear it to enter or leaveflag 9overflow — the display blinks until cleared

Flag 9 is worth knowing as an output: set it deliberately and the display blinks, which is the only attention-getting device the machine has.

Complex numbers

Pressing f I builds a second, imaginary stack beside the real one and lights the C annunciator. From then on every register has two halves, and the display shows only the real one.

a ENTER b f Ithe complex number a + bif (i)hold to peek at the imaginary partf Re↔Imswap the halves — the only way to reach Img CF 8leave Complex mode and free the registersCHSnegates the real part only

Nearly everything works: the four arithmetic operations, y^x, roots, logs, exponentials and the full trigonometric and hyperbolic sets. Complex trigonometry is always in radians whatever the annunciator says. √-1 only works once Complex mode is already on.

Matrices

Five matrices named A to E, sharing the uncommitted registers. What makes them unusual is that a matrix travels the stack as a descriptor — a value you can store, recall, exchange and test like any number.

f DIM Arows from Y, columns from Xf MATRIX 1set the R0/R1 element pointers to 1,1STO Astore into the element at (R0, R1)f USERand STO/RCL advance the pointers for youf RESULT Bwhere answers landf MATRIX 9determinant, leaving the LU decompositionf MATRIX 0give all matrix memory back

Ordinary keys do matrix work: + adds two descriptors, × multiplies, 1/x inverts, ÷ solves Y = X·B. Note the reversed order on divide, and that a singular matrix is silently replaced by a near neighbour rather than refused.

SOLVE and ∫

Both take a label, not a formula. You write a program that leaves f(x) in X, and hand its label to the solver or the integrator.

a ENTER b f SOLVE 0two guesses, then the labello ENTER hi f ∫xy 0limits, then the labelroot, previous guess, f(root)SOLVE leaves these in X, Y, Zintegral, uncertainty∫ leaves these in X and Y

Each consumes two of the seven subroutine levels. Neither may call itself; SOLVE and ∫ may call each other. The integrator samples sparsely at first, so put the limits near the interesting part of the function or it will confidently return zero.

When it complains

An error shows Error and a digit; any key clears it and restores what was on the display before.

0Improper mathematics operation ÷ by zero, √ of a negative outside Complex mode, LN or LOG of x ≤ 0, arcosh of x < 1, a bad y^x, and the rest of the domain errors.
1Improper matrix operation A non-matrix operation applied while a matrix descriptor sits in a register it will touch.
2Improper statistics operation x̄ with n = 0; s, L.R. or ŷ,r with n ≤ 1; or a division by zero inside the statistics formulas.
3Improper register number An indirect address outside the allocated data registers.
4Improper line number or label A GTO or GSB to a label that does not exist, or a line number past the end of program memory.
5Subroutine level too deep More than seven levels of GSB. SOLVE and ∫ each occupy two.
6Improper flag or digit A flag outside 0–9, or a digit count outside 0–9.
7Recursive SOLVE or ∫ A routine called by SOLVE or ∫ tried to call the same one again.
8SOLVE found no root From the keyboard this is an error; inside a program SOLVE skips the next line instead.
9Self-test failed Service is indicated — or, on the Collector's Edition, you ran the 1982 self-test.
10Improper DIM A matrix or memory dimension that will not fit.

Pr Error is different: Continuous Memory was lost and everything is back to defaults.

The two machines

The Collector's Edition is the same calculator with more room and a faster processor. Programs move across unchanged unless they depended on timing.

672 vs 448 bytes96 allocatable registers instead of 6419 78 00-0 vs 19 46 0-0what f MEM shows at power-up10–20× fasterCPU over 200× faster, but overhead eats most of it8×8 matrix limitunchanged, despite the extra memory2 lithium cellsinstead of three alkaline or silver-oxidedifferent self-teststhe 1982 tests no longer give valid resultsadjustable contrastthe original was fixed

Appendix G, p. 269. A long-running program on low batteries can lose Continuous Memory — the faster processor draws more current.

Where to read more

All four HP handbooks are free and complete, and the two Collector's Edition volumes supersede the originals for anything behavioural.

Owner's Handbookthe whole machine, with worked examples — 308 pp.Advanced Functions Handbookwhat SOLVE and ∫ are really doing, and the numerical analysis behind the matrix keys — 228 pp.Appendix Bstack lift and LAST X, exhaustivelyAppendix Cmemory allocationAppendix D and Ea detailed look at SOLVE, then at ∫

The Advanced Functions Handbook is the unusual one: it is a numerical-methods text that happens to be a calculator manual, and it is worth reading even if you never touch the machine.

Function Index

157 entries · grouped as the handbook groups them · hover for details

Digit Entry & the Stack

10
0 – 9 .digit keys
ENTERx → y, x (stack lifts, then lift disabled)
g LST x→ LAST X
x≷yx ↔ y
R↓roll down: x→T, y→x, z→y, t→z
g R↑roll up: t→x, x→y, y→z, z→t
CHS−x
EEXexponent entry
backspace / CLx
g CLx0 → x

Display Control

6
f FIX nfixed point, n decimals
f SCI nscientific, n decimals
f ENG nengineering, n digits
f CLEAR PREFIXshow all 10 mantissa digits
g DEG / RAD / GRDangle mode
ON ·toggle digit separator

Mathematics

8
+ − × ÷y op x → x
f √x̄√x
g
g 1/xreciprocal
y^xy to the power x
f x!x factorial / Γ(x+1)
g ABS|x|
g RNDround x to the display

Trigonometry

4
SIN COS TANtrig in the current angle mode
f SIN⁻¹ / COS⁻¹ / TAN⁻¹inverse trig
f →P(x, y) → (r, θ)
g →R(r, θ) → (x, y)

Hyperbolic

2
f HYP SIN / COS / TANsinh, cosh, tanh
f HYP⁻¹ SIN / COS / TANarsinh, arcosh, artanh

Logs & Exponentials

4
g LNnatural log
g e^xe to the x
g LOGcommon (base 10) log
g 10^xten to the x

Number Alteration

3
g INTinteger part
g FRACfractional part
g RNDround to display

Percentage

2
g %x percent of y
g Δ%percent change y → x

Probability

3
f Py,xpermutations y!/(y−x)!
g Cy,xcombinations y!/(x!(y−x)!)
f RAN#random 0 ≤ r < 1

Conversions

4
f →HH.MMSSs → decimal hours
g →H.MSdecimal hours → H.MMSSs
f →RADdegrees → radians
g →DEGradians → degrees

Storage & Recall

8
STO nx → Rn
RCL nRn → x
STO + − × ÷ nregister arithmetic
RCL + − × ÷ nrecall arithmetic
f x≷ nx ↔ Rn
f CLEAR REGclear all data registers
f MEMshow the memory map
f DIM (i)repartition memory

Index Register & Indirect

6
STO I / RCL Istore / recall the Index register
f x≷ Ix ↔ RI
STO (i) / RCL (i)indirect through I
f x≷ (i)x ↔ R(i)
GTO (i) / GSB (i)indirect branch
f FIX/SCI/ENG (i)display digits from I

Statistics

8
Σ+accumulate x and y
g Σ−remove a point
f CLEAR Σclear the statistics registers
gmeans of x and y
g ssample standard deviations
f L.R.linear regression
f ŷ,restimate and correlation
RCL Σ+recall Σx and Σy

Programming

12
g P/Rtoggle PRGM ⇄ RUN
f LBL ndefine a label
GTO njump to a label
GTO · nnngo to line number
GSB ncall a subroutine
g RTNreturn / end
R/Srun / stop
SSTsingle step
g BSTback step
g PSEpause ≈1 second
f CLEAR PRGMerase program memory
f USERswap f A–E for A–E

Tests & Flags

17
g x≤yskip if false
g x=0skip if false
f TEST nthe other ten comparisons
f TEST 0skip next line if not x ≠ 0
f TEST 1skip next line if not x > 0
f TEST 2skip next line if not x < 0
f TEST 3skip next line if not x ≥ 0
f TEST 4skip next line if not x ≤ 0
f TEST 5skip next line if not x = y
f TEST 6skip next line if not x ≠ y
f TEST 7skip next line if not x > y
f TEST 8skip next line if not x < y
f TEST 9skip next line if not x ≥ y
g SF n / CF nset / clear flag n
g F? nskip if flag clear
flag 8Complex mode
flag 9overflow

Loops

3
f ISG nincrement, skip if greater
f DSE ndecrement, skip if ≤
ISG/DSE (i), Iindirect loop counters

Complex Numbers

8
f Imake X complex
f (i)peek at the imaginary part
f Re↔Imswap real and imaginary
g CF 8leave Complex mode
STO / RCL in Complexreal part only
complex arithmetic+ − × ÷ y^x √x̄ x² LN LOG e^x 10^x 1/x
g ABS in Complexmodulus
→P / →R in Complexpolar ⇄ rectangular

Matrices

17
f MATRIX 0release all matrix memory
f DIM A–Edimension a matrix
f RESULT A–Echoose the result matrix
f MATRIX 1set R0 and R1 to 1
STO / RCL A–Eelement at (R0, R1)
g STO/RCL A–Eelement at (Y, X)
RCL DIM A–Edimensions to Y and X
f MATRIX 2 / 3expand / collapse complex
f MATRIX 4transpose
f MATRIX 5Yᵀ × X → result
f MATRIX 6residual: result − Y×X
f MATRIX 7row norm
f MATRIX 8Frobenius norm
f MATRIX 9determinant
matrix 1/xinverse
matrix ÷X⁻¹ × Y → result
LU formname shown with two dashes

SOLVE & Integrate

6
f SOLVE nfind a real root of LBL n
SOLVE failureError 8
f ∫x^y ndefinite integral of LBL n
accuracyset by the display format
nestingtwo subroutine levels each
memory5 registers for SOLVE, 23 for ∫

Modes, Clearing & System

5
ONpower
ON ÷self-test (CE)
ON −full memory reset
Pr ErrorContinuous Memory was lost
Error 0 – 10error codes

Keycodes

9
42the gold f prefix
43the blue g prefix
10 20 30 40÷ × − +
11√x̄ — and label A
21the LBL key
32the RTN key
36ENTER
48the radix point
0 – 9digits record as themselves

Error Codes

12
Error 0improper mathematics
Error 1improper matrix operation
Error 2improper statistics
Error 3improper register number
Error 4improper line number or label
Error 5subroutine level too deep
Error 6improper flag or digit
Error 7recursive SOLVE or ∫
Error 8SOLVE found no root
Error 9self-test failed
Error 10improper DIM
Error Pr ErrorContinuous Memory lost

Worked Example — a polynomial engine

twelve lines that turn the 15C into a root finder, an integrator and a plotter
001-42,21,12f LBL Bthe routine SOLVE and ∫ will call
002- 44 0STO 0keep x — it arrives in X
003- 44how many coefficients
004- 44 25STO Ithe Index register is the counter and the pointer
005- 00the accumulator starts at zero
006-42,21, 0f LBL 0top of the loop
007-45,20, 0RCL× 0accumulator × x
008- 45 24RCL (i)push the coefficient Rᵢ
009- 40+…and add it
010-42, 5,25f DSE Istep down a coefficient; skip when done
011- 22 0GTO 0round again
012- 43 32g RTNanswer in X

Every keycode here is as the calculator displays it, checked against the listings in HP’s handbooks.

This evaluates a polynomial of any degree by Horner’s rule((a₃x + a₂)x + a₁)x + a₀ — reading its coefficients out of consecutive registers. It is worth building because of what you can then do with it: the 15C’s whole design is that SOLVE and take a label, so once a function exists as a routine the machine will find its roots, integrate it, or tabulate it without another line of code.

Set-up. Put the coefficients in R1 upward, constant term first, so that Rₖ holds the coefficient of x^(k−1). For x³ − 6x² + 11x − 6:

6 CHS STO 1a₀ = −611 STO 2a₁ = 116 CHS STO 3a₂ = −61 STO 4a₃ = 1

How the loop works. Line 003 keys the coefficient count, not a loop-control number: plain 4 is 4.00000, whose limit field is 000 and whose step field is 00, meaning “count down to zero, one at a time”. DSE decrements first and skips the next line only once the counter has reached the limit — so the loop runs exactly four times, with the Index register pointing at R4, R3, R2, R1 in turn. That is Horner order: highest degree first. To handle a different degree you change one keystroke.

start of passaccthe running total so far
RCL× 0acc · xrecall arithmetic: X × R0 → X. No stack lift, R0 untouched
RCL (i)aᵢ  over  acc · xthe integer part of RI picks the register
+acc · x + aᵢthe new running total; stack drops
f DSE IunchangedRI: 4 → 3 → 2 → 1 → 0, then the GTO is skipped

Why the stack never gets in the way. RCL× 0 is recall arithmetic: it multiplies X by R0 in place, without lifting the stack and without disturbing R0. Only RCL (i) lifts, and the + immediately drops it again. The accumulator lives in X for the whole run and nothing else is ever pushed — which is why a four-level stack is enough.

Using it. Check it evaluates first, then hand the label to whichever engine you want:

4 f Bevaluates at x = 4 — 6.00000 ENTER 1.5 f SOLVE Ba root — 1.00002.5 ENTER 3.5 f SOLVE Banother — 3.00000 ENTER 1 f ∫xy Bthe area from 0 to 1

Those three roots are 1, 2 and 3, because the polynomial is (x−1)(x−2)(x−3). SOLVE does not know that; it only knows the sign changed between your two guesses, which is why you give it a bracket and why finding all three means asking three times.

What it costs. Twelve lines, and by the byte accounting in the Anatomy panel that is well under three of the ninety-nine registers — leaving the other ninety-six for coefficients, a matrix, or a second routine. On the 1982 machine the sums are tighter but the program is identical.

Horner’s rule and the SOLVE/∫ contract are covered in the Owner’s Handbook chapters on programming (p. 66), SOLVE (p. 180) and ∫ (p. 194); the Advanced Functions Handbook works the same ground numerically. Keycodes cross-checked against listings in both — see Anatomy.