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 #227 background imageLoading...
Page #227 background image
Chapter 16: Working with Numbers
185
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
number into a BCD16 float value.
push_Float
as previously described is the
primary routine for converting a BCD16 float value into a tagged float value on
the expression stack.
See
Appendix B: Global Variables — Direct Floating Point Operations
for
details on commonly used stored BCD16 values and how to access them. Also
see
Appendix B: Global Variables — Math
for a description of global
EStackIndexes of stored floating point values.
16.5. Rational Numbers
The rational system operates on the expression stack. The range of tagged
integers is approximately from -10^614 to 10^614, which is much larger than the
range of C integer variables. This is the opposite situation from the float system.
Any C integer can be converted to a tagged integer, but most tagged integers are
too large to fit in C integer variables. Also C does not support a “fraction” variable
type to correspond to tagged fractions.
The system provides some routines to convert between C integers and tagged
integers.
push_long_to_integer
,
push_ulong_to_integer
, and
push_ushort_to_integer
provide the means to convert C integers to tagged
integers on the estack.
estack_to_short
and
estack_to_ushort
convert tagged
integers to C integers. See
Appendix A: System Routines — EStack Utilities
for descriptions of these routines.
Since the float range is bigger than the rational range, rational overflows and
underflows quietly convert to float values. Clearly any rational value can be
converted to a corresponding float value, but some floats are outside the rational
range and cannot be converted to rational values.
estack_number_to_Float
is
the primary routine for converting rational values to floating-point values.
push_Float_to_rat
is the primary routine for converting floating-point values to
rational values. See
Appendix A: System Routines
for descriptions of these
routines.
See
Appendix B: Global Variables — Math
for a description of global
EStackIndexes of stored rational values.
16.6. EStack Arithmetic
Performing numeric operations on the expression stack is simple, because the
system routines understand all the tagged data types in the internal tokenized
form and how to operate on them appropriately. For example, to add two values,
simply pass the two values to the
push_sum
routine.
push_sum
understands
tagged integers, tagged fractions, tagged floats, and in fact, all algebraic data

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