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 #434 background imageLoading...
Page #434 background image
392
Appendix A: System Routines — Direct Floating Point Operations
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
ck_valid_float
Declaration:
BOOL
ck_valid_float
(BCD16 *
num
)
Category:
Direct Floating Point Operations
Description:
Verifies that a floating-point value is within the valid user range. The
internal TI BCD floating-point format has 16 mantissa digits with an
exponent range of -16384 to 16383 while a valid user float is 14 mantissa
digits with an exponent range of -999 to 999.
ck_valid_float
rounds the
input BCD16 value
num
to 14 digits and underflows the value to 0 if the
exponent is less than -999. If
num
is NAN or the exponent is greater than
999, FALSE is returned and
num
will contain a NAN. (See section
2.9.4. Floating-Point Representations
in the TI-89 / TI-92 Plus Sierra C
Assembler Reference Manual.)
Inputs:
num
Pointer to a TI BCD floating-point value (BCD16).
Outputs:
num
is rounded to 14 mantissa digits or underflowed to 0 if necessary to
insure that its contents are within the range of a user floating-point value. In
this case, TRUE will be returned. If the input
num
is NAN or the exponent is
greater than 999, the output value of
num
will be NAN and FALSE will be
returned.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: is_float_transfinite, push_Float
Example:
/* convert an internal floating point value to the range of a user float */
if( !ck_valid_float( &temp )) /* does round14 and underflows if necessary */
ER_throw( ER_OVERFLOW ); /* could not convert to valid user float range */

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