270
Appendix A: System Routines — Algebra Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_but_factor
Declaration:
void
push_but_factor
(EStackIndex
i
, EStackIndex
j
)
Category(ies):
Algebra Utilities
Description:
This function can be used to push all but a selected syntactic factor out of
an algebraic expression.
i
indexes an internally-simplified algebraic expression and
(
j
==
i
or
j
==
remaining_factors_index
(
i
) or
j
==
remaining_factors_index
(
remaining_factors_index
(
i
)) or . . . ).
Pushes the product of all of
i
but
lead_factor
(
j
) onto the estack.
If
i
==
j
and ESTACK(
i
) != MULTIPLY_TAG, pushes Float1 if
IS_ARITH_APPROX is true and Integer1 if IS_ARITH_APPROX is false.
Functions such as
index_rmng_fctrs_start_fctr_tag
,
index_rmng_fctrs_start_base_tag
,
index_rmng_fctrs_start_base
, and
index_rmng_factor
can be used to select such a factor.
Inputs:
i
— Index of the top tag of an internally-simplified algebraic expression.
j
—
i
or the index of one of the partial products of the expression
indexed by
i
.
Outputs:
None
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: lead_factor_index, remaining_factors_index
Example:
If
i
indexes x
†
y
†
3 and
j
indexes the partial product y
†
3, then
push_but_factor(i, j)
pushes x
†
3.
void push_but_factor (EStackIndex i, EStackIndex j)
{ if (i == j)
push_expression (remaining_factors_index (i));
else { push_but_factor (remaining_factors_index (i), j);
times_top (lead_factor_index (i));
}
}