496
Appendix A: System Routines — EStack Arithmetic
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_pi_on_quantum
Declaration:
void
push_pi_on_quantum
(Quantum
q
)
Category(ies):
EStack Arithmetic
Description:
Pushes
π
/
q
onto the estack, with
q
>= 2. The result is a tagged float if
IS_ARITH_APPROX. Otherwise the result is a symbolic expression.
Inputs:
q
— Quantum.
Outputs:
None
Assumptions:
q
>= 2
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_pi
Example:
/*
** Title: push_radians
** Description: pushes the result of converting the specified value
** (interpreted as radians) to the currently selected measure
** Input: estack index i of the radian value
** Output: pushes the value converted to the currently selected angle measure
*/
void push_radians (EStackIndex i)
{ Access_AMS_Global_Variables;
if (! is_free_of_tag (i, IM_RE_TAG))
ER_THROW (ER_DOMAIN);
if (IS_RADIANS)
push_expression (i);
else
{ push_pi_on_quantum (180);
push_ratio (i, top_estack);
delete_expression (next_expression_index (top_estack));
}
}