Chapter 2: Math, Angle, and Test Operations
62
TEST (Relational) Operations
TEST Menu
To display the
TEST
menu, press
y :
.
Ä
=,
ƒ
, >,
‚
, <,
Relational operators compare
valueA
and
valueB
and return 1 if the test is true or 0 if the test is false.
valueA
and
valueB
can be real numbers, expressions, or lists. For
=
and
ƒ
only,
valueA
and
valueB
also
can be matrices or complex numbers. If
valueA
and
valueB
are matrices, both must have the same
dimensions.
Relational operators are often used in programs to control program flow and in graphing to control
the graph of a function over specific values.
Using Tests
Relational operators are evaluated after mathematical functions according to EOS rules
(Chapter 1).
•
The expression
2+2=2+3
returns
0
. The TI-84 Plus performs the addition first because of EOS
rules, and then it compares 4 to 5.
•
The expression
2+(2=2)+3
returns
6
. The TI-84 Plus performs the relational test first because it
is in parentheses, and then it adds 2, 1, and 3.
This operator...
Returns 1 (true) if...
TEST
LOGIC
1: =
Equal
2:
ƒ
Not equal to
3: >
Greater than
4:
‚
Greater than or equal to
5: <
Less than
6:
Less than or equal to
valueA
=
valueB
valueA
>
valueB
valueA
<
valueB
valueA
ƒ
valueB
valueA
‚
valueB
valueA
valueB