464
Appendix A: System Routines — EStack Arithmetic
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
can_be_approxed
(continued)
Example:
void push_colnorm (EStackIndex matrix_idx)
/* Pushes the largest of the sums of the absolute values of the elements
in each column of the approximatable matrix indexed by matrix_idx.
*/
{ Access_AMS_Global_Variables;
EStackIndex old_top = top_estack;
EStackIndex i, j;
if (is_matrix (matrix_idx))
{ if (! can_be_approxed (matrix_idx, TRUE))
ER_THROW (ER_DOMAIN);
i = matrix_idx - 1u;
push0 ();
while (END_TAG != ESTACK (i))
{ j = top_estack;
push_abs (i);
replace_top2_with_sum (j);
i = next_expression_index (i);
}
j = top_estack;
push_max1 (j);
delete_between (old_top, j);
}
else
{ /* error - data type */
ER_throw( ER_DATATYPE );
}
}