Python to RPN - List of HP42S Commands Reference

Python to RPN - List of HP42S Commands Reference

A new way to program HP calculators like the HP42S, DM42 and Free42

The intention is to provide access to all HP42S RPN commands or to provide an equivalent.

The description column in the table below is the original "pure" HP42S command description, which will often refer to the stack. The stack is not exposed to the user in Python so please translate these descriptions as follows:

An attempt has been made to redact material in the original "pure" HP42S command description column which might be misleading. The text is struck out but remains, so that the original intent of the command is visible, which may aid understanding and programming.


HP42S Command Supported in Python to RPN Comments Parameters Description (original HP42S)
% ✓ (renamed) Percent(num,percent) (num,percent) Percent. Returns (x × y) / 100. (Leaves the y value in the y-register.)
%CH ✓ (renamed) PercentCH(y,x) (y,x) Percent change. Returns (x – y)×(100 / y).
+ Addition. Returns y + x.
+/– N/A Not applicable, please use native Python. Change the sign of the number in the x-register. While entering an exponent, can also be used to change the sign of the exponent.
1/X ✓ (renamed) Reciprocal(n) (n) Reciprocal. Returns 1/x.
10↑X ✓ (renamed) CommonExp(n) (n) Common exponential. Returns 10x.
ABS (n) Absolute value. Returns |x|.
ACOS (n) Arc cosine. Returns cos–1 x.
ACOSH (n) Arc hyperbolic cosine. Returns cosh–1 x.
ADV () Advance the printer paper one line
AGRAPH (row, col) Alpha graphics. Display a graphics image. Each character in the Alpha register specifies an 8-dot column pattern. The x- and y-registers specify the pixel location of the image.
AIP (n) Append Integer part of x to the Alpha register.
ALENG () Alpha length. Returns the number of characters in the Alpha register.
ALL () Select the All display format.
ALLΣ ✓ (renamed) ALLStat() () Select ALLΣ (All-statistics) mode, which uses 13 summation coefficients.
AND No Use built in Python boolean operators instead e.g. "not val or val2 and val3" Logical AND. Returns x AND y.
AOFF () Alpha off. Exit from the ALPHA menu.
AON () Alpha on. Select the ALPHA menu.
ARCL Same multi parameter features as alpha() except always appends to the alpha register. Must specify variables and literals, not the stack. (...) Alpha recall. Copy data into the Alpha register, appending it to the current contents. Numbers are formatted using the current display format. Parameter: register or variable. (indirect allowed)
AROT () Alpha rotate. Rotate the Alpha register by the number of characters specified in the x-register.
ASHF () Alpha shift. Shifts the six left-most characters out of the Alpha register.
ASIN (n) Arc sine. Returns sin–1 x.
ASINH (n) Arc hyperbolic sine. Returns sinh–1 x.
ASSIGN ASSIGN('someprog', 18) (func, keynum) Assign a function, program, or variable to a menu key in the CUSTOM menu. Parameter 1: function name, alpha program label, or variable name. Parameter 2: key number (01–18).
ASTO (var) Alpha store. Copy the first six characters in the Alpha register into a register or variable. Parameter: register or variable (indirect allowed)
ATAN (n) Arc tangent. Returns tan–1 x.
ATANH (n) Arc hyperbolic tangent. Returns tanh–1 x.
ATOX () Alpha to X. Convert the left-most character in the Alpha register to its character code (returned to the x-register) and delete the character.
AVIEW Use the new alpha() function to build up strings of any length in the alpha register. (...) Alpha view. Display the Alpha register.
BASE+ ✓ (renamed) BASEplus(y,x) (y,x) Base addition. Returns the 36-bit sum of y + x.
BASE+/– ✓ (renamed) BASEplusMinus(y,x) (y,x) Base change sign. Returns the 36-bit 2's complement of x.
BASEx ✓ (renamed) BASEtimes(y,x) (y,x) Base multiplication. Returns the 36-bit product of y x x.
BASE÷ ✓ (renamed) BASEdivide(y,x) (y,x) Base division. Returns the 36-bit quotient of y ÷ x.
BASE– ✓ (renamed) BASEminus(y,x) (y,x) Base subtraction. Returns the 36-bit difference of y – x.
BEEP () Sound a sequence of four tones.
BEST () Select the best curve-fitting model for the current statistical data.
BINM () Select Binary mode (base 2)
BIT? ✓ (renamed) testBIT(y,xth_bit) (y,xth_bit) Test the xth bit of y. If the bit is set (1), execute the next program line; if the bit is clear (0), skip the next program line.
BST Not programmable Back step. Move the program pointer to the previous program line. (Not programmable.)
CF (flag) Clear flag nn (00 ≤ nn ≤ 35 or 81 ≤ nn ≤ 99). Parameter: flag number (indirect allowed)
CLA () Clear Alpha register. If Alpha mode is on and character entry is terminated (no cursor displayed), then ◄ also executes the CLA function.
CLALL N/A Not applicable, please use native Python. Clear all. Clear all stored programs and data.(Not Programmable.)
CLD () Clear display. Clear a message from the display.
CLKEYS () Clear all CUSTOM menu key assignments.
CLLCD () Clear LCD (liquid crystal display). Blanks the entire display.
CLMENU () Clear MENU. Deletes all menu key definitions for the programmable menu.
CLP Pass in the name of the function as a string e.g. CLP('myfunc') (funcname_str) Clear a program from memory. Parameter: global label
CLRG Will clear all Python variables (but not named variables) - use with care. () Clear Registers. Clear all of the numbered storage registers to zero.
CLST N/A Not applicable, please use native Python. Clear Stack. Clear the stack registers to zero.
CLV (var) Clear a variable from memory. Parameter: variable name (indirect allowed)
CLX N/A Not applicable, please use native Python. Clear x-register to zero. If digit entry is terminated (no cursor in the display), then ◄ also executes CLX.
CLΣ ✓ (renamed) CLStat() () Clear statistics. Clear the accumulated statistical data in the summation registers.
COMB As usual pass in two parameters instead of referring to the stack x and y. (y,x) Combinations of y items taken x at a time = y! / [x!(y-x)!]
COMPLEX Takes one or two parameters. If the parameters are two normal numbers (real,imaginary), returns a complex number e.g. complex_num = COMPLEX(0, 1). Note: You can also enter complex numbers without this COMPLEX function using native Python syntax e.g. 0 + 1j which is engineering notation for 0 + i1. Yes, Python uses the letter 'j' not the letter 'i' and puts it after the imaginary number, not before.
If the parameter is a single complex number, returns two normal numbers - assign the two return values into variables e.g. real, imaginary = COMPLEX(complex_num)
(...) Convert two real numbers (or matrices) into a complex number (or matrix). Converts a complex number (or matrix) into two real numbers (or matrices).
CORR () Returns a correlation coefficient using the current statistical data and curve-fitting model.
COS (n) Cosine. Returns cos(x).
COSH (n) Hyperbolic cosine. Returns cosh(x).
CPX? ✓ (renamed) isCPX(n) (n) If the x-register contains a complex number, execute the next program line; if the x-register does not contain a complex number, skip the next program line.
CPXRES () Complex-results. Enable the calculator to return a complex result, even if the inputs are real numbers.
CROSS (m,m) Returns the cross product of two vectors (matrices or complex numbers).
DECM () Selects Decimal mode (base 10).
DEG () Select the Degrees angular mode.
DEL Not programmable Delete the specified number of lines from the current program. Program-entry mode must be on. (Not programmable.) Parameter: number of lines.
DELAY (num_seconds) Set the print delay time to x seconds.
DELR mymatrix.delr(n) Delete row. Delete the current row from the indexed matrix.
DET (mvar) Determinant. Returns the determinant of the matrix in the x-register.
DIM mymatrix.dim(rows,cols) Use this to resize existing matrices - you cannot create new matrices with dim() Dimension a matrix to x columns and y rows. If the matrix does not exist, DIM creates it. Parameter: variable name (indirect allowed)
DIM? ✓ (renamed) whatDIM(mvar)

