{
"commands": {
"!": {
"name": "Factorial",
"description": "Computes the factorial of a non-negative integer; for other reals it uses the gamma function, giving Γ(x+1).",
"stack": "n → n!; x → Γ(x+1); 'symb' → '(symb)!'",
"examples": [
{
"input": "5."
},
{
"input": "0.5",
"comment": "A non-integer gives the gamma function's value Γ(1.5)"
},
{
"input": "20."
}
]
},
"%": {
"name": "Percent",
"description": "Computes y percent of x, i.e. x·y/100. Units on x carry over to the result.",
"stack": "x y → x·y/100; x_unit y → (x·y/100)_unit; 'symb' y → '%(symb,y)'",
"examples": [
{
"input": "200. 15."
},
{
"input": "50._m 10.",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"description": "Computes y percent of x, that is x·y/100.",
"stack": "x y → x·y/100; 'symb' y → '%(symb,y)'"
}
}
},
"%CH": {
"name": "Percent change",
"description": "Computes the percentage change going from x to y, i.e. 100·(y-x)/x; a decrease gives a negative result.",
"stack": "x y → 100·(y-x)/x; 'symb' y → '%CH(symb,y)'",
"examples": [
{
"input": "50. 60.",
"comment": "From 50 to 60 is a rise of 20 percent"
},
{
"input": "80. 60."
}
]
},
"%T": {
"name": "Percent of total",
"description": "Computes what percentage y is of the total x, i.e. 100·y/x.",
"stack": "x y → 100·y/x; 'symb' y → '%T(symb,y)'",
"examples": [
{
"input": "200. 50."
},
{
"input": "8. 2."
}
]
},
"'": {
"description": "Quote delimiter: a name or expression written between single quotes is pushed as an object rather than evaluated.",
"stack": "→ 'symb'",
"category": "PRG",
"skip": "a delimiter of command-line and program source, not a command that runs on its own"
},
"*": {
"name": "Multiply",
"description": "Multiplies two objects: numbers, binary integers, units (combining their dimensions), algebraics, and arrays including matrix by matrix or matrix by vector products.",
"stack": "x y → x*y; [[matrix]] [array] → [array]'; x_unit1 y_unit2 → (x*y)_unit1*unit2",
"category": "Keyboard",
"examples": [
{
"input": "4. 2.5"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]] [ 1. 1. ]"
},
{
"input": "3._m 2._s",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"description": "Multiplies two objects: numbers, binary integers, algebraics, and arrays including matrix by matrix or matrix by vector products.",
"stack": "x y → x*y; [[matrix]] [array] → [array]'; 'symb1' 'symb2' → 'symb1*symb2'"
}
}
},
"*H": {
"name": "Multiply height",
"description": "Multiplies the height of the plot range by a factor, so the vertical extent in PPAR grows or shrinks; the y value at the display's centre row stays where it is.",
"stack": "x →",
"category": "PLOT",
"examples": [
{
"input": "2.",
"run": "*H PPAR",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "The y range -3.1 to 3.2 doubles to -6.2 to 6.4; 0, at the centre row, stays put"
},
{
"input": "2.",
"run": "*H PPAR 1 2 SUB",
"models": [
"28s"
]
}
]
},
"*W": {
"name": "Multiply width",
"description": "Multiplies the width of the plot range by a factor, keeping it centred, so the horizontal extent in PPAR grows or shrinks.",
"stack": "x →",
"category": "PLOT",
"examples": [
{
"input": "2.",
"run": "*W PPAR",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "The x range -6.5 to 6.5 doubles to -13 to 13; the y range stays"
},
{
"input": "2.",
"run": "*W PPAR 1 2 SUB",
"models": [
"28s"
]
}
]
},
"+": {
"name": "Add",
"description": "Adds two objects: numbers, binary integers, arrays of equal size, compatible unit objects and algebraics. With strings it concatenates, and with a list it appends or joins lists.",
"stack": "x y → x+y; \"str1\" \"str2\" → \"str1str2\"; {list} obj → {list'}",
"category": "Keyboard",
"examples": [
{
"input": "2. 3."
},
{
"input": "\"AB\" \"CD\""
},
{
"input": "{ 1. 2. } 3."
}
],
"per_model": {
"28s": {
"description": "Adds two objects: numbers, binary integers, arrays of equal size and algebraics. With strings it concatenates, and with a list it appends or joins lists.",
"stack": "x y → x+y; \"str1\" \"str2\" → \"str1str2\"; {list} obj → {list'}"
}
}
},
"-": {
"name": "Subtract",
"description": "Subtracts level 1 from level 2 for reals, complex numbers, binary integers, same-size arrays, compatible units and algebraics.",
"stack": "x y → x-y; z1 z2 → z1-z2; 'symb1' 'symb2' → 'symb1-symb2'",
"category": "Keyboard",
"examples": [
{
"input": "5. 3."
},
{
"input": "(1.,2.) (3.,1.)"
},
{
"input": "'A' 'B'"
}
],
"per_model": {
"28s": {
"description": "Subtracts level 1 from level 2 for reals, complex numbers, binary integers, same-size arrays and algebraics.",
"stack": "x y → x-y; z1 z2 → z1-z2; 'symb1' 'symb2' → 'symb1-symb2'"
}
}
},
"/": {
"name": "Divide",
"description": "Divides level 2 by level 1 for numbers, binary integers, units and algebraics; with a matrix in level 1 it solves the linear system for the array in level 2.",
"stack": "x y → x/y; [array] [[matrix]] → [array]'; 'symb1' 'symb2' → 'symb1/symb2'",
"category": "Keyboard",
"examples": [
{
"input": "7. 2."
},
{
"input": "10._m 2._s",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "[ 5. 6. ] [[ 1. 0. ][ 0. 2. ]]",
"comment": "Solves the linear system: the matrix times the result gives [ 5 6 ]"
}
],
"per_model": {
"28s": {
"description": "Divides level 2 by level 1 for numbers, binary integers and algebraics; with a matrix in level 1 it solves the linear system for the array in level 2.",
"stack": "x y → x/y; [array] [[matrix]] → [array]'; 'symb1' 'symb2' → 'symb1/symb2'"
}
}
},
";": {
"description": "Separator token for function arguments and list items in algebraic entry; it does no work as a stand-alone command.",
"stack": "→",
"category": "Keyboard",
"skip": "a syntax separator, not a command that does anything on its own"
},
"<": {
"name": "Less than",
"description": "Compares level 2 against level 1 and pushes 1 if it is smaller, else 0; accepts reals, binary integers, strings (compared by character code) and units of compatible dimension, and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb<x'",
"examples": [
{
"input": "2. 3."
},
{
"input": "\"B\" \"A\""
},
{
"input": "1._m 50._cm",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "Units are compared after conversion: 1 m is longer than 50 cm"
}
],
"per_model": {
"28s": {
"description": "Compares level 2 against level 1 and pushes 1 if it is smaller, else 0; accepts reals, binary integers and strings (compared by character code), and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb<x'"
}
}
},
"=": {
"name": "Equation",
"description": "Joins two objects into an equation with the first as left side and the second as right side. Evaluating the equation numerically gives the difference of the two sides.",
"stack": "obj1 obj2 → 'obj1=obj2'",
"category": "Keyboard",
"examples": [
{
"input": "'X^2' 4."
},
{
"input": "'A+B' 'C'"
}
]
},
"==": {
"name": "Equal (test)",
"description": "Tests two objects for equality, returning 1 or 0; reals and complex numbers compare by value, other objects by type and content. When a name or algebraic is involved it returns a symbolic comparison instead.",
"stack": "obj1 obj2 → 0/1; 'symb' x → 'symb==x'",
"examples": [
{
"input": "2. 2."
},
{
"input": "\"A\" \"B\""
},
{
"input": "'X' 1."
}
]
},
">": {
"name": "Greater than",
"description": "Compares level 2 against level 1 and pushes 1 if it is larger, else 0; accepts reals, binary integers, strings and compatible units, and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb>x'",
"examples": [
{
"input": "5. 3."
},
{
"input": "#10h #20h"
}
],
"per_model": {
"28s": {
"description": "Compares level 2 against level 1 and pushes 1 if it is larger, else 0; accepts reals, binary integers and strings (compared by character code), and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb>x'"
}
}
},
"?": {
"name": "Undefined",
"description": "Puts the undefined symbol on the stack, the value the CAS uses for a result that cannot be determined.",
"stack": "→ '?'",
"category": "CAS",
"examples": [
{
"input": ""
}
]
},
"ABCUV": {
"name": "Polynomial Bézout equation",
"description": "Solves the polynomial Bezout equation a*u+b*v=c for u and v, given polynomials a, b and c.",
"stack": "'a' 'b' 'c' → 'u' 'v'",
"examples": [
{
"input": "'X^2+1' 'X-1' '1'",
"comment": "Finds u and v with (X^2+1)*u+(X-1)*v=1"
},
{
"input": "'X' 'X+1' 'X^2'"
}
]
},
"ABORT": {
"description": "Stops the running program at the point where it stands. The program cannot be resumed.",
"stack": "→",
"examples": [
{
"input": "1.",
"run": "« 2. ABORT 3. » EVAL"
}
]
},
"ABS": {
"name": "Absolute value",
"description": "Gives the size of a value: a real without its sign, a complex number's modulus, or an array's Frobenius (Euclidean) length. Units are kept, and symbolic arguments give a symbolic result.",
"stack": "x → |x|; z → x; [array] → x; x_unit → x_unit; 'symb' → 'ABS(symb)'",
"examples": [
{
"input": "-3.5"
},
{
"input": "(3.,4.)"
},
{
"input": "[ 3. 4. ]"
}
],
"per_model": {
"28s": {
"description": "Gives the size of a value: a real without its sign, a complex number's modulus, or an array's Frobenius (Euclidean) length. Symbolic arguments give a symbolic result.",
"stack": "x → |x|; z → x; [array] → x; 'symb' → 'ABS(symb)'"
}
}
},
"ACK": {
"name": "Acknowledge alarm",
"description": "Acknowledges the oldest past-due appointment alarm, clearing it from the due list (and the alarm annunciator when none remain).",
"stack": "→",
"examples": [
{
"input": ""
}
]
},
"ACKALL": {
"name": "Acknowledge all alarms",
"description": "Acknowledges every past-due appointment alarm at once, turning off the alarm annunciator; repeating alarms are rescheduled.",
"stack": "→",
"examples": [
{
"input": ""
}
]
},
"ACOS": {
"name": "Arc cosine",
"description": "Arc cosine, giving the angle in the current angle mode. Reals outside -1 to 1 produce a complex result.",
"stack": "x → acos x; z → acos z; 'symb' → 'ACOS(symb)'",
"examples": [
{
"input": "0.5",
"setup": "DEG"
},
{
"input": "-1.",
"setup": "RAD"
}
]
},
"ACOS2S": {
"name": "Arc cosine to arc sine",
"description": "Rewrites an expression so that every arccosine in it becomes pi/2 minus the arcsine of the same argument.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'ACOS(X)'"
},
{
"input": "'ACOS(X)+ACOS(Y)'"
}
]
},
"ACOSH": {
"name": "Inverse hyperbolic cosine",
"description": "Computes the inverse hyperbolic cosine of a real or complex argument; reals below 1 give a complex result.",
"stack": "x → acosh x; z → acosh z; 'symb' → 'ACOSH(symb)'",
"examples": [
{
"input": "2."
},
{
"input": "0.5"
},
{
"input": "1."
}
]
},
"ADD": {
"description": "Adds two lists element by element, or adds one object to each item of a list; unlike +, it never concatenates lists.",
"stack": "{list1} {list2} → {list3}; {list} obj → {list'}; obj {list} → {list'}",
"examples": [
{
"input": "{ 1. 2. } { 10. 20. }"
},
{
"input": "{ 1. 2. 3. } 5."
}
]
},
"ADDTMOD": {
"name": "Add modulo",
"description": "Adds two expressions or integers and reduces the result modulo the current CAS modulus.",
"stack": "obj1 obj2 → obj",
"examples": [
{
"input": "'X^2+3*X+6' '9*X+3'",
"setup": "7 MODSTO",
"comment": "The sum X^2+12*X+9 reduces modulo 7 to X^2-2*X+2"
},
{
"input": "5 4",
"setup": "7 MODSTO",
"comment": "Modulo 7: 5 plus 4 gives 2"
}
]
},
"ADDTOREAL": {
"name": "Add to real assumptions",
"description": "Declares a variable as real for the CAS by adding its name to the REALASSUME list, so simplifications may assume it has no imaginary part.",
"stack": "'name' →",
"category": "CAS",
"examples": [
{
"input": "'K'"
}
]
},
"ALGB": {
"name": "Algebra menu",
"description": "Opens the CAS menu of algebra commands (expand, factor, substitute, and so on).",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"ALOG": {
"name": "Common antilogarithm",
"description": "Raises 10 to the given power, the inverse of LOG.",
"stack": "x → 10^x; z → 10^z; 'symb' → 'ALOG(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "3."
},
{
"input": "0.5"
}
]
},
"AMORT": {
"name": "Amortize",
"description": "Amortizes the next n payments of a loan described by the stored TVM variables, returning the principal and interest paid over those payments and the remaining balance.",
"stack": "n → principal interest balance",
"examples": [
{
"setup": "12. 'PYR' STO 6. 'I%YR' STO 1E4 'PV' STO -200. 'PMT' STO",
"input": "12.",
"comment": "First 12 monthly payments of 200 on 10000 at 6% a year: principal, interest, balance"
}
]
},
"AND": {
"description": "Bitwise AND of two binary integers; for reals it is a logical AND treating any non-zero value as true and returning 1 or 0. Symbolic arguments give a symbolic expression.",
"stack": "#n1 #n2 → #n3; x y → 0|1; 'symb1' 'symb2' → 'symb1 AND symb2'",
"examples": [
{
"input": "#Ch #Ah",
"comment": "Binary 1100 AND 1010 gives 1000"
},
{
"input": "1. 0."
},
{
"input": "5. -2."
}
]
},
"ANIMATE": {
"description": "Shows a series of grobs one after another on the display as an animation, with optional frame delay, position and repeat count.",
"stack": "grob1 ... grobn n →; grob1 ... grobn { n { #x #y } delay rep } →",
"skip": "animates on the screen until a key is pressed"
},
"ANS": {
"name": "Answer",
"description": "Recalls an earlier result from the algebraic-mode history; the argument says how many entries back to go.",
"stack": "n → obj",
"category": "Keyboard",
"skip": "reads the algebraic-mode history, which RPN-mode examples do not build"
},
"APEEK": {
"name": "Address peek",
"description": "Reads the five-nibble address stored in memory at the given address and returns it as a binary integer; needs library 256 attached.",
"stack": "#addr → #n",
"category": "DEVEL",
"skip": "reads raw memory"
},
"APPLY": {
"description": "Builds a function-call expression from a function name and a list of arguments, without evaluating the function; mainly used by user-defined functions to return symbolic results.",
"stack": "{symb1 ... symbn} 'name' → 'name(symb1,...,symbn)'",
"examples": [
{
"input": "{ 'X' 2. } 'F'"
},
{
"input": "{ 'A' 'B' } 'G'"
}
]
},
"ARC": {
"description": "Draws an arc of a circle in the graphics picture from a centre, radius and start and end angles in the current angle mode.",
"stack": "(x,y) r θ1 θ2 →; {#x #y} #r θ1 θ2 →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"ARCHIVE": {
"description": "Makes a backup copy of the whole HOME directory, either as a backup object in a port (:n:name) or sent over Kermit (:IO:name).",
"stack": ":n:name →; :IO:name →",
"examples": [
{
"input": ":0:BK",
"run": "ARCHIVE 0. PVARS",
"setup": "1. 'A' STO",
"comment": "Backs up HOME to port 0 under the name BK; PVARS then lists it"
}
]
},
"ARG": {
"name": "Argument",
"description": "Gives the angle of a complex value in polar form, measured from the positive real axis in the current angle mode; a real gives 0 or a half turn depending on its sign.",
"stack": "z → θ; x → θ; 'symb' → 'ARG(symb)'",
"examples": [
{
"setup": "DEG",
"input": "(1.,1.)"
},
{
"setup": "RAD",
"input": "(0.,2.)"
},
{
"setup": "DEG",
"input": "-4."
}
]
},
"ARIT": {
"name": "Arithmetic menu",
"description": "Opens the CAS menu of arithmetic commands for integers, polynomials and modular arithmetic.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"ARM→": {
"description": "Low-level command for ARM-based models that converts ARM machine code; it has no use on the Saturn-only 49G. Part of the development library.",
"stack": "obj → obj",
"category": "PRG DEV",
"skip": "low-level ARM code tool"
},
"ARRY→": {
"name": "Array to stack",
"description": "Splits an array into its elements in row order, followed by a list of its dimensions. Superseded by OBJ→ but still accepted.",
"stack": "[array] → x1 ... xn {dims}",
"category": "PRG OBJ",
"examples": [
{
"input": "[ 1. 2. 3. ]"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]]",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"description": "Splits an array into its elements in row order, followed by a list of its dimensions. →ARRY builds the array again.",
"stack": "[array] → x1 ... xn {dims}"
}
}
},
"ASIN": {
"name": "Arc sine",
"description": "Arc sine, giving the angle in the current angle mode. Reals outside -1 to 1 produce a complex result.",
"stack": "x → asin x; z → asin z; 'symb' → 'ASIN(symb)'",
"examples": [
{
"input": "0.5",
"setup": "DEG"
},
{
"input": "2.",
"setup": "RAD"
}
]
},
"ASIN2C": {
"name": "Arc sine to arc cosine",
"description": "Rewrites an expression so that every arcsine in it becomes pi/2 minus the arccosine of the same argument.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'ASIN(X)+1'"
},
{
"input": "'2*ASIN(X/2)'"
}
]
},
"ASIN2T": {
"name": "Arc sine to arc tangent",
"description": "Replaces each arc sine in an expression by an equivalent arc tangent, using asin(x) = atan(x/√(1-x²)).",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'ASIN(X)'"
}
]
},
"ASINH": {
"name": "Inverse hyperbolic sine",
"description": "Computes the inverse hyperbolic sine (area sine) of a real or complex argument.",
"stack": "x → asinh x; z → asinh z; 'symb' → 'ASINH(symb)'",
"examples": [
{
"input": "1."
},
{
"input": "(1.,2.)"
}
]
},
"ASM": {
"name": "Assemble",
"description": "Assembles a string of MASD source (Saturn assembler or System RPL) into the object it describes. On a syntax error it leaves error information for ER. Part of the development library.",
"stack": "\"str\" → obj",
"category": "PRG DEV",
"skip": "assembler; development tool"
},
"ASM2": {
"description": "Internal entry of the MASD assembler library; not meant for direct use.",
"stack": "\"str\" → obj",
"category": "MASD",
"skip": "assembler; development tool"
},
"ASM→": {
"name": "Disassemble",
"description": "Disassembles a machine-code object into a string of Saturn assembler source. Part of the development library.",
"stack": "code → \"str\"",
"category": "PRG DEV",
"skip": "needs a machine-code object, which only the assembler can create; low-level development tool"
},
"ASN": {
"name": "Assign key",
"description": "Assigns an object to a key for USER mode; the key is given as row-column.plane (e.g. 11.1), and the SKEY object restores the key's built-in function.",
"stack": "obj x_key →",
"examples": [
{
"input": "« 1. » 11.1",
"run": "ASN RCLKEYS",
"comment": "Puts « 1 » on key 11 (row 1, column 1, unshifted); RCLKEYS shows it"
}
]
},
"ASR": {
"name": "Arithmetic shift right",
"description": "Arithmetic right shift: moves every bit of a binary integer down one position but keeps the top bit (as set by the word size) as it was, so a two's-complement sign survives.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#8h"
},
{
"input": "#FFFFFFFFFFFFFFF0h",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "The top bit stays set as the other bits move down"
},
{
"setup": "HEX",
"input": "#FFFFFFFFFFFFFFF0h",
"models": [
"28s"
]
}
]
},
"ASSUME": {
"description": "Records an assumption about a variable for the CAS, such as a sign condition; kept from the HP 40G CAS and of limited effect on the 49G.",
"stack": "'symb' → obj",
"category": "CAS",
"skip": "on the 49G it does not return for a condition such as 'X>0' when run headless"
},
"ATAN": {
"name": "Arc tangent",
"description": "Arc tangent, giving the angle in the current angle mode, for reals, complex numbers and algebraics.",
"stack": "x → atan x; z → atan z; 'symb' → 'ATAN(symb)'",
"examples": [
{
"input": "1.",
"setup": "DEG"
},
{
"input": "'X'"
}
]
},
"ATAN2S": {
"name": "Arc tangent to arc sine",
"description": "Replaces each arc tangent in an expression by an equivalent arc sine, using atan(x) = asin(x/√(x²+1)).",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'ATAN(X)'"
}
]
},
"ATANH": {
"name": "Inverse hyperbolic tangent",
"description": "Computes the inverse hyperbolic tangent; reals outside -1..1 produce a complex result, while exactly ±1 is an infinite-result error.",
"stack": "x → atanh x; z → atanh z; 'symb' → 'ATANH(symb)'",
"examples": [
{
"input": "0.5"
},
{
"input": "2."
}
]
},
"ATICK": {
"name": "Axes tick marks",
"description": "Sets the spacing of axis tick marks in PPAR: a real value counts user units while a binary integer counts pixels, and a two-element list sets x and y separately.",
"stack": "x →; #n →; { x y } →; { #n #m } →",
"examples": [
{
"input": "2.",
"run": "ATICK PPAR"
},
{
"input": "#5d",
"run": "ATICK PPAR"
},
{
"input": "{ 10. 3. }",
"run": "ATICK PPAR"
}
]
},
"ATTACH": {
"name": "Attach library",
"description": "Attaches a library, given by number or :port:number, to the current directory so its commands become available.",
"stack": "n →; :n_port:n →",
"skip": "needs a library object stored in a port"
},
"AUGMENT": {
"description": "Appends an element or a block to a list, vector or matrix, joining them into one larger object.",
"stack": "{list} obj → {list}; [array] obj → [array]",
"examples": [
{
"input": "{ 1. 2. } 3."
},
{
"input": "[ 1. 2. ] 3."
}
]
},
"AUTO": {
"name": "Autoscale",
"description": "Picks a vertical plot range automatically by sampling the current equation over the horizontal range, updating PPAR; useful before DRAW when the y values are unknown.",
"stack": "→",
"examples": [
{
"input": "'X^2'",
"run": "STEQ AUTO PPAR",
"setup": "RAD"
}
]
},
"AXES": {
"description": "Sets the point where the plot axes cross, stored in PPAR as a complex coordinate in user units.",
"stack": "(x,y) →",
"examples": [
{
"input": "(1.,2.)",
"run": "AXES PPAR"
}
]
},
"AXL": {
"name": "Array to list",
"description": "Converts between arrays and lists: an array becomes a list (of lists for a matrix), and a list becomes the corresponding array.",
"stack": "[array] → {list}; {list} → [array]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "{ 1. 2. 3. }"
}
]
},
"AXM": {
"name": "Array to symbolic matrix",
"description": "Converts a numeric array into a symbolic matrix, turning real entries into exact values where possible.",
"stack": "[array] → [[matrix]]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ .5 .25 ][ 1. 2. ]]"
}
]
},
"AXQ": {
"name": "Matrix to quadratic form",
"description": "Turns a square matrix and a vector of variables into the quadratic form they define, leaving the variable vector on level 1; the inverse of QXA.",
"stack": "[[matrix]] [vars] → 'q' [vars]",
"examples": [
{
"input": "[[ 1. .5 ][ .5 1. ]] [ 'X' 'Y' ]"
}
]
},
"A→": {
"name": "Address to object",
"description": "Returns the object found at a memory address given as a binary integer; needs library 256 attached.",
"stack": "#n → obj",
"category": "DEVEL",
"skip": "reads raw memory"
},
"A→H": {
"name": "Address to hex",
"description": "Converts an address given as a binary integer to its five-digit hexadecimal string in nibble order (least significant digit first); needs library 256 attached.",
"stack": "#n → \"hex\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "#12345h",
"comment": "The five digits come back in reverse order"
}
]
},
"BAR": {
"name": "Bar plot type",
"description": "Selects the bar plot type, which draws one bar per value of a ΣDAT column.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "BAR PPAR"
}
]
},
"BARPLOT": {
"name": "Draw bar plot",
"description": "Draws a bar chart of a column of ΣDAT into the graphics picture.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"BASIS": {
"description": "Extracts a basis of the vector subspace spanned by a list of vectors.",
"stack": "{vectors} → {basis}",
"examples": [
{
"input": "{ [ 1. 2. ] [ 2. 4. ] [ 0. 1. ] }"
}
]
},
"BAUD": {
"name": "Baud rate",
"description": "Sets the serial port speed (1200, 2400, 4800 or 9600 baud) in IOPAR.",
"stack": "n →",
"category": "I/O",
"examples": [
{
"input": "2400.",
"run": "BAUD IOPAR",
"comment": "The baud rate is the first element of IOPAR"
}
]
},
"BEEP": {
"description": "Sounds a tone of the given frequency in hertz for the given duration in seconds, unless beeping has been turned off with flag -56.",
"stack": "freq duration →",
"skip": "produces a sound and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Sounds a tone of the given frequency in hertz for the given duration in seconds, unless flag 51 is set to silence the beeper.",
"stack": "freq duration →"
}
}
},
"BESTFIT": {
"name": "Best-fitting model",
"description": "Tries all four regression models on the current ΣDAT columns and keeps the one whose correlation has the largest magnitude, storing the model and its coefficients in ΣPAR.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 3. ][ 2. 9. ][ 3. 27. ]] STOΣ",
"run": "BESTFIT ΣPAR",
"comment": "Data that triple at each step fit an exponential model best"
}
]
},
"BIN": {
"name": "Binary mode",
"description": "Selects base 2 for displaying binary integers.",
"stack": "→",
"examples": [
{
"input": "",
"run": "BIN #12d →STR",
"comment": "Decimal 12 is 1100 in binary"
},
{
"input": "",
"run": "BIN #FFh →STR",
"comment": "Hexadecimal FF is eight ones in binary"
}
]
},
"BINS": {
"name": "Sort into frequency bins",
"description": "Sorts the independent column of ΣDAT into a number of equal-width bins starting at a minimum value; returns the count per bin as a one-column matrix and the counts below and above the range as a vector.",
"stack": "xmin width n → [[counts]] [below above]",
"examples": [
{
"input": "0. 2. 2.",
"run": "BINS",
"setup": "[[ 1. ][ 2. ][ 2.5 ][ 4. ]] STOΣ",
"comment": "Two bins of width 2 from 0: counts per bin, then counts below and above"
}
]
},
"BLANK": {
"name": "Blank graphics object",
"description": "Creates an empty graphics object of the given width and height in pixels, ready to be drawn into or combined with GOR and GXOR.",
"stack": "#w #h → grob",
"examples": [
{
"input": "#10d #4d"
},
{
"input": "#131d #64d"
}
]
},
"BOX": {
"description": "Draws a rectangle in the graphics picture whose opposite corners are the two given points.",
"stack": "(x1,y1) (x2,y2) →; {#x1 #y1} {#x2 #y2} →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"BUFLEN": {
"name": "Buffer length",
"description": "Returns the number of characters waiting in the serial input buffer and 1, or 0 if a framing or overrun error occurred.",
"stack": "→ n 0/1",
"skip": "talks over the serial port"
},
"BYTES": {
"name": "Byte size",
"description": "Returns a binary checksum of an object and its size in bytes; given a name, it measures the variable's contents.",
"stack": "obj → #checksum x_size",
"examples": [
{
"input": "{ 1. 2. }"
},
{
"input": "\"ABC\""
},
{
"input": "'A'",
"setup": "1. 'A' STO"
}
]
},
"BetaTesting": {
"description": "Internal command of the development library; not meant for direct use.",
"stack": "→",
"category": "PRG DEV",
"skip": "undocumented internal command"
},
"B→R": {
"name": "Binary to real",
"description": "Converts a binary integer to the equivalent real number; very large binary integers lose precision since reals keep 12 digits.",
"stack": "#n → n",
"examples": [
{
"input": "#FFh",
"comment": "Hexadecimal FF is 255"
},
{
"input": "#101b",
"comment": "Binary 101 is 5"
}
]
},
"C2P": {
"name": "Cycles to permutation",
"description": "Converts a permutation written as a list of cycles into the list of images of 1..n.",
"stack": "{cycles} → {perm}",
"examples": [
{
"input": "{ { 1. 3. } { 2. 4. } }",
"comment": "The cycles (1 3) and (2 4) give the images 3, 4, 1, 2"
}
]
},
"CASCFG": {
"name": "Reset CAS configuration",
"description": "Puts the CAS settings back to their defaults (exact mode, X as current variable, default modulus and the related flags).",
"stack": "→",
"category": "CAS",
"skip": "resets the CAS configuration only; nothing to show on the stack"
},
"CASCMD": {
"name": "CAS command browser",
"description": "Opens a browser listing every CAS command, from which one can be picked and placed on the command line.",
"stack": "→",
"category": "CAS",
"skip": "opens an interactive browser"
},
"CASE": {
"description": "Opens a multi-way branch CASE test1 THEN clause1 END test2 THEN clause2 END … [default] END: the first test that yields a nonzero value has its clause run, the rest are skipped, and an optional default clause runs when none matches. Only valid inside programs.",
"stack": "→",
"examples": [
{
"input": "2.",
"run": "« CASE DUP 1. == THEN \"A\" END DUP 2. == THEN \"B\" END END » EVAL",
"comment": "The test for 1 fails, the test for 2 passes and pushes B"
}
]
},
"CD→": {
"name": "Code object to hex string",
"description": "Returns the body of a code object as a string of hexadecimal digits, the inverse of →CD; needs library 256 attached.",
"stack": "code → \"hex\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"0123\"",
"run": "→CD CD→"
}
]
},
"CEIL": {
"name": "Ceiling",
"description": "Rounds a real number up to the nearest integer not less than it.",
"stack": "x → n; x_unit → n_unit; 'symb' → 'CEIL(symb)'",
"examples": [
{
"input": "3.2"
},
{
"input": "-3.7",
"comment": "A negative number rounds up towards zero"
}
],
"per_model": {
"28s": {
"description": "Rounds a real number up to the nearest integer not less than it.",
"stack": "x → n; 'symb' → 'CEIL(symb)'"
}
}
},
"CENTR": {
"name": "Center plot",
"description": "Moves the plot window so that the given point lies at its center, keeping the current width and height. A real argument is taken as the x coordinate with y 0.",
"stack": "(x,y) →; x →",
"category": "PLOT",
"examples": [
{
"input": "(1.,2.)",
"run": "CENTR PPAR"
}
],
"per_model": {
"28s": {
"description": "Moves the plot window so that the given point lies at its centre, keeping the current width and height.",
"stack": "(x,y) →"
}
}
},
"CF": {
"name": "Clear flag",
"description": "Clears a flag; positive numbers address user flags 1 to 64, negative numbers the system flags.",
"stack": "n →",
"examples": [
{
"input": "",
"setup": "3. SF",
"run": "3. CF 3. FS?",
"comment": "Sets flag 3, clears it, then tests it: 0 means clear"
}
],
"per_model": {
"28s": {
"description": "Clears user flag n, from 1 to 64. Flags 31 to 64 control calculator settings such as the binary base and the beeper.",
"stack": "n →"
}
}
},
"CHINREM": {
"name": "Chinese remainder (polynomials)",
"description": "Applies the Chinese remainder theorem to two polynomial congruences, each given as a vector [expression modulus], and returns the combined congruence the same way.",
"stack": "[ 'p1' 'm1' ] [ 'p2' 'm2' ] → [ 'p' 'm' ]",
"examples": [
{
"input": "[ 'X^2+1' 'X+2' ] [ 'X-1' 'X+3' ]"
}
]
},
"CHOLESKY": {
"description": "Computes the Cholesky factor of a symmetric positive-definite matrix: the triangular matrix whose product with its transpose gives back the matrix.",
"stack": "[[A]] → [[R]]",
"examples": [
{
"input": "[[ 4. 2. ][ 2. 3. ]]"
}
]
},
"CHOOSE": {
"name": "Choose box",
"description": "Displays a choose box with a title and a list of items, waits for a selection, and returns the chosen item with 1, or just 0 when cancelled. The start position selects the highlighted item.",
"stack": "\"title\" {items} n → obj 1; \"title\" {items} n → 0",
"skip": "waits for the user to pick from an interactive choose box"
},
"CHR": {
"name": "Character",
"description": "Returns a one-character string for a character code from 0 to 255; the inverse of NUM.",
"stack": "n → \"c\"",
"examples": [
{
"input": "65."
},
{
"input": "97."
}
]
},
"CIRC": {
"name": "Compose permutations",
"description": "Composes two permutations given as lists of images, returning the permutation obtained by applying one after the other.",
"stack": "{perm1} {perm2} → {perm}",
"examples": [
{
"input": "{ 3. 1. 2. } { 2. 3. 1. }",
"comment": "The two permutations are inverses, so the result is the identity"
}
]
},
"CKSM": {
"name": "Checksum type",
"description": "Chooses the Kermit block check type (1, 2 or 3) and stores it in IOPAR.",
"stack": "n →",
"category": "I/O",
"examples": [
{
"input": "3.",
"run": "CKSM IOPAR"
}
]
},
"CLEAR": {
"description": "Empties the whole stack.",
"stack": "obj1 ... objn →",
"category": "PRG STK",
"examples": [
{
"input": "1. 2. 3."
}
]
},
"CLKADJ": {
"name": "Adjust system clock",
"description": "Moves the system clock forward (positive) or back (negative) by a number of ticks, 8192 ticks per second.",
"stack": "x →",
"examples": [
{
"input": "8192.",
"comment": "Moves the clock forward by one second (8192 ticks)"
},
{
"input": "-20480.",
"comment": "Moves the clock back by 2.5 seconds"
}
]
},
"CLLCD": {
"name": "Clear display",
"description": "Blanks the stack area of the screen, leaving the status line and menu labels; typically used before a program writes its own output with DISP.",
"stack": "→",
"skip": "clears the screen and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Blanks the whole display apart from the annunciators and sets the message flag, so the blank screen stays up after the program ends. Programs use it before writing their own output with DISP.",
"stack": "→"
}
}
},
"CLMF": {
"name": "Clear message flag",
"description": "Clears the message flag, which DRAW, DRWΣ, DRAX, PIXEL, DISP and CLLCD set, so the normal stack display comes back when the program ends.",
"stack": "→",
"skip": "changes only what the display shows after a program and returns nothing to the stack"
},
"CLOSEIO": {
"name": "Close I/O port",
"description": "Closes the serial and infrared ports and discards any buffered input, saving power.",
"stack": "→",
"skip": "talks over the serial or IR port"
},
"CLTEACH": {
"name": "Clear teaching examples",
"description": "Deletes the EXAMPLES directory, with everything in it, from HOME, undoing TEACH.",
"stack": "→",
"category": "MEMORY",
"examples": [
{
"input": "",
"setup": "'EXAMPLES' CRDIR",
"run": "CLTEACH VARS"
}
]
},
"CLUSR": {
"name": "Clear user variables",
"description": "Purges every variable and every empty subdirectory in the current directory.",
"stack": "→",
"examples": [
{
"input": "",
"setup": "1. 'A' STO 2. 'B' STO",
"run": "CLUSR VARS"
}
]
},
"CLVAR": {
"name": "Clear variables",
"description": "Purges every variable stored in the directory you are in; it stops with an error at a subdirectory that is not empty.",
"stack": "→",
"category": "PRG",
"examples": [
{
"input": "",
"setup": "1. 'A' STO 2. 'B' STO",
"run": "CLVAR VARS",
"models": [
"48sx",
"48gx"
]
},
{
"input": "",
"setup": "'D' CRDIR D 1. 'A' STO 2. 'B' STO",
"run": "CLVAR VARS",
"models": [
"49g"
]
}
]
},
"CLΣ": {
"name": "Clear statistics data",
"description": "Deletes the statistics data in ΣDAT so that the next Σ+ starts a fresh data set.",
"stack": "→",
"examples": [
{
"input": "",
"run": "CLΣ 7. Σ+ RCLΣ",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ",
"comment": "The old data is gone: only the new point 7 remains"
}
]
},
"CMPLX": {
"name": "Complex number menu",
"description": "Opens the CAS menu of commands for complex numbers.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"CNRM": {
"name": "Column norm",
"description": "Computes an array's one-norm, also called its column norm: the largest column total of absolute values; for a vector, every element's absolute value is added up.",
"stack": "[array] → x",
"examples": [
{
"input": "[[ 1. -2. ][ 3. 4. ]]"
},
{
"input": "[ 1. -5. 3. ]"
}
]
},
"COL+": {
"name": "Insert column",
"description": "Inserts a vector as a new column at position n of a matrix, shifting the following columns right; n may be one past the last column to append. On a vector it inserts a number as element n.",
"stack": "[[matrix]] [col] n → [[matrix']]; [vector] x n → [vector']",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]] [ 9. 9. ] 1.",
"comment": "Inserts [ 9 9 ] as the new column 1"
},
{
"input": "[ 1. 3. ] 2. 2.",
"comment": "Inserts the number 2 as element 2"
}
]
},
"COL-": {
"name": "Delete column",
"description": "Removes column n from a matrix and returns the narrowed matrix together with the removed column as a vector. On a vector it removes and returns element n.",
"stack": "[[matrix]] n → [[matrix']] [col]; [vector] n → [vector'] x",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]] 2."
},
{
"input": "[ 7. 8. 9. ] 3."
}
]
},
"COLCT": {
"name": "Collect like terms",
"description": "Simplifies an expression by collecting like terms and combining numeric parts, putting it in a tidy order.",
"stack": "'symb' → 'symb''; x → x",
"examples": [
{
"input": "'X+2*X+3-1'"
},
{
"input": "'A*B+B*A'"
}
]
},
"COLLECT": {
"description": "Gathers like terms of an algebraic expression and factors it over the integers, a lighter form of FACTOR that does not split factors with irrational roots.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'X^2+2*X+1'"
},
{
"input": "'X*Y+X*Z'"
}
]
},
"COLΣ": {
"name": "Statistics columns",
"description": "Chooses which columns of ΣDAT act as the independent and dependent variables for regression and plotting, storing them in ΣPAR.",
"stack": "n_x n_y →",
"category": "STAT",
"examples": [
{
"input": "2. 1.",
"run": "COLΣ ΣPAR",
"comment": "Column 2 is the independent variable, column 1 the dependent one"
}
]
},
"COL→": {
"name": "Columns to matrix",
"description": "Assembles a matrix from a count and that many column vectors on the stack, the first column deepest. With plain numbers it makes a row vector.",
"stack": "[col1] ... [coln] n → [[matrix]]; x1 ... xn n → [vector]",
"examples": [
{
"input": "[ 1. 2. ] [ 3. 4. ] 2."
},
{
"input": "5. 6. 7. 3."
}
]
},
"COMB": {
"name": "Combinations",
"description": "Gives the number of ways to choose m out of n items when order does not matter: n!/(m!(n-m)!).",
"stack": "n m → C(n,m); 'symb' m → 'COMB(symb,m)'",
"examples": [
{
"input": "5. 2."
},
{
"input": "52. 5.",
"comment": "The number of five-card hands from a 52-card deck"
}
],
"per_model": {
"28s": {
"description": "Gives the number of ways to choose m out of n items when order does not matter: n!/(m!(n-m)!).",
"stack": "n m → C(n,m)"
}
}
},
"COMP→": {
"name": "Composite to stack",
"description": "Splits a list, program or algebraic (any composite) into its elements followed by their count; needs library 256 attached.",
"stack": "{list} → obj1 ... objn n; prog → obj1 ... objn n",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "{ 1. \"A\" }"
},
{
"setup": "256. ATTACH",
"input": "« 1. + »"
}
]
},
"CON": {
"name": "Constant array",
"description": "Builds an array whose elements all equal a given value, either from a list of dimensions or by filling an existing array (or array variable) with that value.",
"stack": "{dims} x → [array]; [array] x → [array]'; 'name' x →",
"examples": [
{
"input": "{ 2. 3. } 7."
},
{
"input": "{ 3. } 1."
},
{
"input": "[[ 1. 2. ][ 3. 4. ]] 0."
}
]
},
"COND": {
"name": "Condition number",
"description": "For a square matrix, gives its condition number based on the column (1-) norm, which measures how sensitive solving with it is to errors.",
"stack": "[[matrix]] → x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 2. 0. ][ 0. 5. ]]"
}
]
},
"CONIC": {
"name": "Conic plot type",
"description": "Selects the conic plot type, which draws a second-degree equation in two variables such as a circle or ellipse.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "CONIC PPAR"
}
]
},
"CONJ": {
"name": "Conjugate",
"description": "Returns the complex conjugate by flipping the sign of the imaginary part, for a complex number or for every element of a complex array; real arguments come back unchanged.",
"stack": "z → z'; [array] → [array]'; x → x; 'symb' → 'CONJ(symb)'",
"examples": [
{
"input": "(3.,4.)"
},
{
"input": "[ (1.,2.) (3.,-1.) ]"
}
]
},
"CONLIB": {
"name": "Constants library",
"description": "Opens the Constants Library browser for viewing physical constants and copying them to the stack.",
"stack": "→",
"skip": "opens an interactive catalog that waits for keys"
},
"CONST": {
"name": "Constant value",
"description": "Returns the value of a named physical constant from the Constants Library, with SI or English units by flag 60 and as a plain number if flag 61 is set.",
"stack": "'name' → x_unit; 'name' → x",
"examples": [
{
"input": "'c'"
},
{
"input": "'NA'",
"comment": "NA is Avogadro's number"
},
{
"input": "'g'",
"setup": "61. SF",
"comment": "With flag 61 set the value has no units; g is standard gravity"
}
]
},
"CONSTANTS": {
"description": "Opens the CAS menu or selection list of symbolic constants such as e, i, π and infinity.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"CONT": {
"name": "Continue",
"description": "Resumes a program that was suspended by HALT or by a single-step debug session, carrying on from the point where it stopped.",
"stack": "→",
"category": "PRG CTRL",
"skip": "needs a program halted interactively; with nothing halted it does nothing"
},
"CONVERT": {
"description": "Converts a unit object into the units of a second unit object, which must have compatible dimensions; temperatures convert as absolute values unless written as differences.",
"stack": "x1_u1 x2_u2 → x3_u2",
"examples": [
{
"input": "1._ft 1._m",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "100._km/h 1._m/s",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "0._°C 1._°F",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "1. \"ft\" \"m\"",
"models": [
"28s"
]
},
{
"input": "100. \"km/h\" \"m/s\"",
"models": [
"28s"
]
},
{
"input": "0. \"°C\" \"°F\"",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Converts a real number from one unit to another, the units given as strings or names. It returns the converted number and the new unit string; both units must measure the same kind of quantity.",
"stack": "x \"old\" \"new\" → y \"new\""
}
}
},
"CORR": {
"name": "Correlation",
"description": "Gives the correlation coefficient for the two ΣDAT columns that XCOL and YCOL choose.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "CORR",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
],
"per_model": {
"28s": {
"description": "Returns the correlation coefficient between the two columns of ΣDAT chosen by COLΣ, columns 1 and 2 by default.",
"stack": "→ x"
}
}
},
"COS": {
"name": "Cosine",
"description": "Cosine of an angle in the current angle mode, for reals, complex numbers and algebraics.",
"stack": "x → cos x; z → cos z; 'symb' → 'COS(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "60.",
"setup": "DEG"
},
{
"input": "(1.,1.)",
"setup": "RAD"
}
]
},
"COSH": {
"name": "Hyperbolic cosine",
"description": "Computes the hyperbolic cosine of a real or complex argument; symbolic arguments give a symbolic result.",
"stack": "x → cosh x; z → cosh z; 'symb' → 'COSH(symb)'",
"examples": [
{
"input": "1."
},
{
"input": "0."
},
{
"input": "(1.,1.)"
}
]
},
"COV": {
"name": "Covariance",
"description": "Gives the sample covariance for the two ΣDAT columns that XCOL and YCOL choose.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "COV",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"CR": {
"name": "Carriage return",
"description": "Sends a carriage return and line feed to the printer, flushing its buffer.",
"stack": "→",
"skip": "prints to the infrared or serial printer"
},
"CRC": {
"name": "Cyclic redundancy check",
"description": "Computes the cyclic redundancy check of the data in a string and returns it as a binary integer. Part of the development library.",
"stack": "\"str\" → #n",
"category": "PRG DEV",
"examples": [
{
"input": "\"ABC\"",
"setup": "256. ATTACH",
"models": [
"49g"
]
},
{
"input": "\"\"",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"CRDIR": {
"name": "Create directory",
"description": "Makes a new, empty subdirectory in the current directory under the given name.",
"stack": "'name' →",
"examples": [
{
"input": "'DIR1'",
"run": "CRDIR VARS"
}
]
},
"CRLIB": {
"name": "Create library",
"description": "Builds a library object from the variables of the current directory, steered by control variables such as $ROMID, $TITLE, $CONFIG, $VISIBLE and $HIDDEN. Part of the development library.",
"stack": "→ library",
"category": "PRG DEV",
"skip": "needs a prepared directory with library control variables; development tool"
},
"CROSS": {
"name": "Cross product",
"description": "Computes the vector (cross) product of two three-element vectors, giving a vector perpendicular to both.",
"stack": "[array1] [array2] → [array3]",
"examples": [
{
"input": "[ 1. 0. 0. ] [ 0. 1. 0. ]"
},
{
"input": "[ 1. 2. 3. ] [ 4. 5. 6. ]"
}
]
},
"CSWP": {
"name": "Column swap",
"description": "Exchanges two columns of a matrix, or two elements of a vector, given their indices.",
"stack": "[[matrix]] i j → [[matrix']]; [vector] i j → [vector']",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]] 1. 3."
},
{
"input": "[ 1. 2. 3. ] 2. 3."
}
]
},
"CURL": {
"description": "Computes the curl of a three-component vector field in three variables.",
"stack": "[field] [vars] → [curl]",
"examples": [
{
"input": "[ 'Y' '-X' 'Z' ] [ 'X' 'Y' 'Z' ]"
},
{
"input": "[ 'X*Y' 'Y*Z' 'Z*X' ] [ 'X' 'Y' 'Z' ]"
}
]
},
"CYCLOTOMIC": {
"description": "Returns the n-th cyclotomic polynomial in the current variable, the monic polynomial whose roots are the primitive n-th roots of unity.",
"stack": "n → 'symb'",
"examples": [
{
"input": "6."
},
{
"input": "4."
}
]
},
"CYLIN": {
"name": "Cylindrical mode",
"description": "Switches the coordinate mode to cylindrical (polar in two dimensions), so vectors and complex numbers are shown with an angle (sets flag -16, clears -15).",
"stack": "→",
"examples": [
{
"input": "",
"run": "CYLIN -15. FS? -16. FS?"
}
]
},
"C→PX": {
"name": "Complex to pixel",
"description": "Converts a user-unit coordinate into the pixel position it falls on in the graphics picture, using the ranges in PPAR.",
"stack": "(x,y) → {#x #y}",
"examples": [
{
"input": "(0.,0.)",
"comment": "The origin falls on pixel 65, 32 of the default plot window"
},
{
"input": "(-6.5,3.2)",
"comment": "(-6.5,3.2), the plot window's upper-left point, is pixel 0, 0"
}
]
},
"C→R": {
"name": "Complex to real",
"description": "Splits a complex number into two reals, the real part and then the imaginary part; a complex array gives two real arrays.",
"stack": "(x,y) → x y; [carray] → [array1] [array2]",
"examples": [
{
"input": "(3.,4.)"
},
{
"input": "[ (1.,2.) (3.,4.) ]"
}
]
},
"DARCY": {
"name": "Darcy friction factor",
"description": "Computes the Darcy-Weisbach friction factor for pipe flow from the relative roughness and the Reynolds number; it equals four times the Fanning factor.",
"stack": "x_roughness y_Re → f",
"examples": [
{
"input": "0.0001 100000.",
"comment": "Relative roughness 0.0001, Reynolds number 100000"
},
{
"input": "0. 1000.",
"comment": "Zero roughness at Reynolds number 1000 gives 64 divided by 1000"
}
]
},
"DATE": {
"description": "Returns the current date of the system clock as a real number, in MM.DDYYYY form or DD.MMYYYY when flag -42 is set.",
"stack": "→ date",
"examples": [
{
"input": "",
"run": "DATE",
"setup": "1.012030 →DATE",
"comment": "1.012030 is 1 January 2030 in MM.DDYYYY form"
}
]
},
"DATE+": {
"name": "Add days to date",
"description": "Adds a number of days (negative to go back) to a date and returns the resulting date.",
"stack": "date x → date'",
"examples": [
{
"input": "7.151991 120.",
"comment": "120 days after 15 July 1991 is 12 November 1991"
},
{
"input": "3.012024 -1.",
"comment": "One day before 1 March 2024 is 29 February, a leap year"
}
]
},
"DBUG": {
"name": "Debug",
"description": "Starts a program in suspended state so it can be stepped through one command at a time with the single-step keys, for debugging.",
"stack": "prog →",
"skip": "halts the program and waits for the user to single-step it"
},
"DDAYS": {
"name": "Days between dates",
"description": "Counts the days from the first date to the second, negative when the second is earlier.",
"stack": "date1 date2 → x",
"examples": [
{
"input": "1.011991 7.151991",
"comment": "From 1 January to 15 July 1991, in MM.DDYYYY form"
},
{
"input": "12.252026 1.012026",
"comment": "The second date is earlier, so the count is negative"
}
]
},
"DEC": {
"name": "Decimal mode",
"description": "Selects base 10 for displaying binary integers.",
"stack": "→",
"examples": [
{
"input": "",
"run": "DEC #FFh →STR",
"comment": "Hexadecimal FF is 255 in decimal"
},
{
"input": "",
"run": "DEC #101b →STR",
"comment": "Binary 101 is 5 in decimal"
}
]
},
"DECR": {
"name": "Decrement",
"description": "Subtracts 1 from a variable holding a real number, stores it, and returns the new value.",
"stack": "'name' → x",
"examples": [
{
"input": "'N'",
"setup": "5. 'N' STO"
}
]
},
"DEDICACE": {
"name": "Dedication",
"description": "Hidden credit screen of the CAS that shows a dedication from its authors; it has no mathematical use.",
"stack": "→",
"category": "CAS",
"skip": "displays a message on the screen"
},
"DEF": {
"name": "Define",
"description": "Defines a variable or a user function from an equation written as 'name=expr' or 'name(args)=expr', like DEFINE; kept for HP 40G CAS compatibility.",
"stack": "'name=symb' →",
"category": "MEMORY",
"examples": [
{
"input": "'F(X)=X^2'",
"run": "DEF 3. F",
"comment": "Defines F(X)=X^2, then calls F with 3"
}
]
},
"DEFINE": {
"description": "Takes an equation name=expression and stores the right-hand expression in that variable; when the left side carries arguments, as in F(X)=..., it creates a user-defined function.",
"stack": "'name=expr' →; 'name(args)=expr' →",
"category": "Keyboard",
"examples": [
{
"input": "'A=5.'",
"run": "DEFINE A"
},
{
"input": "'F(X)=X^2+1'",
"run": "DEFINE 3. F",
"comment": "Defines the function F, then calls it with 3"
}
]
},
"DEG": {
"name": "Degrees mode",
"description": "Selects degrees as the angle unit for trigonometric functions and polar displays.",
"stack": "→",
"examples": [
{
"input": "",
"run": "DEG 90. SIN"
},
{
"input": "",
"run": "DEG 1. ASIN"
}
]
},
"DEGREE": {
"description": "Returns the degree of a polynomial in the CAS's current variable (VX, X by default) or, when that variable does not occur, in its first variable in alphabetical order.",
"stack": "'symb' → n",
"category": "ARITH",
"examples": [
{
"input": "'X^3+2*X+1'"
},
{
"input": "'X^2*Y^2+X'",
"comment": "Only the powers of X count, not those of Y"
}
]
},
"DELALARM": {
"name": "Delete alarm",
"description": "Deletes the alarm with the given index from the alarm list, or every alarm when the index is 0.",
"stack": "n →",
"examples": [
{
"input": "1.",
"run": "DELALARM",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP"
},
{
"input": "0.",
"run": "DELALARM 0. FINDALARM",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP",
"comment": "Index 0 deletes every alarm, so FINDALARM then finds none"
}
]
},
"DELAY": {
"description": "Sets the pause in seconds between lines sent to the printer, kept in the PRTPAR variable.",
"stack": "x →",
"category": "PRINT",
"examples": [
{
"input": "2.",
"run": "DELAY PRTPAR",
"comment": "The delay is the first element of PRTPAR"
}
]
},
"DELKEYS": {
"name": "Delete key assignments",
"description": "Clears the USER-mode assignment of one key, of a list of keys, or of all keys when given 0.",
"stack": "x_key →; {list} →; 0 →",
"examples": [
{
"input": "11.1",
"run": "DELKEYS RCLKEYS",
"setup": "« 1. » 11.1 ASN « 2. » 12.1 ASN",
"comment": "Removes the assignment on key 11 only; the one on key 12 stays"
},
{
"input": "0.",
"run": "DELKEYS RCLKEYS",
"setup": "« 1. » 11.1 ASN"
}
]
},
"DEPND": {
"name": "Dependent variable",
"description": "Stores the name of the dependent plot variable in PPAR, the variable the plot treats as vertical.",
"stack": "'name' →",
"category": "PLOT",
"examples": [
{
"input": "'Y'",
"run": "DEPND PPAR"
}
]
},
"DEPTH": {
"description": "Returns the number of objects currently on the stack.",
"stack": "→ n",
"examples": [
{
"input": "\"A\" \"B\" \"C\""
},
{
"input": ""
}
]
},
"DERIV": {
"name": "Derivative",
"description": "Differentiates an expression for a given variable; with a vector of variables it returns the vector of partial derivatives (the gradient).",
"stack": "'symb' 'name' → 'symb''; 'symb' [vars] → [array]",
"examples": [
{
"input": "'X^2*Y' 'X'"
},
{
"input": "'X^2*Y' [ 'X' 'Y' ]"
}
]
},
"DERVX": {
"name": "Derivative in the current variable",
"description": "Differentiates an expression in the current CAS variable (VX, normally X).",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)*X'"
},
{
"input": "'X^3+2*X'"
}
]
},
"DESOLVE": {
"name": "Solve differential equation",
"description": "Attempts to solve some first-order ODEs for an unknown function, returning the solutions with integration constants such as cC0.",
"stack": "'equation' 'func' → {solutions}",
"examples": [
{
"input": "'d1Y(X)+2*Y(X)=0' 'Y(X)'"
},
{
"input": "'d1Y(X)=X' 'Y(X)'"
}
]
},
"DET": {
"name": "Determinant",
"description": "Computes a square matrix's determinant by LU decomposition, so small rounding errors can appear in the result.",
"stack": "[[matrix]] → x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 2. 0. 0. ][ 0. 3. 0. ][ 0. 0. 4. ]]"
}
]
},
"DETACH": {
"name": "Detach library",
"description": "Detaches a library, given by number or :port:number, from the current directory.",
"stack": "n →; :n_port:n →",
"skip": "needs an attached library object"
},
"DGTIZ": {
"name": "Digitise",
"description": "Lets a program hand the plot to the user, usually after DRAW or DRWΣ: the cursor can be moved and coordinates put on the stack. Pressing ON lets the program go on.",
"stack": "→",
"skip": "waits for the user to pick points on the plot"
},
"DIAGMAP": {
"name": "Matrix function by diagonalization",
"description": "Applies a function of the current variable to a diagonalizable matrix by diagonalizing it, applying the function to the eigenvalues, and transforming back.",
"stack": "[[A]] 'symb' → [[B]]",
"examples": [
{
"input": "[[ 1. 0. ][ 0. 4. ]] 'X^2'",
"comment": "Squares the eigenvalues of the matrix, 1 and 4"
}
]
},
"DIAG→": {
"name": "Vector to diagonal matrix",
"description": "Creates a matrix of the given dimensions whose main diagonal holds the elements of a vector and whose other entries are zero.",
"stack": "[vector] {m n} → [[matrix]]",
"examples": [
{
"input": "[ 1. 2. ] { 2. 2. }"
},
{
"input": "[ 1. 2. ] { 2. 3. }"
}
]
},
"DIFF": {
"name": "Calculus menu",
"description": "Opens the CAS menu of calculus commands (derivatives, integrals, limits, series, differential equations).",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"DIFFEQ": {
"name": "Differential equation plot type",
"description": "Selects the differential-equation plot as the current plot type, which numerically integrates the equation in EQ and graphs the solution curve.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "DIFFEQ PPAR"
}
]
},
"DIR": {
"name": "Directory",
"description": "Begins the source form of a directory object, a sequence of names and their contents ended by END, as seen when a directory is transferred as text.",
"stack": "→ dir",
"category": "MEMORY",
"skip": "a delimiter of directory source, not a command that runs on its own"
},
"DISP": {
"name": "Display",
"description": "Shows an object on a chosen line of the display (1 at the top through 7), formatting non-strings first; programs use it for messages and status output.",
"stack": "obj n →",
"skip": "writes to the screen and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Shows an object on a chosen line of the display, 1 at the top through 4, with strings shown without quotes. It sets the message flag, so the output stays up after the program ends.",
"stack": "obj n →"
}
}
},
"DISPXY": {
"name": "Display at pixel position",
"description": "Shows an object on the screen at a given pixel position, using the font size selected by a number.",
"stack": "obj { #x #y } n →",
"category": "PRG OUT",
"skip": "draws on the screen and returns nothing to the stack"
},
"DISTRIB": {
"name": "Distribute",
"description": "Applies one step of distribution of multiplication over addition, letting an expression be expanded gradually.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'A*(B+C)'"
},
{
"input": "'(X+1)*(X+2)'"
}
]
},
"DIV": {
"name": "Divergence",
"description": "Computes the divergence of a vector field with respect to a vector of variables.",
"stack": "[field] [vars] → 'symb'",
"examples": [
{
"input": "[ 'X^2' 'X*Y' 'Z' ] [ 'X' 'Y' 'Z' ]"
}
]
},
"DIV2": {
"name": "Euclidean division",
"description": "Performs Euclidean division of two polynomials (or integers), returning the quotient and the remainder.",
"stack": "'p1' 'p2' → 'quot' 'rem'",
"examples": [
{
"input": "'X^3+2*X+1' 'X-1'"
},
{
"input": "'X^2+1' 'X+2'"
}
]
},
"DIV2MOD": {
"name": "Euclidean division modulo",
"description": "Performs Euclidean division of two polynomials or integers modulo the current CAS modulus, returning quotient and remainder.",
"stack": "obj1 obj2 → quot rem",
"examples": [
{
"input": "'X^3+4' 'X^2-1'",
"setup": "3 MODSTO",
"comment": "Quotient X, remainder X+4, which is X+1 modulo 3"
},
{
"input": "11 4",
"setup": "7 MODSTO",
"comment": "11 is 4 modulo 7, so 11 divided by 4 gives 1, remainder 0"
}
]
},
"DIVIS": {
"name": "Divisors",
"description": "Lists all divisors of an integer, or of a polynomial.",
"stack": "obj → {divisors}",
"examples": [
{
"input": "36."
},
{
"input": "'X^2-1'"
}
]
},
"DIVMOD": {
"name": "Divide modulo",
"description": "Divides the first expression or integer by the second in arithmetic modulo the current CAS modulus.",
"stack": "obj1 obj2 → obj",
"examples": [
{
"input": "5 3",
"setup": "7 MODSTO",
"comment": "Modulo 7, so 3 times -3 gives 5"
},
{
"input": "'X^2-1' 'X+1'",
"setup": "7 MODSTO"
}
]
},
"DIVPC": {
"name": "Division by increasing powers",
"description": "Divides one expression by another as power series in the current variable, giving the quotient as a Taylor polynomial around 0 up to the requested degree.",
"stack": "'symb1' 'symb2' n → 'symb'",
"examples": [
{
"input": "'1' '1-X' 4",
"comment": "1/(1-X) as a series up to X^4"
},
{
"input": "'X^3+4*X+12' '11*X^11+1' 4"
}
]
},
"DO": {
"description": "Opens a post-tested loop DO body UNTIL test END: the body always runs at least once and repeats until the test clause leaves a nonzero value. Only valid inside programs.",
"stack": "→",
"examples": [
{
"input": "1.",
"run": "« DO 3. * UNTIL DUP 50. > END » EVAL",
"comment": "Multiplies by 3 until the value is above 50: 3, 9, 27, 81"
}
]
},
"DOERR": {
"name": "Do error",
"description": "Raises an error on purpose: a string becomes a user error with that text as its message, a number or binary integer raises the built-in error with that code, and 0 aborts quietly like the ATTN key. Typically used in programs to reject bad arguments.",
"stack": "\"str\" →; n →; #n →",
"examples": [
{
"input": "\"Bad input\""
},
{
"input": "#305h"
}
]
},
"DOLIST": {
"name": "Do to list",
"description": "Applies a program to corresponding elements of n lists of equal length and returns the list of results; the count may be omitted when the program takes one argument.",
"stack": "{list1} ... {listn} n prog → {results}; {list} prog → {results}",
"examples": [
{
"input": "{ 1. 2. 3. } { 4. 5. 6. } 2. « * »",
"comment": "Two lists, the count 2, and a program that multiplies each pair"
},
{
"input": "{ 1. 2. 3. } « SQ »"
}
]
},
"DOMAIN": {
"description": "Determines where an expression of the current variable is defined, returning a list of interval bounds marked as defined or undefined.",
"stack": "'symb' → {list}",
"category": "CALC",
"examples": [
{
"input": "'LN(X)'"
},
{
"input": "'1/(X-1)'"
}
]
},
"DOSUBS": {
"name": "Do to sublists",
"description": "Slides a window of n consecutive elements along a list and applies a program to each window, collecting the results in a new list. Inside the program NSUB and ENDSUB give the window position and count.",
"stack": "{list} n prog → {results}",
"examples": [
{
"input": "{ 1. 2. 3. 4. } 2. « + »",
"comment": "Adds each pair of neighbouring elements"
},
{
"input": "{ 1. 4. 9. 16. } 2. « SWAP - »",
"comment": "SWAP - subtracts the earlier element from the later one in each pair"
}
]
},
"DOT": {
"name": "Dot product",
"description": "Computes the scalar (dot) product of two real or complex vectors that have the same length.",
"stack": "[array1] [array2] → x",
"examples": [
{
"input": "[ 1. 2. 3. ] [ 4. 5. 6. ]"
},
{
"input": "[ 1. 0. ] [ 0. 1. ]"
}
]
},
"DRAW": {
"description": "Plots the current equation EQ into the graphics picture using the plot type and parameters in PPAR, without drawing axes or erasing first.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Plots the current equation EQ on the display, drawing the axes first and using the plot parameters in PPAR. An equation with two sides plots as two curves.",
"stack": "→"
}
}
},
"DRAW3DMATRIX": {
"name": "Draw 3D matrix",
"description": "Draws a matrix as a 3D bar chart, one bar per element, with heights scaled between a given minimum and maximum value.",
"stack": "[[matrix]] x_min x_max →",
"category": "PLOT",
"skip": "draws into the graphics screen and returns nothing to the stack"
},
"DRAX": {
"name": "Draw axes",
"description": "Draws the axes defined in PPAR into the graphics picture.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Draws the plot axes on the display, crossing at the point set in PPAR, with a tick mark every 10 pixels.",
"stack": "→"
}
}
},
"DROITE": {
"name": "Straight line",
"description": "Returns the equation of the straight line through two points of the plane, given as complex numbers or coordinate pairs.",
"stack": "z1 z2 → 'symb'",
"category": "ALGEBRA",
"examples": [
{
"input": "(0.,1.) (1.,3.)"
}
]
},
"DROP": {
"description": "Discards the object on level 1.",
"stack": "obj →",
"category": "PRG STK",
"examples": [
{
"input": "1. 2."
}
]
},
"DROP2": {
"name": "Drop two",
"description": "Discards the top two stack objects.",
"stack": "obj1 obj2 →",
"examples": [
{
"input": "1. 2. 3."
}
]
},
"DROPN": {
"name": "Drop n objects",
"description": "Removes a given number of objects from the stack, not counting the count argument itself.",
"stack": "obj1 … objn n →",
"examples": [
{
"input": "1. 2. 3. 4. 2."
}
]
},
"DRWΣ": {
"name": "Draw statistics plot",
"description": "Draws the axes and then a scatter plot of the points in ΣDAT, taking the two columns chosen in ΣPAR.",
"stack": "→",
"skip": "draws on the display and returns nothing to the stack"
},
"DTAG": {
"name": "Delete tag",
"description": "Removes every tag from a tagged object and leaves the bare object; untagged objects are returned unchanged.",
"stack": ":tag:obj → obj",
"examples": [
{
"input": ":Width:5."
},
{
"input": "7."
}
]
},
"DUP": {
"name": "Duplicate",
"description": "Duplicates the top stack object.",
"stack": "obj → obj obj",
"examples": [
{
"input": "5."
},
{
"input": "\"A\""
}
]
},
"DUP2": {
"name": "Duplicate two",
"description": "Duplicates the top two stack objects, keeping their order.",
"stack": "obj1 obj2 → obj1 obj2 obj1 obj2",
"examples": [
{
"input": "1. 2."
}
]
},
"DUPDUP": {
"name": "Duplicate twice",
"description": "Pushes two extra copies of the level 1 object.",
"stack": "x → x x x",
"examples": [
{
"input": "5."
}
]
},
"DUPN": {
"name": "Duplicate n objects",
"description": "Duplicates the given number of top stack objects as a block, keeping their order.",
"stack": "obj1 … objn n → obj1 … objn obj1 … objn",
"examples": [
{
"input": "1. 2. 3. 2.",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "The count 2 copies the top two objects, the 2 and the 3"
},
{
"input": "1. 2. 2.",
"models": [
"28s"
]
}
]
},
"D→R": {
"name": "Degrees to radians",
"description": "Converts an angle in degrees to radians, independent of the current angle mode.",
"stack": "x → x·π/180; 'symb' → 'D→R(symb)'",
"examples": [
{
"input": "180."
},
{
"input": "45."
}
]
},
"EDIT": {
"description": "Opens an object in the command-line editor and returns the edited version when the edit is confirmed.",
"stack": "obj → obj'",
"category": "PRG",
"skip": "opens an interactive editor and waits for the user"
},
"EDITB": {
"name": "Edit in best editor",
"description": "Opens an object in the editor best suited to its type, such as the matrix writer for arrays or the equation writer for algebraics, and returns the edited version.",
"stack": "obj → obj'",
"category": "PRG",
"skip": "opens an interactive editor and waits for the user"
},
"EGCD": {
"name": "Extended greatest common divisor",
"description": "Extended Euclid for polynomials: given a and b, returns their greatest common divisor c together with polynomials u and v satisfying a*u+b*v=c.",
"stack": "'a' 'b' → 'c' 'u' 'v'",
"examples": [
{
"input": "'X^2+1' 'X-1'",
"comment": "Returns c, u, v with (X^2+1)*u+(X-1)*v=c"
},
{
"input": "'X^2-1' 'X^3+1'"
}
]
},
"EGV": {
"name": "Eigenvalues and eigenvectors",
"description": "For a square matrix, returns its eigenvalues together with a matrix whose columns are the matching right eigenvectors.",
"stack": "[[A]] → [[eigenvectors]] [eigenvalues]",
"examples": [
{
"input": "[[ 2. 0. ][ 0. 3. ]]"
},
{
"input": "[[ 2. 1. ][ 1. 2. ]]"
}
]
},
"EGVL": {
"name": "Eigenvalues",
"description": "For a square matrix, returns a vector holding its eigenvalues.",
"stack": "[[A]] → [eigenvalues]",
"examples": [
{
"input": "[[ 2. 1. ][ 1. 2. ]]"
},
{
"input": "[[ 0. -1. ][ 1. 0. ]]",
"comment": "A quarter-turn rotation matrix has the eigenvalues i and -i"
}
]
},
"ELSE": {
"description": "Inside IF and IFERR structures, starts the clause that runs when the test is false or no error occurred.",
"stack": "→",
"skip": "fragment of IF ... THEN ... ELSE ... END; see IF for a complete example"
},
"END": {
"description": "Closes an IF, IFERR, CASE, WHILE or DO structure (and each THEN clause inside CASE).",
"stack": "→",
"skip": "closes a program structure and cannot run alone; see IF, CASE, DO, WHILE",
"per_model": {
"28s": {
"description": "Closes an IF, IFERR, WHILE or DO structure.",
"stack": "→"
}
}
},
"ENDSUB": {
"name": "Ending sublist",
"description": "Inside a DOSUBS program, returns the total number of windows that DOSUBS processes.",
"stack": "→ n",
"examples": [
{
"input": "{ 10. 20. 30. }",
"run": "1. « ENDSUB » DOSUBS",
"comment": "Windows of one element give 3 windows, so ENDSUB is 3 every time"
}
]
},
"ENG": {
"name": "Engineering mode",
"description": "Sets engineering display: like scientific, but with exponents in steps of three; n gives the significant digits after the first.",
"stack": "n →",
"examples": [
{
"input": "2.",
"run": "ENG 12345. →STR"
},
{
"input": "3.",
"run": "ENG 0.0012345 →STR",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "3.",
"run": "ENG .0012345 →STR",
"models": [
"28s"
]
}
]
},
"EPSX0": {
"name": "Epsilon to zero",
"description": "Cleans an expression by replacing every number whose magnitude is below the value of the variable EPS with zero.",
"stack": "'symb' → 'symb'",
"category": "ALGEBRA",
"examples": [
{
"input": "'X+1.E-15*Y'",
"comment": "1E-15 is below EPS, so its term becomes 0"
}
]
},
"EQNLIB": {
"name": "Equation library",
"description": "Opens the Equation Library browser, where built-in sets of engineering and physics equations can be picked and solved.",
"stack": "→",
"skip": "opens an interactive catalog that waits for keys"
},
"EQW": {
"name": "Equation Writer",
"description": "Edits an expression graphically in the Equation Writer and returns the edited result.",
"stack": "'symb' → 'symb''",
"category": "PRG",
"skip": "opens the interactive equation writer and waits for the user"
},
"EQ→": {
"name": "Equation to stack",
"description": "Breaks an equation apart, leaving the left-hand side and the right-hand side as two separate objects; an expression without an equals sign comes back unchanged together with 0.",
"stack": "'a=b' → 'a' 'b'; 'symb' → 'symb' 0",
"examples": [
{
"input": "'X^2=4'"
},
{
"input": "'A+B'"
}
]
},
"ER": {
"name": "Assembly errors",
"description": "After a failed ASM, shows the list of assembly errors and lets the user jump to each one in the source editor. Part of the development library.",
"stack": "→",
"category": "PRG DEV",
"skip": "opens an interactive error browser for the assembler"
},
"ERASE": {
"description": "Clears the graphics picture PICT to all blank pixels, keeping its size.",
"stack": "→",
"category": "PLOT",
"skip": "clears the graphics picture and returns nothing to the stack"
},
"ERR0": {
"name": "Clear last error",
"description": "Clears the record of the last error, so that ERRN afterwards gives #0 and ERRM an empty string.",
"stack": "→",
"examples": [
{
"input": "",
"run": "« IFERR 1. 0. / THEN END ERR0 ERRN » EVAL",
"comment": "Traps 1/0, clears the error record, then ERRN gives #0"
}
]
},
"ERRM": {
"name": "Error message",
"description": "Returns the message text of the most recent error as a string, or an empty string when there is none. Handy for reporting a trapped error from an IFERR structure.",
"stack": "→ \"str\"",
"examples": [
{
"input": "1. 0.",
"run": "« IFERR / THEN ERRM END » EVAL"
}
],
"per_model": {
"28s": {
"description": "Returns the message of the most recent error as a string. Handy for reporting a trapped error from an IFERR structure.",
"stack": "→ \"str\""
}
}
},
"ERRN": {
"name": "Error number",
"description": "Returns the code of the most recent error as a binary integer, or #0 when no error has occurred or the record was cleared. Mostly used in the THEN clause of an IFERR structure.",
"stack": "→ #n",
"examples": [
{
"input": "1. 0.",
"run": "« IFERR / THEN ERRN END » EVAL",
"comment": "305h, 773 in decimal, is the code of Infinite Result"
}
],
"per_model": {
"28s": {
"description": "Returns the number of the most recent error as a binary integer. Mostly used in the THEN clause of an IFERR structure.",
"stack": "→ #n"
}
}
},
"EULER": {
"name": "Euler's totient",
"description": "Evaluates Euler's totient function: how many positive integers up to n are coprime to n.",
"stack": "n → phi(n)",
"examples": [
{
"input": "36."
},
{
"input": "13.",
"comment": "13 is prime, so 12 numbers up to it are coprime to it"
}
]
},
"EVAL": {
"name": "Evaluate",
"description": "Evaluates an object: a program runs, a name is replaced by what its variable holds, an algebraic is computed with the current variable values, and a list has its elements executed in turn. Data objects such as reals return themselves.",
"stack": "obj → result",
"category": "Keyboard",
"examples": [
{
"input": "« 2. 3. * »"
},
{
"input": "'X^2+1'",
"setup": "3. 'X' STO"
},
{
"input": "{ 4. 5. + }"
}
],
"per_model": {
"28s": {
"description": "Evaluates an object: a program runs, a name is replaced by what its variable holds, and an algebraic is computed with the current variable values. Data objects such as reals and lists return themselves.",
"stack": "obj → result"
}
}
},
"EXGET": {
"name": "Get subexpression",
"description": "Returns the subexpression at position n of an algebraic: the object there together with its arguments. Positions count the objects from the left as written.",
"stack": "'symb1' n → 'symb2'",
"examples": [
{
"input": "'(A+B)*C' 2.",
"comment": "The 2nd object is +, so its subexpression is A+B"
}
]
},
"EXLR": {
"name": "Extract left and right sides",
"description": "Splits an equation into two objects: its left-hand side and its right-hand side.",
"stack": "'symb1=symb2' → 'symb1' 'symb2'",
"category": "ALGEBRA",
"examples": [
{
"input": "'SIN(X)=5*X+Y'"
}
]
},
"EXP": {
"name": "Natural exponential",
"description": "Natural exponential e^x, for reals, complex numbers and algebraics.",
"stack": "x → e^x; z → e^z; 'symb' → 'EXP(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "1."
},
{
"input": "(0.,1.)",
"comment": "e^i has real part cos 1 and imaginary part sin 1, in radians"
}
]
},
"EXP&LN": {
"name": "Exponential and logarithm menu",
"description": "Opens the CAS menu of commands that rewrite exponentials and logarithms.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"EXP2HYP": {
"name": "Exponential to hyperbolic",
"description": "Rewrites exponentials in an expression in terms of hyperbolic sine and cosine.",
"stack": "'symb' → 'symb'",
"category": "TRIG",
"examples": [
{
"input": "'EXP(X)'"
},
{
"input": "'EXP(2*X)-EXP(-(2*X))'"
}
]
},
"EXP2POW": {
"name": "Exponential to power",
"description": "Rewrites exponentials of the form EXP(N*LN(X)) as the power X^N.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'EXP(N*LN(X))'"
}
]
},
"EXPAN": {
"name": "Expand products",
"description": "Expands an expression one step by multiplying out products and powers over sums; repeat it to expand further.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'(X+1)*(X+2)'"
},
{
"input": "'A*(B+C)'"
}
]
},
"EXPAND": {
"description": "Multiplies out products and integer powers in an algebraic expression and collects like terms.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'(X+1)^2'"
},
{
"input": "'(X-Y)*(X+Y)'"
}
]
},
"EXPANDMOD": {
"name": "Expand modulo",
"description": "Expands a polynomial or integer expression and reduces its coefficients modulo the current CAS modulus.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'(X+3)*(X+4)'",
"setup": "7 MODSTO",
"comment": "Modulo 7 the X term vanishes and 12 becomes -2"
}
]
},
"EXPFIT": {
"name": "Exponential curve fit",
"description": "Selects the exponential model y = b·e^(m·x) for later regressions, stored in ΣPAR.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 2. 4. ]] STOΣ",
"run": "EXPFIT ΣPAR"
}
]
},
"EXPLN": {
"name": "To exponentials and logarithms",
"description": "Rewrites trigonometric and hyperbolic functions in an expression using only EXP and LN.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'COS(X)'"
},
{
"input": "'SINH(X)'"
}
]
},
"EXPM": {
"name": "Exponential minus 1",
"description": "Computes e^x - 1 without the loss of precision that subtracting 1 from EXP of a tiny x would cause.",
"stack": "x → e^x-1; 'symb' → 'EXPM(symb)'",
"examples": [
{
"input": "1.E-10",
"comment": "The final 5 is the x²/2 term, a digit EXP(x)-1 would round away"
},
{
"input": "1."
}
]
},
"EXSUB": {
"name": "Substitute subexpression",
"description": "Replaces the subexpression at position n of an algebraic, the object there with its arguments, by another algebraic or name.",
"stack": "'symb1' n 'symb2' → 'symb3'",
"examples": [
{
"input": "'(A+B)*C' 2. 'E^F'",
"comment": "Replaces the + subexpression, A+B, with E^F"
}
]
},
"EYEPT": {
"name": "Eye point",
"description": "Sets the eye position (x, y, z) of the viewer for perspective 3D plots, storing it in VPAR; the eye must sit in front of the view volume along y.",
"stack": "x y z →",
"examples": [
{
"input": "0. -3. 0.",
"run": "EYEPT VPAR"
}
]
},
"F0λ": {
"name": "Black body emissive power",
"description": "Returns the fraction of the total power radiated by a black body at temperature T that lies at wavelengths from zero up to λ. Takes the wavelength in metres and the temperature in kelvins, or unit objects.",
"stack": "λ T → x",
"examples": [
{
"input": "5.E-7 5800.",
"comment": "Wavelength 500 nm (5E-7 m), temperature 5800 K"
},
{
"input": "0.00001 300.",
"comment": "Wavelength 10 micrometres (0.00001 m), temperature 300 K"
}
]
},
"FACT": {
"name": "Factorial",
"description": "Factorial of a non-negative integer, or the gamma function Γ(x+1) for other reals; an older spelling of the ! command kept for compatibility.",
"stack": "n → n!; x → Γ(x+1)",
"category": "MTH PROB",
"examples": [
{
"input": "5."
},
{
"input": "0.5"
}
],
"per_model": {
"28s": {
"description": "Factorial of a non-negative integer, or the gamma function Γ(x+1) for other reals. Symbolic arguments give a symbolic result.",
"stack": "n → n!; x → Γ(x+1); 'symb' → 'FACT(symb)'"
}
}
},
"FACTOR": {
"description": "Splits a polynomial or rational expression into irreducible factors; given an integer, it returns its prime factorization.",
"stack": "'symb' → 'symb''; n → 'symb'",
"examples": [
{
"input": "'X^2-1'"
},
{
"input": "'X^3-6*X^2+11*X-6'"
}
]
},
"FACTORMOD": {
"name": "Factor modulo",
"description": "Factors a polynomial over the integers modulo the current CAS modulus, which has to be a small prime.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'X^2+1'",
"setup": "5 MODSTO"
}
]
},
"FACTORS": {
"description": "Breaks an integer or polynomial into its irreducible factors and returns a list alternating each factor with its multiplicity.",
"stack": "obj → {factor mult ...}",
"examples": [
{
"input": "360",
"comment": "Each factor is followed by its multiplicity: 5, 3 squared, 2 cubed"
},
{
"input": "'X^3-X'"
}
]
},
"FANNING": {
"name": "Fanning friction factor",
"description": "Computes the Fanning friction factor for flow in a pipe from the relative roughness and the Reynolds number, using the laminar formula at low Reynolds numbers and a turbulent correlation otherwise.",
"stack": "x_roughness y_Re → f",
"examples": [
{
"input": "0.0001 100000.",
"comment": "Relative roughness 0.0001, Reynolds number 100000"
},
{
"input": "0. 1000.",
"comment": "Zero roughness at Reynolds number 1000 gives 16 divided by 1000"
}
]
},
"FAST3D": {
"name": "Fast 3D plot type",
"description": "Selects the fast 3D plot type, which draws a quickly rotatable wireframe of a function of two variables; the choice is kept in PPAR.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "FAST3D PPAR"
}
]
},
"FC?": {
"name": "Flag clear?",
"description": "Tests whether a flag is clear, returning 1 if it is clear and 0 if it is set. The flag is left unchanged.",
"stack": "n → 0/1",
"examples": [
{
"input": "3."
},
{
"input": "3.",
"setup": "3. SF"
}
]
},
"FC?C": {
"name": "Flag clear? Then clear",
"description": "Reports whether a flag is clear (1) or set (0) and then clears it.",
"stack": "n → 0/1",
"examples": [
{
"input": "5.",
"setup": "5. SF",
"run": "FC?C 5. FS?",
"comment": "Flag 5 is set, so 0 comes back, and then flag 5 is cleared"
},
{
"input": "5."
}
]
},
"FCOEF": {
"name": "Fraction from roots and poles",
"description": "Builds the rational function whose roots and poles are given in a vector of value/multiplicity pairs, poles having negative multiplicity.",
"stack": "[ r1 m1 r2 m2 ... ] → 'symb'",
"examples": [
{
"input": "[ 1. 2. 3. -1. ]",
"comment": "Root 1 twice (multiplicity 2) and a pole at 3 (multiplicity -1)"
},
{
"input": "[ 0. 1. 2. 1. ]",
"comment": "Root 0 once and root 2 once"
}
]
},
"FDISTRIB": {
"name": "Full distribute",
"description": "Fully distributes multiplication over addition throughout an expression, in one go.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'(X+1)*(X+2)'"
},
{
"input": "'A*(B+C)*(D+E)'"
}
]
},
"FFT": {
"name": "Fast Fourier transform",
"description": "Applies the discrete Fourier transform to an array whose dimensions are powers of two, giving a complex array of the same size.",
"stack": "[array] → [array]",
"examples": [
{
"input": "[ 1. 2. 3. 4. ]"
},
{
"input": "[ 1. 0. 0. 0. ]",
"comment": "A single 1 followed by zeros gives a flat spectrum"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
}
]
},
"FILER": {
"name": "File manager",
"description": "Starts the file manager for browsing, copying, moving and deleting variables across directories and ports.",
"stack": "→",
"category": "MEMORY",
"skip": "opens the interactive file manager and waits for the user"
},
"FINDALARM": {
"name": "Find alarm",
"description": "Searches the alarm list and returns the index of the earliest alarm falling due after a given date or { date time } list, or of the first past-due alarm when given 0; returns 0 when none matches.",
"stack": "date → n; { date time } → n; 0 → n",
"examples": [
{
"input": "1.012029",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP",
"comment": "The alarm, on 1 January 2030, falls due after 1 January 2029"
},
{
"input": "{ 1.012030 13. }",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP",
"comment": "The alarm is at 12:00, before 13:00, so none is found"
},
{
"input": "0.",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP",
"comment": "0 looks for a past-due alarm, and none is due"
}
]
},
"FINISH": {
"name": "Finish server mode",
"description": "Tells a remote Kermit server to end server mode.",
"stack": "→",
"skip": "talks over the serial or IR port"
},
"FIX": {
"name": "Fixed mode",
"description": "Sets fixed-point display with the given number of decimal places (0 to 11).",
"stack": "n →",
"examples": [
{
"input": "2.",
"run": "FIX 1.23456 →STR"
},
{
"input": "0.",
"run": "FIX 12.7 →STR",
"comment": "Zero decimal places rounds 12.7 up and keeps the point"
}
]
},
"FLASHEVAL": {
"name": "Evaluate flash function",
"description": "Evaluates a routine in flash ROM given its flash-pointer number as a binary integer; a low-level tool for programmers.",
"stack": "#n → ...",
"category": "PRG",
"skip": "jumps into raw ROM code by address; a wrong value can crash the calculator"
},
"FLOOR": {
"description": "Rounds a real number down to the nearest integer not greater than it, so negative fractions move away from zero.",
"stack": "x → n; x_unit → n_unit; 'symb' → 'FLOOR(symb)'",
"examples": [
{
"input": "3.7"
},
{
"input": "-3.2"
}
],
"per_model": {
"28s": {
"description": "Rounds a real number down to the nearest integer not greater than it, so negative fractions move away from zero.",
"stack": "x → n; 'symb' → 'FLOOR(symb)'"
}
}
},
"FONT6": {
"description": "Puts the built-in 6-pixel-high system font on the stack as a font object, for example to make it the current font with →FONT.",
"stack": "→ font",
"category": "DISPLAY",
"examples": [
{
"input": "",
"run": "FONT6"
}
]
},
"FONT7": {
"description": "Returns the built-in 7-pixel-high system font as a font object.",
"stack": "→ font",
"category": "Display",
"examples": [
{
"input": ""
}
]
},
"FONT8": {
"description": "Returns the built-in 8-pixel-high system font as a font object.",
"stack": "→ font",
"category": "Display",
"examples": [
{
"input": ""
}
]
},
"FONT→": {
"name": "Current system font",
"description": "Returns the font object currently used as the system font.",
"stack": "→ font",
"category": "Display",
"examples": [
{
"input": ""
}
]
},
"FOR": {
"description": "Starts a counted loop with a named local counter that runs from a start value to an end value, closed by NEXT (step 1) or STEP (step taken from the stack).",
"stack": "start end →",
"examples": [
{
"input": "0. 1. 5.",
"run": "« FOR k k + NEXT » EVAL",
"comment": "Adds k from 1 to 5 to the 0 already on the stack"
},
{
"input": "1. 10.",
"run": "« FOR k k 3. STEP » EVAL",
"comment": "Counts from 1 to 10 in steps of 3"
}
]
},
"FORM": {
"name": "Form algebraic expression",
"description": "Opens an interactive editor for rearranging an algebraic or equation by identities, so its value does not change. Leaving with the EXGET menu key also returns a chosen subexpression and its position.",
"stack": "'symb1' → 'symb2'; 'symb1' → 'symb2' 'symb3' n",
"skip": "opens an interactive editor and waits for keys"
},
"FOURIER": {
"name": "Fourier coefficient",
"description": "Computes the coefficient of index n of the complex Fourier series of an expression in the current variable; the period is read from the variable PERIOD and complex mode must be on.",
"stack": "'symb' n → 'symb'",
"examples": [
{
"input": "'X' 1",
"setup": "-103 SF '2*π' 'PERIOD' STO",
"models": [
"49g"
]
}
]
},
"FP": {
"name": "Fractional part",
"description": "Returns what follows the decimal point of a real: the number minus its integer part, so the result keeps the argument's sign.",
"stack": "x → y; x_unit → y_unit; 'symb' → 'FP(symb)'",
"examples": [
{
"input": "3.75"
},
{
"input": "-3.75"
}
],
"per_model": {
"28s": {
"description": "Returns what follows the decimal point of a real: the number minus its integer part, so the result keeps the argument's sign.",
"stack": "x → y; 'symb' → 'FP(symb)'"
}
}
},
"FREE": {
"name": "Free RAM card",
"description": "Turns merged card RAM back into an independent port, moving the listed backup or library objects into it.",
"stack": "{list} n →",
"category": "MEMORY",
"skip": "needs a merged RAM card"
},
"FREE1": {
"name": "Free port 1 RAM",
"description": "Detaches previously merged port 1 RAM from user memory so it becomes an independent port again, moving any named backup or library objects into it.",
"stack": "{ :0:name n_lib ... } →; :0:name →; n_lib →",
"skip": "needs merged RAM in port 1 and changes the memory configuration"
},
"FREEZE": {
"description": "Keeps selected display areas (status area, stack area, menu labels, coded as a bit sum 1, 2, 4) from being redrawn when a program ends, so its screen output stays visible.",
"stack": "n →",
"skip": "only affects what the screen shows after a program ends"
},
"FROOTS": {
"name": "Fraction roots and poles",
"description": "Finds the roots and poles of a rational function and returns them in a vector of value/multiplicity pairs, poles with negative multiplicity.",
"stack": "'symb' → [ r1 m1 r2 m2 ... ]",
"examples": [
{
"input": "'(X-1)^2/(X-3)'"
},
{
"input": "'X^2-1'"
}
]
},
"FS?": {
"name": "Flag set?",
"description": "Tests whether a flag is set, returning 1 if it is and 0 if it is clear. The flag itself is left unchanged.",
"stack": "n → 0/1",
"examples": [
{
"input": "3.",
"setup": "3. SF"
},
{
"input": "4."
}
]
},
"FS?C": {
"name": "Flag set? Then clear",
"description": "Reports whether a flag is set (1) or clear (0) and then clears it, which suits one-shot signalling between program parts.",
"stack": "n → 0/1",
"examples": [
{
"input": "5.",
"setup": "5. SF",
"run": "FS?C 5. FS?",
"comment": "Returns 1 because flag 5 is set, then clears it, so FS? gives 0"
}
]
},
"FUNCTAB": {
"name": "Function table",
"description": "Opens the table view of a function plot, listing x values with the corresponding function values.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"FUNCTION": {
"name": "Function plot type",
"description": "Selects the function plot type, which draws EQ as y versus the independent variable.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "FUNCTION PPAR"
}
]
},
"FXND": {
"name": "Fraction to numerator and denominator",
"description": "Splits a fraction, or an expression that simplifies to one, into its numerator and denominator.",
"stack": "'symb' → 'num' 'den'",
"category": "ALGEBRA",
"examples": [
{
"input": "'(X-3)^2/(Z+4)'"
},
{
"input": "'3/4'"
}
]
},
"GAMMA": {
"description": "Evaluates the gamma function, which extends the factorial to real and complex arguments (Γ(n) equals (n-1)! for positive integers).",
"stack": "x → y; 'symb' → 'symb'",
"examples": [
{
"input": "5."
},
{
"input": ".5"
}
]
},
"GAUSS": {
"description": "Diagonalises a quadratic form by Gauss's method, returning the diagonal coefficients, the change-of-basis matrix, the form rewritten as a sum of squares, and the variables.",
"stack": "'q' [vars] → [diag] [[P]] 'q' [vars]",
"examples": [
{
"input": "'X^2+2*A*X*Y' [ 'X' 'Y' ]"
},
{
"input": "'X^2+X*Y+Y^2' [ 'X' 'Y' ]"
}
]
},
"GBASIS": {
"name": "Groebner basis",
"description": "Computes a Groebner basis of the ideal generated by a vector of polynomials, using the listed variables in the given order.",
"stack": "[polys] [vars] → [polys]",
"category": "ARITH",
"examples": [
{
"input": "[ 'X^2+Y' 'X*Y-1' ] [ 'X' 'Y' ]"
}
]
},
"GCD": {
"name": "Greatest common divisor",
"description": "Computes the greatest common divisor for two integers or for two polynomials.",
"stack": "obj1 obj2 → gcd",
"examples": [
{
"input": "2805. 99."
},
{
"input": "'X^2-1' 'X^2+2*X+1'"
}
]
},
"GCDMOD": {
"name": "Greatest common divisor modulo",
"description": "Computes the polynomial greatest common divisor for two polynomials whose coefficients are reduced modulo the current CAS modulus.",
"stack": "'symb1' 'symb2' → 'symb'",
"examples": [
{
"input": "'X^2-1' 'X^2+2*X+1'",
"setup": "7 MODSTO"
}
]
},
"GET": {
"description": "Fetches the element at a given position of an array or list (a {row col} list for matrices); a variable name may stand for the object.",
"stack": "[array] n → x; {list} n → obj; 'name' n → obj",
"examples": [
{
"input": "{ 10. 20. 30. } 2."
},
{
"input": "[[ 1. 2. ][ 3. 4. ]] { 2. 1. }",
"comment": "Row 2, column 1 of the matrix"
}
]
},
"GETI": {
"name": "Get and increment index",
"description": "Like GET, but keeps the array or list and the advanced position on the stack under the fetched element, ready for stepping through all elements; the index wraps at the end and flag -64 is set.",
"stack": "[array] n → [array] n+1 x; {list} n → {list} n+1 obj",
"examples": [
{
"input": "{ 10. 20. 30. } 1.",
"comment": "The list, the next position 2, and the element at position 1"
},
{
"input": "{ 10. 20. 30. } 3.",
"comment": "After position 3 the index wraps round to 1"
},
{
"input": "{ 10. 20. 30. } 3.",
"run": "GETI 46 FS?",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Like GET, but leaves the array or list, then the position after the one fetched, on the stack below the element, ready for stepping through all elements. After the last element the position wraps to 1 and flag 46 is set.",
"stack": "[array] n → [array] n+1 x; {list} n → {list} n+1 obj; 'name' n → 'name' n+1 obj"
}
}
},
"GOR": {
"name": "Graphics OR",
"description": "Overlays one graphics object onto another at a given position by OR-ing their pixels; when the target is PICT the graphics picture is changed in place.",
"stack": "grob1 (x,y) grob2 → grob1'; grob1 {#x #y} grob2 → grob1'; PICT pos grob2 →",
"examples": [
{
"input": "#20d #10d BLANK { #2d #2d } \"A\" 1. →GROB"
},
{
"input": "#8d #8d BLANK { #0d #0d } #4d #4d BLANK",
"run": "GOR SIZE",
"comment": "ORs a 4 by 4 graphic into an 8 by 8 one at pixel 0, 0; the size is unchanged"
}
]
},
"GRAD": {
"name": "Grads mode",
"description": "Selects grads (400 to a full circle) as the angle unit for trigonometric functions and polar displays.",
"stack": "→",
"examples": [
{
"input": "",
"run": "GRAD 100. SIN",
"comment": "100 grads is a quarter circle, so its sine is 1"
},
{
"input": "",
"run": "GRAD 1. ASIN"
}
]
},
"GRAMSCHMIDT": {
"description": "Turns a set of vectors into an orthonormal basis of the same space, using a scalar product given as a program of two arguments.",
"stack": "[[vectors]] prog → [[basis]]",
"examples": [
{
"input": "[[ 1. 1. ][ 1. 0. ]] « DOT »"
}
]
},
"GRAPH": {
"description": "Shows the graphics picture PICT and enters the interactive graphics environment with cursor movement and the graphics menu.",
"stack": "→",
"skip": "opens the interactive graphics screen and waits for keys"
},
"GREDUCE": {
"name": "Groebner reduce",
"description": "Reduces a polynomial modulo a Groebner basis, returning the remainder of the division by the basis polynomials.",
"stack": "'symb' [polys] [vars] → 'symb'",
"category": "ARITH",
"examples": [
{
"input": "'X^2*Y' [ 'X^2+Y' ] [ 'X' 'Y' ]"
}
]
},
"GRIDMAP": {
"name": "Grid map plot type",
"description": "Selects the grid-mapping plot as the current plot type, which shows how a complex-valued function of a complex variable deforms a rectangular grid.",
"stack": "→",
"examples": [
{
"input": "",
"run": "GRIDMAP PPAR"
}
]
},
"GROB": {
"name": "Graphics object",
"description": "Introduces a graphics object in source text, followed by its width, height and pixel data in hexadecimal.",
"stack": "→ grob",
"category": "PRG GROB",
"examples": [
{
"input": "",
"run": "GROB 8 2 FF00",
"comment": "8 pixels wide and 2 high: FF is the first row, 00 the second"
}
]
},
"GROBADD": {
"name": "Add graphics objects",
"description": "Joins two graphics objects into one, placing the second below the first.",
"stack": "grob1 grob2 → grob",
"examples": [
{
"input": "\"A\" 1. →GROB \"BC\" 1. →GROB"
}
]
},
"GXOR": {
"name": "Graphics exclusive OR",
"description": "Combines one graphics object into another at a given position by XOR-ing their pixels, so repeating it restores the original; PICT can be the target.",
"stack": "grob1 (x,y) grob2 → grob1'; grob1 {#x #y} grob2 → grob1'; PICT pos grob2 →",
"examples": [
{
"input": "#20d #10d BLANK { #2d #2d } \"A\" 1. →GROB"
}
]
},
"HADAMARD": {
"name": "Hadamard product",
"description": "Multiplies two matrices of the same dimensions element by element (the Hadamard product).",
"stack": "[[matrix1]] [[matrix2]] → [[matrix]]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]] [[ 5. 6. ][ 7. 8. ]]"
}
]
},
"HALFTAN": {
"name": "Half-angle tangent",
"description": "Rewrites sines, cosines and tangents in an expression in terms of the tangent of the half angle.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)'"
},
{
"input": "'COS(X)'"
}
]
},
"HALT": {
"description": "Suspends the running program and returns to the keyboard with the program still pending; CONT resumes it and SST steps through it.",
"stack": "→",
"skip": "suspends the program and waits for the user to continue"
},
"HEAD": {
"description": "Returns the leading item of a list, or the leading character of a string.",
"stack": "{list} → obj; \"str\" → \"char\"",
"examples": [
{
"input": "{ 1. 2. 3. }"
},
{
"input": "\"ABC\""
}
]
},
"HEADER→": {
"name": "Header size",
"description": "Returns how many lines the status header currently occupies above the stack.",
"stack": "→ n",
"category": "Display",
"examples": [
{
"input": ""
}
]
},
"HELP": {
"description": "Opens the built-in CAS help browser, listing the CAS commands with a short explanation and example for each.",
"stack": "→",
"category": "CAS",
"skip": "opens an interactive help browser"
},
"HERMITE": {
"name": "Hermite polynomial",
"description": "Builds the Hermite polynomial of degree n in the current CAS variable, as an exact symbolic expression.",
"stack": "n → 'symb'",
"examples": [
{
"input": "4"
},
{
"input": "2"
}
]
},
"HESS": {
"name": "Hessian",
"description": "Computes the Hessian matrix of an expression for a vector of variables, also returning the gradient and the variables.",
"stack": "'symb' [vars] → [[hessian]] [gradient] [vars]",
"examples": [
{
"input": "'X^2*Y+Y^3' [ 'X' 'Y' ]"
},
{
"input": "'X*Y*Z' [ 'X' 'Y' 'Z' ]"
}
]
},
"HEX": {
"name": "Hexadecimal mode",
"description": "Selects base 16 for displaying binary integers.",
"stack": "→",
"examples": [
{
"input": "",
"run": "HEX #255d →STR",
"comment": "255 decimal is FF in hexadecimal"
},
{
"input": "",
"run": "HEX #11111111b →STR",
"comment": "Binary 11111111 is FF in hexadecimal"
}
]
},
"HILBERT": {
"name": "Hilbert matrix",
"description": "Builds the n×n Hilbert matrix, whose entry in row i, column j is 1/(i+j-1).",
"stack": "n → [[matrix]]",
"examples": [
{
"input": "3."
},
{
"input": "2."
}
]
},
"HISTOGRAM": {
"name": "Histogram plot type",
"description": "Selects the histogram plot type, which counts the values of one ΣDAT column into bins and draws the frequencies as bars.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "HISTOGRAM PPAR"
}
]
},
"HISTPLOT": {
"name": "Draw histogram plot",
"description": "Draws a frequency histogram of a column of ΣDAT into the graphics picture.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"HMS+": {
"name": "Hours-minutes-seconds plus",
"description": "Adds two values given in HH.MMSS form and returns the sum in the same form.",
"stack": "hms1 hms2 → hms",
"examples": [
{
"input": "1.3 2.45",
"comment": "1h30m plus 2h45m gives 4h15m"
},
{
"input": "0.5959 0.0001",
"models": [
"48gx",
"49g",
"28s"
],
"comment": "0h59m59s plus 1 second carries over to exactly 1 hour"
}
],
"per_model": {
"48sx": {
"note": "The 48SX's ROM gets some sums that carry into the next hour wrong: 0.5959 0.0001 HMS+ gives .6 instead of 1 (the 48GX gives 1). HMS→, + and →HMS give the right result."
}
}
},
"HMS-": {
"name": "Hours-minutes-seconds minus",
"description": "Subtracts the HH.MMSS value in level 1 from the one in level 2 and returns the difference in HH.MMSS form.",
"stack": "hms1 hms2 → hms",
"examples": [
{
"input": "4.15 1.3",
"comment": "4h15m minus 1h30m gives 2h45m"
},
{
"input": "1. 0.0001",
"comment": "1 hour minus 1 second gives 0h59m59s"
}
]
},
"HMS→": {
"name": "Hours-minutes-seconds to decimal",
"description": "Converts a value in HH.MMSS form to decimal hours (or degrees).",
"stack": "hms → x",
"examples": [
{
"input": "1.3",
"comment": "1h30m is 1.5 hours"
},
{
"input": "2.4509",
"comment": "2h45m09s is 2.7525 hours"
}
]
},
"HOME": {
"description": "Makes HOME, the top of the directory tree, the current directory, wherever you are in a subdirectory.",
"stack": "→",
"examples": [
{
"input": "",
"setup": "'D' CRDIR D",
"run": "HOME PATH"
}
]
},
"HORNER": {
"name": "Horner's scheme",
"description": "Applies Horner's scheme to divide a polynomial by (X-a), returning the quotient, the point a, and the value of the polynomial at a.",
"stack": "'p' a → 'quot' a value",
"examples": [
{
"input": "'X^2+X+1' 3.",
"comment": "Divides by (X-3): the quotient, the point 3, and the value at 3"
},
{
"input": "'X^3-2*X+5' -1.",
"comment": "Divides by (X+1): the quotient, the point -1, and the value at -1"
}
]
},
"HYPERBOLIC": {
"description": "Opens the CAS menu or selection list of hyperbolic functions and their inverses.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"H→": {
"name": "Hex to object",
"description": "Rebuilds an object from a string of hexadecimal digits giving its nibbles, the inverse of →H; needs library 256 attached.",
"stack": "\"hex\" → obj",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "1.",
"run": "→H H→"
}
]
},
"H→A": {
"name": "Hex to address",
"description": "Converts a five-digit hexadecimal string in nibble order to the address it encodes, as a binary integer; the inverse of A→H. Needs library 256 attached.",
"stack": "\"hex\" → #n",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"54321\""
}
]
},
"H→S": {
"name": "Hex to string",
"description": "Converts a string of hexadecimal digits in nibble order back into the characters they encode, the inverse of S→H; needs library 256 attached.",
"stack": "\"hex\" → \"str\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"1424\"",
"comment": "Each character is two digits in reverse order: 41 is A, 42 is B"
}
]
},
"IABCUV": {
"name": "Integer Bézout equation",
"description": "Finds integers u and v solving a*u+b*v=c for given integers a, b and c; c must be a multiple of the gcd of a and b.",
"stack": "n1 n2 n3 → u v",
"examples": [
{
"input": "6. 11. 3.",
"comment": "Finds u and v with 6*u + 11*v = 3"
},
{
"input": "4. 6. 10.",
"comment": "Finds u and v with 4*u + 6*v = 10"
}
]
},
"IBASIS": {
"name": "Intersection basis",
"description": "Returns a basis of the intersection of the two subspaces spanned by two lists of vectors.",
"stack": "{vectors1} {vectors2} → {basis}",
"examples": [
{
"input": "{ [ 1 0 0 ] [ 0 1 0 ] } { [ 1 1 0 ] [ 0 0 1 ] }"
}
]
},
"IBERNOULLI": {
"name": "Bernoulli number",
"description": "Returns the n-th Bernoulli number.",
"stack": "n → x",
"examples": [
{
"input": "2."
},
{
"input": "4."
}
]
},
"IBP": {
"name": "Integration by parts",
"description": "Performs one step of integration by parts: given an integrand written as u*v' and the antiderivative v, it returns u*v and the remaining integrand -u'*v.",
"stack": "'u*v'' 'v' → 'u*v' '-u'*v'",
"examples": [
{
"input": "'X*COS(X)' 'SIN(X)'"
},
{
"input": "'X*EXP(X)' 'EXP(X)'"
}
]
},
"ICHINREM": {
"name": "Integer Chinese remainder",
"description": "Solves two simultaneous integer congruences, each given as a vector [value modulus], with the Chinese remainder theorem.",
"stack": "[ a1 m1 ] [ a2 m2 ] → [ a m ]",
"examples": [
{
"input": "[ 2. 3. ] [ 1. 5. ]",
"comment": "x is 2 modulo 3 and 1 modulo 5, giving -4 modulo 15"
},
{
"input": "[ 1. 4. ] [ 3. 7. ]"
}
]
},
"IDIV2": {
"name": "Integer division",
"description": "Divides one integer by another and returns the integer quotient and the remainder.",
"stack": "n1 n2 → quot rem",
"examples": [
{
"input": "17. 5."
},
{
"input": "100. 7."
}
]
},
"IDN": {
"name": "Identity matrix",
"description": "Builds an n×n identity matrix, or replaces a square matrix (or one stored under a name) with the identity matrix of the same size.",
"stack": "n → [[matrix]]; [[matrix]] → [[identity]]; 'name' →",
"examples": [
{
"input": "3."
},
{
"input": "[[ 5. 6. ][ 7. 8. ]]"
}
]
},
"IEGCD": {
"name": "Integer extended greatest common divisor",
"description": "Extended Euclid for integers: given a and b, returns their greatest common divisor c and Bezout coefficients u and v with a*u+b*v=c.",
"stack": "n1 n2 → c u v",
"examples": [
{
"input": "6. 11.",
"comment": "6*2 + 11*-1 = 1, so the gcd is 1"
},
{
"input": "240. 46."
}
]
},
"IF": {
"description": "Opens a conditional structure, IF test THEN commands [ELSE other commands] END: the test runs, and the nonzero or zero value it leaves decides which commands execute. Only valid inside programs.",
"stack": "→",
"examples": [
{
"input": "5.",
"run": "« IF DUP 3. > THEN \"big\" ELSE \"small\" END » EVAL"
},
{
"input": "1.",
"run": "« IF DUP 3. > THEN \"big\" ELSE \"small\" END » EVAL"
}
]
},
"IFERR": {
"name": "If error",
"description": "Opens an error trap, IFERR commands THEN on-error [ELSE on-success] END: if any command after IFERR fails, the program goes on with the THEN part instead of stopping. ERRN and ERRM tell which error occurred.",
"stack": "→",
"examples": [
{
"input": "1. 0.",
"run": "« IFERR / THEN \"failed\" END » EVAL",
"comment": "1/0 fails, so the THEN part runs and pushes the text; the 1 and 0 stay"
},
{
"input": "6. 2.",
"run": "« IFERR / THEN \"failed\" END » EVAL"
}
]
},
"IFFT": {
"name": "Inverse fast Fourier transform",
"description": "Undoes FFT: applies the inverse discrete Fourier transform to an array whose dimensions are powers of two.",
"stack": "[array] → [array]",
"examples": [
{
"input": "[ (10.,0.) (-2.,2.) (-2.,0.) (-2.,-2.) ]"
},
{
"input": "[ 4. 0. 0. 0. ]"
}
]
},
"IFT": {
"name": "If-then",
"description": "Evaluates an object only when a test value is nonzero; when the test is zero both arguments are dropped. The one-branch counterpart of IFTE.",
"stack": "test obj → result",
"examples": [
{
"input": "1. \"yes\""
},
{
"input": "0. \"yes\""
},
{
"input": "2. 3. 1. « + »",
"comment": "The test 1 is not zero, so the program runs: 2 plus 3"
}
]
},
"IFTE": {
"name": "If-then-else",
"description": "Chooses between two objects by a test value: a nonzero test gives the first alternative, zero gives the second, and the chosen object is evaluated. With a symbolic test it returns an IFTE expression, which makes it usable as a conditional function inside algebraics.",
"stack": "test obj_true obj_false → result",
"examples": [
{
"input": "1. \"yes\" \"no\""
},
{
"input": "0. \"yes\" \"no\""
},
{
"input": "'X>0' 'X' '-X'"
}
]
},
"ILAP": {
"name": "Inverse Laplace transform",
"description": "Computes the inverse Laplace transform of an expression in the current CAS variable.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'1/(X-1)'"
},
{
"input": "'1/(X^2+1)'"
}
]
},
"IM": {
"name": "Imaginary part",
"description": "Extracts the imaginary component of a complex value, or of every element of a complex array; a real argument gives 0.",
"stack": "z → y; [array] → [real array]; x → 0; 'symb' → 'IM(symb)'",
"examples": [
{
"input": "(3.,4.)"
},
{
"input": "[ (1.,2.) (3.,4.) ]"
}
]
},
"IMAGE": {
"description": "Returns a basis of the image (column space) of a linear map given by its matrix.",
"stack": "[[A]] → [[basis]]",
"examples": [
{
"input": "[[ 1 2 ][ 2 4 ]]"
}
]
},
"INCR": {
"name": "Increment",
"description": "Adds 1 to a variable holding a real number, stores it, and returns the new value.",
"stack": "'name' → x",
"examples": [
{
"input": "'N'",
"setup": "5. 'N' STO"
}
]
},
"INDEP": {
"name": "Independent variable",
"description": "Sets the independent variable for plotting by writing a name into the reserved PPAR variable; a list form can also give its plotting range.",
"stack": "'name' →; {'name' x1 x2} →",
"examples": [
{
"input": "'T'",
"run": "INDEP PPAR"
},
{
"input": "{ T 0. 5. }",
"run": "INDEP PPAR",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "A list also sets the range of the variable: T from 0 to 5"
}
],
"per_model": {
"28s": {
"description": "Sets the independent variable for plotting by storing a name as the third item of PPAR.",
"stack": "'name' →"
}
}
},
"INFORM": {
"name": "Input form",
"description": "Shows a full-screen input form with labelled fields, then returns the entered values and a flag telling whether the user confirmed or cancelled. Takes a title, field specifications, a layout, reset values and initial values.",
"stack": "\"title\" {fields} format {resets} {initial} → {values} 1; \"title\" {fields} format {resets} {initial} → 0",
"skip": "waits for the user to fill in an interactive input form"
},
"INPUT": {
"description": "Halts a program to show a prompt string and open the command line with given initial text, then returns what the user typed as a string once ENTER is pressed.",
"stack": "\"prompt\" \"text\" → \"result\"; \"prompt\" {spec} → \"result\"",
"skip": "waits for the user to edit and confirm the command line"
},
"INT": {
"name": "Integrate",
"description": "Integrates an expression symbolically with respect to a variable and evaluates the antiderivative at a given point or expression; a CAS command.",
"stack": "'symb' 'var' 'symb2' → 'symb3'",
"category": "CALC",
"examples": [
{
"input": "'X^2' 'X' 'Y'",
"comment": "Integrates X^2 in X, evaluated at Y"
}
]
},
"INTEGER": {
"description": "Opens the CAS menu or selection list of integer arithmetic commands (divisors, primes, GCD and related).",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"INTVX": {
"name": "Integrate in the current variable",
"description": "Finds an antiderivative of an expression in the current CAS variable (VX, normally X).",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'X^2'"
},
{
"input": "'X*EXP(X)'"
}
]
},
"INV": {
"name": "Inverse",
"description": "Computes the reciprocal 1/x of a real, complex or unit object; for a square matrix it returns the matrix inverse.",
"stack": "x → 1/x; z → 1/z; [[matrix]] → [[matrix]]^-1",
"category": "Keyboard",
"examples": [
{
"input": "4."
},
{
"input": "(3.,4.)"
},
{
"input": "[[ 2. 0. ][ 0. 4. ]]"
}
],
"per_model": {
"28s": {
"description": "Computes 1/x for a real or a complex number; for a square matrix it returns the matrix inverse.",
"stack": "x → 1/x; z → 1/z; [[matrix]] → [[matrix]]^-1; 'symb' → 'INV(symb)'"
}
}
},
"INVMOD": {
"name": "Inverse modulo",
"description": "Gives the multiplicative inverse of an integer modulo the current CAS modulus.",
"stack": "n → n'",
"examples": [
{
"input": "2",
"setup": "7 MODSTO",
"comment": "Modulo 7, so 2 times -3 gives 1"
},
{
"input": "3",
"setup": "11 MODSTO",
"comment": "Modulo 11, so 3 times 4 gives 1"
}
]
},
"IP": {
"name": "Integer part",
"description": "Truncates a real number to its whole-number part by dropping the fractional digits, keeping the sign; units are kept.",
"stack": "x → n; x_unit → n_unit; 'symb' → 'IP(symb)'",
"examples": [
{
"input": "3.75"
},
{
"input": "-3.75"
}
],
"per_model": {
"28s": {
"description": "Truncates a real number to its whole-number part by dropping the fractional digits, keeping the sign.",
"stack": "x → n; 'symb' → 'IP(symb)'"
}
}
},
"IQUOT": {
"name": "Integer quotient",
"description": "Returns the integer quotient when one integer is divided by another in the Euclidean sense, discarding the remainder.",
"stack": "n1 n2 → quot",
"examples": [
{
"input": "17. 5."
},
{
"input": "100. 7."
}
]
},
"IREMAINDER": {
"name": "Integer remainder",
"description": "Returns the remainder left when one integer is divided by another.",
"stack": "n1 n2 → rem",
"examples": [
{
"input": "17. 5."
},
{
"input": "100. 7."
}
]
},
"ISOL": {
"name": "Isolate variable",
"description": "Rearranges an equation or expression to make the given variable stand alone, returning an equation for it; with general solutions it may introduce s1 and n1 placeholders.",
"stack": "'symb' 'name' → 'symb''",
"examples": [
{
"input": "'2*X+3=7' 'X'"
},
{
"input": "'A*X^2=B' 'X'"
}
],
"per_model": {
"28s": {
"description": "Rearranges an equation or expression so that the variable's first appearance stands alone, and returns what that variable equals, not an equation; general solutions may bring in the s1 and n1 placeholders.",
"stack": "'symb' 'name' → 'symb''"
}
}
},
"ISOM": {
"name": "Isometry",
"description": "Analyses the matrix of a linear isometry in 2 or 3 dimensions and returns its characteristic elements, such as the rotation angle, with a sign telling a rotation from a reflection.",
"stack": "[[A]] → 'angle' n",
"examples": [
{
"input": "[[ 0. -1. ][ 1. 0. ]]"
}
]
},
"ISPRIME?": {
"name": "Is prime?",
"description": "Tests whether an integer is prime, returning 1 for a prime and 0 otherwise.",
"stack": "n → 0/1",
"examples": [
{
"input": "97."
},
{
"input": "91.",
"comment": "91 is 7 times 13, so it is not prime"
}
]
},
"I→R": {
"name": "Integer to real",
"description": "Turns an exact integer into the equivalent real number; applied to a symbolic expression, it converts the integers inside it.",
"stack": "n → x; 'symb' → 'symb'",
"examples": [
{
"input": "5"
},
{
"input": "'X^2+3'"
}
]
},
"JORDAN": {
"name": "Jordan reduction",
"description": "Analyses a square matrix: returns its minimal polynomial, characteristic polynomial, the eigenspaces (or Jordan chains) tagged by eigenvalue, and the eigenvalues with multiplicity.",
"stack": "[[matrix]] → 'minpoly' 'charpoly' {spaces} [eigenvalues]",
"examples": [
{
"input": "[[ 2. 1. ][ 0. 2. ]]"
},
{
"input": "[[ 1. 2. ][ 2. 1. ]]"
}
]
},
"KER": {
"name": "Kernel",
"description": "Returns a basis of the kernel (null space) of a linear map given by its matrix.",
"stack": "[[A]] → [[basis]]",
"examples": [
{
"input": "[[ 1 2 ][ 2 4 ]]"
}
]
},
"KERRM": {
"name": "Kermit error message",
"description": "Returns the text of the last Kermit error packet received, or an empty string.",
"stack": "→ \"str\"",
"skip": "reports the state of the serial or IR link"
},
"KEY": {
"description": "Checks the keyboard buffer without waiting: if a key has been pressed it returns the key's row-column code and 1, otherwise just 0. Used in polling loops that react to keys.",
"stack": "→ 0; → key 1",
"examples": [
{
"input": ""
}
],
"per_model": {
"28s": {
"description": "Checks the key buffer without waiting: if a key is waiting it removes it and returns a string naming the key and 1, otherwise only 0. Used in polling loops that react to keys.",
"stack": "→ 0; → \"key\" 1"
}
}
},
"KEYEVAL": {
"name": "Evaluate key",
"description": "Performs the action of the key given by its row-column-plane key code, as if that key had been pressed.",
"stack": "x →",
"category": "PRG",
"skip": "simulates a keypress, whose effect depends on the interactive keyboard state"
},
"KEYTIME→": {
"name": "Key debounce time",
"description": "Returns the current keyboard debounce time in clock ticks.",
"stack": "→ n",
"category": "Keyboard",
"examples": [
{
"input": ""
}
]
},
"KGET": {
"name": "Kermit get",
"description": "Asks a Kermit server for one or more files and stores each in a variable.",
"stack": "'name' →; \"str\" →; {list} →",
"skip": "talks over the serial or IR port"
},
"KILL": {
"description": "Ends the running program at once, together with any suspended (halted) programs, and returns control to the keyboard. Objects already on the stack stay there.",
"stack": "→",
"skip": "aborts the running program, and with it the server command that runs the example"
},
"LABEL": {
"name": "Label axes",
"description": "Writes numeric labels at the ends of the axes in the graphics picture.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"LAGRANGE": {
"name": "Lagrange interpolation",
"description": "Finds the lowest-degree polynomial passing through a set of points given as a two-row matrix, the x values in the first row and the y values in the second (Lagrange interpolation).",
"stack": "[[array]] → 'symb'",
"examples": [
{
"input": "[[ 1 2 3 ][ 2 5 10 ]]",
"comment": "The points (1,2), (2,5) and (3,10)"
},
{
"input": "[[ 0 1 ][ 1 3 ]]",
"comment": "The points (0,1) and (1,3)"
}
]
},
"LANGUAGE→": {
"name": "Current language",
"description": "Returns the number of the language currently used for system messages (0 English, 1 French, 2 Spanish).",
"stack": "→ n",
"category": "MODES",
"examples": [
{
"input": ""
}
]
},
"LAP": {
"name": "Laplace transform",
"description": "Computes the Laplace transform of an expression in the current CAS variable; the result uses the same variable as the transform variable.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'EXP(X)'"
},
{
"input": "'SIN(X)'"
}
]
},
"LAPL": {
"name": "Laplacian",
"description": "Computes the Laplacian (sum of the second partial derivatives) of an expression for a vector of variables.",
"stack": "'symb' [vars] → 'symb'",
"examples": [
{
"input": "'X^2+Y^2+Z^2' [ 'X' 'Y' 'Z' ]"
},
{
"input": "'X^3*Y' [ 'X' 'Y' ]"
}
]
},
"LAST": {
"name": "Last arguments",
"description": "Puts back copies of what the last command with arguments took from the stack, at the levels they came from. Works only while LAST mode (flag 31) is on.",
"stack": "→ obj; → obj1 obj2; → obj1 obj2 obj3",
"examples": [
{
"input": "2. 3.",
"run": "+ LAST"
}
]
},
"LASTARG": {
"name": "Last arguments",
"description": "Puts back on the stack the arguments consumed by the most recent command that took any, which is handy after an operation used the wrong values. Works only while last-argument saving (flag -55 clear) is on.",
"stack": "→ obj1 ... objn",
"category": "Keyboard",
"examples": [
{
"input": "2. 3.",
"run": "+ LASTARG"
},
{
"input": "16.",
"run": "√ LASTARG",
"comment": "The one argument, 16, comes back after the square root"
}
]
},
"LCD→": {
"name": "Display to graphics object",
"description": "Copies the current screen contents into a 131 by 64 pixel graphics object on the stack.",
"stack": "→ grob",
"examples": [
{
"input": "",
"run": "LCD→ SIZE"
},
{
"input": "",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"name": "Display to string",
"description": "Returns the current display as a 548-character string, one character for each column of eight pixels; →LCD shows such a string again.",
"stack": "→ \"str\""
}
}
},
"LCM": {
"name": "Least common multiple",
"description": "Computes the least common multiple of a pair of integers or a pair of polynomials.",
"stack": "obj1 obj2 → lcm",
"examples": [
{
"input": "12. 18."
},
{
"input": "'X^2-1' 'X-1'"
}
]
},
"LCXM": {
"name": "Matrix from program",
"description": "Builds a matrix of a given number of rows and columns by running a two-argument program on each row index i and column index j to produce that entry.",
"stack": "n m prog → [[matrix]]",
"examples": [
{
"input": "2. 3. « + »",
"comment": "Entry (i,j) is i plus j, for 2 rows and 3 columns"
},
{
"input": "3. 3. « * »",
"comment": "A 3 by 3 multiplication table"
}
]
},
"LC~C": {
"name": "Long complex conversion",
"description": "Converts a complex number into the internal extended-precision (long) complex form, or a long complex back into an ordinary complex. Part of the development library.",
"stack": "z → long-z; long-z → z",
"category": "PRG DEV",
"examples": [
{
"input": "(1.,2.)",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"LDEC": {
"name": "Linear differential equation",
"description": "Solves a constant-coefficient linear ODE given its right-hand side and characteristic polynomial, or a first-order linear system given a vector of constant terms and a coefficient matrix.",
"stack": "'rhs' 'poly' → 'symb'; [vector] [[matrix]] → [array]",
"examples": [
{
"input": "'0' 'X^2+1'",
"comment": "The right-hand side is 0 and the characteristic polynomial is X^2+1"
},
{
"input": "'EXP(2*X)' 'X^2-1'"
}
]
},
"LEGENDRE": {
"name": "Legendre polynomial",
"description": "Builds the Legendre polynomial of degree n in the current CAS variable, as an exact symbolic expression.",
"stack": "n → 'symb'",
"examples": [
{
"input": "4"
},
{
"input": "2"
}
]
},
"LGCD": {
"name": "List greatest common divisor",
"description": "Computes the greatest common divisor of all elements of a list of integers or expressions, leaving the list in place below the result.",
"stack": "{list} → {list} gcd",
"examples": [
{
"input": "{ 12. 18. 30. }"
},
{
"input": "{ 'X^2-1' 'X^2-2*X+1' }"
}
]
},
"LIBEVAL": {
"name": "Evaluate library function",
"description": "Executes an unnamed library function selected by a binary integer that encodes library number and function number; a bad value can corrupt memory.",
"stack": "#n →",
"category": "PRG",
"skip": "calls arbitrary ROM or library code by address; wrong values can corrupt memory"
},
"LIBS": {
"name": "Libraries",
"description": "Lists each library attached in the directory you are in, giving its title, library number and port.",
"stack": "→ {list}",
"examples": [
{
"input": ""
}
]
},
"LIN": {
"name": "Linearize exponentials",
"description": "Linearizes exponentials in an expression, merging products and powers of EXP terms into a single exponential of a sum.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'EXP(X)^2'"
},
{
"input": "'EXP(X)*EXP(Y)'"
}
]
},
"LINE": {
"description": "Draws a straight line between two points of the graphics picture, given in user units or pixels.",
"stack": "(x1,y1) (x2,y2) →; {#x1 #y1} {#x2 #y2} →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"LINFIT": {
"name": "Linear curve fit",
"description": "Selects the straight-line model y = b + m·x for later regressions, stored in ΣPAR.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 2. 4. ]] STOΣ",
"run": "LINFIT ΣPAR"
}
]
},
"LININ": {
"name": "Linear test",
"description": "Tests whether an algebraic is linear in a given variable, meaning terms containing it are only added or subtracted and each is at most scaled by a factor free of it; returns 1 or 0.",
"stack": "'symb' 'name' → 0/1",
"examples": [
{
"input": "'3.*X+Y' 'X'"
},
{
"input": "'X^2.+1.' 'X'"
},
{
"input": "'SIN(Y)*X' 'X'",
"comment": "SIN(Y) does not contain X, so the term is linear"
}
]
},
"LINSOLVE": {
"name": "Linear solve",
"description": "Solves a linear system symbolically for the listed variables, returning the reduced system, the pivots and the solution.",
"stack": "[eqs] [vars] → [system] {pivots} [solution]",
"examples": [
{
"input": "[ 'X+Y=3' 'X-Y=1' ] [ 'X' 'Y' ]"
},
{
"input": "[ 'X+2*Y=4' 'Y-Z=1' ] [ 'X' 'Y' 'Z' ]"
}
]
},
"LIST→": {
"name": "List to stack",
"description": "Takes a list apart, pushing each element onto the stack followed by the element count. Superseded by OBJ→ but still accepted.",
"stack": "{ obj1 ... objn } → obj1 ... objn n",
"category": "PRG OBJ",
"examples": [
{
"input": "{ 1. \"A\" 'X' }"
},
{
"input": "{ }"
}
],
"per_model": {
"28s": {
"description": "Takes a list apart, pushing each element onto the stack followed by the element count.",
"stack": "{ obj1 ... objn } → obj1 ... objn n"
}
}
},
"LN": {
"name": "Natural logarithm",
"description": "Natural logarithm. Negative reals give a complex result and zero is an infinite-result error unless flagged otherwise.",
"stack": "x → ln x; z → ln z; 'symb' → 'LN(symb)'",
"examples": [
{
"input": "10."
},
{
"input": "-1."
}
]
},
"LNAME": {
"name": "List of names",
"description": "Collects the variable names that occur in a symbolic expression into a vector, keeping the expression on the stack.",
"stack": "'symb' → 'symb' [names]",
"category": "ALGEBRA",
"examples": [
{
"input": "'X^2+Y*Z'"
},
{
"input": "'SIN(A)+B'"
}
]
},
"LNCOLLECT": {
"name": "Collect logarithms",
"description": "Gathers sums and multiples of logarithms in an expression into the logarithm of a single product or power.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'LN(X)+LN(Y)'"
},
{
"input": "'2*LN(X)-LN(Y)'"
}
]
},
"LNP1": {
"name": "Natural logarithm of 1+x",
"description": "Computes ln(1+x) accurately even when x is tiny, where adding 1 first would throw away digits; the argument must be greater than -1.",
"stack": "x → ln(1+x); 'symb' → 'LNP1(symb)'",
"examples": [
{
"input": "1.E-10"
},
{
"input": "1."
}
]
},
"LOCAL": {
"description": "Creates local variables from a list of names or name=value equations, mainly for use inside algebraic programs.",
"stack": "{list} → {list}",
"category": "PRG",
"examples": [
{
"input": "{ 'A=2.' }"
}
]
},
"LOG": {
"name": "Common logarithm (base 10)",
"description": "Base-10 (common) logarithm of a real, a complex number or an algebraic; negative reals give a complex result.",
"stack": "x → log x; z → log z; 'symb' → 'LOG(symb)'",
"examples": [
{
"input": "1000."
},
{
"input": "2."
}
]
},
"LOGFIT": {
"name": "Logarithmic curve fit",
"description": "Selects the logarithmic model y = b + m·ln x for later regressions, stored in ΣPAR.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 2. 4. ]] STOΣ",
"run": "LOGFIT ΣPAR"
}
]
},
"LQ": {
"name": "LQ factorization",
"description": "Factors a rectangular matrix with row pivoting into a lower-trapezoidal L, an orthogonal Q and a permutation P, so that P·A = L·Q.",
"stack": "[[A]] → [[L]] [[Q]] [[P]]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 1. 1. 0. ][ 0. 1. 1. ]]"
}
]
},
"LR": {
"name": "Linear regression",
"description": "Fits a straight line by least squares to the two ΣDAT columns that XCOL and YCOL choose, returns its intercept and slope, and saves them in ΣPAR for PREDX, PREDY and ΣLINE.",
"stack": "→ intercept slope",
"examples": [
{
"input": "",
"run": "LR",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
],
"per_model": {
"28s": {
"description": "Fits a straight line to two columns of ΣDAT (chosen with COLΣ, by default 1 and 2) by least squares, returns its intercept and slope, and stores them in ΣPAR for PREDV.",
"stack": "→ intercept slope"
}
}
},
"LR~R": {
"name": "Long real conversion",
"description": "Converts a real number to an extended-precision long real, or a long real back to an ordinary real; needs library 256 attached.",
"stack": "x → lr; lr → x",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "5."
},
{
"setup": "256. ATTACH",
"input": "2.5",
"run": "LR~R LR~R"
}
]
},
"LSQ": {
"name": "Least squares",
"description": "Solves A·X=B in the least-squares sense with minimum norm, for over-, under- or exactly determined systems; B is a vector or a matrix of right-hand sides.",
"stack": "[B] [[A]] → [X]; [[B]] [[A]] → [[X]]",
"examples": [
{
"input": "[ 1. 2. 2. ] [[ 1. 0. ][ 0. 1. ][ 1. 1. ]]",
"comment": "The vector is B, the matrix is A: three equations, two unknowns"
},
{
"input": "[ 5. 6. ] [[ 1. 2. ][ 3. 4. ]]"
}
]
},
"LU": {
"name": "LU decomposition",
"description": "Factors a square matrix with partial pivoting into a lower-triangular L, an upper-triangular U with unit diagonal, and a permutation P, so that P·A = L·U.",
"stack": "[[A]] → [[L]] [[U]] [[P]]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 2. 1. 1. ][ 4. 3. 3. ][ 8. 7. 9. ]]"
}
]
},
"LVAR": {
"name": "List of variables",
"description": "Lists the variables an algebraic object depends on, keeping the object itself on the stack.",
"stack": "'symb' → 'symb' {list}",
"category": "ALGEBRA",
"examples": [
{
"input": "'X^2+Y*Z'"
},
{
"input": "'SIN(X)+Y'",
"comment": "SIN(X) is listed as a whole, not as X"
}
]
},
"MAD": {
"name": "Determinant, inverse and adjoint",
"description": "Gives a square matrix's determinant, formal inverse, the matrix coefficients of the adjoint polynomial, and the characteristic polynomial.",
"stack": "[[matrix]] → det [[inverse]] {coeffs} 'charpoly'",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 2. 0. ][ 1. 3. ]]"
}
]
},
"MAIN": {
"name": "CAS main menu",
"description": "Opens the computer algebra system's main menu, which leads to its sub-menus.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"MAKESTR": {
"name": "Make string",
"description": "Creates a string of the given length filled with filler characters, handy for testing or reserving memory. Part of the development library.",
"stack": "n → \"str\"",
"category": "PRG DEV",
"examples": [
{
"input": "10.",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"MANT": {
"name": "Mantissa",
"description": "Returns the mantissa of a real number: its significant digits scaled into the range 1 to below 10, as in scientific notation.",
"stack": "x → y; 'symb' → 'MANT(symb)'",
"examples": [
{
"input": "12345."
},
{
"input": "0.00042",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": ".00042",
"models": [
"28s"
]
}
]
},
"MAP": {
"description": "Applies a program to each item of a list (or of an array) and collects the results in an object of the same shape.",
"stack": "{list} prog → {list}; [array] prog → [array]",
"category": "PRG LIST",
"examples": [
{
"input": "{ 1. 2. 3. } « SQ »"
},
{
"input": "{ \"A\" \"BC\" } « SIZE »"
}
]
},
"MATHS": {
"name": "Mathematics menu",
"description": "Menu-entry word of the CAS that brings up the top-level menu of mathematics commands.",
"stack": "→",
"category": "MTH",
"skip": "opens a menu screen"
},
"MATR": {
"name": "Matrix menu",
"description": "Opens the CAS menu of matrix and linear algebra commands.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"MAX": {
"description": "Takes two reals and keeps the larger of them; symbolic arguments give a symbolic MAX expression.",
"stack": "x y → max(x,y); x 'symb' → 'MAX(x,symb)'",
"examples": [
{
"input": "3. 7."
},
{
"input": "-2. -5."
}
]
},
"MAXR": {
"name": "Maximum real",
"description": "Puts the symbolic constant MAXR, the largest positive real the calculator can hold (9.99999999999E499), on the stack; it evaluates to a number when numeric results are requested or with →NUM.",
"stack": "→ 'MAXR'",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "MAXR →NUM"
}
]
},
"MAXΣ": {
"name": "Statistics maximum",
"description": "Returns the largest value of each column of ΣDAT, as a real for single-column data or a vector otherwise.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"run": "MAXΣ",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"MCALC": {
"name": "Make calculated value",
"description": "Marks one or more variables of the multiple-equation solver as calculated (unknowns to solve for), or all of them with \"ALL\".",
"stack": "'name' →; {names} →; \"ALL\" →",
"examples": [
{
"setup": "{ 'A=B+C' 'D=2*A' } 'EQ' STO MINIT",
"input": "'D'"
}
]
},
"MEAN": {
"description": "Returns the arithmetic mean of each column of ΣDAT, as a real for single-column data or a vector otherwise.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"run": "MEAN",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"MEM": {
"name": "Memory available",
"description": "Reports how many bytes of user memory are still free.",
"stack": "→ x",
"examples": [
{
"input": ""
}
]
},
"MENU": {
"description": "Displays a menu: a number selects a built-in menu (its code from the menu table, a decimal part picking the page), a list defines a custom menu which is also stored as the CST variable.",
"stack": "n →; {list} →",
"skip": "changes the soft-key menu on the screen and returns nothing to the stack",
"per_model": {
"28s": {
"description": "Shows a menu: a number from 1 to 24 selects a built-in menu, a list of commands and names makes a custom menu, and a list that starts with STO makes a menu whose keys store values into the named variables.",
"stack": "n →; {list} →"
}
}
},
"MENUXY": {
"name": "CAS command menu by number",
"description": "Shows a soft-key menu holding the CAS commands whose numbers lie between the two given indices.",
"stack": "n1 n2 →",
"category": "CAS",
"skip": "only builds a soft-key menu on the screen"
},
"MERGE": {
"name": "Merge RAM card",
"description": "Joins the RAM of a plug-in card in the given port to main user memory, so its space is no longer an independent port.",
"stack": "n →",
"category": "MEMORY",
"skip": "needs a RAM card plugged into port 1 or 2"
},
"MERGE1": {
"name": "Merge port 1 RAM",
"description": "Joins the RAM on a card in port 1 to main user memory, enlarging the space available for variables and the stack.",
"stack": "→",
"skip": "needs a RAM card in port 1 and changes the memory configuration"
},
"MIN": {
"description": "Takes two reals and keeps the smaller of them; symbolic arguments give a symbolic MIN expression.",
"stack": "x y → min(x,y); x 'symb' → 'MIN(x,symb)'",
"examples": [
{
"input": "3. 7."
},
{
"input": "-2. -5."
}
]
},
"MINEHUNT": {
"description": "Starts the built-in Minehunt game, in which the player steers across a minefield guided by counts of nearby mines.",
"stack": "→",
"skip": "interactive game that waits for keys"
},
"MINIFONT→": {
"name": "Current minifont",
"description": "Returns the font object currently used as the minifont, so it can be saved, inspected or replaced.",
"stack": "→ font",
"category": "DISPLAY",
"examples": [
{
"input": "",
"run": "MINIFONT→"
}
]
},
"MINIT": {
"name": "Multiple-equation solver initialization",
"description": "Prepares the multiple-equation solver by building the reserved variable Mpar from the equation list held in EQ.",
"stack": "→",
"examples": [
{
"setup": "{ 'A=B+C' 'D=2*A' } 'EQ' STO",
"input": "'Mpar'",
"run": "MINIT VTYPE"
}
]
},
"MINR": {
"name": "Minimum real",
"description": "Puts the symbolic constant MINR, the smallest positive real the calculator can hold (1.E-499), on the stack; →NUM or numeric-results mode turns it into the number.",
"stack": "→ 'MINR'",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "MINR →NUM"
}
]
},
"MINΣ": {
"name": "Statistics minimum",
"description": "Returns the smallest value of each column of ΣDAT, as a real for single-column data or a vector otherwise.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"run": "MINΣ",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"MITM": {
"name": "Multiple-equation menu item order",
"description": "Sets the title and the menu variable order that the multiple-equation solver shows, updating Mpar.",
"stack": "\"title\" {names} →",
"examples": [
{
"setup": "{ 'A=B+C' 'D=2*A' } 'EQ' STO MINIT",
"input": "\"SET\" { D A B C }"
}
]
},
"MKISOM": {
"name": "Make isometry",
"description": "Builds the matrix of a 2D or 3D linear isometry from its characteristic elements and a sign: 1 for a direct isometry (rotation), -1 for an indirect one.",
"stack": "obj n → [[A]]",
"examples": [
{
"input": "'π/2' 1",
"comment": "A rotation by π/2; the sign 1 marks a direct isometry"
}
]
},
"MOD": {
"name": "Modulo",
"description": "Computes the remainder of x divided by y using floored division, so the result has the sign of y (x - y·FLOOR(x/y)).",
"stack": "x y → x mod y; 'symb' y → 'symb MOD y'",
"examples": [
{
"input": "17. 5."
},
{
"input": "-17. 5.",
"comment": "The result takes the sign of the divisor, so -17 mod 5 is 3"
},
{
"input": "7.5 2."
}
]
},
"MODSTO": {
"name": "Store modulus",
"description": "Sets the modulus used by the CAS modular-arithmetic commands; it is shown as the modulo field of the CAS settings.",
"stack": "n →",
"examples": [
{
"input": "7",
"run": "MODSTO 2 INVMOD",
"comment": "Modulo 7, so 2 times -3 gives 1"
}
]
},
"MODULAR": {
"description": "Opens the CAS menu or selection list of modular arithmetic commands.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"MOLWT": {
"name": "Molecular weight",
"description": "Computes the molecular weight of a chemical formula given as a string, using the element data of the periodic table library.",
"stack": "\"str\" → x",
"category": "CHEM",
"examples": [
{
"input": "\"H2O\""
},
{
"input": "\"NaCl\""
}
]
},
"MROOT": {
"name": "Multiple-equation root",
"description": "Runs the multiple-equation solver to find the named variable from the known ones, chaining through the equations in Mpar as needed; \"ALL\" solves every variable it can.",
"stack": "'name' → x; \"ALL\" →",
"skip": "needs an equation set prepared with MINIT and the multiple-equation solver"
},
"MSGBOX": {
"name": "Message box",
"description": "Shows a string in a framed message box and waits until the user dismisses it.",
"stack": "\"message\" →",
"skip": "displays a message box and waits for a key"
},
"MSLV": {
"name": "Solve nonlinear system",
"description": "Solves a system of nonlinear equations numerically by Newton's method, from a vector of equations, a vector of unknowns and a vector of initial guesses.",
"stack": "[eqs] [vars] [guesses] → [eqs] [vars] [solution]",
"examples": [
{
"input": "[ 'X^2+Y^2-4' 'X-Y' ] [ 'X' 'Y' ] [ 1. 1. ]",
"setup": "STD"
}
]
},
"MSOLVR": {
"name": "Multiple-equation solver",
"description": "Shows the Multiple-Equation Solver's variables menu for the equation set that Mpar describes, ready for entering knowns and solving unknowns.",
"stack": "→",
"skip": "installs an interactive solver menu; needs a prepared Mpar"
},
"MSOLVR2": {
"description": "Internal entry of the multiple-equation solver; not meant for direct use.",
"stack": "→",
"category": "SOLVE",
"skip": "internal solver entry that drives the solver menu screen"
},
"MULTMOD": {
"name": "Multiply modulo",
"description": "Multiplies two expressions or integers and reduces the product modulo the current CAS modulus.",
"stack": "obj1 obj2 → obj",
"examples": [
{
"input": "'X+3' 'X+5'",
"setup": "7 MODSTO"
},
{
"input": "4 5",
"setup": "7 MODSTO"
}
]
},
"MUSER": {
"name": "Make user-defined variable",
"description": "Marks one or more variables of the multiple-equation solver as user-defined (known inputs), or all of them with \"ALL\".",
"stack": "'name' →; {names} →; \"ALL\" →",
"examples": [
{
"setup": "{ 'A=B+C' 'D=2*A' } 'EQ' STO MINIT",
"input": "{ B C }"
}
]
},
"NDIST": {
"name": "Normal distribution",
"description": "Evaluates the normal (Gaussian) probability density with mean m and variance v at the point x.",
"stack": "m v x → p",
"examples": [
{
"input": "0. 1. 0."
},
{
"input": "10. 4. 12."
}
]
},
"NDUPN": {
"name": "Duplicate n times, keep count",
"description": "Replaces an object and a count n with n copies of the object, followed by n itself.",
"stack": "obj n → obj ... obj n",
"examples": [
{
"input": "7. 3."
}
]
},
"NEG": {
"name": "Negate",
"description": "Changes the sign of its argument: reals, complex numbers, arrays, unit objects and algebraics are negated element by element or symbolically.",
"stack": "x → -x; z → -z; [array] → [array]'; 'symb' → '-symb'",
"category": "Keyboard",
"examples": [
{
"input": "5."
},
{
"input": "(1.,-2.)"
},
{
"input": "'A+B'"
}
],
"per_model": {
"28s": {
"description": "Changes the sign of its argument: reals, complex numbers, arrays and algebraics are negated element by element or symbolically.",
"stack": "x → -x; z → -z; [array] → [array]'; 'symb' → '-symb'"
}
}
},
"NEWOB": {
"name": "New object",
"description": "Makes a fresh, independent copy of an object in memory, releasing any hidden reference to a larger object it was taken from.",
"stack": "obj → obj",
"examples": [
{
"input": "{ 1. 2. }"
},
{
"input": "\"HELLO\""
}
]
},
"NEXT": {
"description": "Closes a START or FOR loop, adding 1 to the counter and repeating the body while the counter has not passed the final value.",
"stack": "→",
"skip": "closes a START or FOR loop and cannot run alone; see START for an example"
},
"NEXTPRIME": {
"description": "Returns the smallest prime number greater than the given integer.",
"stack": "n → p",
"examples": [
{
"input": "100."
},
{
"input": "13."
}
]
},
"NIP": {
"name": "Drop level 2",
"description": "Removes the object on level 2, leaving the level 1 object in its place.",
"stack": "x y → y",
"examples": [
{
"input": "1. 2."
}
]
},
"NOT": {
"description": "Inverts every bit of a binary integer within the current word size; for a real it is a logical negation, giving 1 for zero and 0 for anything else.",
"stack": "#n1 → #n2; x → 0|1; 'symb' → 'NOT symb'",
"examples": [
{
"input": "#0h",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "Every one of the 64 bits is inverted"
},
{
"setup": "8. STWS",
"input": "#Fh",
"comment": "The word size is 8, so only 8 bits are inverted"
},
{
"input": "0."
},
{
"setup": "8. STWS",
"input": "#0h",
"models": [
"28s"
]
}
]
},
"NOVAL": {
"name": "No value",
"description": "Pushes the placeholder object that marks an empty field in INFORM reset and initial value lists, and that INFORM returns for fields left blank.",
"stack": "→ NOVAL",
"examples": [
{
"input": "{ 1. }",
"run": "NOVAL +"
}
]
},
"NSUB": {
"name": "Sublist number",
"description": "Inside a DOSUBS program, returns the position of the window currently being processed, counting from 1.",
"stack": "→ n",
"examples": [
{
"input": "{ 10. 20. 30. }",
"run": "1. « NSUB * » DOSUBS",
"comment": "NSUB is 1, 2, 3 in turn, so each element is multiplied by its position"
}
]
},
"NUM": {
"name": "Character number",
"description": "Returns the character code (0 to 255) of a string's leading character.",
"stack": "\"str\" → n",
"examples": [
{
"input": "\"A\""
},
{
"input": "\"abc\""
}
]
},
"NUMX": {
"name": "Number of x-steps",
"description": "Sets how many sample points a 3D perspective plot takes along x for each y step, storing the count in VPAR.",
"stack": "n →",
"examples": [
{
"input": "12.",
"run": "NUMX VPAR"
}
]
},
"NUMY": {
"name": "Number of y-steps",
"description": "Sets how many y steps a 3D perspective plot takes across the view volume, storing the count in VPAR.",
"stack": "n →",
"examples": [
{
"input": "8.",
"run": "NUMY VPAR"
}
]
},
"NΣ": {
"name": "Number of data points",
"description": "Returns how many data points (rows) ΣDAT holds.",
"stack": "→ n",
"examples": [
{
"input": "",
"run": "NΣ",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"OBGET": {
"name": "Object get",
"description": "Returns the object at position n of an algebraic, inside a one-element list. Objects (names, numbers and functions) are counted from the left as the algebraic is written.",
"stack": "'symb' n → { obj }",
"examples": [
{
"input": "'(A+B)*C' 2.",
"comment": "Counting A, +, B, * and C from the left, the 2nd is +"
},
{
"input": "'A*B' 3.",
"comment": "Counting A, * and B from the left, the 3rd is B"
}
]
},
"OBJ→": {
"name": "Object to stack",
"description": "Takes a composite object apart: a list or program yields its elements and a count, a complex number its two parts, an array its elements and a dimension list, a tagged object its contents and tag, an algebraic its arguments, count and operator. A string is parsed and evaluated as command-line text.",
"stack": "{list} → obj1 … objn n; (x,y) → x y; [array] → x1 … xn {dims}; :tag:obj → obj \"tag\"; \"str\" → result",
"examples": [
{
"input": "{ 1. \"A\" 'X' }"
},
{
"input": "[ 4. 5. 6. ]"
},
{
"input": "\"2. 3. +\""
}
]
},
"OBSUB": {
"name": "Object substitute",
"description": "Replaces the object at position n of an algebraic with the object in a one-element list, which may be a name, a number or a function. Positions are counted as for OBGET.",
"stack": "'symb' n { obj } → 'symb''",
"examples": [
{
"input": "'A*B' 3. { C }",
"comment": "Replaces the 3rd object, B, with C"
},
{
"input": "'A*B' 2. { + }",
"comment": "Replaces the 2nd object, the *, with +"
}
]
},
"OCT": {
"name": "Octal mode",
"description": "Selects base 8 for displaying binary integers.",
"stack": "→",
"examples": [
{
"input": "",
"run": "OCT #64d →STR",
"comment": "Decimal 64 is 100 in octal"
},
{
"input": "",
"run": "OCT #FFh →STR",
"comment": "Hexadecimal FF is 377 in octal"
}
]
},
"OFF": {
"description": "Switches the calculator off; when it is used inside a program, execution continues after the next power-on.",
"stack": "→",
"skip": "turns the calculator off"
},
"OLDPRT": {
"name": "Old printer",
"description": "Makes later printing remap characters for the older HP 82240A infrared printer by storing a remapping string in the PRTPAR variable.",
"stack": "→",
"category": "PRINT",
"examples": [
{
"input": "",
"run": "OLDPRT PRTPAR"
}
]
},
"OPENIO": {
"name": "Open I/O port",
"description": "Opens the serial or infrared port with the settings in IOPAR, so it can receive Kermit commands or raw data.",
"stack": "→",
"skip": "talks over the serial or IR port"
},
"OR": {
"description": "Bitwise OR of two binary integers; for reals it is a logical OR returning 1 when either value is non-zero, else 0. Symbolic arguments give a symbolic expression.",
"stack": "#n1 #n2 → #n3; x y → 0|1; 'symb1' 'symb2' → 'symb1 OR symb2'",
"examples": [
{
"input": "#Ch #Ah",
"comment": "Binary 1100 OR 1010 gives 1110"
},
{
"input": "0. 0."
},
{
"input": "0. 3."
}
]
},
"ORDER": {
"description": "Moves the listed variables to the front of the directory you are in, in the order given, which also orders the VAR menu.",
"stack": "{list} →",
"examples": [
{
"input": "{ B A }",
"run": "ORDER VARS",
"setup": "1. 'A' STO 2. 'B' STO"
}
],
"per_model": {
"28s": {
"description": "Moves the listed variables to the front of the directory you are in, in the order given, which also orders the USER menu.",
"stack": "{list} →"
}
}
},
"OVER": {
"description": "Duplicates the second stack object onto the top of the stack.",
"stack": "obj1 obj2 → obj1 obj2 obj1",
"examples": [
{
"input": "1. 2."
}
]
},
"P2C": {
"name": "Permutation to cycles",
"description": "Decomposes a permutation given as a list of images into disjoint cycles and returns them with the permutation's signature.",
"stack": "{perm} → {cycles} n",
"examples": [
{
"input": "{ 3 4 1 2 }",
"comment": "1 goes to 3 and back, 2 goes to 4 and back"
},
{
"input": "{ 2 3 1 }",
"comment": "1 goes to 2, 2 to 3, and 3 back to 1"
}
]
},
"PA2B2": {
"name": "Prime as a²+b²",
"description": "For a prime p equal to 2 or congruent to 1 modulo 4, finds a Gaussian integer a+bi with a^2+b^2=p; useful for factoring Gaussian integers.",
"stack": "p → (a,b)",
"examples": [
{
"input": "13.",
"comment": "13 is 3 squared plus 2 squared"
},
{
"input": "29.",
"comment": "29 is 5 squared plus 2 squared"
}
]
},
"PARAMETRIC": {
"name": "Parametric plot type",
"description": "Selects the parametric plot type, where EQ yields a complex number whose real and imaginary parts give x and y for each parameter value.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "PARAMETRIC PPAR"
}
]
},
"PARAMTAB": {
"name": "Parametric table",
"description": "Opens the table view of a parametric plot, listing parameter values with the corresponding x and y.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"PARITY": {
"description": "Sets the serial parity stored in IOPAR as a code from 0 to 4 (none, odd, even, mark, space); a negative code disables parity checking of incoming data.",
"stack": "n →",
"category": "I/O",
"skip": "changes the parity of the serial link the examples run over"
},
"PARSURFACE": {
"name": "Parametric surface plot type",
"description": "Selects the parametric surface plot as the current plot type, where EQ gives x, y and z as functions of two parameters ranging over the XXRNG and YYRNG plane.",
"stack": "→",
"examples": [
{
"input": "",
"run": "PARSURFACE PPAR"
}
]
},
"PARTFRAC": {
"name": "Partial fractions",
"description": "Decomposes a rational expression into a polynomial part plus a sum of partial fractions.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'1/(X^2-1)'"
},
{
"input": "'(X^3+1)/(X^2+X)'"
}
]
},
"PATH": {
"description": "Returns the list of directory names from HOME down to the current directory.",
"stack": "→ {list}",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "PATH",
"setup": "'D1' CRDIR D1"
}
]
},
"PCAR": {
"name": "Characteristic polynomial",
"description": "Computes a square matrix's characteristic polynomial, written in the current CAS variable.",
"stack": "[[matrix]] → 'symb'",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 5. 8. 16. ][ 4. 1. 8. ][ -4. -4. -11. ]]"
}
]
},
"PCOEF": {
"name": "Polynomial from roots",
"description": "Builds the monic polynomial that has the given roots and returns its coefficients as a vector, highest power first. The inverse of PROOT.",
"stack": "[roots] → [coefficients]",
"examples": [
{
"input": "[ 1. 2. ]",
"comment": "The roots 1 and 2 give X^2 - 3X + 2"
},
{
"input": "[ 1. 2. 3. ]"
}
]
},
"PCONTOUR": {
"name": "Pseudo-contour plot type",
"description": "Selects the pseudo-contour plot as the current plot type, which draws the level curves of a function z(x,y) seen from above.",
"stack": "→",
"examples": [
{
"input": "",
"run": "PCONTOUR PPAR"
}
]
},
"PCOV": {
"name": "Population covariance",
"description": "Returns the population covariance between the two ΣDAT columns selected by XCOL and YCOL.",
"stack": "→ x",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 5. ][ 5. 8. ]] STOΣ"
}
]
},
"PDIM": {
"name": "Picture dimensions",
"description": "Changes the graphics picture: two complex numbers set the user-unit corners of the plot range in PPAR, two binary integers set the size of PICT in pixels.",
"stack": "(x1,y1) (x2,y2) →; #w #h →",
"examples": [
{
"input": "(-5.,-2.) (5.,2.)",
"run": "PDIM PPAR",
"comment": "(-5,-2) and (5,2) become the new minimum and maximum of the plot range"
}
]
},
"PEEK": {
"description": "Reads a given number of nibbles from memory starting at an address and returns them as a hexadecimal string; needs library 256 attached.",
"stack": "#addr #n → \"hex\"",
"category": "DEVEL",
"skip": "reads raw memory"
},
"PEEKARM": {
"name": "Peek ARM memory",
"description": "Reads data directly from memory of the ARM processor on ARM-based models. Part of the development library.",
"stack": "#addr #n → \"data\"",
"category": "PRG DEV",
"skip": "reads raw memory"
},
"PERINFO": {
"name": "Periodic table information",
"description": "Shows information about the periodic table library.",
"stack": "→",
"category": "CHEM",
"skip": "displays an information screen"
},
"PERM": {
"name": "Permutations",
"description": "Gives the number of ordered arrangements of m items chosen from n: n!/(n-m)!.",
"stack": "n m → P(n,m); 'symb' m → 'PERM(symb,m)'",
"examples": [
{
"input": "5. 2."
},
{
"input": "10. 3."
}
]
},
"PERTBL": {
"name": "Periodic table",
"description": "Opens the periodic table application, an interactive table of the chemical elements.",
"stack": "→",
"category": "CHEM",
"skip": "opens an interactive application screen"
},
"PEVAL": {
"name": "Polynomial evaluation",
"description": "Evaluates a polynomial, given as a coefficient vector with the highest power first, at a number.",
"stack": "[coefficients] x → y",
"examples": [
{
"input": "[ 1. -3. 2. ] 5.",
"comment": "X^2 - 3X + 2 evaluated at X=5"
},
{
"input": "[ 2. 0. 0. 1. ] -1.",
"comment": "2X^3 + 1 evaluated at X=-1"
}
]
},
"PGDIR": {
"name": "Purge directory",
"description": "Purges a directory with all variables and subdirectories it contains.",
"stack": "'name' →",
"examples": [
{
"input": "'D'",
"run": "PGDIR VARS",
"setup": "'D' CRDIR"
}
]
},
"PICK": {
"description": "Pushes a copy of the object found at the given stack level (counted after removing the level argument).",
"stack": "objn … obj1 n → objn … obj1 objn",
"examples": [
{
"input": "10. 20. 30. 3.",
"comment": "Copies level 3, the 10, to level 1"
}
]
},
"PICK3": {
"name": "Pick level 3",
"description": "Pushes a copy of the object found on level 3.",
"stack": "x y z → x y z x",
"examples": [
{
"input": "1. 2. 3."
}
]
},
"PICT": {
"name": "Picture",
"description": "Pushes the name PICT, which stands for the graphics picture so that STO, RCL, GOR and similar commands can address it.",
"stack": "→ PICT",
"examples": [
{
"input": "",
"run": "PICT RCL",
"setup": "ERASE"
},
{
"input": "#8d #8d BLANK",
"run": "PICT STO PICT RCL SIZE"
}
]
},
"PICTURE": {
"description": "Switches the display to the graphics environment, showing the current PICT so it can be scrolled, annotated or edited with the cursor and drawing menu.",
"stack": "→",
"skip": "enters the interactive graphics environment and waits for keys"
},
"PINIT": {
"name": "Port initialize",
"description": "Initializes all active memory-card ports, for example after inserting a card with several ports, without disturbing data already stored in them.",
"stack": "→",
"skip": "only reinitializes the plug-in card ports; nothing to show on the stack"
},
"PIX?": {
"name": "Pixel on?",
"description": "Tests one pixel of the graphics picture, given in user units or pixels, and returns 1 when it is on and 0 when it is off.",
"stack": "(x,y) → 0/1; {#x #y} → 0/1",
"examples": [
{
"input": "(0.,0.)",
"setup": "ERASE"
},
{
"input": "(0.,0.)",
"setup": "ERASE (0.,0.) PIXON"
},
{
"input": "{ #3d #3d }",
"setup": "ERASE",
"comment": "A pixel given as an {x y} list in pixels"
}
]
},
"PIXEL": {
"description": "Turns on the display pixel at the plot coordinates given as a complex number and sets the message flag, so the normal stack display does not replace it.",
"stack": "(x,y) →",
"skip": "draws into the display and returns nothing to the stack"
},
"PIXOFF": {
"name": "Pixel off",
"description": "Turns off the pixel of the graphics picture at the given coordinate, in user units or pixels.",
"stack": "(x,y) →; {#x #y} →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"PIXON": {
"name": "Pixel on",
"description": "Turns on the pixel of the graphics picture at the given coordinate, in user units or pixels.",
"stack": "(x,y) →; {#x #y} →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"PKT": {
"name": "Kermit packet",
"description": "Sends a Kermit command packet of the given type and data to a server and returns its reply.",
"stack": "\"data\" \"type\" → \"response\"",
"skip": "talks over the serial or IR port"
},
"PLOT": {
"description": "Stores an expression as the current plot equation and opens the plot setup for it.",
"stack": "'symb' →",
"skip": "opens the plot setup form"
},
"PLOTADD": {
"name": "Add to plot",
"description": "Appends an expression to the plot functions kept in the EQ variable.",
"stack": "'symb' →",
"skip": "does not return within the time limit when run headless on the 49G"
},
"PMAX": {
"name": "Picture maximum",
"description": "Sets the plot window's top-right corner in PPAR to the given coordinates, creating PPAR if needed.",
"stack": "(x,y) →",
"category": "PLOT",
"examples": [
{
"input": "(4.,3.)",
"run": "PMAX PPAR"
}
]
},
"PMIN": {
"name": "Picture minimum",
"description": "Sets the lower-left plot window corner in PPAR to the given coordinates, creating PPAR if needed.",
"stack": "(x,y) →",
"category": "PLOT",
"examples": [
{
"input": "(-2.,-1.)",
"run": "PMIN PPAR"
}
]
},
"PMINI": {
"name": "Minimal polynomial",
"description": "Computes the minimal polynomial of a square matrix, given as a matrix from whose last nonzero row the polynomial's coefficients are read.",
"stack": "[[A]] → [[M]]",
"examples": [
{
"input": "[[ 2. 0. ][ 0. 2. ]]"
},
{
"input": "[[ 1. 1. ][ 0. 2. ]]"
}
]
},
"POKE": {
"description": "Writes a string of hexadecimal digits into memory at the given address; needs library 256 attached and can corrupt memory.",
"stack": "#n \"hex\" →",
"category": "DEVEL",
"skip": "writes raw memory"
},
"POKEARM": {
"name": "Poke ARM memory",
"description": "Writes data directly into memory of the ARM processor on ARM-based models. Part of the development library.",
"stack": "#addr \"data\" →",
"category": "PRG DEV",
"skip": "writes raw memory"
},
"POLAR": {
"name": "Polar plot type",
"description": "Selects the polar plot type, which draws EQ as a radius depending on an angle.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "POLAR PPAR"
}
]
},
"POLARTAB": {
"name": "Polar table",
"description": "Opens the table view of a polar plot, listing angle values with the corresponding radius.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"POLYNOMIAL": {
"description": "Opens the CAS menu or selection list of polynomial commands.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"POP": {
"description": "Restores the flag settings and current directory most recently saved by PUSH.",
"stack": "→",
"category": "CAS",
"examples": [
{
"input": "1.",
"run": "PUSH RAD POP"
}
]
},
"POS": {
"name": "Position",
"description": "Searches a string for a substring, or a list for an object, and returns where the first match starts; 0 means not found.",
"stack": "\"str\" \"sub\" → n; {list} obj → n",
"examples": [
{
"input": "\"HELLO\" \"L\"",
"comment": "The first L is the 3rd character"
},
{
"input": "{ 5. 6. 7. } 7.",
"comment": "The 7 is the 3rd element"
},
{
"input": "\"HELLO\" \"Z\""
}
]
},
"POTENTIAL": {
"description": "Finds a scalar function whose gradient equals the given vector field, taken with respect to the listed variables; fails when the field is not a gradient.",
"stack": "[array] [vars] → 'symb'",
"category": "CALC",
"examples": [
{
"input": "[ 'X' 'Y' ] [ 'X' 'Y' ]",
"comment": "The field (X,Y) in the variables X and Y"
},
{
"input": "[ 'Y' 'X' ] [ 'X' 'Y' ]",
"comment": "The field (Y,X) in the variables X and Y"
}
]
},
"POWEXPAND": {
"name": "Power expand",
"description": "Rewrites an integer power as an explicit product of repeated factors, e.g. a cube as three equal factors.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'(X+1)^3'"
}
]
},
"POWMOD": {
"name": "Power modulo",
"description": "Raises an expression or integer to an integer power, reducing modulo the current CAS modulus.",
"stack": "obj n → obj",
"examples": [
{
"input": "3 5",
"setup": "7 MODSTO",
"comment": "3^5 is 243, and 243 is -2 modulo 7"
},
{
"input": "'X+1' 3",
"setup": "3 MODSTO",
"comment": "(X+1)^3 modulo 3 loses the middle terms"
}
]
},
"PR1": {
"name": "Print level 1",
"description": "Sends the top stack object to the printer and leaves it on the stack.",
"stack": "obj → obj",
"skip": "prints to the infrared or serial printer"
},
"PREDV": {
"name": "Predicted value",
"description": "Predicts the dependent value for a given independent value using the regression model and coefficients currently stored in ΣPAR; the same as PREDY.",
"stack": "x → y",
"category": "STAT",
"examples": [
{
"input": "5.",
"setup": "[[ 1. 2. ][ 2. 4. ][ 3. 6. ]] STOΣ LR"
}
],
"per_model": {
"28s": {
"description": "Predicts the dependent value for a given independent value from the line LR last stored in ΣPAR: slope times x plus intercept. Without an earlier LR it returns 0.",
"stack": "x → y"
}
}
},
"PREDX": {
"name": "Predicted x-value",
"description": "Predicts the independent value for a given dependent value from the line last fitted by LR (coefficients in ΣPAR).",
"stack": "y → x",
"examples": [
{
"input": "8.",
"run": "PREDX",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ LR"
}
]
},
"PREDY": {
"name": "Predicted y-value",
"description": "Predicts the dependent value for a given independent value from the line last fitted by LR (coefficients in ΣPAR).",
"stack": "x → y",
"examples": [
{
"input": "4.",
"run": "PREDY",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ LR"
}
]
},
"PREVAL": {
"name": "Evaluate between bounds",
"description": "Evaluates an expression at two bounds of the current CAS variable and returns the difference, upper value minus lower value; combined with INTVX it gives definite integrals.",
"stack": "'symb' a b → 'symb''",
"examples": [
{
"input": "'X^2' 'A' 'B'",
"comment": "A is the lower bound and B the upper"
},
{
"input": "'X^3/3' '0' '3'"
}
]
},
"PREVPRIME": {
"name": "Previous prime",
"description": "Returns the largest prime number less than the given integer.",
"stack": "n → p",
"examples": [
{
"input": "100."
},
{
"input": "13."
}
]
},
"PRLCD": {
"name": "Print display",
"description": "Prints a pixel image of the whole display.",
"stack": "→",
"skip": "prints to the infrared or serial printer"
},
"PRMD": {
"name": "Print modes",
"description": "Shows and prints the current modes: display format, binary base, angle mode, radix mark, and which of UNDO, COMMAND, LAST and the multi-line display are on.",
"stack": "→",
"skip": "prints to the infrared printer"
},
"PROMPT": {
"description": "Shows a string in the status area, then suspends the program so the user can enter or edit values on the stack; CONT resumes execution.",
"stack": "\"str\" →",
"skip": "halts the program and waits for the user to press CONT"
},
"PROMPTSTO": {
"name": "Prompt and store",
"description": "Asks the user for a value for the named variable and stores what is entered in it.",
"stack": "'name' →",
"category": "PRG IN",
"skip": "waits for the user to type a value"
},
"PROOT": {
"name": "Polynomial roots",
"description": "Finds all roots, real or complex, of a polynomial given as a coefficient vector ordered from the highest power down.",
"stack": "[coefficients] → [roots]",
"examples": [
{
"input": "[ 1. -3. 2. ]"
},
{
"input": "[ 1. 0. 1. ]",
"comment": "X^2 + 1 has the roots i and -i"
},
{
"input": "[ 1. -6. 11. -6. ]"
}
]
},
"PROPFRAC": {
"name": "Proper fraction",
"description": "Splits an improper fraction, numeric or rational in a variable, into an integer or polynomial part plus a proper fraction.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'43/12'"
},
{
"input": "'(X^2+3)/(X+1)'"
}
]
},
"PRST": {
"name": "Print stack",
"description": "Prints every stack level, multi-line objects in full.",
"stack": "→",
"skip": "prints to the infrared or serial printer"
},
"PRSTC": {
"name": "Print stack, compact",
"description": "Prints the whole stack in compact form, one line per level.",
"stack": "→",
"skip": "prints to the infrared or serial printer"
},
"PRUSR": {
"name": "Print user variables",
"description": "Prints the current directory's variable names, in USER menu order.",
"stack": "→",
"skip": "prints to the infrared printer"
},
"PRVAR": {
"name": "Print variable",
"description": "Prints one variable, or each variable in a list, showing its name and its contents.",
"stack": "'name' →; {list} →",
"skip": "prints to the infrared or serial printer"
},
"PSDEV": {
"name": "Population standard deviation",
"description": "Returns the population standard deviation for every column of the statistics matrix ΣDAT, treating the data as the whole population; a single column gives a real, several give a vector.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 5. ][ 5. 8. ]] STOΣ"
},
{
"input": "",
"setup": "[[ 2. ][ 4. ][ 9. ]] STOΣ"
}
]
},
"PSI": {
"name": "Polygamma",
"description": "Evaluates the polygamma function: the n-th derivative of the digamma function at a point.",
"stack": "x n → y",
"examples": [
{
"input": "1. 1."
},
{
"input": "2. 0."
}
]
},
"PTAYL": {
"name": "Polynomial Taylor shift",
"description": "Rewrites a polynomial P around a point a: returns the polynomial Q with Q(X-a)=P(X), i.e. P's Taylor expansion at a written in powers of X.",
"stack": "'p' a → 'q'",
"examples": [
{
"input": "'X^2+3*X+1' 2.",
"comment": "(X-2)^2+7*(X-2)+11 expands back to X^2+3*X+1"
},
{
"input": "'X^3' 1."
}
]
},
"PTPROP": {
"name": "Periodic table properties",
"description": "Command of the periodic table library that looks up properties of chemical elements.",
"stack": "obj → obj",
"category": "CHEM",
"skip": "argument conventions not verified; part of the periodic table application"
},
"PURGE": {
"description": "Deletes the named variable, or every variable named in a list, from the current directory; an empty subdirectory can be removed the same way.",
"stack": "'name' →; { names } →",
"examples": [
{
"input": "'A'",
"setup": "1. 'A' STO 2. 'B' STO",
"run": "PURGE VARS"
}
]
},
"PUSH": {
"description": "Saves the current flag settings and the current directory on an internal stack so a program can change them and restore them later with POP.",
"stack": "→",
"category": "CAS",
"examples": [
{
"input": "1.",
"run": "PUSH"
}
]
},
"PUT": {
"description": "Replaces the element at a given position of an array or list with a new value; the position is a number or, for matrices, a {row col} list. When the target is a variable name, the variable is changed in place and nothing is returned.",
"stack": "[array] n x → [array']; {list} n obj → {list'}; 'name' n obj →",
"examples": [
{
"input": "[ 1. 2. 3. ] 2. 9.",
"comment": "Replaces element 2 with 9"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]] { 2. 1. } 0.",
"comment": "Row 2, column 1 becomes 0"
},
{
"input": "'L' 1. 5.",
"setup": "{ 1. 2. } 'L' STO",
"run": "PUT L"
}
]
},
"PUTI": {
"name": "Put and increment index",
"description": "Works like PUT but also returns the next position, so repeated calls fill an array or list in order; after the last element the index wraps to the first and flag -64 is set.",
"stack": "[array] n x → [array'] n+1; {list} n obj → {list'} n+1; 'name' n obj → 'name' n+1",
"examples": [
{
"input": "[ 1. 2. 3. ] 1. 9.",
"comment": "Replaces element 1 and returns the next index, 2"
},
{
"input": "{ 1. 2. } 2. \"A\"",
"comment": "After the last element the index wraps back to 1"
},
{
"input": "[ 1. 2. 3. ] 3. 9.",
"run": "PUTI 46. FS?",
"models": [
"28s"
],
"comment": "After the last element the index wraps to 1 and flag 46 is set"
}
],
"per_model": {
"28s": {
"description": "Works like PUT but also returns the next position, so repeated calls fill an array or list in order; after the last element the index wraps to 1 and flag 46 is set.",
"stack": "[array] n x → [array'] n+1; {list} n obj → {list'} n+1; 'name' n obj → 'name' n+1"
}
}
},
"PVAR": {
"name": "Population variance",
"description": "Returns the population variance of each column of the statistics matrix ΣDAT; a single column gives a real, several give a vector.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 5. ][ 5. 8. ]] STOΣ"
},
{
"input": "",
"setup": "[[ 2. ][ 4. ][ 9. ]] STOΣ"
}
]
},
"PVARS": {
"name": "Port variables",
"description": "Lists the backup objects and libraries stored in a port, and returns the port's free RAM or its memory type.",
"stack": "n → {list} x_mem",
"examples": [
{
"input": "0.",
"comment": "Port 0 holds nothing; the number is its free memory"
}
]
},
"PVIEW": {
"name": "Picture view",
"description": "Shows the graphics picture on screen positioned at a given corner; an empty list instead shows it with interactive scrolling until a key is pressed.",
"stack": "(x,y) →; {#x #y} →; { } →",
"skip": "shows the graphics picture on screen and waits for keys"
},
"PWRFIT": {
"name": "Power curve fit",
"description": "Selects the power model y = b·x^m for later regressions, stored in ΣPAR.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 2. 4. ]] STOΣ",
"run": "PWRFIT ΣPAR"
}
]
},
"PX→C": {
"name": "Pixel to complex",
"description": "Converts a pixel position in the graphics picture, given as a list {#x #y}, into the user-unit coordinate it represents under PPAR.",
"stack": "{#x #y} → (x,y)",
"examples": [
{
"input": "{ #0d #0d }",
"comment": "Pixel 0, 0 is the plot range's upper-left point"
},
{
"input": "{ #65d #32d }",
"comment": "Pixel 65, 32 is the origin of the default plot window"
}
]
},
"Psi": {
"name": "Digamma",
"description": "Evaluates the digamma function, the logarithmic derivative of the gamma function, for a real or symbolic argument.",
"stack": "x → y; 'symb' → 'symb'",
"examples": [
{
"input": "1."
},
{
"input": "2.5"
}
]
},
"P→R": {
"name": "Polar to rectangular",
"description": "Converts a complex number (r,θ) in polar form to rectangular form (x,y), reading θ in the current angle mode. For a vector, elements 1 and 2 are converted and the rest kept; a real r gives (r,0).",
"stack": "(r,θ) → (x,y); x → (x,0); [r θ ...] → [x y ...]; 'symb' → 'P→R(symb)'",
"examples": [
{
"setup": "DEG",
"input": "(2.,90.)",
"comment": "Radius 2 at 90 degrees"
},
{
"setup": "DEG",
"input": "[ 1. 90. 5. ]"
}
]
},
"QR": {
"name": "QR factorization",
"description": "Factors a rectangular matrix with column pivoting into an orthogonal Q, an upper-trapezoidal R and a permutation P, so that A·P = Q·R.",
"stack": "[[A]] → [[Q]] [[R]] [[P]]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 1. 0. ][ 1. 1. ][ 0. 1. ]]"
}
]
},
"QUAD": {
"name": "Solve quadratic",
"description": "Solves a polynomial equation in a variable symbolically. The 48 models solve to second order and return one equation with the sign placeholder s1; the 49G returns a list of equations, one per root, with complex roots only when flag -103 selects complex results.",
"stack": "'symb' 'name' → 'name=symb' (48); 'symb' 'name' → {'name=root' ...} (49G)",
"examples": [
{
"input": "'X^2-3*X+2' 'X'",
"comment": "s1 is +1 or -1, so the roots are 2 and 1"
},
{
"input": "'X^2+1' 'X'",
"models": [
"48sx",
"48gx"
]
},
{
"input": "'X^2+1' 'X'",
"setup": "-103 SF",
"models": [
"49g"
],
"comment": "Flag -103 selects complex mode, so the roots i and -i are found"
},
{
"input": "'X^2+1' 'X'",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Solves an expression or equation for a variable from its second-order Taylor approximation, which is exact for a quadratic, and returns the solution with the sign placeholder s1.",
"stack": "'symb' 'name' → 'symb''"
}
}
},
"QUOT": {
"name": "Quotient",
"description": "Divides one polynomial by another (Euclidean division) and returns only the quotient.",
"stack": "'p1' 'p2' → 'quot'",
"examples": [
{
"input": "'X^3+2*X+1' 'X-1'"
},
{
"input": "'X^2-1' 'X+1'"
}
]
},
"QUOTE": {
"description": "Returns its argument unchanged and unevaluated; inside an algebraic it shields a subexpression from evaluation, for example within user-defined functions.",
"stack": "obj → obj",
"examples": [
{
"input": "'A+1'",
"run": "QUOTE",
"setup": "5. 'A' STO",
"comment": "A holds 5, yet the expression stays as it is"
},
{
"input": "'A'",
"run": "QUOTE",
"setup": "5. 'A' STO"
}
]
},
"QXA": {
"name": "Quadratic form to matrix",
"description": "Turns a quadratic form in the given variables into its symmetric matrix, leaving the variable vector beside it.",
"stack": "'q' [vars] → [[matrix]] [vars]",
"examples": [
{
"input": "'X^2+X*Y+Y^2' [ 'X' 'Y' ]"
}
]
},
"RAD": {
"name": "Radians mode",
"description": "Selects radians as the angle unit for trigonometric functions and polar displays.",
"stack": "→",
"examples": [
{
"input": "",
"run": "RAD 1. ASIN"
},
{
"input": "",
"run": "RAD 1. SIN"
}
]
},
"RAND": {
"name": "Random number",
"description": "Returns the next pseudo-random real number from the calculator's generator, uniformly between 0 and 1 (exclusive); seed it with RDZ for a repeatable sequence.",
"stack": "→ x",
"examples": [
{
"setup": "123. RDZ",
"input": "",
"comment": "Seed 123 gives the same number every time"
},
{
"setup": "123. RDZ",
"input": "",
"run": "RAND RAND",
"comment": "The second call continues the sequence"
}
]
},
"RANK": {
"description": "Returns the rank of a matrix, i.e. how many of its rows or columns are linearly independent, found numerically.",
"stack": "[[matrix]] → n",
"examples": [
{
"input": "[[ 1. 2. ][ 2. 4. ]]"
},
{
"input": "[[ 1. 0. 2. ][ 0. 1. 3. ]]"
}
]
},
"RANM": {
"name": "Random matrix",
"description": "Builds a matrix filled with random integers between -9 and 9, sized either by a {rows columns} list or like an existing matrix. Handy for producing test data; RDZ seeds the generator.",
"stack": "{m n} → [[matrix]]; [[matrix]] → [[matrix']]",
"examples": [
{
"setup": "1. RDZ",
"input": "{ 2. 3. }",
"comment": "Seed 1 makes the values repeatable; 2 rows, 3 columns"
},
{
"setup": "1. RDZ",
"input": "[[ 0. 0. ][ 0. 0. ]]",
"comment": "Only the size of the given matrix is used"
}
]
},
"RATIO": {
"name": "Prefix divide",
"description": "Prefix form of division that the EquationWriter uses when building fractions; it divides like / does.",
"stack": "x y → x/y; 'symb1' 'symb2' → 'symb1/symb2'",
"category": "ALGEBRA",
"examples": [
{
"input": "6. 4."
},
{
"input": "'A' 'B'"
}
]
},
"RCEQ": {
"name": "Recall equation",
"description": "Recalls whatever is stored in EQ, the reserved variable that holds the current equation for plotting and the solver.",
"stack": "→ obj",
"examples": [
{
"input": "",
"setup": "'X^2-1' 'EQ' STO"
}
]
},
"RCI": {
"name": "Multiply row by constant",
"description": "Scales one row of a matrix (row n) by a constant factor, one of the elementary row operations used in Gaussian elimination.",
"stack": "[[matrix]] x n → [[matrix']]; [vector] x n → [vector']",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]] 10. 2.",
"comment": "Multiplies row 2 by 10"
},
{
"input": "[[ 2. 4. ][ 1. 1. ]] 0.5 1.",
"comment": "Multiplies row 1 by 0.5"
}
]
},
"RCIJ": {
"name": "Add multiple of row",
"description": "Adds a multiple of row i to row j of a matrix, leaving row i unchanged; the elimination step of Gaussian reduction.",
"stack": "[[matrix]] x i j → [[matrix']]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]] -3. 1. 2.",
"comment": "Adds -3 times row 1 to row 2"
},
{
"input": "[[ 2. 1. ][ 4. 5. ]] -2. 1. 2.",
"comment": "Adds -2 times row 1 to row 2"
}
]
},
"RCL": {
"name": "Recall",
"description": "Puts a variable's value on the stack as it is, unevaluated, searching the current directory and then its parents.",
"stack": "'name' → obj",
"examples": [
{
"input": "'A'",
"setup": "42. 'A' STO"
},
{
"input": "'P'",
"setup": "« 1. + » 'P' STO"
}
]
},
"RCLALARM": {
"name": "Recall alarm",
"description": "Recalls the alarm with the given index as a list { date time action repeat }.",
"stack": "n → { date time obj x_repeat }",
"examples": [
{
"input": "1.",
"setup": "{ 1.012030 12. \"Meet\" } STOALARM DROP",
"comment": "Alarm 1 comes back as date, time, text and repeat 0"
}
]
},
"RCLF": {
"name": "Recall flags",
"description": "Returns the system and user flag settings as a two-element list of 64-bit binary integers, one bit per flag, flag 1 or -1 in the lowest bit.",
"stack": "→ { #n_sys #n_user }",
"examples": [
{
"input": "",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "",
"run": "RCLF",
"setup": "1. SF 3. SF",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "Flags 1 and 3 set give 5 in the user flag word (1 + 4)"
},
{
"setup": "1. SF 2. CF 3. SF",
"input": "",
"run": "RCLF # 7d AND",
"models": [
"28s"
],
"comment": "Masks the low three flags: 1 and 3 are set, 2 is clear"
}
],
"per_model": {
"28s": {
"description": "Returns the 64 user flags as one binary integer, flag 1 in the lowest bit; with a smaller word size only the low flags come back.",
"stack": "→ #n"
}
}
},
"RCLKEYS": {
"name": "Recall key assignments",
"description": "Returns the current USER-mode key assignments as a list of object/key pairs, beginning with S when the built-in keys stay active.",
"stack": "→ {list}",
"examples": [
{
"input": "",
"setup": "« 1. » 11.1 ASN"
},
{
"input": ""
}
]
},
"RCLMENU": {
"name": "Recall menu number",
"description": "Returns the number of the current menu as a real number (menu.page); a custom menu gives 0.01.",
"stack": "→ x",
"examples": [
{
"input": "",
"setup": "2. MENU",
"comment": "Menu 2, page 1"
},
{
"input": ""
}
]
},
"RCLVX": {
"name": "Recall current variable",
"description": "Returns the name of the CAS main variable, the one held in VX that many CAS commands work in by default.",
"stack": "→ 'name'",
"category": "CAS",
"examples": [
{
"input": "1.",
"run": "RCLVX"
},
{
"input": "'T'",
"run": "STOVX RCLVX"
}
]
},
"RCLΣ": {
"name": "Recall statistics data",
"description": "Recalls the current statistics matrix stored in ΣDAT.",
"stack": "→ [[matrix]]",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 4. ]] STOΣ"
}
]
},
"RCWS": {
"name": "Recall word size",
"description": "Returns the current binary integer word size (1 to 64 bits) as a real number.",
"stack": "→ n",
"examples": [
{
"input": ""
},
{
"setup": "16. STWS",
"input": ""
}
]
},
"RDM": {
"name": "Redimension",
"description": "Redimensions an array to the dimensions given in a list, refilling it in row order; missing elements become zero and extra ones are dropped. A name argument redimensions the stored array in place.",
"stack": "[array] {dims} → [array]'; 'name' {dims} →",
"examples": [
{
"input": "[ 1. 2. 3. 4. ] { 2. 2. }",
"comment": "A 2 by 2 matrix, filled row by row"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]] { 3. }",
"comment": "A single size gives a vector; the fourth element is dropped"
}
]
},
"RDZ": {
"name": "Randomize",
"description": "Seeds the random number generator used by RAND with the given real; a seed of 0 picks a seed from the system clock, any other seed makes the following RAND sequence repeatable.",
"stack": "x →",
"examples": [
{
"input": "123.",
"run": "RDZ RAND"
},
{
"input": "123.",
"run": "RDZ RAND 123. RDZ RAND"
}
]
},
"RE": {
"name": "Real part",
"description": "Extracts the real component of a complex value, or of every element of a complex array; a real argument comes back unchanged.",
"stack": "z → x; [array] → [real array]; x → x; 'symb' → 'RE(symb)'",
"examples": [
{
"input": "(3.,4.)"
},
{
"input": "[ (1.,2.) (3.,4.) ]"
}
]
},
"RECN": {
"name": "Receive renamed",
"description": "Receives one file from a Kermit sender and stores it under the given name.",
"stack": "'name' →; \"str\" →",
"skip": "talks over the serial or IR port"
},
"RECT": {
"name": "Rectangular mode",
"description": "Switches the coordinate mode to rectangular, so vectors and complex numbers are entered and shown as Cartesian components (clears flag -16).",
"stack": "→",
"examples": [
{
"input": "",
"setup": "SPHERE",
"run": "RECT -15. FS? -16. FS?",
"comment": "After SPHERE, RECT clears flag -16 and leaves -15 set"
}
]
},
"RECV": {
"name": "Receive",
"description": "Receives one file from a Kermit sender and stores it under the name the sender gives.",
"stack": "→",
"skip": "talks over the serial or IR port"
},
"REF": {
"name": "Row echelon form",
"description": "Reduces a matrix to row echelon form (upper triangular, leading entries 1) by Gaussian elimination.",
"stack": "[[matrix]] → [[matrix]]",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]"
},
{
"input": "[[ 2. 1. ][ 4. 3. ]]"
}
]
},
"REMAINDER": {
"description": "Divides one polynomial by another (Euclidean division) and returns only the remainder.",
"stack": "'p1' 'p2' → 'rem'",
"examples": [
{
"input": "'X^3+2*X+1' 'X-1'"
},
{
"input": "'X^2+1' 'X+2'"
}
]
},
"RENAME": {
"description": "Undocumented command of the 49G ROM library 221 related to renaming objects; its exact arguments are not confirmed here and it is not meant for direct use.",
"stack": "obj obj →",
"category": "MEMORY",
"skip": "undocumented command whose argument order is not confirmed"
},
"REORDER": {
"description": "Rearranges a polynomial as powers of the given variable, ordered increasing or decreasing as the CAS power-order setting says.",
"stack": "'symb' 'name' → 'symb'",
"category": "ALGEBRA",
"examples": [
{
"input": "'A^2+X*A+X^2' 'X'"
}
]
},
"REPEAT": {
"description": "Ends the test clause of a WHILE loop and starts its body; it consumes the test value and leaves the loop when that value is zero.",
"stack": "test →",
"skip": "part of the WHILE structure; see WHILE for an example"
},
"REPL": {
"name": "Replace",
"description": "Overwrites part of a string, list or graphics object with another one of the same type, starting at the given position (or pixel coordinate for grobs); the length of the target does not change except where the replacement runs past its end.",
"stack": "\"str\" n \"new\" → \"str'\"; {list} n {new} → {list'}; grob1 c grob2 → grob1'",
"examples": [
{
"input": "\"HELLO\" 2. \"AX\"",
"comment": "Overwrites from the 2nd character"
},
{
"input": "{ 1. 2. 3. 4. } 3. { 8. 9. }",
"comment": "Overwrites from the 3rd element"
}
]
},
"RES": {
"name": "Resolution",
"description": "Sets the plotting resolution in PPAR, the step between sampled values of the independent variable; 0 means one sample per pixel column.",
"stack": "x →; #n →",
"examples": [
{
"input": "0.5",
"run": "RES PPAR",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "#2d",
"run": "RES PPAR",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "A binary integer sets the resolution in pixels"
},
{
"input": "2.",
"run": "RES PPAR",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Sets the plot resolution, the fourth item of PPAR: 1 plots a point in each pixel column, 2 in one column of two, and so on.",
"stack": "n →"
}
}
},
"RESTORE": {
"description": "Replaces the whole HOME directory with what a backup object holds, given directly or as :n:name; the calculator then restarts.",
"stack": "backup →; :n:name →",
"skip": "replaces HOME and restarts the calculator; see ARCHIVE"
},
"RESULTANT": {
"description": "Computes the resultant of two polynomials in the current variable, which is zero exactly when they share a common root.",
"stack": "'symb1' 'symb2' → x",
"examples": [
{
"input": "'X^2-1' 'X-2'"
},
{
"input": "'X^2-1' 'X-1'",
"comment": "Both have the root 1, so the result is 0"
}
]
},
"REVLIST": {
"name": "Reverse list",
"description": "Returns a list with its elements in reverse order.",
"stack": "{list} → {list'}",
"examples": [
{
"input": "{ 1. 2. 3. }"
},
{
"input": "{ \"A\" 'B' 3. }"
}
]
},
"REWRITE": {
"description": "Opens the CAS menu or selection list of rewriting commands (expansion, collection, exponential and logarithm conversions).",
"stack": "→",
"category": "CAS",
"skip": "opens a menu or a selection screen"
},
"RISCH": {
"name": "Risch integration",
"description": "Finds an antiderivative of an expression in a given variable using the Risch algorithm.",
"stack": "'symb' 'name' → 'symb''",
"examples": [
{
"input": "'X*EXP(X)' 'X'"
},
{
"input": "'1/(T^2+1)' 'T'"
}
]
},
"RKF": {
"name": "Runge-Kutta-Fehlberg solve",
"description": "Integrates an initial value problem y'=f(t,y) with the adaptive Runge-Kutta-Fehlberg method up to a final t, leaving the stored t and y variables at that point.",
"stack": "{ 't' 'y' f } tol t_final → { 't' 'y' f } tol y; { 't' 'y' f } { tol h } t_final → { 't' 'y' f } tol y",
"examples": [
{
"input": "{ T Y '-Y' } .00001 1.",
"setup": "0. 'T' STO 1. 'Y' STO",
"run": "RKF Y",
"comment": "y' = -y with y=1 at t=0, solved to t=1 within .00001"
}
]
},
"RKFERR": {
"name": "Runge-Kutta-Fehlberg error estimate",
"description": "For one Runge-Kutta-Fehlberg step of size h from the current t and y, returns the change in y and the estimated absolute error, without advancing the variables.",
"stack": "{ 't' 'y' f } h → { 't' 'y' f } h dy error",
"examples": [
{
"input": "{ T Y '-Y' } .5",
"setup": "0. 'T' STO 1. 'Y' STO",
"comment": "One step of size .5 from t=0, y=1"
}
]
},
"RKFSTEP": {
"name": "Runge-Kutta-Fehlberg step",
"description": "Takes one adaptive Runge-Kutta-Fehlberg step of y'=f(t,y) from the current stored t and y, shrinking the trial step if needed to meet the tolerance, and returns the suggested next step.",
"stack": "{ 't' 'y' f } tol h → { 't' 'y' f } tol h_next t y",
"examples": [
{
"input": "{ T Y '-Y' } .00001 .5",
"setup": "0. 'T' STO 1. 'Y' STO",
"run": "RKFSTEP T Y"
}
]
},
"RL": {
"name": "Rotate left",
"description": "Rotates the bits of a binary integer one place to the left within the current word size; the bit pushed out at the top comes back in at the bottom.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#81h"
},
{
"input": "#8000000000000001h",
"comment": "The top bit wraps to the bottom"
}
]
},
"RLB": {
"name": "Rotate left byte",
"description": "Rotates a binary integer left by eight bits (one byte) within the current word size, wrapping the top byte around to the bottom.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#1234h"
},
{
"input": "#AB00000000000000h",
"comment": "The top byte wraps to the bottom"
}
]
},
"RND": {
"name": "Round",
"description": "Rounds a number to n decimal places for n from 0 to 11, or to |n| significant digits for n from -1 to -11; n = 12 leaves the number as is. Works element-wise on arrays and on complex numbers.",
"stack": "x n → y; z n → z'; [array] n → [array]'",
"examples": [
{
"input": "3.14159 2.",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "12345.678 -3.",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "A negative count rounds to 3 significant digits"
},
{
"input": "[ 1.234 5.678 ] 1.",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"setup": "2. FIX",
"input": "3.14159",
"run": "RND STD",
"models": [
"28s"
]
},
{
"setup": "1. SCI",
"input": "12345.678",
"run": "RND STD",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Rounds a number to the current display format: n FIX rounds to n decimal places, n SCI and n ENG to n+1 significant digits, and STD leaves it unchanged. Works element-wise on complex numbers and arrays.",
"stack": "x → y; z → z'; [array] → [array]'; 'symb' → 'RND(symb)'"
}
}
},
"RNRM": {
"name": "Row norm",
"description": "Computes an array's row norm (also called the infinity norm): the largest sum of absolute values across any row; for a vector it is the largest absolute element.",
"stack": "[array] → x",
"examples": [
{
"input": "[[ 1. -2. ][ 3. 4. ]]"
},
{
"input": "[ 1. -5. 3. ]"
}
]
},
"ROLL": {
"description": "Moves the object at the given stack level up to level 1, shifting the objects above it down by one.",
"stack": "objn … obj1 n → objn-1 … obj1 objn",
"examples": [
{
"input": "1. 2. 3. 4. 4.",
"comment": "Rolls the 4 levels: the 1 from level 4 comes down to level 1"
}
]
},
"ROLLD": {
"name": "Roll down",
"description": "Takes the object from level 1 down to the given stack level, shifting the objects in between up by one; the inverse of ROLL.",
"stack": "objn … obj1 n → obj1 objn … obj2",
"examples": [
{
"input": "1. 2. 3. 4. 4."
}
]
},
"ROMUPLOAD": {
"name": "ROM upload",
"description": "Transfers the operating system to another calculator over the serial cable, for cloning or upgrading its ROM.",
"stack": "→",
"category": "I/O",
"skip": "talks over the serial port and waits for the receiving calculator"
},
"ROOT": {
"description": "Searches numerically for a value of a variable that makes an expression or program zero (or balances an equation), starting from one guess or a list of guesses; the root is also stored in the variable.",
"stack": "'symb' 'name' guess → x; prog 'name' guess → x; 'symb' 'name' {guesses} → x",
"examples": [
{
"input": "'X^2-2' 'X' 1."
},
{
"input": "'COS(X)=X' 'X' 0.",
"setup": "RAD"
},
{
"input": "'X^3-X-1' 'X' { 1. 2. }"
}
]
},
"ROT": {
"name": "Rotate",
"description": "Rotates the top three stack levels so that the third object moves to the top.",
"stack": "obj1 obj2 obj3 → obj2 obj3 obj1",
"examples": [
{
"input": "1. 2. 3."
}
]
},
"ROW+": {
"name": "Insert row",
"description": "Inserts a vector as a new row at position n of a matrix, shifting the following rows down; n may be one past the last row to append. On a vector it inserts a number as element n.",
"stack": "[[matrix]] [row] n → [[matrix']]; [vector] x n → [vector']",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]] [ 5. 6. ] 2."
},
{
"input": "[[ 1. 2. ]] [ 3. 4. ] 2."
},
{
"input": "[ 1. 3. ] 2. 2."
}
]
},
"ROW-": {
"name": "Delete row",
"description": "Removes row n from a matrix and returns the shortened matrix together with the removed row as a vector. On a vector it removes and returns element n.",
"stack": "[[matrix]] n → [[matrix']] [row]; [vector] n → [vector'] x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]] 2."
},
{
"input": "[ 7. 8. 9. ] 1."
}
]
},
"ROW→": {
"name": "Rows to matrix",
"description": "Assembles a matrix from a count and that many row vectors on the stack, the first row deepest. With plain numbers instead of vectors it makes a single column vector.",
"stack": "[row1] ... [rown] n → [[matrix]]; x1 ... xn n → [vector]",
"examples": [
{
"input": "[ 1. 2. ] [ 3. 4. ] 2."
},
{
"input": "5. 6. 7. 3."
}
]
},
"RPL>": {
"description": "Internal command of the development tools; not meant for direct use.",
"stack": "→",
"category": "PRG",
"skip": "internal command with undocumented behaviour"
},
"RR": {
"name": "Rotate right",
"description": "Rotates the bits of a binary integer one place to the right within the current word size; the lowest bit wraps around into the highest position.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#2h"
},
{
"input": "#1h",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "The lowest bit wraps to the top"
},
{
"setup": "8. STWS",
"input": "#1h",
"models": [
"28s"
],
"comment": "In an 8-bit word the lowest bit wraps to 128"
}
]
},
"RRB": {
"name": "Rotate right byte",
"description": "Rotates a binary integer right by eight bits (one byte) within the current word size, moving the low byte up to the top.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#1234h",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "#12h",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"setup": "16. STWS",
"input": "#1234h",
"run": "RRB HEX →STR",
"models": [
"28s"
],
"comment": "In a 16-bit word the two bytes swap"
}
]
},
"RREF": {
"name": "Reduced row echelon form",
"description": "Row-reduces a matrix by Gauss-Jordan elimination until it is in reduced row echelon form, useful for reading off the solution of an augmented system.",
"stack": "[[A]] → [[A']]",
"examples": [
{
"input": "[[ 1. 2. 5. ][ 3. 4. 6. ]]"
},
{
"input": "[[ 1. 2. ][ 2. 4. ]]"
}
]
},
"RREFMOD": {
"name": "Reduced row echelon form modulo",
"description": "Row-reduces a matrix to reduced echelon form using arithmetic modulo the current CAS modulus.",
"stack": "[[array]] → [[array]]",
"category": "ARITH MODUL",
"examples": [
{
"input": "[[ 1 2 ][ 3 4 ]]",
"setup": "7 MODSTO"
}
]
},
"RRK": {
"name": "Rosenbrock and Runge-Kutta solve",
"description": "Integrates an initial value problem y'=f(t,y) up to a final t with the Rosenbrock and Runge-Kutta-Fehlberg methods, using supplied partial derivatives of f; suited to stiff equations.",
"stack": "{ 't' 'y' f fy ft } tol t_final → { 't' 'y' f fy ft } tol y; { 't' 'y' f fy ft } { tol h } t_final → { 't' 'y' f fy ft } tol y",
"examples": [
{
"input": "{ T Y '-Y' -1. 0. } .00001 1.",
"setup": "0. 'T' STO 1. 'Y' STO",
"run": "RRK Y",
"comment": "The partial derivatives of -Y, -1 and 0, extend the list"
}
]
},
"RRKSTEP": {
"name": "Rosenbrock or Runge-Kutta step",
"description": "Takes one adaptive step of y'=f(t,y) from the stored t and y, choosing between Runge-Kutta-Fehlberg (1) and Rosenbrock (2); returns the next step size and the method it used.",
"stack": "{ 't' 'y' f fy ft } tol h last → { 't' 'y' f fy ft } tol h_next current t y",
"examples": [
{
"input": "{ T Y '-Y' -1. 0. } .00001 .1 0.",
"setup": "0. 'T' STO 1. 'Y' STO",
"run": "RRKSTEP T Y"
}
]
},
"RSBERR": {
"name": "Rosenbrock error estimate",
"description": "For one Rosenbrock step of size h from the current t and y, returns the change in y and the estimated absolute error, without advancing the variables.",
"stack": "{ 't' 'y' f fy ft } h → { 't' 'y' f fy ft } h dy error",
"examples": [
{
"input": "{ T Y '-Y' -1. 0. } .1",
"setup": "0. 'T' STO 1. 'Y' STO"
}
]
},
"RSD": {
"name": "Residual",
"description": "Computes the residual B - A·Z of a linear system A·Z = B, given the right-hand side B, the coefficient matrix A and a trial solution Z; useful for checking or refining a solution.",
"stack": "[B] [[A]] [Z] → [B-AZ]",
"examples": [
{
"input": "[ 3. 5. ] [[ 1. 1. ][ 1. 2. ]] [ 1. 1. ]",
"comment": "Level 3 is B, level 2 is A, level 1 the trial solution Z"
},
{
"input": "[ 3. 5. ] [[ 1. 1. ][ 1. 2. ]] [ 1. 2. ]",
"comment": "Z solves the system exactly, so the residual is zero"
}
]
},
"RSWP": {
"name": "Row swap",
"description": "Exchanges two rows of a matrix, or two elements of a vector, given their indices.",
"stack": "[[matrix]] i j → [[matrix']]; [vector] i j → [vector']",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]] 1. 3."
},
{
"input": "[ 1. 2. 3. ] 1. 2."
}
]
},
"RULES": {
"description": "Brings up the menu of algebraic rearrangement rules for the subexpression selected in the EquationWriter, such as commuting, distributing or merging terms.",
"stack": "→",
"category": "ALGEBRA",
"skip": "works only inside the EquationWriter's interactive subexpression selection"
},
"R~SB": {
"name": "Real to system binary",
"description": "Converts a real number to a system binary integer, or a system binary back to a real; needs library 256 attached.",
"stack": "x → sb; sb → x",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "5."
},
{
"setup": "256. ATTACH",
"input": "5.",
"run": "R~SB R~SB"
}
]
},
"R→B": {
"name": "Real to binary",
"description": "Turns a non-negative real into a binary integer, rounding to an integer first; values beyond the word size become the largest representable binary integer.",
"stack": "n → #n",
"examples": [
{
"input": "255."
},
{
"input": "10.6",
"comment": "10.6 is rounded to 11 first"
}
]
},
"R→C": {
"name": "Real to complex",
"description": "Combines a real and an imaginary part into a complex number; applied to two real arrays of equal size it builds a complex array element by element.",
"stack": "x y → (x,y); [array1] [array2] → [carray]",
"examples": [
{
"input": "3. 4."
},
{
"input": "[ 1. 2. ] [ 3. 4. ]"
}
]
},
"R→D": {
"name": "Radians to degrees",
"description": "Converts an angle in radians to degrees, independent of the current angle mode.",
"stack": "x → x·180/π; 'symb' → 'R→D(symb)'",
"examples": [
{
"input": "1."
},
{
"input": "3.14159265359"
}
]
},
"R→I": {
"name": "Real to integer",
"description": "Turns a real number with no fractional part into an exact integer; applied to a symbolic expression, it converts such reals inside it.",
"stack": "x → n; 'symb' → 'symb'",
"examples": [
{
"input": "7."
},
{
"input": "'X^2.+3.'"
}
]
},
"R→P": {
"name": "Rectangular to polar",
"description": "Converts a complex number from rectangular form (x,y) to polar form (r,θ), with the angle in the current angle mode. A real x becomes (x,0).",
"stack": "x → (x,0); (x,y) → (r,θ); 'symb' → 'R→P(symb)'",
"examples": [
{
"setup": "RAD",
"input": "(3.,4.)"
},
{
"setup": "DEG",
"input": "(0.,2.)",
"comment": "Straight up: radius 2 at 90 degrees"
}
]
},
"SAME": {
"description": "Compares two objects of any type for identity and returns 1 or 0; unlike ==, it never produces a symbolic result.",
"stack": "obj1 obj2 → 0/1",
"examples": [
{
"input": "\"AB\" \"AB\""
},
{
"input": "'X' 'Y'",
"comment": "Different names give 0, not a symbolic result"
},
{
"input": "{ 1. } { 1. }"
}
]
},
"SBRK": {
"name": "Serial break",
"description": "Sends a serial break signal over the serial port.",
"stack": "→",
"skip": "talks over the serial port"
},
"SB~B": {
"name": "System binary to binary",
"description": "Converts a system binary integer to a user binary integer, or a user binary integer back to a system binary; needs library 256 attached.",
"stack": "sb → #n; #n → sb",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "#2Ah"
},
{
"setup": "256. ATTACH",
"input": "5.",
"run": "R~SB SB~B"
}
]
},
"SCALE": {
"description": "Sets the plot ranges so that each axis has the given number of user units per 10 pixels, keeping the current centre; stored in PPAR.",
"stack": "x y →",
"examples": [
{
"input": "2. 1.",
"run": "SCALE PPAR",
"comment": "2 units per 10 pixels in x, 1 in y"
}
]
},
"SCALEH": {
"name": "Scale height",
"description": "Multiplies the vertical extent of the plot window by a factor, keeping its center fixed; the new range is written into PPAR.",
"stack": "x →",
"category": "PLOT",
"examples": [
{
"input": "2.",
"run": "SCALEH PPAR"
}
]
},
"SCALEW": {
"name": "Scale width",
"description": "Multiplies the horizontal extent of the plot window by a factor, keeping its center fixed; the new range is written into PPAR.",
"stack": "x →",
"category": "PLOT",
"examples": [
{
"input": "0.5",
"run": "SCALEW PPAR"
}
]
},
"SCATRPLOT": {
"name": "Draw scatter plot",
"description": "Draws a scatter plot of the independent against the dependent column of ΣDAT into the graphics picture.",
"stack": "→",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"SCATTER": {
"name": "Scatter plot type",
"description": "Selects the scatter plot type, which draws each data point of the two chosen columns of ΣDAT as a dot.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "SCATTER PPAR"
}
]
},
"SCHUR": {
"name": "Schur decomposition",
"description": "Computes the Schur decomposition A = Q·T·TRN(Q) of a square matrix: Q is orthogonal (unitary for complex input) and T is upper triangular, or block upper triangular for real matrices with complex eigenvalues.",
"stack": "[[A]] → [[Q]] [[T]]",
"examples": [
{
"input": "[[ 2. 1. ][ 1. 2. ]]"
},
{
"input": "[[ 0. -1. ][ 1. 0. ]]"
}
]
},
"SCI": {
"name": "Scientific mode",
"description": "Sets scientific display: one digit before the point, the given number of decimals, and an exponent.",
"stack": "n →",
"examples": [
{
"input": "2.",
"run": "SCI 1234.5 →STR",
"comment": "Two decimals; 1234.5 is rounded to 1.23E3"
},
{
"input": "4.",
"run": "SCI 0.000123456 →STR",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "4.",
"run": "SCI .000123456 →STR",
"models": [
"28s"
]
}
]
},
"SCLΣ": {
"name": "Scale to statistics data",
"description": "Rescales the plot window in PPAR so that the data of the chosen ΣDAT columns fit for a scatter plot.",
"stack": "→",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 8. ][ 5. 4. ]] STOΣ",
"run": "SCLΣ PPAR",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"setup": "[[ 1. 2. ][ 3. 8. ][ 5. 4. ]] STOΣ",
"input": "",
"run": "SCLΣ PPAR 1 2 SUB",
"models": [
"28s"
]
}
]
},
"SCONJ": {
"name": "Store conjugate",
"description": "Conjugates the value held in a named variable and keeps the result in that variable.",
"stack": "'name' →",
"examples": [
{
"input": "'Z'",
"run": "SCONJ Z",
"setup": "(3.,4.) 'Z' STO"
}
]
},
"SCROLL": {
"description": "Shows an object full screen in a viewer that can be scrolled with the arrow keys.",
"stack": "obj →",
"category": "PRG OUT",
"skip": "opens an interactive viewer that waits for keys"
},
"SDEV": {
"name": "Standard deviation",
"description": "Returns the sample standard deviation of every column of ΣDAT, as a real for single-column data or a vector otherwise.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"run": "SDEV",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"SEND": {
"description": "Transfers one variable, or each variable in a list, to another Kermit device.",
"stack": "'name' →; {list} →",
"skip": "talks over the serial or IR port"
},
"SEQ": {
"name": "Sequence",
"description": "Generates a list by evaluating an expression or program for each value of an index variable running from a start to an end value in a given step.",
"stack": "'symb' 'name' start end step → {list}; prog 'name' start end step → {list}",
"examples": [
{
"input": "'K^2' 'K' 1. 5. 1."
},
{
"input": "« K 10. * » 'K' 0. 1. 0.25",
"comment": "K runs from 0 to 1 in steps of 0.25"
}
]
},
"SEQTAB": {
"name": "Sequence table",
"description": "Opens the table view of a sequence plot, listing indices with the corresponding terms.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"SERIAL": {
"description": "Returns a string that identifies the ROM build of the calculator. Part of the development library.",
"stack": "→ \"str\"",
"category": "PRG DEV",
"examples": [
{
"input": "",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"SERIES": {
"description": "Computes a series expansion of an expression at a point to a chosen order, returning a list with the limit, an equivalent, the expansion and the error order, plus the increment variable used.",
"stack": "'symb' 'X=a' n → {list} 'symb'",
"examples": [
{
"input": "'EXP(X)' 'X' 3."
},
{
"input": "'LN(X)' 'X=1' 3."
}
]
},
"SERVER": {
"description": "Puts the calculator into Kermit server mode, waiting for commands from the other device.",
"stack": "→",
"skip": "talks over the serial or IR port and waits for the user"
},
"SEVAL": {
"name": "Evaluate variables",
"description": "Replaces the variables of an expression that exist in the current path by their values, without evaluating the expression as a whole.",
"stack": "'symb' → 'symb'",
"category": "ALGEBRA",
"examples": [
{
"input": "'A+X'",
"setup": "5 'A' STO"
}
]
},
"SF": {
"name": "Set flag",
"description": "Sets a flag; positive numbers address the user flags 1 to 64, negative numbers the system flags that control modes such as angle units and number formats.",
"stack": "n →",
"examples": [
{
"input": "",
"run": "3. SF 3. FS?",
"comment": "Sets flag 3, then tests it: 1 means set"
},
{
"input": "",
"run": "-40. SF -40. FS?",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"description": "Sets one of the 64 flags. Programs may use flags 1 to 30 freely; flags 31 to 64 control modes such as angle units, number formats and the binary word size.",
"stack": "n →"
}
}
},
"SHOW": {
"description": "Expands an expression by replacing names (except the ones listed) with their variable contents until the given name appears explicitly.",
"stack": "'symb' 'name' → 'symb''; 'symb' {names} → 'symb''",
"examples": [
{
"input": "'A*B' 'X'",
"setup": "'X+1' 'B' STO",
"comment": "B is replaced by its contents, X stays as a name"
}
],
"per_model": {
"28s": {
"description": "Expands an expression by replacing names with their variable contents until the given name appears explicitly.",
"stack": "'symb' 'name' → 'symb''"
}
}
},
"SIDENS": {
"name": "Silicon intrinsic density",
"description": "Gives the intrinsic carrier density of silicon, in carriers per cubic centimetre, at a temperature in kelvins.",
"stack": "T → x",
"examples": [
{
"input": "300."
},
{
"input": "400._K"
}
]
},
"SIGMA": {
"name": "Discrete antiderivative",
"description": "Finds a discrete antiderivative of an expression in a named variable, the summation counterpart of an indefinite integral.",
"stack": "'symb' 'name' → 'symb'",
"examples": [
{
"input": "'X^2' 'X'"
},
{
"input": "'2^K' 'K'"
}
]
},
"SIGMAVX": {
"name": "Discrete antiderivative in the current variable",
"description": "Finds a discrete antiderivative with respect to the current CAS variable: a function F with F(X+1)-F(X) equal to the given expression, useful for closed-form sums.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'X'"
},
{
"input": "'X^2'"
}
]
},
"SIGN": {
"description": "For a real number gives -1, 0 or 1 according to its sign; for a complex number gives the unit vector in its direction (the number divided by its magnitude).",
"stack": "x → -1|0|1; z → z/|z|; 'symb' → 'SIGN(symb)'",
"examples": [
{
"input": "-7.2"
},
{
"input": "0."
},
{
"input": "(3.,4.)",
"comment": "The unit vector: (3,4) divided by its length, 5"
}
]
},
"SIGNTAB": {
"name": "Sign table",
"description": "Tabulates where a rational function in the current CAS variable changes sign, returning a list that alternates the boundary points with the sign of the function between them.",
"stack": "'symb' → {list}",
"examples": [
{
"input": "'X^2-1'"
},
{
"input": "'(X-2)/(X+1)'"
}
]
},
"SIMP2": {
"name": "Simplify fraction",
"description": "Divides two objects by their greatest common divisor, giving the reduced numerator and denominator of their ratio.",
"stack": "obj1 obj2 → obj1' obj2'",
"examples": [
{
"input": "12 18",
"comment": "12/18 reduces to 2/3: both numbers are divided by 6"
},
{
"input": "'X^2-1' 'X^2-2*X+1'"
}
]
},
"SIMPLIFY": {
"description": "Applies the CAS simplification rules to an expression to bring it into a simpler equivalent form.",
"stack": "'symb' → 'symb'",
"examples": [
{
"input": "'SIN(X)^2+COS(X)^2'"
},
{
"input": "'(X^2-1)/(X-1)'"
}
]
},
"SIN": {
"name": "Sine",
"description": "Sine of an angle, read in whichever angle mode is active (degrees, radians or grads); complex arguments and algebraics are accepted too.",
"stack": "x → sin x; z → sin z; 'symb' → 'SIN(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "30.",
"setup": "DEG"
},
{
"input": "1.",
"setup": "RAD"
},
{
"input": "'X'"
}
]
},
"SINCOS": {
"name": "To sines and cosines",
"description": "Converts complex exponentials and logarithms in an expression into sines, cosines and arguments.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'EXP(i*X)'"
}
]
},
"SINH": {
"name": "Hyperbolic sine",
"description": "Computes the hyperbolic sine of a real or complex argument; symbolic arguments give a symbolic result.",
"stack": "x → sinh x; z → sinh z; 'symb' → 'SINH(symb)'",
"examples": [
{
"input": "1."
},
{
"input": "(0.,1.)"
},
{
"input": "'X'"
}
]
},
"SINV": {
"name": "Store inverse",
"description": "Takes the reciprocal of the value held in a named variable and stores it back in place.",
"stack": "'name' →",
"examples": [
{
"input": "'A'",
"run": "SINV A",
"setup": "4. 'A' STO"
}
]
},
"SIZE": {
"description": "Measures an object: the character count of a string, the element count of a list or algebraic, the dimensions of an array as a list, or the width and height of a graphics object as binary integers.",
"stack": "\"str\" → n; {list} → n; [array] → {dims}; grob → #w #h",
"examples": [
{
"input": "\"HELLO\""
},
{
"input": "{ 1. 2. 3. }"
},
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]",
"comment": "Rows, then columns"
},
{
"input": "'A+B*C'",
"models": [
"28s"
],
"comment": "Counts A, B, C and the two operators"
}
],
"per_model": {
"28s": {
"description": "Measures an object: the character count of a string, the element count of a list, the dimensions of an array as a list, or the number of objects in an algebraic.",
"stack": "\"str\" → n; {list} → n; [array] → {dims}; 'symb' → n"
}
}
},
"SL": {
"name": "Shift left",
"description": "Logical left shift by one bit: the low bit is filled with zero and anything moving past the word size is lost; equivalent to doubling modulo the word size.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#5h"
},
{
"input": "#8000000000000000h",
"comment": "The highest bit falls off the end, leaving 0"
}
]
},
"SLB": {
"name": "Shift left byte",
"description": "Moves a binary integer's bits eight places to the left (one byte), filling the low byte with zeros and dropping bits beyond the word size.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#12h"
},
{
"input": "#ABCDh"
}
]
},
"SLOPEFIELD": {
"name": "Slope field plot type",
"description": "Selects the slope-field plot as the current plot type, drawing short line segments whose slopes show a first-order differential equation y'(x,y) across the view.",
"stack": "→",
"examples": [
{
"input": "",
"run": "SLOPEFIELD PPAR"
}
]
},
"SNEG": {
"name": "Store negate",
"description": "Negates the value held in a named variable and stores it back in place.",
"stack": "'name' →",
"examples": [
{
"input": "'A'",
"run": "SNEG A",
"setup": "4. 'A' STO"
},
{
"input": "'V'",
"run": "SNEG V",
"setup": "[ 1. -2. ] 'V' STO"
}
]
},
"SNRM": {
"name": "Spectral norm",
"description": "Spectral norm of an array: for a vector, its Euclidean length; for a matrix, its biggest singular value.",
"stack": "[array] → x",
"examples": [
{
"input": "[ 3. 4. ]"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
}
]
},
"SOLVE": {
"description": "Finds the values of a variable that satisfy an equation (or make an expression zero) and returns them as a list; also accepts a vector of equations with a vector of variables. In exact mode it may return an empty list when only approximate roots exist.",
"stack": "'eq' 'var' → {solutions}; [eqs] [vars] → {solutions}",
"examples": [
{
"input": "'X^2-4=0' 'X'"
},
{
"input": "'X^2-5*X+6' 'X'"
}
]
},
"SOLVEQN": {
"name": "Start equation solver",
"description": "Loads an Equation Library set selected by subject and title numbers and starts the matching solver; the third argument says whether to show the picture first.",
"stack": "n_subject n_title 0/1 →",
"skip": "starts the interactive solver and changes the menu and current directory variables"
},
"SOLVER": {
"description": "Opens the CAS menu of symbolic and numeric equation-solving commands.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"SOLVETAB": {
"name": "Solver table",
"description": "Opens the table view associated with the solver.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"SOLVEVX": {
"name": "Solve for the current variable",
"description": "Finds the values of the current CAS variable that satisfy an equation, or make an expression zero, and returns them.",
"stack": "'symb' → {solutions}",
"examples": [
{
"input": "'X^2-4=0'"
},
{
"input": "'X^2-3*X+2'"
}
]
},
"SORT": {
"description": "Sorts a list of reals, strings, names or binary integers into ascending order; the elements must all be of one comparable type.",
"stack": "{list} → {sorted}",
"examples": [
{
"input": "{ 3. 1. 2. }"
},
{
"input": "{ \"PEAR\" \"APPLE\" \"FIG\" }"
}
]
},
"SPHERE": {
"name": "Spherical mode",
"description": "Switches the coordinate mode to spherical, so three-element vectors are shown as radius and two angles (sets flags -15 and -16).",
"stack": "→",
"examples": [
{
"input": "",
"run": "SPHERE -15. FS? -16. FS?"
}
]
},
"SQ": {
"name": "Square",
"description": "Squares its argument; for a square matrix it returns the matrix product of the matrix with itself.",
"stack": "x → x^2; z → z^2; [[matrix]] → [[matrix]]'; 'symb' → 'SQ(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "3."
},
{
"input": "(1.,1.)"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
}
]
},
"SR": {
"name": "Shift right",
"description": "Logical right shift by one bit: the top is filled with zero and the lowest bit is lost, so it halves the value rounding down.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#Ah"
},
{
"input": "#1h"
}
]
},
"SRAD": {
"name": "Spectral radius",
"description": "For a square matrix, returns its spectral radius: the largest absolute value any of its eigenvalues has.",
"stack": "[[matrix]] → x",
"examples": [
{
"input": "[[ 2. 0. ][ 0. -3. ]]"
},
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
}
]
},
"SRB": {
"name": "Shift right byte",
"description": "Moves a binary integer's bits eight places to the right (one byte), filling the top byte with zeros and discarding the low byte.",
"stack": "#n1 → #n2",
"examples": [
{
"input": "#1234h"
},
{
"input": "#FFh"
}
]
},
"SRECV": {
"name": "Serial receive",
"description": "Reads up to n characters waiting in the serial receive buffer, returning them with 1 on success or 0 on error or timeout.",
"stack": "n → \"str\" 0/1",
"skip": "talks over the serial port"
},
"SREPL": {
"name": "String replace",
"description": "Searches a string for every occurrence of a substring and replaces each with another string, returning the new string and how many replacements were made.",
"stack": "\"str\" \"find\" \"repl\" → \"str'\" n",
"examples": [
{
"input": "\"ABCABC\" \"B\" \"XY\"",
"comment": "Both Bs are replaced; the count 2 is on level 1"
},
{
"input": "\"HELLO\" \"Z\" \"Q\"",
"comment": "Nothing found: the string is unchanged and the count is 0"
}
]
},
"SREV": {
"name": "String reverse",
"description": "Reverses the order of the characters in a string; needs library 256 attached.",
"stack": "\"str\" → \"str\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"ABC\""
}
]
},
"START": {
"description": "Opens a counted loop start finish START body NEXT (or STEP) that runs the body once for each count from start to finish without exposing a loop variable. Only valid inside programs.",
"stack": "start finish →",
"examples": [
{
"input": "1.",
"run": "« 1. 5. START 2. * NEXT » EVAL",
"comment": "Runs the loop 5 times, doubling each time"
}
]
},
"STAT2TAB": {
"name": "Two-variable statistics table",
"description": "Opens the table view for two-variable statistics data.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"STATTAB": {
"name": "Statistics table",
"description": "Opens the table view for one-variable statistics data.",
"stack": "→",
"category": "PLOT",
"skip": "opens an interactive table screen"
},
"STD": {
"name": "Standard mode",
"description": "Restores the standard display format, which shows numbers with all significant digits and no trailing zeros.",
"stack": "→",
"examples": [
{
"input": "",
"run": "STD 1.23456 →STR",
"setup": "2. FIX"
},
{
"input": "",
"run": "STD 1.E15 →STR"
}
]
},
"STEP": {
"description": "Ends a FOR or START loop, taking the increment for the counter from the stack before deciding whether to repeat.",
"stack": "x →",
"skip": "fragment of FOR ... STEP or START ... STEP; see FOR for a complete example"
},
"STEQ": {
"name": "Store equation",
"description": "Stores an object in the reserved variable EQ, which the plotter and the solver use as the current equation.",
"stack": "obj →",
"examples": [
{
"input": "'X^2-4=0'",
"run": "STEQ 'EQ' RCL"
},
{
"input": "{ 'A+B=C' 'A-B=1' }",
"run": "STEQ 'EQ' RCL"
}
]
},
"STIME": {
"name": "Serial timeout",
"description": "Sets the serial transmit and receive timeout in seconds (0 to 25.4; 0 waits forever); it does not affect Kermit.",
"stack": "x →",
"skip": "configures serial port timing"
},
"STO": {
"name": "Store",
"description": "Puts an object into a variable of the current directory, creating the variable or replacing its contents.",
"stack": "obj 'name' →",
"category": "Keyboard",
"examples": [
{
"input": "42. 'A'",
"run": "STO A"
},
{
"input": "{ 1. 2. } 'L'",
"run": "STO L"
}
]
},
"STO*": {
"name": "Store times",
"description": "Multiplies what a variable holds by an object and stores the product back; the arguments may come in either order.",
"stack": "obj 'name' →; 'name' obj →",
"examples": [
{
"input": "3. 'A'",
"run": "STO* A",
"setup": "4. 'A' STO"
}
]
},
"STO+": {
"name": "Store plus",
"description": "Adds an object to the value held in a variable and stores the sum back; the arguments may come in either order.",
"stack": "obj 'name' →; 'name' obj →",
"examples": [
{
"input": "5. 'A'",
"run": "STO+ A",
"setup": "4. 'A' STO"
},
{
"input": "'L' 3.",
"run": "STO+ L",
"setup": "{ 1. 2. } 'L' STO",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"setup": "[ 1. 2. ] 'V' STO",
"input": "'V' [ 3. 4. ]",
"run": "STO+ V",
"models": [
"28s"
]
}
],
"per_model": {
"28s": {
"description": "Adds a value (number or array) to what a variable holds and stores the sum back; the arguments may come in either order.",
"stack": "z 'name' →; 'name' z →; [array] 'name' →; 'name' [array] →"
}
}
},
"STO-": {
"name": "Store minus",
"description": "Subtracts and stores back into a variable: with the name in level 2 it computes contents minus obj, with the name in level 1 obj minus contents.",
"stack": "'name' obj →; obj 'name' →",
"examples": [
{
"input": "'A' 1.",
"run": "STO- A",
"setup": "4. 'A' STO",
"comment": "A minus 1 (name in level 2)"
},
{
"input": "10. 'A'",
"run": "STO- A",
"setup": "4. 'A' STO",
"comment": "10 minus A (name in level 1)"
}
]
},
"STO/": {
"name": "Store divide",
"description": "Divides and stores back into a variable: with the name in level 2 it computes contents divided by obj, with the name in level 1 obj divided by contents.",
"stack": "'name' obj →; obj 'name' →",
"examples": [
{
"input": "'A' 2.",
"run": "STO/ A",
"setup": "8. 'A' STO",
"comment": "A divided by 2 (name in level 2)"
},
{
"input": "2. 'A'",
"run": "STO/ A",
"setup": "8. 'A' STO",
"comment": "2 divided by A (name in level 1)"
}
]
},
"STOALARM": {
"name": "Store alarm",
"description": "Adds an alarm to the system's alarm list and returns the new alarm's index; the argument is a time (today), a list { date time }, or a list adding an action (string to show or program to run) and a repeat interval in ticks.",
"stack": "time → n; { date time } → n; { date time obj } → n; { date time obj x_repeat } → n",
"examples": [
{
"input": "{ 1.012030 12. \"Meet\" }",
"comment": "Date 1 January 2030, time 12:00, text Meet; the result is the alarm's index"
},
{
"input": "{ 1.012030 9.3 }",
"comment": "Date 1 January 2030, time 9:30"
}
]
},
"STOF": {
"name": "Store flags",
"description": "Sets all flag states from a binary integer (system flags only) or from a { #sys #user } list of binary integers, as RCLF returns them.",
"stack": "#n_sys →; { #n_sys #n_user } →",
"examples": [
{
"input": "{ #FF0h #5h }",
"run": "STOF RCLF",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "#FF0h keeps the word size and base flags set; #5h sets user flags 1 and 3"
},
{
"input": "#FF0h",
"run": "STOF RCLF",
"setup": "1. SF",
"models": [
"48sx",
"48gx",
"49g"
],
"comment": "Only the system flags change: user flag 1 stays set"
},
{
"input": "#5h",
"run": "STOF 1 FS? 2 FS? 3 FS?",
"models": [
"28s"
],
"comment": "The binary integer 5 sets flags 1 and 3 and leaves 2 clear"
}
],
"per_model": {
"28s": {
"description": "Sets all 64 flags from the bits of a binary integer, as RCLF returns it: the lowest bit is flag 1, and missing high bits clear their flags.",
"stack": "#n →"
}
}
},
"STOKEYS": {
"name": "Store key assignments",
"description": "Replaces or adds USER-mode key assignments from a list of object/key pairs; a leading S in the list restores the built-in key definitions first.",
"stack": "{ obj x_key ... } →; 'S' →",
"examples": [
{
"input": "{ « 2. » 11.1 }",
"run": "STOKEYS RCLKEYS"
}
]
},
"STORE": {
"description": "Stores a value in a named variable, like STO; kept for compatibility with the HP 40G CAS syntax.",
"stack": "obj 'name' →",
"category": "MEMORY",
"examples": [
{
"input": "5. 'A'",
"run": "STORE A"
}
]
},
"STOVX": {
"name": "Set current variable",
"description": "Sets the CAS main variable, stored in VX, to the given name.",
"stack": "'name' →",
"category": "CAS",
"examples": [
{
"input": "'T'",
"run": "STOVX RCLVX"
}
]
},
"STOΣ": {
"name": "Store statistics data",
"description": "Stores a matrix (one row per data point) in the reserved variable ΣDAT, making it the current statistics data.",
"stack": "[[matrix]] →",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]",
"run": "STOΣ RCLΣ"
}
]
},
"STREAM": {
"description": "Folds a list with a two-argument program: it applies the program to the first two elements, then to that result together with the third, and so on, leaving the final value.",
"stack": "{list} prog → obj",
"examples": [
{
"input": "{ 1. 2. 3. 4. } « * »",
"comment": "Multiplies the elements one after another"
},
{
"input": "{ 3. 9. 2. } « MAX »",
"comment": "Keeps the larger of each pair"
}
]
},
"STRM": {
"description": "Internal command of the ROM; not meant for direct use.",
"stack": "→",
"category": "Internal",
"skip": "internal command with undocumented arguments"
},
"STR→": {
"name": "String to object",
"description": "Treats the string as command-line text: compiles it and evaluates the result, so it can create objects or run commands from text. Superseded by OBJ→ but still accepted.",
"stack": "\"str\" → result",
"category": "PRG OBJ",
"examples": [
{
"input": "\"2. 3. +\""
},
{
"input": "\"{ 1. 2. }\""
}
],
"per_model": {
"28s": {
"description": "Treats the string as command-line text: compiles it and evaluates the result, so it can create objects or run commands from text.",
"stack": "\"str\" → result"
}
}
},
"STURM": {
"name": "Sturm sequence",
"description": "Computes the Sturm sequence of a polynomial, used to count its real roots in an interval.",
"stack": "'symb' → {list}",
"examples": [
{
"input": "'X^3-2*X'"
}
]
},
"STURMAB": {
"name": "Sturm root count",
"description": "Uses the Sturm sequence of a polynomial to count its real roots between two bounds; it also returns the polynomial's value at the lower bound.",
"stack": "'symb' a b → f(a) n",
"examples": [
{
"input": "'X^2-2' 0 2",
"comment": "One root between 0 and 2; the polynomial is -2 at 0"
},
{
"input": "'X^2+1' 0 2",
"comment": "No real root between 0 and 2"
}
]
},
"STWS": {
"name": "Set word size",
"description": "Sets the word size used for binary integer arithmetic and display, from 1 to 64 bits; values outside that range are clamped.",
"stack": "n →; #n →",
"examples": [
{
"input": "16.",
"run": "STWS RCWS"
},
{
"input": "8.",
"run": "STWS #1FFh",
"comment": "With 8 bits, 1FF is cut to FF"
}
],
"per_model": {
"28s": {
"description": "Sets the word size used for binary integer arithmetic and display, from 1 to 64 bits; values outside that range are clamped.",
"stack": "n →"
}
}
},
"SUB": {
"name": "Subset",
"description": "Extracts the part of a string or list between two positions, both inclusive; for a graphics object it cuts out the rectangle between two corner coordinates.",
"stack": "\"str\" n1 n2 → \"sub\"; {list} n1 n2 → {sub}; grob c1 c2 → grob'",
"examples": [
{
"input": "\"HELLO\" 2. 4.",
"comment": "The 2nd to 4th character"
},
{
"input": "{ 1. 2. 3. 4. 5. } 2. 3.",
"comment": "The 2nd and 3rd elements"
}
],
"per_model": {
"28s": {
"description": "Extracts the part of a string or list between two positions, both inclusive.",
"stack": "\"str\" n1 n2 → \"sub\"; {list} n1 n2 → {sub}"
}
}
},
"SUBST": {
"name": "Substitute",
"description": "Replaces a variable in an expression by a value or another expression, given as an equation such as X=2, without evaluating the result further.",
"stack": "'symb' 'name=value' → 'symb''",
"examples": [
{
"input": "'X^2+1' 'X=3'"
},
{
"input": "'X^2+Y' 'X=A+1'"
}
]
},
"SUBTMOD": {
"name": "Subtract modulo",
"description": "Subtracts the second expression or integer from the first and reduces the result modulo the current CAS modulus.",
"stack": "obj1 obj2 → obj",
"examples": [
{
"input": "'X^2+3*X+6' '9*X+3'",
"setup": "7 MODSTO"
},
{
"input": "2 5",
"setup": "7 MODSTO"
}
]
},
"SVD": {
"name": "Singular value decomposition",
"description": "Computes the singular value decomposition A = U·S·V of a rectangular matrix, returning the orthogonal factors U and V and the singular values as a vector.",
"stack": "[[A]] → [[U]] [[V]] [S]",
"examples": [
{
"input": "[[ 3. 0. ][ 0. 4. ]]"
},
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]]"
}
]
},
"SVL": {
"name": "Singular values",
"description": "Computes the singular values of any rectangular matrix and returns them as a vector in decreasing order.",
"stack": "[[A]] → [S]",
"examples": [
{
"input": "[[ 3. 0. ][ 0. 4. ]]"
},
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]]"
}
]
},
"SWAP": {
"description": "Exchanges the top two stack objects.",
"stack": "obj1 obj2 → obj2 obj1",
"examples": [
{
"input": "1. \"A\""
}
]
},
"SYLVESTER": {
"name": "Sylvester's law of inertia",
"description": "For a symmetric matrix A, finds a diagonal D, returned as the vector of its diagonal, and a matrix P such that A equals the transpose of P times D times P.",
"stack": "[[A]] → [diag] [[P]]",
"examples": [
{
"input": "[[ 1 2 ][ 2 1 ]]"
},
{
"input": "[[ 2 1 ][ 1 3 ]]"
}
]
},
"SYSEVAL": {
"name": "Evaluate system object",
"description": "Executes the system object found at the given ROM or RAM address, bypassing all argument checks. Only meant for addresses published for a specific ROM version; a wrong address can corrupt memory.",
"stack": "#n →",
"category": "PRG CTRL",
"skip": "jumps into an arbitrary system address; results depend on the ROM version and a wrong address can crash or clear memory"
},
"SYST2MAT": {
"name": "System to matrix",
"description": "Converts a system of linear equations and its list of unknowns into the augmented coefficient matrix of the system.",
"stack": "[eqs] [vars] → [[A]]",
"examples": [
{
"input": "[ 'X+Y=3' 'X-Y=1' ] [ 'X' 'Y' ]",
"comment": "The last column holds the constants moved to the left side: -3 and -1"
}
]
},
"S~N": {
"name": "String to name",
"description": "Converts a string into a global name with the same characters, or a name back into a string. Part of the development library, which must be attached first.",
"stack": "\"str\" → 'name'; 'name' → \"str\"",
"category": "PRG DEV",
"examples": [
{
"input": "\"ABC\"",
"setup": "256. ATTACH",
"models": [
"49g"
]
},
{
"input": "'XY'",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"S→H": {
"name": "String to hex",
"description": "Converts a string to the hexadecimal digits of its characters in nibble order, two digits per character; needs library 256 attached.",
"stack": "\"str\" → \"hex\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"AB\"",
"comment": "A is 41 and B is 42 in hexadecimal, each with its two digits in reverse order"
}
]
},
"TABVAL": {
"name": "Table of values",
"description": "Evaluates an expression in the current variable at each value of a list, returning the expression and a list pairing the inputs with the results.",
"stack": "'symb' {list} → 'symb' {list}",
"examples": [
{
"input": "'X^2+1' { 1 2 3 }"
}
]
},
"TABVAR": {
"name": "Variation table",
"description": "Works out the variation table of a rational function in the current CAS variable: where it rises or falls and its values at the turning points, with a picture of the table.",
"stack": "'symb' → 'symb' {list} grob",
"skip": "shows the variation table in a viewer that waits for a key"
},
"TAIL": {
"description": "Returns a list without its first element, or a string without its first character.",
"stack": "{list} → {list'}; \"str\" → \"str'\"",
"examples": [
{
"input": "{ 1. 2. 3. }"
},
{
"input": "\"ABC\""
}
]
},
"TAN": {
"name": "Tangent",
"description": "Tangent of an angle in the current angle mode, for reals, complex numbers and algebraics.",
"stack": "x → tan x; z → tan z; 'symb' → 'TAN(symb)'",
"category": "Keyboard",
"examples": [
{
"input": "45.",
"setup": "DEG"
},
{
"input": "0.5",
"setup": "RAD"
}
]
},
"TAN2CS2": {
"name": "Tangent to double-angle sine and cosine",
"description": "Rewrites tangents in an expression in terms of the sine and cosine of the doubled angle.",
"stack": "'symb' → 'symb'",
"category": "TRIGO",
"examples": [
{
"input": "'TAN(X)'"
}
]
},
"TAN2SC": {
"name": "Tangent to sine over cosine",
"description": "Replaces each tangent in an expression by the quotient of the sine and cosine of the same argument.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'TAN(X)'"
},
{
"input": "'TAN(2*X)+1'"
}
]
},
"TAN2SC2": {
"name": "Tangent to double-angle sine and cosine",
"description": "Replaces each tangent in an expression by an expression in the sine and cosine of the doubled argument.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'TAN(X)'"
}
]
},
"TANH": {
"name": "Hyperbolic tangent",
"description": "Computes the hyperbolic tangent of a real or complex argument; symbolic arguments give a symbolic result.",
"stack": "x → tanh x; z → tanh z; 'symb' → 'TANH(symb)'",
"examples": [
{
"input": "0.5"
},
{
"input": "(1.,1.)"
}
]
},
"TAYLOR0": {
"name": "Taylor polynomial at 0",
"description": "Expands an expression into a Taylor polynomial around 0 in the current CAS variable, to relative order 4.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'EXP(X)'"
},
{
"input": "'COS(X)'"
}
]
},
"TAYLR": {
"name": "Taylor polynomial",
"description": "Computes the Taylor polynomial of an expression about zero in a variable, up to a given order.",
"stack": "'symb' 'name' n → 'symb''",
"examples": [
{
"input": "'EXP(X)' 'X' 3."
},
{
"input": "'SIN(X)' 'X' 5.",
"setup": "RAD"
}
]
},
"TCHEBYCHEFF": {
"name": "Chebyshev polynomial",
"description": "Builds the Chebyshev polynomial of the first kind of degree n in the current CAS variable, as an exact symbolic expression.",
"stack": "n → 'symb'",
"category": "ARITH POLY",
"examples": [
{
"input": "4"
},
{
"input": "3"
}
]
},
"TCOLLECT": {
"name": "Trigonometric collect",
"description": "Linearizes a trigonometric expression and then combines sines and cosines of the same angle into compact terms.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)*COS(X)'"
},
{
"input": "'SIN(X)+COS(X)'"
}
]
},
"TDELTA": {
"name": "Temperature delta",
"description": "Subtracts an initial temperature from a final one and returns the difference as a temperature increment, so offset scales such as °C and °F are handled correctly; with units the result carries the first argument's unit.",
"stack": "x y → x_delta; x_unit1 y_unit2 → x_unit1delta",
"examples": [
{
"input": "100._°C 50._°F",
"comment": "100 °C minus 50 °F is a difference of 90 °C"
},
{
"input": "25. 20."
}
]
},
"TEACH": {
"name": "Teaching examples",
"description": "Copies a set of programming, plotting and solver demonstration programs from ROM into a new EXAMPLES directory under HOME.",
"stack": "→",
"category": "MEMORY",
"skip": "fills HOME with a ROM examples directory; listed among the interactive teaching commands"
},
"TESTS": {
"description": "Menu-entry word of the CAS that brings up the menu of test and comparison commands.",
"stack": "→",
"category": "PRG TEST",
"skip": "opens a menu screen"
},
"TEVAL": {
"name": "Timed evaluation",
"description": "Evaluates an object and also returns how long the evaluation took, in seconds, tagged with s.",
"stack": "obj → result :s:x",
"category": "PRG",
"examples": [
{
"input": "« 1. 2. + »"
}
]
},
"TEXPAND": {
"name": "Transcendental expand",
"description": "Expands trigonometric, hyperbolic, exponential and logarithmic functions of sums and multiples into functions of the single terms.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(2*X)'"
},
{
"input": "'EXP(X+Y)'"
}
]
},
"TEXT": {
"description": "Switches the screen back from the graphics picture to the normal stack display.",
"stack": "→",
"skip": "only changes which screen is shown"
},
"THEN": {
"description": "Separates the test clause from the clause that runs when the test is true in IF, IFERR and CASE structures; it consumes the test value.",
"stack": "test →",
"skip": "part of the IF / IFERR / CASE structures; see IF for an example",
"per_model": {
"28s": {
"description": "Ends the test clause of an IF structure and takes the test value from the stack, or ends the trap clause of an IFERR structure. The clause after it runs when the test is true or an error occurred.",
"stack": "test →"
}
}
},
"TI1M": {
"name": "t interval, one mean",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Student t interval for one mean. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"TI2M": {
"name": "t interval, two means",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Student t interval for the gap between two means. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"TICKS": {
"name": "System clock ticks",
"description": "Returns the system clock as a binary integer counting ticks of 1/8192 second; differences of two readings time an operation.",
"stack": "→ #n",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "TICKS TICKS SWAP -"
}
]
},
"TIME": {
"description": "Returns the current time of the system clock as a real number in HH.MMSSss form, 24-hour.",
"stack": "→ time",
"examples": [
{
"input": "",
"run": "TIME",
"setup": "1.012030 →DATE 12.3 →TIME",
"comment": "After setting 12:30 the clock has run a few seconds"
}
]
},
"TINC": {
"name": "Temperature increment",
"description": "Raises a temperature by an increment, treating the second argument as a temperature difference rather than an absolute temperature; with units the result carries the first argument's unit.",
"stack": "x y_delta → x'; x_unit1 y_unit2 → x_unit1'",
"examples": [
{
"input": "20._°C 15._K",
"comment": "A rise of 15 K is a rise of 15 °C"
},
{
"input": "68._°F 10._°C",
"comment": "A rise of 10 °C is 18 °F, so 68 becomes 86"
}
]
},
"TLIN": {
"name": "Trigonometric linearize",
"description": "Linearizes a trigonometric expression, turning products and powers of sines and cosines into sums of sines and cosines of multiple angles.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)^2'"
},
{
"input": "'COS(X)*COS(Y)'"
}
]
},
"TLINE": {
"name": "Toggle line",
"description": "Draws a line between two points of the graphics picture by inverting each pixel it crosses, so drawing it twice removes it.",
"stack": "(x1,y1) (x2,y2) →; {#x1 #y1} {#x2 #y2} →",
"skip": "draws into the graphics picture and returns nothing to the stack"
},
"TMENU": {
"name": "Temporary menu",
"description": "Shows a temporary custom menu built from a list of names, commands or { label action } pairs, or selects a built-in menu by number, without changing the CST variable.",
"stack": "{list} →; x →; 'name' →",
"examples": [
{
"input": "{ A B }",
"run": "TMENU RCLMENU",
"comment": "A custom menu reads as .01"
}
]
},
"TOT": {
"name": "Total",
"description": "Returns the column sums of ΣDAT, as a real for single-column data or a vector otherwise.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"run": "TOT",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"TRACE": {
"description": "Sums the main diagonal elements of a square matrix (its trace).",
"stack": "[[matrix]] → x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ (1.,1.) 0. ][ 0. (2.,-3.) ]]"
}
]
},
"TRAN": {
"name": "Transpose",
"description": "Transposes a matrix, swapping rows and columns without conjugating complex entries.",
"stack": "[[matrix]] → [[matrix]]",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]"
},
{
"input": "[[ 'A' 'B' ][ 'C' 'D' ]]"
}
]
},
"TRANSIO": {
"name": "I/O translation",
"description": "Selects the character translation used for ASCII transfers and serial printing (0 to 3) and stores it in IOPAR.",
"stack": "n →",
"category": "I/O",
"examples": [
{
"input": "2.",
"run": "TRANSIO IOPAR",
"comment": "The translation code, 2, is the last element of IOPAR"
}
]
},
"TRIG": {
"name": "Trigonometric simplify",
"description": "Simplifies trigonometric expressions using sin²+cos²=1 and rewrites trigonometric terms consistently.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)^2+COS(X)^2'"
},
{
"input": "'1-SIN(X)^2'"
}
]
},
"TRIGCOS": {
"name": "Trigonometric simplify to cosines",
"description": "Simplifies a trigonometric expression using sin²+cos²=1, preferring cosine terms in the result.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)^2+COS(X)'"
}
]
},
"TRIGO": {
"name": "Trigonometry menu",
"description": "Opens the CAS menu of trigonometric rewriting commands.",
"stack": "→",
"category": "CAS",
"skip": "opens a menu screen"
},
"TRIGSIN": {
"name": "Trigonometric simplify to sines",
"description": "Simplifies a trigonometric expression using sin²+cos²=1, preferring sine terms in the result.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'COS(X)^2+SIN(X)'"
}
]
},
"TRIGTAN": {
"name": "Trigonometric rewrite to tangents",
"description": "Rewrites the sines and cosines in a trigonometric expression in terms of tangents.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)^2'"
},
{
"input": "'COS(X)^2'"
}
]
},
"TRN": {
"name": "Transpose",
"description": "Transposes a matrix, swapping rows and columns; complex matrices are also conjugated. A name argument transposes the stored matrix in place.",
"stack": "[[matrix]] → [[matrix]]ᵀ; 'name' →",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]"
},
{
"input": "[[ (1.,1.) 2. ][ 3. 4. ]]",
"comment": "Complex entries are conjugated: (1,1) becomes (1,-1)"
}
]
},
"TRNC": {
"name": "Truncate",
"description": "Truncates a number to n decimal places, or to |n| significant digits when n is negative, cutting off the remaining digits instead of rounding.",
"stack": "x n → y; z n → z'; [array] n → [array]'",
"examples": [
{
"input": "3.14159 2."
},
{
"input": "12345.678 -3.",
"comment": "A negative count keeps 3 significant digits"
}
]
},
"TRUNC": {
"name": "Truncate series",
"description": "Cuts a series expansion short by dropping every term whose order is at least that of the second argument.",
"stack": "'symb1' 'symb2' → 'symb'",
"category": "CALC LIMIT",
"examples": [
{
"input": "'1+X+X^2+X^3+X^4' 'X^3'"
}
]
},
"TRUTH": {
"name": "Truth plot type",
"description": "Selects the truth plot type, which turns on every pixel where the comparison or logical expression in EQ is true.",
"stack": "→",
"category": "PLOT",
"examples": [
{
"input": "",
"run": "TRUTH PPAR"
}
]
},
"TSIMP": {
"name": "Transcendental simplify",
"description": "Simplifies an expression containing exponential, logarithmic and trigonometric functions by rewriting them through complex exponentials.",
"stack": "'symb' → 'symb''",
"examples": [
{
"input": "'SIN(X)^2+COS(X)^2'"
},
{
"input": "'EXP(2*X)/EXP(X)'"
}
]
},
"TSTR": {
"name": "Date and time string",
"description": "Formats a date and a time as a readable string with weekday, date and time, following the date and clock format flags.",
"stack": "date time → \"str\"",
"examples": [
{
"input": "1.012030 12.3",
"comment": "1 January 2030 at 12:30"
},
{
"input": "7.041991 18.4512",
"comment": "4 July 1991 at 18:45:12, shown on a 12-hour clock"
}
]
},
"TVARS": {
"name": "Typed variables",
"description": "Lists the variables in the directory you are in whose contents have the given object type, or any type from a list of types.",
"stack": "n → {list}; {list_n} → {list}",
"examples": [
{
"input": "0.",
"setup": "1. 'A' STO \"x\" 'S' STO",
"comment": "Type 0 is real: only A is listed"
},
{
"input": "{ 0. 2. }",
"setup": "1. 'A' STO \"x\" 'S' STO",
"comment": "Types 0 (real) and 2 (string)"
}
]
},
"TVM": {
"name": "Time value of money",
"description": "Opens the time-value-of-money solver menu, where loan and savings variables (PV, PMT, FV, N, I%YR, PYR) are entered and solved for.",
"stack": "→",
"category": "SOLVE TVM",
"skip": "only displays the interactive TVM solver menu"
},
"TVMBEG": {
"name": "Payments at beginning of period",
"description": "Switches TVM calculations to payments made at the start of every period (annuity due) by setting flag -14.",
"stack": "→",
"category": "SOLVE TVM",
"examples": [
{
"input": "-14.",
"run": "TVMBEG FS?"
}
]
},
"TVMEND": {
"name": "Payments at end of period",
"description": "Switches TVM calculations to payments made when every period ends (ordinary annuity, the default) by clearing flag -14.",
"stack": "→",
"category": "SOLVE TVM",
"examples": [
{
"setup": "-14. SF",
"input": "-14.",
"run": "TVMEND FS?"
}
]
},
"TVMROOT": {
"name": "Time value of money root",
"description": "Solves for the named TVM variable (N, I%YR, PV, PMT or FV) from the values stored in the other TVM variables, honouring the payment mode in flag -14.",
"stack": "'name' → x",
"examples": [
{
"setup": "12. 'PYR' STO 36. 'N' STO 6. 'I%YR' STO 1E4 'PV' STO",
"input": "0. 'FV' STO 'PMT'",
"comment": "Loan of 10000, 36 payments, 6% a year, 12 payments a year; solves PMT"
}
]
},
"TYPE": {
"description": "Returns a number identifying the kind of object in level 1, for example 0 for a real, 1 for complex, 2 for a string, 5 for a list, 6 for a global name, 9 for an algebraic and 10 for a binary integer. Programs use it to branch on argument type.",
"stack": "obj → n",
"examples": [
{
"input": "1."
},
{
"input": "\"A\""
},
{
"input": "'X+1'"
}
]
},
"UBASE": {
"name": "Convert to SI base units",
"description": "Rewrites a unit object in SI base units, multiplying out prefixes and derived units.",
"stack": "x_unit → y_base",
"examples": [
{
"input": "1._km"
},
{
"input": "1._N"
},
{
"input": "60._mph"
}
]
},
"UFACT": {
"name": "Factor unit",
"description": "Factors the unit of level 1 out of the unit expression in level 2, so the result is expressed partly in that unit.",
"stack": "x1_u1 x2_u2 → x3_u2*u3",
"examples": [
{
"input": "1._J 1._N",
"comment": "Factors N out of the joule"
},
{
"input": "1._W 1._V"
}
]
},
"UFL1→MINIF": {
"name": "UFL1 font to minifont",
"description": "Converts a font set in UFL1 (Universal Font Library) format into a minifont object, given the font set and a font identifier.",
"stack": "obj n → font",
"category": "DISPLAY",
"skip": "needs a UFL1 font set object, which cannot be typed on the command line"
},
"UNASSIGN": {
"description": "CAS command that removes the values bound to the named variables, so the names act again as free symbols in later computations.",
"stack": "{names} →",
"category": "MEMORY",
"examples": [
{
"setup": "5. 'A' STO",
"input": "{ A }",
"run": "UNASSIGN VARS"
}
]
},
"UNASSUME": {
"description": "Removes assumptions recorded for a variable, returning it to an unconstrained CAS variable; kept from the HP 40G CAS.",
"stack": "'name' → obj",
"category": "CAS",
"examples": [
{
"input": "'X'"
}
]
},
"UNBIND": {
"description": "Discards the local variables most recently created by LOCAL.",
"stack": "→",
"category": "PRG",
"examples": [
{
"input": "{ 'A=2.' }",
"run": "LOCAL UNBIND"
}
]
},
"UNPICK": {
"description": "Takes an object and a level number n and puts the object in place of whatever sits at level n of the remaining stack.",
"stack": "obj n →",
"examples": [
{
"input": "1. 2. 3. 99. 2.",
"comment": "99 replaces the object on level 2, the 2"
}
]
},
"UNROT": {
"name": "Unrotate",
"description": "Rotates the top three stack levels the opposite way to ROT: the object on level 1 moves to level 3 and the other two move up.",
"stack": "x y z → z x y",
"examples": [
{
"input": "1. 2. 3."
}
]
},
"UNTIL": {
"description": "Ends the body of a DO loop and starts its test clause, whose result decides at END whether the loop repeats.",
"stack": "→",
"skip": "part of the DO structure; see DO for an example"
},
"UPDIR": {
"name": "Up directory",
"description": "Moves one level up the directory tree towards HOME, so the enclosing directory becomes current. In HOME it has no effect.",
"stack": "→",
"category": "MEMORY",
"examples": [
{
"input": "",
"setup": "'D' CRDIR D 'E' CRDIR E",
"run": "UPDIR PATH"
}
]
},
"UTPC": {
"name": "Upper chi-square distribution",
"description": "Gives the upper-tail probability of the chi-square distribution with n degrees of freedom: the chance that such a variable exceeds x.",
"stack": "n x → p",
"examples": [
{
"input": "5. 11.07",
"comment": "5 degrees of freedom, upper tail beyond 11.07"
},
{
"input": "1. 3.84"
}
]
},
"UTPF": {
"name": "Upper F distribution",
"description": "Gives the upper-tail probability of the F (Snedecor) distribution with n1 numerator and n2 denominator degrees of freedom: the chance that such a variable exceeds x.",
"stack": "n1 n2 x → p",
"examples": [
{
"input": "5. 10. 3.33",
"comment": "5 and 10 degrees of freedom, value 3.33"
},
{
"input": "2. 20. 1."
}
]
},
"UTPN": {
"name": "Upper normal distribution",
"description": "Gives the upper-tail probability of the normal distribution with mean m and variance v: the chance that such a variable exceeds x.",
"stack": "m v x → p",
"examples": [
{
"input": "0. 1. 1.96",
"comment": "Mean 0, variance 1, value 1.96"
},
{
"input": "100. 225. 115.",
"comment": "Mean 100, variance 225, so 115 is one standard deviation above the mean"
}
]
},
"UTPT": {
"name": "Upper Student's t distribution",
"description": "Gives the upper-tail probability of Student's t distribution with n degrees of freedom: the chance that such a variable exceeds x.",
"stack": "n x → p",
"examples": [
{
"input": "10. 2.228",
"comment": "10 degrees of freedom"
},
{
"input": "5. 0.",
"comment": "At 0 the upper tail is half"
}
]
},
"UVAL": {
"name": "Unit value",
"description": "Strips the unit from a unit object and returns the bare number.",
"stack": "x_unit → x",
"examples": [
{
"input": "3.5_m"
},
{
"input": "12._km/h"
}
]
},
"VANDERMONDE": {
"name": "Vandermonde matrix",
"description": "Builds the n×n Vandermonde matrix for a list of n values: each row holds successive powers 0 to n-1 of one value.",
"stack": "{list} → [[matrix]]",
"examples": [
{
"input": "{ 1. 2. 3. }"
},
{
"input": "{ 'A' 'B' }"
}
]
},
"VAR": {
"name": "Variance",
"description": "Computes the sample variance of each column of the statistics matrix ΣDAT, as a real for one column or a vector for several.",
"stack": "→ x; → [vector]",
"category": "STAT",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 5. ][ 5. 9. ]] STOΣ"
}
]
},
"VARS": {
"name": "Variables",
"description": "Lists the names of every variable in the directory you are in, in menu order.",
"stack": "→ {list}",
"examples": [
{
"input": "",
"setup": "1. 'A' STO 2. 'B' STO"
},
{
"input": ""
}
]
},
"VER": {
"name": "CAS version",
"description": "Returns the version of the computer algebra system, encoded as a real number that includes its release date.",
"stack": "→ x",
"category": "CAS",
"examples": [
{
"input": ""
}
]
},
"VERSION": {
"description": "Returns two strings identifying the ROM: the version label and the copyright notice.",
"stack": "→ \"version\" \"copyright\"",
"category": "MEMORY",
"examples": [
{
"input": ""
}
]
},
"VISIT": {
"description": "Opens the contents of a named variable in the command-line editor and stores the edited result back in that variable.",
"stack": "'name' →",
"category": "PRG",
"skip": "opens an interactive editor and waits for the user"
},
"VISITB": {
"name": "Visit in best editor",
"description": "Opens the contents of a named variable in the editor best suited to its type and stores the edited result back in that variable.",
"stack": "'name' →",
"category": "PRG",
"skip": "opens an interactive editor and waits for the user"
},
"VPOTENTIAL": {
"name": "Vector potential",
"description": "Finds a vector field whose curl equals the given divergence-free field in three variables, the vector potential of that field.",
"stack": "[array] [vars] → [array]",
"category": "CALC",
"examples": [
{
"input": "[ 'X' 'Y' '-(2*Z)' ] [ 'X' 'Y' 'Z' ]"
}
]
},
"VTYPE": {
"name": "Variable type",
"description": "Looks up a variable by name and reports the object type number of its contents, or -1 when no such variable exists.",
"stack": "'name' → n",
"examples": [
{
"input": "'A'",
"setup": "\"text\" 'A' STO"
},
{
"input": "'NOPE'"
}
]
},
"V→": {
"name": "Vector to stack",
"description": "Splits a vector into its elements on the stack. Two- and three-element vectors come out in the current coordinate mode (rectangular, polar or spherical); longer vectors always give their raw elements.",
"stack": "[x y] → x y; [x y z] → x y z; [array] → x1 ... xn",
"examples": [
{
"setup": "RECT",
"input": "[ 3. 4. ]"
},
{
"setup": "RECT",
"input": "[ 1. 2. 3. ]"
},
{
"setup": "DEG CYLIN",
"input": "[ 3. 4. ]",
"comment": "In cylindrical mode a 2-element vector splits into radius and angle (not on the 48SX)"
}
]
},
"WAIT": {
"description": "Pauses execution for the given number of seconds. With 0 (or a negative value) it instead waits for a keypress and returns that key's row-column code.",
"stack": "x →; 0 → key",
"examples": [
{
"input": "0.1"
}
],
"per_model": {
"28s": {
"description": "Pauses a program for the given number of seconds.",
"stack": "x →"
}
}
},
"WHILE": {
"description": "Opens a pre-tested loop WHILE test REPEAT body END: the test clause runs first and the body repeats for as long as the test leaves a nonzero value. Only valid inside programs.",
"stack": "→",
"examples": [
{
"input": "1.",
"run": "« WHILE DUP 100. < REPEAT 2. * END » EVAL",
"comment": "Doubles the value while it is below 100"
}
]
},
"WIREFRAME": {
"name": "Wireframe plot type",
"description": "Selects the wireframe 3D surface plot as the current plot type by putting WIREFRAME into the plot parameters in PPAR.",
"stack": "→",
"examples": [
{
"input": "",
"run": "WIREFRAME PPAR"
}
]
},
"WSLOG": {
"name": "Warmstart log",
"description": "Returns the warmstart log as four strings, the newest last, each holding a cause code and the time stamp of a recent system restart. Helps diagnose why the calculator reset itself.",
"stack": "→ \"str4\" \"str3\" \"str2\" \"str1\"",
"category": "MEMORY",
"examples": [
{
"input": ""
}
]
},
"XCOL": {
"name": "Independent column",
"description": "Chooses which column of ΣDAT serves as the independent variable for the two-variable statistics, recorded in ΣPAR.",
"stack": "n →",
"examples": [
{
"input": "2.",
"run": "XCOL ΣX",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ",
"comment": "Column 2 becomes the x column, so ΣX adds up that column"
}
]
},
"XGET": {
"name": "XModem get",
"description": "Fetches a named variable from an XModem server on the other end of the serial link and stores it in the current directory.",
"stack": "'name' →",
"category": "I/O",
"skip": "talks over the serial port"
},
"XLIB~": {
"name": "Library command conversion",
"description": "Converts between a library command reference (XLIB name) and its library and command numbers, in either direction. Part of the development library.",
"stack": "n1 n2 → xlib; xlib → n1 n2",
"category": "PRG DEV",
"examples": [
{
"input": "788. 1.",
"setup": "256. ATTACH",
"models": [
"49g"
],
"comment": "Library 788, command 1"
}
]
},
"XMIT": {
"name": "Serial transmit",
"description": "Sends a string over the serial port without Kermit, returning 1 on success or the unsent part and 0.",
"stack": "\"str\" → 1; \"str\" → \"rest\" 0",
"skip": "talks over the serial port"
},
"XNUM": {
"name": "To approximate number",
"description": "Turns an exact object, or every object of a list, into its approximate (floating point) value.",
"stack": "obj → obj'; {list} → {list}",
"examples": [
{
"input": "'π/2'"
},
{
"input": "{ '1/3' '√2' }"
}
]
},
"XOR": {
"name": "Exclusive OR",
"description": "Bitwise exclusive OR of two binary integers; for reals it returns 1 when exactly one of the two values is non-zero, else 0. Symbolic arguments give a symbolic expression.",
"stack": "#n1 #n2 → #n3; x y → 0|1; 'symb1' 'symb2' → 'symb1 XOR symb2'",
"examples": [
{
"input": "#Ch #Ah",
"comment": "Binary 1100 XOR 1010 gives 0110"
},
{
"input": "1. 1."
},
{
"input": "1. 0."
}
]
},
"XPON": {
"name": "Exponent",
"description": "Returns the power-of-ten exponent of a real number as it would appear in scientific notation.",
"stack": "x → n; 'symb' → 'XPON(symb)'",
"examples": [
{
"input": "12345."
},
{
"input": "0.00042",
"comment": "4.2E-4 has the exponent -4"
}
]
},
"XPUT": {
"name": "XModem put",
"description": "Sends a named variable to an XModem server on the other end of the serial link.",
"stack": "'name' →",
"category": "I/O",
"skip": "talks over the serial port"
},
"XQ": {
"name": "To exact rational",
"description": "Turns an approximate number, or each number of a list, into the nearest exact rational or simple exact expression.",
"stack": "x → 'symb'; {list} → {list}",
"examples": [
{
"input": "0.3658"
},
{
"input": "1.5"
}
]
},
"XRECV": {
"name": "XModem receive",
"description": "Receives an object over the serial link using the XModem protocol and stores it under the given name.",
"stack": "'name' →",
"skip": "transfers data over the serial port"
},
"XRNG": {
"name": "x-axis range",
"description": "Sets the horizontal plot range in PPAR to the given minimum and maximum, in user units.",
"stack": "x1 x2 →",
"examples": [
{
"input": "-2. 2.",
"run": "XRNG PPAR"
}
]
},
"XROOT": {
"name": "xth root of y",
"description": "Takes the root of index x (level 1) of the value y (level 2). A negative y with an odd integer index gives the real negative root.",
"stack": "y x → y^(1/x); 'symb1' 'symb2' → 'XROOT(symb2,symb1)'",
"category": "Keyboard",
"examples": [
{
"input": "27. 3."
},
{
"input": "-8. 3."
},
{
"input": "'A' 2."
}
]
},
"XSEND": {
"name": "XModem send",
"description": "Sends a variable to another device over the serial link using the XModem protocol.",
"stack": "'name' →",
"skip": "transfers data over the serial port"
},
"XSERV": {
"name": "XModem server",
"description": "Puts the calculator into XModem server mode so a computer can send and fetch variables over the serial link.",
"stack": "→",
"category": "I/O",
"skip": "runs a serial-port server and waits for the host"
},
"XVOL": {
"name": "x volume",
"description": "Sets the left and right x bounds of the view volume used by 3D plot types, storing them in the reserved variable VPAR (created with defaults if missing).",
"stack": "x_left x_right →",
"examples": [
{
"input": "-5. 5.",
"run": "XVOL VPAR",
"comment": "Sets entries 1 and 2 of VPAR, the x bounds"
}
]
},
"XXRNG": {
"name": "x range of input plane",
"description": "Sets the x extent of the input plane (the domain) that GRIDMAP and PARSURFACE plots sample, recording it in the reserved variable VPAR.",
"stack": "x_min x_max →",
"category": "PLOT",
"examples": [
{
"input": "-3. 3.",
"run": "XXRNG VPAR",
"comment": "Sets entries 7 and 8 of VPAR"
}
]
},
"YCOL": {
"name": "Dependent column",
"description": "Chooses which column of ΣDAT serves as the dependent variable for the two-variable statistics, recorded in ΣPAR.",
"stack": "n →",
"examples": [
{
"input": "1.",
"run": "YCOL ΣY",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ",
"comment": "Column 1 becomes the y column, so ΣY adds up that column"
}
]
},
"YRNG": {
"name": "y-axis range",
"description": "Sets the vertical plot range in PPAR to the given minimum and maximum, in user units.",
"stack": "y1 y2 →",
"examples": [
{
"input": "-1. 1.",
"run": "YRNG PPAR"
}
]
},
"YSLICE": {
"name": "Y-slice plot type",
"description": "Selects the y-slice plot as the current plot type, drawing a surface z(x,y) as a series of cross sections taken at successive y values.",
"stack": "→",
"examples": [
{
"input": "",
"run": "YSLICE PPAR"
}
]
},
"YVOL": {
"name": "y volume",
"description": "Sets the near and far y bounds (depth) of the 3D view volume, storing them in the reserved variable VPAR.",
"stack": "y_near y_far →",
"examples": [
{
"input": "-2. 4.",
"run": "YVOL VPAR",
"comment": "Sets entries 3 and 4 of VPAR, the depth"
}
]
},
"YYRNG": {
"name": "y range of input plane",
"description": "Sets the y extent of the input plane (the domain) that GRIDMAP and PARSURFACE plots sample, recording it in the reserved variable VPAR.",
"stack": "y_min y_max →",
"category": "PLOT",
"examples": [
{
"input": "-2. 2.",
"run": "YYRNG VPAR",
"comment": "Sets entries 9 and 10 of VPAR"
}
]
},
"ZEROS": {
"description": "Returns the zeros of an expression in one variable, each listed once without multiplicity; exact or approximate depending on the CAS mode.",
"stack": "'symb' 'var' → {zeros}",
"examples": [
{
"input": "'X^2-5*X+6' 'X'"
},
{
"input": "'X^3-X' 'X'"
}
]
},
"ZFACTOR": {
"name": "Gas compressibility Z factor",
"description": "Computes the gas compressibility factor z from the reduced temperature (1.05 to 3) and reduced pressure (0 to 30), for real-gas corrections to the ideal gas law.",
"stack": "xTr yPr → z",
"examples": [
{
"input": "1.5 2."
},
{
"input": "1.2 0.5"
}
]
},
"ZI1M": {
"name": "Z interval, one mean",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Z interval for one mean. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"ZI1P": {
"name": "Z interval, one proportion",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Z interval for one proportion. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"ZI2M": {
"name": "Z interval, two means",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Z interval for the gap between two means. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"ZI2P": {
"name": "Z interval, two proportions",
"description": "Internal routine of the statistics confidence-interval application; the name points to a Z interval for the gap between two proportions. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics interval forms with undocumented arguments"
},
"ZT1M": {
"name": "Z test, one mean",
"description": "Internal routine of the statistics hypothesis-test application; the name points to a Z test on one mean. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZT1P": {
"name": "Z test, one proportion",
"description": "Internal routine of the statistics hypothesis-test application; the name points to a Z test on one proportion. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZT1U": {
"description": "Internal routine of the statistics hypothesis-test application; not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZT2M": {
"name": "Z test, two means",
"description": "Internal routine of the statistics hypothesis-test application; the name points to a Z test comparing two means. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZT2P": {
"name": "Z test, two proportions",
"description": "Internal routine of the statistics hypothesis-test application; the name points to a Z test comparing two proportions. Not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZT2U": {
"description": "Internal routine of the statistics hypothesis-test application; not meant for direct use.",
"stack": "(undocumented)",
"category": "STAT",
"skip": "internal routine of the statistics test forms with undocumented arguments"
},
"ZVOL": {
"name": "z volume",
"description": "Sets the lower and upper z bounds (height) of the 3D view volume, storing them in the reserved variable VPAR.",
"stack": "z_low z_high →",
"examples": [
{
"input": "0. 10.",
"run": "ZVOL VPAR",
"comment": "Sets entries 5 and 6 of VPAR, the height"
}
]
},
"^": {
"name": "Power",
"description": "Raises level 2 to the power in level 1. A negative real base with a fractional exponent gives a complex result; symbolic arguments give an algebraic.",
"stack": "x y → x^y; z1 z2 → z1^z2; 'symb' y → 'symb^y'",
"category": "Keyboard",
"examples": [
{
"input": "2. 10."
},
{
"input": "-8. 0.5",
"comment": "The square root of -8, so the result is complex"
},
{
"input": "'X' 3."
}
]
},
"_": {
"name": "Attach unit",
"description": "The unit attachment operator: binds a number to a unit expression, as in 3_m. On the stack it combines a value with the unit given in level 1.",
"stack": "x 'unit' → x_unit",
"category": "Keyboard",
"examples": [
{
"input": "3. 'm'"
}
]
},
"asm": {
"name": "Assemble",
"description": "Entry point of the MASD assembler library: assembles a string of source code into an object.",
"stack": "\"str\" → obj",
"category": "MASD",
"skip": "assembler; development tool"
},
"dB": {
"name": "Decibel",
"description": "The decibel, a dimensionless logarithmic unit for ratios such as power or sound level; it does not convert to other units.",
"stack": "→ 1_dB",
"examples": [
{
"input": "3._dB",
"run": "UBASE"
}
]
},
"e": {
"name": "Euler's number",
"description": "Returns the base of natural logarithms, either as the symbol 'e' or, when numeric results or numeric constants are selected, as the real 2.71828182846.",
"stack": "→ 'e'; → x",
"category": "MTH",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "e →NUM"
}
]
},
"er": {
"name": "Assembly errors",
"description": "Error browser of the MASD assembler library, used after an assembly fails to step through the reported errors.",
"stack": "→",
"category": "MASD",
"skip": "opens an interactive error browser for the assembler"
},
"gmol": {
"name": "Gram-mole",
"description": "The gram-mole unit of amount of substance, equal to one mole; used as a unit in unit objects such as 2._gmol.",
"stack": "→ 1_gmol",
"examples": [
{
"input": "2._gmol",
"run": "1._mol CONVERT"
}
]
},
"i": {
"name": "Imaginary unit",
"description": "Returns the imaginary unit, either as the symbol 'i' or, when evaluated numerically, as the complex number (0,1).",
"stack": "→ 'i'; → z",
"category": "MTH",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "i →NUM"
}
]
},
"lbmol": {
"name": "Pound-mole",
"description": "The pound-mole unit of amount of substance, the amount whose mass in pounds equals the molecular weight (about 453.59 moles).",
"stack": "→ 1_lbmol",
"examples": [
{
"input": "1._lbmol",
"run": "1._mol CONVERT"
}
]
},
"lim": {
"name": "Limit",
"description": "Computes the limit of an expression as a variable approaches a point, given as an equation such as X=0 (a bare name means the point 0).",
"stack": "'symb' 'X=a' → 'symb''",
"examples": [
{
"input": "'SIN(X)/X' 'X=0'"
},
{
"input": "'(X^2-1)/(X-1)' 'X=1'"
}
]
},
"qr": {
"name": "QR factorization",
"description": "Factors a matrix exactly as Q times R, where Q is orthogonal and R is upper triangular, using the CAS.",
"stack": "[[A]] → [[Q]] [[R]]",
"examples": [
{
"input": "[[ 1 2 ][ 3 4 ]]"
}
]
},
"rpm": {
"name": "Revolutions per minute",
"description": "The revolutions-per-minute unit of rotational frequency, one sixtieth of a hertz.",
"stack": "→ 1_rpm",
"examples": [
{
"input": "3000._rpm",
"run": "1._Hz CONVERT"
}
]
},
"rref": {
"name": "Reduced row echelon form",
"description": "Row-reduces a matrix until it is in reduced row echelon form and also returns the pivots used, as a list.",
"stack": "[[matrix]] → {pivots} [[matrix]]",
"examples": [
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]"
},
{
"input": "[[ 2. 1. ][ 4. 3. ]]"
}
]
},
"|": {
"name": "Where",
"description": "Substitutes values or expressions for names inside an expression, given as name/value pairs in a list; also usable as the infix operator in algebraic form.",
"stack": "'symb' {name1 obj1 ...} → 'symb''",
"examples": [
{
"input": "'X^2+Y' { X 2. Y 3. }",
"comment": "X is replaced by 2 and Y by 3"
},
{
"input": "'SIN(A)' { A 'B+1' }"
}
]
},
"«": {
"description": "Opening delimiter of a program object; everything up to the matching » is kept unevaluated as one program.",
"stack": "→ prog",
"category": "PRG",
"skip": "a delimiter of program source, not a command that runs on its own"
},
"»": {
"description": "Closing delimiter of a program object, typed to end the program started by «.",
"stack": "→",
"category": "PRG",
"skip": "a delimiter of program source, not a command that runs on its own"
},
"ΔLIST": {
"name": "List differences",
"description": "Returns the list of differences between successive elements of a list of at least two numbers.",
"stack": "{list} → {differences}",
"examples": [
{
"input": "{ 1. 4. 9. 16. }"
},
{
"input": "{ 10. 7. }"
}
]
},
"ΠLIST": {
"name": "List product",
"description": "Multiplies together all elements of a list.",
"stack": "{list} → product",
"examples": [
{
"input": "{ 1. 2. 3. 4. }"
},
{
"input": "{ 0.5 8. }"
}
]
},
"Σ": {
"name": "Summation",
"description": "Sums an expression over an integer index running from a start value to an end value. Symbolic limits leave the sum as an algebraic.",
"stack": "'index' start end 'symb' → x; 'index' start end 'symb' → 'symb''",
"category": "Keyboard",
"examples": [
{
"input": "'N' 1. 10. 'N^2'",
"comment": "The sum of N^2 for N from 1 to 10"
},
{
"input": "'K' 0. 'M' 'K'"
}
]
},
"Σ+": {
"name": "Add data point",
"description": "Adds a row (or rows) to ΣDAT, creating it if needed: a real for one-variable data, a vector or several reals for one row, or a matrix for several rows.",
"stack": "x →; [vector] →; [[matrix]] →",
"examples": [
{
"input": "[ 1. 2. ]",
"run": "Σ+ RCLΣ"
},
{
"input": "5.",
"run": "Σ+ 6. Σ+ RCLΣ",
"comment": "Two single values make a one-column matrix"
},
{
"input": "[ 7. 8. ]",
"run": "Σ+ NΣ",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ",
"comment": "Adds a fourth data row, so NΣ gives 4"
}
],
"per_model": {
"28s": {
"description": "Appends data to the statistics matrix ΣDAT, creating it if needed: a real for one-column data, a vector for one row, or a matrix for several rows.",
"stack": "x →; [vector] →; [[matrix]] →"
}
}
},
"Σ-": {
"name": "Remove data point",
"description": "Removes the last data point (row) from ΣDAT and returns it, a real for one-column data or a vector otherwise. Useful for correcting a wrong entry.",
"stack": "→ x; → [vector]",
"examples": [
{
"input": "",
"setup": "[[ 1. 2. ][ 3. 4. ]] STOΣ",
"run": "Σ- RCLΣ"
}
]
},
"ΣLINE": {
"name": "Regression line",
"description": "Returns the fitted line from ΣPAR as an algebraic in the independent variable, ready for plotting or evaluation.",
"stack": "→ 'symb'",
"examples": [
{
"input": "",
"run": "ΣLINE",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ LR"
}
]
},
"ΣLIST": {
"name": "List sum",
"description": "Adds up all elements of a list.",
"stack": "{list} → sum",
"examples": [
{
"input": "{ 1. 2. 3. 4. }"
},
{
"input": "{ (1.,2.) 3. }"
}
]
},
"ΣX": {
"name": "Sum of x",
"description": "Adds up the independent-column entries of ΣDAT.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "ΣX",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"ΣX*Y": {
"name": "Sum of x times y",
"description": "Multiplies each independent value in ΣDAT by its matching dependent value and returns the total.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "ΣX*Y",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"ΣX2": {
"name": "Sum of x squared",
"description": "Sums the squared entries of the independent-variable (XCOL) column of the statistics matrix ΣDAT.",
"stack": "→ x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]]",
"run": "STOΣ ΣX2"
}
]
},
"ΣXY": {
"name": "Sum of x times y",
"description": "Sums the products, row by row, of the two ΣDAT columns that XCOL and YCOL choose.",
"stack": "→ x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]]",
"run": "STOΣ ΣXY"
}
]
},
"ΣX^2": {
"name": "Sum of x squared",
"description": "Squares each independent-column entry of ΣDAT and returns the total.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "ΣX^2",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"ΣY": {
"name": "Sum of y",
"description": "Adds up the dependent-column entries of ΣDAT.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "ΣY",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"ΣY2": {
"name": "Sum of y squared",
"description": "Sums the squared entries of the dependent-variable (YCOL) column of the statistics matrix ΣDAT.",
"stack": "→ x",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ][ 5. 6. ]]",
"run": "STOΣ ΣY2"
}
]
},
"ΣY^2": {
"name": "Sum of y squared",
"description": "Squares each dependent-column entry of ΣDAT and returns the total.",
"stack": "→ x",
"examples": [
{
"input": "",
"run": "ΣY^2",
"setup": "[[ 1. 2. ][ 2. 4.1 ][ 3. 5.9 ]] STOΣ"
}
]
},
"π": {
"name": "Pi",
"description": "Returns the constant pi, either as the symbol 'π' or, when numeric results or numeric constants are selected, as the 12-digit real 3.14159265359.",
"stack": "→ 'π'; → x",
"category": "Keyboard",
"examples": [
{
"input": ""
},
{
"input": "",
"run": "π →NUM"
}
]
},
"↑MATCH": {
"name": "Match and replace, bottom up",
"description": "Rewrites an expression with a pattern and replacement (optionally a condition), matching subexpressions from the innermost outward; & names are wildcards. Returns the result and 1 if anything changed, else 0.",
"stack": "'symb' {'pat' 'repl'} → 'symb'' 0/1; 'symb' {'pat' 'repl' 'cond'} → 'symb'' 0/1",
"examples": [
{
"input": "'2*(A+B)' { '&X*(&Y+&Z)' '&X*&Y+&X*&Z' }",
"comment": "Rewritten by distributing; the 1 reports a match"
},
{
"input": "'SIN(X)' { 'COS(&A)' '1' }"
}
]
},
"→": {
"name": "Create local variables",
"description": "Creates local variables: it takes values from the stack, binds them to the following names, and evaluates the program or algebraic that follows with those names defined.",
"stack": "obj1 ... objn →",
"category": "PRG",
"examples": [
{
"input": "3. 4.",
"run": "→ a b 'a^2+b^2'",
"comment": "Binds 3 to a and 4 to b"
},
{
"input": "5.",
"run": "→ x « x x * »"
}
]
},
"→A": {
"name": "Object address",
"description": "Returns the memory address of an object as a binary integer; needs library 256 attached.",
"stack": "obj → #n",
"category": "DEVEL",
"skip": "returns a raw memory address that depends on memory layout"
},
"→ALG": {
"name": "Stack to algebraic",
"description": "Gathers n objects from the stack, with their count in level 1, into an algebraic object without checking that the result is well formed; needs library 256 attached.",
"stack": "obj1 ... objn n → 'symb'",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "'X' 1."
}
]
},
"→ARRY": {
"name": "Stack to array",
"description": "Gathers stack objects into an array: with a count it builds a vector, with a list of row and column counts a matrix filled row by row.",
"stack": "x1 … xn n → [vector]; x11 … xnm {n m} → [[matrix]]",
"examples": [
{
"input": "1. 2. 3. 3."
},
{
"input": "1. 2. 3. 4. { 2. 2. }",
"comment": "A 2 by 2 matrix: the list gives rows and columns"
}
]
},
"→CD": {
"name": "Hex string to code object",
"description": "Turns a string of hexadecimal digits into a code object containing those nibbles, without running it; needs library 256 attached.",
"stack": "\"hex\" → code",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "\"0123\""
}
]
},
"→COL": {
"name": "Matrix to columns",
"description": "Splits a matrix into its columns, pushing each column as a vector followed by the column count. Applied to a vector, it pushes the elements and their count.",
"stack": "[[matrix]] → [col1] ... [coln] n; [vector] → x1 ... xn n",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[ 5. 6. 7. ]"
}
]
},
"→DATE": {
"name": "Set date",
"description": "Sets the system clock's date from a real number written in the active date format (MM.DDYYYY by default).",
"stack": "date →",
"examples": [
{
"input": "10.052026",
"run": "→DATE DATE",
"comment": "10.052026 is 5 October 2026"
},
{
"input": "2.291992",
"run": "→DATE DATE",
"comment": "29 February 1992, a leap day"
}
]
},
"→DIAG": {
"name": "Matrix diagonal to vector",
"description": "Extracts the main diagonal of a matrix, square or rectangular, as a vector.",
"stack": "[[matrix]] → [vector]",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[[ 1. 2. 3. ][ 4. 5. 6. ]]"
}
]
},
"→FONT": {
"name": "Set system font",
"description": "Makes a font object the system font used to show the stack and the command line.",
"stack": "font →",
"category": "Display",
"examples": [
{
"input": "",
"run": "FONT7 →FONT FONT→"
}
]
},
"→GROB": {
"name": "To graphics object",
"description": "Renders any object as a graphics object in a chosen font size (1 small, 2 medium, 3 large); size 0 draws algebraics the way the EquationWriter shows them.",
"stack": "obj n → grob",
"examples": [
{
"input": "\"HP\" 2."
},
{
"input": "'X^2+1' 0."
},
{
"input": "123.5 1.",
"run": "→GROB SIZE"
}
]
},
"→H": {
"name": "To hex",
"description": "Converts any object to a string of hexadecimal digits giving its nibbles in memory order; needs library 256 attached.",
"stack": "obj → \"hex\"",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "1."
},
{
"setup": "256. ATTACH",
"input": "\"A\""
}
]
},
"→HEADER": {
"name": "Set header size",
"description": "Sets how many lines, from 0 to 2, the status header above the stack occupies.",
"stack": "n →",
"category": "Display",
"examples": [
{
"input": "1.",
"run": "→HEADER HEADER→"
}
]
},
"→HMS": {
"name": "Decimal to hours-minutes-seconds",
"description": "Converts a decimal number of hours (or degrees) to HH.MMSS form.",
"stack": "x → hms",
"examples": [
{
"input": "1.5",
"comment": "1.5 hours is 1h30m"
},
{
"input": "2.7525",
"comment": "2.7525 hours is 2h45m09s"
}
]
},
"→KEYTIME": {
"name": "Set key debounce time",
"description": "Sets the keyboard debounce time, the delay in clock ticks the calculator waits before accepting another key press.",
"stack": "n →",
"category": "Keyboard",
"examples": [
{
"input": "1500.",
"run": "→KEYTIME KEYTIME→"
}
]
},
"→LANGUAGE": {
"name": "Set language",
"description": "Chooses the language of system messages by number: 0 for English, 1 for French, 2 for Spanish.",
"stack": "n →",
"category": "MODES",
"examples": [
{
"input": "1.",
"run": "→LANGUAGE LANGUAGE→"
}
]
},
"→LCD": {
"name": "Graphics object to display",
"description": "Shows a graphics object on the screen, placing its top-left corner at the top-left of the display.",
"stack": "grob →",
"skip": "writes to the screen and returns nothing to the stack",
"per_model": {
"28s": {
"name": "String to display",
"description": "Shows a string as graphics: each character code becomes a column of eight pixels, drawn from the display's top-left corner. 548 characters fill the screen.",
"stack": "\"str\" →"
}
}
},
"→LIST": {
"name": "Stack to list",
"description": "Collects a given count of stack objects into a list, the deepest of them becoming the first element.",
"stack": "obj1 … objn n → {list}",
"examples": [
{
"input": "1. \"A\" 'X' 3."
},
{
"input": "0.",
"comment": "A count of 0 gives the empty list"
}
]
},
"→LST": {
"name": "Stack to list",
"description": "Gathers n objects from the stack, with their count in level 1, into a list; needs library 256 attached.",
"stack": "obj1 ... objn n → {list}",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "1. \"A\" 2."
}
]
},
"→MINIFONT": {
"name": "Set minifont",
"description": "Installs a font object as the minifont, the small font used for menu labels and compact display text.",
"stack": "font →",
"category": "DISPLAY",
"examples": [
{
"input": "MINIFONT→"
}
]
},
"→NDISP": {
"name": "Set number of stack lines",
"description": "Sets the number of lines the stack display uses for showing objects.",
"stack": "n →",
"category": "Display",
"examples": [
{
"input": "5."
}
]
},
"→NUM": {
"name": "To number",
"description": "Evaluates an object fully to a number, replacing symbolic constants such as π and e by their numeric values and variables by their contents.",
"stack": "'symb' → x; obj → obj'",
"category": "Keyboard",
"examples": [
{
"input": "'π/4'"
},
{
"input": "'2*X+1'",
"setup": "3. 'X' STO"
}
]
},
"→PRG": {
"name": "Stack to program",
"description": "Gathers n objects from the stack, with their count in level 1, into a program; needs library 256 attached.",
"stack": "obj1 ... objn n → prog",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "1. 2. 2."
}
]
},
"→Q": {
"name": "To quotient",
"description": "Turns a real number into the algebraic fraction that best approximates it at the current display precision.",
"stack": "x → 'a/b'; 'symb' → 'symb''",
"examples": [
{
"input": "0.75"
},
{
"input": "1.5"
},
{
"input": "0.333333333333",
"setup": "STD"
}
]
},
"→Qπ": {
"name": "To quotient times π",
"description": "Approximates a real number as a fraction, or as a fraction times π when that gives a simpler result, and returns it as an algebraic; also works on each number in an expression.",
"stack": "x → 'symb'; 'symb' → 'symb''",
"examples": [
{
"input": "1.57079632679"
},
{
"input": "0.75"
},
{
"input": "'2.5*X'"
}
]
},
"→RAM": {
"name": "Copy to RAM",
"description": "Replaces an object that lives in ROM, or refers to ROM, by a full copy in RAM; objects already in RAM come back unchanged. Needs library 256 attached.",
"stack": "obj → obj",
"category": "DEVEL",
"examples": [
{
"setup": "256. ATTACH",
"input": "{ 1. 2. }"
}
]
},
"→ROW": {
"name": "Matrix to rows",
"description": "Splits a matrix into its rows, pushing each row as a vector followed by the row count. Applied to a vector, it pushes the individual elements and their count.",
"stack": "[[matrix]] → [row1] ... [rown] n; [vector] → x1 ... xn n",
"examples": [
{
"input": "[[ 1. 2. ][ 3. 4. ]]"
},
{
"input": "[ 5. 6. 7. ]"
}
]
},
"→S2": {
"name": "To System RPL source",
"description": "Disassembles an object into a string of System RPL source that ASM can assemble again. Part of the development library.",
"stack": "obj → \"str\"",
"category": "PRG DEV",
"examples": [
{
"input": "« 1. + »",
"setup": "256. ATTACH",
"models": [
"49g"
]
}
]
},
"→STR": {
"name": "To string",
"description": "Converts any object to a string showing how it is displayed, using the current number format for reals.",
"stack": "obj → \"str\"",
"examples": [
{
"input": "12.5",
"setup": "STD"
},
{
"input": "{ 1. 'X' }",
"setup": "STD"
}
]
},
"→TAG": {
"name": "Stack to tag",
"description": "Attaches a label to an object, producing a tagged object; the tag can be given as a string or a name.",
"stack": "obj \"tag\" → :tag:obj; obj 'name' → :name:obj",
"examples": [
{
"input": "5. \"Width\""
},
{
"input": "(1.,2.) 'P'"
}
]
},
"→TIME": {
"name": "Set time",
"description": "Sets the system clock's time from a real number in 24-hour HH.MMSS form.",
"stack": "time →",
"examples": [
{
"input": "14.3",
"comment": "14.3 is 14:30"
},
{
"input": "8.1530",
"comment": "8.1530 is 8:15:30"
}
]
},
"→UNIT": {
"name": "To unit object",
"description": "Builds a unit object from a plain number and a unit object, attaching the units of the second to the first; whatever number the unit object carries is ignored. Useful in programs that compute a bare value and then label it.",
"stack": "x y_unit → x_unit",
"examples": [
{
"input": "3. 1._m"
},
{
"input": "55. 1._km/h"
}
]
},
"→V2": {
"name": "To 2-element vector",
"description": "Combines two reals into a two-element vector, read as rectangular or polar coordinates according to the current mode; when flag -19 is set it builds a complex number instead.",
"stack": "x y → [x y]; x y → (x,y)",
"examples": [
{
"setup": "RECT",
"input": "3. 4."
},
{
"setup": "DEG CYLIN",
"input": "2. 90."
},
{
"setup": "RECT -19. SF",
"input": "3. 4."
}
]
},
"→V3": {
"name": "To 3-element vector",
"description": "Combines three reals into a three-element vector, interpreting them as rectangular, cylindrical or spherical coordinates according to the current mode.",
"stack": "x y z → [x y z]",
"examples": [
{
"setup": "RECT",
"input": "1. 2. 3."
},
{
"setup": "DEG CYLIN",
"input": "1. 90. 5."
}
]
},
"↓MATCH": {
"name": "Match and replace, top down",
"description": "Rewrites an expression with a pattern and replacement (optionally a condition), matching from the whole expression inward; & names are wildcards. Returns the result and 1 if anything changed, else 0.",
"stack": "'symb' {'pat' 'repl'} → 'symb'' 0/1; 'symb' {'pat' 'repl' 'cond'} → 'symb'' 0/1",
"examples": [
{
"input": "'2*(A+B)' { '&X*(&Y+&Z)' '&X*&Y+&X*&Z' }",
"comment": "Rewritten by distributing; the 1 reports a match"
},
{
"input": "'LN(A*B)' { 'LN(&X*&Y)' 'LN(&X)+LN(&Y)' }"
}
]
},
"∂": {
"name": "Derivative",
"description": "Differentiates an expression by the named variable. The result is symbolic, or a number when the variable already holds a value.",
"stack": "'symb' 'name' → 'symb''",
"category": "Keyboard",
"examples": [
{
"input": "'X^2+SIN(X)' 'X'"
},
{
"input": "'X^3' 'X'",
"setup": "2. 'X' STO"
}
]
},
"√": {
"name": "Square root",
"description": "Gives the principal square root. A negative real yields a complex result, and units and algebraics are handled as well.",
"stack": "x → √x; z → √z; 'symb' → '√symb'",
"category": "Keyboard",
"examples": [
{
"input": "16."
},
{
"input": "-4."
},
{
"input": "9._m^2",
"models": [
"48sx",
"48gx",
"49g"
]
}
],
"per_model": {
"28s": {
"description": "Gives the principal square root. A negative real yields a complex result, and algebraics give a symbolic result.",
"stack": "x → √x; z → √z; 'symb' → '√symb'"
}
}
},
"∞": {
"name": "Infinity",
"description": "Puts the symbolic constant for unsigned infinity on the stack, for use in limits, integrals and series.",
"stack": "→ '∞'",
"category": "Constants",
"examples": [
{
"input": ""
},
{
"input": "'1/X' 'X'",
"run": "∞ = lim",
"comment": "The limit of 1/X as X goes to infinity"
}
]
},
"∫": {
"name": "Integral",
"description": "Integrates an expression over a variable between two limits. It integrates symbolically when it can; with numeric evaluation it integrates numerically, to an accuracy set by the display format.",
"stack": "lower upper 'symb' 'name' → 'symb''; lower upper 'symb' 'name' → x",
"category": "Keyboard",
"examples": [
{
"input": "0. 1. 'X^2' 'X'",
"setup": "STD",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"input": "0. 1. 'EXP(-X^2)' 'X'",
"setup": "STD",
"run": "∫ →NUM",
"models": [
"48sx",
"48gx",
"49g"
]
},
{
"setup": "STD",
"input": "'X^2' 'X' 3.",
"models": [
"28s"
]
},
{
"setup": "STD",
"input": "'EXP(-X^2)' { X 0. 1. } .00001",
"models": [
"28s"
],
"comment": "0 to 1 to within .00001; the second value is the error estimate"
}
],
"per_model": {
"28s": {
"description": "Integrates an expression. With a variable name and a degree it returns a polynomial for the indefinite integral, through a Taylor series where needed. With a list of the variable and two limits plus an accuracy it integrates numerically and returns the integral and an error estimate.",
"stack": "'symb' 'name' n → 'symb''; 'symb' { name a b } x → integral error; «prog» { a b } x → integral error"
}
}
},
"≠": {
"name": "Not equal",
"description": "Tests two objects for inequality, returning 1 when they differ and 0 when they are equal; with names or algebraics it builds a symbolic comparison.",
"stack": "obj1 obj2 → 0/1; 'symb' x → 'symb≠x'",
"examples": [
{
"input": "2. 3."
},
{
"input": "\"A\" \"A\""
}
]
},
"≤": {
"name": "Less than or equal",
"description": "Compares level 2 against level 1 and pushes 1 if it is smaller or equal, else 0; accepts reals, binary integers, strings and compatible units, and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb≤x'",
"examples": [
{
"input": "3. 3."
},
{
"input": "4. 3."
}
],
"per_model": {
"28s": {
"description": "Compares level 2 against level 1 and pushes 1 if it is smaller or equal, else 0; accepts reals, binary integers and strings (compared by character code), and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb≤x'"
}
}
},
"≥": {
"name": "Greater than or equal",
"description": "Compares level 2 against level 1 and pushes 1 if it is larger or equal, else 0; accepts reals, binary integers, strings and compatible units, and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb≥x'",
"examples": [
{
"input": "3. 3."
},
{
"input": "\"A\" \"B\""
}
],
"per_model": {
"28s": {
"description": "Compares level 2 against level 1 and pushes 1 if it is larger or equal, else 0; accepts reals, binary integers and strings (compared by character code), and yields a symbolic comparison for names or algebraics.",
"stack": "x y → 0/1; \"s1\" \"s2\" → 0/1; 'symb' x → 'symb≥x'"
}
}
},
"▶": {
"name": "Infix store",
"description": "Infix form of storing a value in a variable, as produced by the store key in algebraic mode; the value is kept as the result.",
"stack": "obj 'name' → obj",
"category": "MEMORY",
"examples": [
{
"input": "42. 'A'",
"run": "▶ A"
}
]
}
}
}