Appendix A: System Routines — Expression Evaluation /
Algebraic Simplification
543
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_approx
Declaration:
void
push_approx
(EStackIndex
i
)
Category(ies):
Expression Evaluation / Algebraic Simplification
Description:
Executes SET_ARITH_APPROX, then pushes a corresponding simplified
version of the expression onto the estack. The arithmetic mode is restored
to what it was upon entry to this subroutine.
Inputs:
i
— Index to an expression.
Outputs:
None
Assumptions:
i
points to the top tag of an expression that does not have to be already
internally simplified, but can be.
Side Effects:
None
Availability:
On AMS 2.01 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: estack_number_to_Float
Example:
push_quantum_as_nonnegative_int (2u);
exponent = top_estack;
push_quantum (8u); /* Push variable x */
replace_top2_with_pow (exponent);
power = top_estack; /* x^2 */
push_quantum (PI_TAG);
replace_top2_with_prod (power);
product = top_estack; /* pi * x^2 */
push_quantum_as_nonnegative_int (5u); /* pi * x^2 + 5 */
push_approx (top_estack); /* 3.1415926536898 * x^2 + 5.0 */
/* Note: Whole-number exponents such as 2 are not approximated. */