490
Appendix A: System Routines — EStack Arithmetic
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_gcd_numbers
Declaration:
void
push_gcd_numbers
(EStackIndex
i
, EStackIndex
j
)
Category(ies):
EStack Arithmetic
Description:
Pushes the gcd of the expressions indexed by
i
and
j
onto the estack.
Pushes 1.0 if either argument is a Float for which
is_Float_exact_whole_number
( . . . ) returns FALSE.
NOTE:
gcd(0, k) = abs(k)
gcd(m/n, p/q) = gcd(m, n)/lcm(n, q)
gcd (
L
0, 0) = gcd (+0, 0) = gcd (0,
L
0) = gcd (0, +0) = +0
Inputs:
i
,
j
— Indexes to the numeric tag of tagged numbers.
Outputs:
None
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_gcd_then_cofactors
Examples:
push_reciprocal_of_quantum (2u);
fraction_half = top_estack;
push_Float (2.0);
float2 = top_estack;
push_gcd_numbers (fraction_half, float2); /* Pushes 1/2 */
push_negate_quantum_as_negint (2u);
push_gcd_numbers (Integer0Index, top_estack); /* Pushes 2 */