Appendix A: System Routines — Algebra Utilities
241
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
index_if_pushed_qquad_info
(continued)
Example:
EStackIndex index_var_if_pushed_qquad_info (EStackIndex i)
/* Returns NULL_INDEX if the expression indexed by i is not quasi-quadratic
in any if its variables.
Otherwise for the most main such variable, pushes onto the estack the
HALF degree, then the constant, then middle, then lead coefficient;
then returns an index to the variable.
*/
{ Access_AMS_Global_Variables;
EStackIndex j,
vq = main_gen_var_index (i),
old_top = top_estack;
while (vq)
{ if (is_variable (vq))
{ push_reciprocal_of_quantum (2u);
j = top_estack;
push_poly_deg_in_var_or_kernel (i, vq);
replace_top2_with_prod (j);
if (index_if_pushed_qquad_info (i, vq, top_estack))
return vq;
top_estack = old_top;
}
vq = next_var_or_kernel_index (i, vq);
}
return NULL_INDEX;
}