EasyManuals Logo

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 #464 background imageLoading...
Page #464 background image
422
Appendix A: System Routines — Direct Floating Point Operations
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_Float_to_nonneg_int
Declaration:
void
push_Float_to_nonneg_int
(Float
f
)
Category(ies):
Direct Floating Point Operations
Description:
If the truncated integer part of
f
is representable as a big integer, that
tagged integer value is pushed onto the estack.
Inputs:
f
Non-negative C floating-point number.
Outputs:
None
Assumptions:
None
Side Effects:
Throws RATIONAL_NUMERIC_OVERFLOW_ERROR if the truncated
integer part of
f
is not representable as a big integer.
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_Float
Examples:
Boolean did_push_cnvrt_Float_to_integer (EStackIndex i)
/* i indexes a tagged float.
If it is a whole number that is representable as an integer, pushes the
integer equivalent then returns TRUE.
Otherwise returns FALSE. */
{ Float f;
f = ESTACK_TO_FLOAT (i);
if (FLOAT0 == FMOD (f, FLOAT1))
{ Float abs_f = fabs (f);
if (FLOAT_TO_NON_OVERFLOW_THRESHOLD > abs_f)
{ push_Float_to_nonneg_int (abs_f);
if (f < FLOAT0)
negate_top()
return TRUE;
}
}
return FALSE;
}

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