Working With Numbers; Overview; Rational System Vs. Float System - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

16.

Working with Numbers

16.1.

Overview

This chapter describes the two separate number subsystems that are built into
the AMS Operating System — the rational system and the float system. The
numeric representations used by these systems are described in section
15.2.2. Numbers. Briefly, the rational system is an exact number system that
uses tagged integers and tagged fractions. The float system is an approximation
number system that uses BCD floating point numbers.
16.2.

Rational System vs. Float System

The primary advantage of the rational system is no loss of precision. So long as
no operation overflows or underflows, rational results are exact. The primary
disadvantage of the rational system is that the representation size is not fixed. As
tagged integers increase in magnitude the size of the representation increases
accordingly. As the magnitudes of numerators and denominators increase, the
representation size of fractions grows as well. Indexes into arrays of rational
numbers cannot be directly computed. To reach a specific array element, the
code must "step over" each of the preceding elements. Thus, depending upon
the type of operations, the rational system can be slower than the float system.
The primary advantage of the float system is the fixed size of the presentation.
As a result the speed of operations is more predictable, and indexes into arrays
of float numbers can be directly computed. The primary disadvantage of the float
system is loss of precision. Since the representation size is fixed, float results
must be rounded or truncated to a fixed number of significant digits after each
operation. Thus, a float result is always assumed to be an approximation.
Loss of precision makes the float system less suitable than the rational system
for computer algebra, where many of the most powerful results depend upon the
ability to maintain exact intermediate results. The rational system is less suitable
when fast approximate results are desired, such as during graphing. Since the
TI-89 / TI-92 Plus calculators need both these capabilities, the Operating System
includes both types of numbers.
A natural question for any application is whether to focus on or force the use of
only one number system. For the most part the attitude of the Operating System
is "let the calculator user decide." The system provides a mode setting, described
in the next section, that allows the calculator user to control this issue. There are
exceptions. For example, the graphing application and the statistical calculations
require the use of the floating-point system, and so, ignore the current mode
setting.
TI-89 / TI-92 Plus Developer Guide
Not for Distribution
181
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents