Appendix A: System Routines — Logic
729
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
is_negative
Declaration:
Boolean
is_negative
(EStackIndex
i
)
Category(ies):
Logic
Description:
Determines whether the internally-simplified algebraic expression indexed
by
i
is negative for all finite values of all variables therein. Takes into
account bounds indexed by
NG_such_that_index
.
L
0 and
L
0.0 are NOT
considered negative.
Inputs:
i
— Index of the top tag of an internally-simplified expression.
Outputs:
Returns TRUE if it can determine that the internally-simplified algebraic
expression indexed by
i
is negative for all finite values of all variables
therein. Otherwise returns FALSE, even though the expression indexed by
i
might always be negative.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: is_nonnegative, is_positive, is_nonpositive, is0, is_never0, is_real
Example:
int ge0_lt0_unknown (EStackIndex i)
/* i indexes a zero expression.
Returns 1 if it determines that the expression >= 0, else -1 if < 0, else 0.
*/
{ return is_nonnegative (i) ? 1 : -is_negative (i);
}