Appendix A: System Routines — Algebra Utilities
259
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
lead_base_index
Declaration:
EStackIndex 
lead_base_index
 (EStackIndex 
i
)
Category(ies):
Algebra Utilities
Description:
Returns 
factor_base_index
 (
lead_factor_index
 (
i
)).
Inputs:
i
— Index of the top tag of an internally-simplified algebraic expression.
Outputs:
Returns 
factor_base_index
 (
lead_factor_index
 (
i
)).
Assumptions:
None
Side Effects:
None
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: factor_base_index, index_of_lead_base_of_lead_term
Example:
Boolean has_unit_base (EStackIndex i)
/* Returns TRUE if at least one of the top_level factors has a physical unit or
   physical constant as a base. Otherwise returns FALSE.
*/
{  while (! IS_NUMBER_TAG (ESTACK (i)))
   {  if (IS_UNIT (lead_base_index (i)))
            return TRUE;
      i = remaining_factors_index (i);
   }
   return FALSE;
}