Returns two values, which need to be assigned to variables e.g. rows, cols = whatDIM(mymatrix). Also consider len(mymatrix) if you just want the number of rows.
(mvar) Returns the dimensions of the matrix in the x-register (rows to the y-register and columns to the x-register).
DOT (n,n) Dot Product. Returns the dot product of two vectors (matrices or complex numbers).
DSE No Use native Python for...range() or while... for looping. Decrement, Skip if (less than or) Equal. Given ccccccc.fflii in a variable or register, decrements ccccccc by ii and skips the next program line if ccccccc is now ≤ fff. Parameter: register or variable (indirect allowed)
EDIT Exactly the same as EDITN - pass in the variable containing the matrix to edit. (mvar) Edit a matrix in the x-register.
EDITN (mvar) Edit a named matrix. Parameter: variable name (indirect allowed)
END N/A Not applicable, please use native Python. End of a program.
ENG (digits) Select Engineering display format. Parameter: number of digits (indirect allowed)
ENTER No Use Python variables Separate two numbers keyed in sequentially; copies x into the y-register, y into the z-register, and z into the t-register, and loses t.
EXITALL () Exit all menus.
EXPF () Select the exponential curve-fitting model.
E↑X ✓ (renamed) Eto(n) (n) Natural exponential. Returns ex.
E↑X-1 ✓ (renamed) EtoMinus1(n) (n) Natural exponential for values of x which are close to zero. Returns ex–1, which provides a much higher accuracy in the fractional part of the result.
FC? ✓ (renamed) isFC(flag) (flag) Flag clear test. If the specified flag is clear, executes the next program line; if the flag is set, skips the next program line. Parameter: flag number (indirect allowed)
FC?C No Use any normal variable to store boolean values, test with the Python "if". Flag clear test and clear. If the specified flag is clear, execute the next program line; if the flag is set, skip the next program line. Cleared after the test is complete. (This function can be used only with flags 00 through 35 and 81 through 99.) Parameter: flag number (indirect allowed)
FCSTX (n) Forecasts an x-value given a y-value.
FCSTY (n) Forecasts a y-value given an x-value.
FIX (n) Select Fixed-decimal display format. Parameter: number of digits (indirect allowed)
FNRM (mvar) Returns the Frobenius norm of the matrix in the x-register.
FP (n) Returns the fractional part of x.
FS? ✓ (renamed) isFS(flag) (flag) Flag set test. If the specified flag is set, execute the next program line; if the flag is clear, skip the next program line. Parameter: flag number (indirect allowed)
FS?C No Use any normal variable to store boolean values, test with the Python "if". Flag set test and clear. If the specified flag is set, execute the next program line; if the flag is clear, skip the next program line. Clear the flag after the test is complete. (This function can be used only with flags 00 through 35 and 81 through 99.) Parameter: flag number (indirect allowed)
GAMMA (n) Gamma function. Returns Γ(x).
GETKEY () Get key. The calculator waits for you to press a key. When you do, the key number is returned to the x-register. Keys are numbered from 1 through 37 ( Σ+ through ÷ )for normal keys and 38 through 74 (■ Σ– through ■CATALOG) for shifted keys.
GETM No Use Python matrix/list indexing and slicing syntax. Get matrix. Copy a submatrix into the x-register from the indexed matrix.
GRAD () Select Grads angular mode.
GROW No To compensate use the new command mymatrix.appendr() Select Grow mode. Executing → or J+ causes the matrix to grow by one new row if the index pointers are at the last (lower-right) element in the matrix.
GTO N/A Not applicable, please use native Python. Go to label. From the keyboard, move the program pointer to the specified label. In a running program, cause the program to branch to the specified label. Parameter: local or global label (indirect allowed)
HEXM () Select Hexadecimal mode (base 16).
HMS+ ✓ (renamed) HMSplus(n,n) (n,n) Add x and y using H.MMSSss (hours-minutes-seconds) format.
HMS– ✓ (renamed) HMSminus(n,n) (n,n) Subtract x from y using H.MMSSss format.
I+ No Use Python matrix/list indexing and slicing syntax. Increment the row pointer in the indexed matrix.
INDEX No Use Python matrix/list indexing and slicing syntax. Index a named matrix. Parameter: variable name (indirect allowed)
INPUT Now takes a normal Python variable as a parameter - do not put variable in quotes. Specifying HP42S registers not supported. Note: The variable referred to as the parameter will be converted into RPN as a named variable rather than converted into an auto allocated numbered RPN register - unless that variable has previously been assigned to - in which case it will be converted into RPN as an auto allocated numbered register. (var) Recall a register or variable to the x-register, display the name of the register or variable along with the contents of the x-register, and halt program execution. Pressing R/S (or ■SST) stores x into the register or variable; pressing EXIT cancels. (Used only in programs.) Parameter: register or variable (indirect allowed)
INSR mymatrix.insr() Insert a row in the indexed matrix.
INTEG Now takes a normal Python variable as a parameter - do not put variable in quotes. Specifying registers not supported. (var) Integrate the selected integration program with respect to the specified variable. Parameter: variable name (indirect allowed)
INVRT (mvar) Returns the inverse of the matrix in the x-register.
IP (n) Returns the integer part of x
ISG No Use native Python for...range() or while... for looping. Increment, Skip if Greater. Given ccccccc.fffii in a variable or register, increments ccccccc by ii and skips the next program line if ccccccc is now > fff. Parameter: register or variable (indirect allowed)
I– No Use Python matrix/list indexing and slicing syntax. Decrement the row pointer in the indexed matrix.
J+ No Use Python matrix/list indexing and slicing syntax. Increment the column pointer in the indexed matrix.
J– No Use Python matrix/list indexing and slicing syntax. Decrement the column pointer in the indexed matrix.
KEYASN () Selects key-assignments mode for the CUSTOM menu.
KEYG KEYG(1, 'somefunc') (key, somefunc) On menu key, go to. Branch to specified label to when a particular menu key is pressed. Parameter 1:: Key number (1 through 9), Parameter 2: program label (global or local)
KEYX No Use Python variables On menu key, execute. Execute (as a subroutine) specified label when a particular menu key is pressed. Parameter 1:: Key number (1 through 9), Parameter 2: program label (global or local)
LASTX No Use Python variables Last x. Recall the last value of x used in a calculation.
LBL N/A Not applicable, please use native Python. Label. Identify programs and routines for execution and branching. Parameter: local or global label.
LCLBL In a RPN program generated from Python local alpha labels represent the user defined Python functions. () Select Local label mode for the CUSTOM menu (to use CUSTOM menu assignments to execute local Alpha labels within the current program).
LINF () Select the linear curve-fitting model.
LINΣ ✓ (renamed) LINStat() () Select Linear statistics mode, which uses six summation coefficients.
LIST Not programmable Print a portion of a program listing. (Not programmable.) Parameter: number of lines.
LN (n) Natural logarithm. Returns ln(x).
LN1+X ✓ (renamed) LN1plus(n) (n) Natural logarithm for values close to zero. Returns ln(1 + x), which provides a much higher accuracy in the fractional part of the result.
LOG (n) Common logarithm. Returns log10(x).
LOGF (n) Select the logarithmic curve-fitting model.
MAN () Select Manual print mode.
MAT? ✓ (renamed) isMAT(x) (x) If the x-register contains a matrix, execute the next program line; if the X-register does not contain a matrix, skip the next program line.
MEAN Assign the two return values into variables e.g. 'a, b = MEAN()' () Mean. Returns the mean of x-values (Σx / n) and the mean of y-values (Σy / n) that have been stored with Σ+. The mean of x is returned to the X-register and the mean of y is returned to the Y-register.
MENU () Select the programmable menu.
MOD (y,x) Modulo. Returns the remainder for y / x.
MVAR MVAR("length") etc. Declare a menu variable in a SOLVER program. Parameter: variable name.
N! ✓ (renamed) Factorial(n) (n) Factorial. Returns x!.
NEWMAT (rows,cols) New matrix. Creates a y × x matrix in the x-register.
NORM () Select Normal print mode, which prints a record of keystrokes.
NOT No Use built in Python boolean operators instead e.g. "not val or val2 and val3" Logical NOT. Returns NOT(x).
OCTM () Select Octal mode
OFF () Turn the calculator off (programmable). (Pressing ■OFF does not execute the programmable OFF function.)
OLD No Use Python matrix/list indexing and slicing syntax. Recall the current element from the indexed matrix. (Equivalent to RCLEL.)
ON () Continuous on. Prevent the calculator from automatically turning off after ten minutes of inactivity.
OR No Use built in Python boolean operators instead e.g. "not val or val2 and val3" Logical OR. Returns x OR y.
PERM (y,x) Permutations of y items taken x at a time. Returns y!/(y – x)!
PGMINT Pass in the name of the function as a string e.g. PGMINT('myfunc') (funcname_str) Select a program to integrate. Parameter: global label (indirect allowed)
PGMSLV Pass in the name of the function as a string e.g. PGMSLV('myfunc') (funcname_str) Select a program to solve. Parameter: global label (indirect allowed) ,
PI () Put an approximation of π into the x-register (3.14159265359).
PIXEL (row, col) Turn on a single pixel (dot) in the display y: row (y axis) x: col (x axis)
POLAR () Select polar coordinate mode for displaying complex numbers.
POSA (char) Position in Alpha. Searches the Alpha register for the target specified in the x-register. If found, returns the character position; if not found, returns -1.
PRA () Print Alpha register.
PRLCD () Print LCD (liquid crystal display). Prints the entire display.
PROFF () Printing off. Clears flags 21 and 55.
PROMPT (str) Display the Alpha register and halt program execution. To store the value entered during the prompt into a variable simply assign to that variable e.g. myvar = PROMPT('enter val')
PRON () Printing on. Sets flags 21 and 55.
PRP Not programmable Print program. If a label is not specified, print the current program. (Not programmable.) Parameter: global label (optional)
PRSTK () Print stack. Print the contents of the stack registers (x, y, z and t).
PRUSR () Print user variables and programs.
PRV (var) Print variable. Parameter: variable name (indirect allowed)
PRX Prints any variable to the virtual printer. E.g. PRX(myvar) (var) Print x-register.
PRZ () Print statistics. Prints the contents of the summation registers.
PSE () Pause program execution for about 1 second.
PUTM No Use Python matrix/list indexing and slicing syntax. Put matrix. Stores the matrix in the X-register into the indexed matrix beginning at the current element.
PWRF () Select the power curve-fitting model.
QUIET Not programmable Toggle flag 26 to disable or enable the beeper (Not programmable )
R/S Use STOP() () Run/stop. Runs a program (beginning at the current program line) or stops a running program. In program-entry mode, inserts a STOP instruction into the program.
R<>R mymatrix.row_swap(row,row) Row swap row. Swaps the elements in rows x and y in the indexed matrix.
RAD () Select Radians angular mode
RAN () Returns a random number (0 ≤ x < 1)
RCL Whilst register use is generally not supported (use Python variables instead) sometimes it is useful to access a specific RPN calculator register e.g. a statistical register like 11 or 12 etc. You can do this with e.g. 'RCL(12)' and this instruction will be inserted into the converted RPN program. Typically entering the Python code 'x = RCL(12)' is more useful since you can then use that value somewhere or even display it e.g. print(x) (register_num) Recall data into the x-register. Parameter: register or variable
RCL+ No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Recall addition. Recall data and add it to the contents of the x-register. Parameter: register or variable (indirect allowed)
RCL- No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Recall subtraction. Recall data and subtract it from the contents of the x-register. Parameter: register or variable (indirect allowed)
RCLEL No Use Python matrix/list indexing and slicing syntax. Recall element. Recalls the current matrix element from the indexed matrix.
RCLIJ No Use Python matrix/list indexing and slicing syntax. Recall the row- and column-pointer values (I and J) for the indexed matrix.
RCL× No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Recall multiplication. Recall data and multiply it by the contents of the x-register. Parameter: register or variable (indirect allowed)
RCL÷ No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Recall division. Recall data and divide it into the contents of the x-register. Parameter: register or variable (indirect allowed)
RDX, ✓ (renamed) RDXcomma() () Select a comma to be used as the radix mark (decimal point).
RDX. ✓ (renamed) RDXperiod() () Select a period to be used as the radix mark (decimal point).
REAL? ✓ (renamed) isREAL(n) (n) If the x-register contains a real number, execute the next program line; if the x-register does not contain a real number, skip the next program line.
REALRES () Real-results. Disables the calculator's ability to return a complex result using real-number inputs.
RECT () Select Rectangular coordinate mode for displaying complex numbers.
RND (n) Round the number in the x-register using the current display format.
RNRM (mvar) Return the row norm of the matrix in the x-register.
ROTXY Pass two parameters to this function. (y,x) Rotate the 36-bit number in the y-register by x bits.
RSUM (mvar) Return the row sum of each row of the matrix in the x-register and returns the sums in a column matrix.
RTN return Return. In a running program, branches the program pointer back to the line following the most recent XEQ instruction. If there is no matching XEQ instruction, program execution halts. From the keyboard, RTN moves the program pointer to line 00 of the current program.
R↑ No Use Python variables Roll up the contents of the four stack registers one position.
R↓ No Use Python variables Roll down the contents of the four stack registers one position.
SCI (digits) Select scientific notation display format. Parameter: number of digits (indirect allowed)
SDEV () Standard deviation. Returns sx and sy using the current statistical data.
SEED (n) Store a seed for the random number generator.
SF (flag) Set flag nn (00 ≤ nn ≤ 35; 81 ≤ nn ≤ 99). Parameter: flag number (indirect allowed)
SIGN (var) Sign. Return 1 for x ≥ 0, –1 for x < 0, and 0 for non-numbers. Returns the unit vector of a complex number.
SIN (n) Sine. Returns sin(x).
SINH (n) Hyperbolic sine. Returns sinh(x).
SIZE (n) Set the number of storage registers. Parameter: number of registers.
SLOPE () Return the slope of the linear transformation of the current curve-fitting model.
SOLVE (var) Solve for an unknown variable. Parameter: variable name (indirect allowed)
SQRT (n) Square root. Returns √x.
SST Not programmable Single step. Moves the program pointer to the next program line. (Not programmable.)
STO No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Store a copy of x into a destination register or variable. Parameter: register or variable (indirect allowed)
STO+ No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Store addition. Adds x to an existing register or variable. Parameter: register or variable (indirect allowed)
STOEL No Use Python matrix/list indexing and slicing syntax. Store element. Stores a copy of x into the current element of the indexed matrix.
STOIJ No Use Python matrix/list indexing and slicing syntax. Moves the row- and column-pointers to I = x and J = y in the indexed matrix.
STOP () Stop program execution. (R/S in program entry mode).
STO× No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Store multiplication. Multiplies an existing register or variable by x. Parameter: register or variable (indirect allowed)
STO÷ No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Store division. Divides an existing register or variable by x. Parameter: register or variable (indirect allowed)
STO– No Use Python variables instead, e.g. "myar = 100, myvar += 1, var2 = myvar" or even expressions like "myvar *= var3/(2-1)" Store subtraction. Subtracts x from an existing register or variable. Parameter: register or variable (indirect allowed)
STR? ✓ (renamed) isSTR(x) (x) If the x-register contains an Alpha string, execute the next program line; if the x-register does not contain an Alpha string, skip the next program line.
SUM Assign the two return values into variables e.g. 'a, b = SUM()' () Returns the sums Σx and Σy into the x- and y-registers.
TAN (n) Tangent. Returns tan(x).
TANH (n) Hyperbolic tangent. Returns tanh(x).
TONE (n) Sounds a tone. Parameter: tone number (0–9) (indirect allowed)
TRACE () Select Trace printing mode, which prints a record of keystrokes and results.
TRANS (mvar) Return the transpose of the matrix in the x-register.
UVEC (n) Unit vector. Return the unit vector for the matrix or complex number in the x-register.
VARMENU Also check out the new advanced Python function varmenu() Create a variable menu using MVAR instructions following the specified global label. Parameter: global program label. (indirect allowed)
VIEW (var) View the contents of a register or variable. Parameter: register or variable (indirect allowed)
WMEAN () Weighted mean. Return the mean of x-values weighted by the y-values Σxy / Σy that have been stored with Σ+.
WRAP No Use Python matrix/list indexing and slicing syntax. Select Wrap mode, which prevents the indexed matrix from growing.
X<0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X less than zero test. If true, execute the next program line; if false, skip the next program line
X<> No Use Python variables Swaps the contents of the x-register with another register or variable. Parameter: register or variable (indirect allowed)
X<>Y No Use Python variables Swaps the contents of the x- and y-registers.
X<Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X less than y test. If true, execute the next program line; if false, skip the next program line
X=0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X equal to zero test. If true, execute the next program line; if false, skip the next program line
X=Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X equal to y test. If true, execute the next program line; if false, skip the next program line
X>0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X greater than zero test. If true, execute the next program line; if false, skip the next program line
X>Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X greater than y test. If true, execute the next program line; if false, skip the next program line
XEQ N/A Just call a function e.g. myfunc() Execute a function or program. Parameter: function or label (indirect allowed)
XOR No Use built in Python boolean operators instead e.g. "not val or val2 and val3" Logical XOR (exclusive OR). Returns x XOR y.
XTOA Parameter can be an integer or a string (n_or_str) X to Alpha. Appends a character (specified by the code in the x-register) to the Alpha register. If the x-register contains an Alpha string, appends the entire string.
X↑2 ✓ (renamed) y**2 (n) Square. Returns x2.
X≠0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X not equal to zero test. If true, execute the next program line; if false, skip the next program line
X≠Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X not equal to y test. If true, execute the next program line; if false, skip the next program line
X≤0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X less than or equal to zero test. If true, execute the next program line; if false, skip the next program line
X≤Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X less than or equal to y test. If true, execute the next program line; if false, skip the next program line
X≥0? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X greater than or equal to zero test. If true, execute the next program line; if false, skip the next program line
X≥Y? No Use Python "if" statements instead. E.g. "if var1 == var2 or (var3 >= var4):"... X greater than or equal to y test. If true, execute the next program line; if false, skip the next program line
YINT () y-intercept. Returns the y-intercept of the curve fitted to the current statistical data.
Y↑X ✓ (renamed) y**x (n) Power. Returns yx.
× Multiplication. Returns x × y.
÷ Division. Returns y / x.
Σ+ ✓ (renamed) StatPlus(y,x) (y,x) Summation plus. Accumulate a pair of x- and y values into the summation registers.
Σ- ✓ (renamed) StatMinus(y,x) (y,x) Summation minus. Subtract a pair of x- and y-values from the summation registers.
ΣREG ✓ (renamed) StatREG(n) (n) Summation registers. Defines which storage register begins the block of summation registers. Parameter: register number (indirect allowed)
ΣREG? ✓ (renamed) StatWhichREG() () Return the register number of the first summation register.
Subtraction. Returns y – x.
No Use Python matrix/list indexing and slicing syntax. Move left one element in the indexed matrix.
No Use Python matrix/list indexing and slicing syntax. Move up one element in the indexed matrix.
No Use Python matrix/list indexing and slicing syntax. Move right one element in the indexed matrix.
→DEC ✓ (renamed) toDEC(n) (n) To decimal. Converts the octal (base 8) representation of a number to decimal (base 10). Note: This function is included to provide program compatibility with the HP-41 (which uses the function name DEC).
→DEG ✓ (renamed) toDEG(n) (n) To degrees. Convert an angle-value from radians to degrees. Returns x×(180/π).
→HMS ✓ (renamed) toHMS(n) (n) To hours, minutes, and seconds. Convert x from a decimal fraction to a minutes-seconds format.
→HR ✓ (renamed) toHR(n) (n) To hours. Converts x from a minutes-seconds format to a decimal fraction.
→OCT ✓ (renamed) toOCT(n) (n) To octal. Converts a decimal number to the octal representation. Note: This function is included to provide program compatibility with the HP-41 (which uses the function name OCT).
→POL Takes one or two parameters. If the parameter is a single complex number, returns a single complex number e.g. complex_num = toPOL(complex_num). If the parameters are two normal numbers, returns two normal numbers - assign the two return values into variables e.g. a, b = toPOL(1, 2) (...) To polar. Converts x and y to the corresponding polar coordinates r and θ. If the x-register contains a complex number, converts the two parts of the number to polar values.
→RAD ✓ (renamed) toRAD(n) (n) To radians. Converts a angle value in degrees to radians. Returns x×(π/180).
→REC Takes one or two parameters. If the parameter is a single complex number, returns a single complex number e.g. complex_num = toREC(complex_num). If the parameters are two normal numbers (θ,r), returns two normal numbers - assign the two return values into variables e.g. a, b = toREC(1, 2) (...) To rectangular. Converts r (in the x-register) and θ (in the y-register) to the corresponding rectangular coordinates, x and y. If the X-register contains a complex number, converts the two parts of the number to rectangular values.
No Use Python matrix/list indexing and slicing syntax. Move down one element in the indexed matrix.
Not programmable Backspace or clear x-register. In Program entry mode, deletes the current program line. Not programmable

Acknowledgement: List of commands taken from the Alternative HP-42S/Free42 Manual




Related Calculator Stuff

Interested in a modern thermal printer for the Free42 calculator emulator?

Introducing Print42 for Mac and Windows, which echoes your Free42 calculator virtual tape to a fast, modern thermal printer.



http://www.print42.atug.com