Appendix A: System Routines — Math
813
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_poly_qr
Declaration:
EStackIndex
push_poly_qr
(EStackIndex
i
, EStackIndex
j
,
EStackIndex
gv
, Int
choice
)
Category(ies):
Math
Description:
According to
choice
, pushes onto the estack the remainder, and/or then the
quotient of polynomial
i
divided by polynomial
j
, with respect to
gv
. Returns
the index of the first expression pushed.
Top-level calls should be made via the macros
PUSH_POLY_QUOTIENT, PUSH_POLY_REMAINDER, or
PUSH_POLY_REMAINDER_THEN_QUOTNT.
Inputs:
i
,
j
— Indices of the top tags of internally-simplified polynomials,
generalized to allow non-negative fractional exponents.
gv
— Indexes the top tag of an internally-simplified variable or
kernel.
choice
— One of PUSH_QUOTIENT, PUSH_REMAINDER, or
PUSH_BOTH.
Outputs:
The index of the first expression pushed.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_gcd_then_cofactors
Example:
/* Pushes a tagged integer 2, then the polynomial x + 1, then returns
the index of the pushed tagged integer 2.
*/
push_quantum (2u);
exponent = top_estack;
push_quantum (8u); /* Push variable x */
replace_top2_with_pow (exponent); /* top_estack -> x^2 */
add1_to_top ();
i = top_estack; /* i -> x^2 + 1 */
push_quantum (8u); /* Push variable x */
subtract1_from_top ();
j = top_estack; /* j -> x + 1 */
push_quantum (8u);
gv = top_estack; /* gv -> variable x */
push_poly_qr (i, j, gv, PUSH_BOTH);