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 #521 background imageLoading...
Page #521 background image
Appendix A: System Routines — EStack Arithmetic
479
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
is_Float_exact_whole_number
Declaration:
Boolean
is_Float_exact_whole_number
(IndexConstQuantum
i
)
Category(ies):
EStack Arithmetic
Description:
Determines whether the float indexed by
i
is a whole number whose
magnitude is <= MAX_EXACT_FLOAT_WHOLE_NUMBER.
Inputs:
i
Index of a tagged float.
Outputs:
Returns TRUE if the float indexed by
i
is a whole number whose magnitude
is <= MAX_EXACT_FLOAT_WHOLE_NUMBER. Otherwise returns
FALSE.
Assumptions:
i
points to the FLOAT_TAG of a tagged float.
Side Effects:
None
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: is_whole_number
Examples:
Float gcdExactWholeFloats(IndexConstQuantum i, IndexConstQuantum j)
/* i and j index exact whole Floats.
Returns their greatest common divisor, computed by Euclid's algorithm. */
{ Float f3, f1, f2;
if (FLOAT_TAG == ESTACK (i) && FLOAT_TAG == ESTACK (j) &&
is_Float_exact_whole_number (i) && is_Float_exact_whole_number (j))
{
f1 = fabs (ESTACK_TO_FLOAT (i));
f2 = fabs (ESTACK_TO_FLOAT (j));
if (f1 < f2)
{ f3 = f1; /* Swap f1 and f2 */
f1 = f2;
f2 = f3;
}
while (f2 > FLOAT0)
{ f3 = fmod (f1, f2);
f1 = f2;
f2 = f3;
}
return f1;
}
else
ER_throw( ER_DOMAIN);
}

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