Information Technology Reference
In-Depth Information
Can a finite computer store real numbers with an
infinite number of decimal places?
Although the variablesize storage approach may allow many
digits of accuracy within a computation, a finite computer can store
only a finite amount of data. Thus, a machine cannot directly store
numbers with an infinite number of decimal places.
In some cases, this problem can be resolved through cleverness with
either the fixedsize storage or variablesize storage approach. As a dec
imal example, consider the fraction 1 3 . As a decimal, this is equivalent
to the infinite sequence 0.3333333333. . . , and there is no way to store
an infinite number of 3's. On the other hand, we could store the frac
tion's numerator and denominator separately—storage of the 1 and the
3 would take only a small amount of space each. Further, with this
storage of fractions, arithmetic operations are straightforward, al
though finding common denominators can be a little tedious. In simple
applications, this approach can work well and give the appearance of
handling numbers with an infinite number of decimal places.
However, in this fractional approach, arithmetic operations of
ten yield progressively larger denominators—even if fractions are
regularly reduced to lowest terms. Thus, storage of numerators and
denominators in a fixedsize format often is not practical, and the
variablesize storage may require considerable processing for even
simple operations. Overall, storage of fractions through separate
numerators and denominators can be useful in some applications,
but it comes at a cost in speed. With the practical difficulties of stor
age and speed, a fractional approach is rarely used in extensive pro
cessing. Instead, digits beyond what can be stored are either dis
carded or rounded, with discarding being the more common
alternative. In either case, accuracy is compromised.
The problem of real numbers with an infinite number of decimal
places is compounded by the fact that not all such numbers can be
written as fractions. For example, the mathematical number can
not be written as a fraction; there is no ongoing pattern of digits,
and no abbreviated storage will suffice. The only way to store is
to store all of its digits, and that infinite sequence cannot be done in
any finite computer.
 
Search WWH ::




Custom Search