Appendix A: System Routines — EStack Arithmetic
485
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
is1
Declaration:
Boolean
is1
(IndexConstQuantum
i
)
Category(ies):
EStack Arithmetic
Description:
Determines whether
i
indexes a tagged big integer 1 or tagged float 1.
Inputs:
i
— Indexes an expression.
Outputs:
Returns TRUE if
i
indexes a tagged big integer 1 or tagged float 1.
Otherwise, returns FALSE.
Assumptions:
i
points to the top tag of an expression.
Side Effects:
None
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: is0, is_minus1
Example:
EStackIndex index_nonnegative_factor (EStackIndex i)
/* i indexes a term.
Returns NULL_INDEX if it cannot determine that one of its explicit syntactic
factors is nonnegative.
Otherwise returns i or the index of its 1st remaining factors for which
the lead factor has been determined to be nonnegative.
*/
{ while (! is1 (i))
if (is_nonnegative (lead_factor_index (i)))
return i;
else
i = remaining_factors_index (i);
return NULL_INDEX;
}