EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #829 background imageLoading...
Page #829 background image
Appendix A: System Routines — Math
787
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
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
The address of an EStackIndex.
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;
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals