Appendix A: System Routines — Algebra Utilities
247
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
index_rmng_fctrs_start_base
Declaration:
EStackIndex
index_rmng_fctrs_start_base
(EStackIndex
i
,
EStackIndex
j
)
Category(ies):
Algebra Utilities
Description:
This function can be used to determine if the expression indexed by
j
or
any power of that expression is identical to
i
or any of its syntactic factors. If
so, use
push_but_factor
to form its cofactor.
Inputs:
i
,
j
— Index of the top tags of internally-simplified algebraic expressions.
Outputs:
Returns NULL_INDEX if the expression indexed by
j
is not identical to the
one indexed by
lead_base_index
(
i
) or
lead_base_index
(
remaining_factors_index
(
i
)) or
lead_base_index
(
remaining_factors_index
(
remaining_factors_index
(
i
))), etc.
Otherwise returns the shallowest index
k
such that the expression indexed
by
j
is identical to the one indexed by
lead_base_index
(
k
=
i
) or
lead_base_index
(
k
=
remaining_factors_index
(
i
)) or
lead_base_index
(
k
=
remaining_factors_index
(
remaining_factors_index
(
i
)), etc.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: index_rmng_fctrs_start_fctr_tag, index_rmng_fctrs_start_base_tag,
index_rmng_factor
Example:
push_quantum (10u);
push_quantum (EXP_TAG); /* exp(z) */
push_quantum_as_nonnegative_int (2u);
push_quantum (9u);
push_quantum (EXP_TAG);
push_quantum (EXPONENTIATION_TAG); /* exp(y)^2 */
push_quantum (MULTIPLY_TAG);
push_quantum (8u);
push_quantum (LN_TAG); /* ln(x) */
push_quantum (MULTIPLY_TAG);
i = top_estack; /* ln(x) * exp(y) * exp(z) */
push_quantum (9u);
push_quantum (EXP_TAG);
j = top_estack; /* exp(y) */
k = index_rmng_fctrs_start_base (i,j);
if (NULL_INDEX != k) push_but_factor(i,k); /* pushes ln(x) * exp(z) */