Compare_Expressions - Texas Instruments TI-89 Developer's Manual

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

Advertisement

232

compare_expressions

Declaration:
int compare_expressions (EStackIndex i , EStackIndex j )
Category(ies):
Algebra Utilities
Description:
Returns an int that is 0 if expressions indexed by i and j are equal in the
sense that they have the same structure, variables, function names, and
numbers that "compare equal." A float and a rational number "compare
equal" if converting the rational number to a float produces an identical
number. Otherwise returns a positive int if expression indexed by i is more
main, or returns a negative int if the expression indexed by i is less main.
Glossing over details, variables are more main than symbolic constants
such as p, which are more main than numbers. If the user enters an
expression such as expand ( . . . , var) or integral ( . . . , var), then that
variable is most main. Otherwise, the 26 Roman 1-letter variables order
r>s> . . . >z>a>b> . . . >q, which order more main than all other variables,
which order alphabetically. Functions and operators are typically ordered
by recursively comparing their first arguments, with ties broken by
comparing their second arguments, etc., then finally comparing the
operators or functions, if necessary.
Examples:
i indexes
L2.0
L2.0
p
x
x
x
x
Inputs:
i , j — Indices of the top tags of internally-simplified expressions.
Outputs:
Returns an int that is 0 if expressions indexed by i and j are equal in the
sense that they have the same structure, variables, function names, and
numbers that "compare equal."
None
Assumptions:
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Algebra Utilities
j indexes
Compare expression returns
L2
0
L1
L1
4
1
4
1
L1
r
ln(y)
1
ln(x)
L1
(continued)
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