Texas Instruments TI89 Developer Guide - Page 542
divide_top, replace_top2_with_ratio, push_reciprocal, push_ratio
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 542 highlights
500 Appendix A: System Routines - EStack Arithmetic push_ratio Declaration: void push_ratio (EStackIndex i, EStackIndex j) Category(ies): EStack Arithmetic Description: Pushes onto the estack the internally-simplified ratio of expression i divided by expression j. Inputs: i, j - Indexes to top tags of internally-simplified algebraic expressions, algebraic comparisons, or aggregates thereof. Outputs: None Assumptions: None Side Effects: None Availability: On AMS 2.02 and higher. TI-89 / TI-92 Plus Differences: None See Also: divide_top, replace_top2_with_ratio, push_reciprocal, replace_top_with_reciprocal 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 Not for Distribution Beta Version January 26, 2001