Tags That Take More Than Two Or A Variable Number Of Arguments; Table 15.8: Examples Of Arithmetic Operations And The Store Operation; Table 15.9: Examples Of Other Binary Operations - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

168
Many built-in operators also require exactly two operands, for example,
arithmetic operators, power operators, relational operators, logical operators, the
store operator and the with operator. The arithmetic operators +, N, *, /, .+, .N, .*,
./, and the store operator
operand, and finally the corresponding tag on top.
Expression
a + b
x .* y
z

Table 15.8: Examples of Arithmetic Operations and the Store Operation

The remaining binary operators, the power operators ^ and .^, the relational
operators =, /=, <, <=, >, and >=, the logical operators and, or, and xor, and the
with operator |, all place the tag on top of the first operand on top of the second
operand, just as the functions do.
Expression
x ^ y
r > s
a or b
c | d
15.2.7.
Tags That Take More Than Two or a
Variable Number of Arguments
The tokenized Polish representation of functions that take more than two
arguments is the function tag on top of a tail of arguments. A tail is a sequence of
expressions on top of an END_TAG. The first argument is at the top of the
sequence just below the function tag. The last argument is deepest in the
sequence just above the END_TAG. Thus, (m, m, 1, n) is represented as
END_TAG N_VAR_TAG 1 1 NONNEGATIVE_INTEGER_TAG M_VAR_TAG
M_VAR_TAG SUMMATION_TAG.
A tail is also used for functions that accept a variable number of arguments. For
example, the function will accept 2, 3, or 4 arguments. Therefore, (ln(x), x) is
represented by END_TAG X_VAR_TAG X_VAR_TAG LN_TAG
INTEGRAL_TAG. (sin(x), x, 0, ) is represented by END_TAG PI_TAG 0
NONNEGATIVE_INTEGER_TAG X_VAR_TAG X_VAR_TAG SIN_TAG
INTEGRAL_TAG.
TI-89 / TI-92 Plus Developer Guide
Chapter 15: Expressions and The Expression Stack
, all place the first operand deepest, then the second
Representation
A_VAR_TAG B_VAR_TAG ADD_TAG
X_VAR_TAG Y_VAR_TAG DOT_MULT_TAG
PI_TAG Z_VAR_TAG STORE_TAG
Representation
Y_VAR_TAG X_VAR_TAG EXPONENTIATION_TAG
S_VAR_TAG R_VAR_TAG GT_TAG
B_VAR_TAG A_VAR_TAG OR_TAG
D_VAR_TAG C_VAR_TAG SUCH_THAT_TAG (with)

Table 15.9: Examples of Other Binary Operations

Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents