260
Appendix A: System Routines — Algebra Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
lead_factor_index
Declaration:
EStackIndex
lead_factor_index
(EStackIndex
i
)
Category(ies):
Algebra Utilities
Description:
If
i
indexes a MULTIPLY_TAG, returns the index of the shallower of its two
operands. Otherwise returns
i
. Internally-simplified products and ratios
have the most main factor shallowest, with less main factors deeper. Also,
the lead factor of an internally-simplified product is never a product.
For example:
If i indexes the internally-simplified expression
(3 * x^2) * y
then
lead_factor_index
(i) returns index(x^2).
If i indexes the internally-simplified expression
x^2
then
lead_factor_index
(i) returns index(x^2).
Internally-simplified numeric denominator factors are combined with
numeric numerator factors into a fractional numeric factor.
For example:
If i indexes the internally-simplified expression
3/2
then
lead_factor_index
(i) returns index(3/2).
Non-numeric denominator factors are internally simplified to be merged
with numerator factors as negative powers.
For example:
If i indexes the internally-simplified expression
2/x
then
lead_factor_index
(i) returns index(x^-1).
A factor having a sum as its base orders shallower than a factor having the
sum’s main variable as its base.
For example:
If i indexes the internally-simplified expression
(x + 1)^-2 * x^3
then
lead_factor_index
returns index((x + 1)^-2).
Inputs:
i
— Index of the top tag of an internally-simplified algebraic expression.
Outputs:
If
i
indexes a MULTIPLY_TAG, returns the index of the shallower of its two
operands. Otherwise returns
i
. Internally-simplified products and ratios
have the most main factor shallowest, with less main factors deeper. Also,
the lead factor of an internally-simplified product is never a product.
(continued)