Push_Gcd_Then_Cofactors - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Math

push_gcd_then_cofactors

Declaration:
EStackIndex push_gcd_then_cofactors (EStackIndex i , EStackIndex j ,
EStackIndex * p )
Category(ies):
Math
Description:
Pushes onto the estack the greatest common denominator (gcd) of i and j ,
then (expression j )/gcd then (expression i )/gcd. Stores the index of
(expression j )/gcd in * p then returns the index of the gcd.
Inputs:
i , j — Indices of the top tags of algebraic expressions.
p
Outputs:
Index of (expression j )/gcd.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
None
Example:
EStackIndex index_push_monic_or_prim_pair (EStackIndex i, EStackIndex j)
/* If i indexes a Float, pushes 1.0 then the ratio of expressions j and i.
Otherwise pushes i/gcd(i, j) then j/gcd(i, j).
In either case, returns the index of the deeper pushed value.
*/
{
Access_AMS_Global_Variables;
EStackIndex k;
if (FLOAT_TAG == ESTACK (i))
{
push_expression (Float1Index);
k = top_estack;
push_ratio (j, i);
}
else
{
EStackIndex old_top = top_estack;
EStackDisplacement del =
deleted_between (old_top, push_gcd_then_cofactors (j, i, &k));
k -= del;
}
return k;
}
TI-89 / TI-92 Plus Developer Guide
— The address of an EStackIndex.
Not for Distribution
787
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents