Decimal representation explained

A decimal representation of a non-negative real number is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator: r = b_k b_\ldots b_0.a_1a_2\ldotsHere is the decimal separator, is a nonnegative integer, and

b0,\ldots,bk,a1,a2,\ldots

are digits, which are symbols representing integers in the range 0, ..., 9.

Commonly,

bk0

if

k\geq1.

The sequence of the

ai

—the digits after the dot—is generally infinite. If it is finite, the lacking digits are assumed to be 0. If all

ai

are, the separator is also omitted, resulting in a finite sequence of digits, which represents a natural number.

The decimal representation represents the infinite sum: r=\sum_^k b_i 10^i + \sum_^\infty \frac.

Every nonnegative real number has at least one such representation; it has two such representations (with

bk0

if

k>0

) if and only if one has a trailing infinite sequence of, and the other has a trailing infinite sequence of . For having a one-to-one correspondence between nonnegative real numbers and decimal representations, decimal representations with a trailing infinite sequence of are sometimes excluded.

Integer and fractional parts

The natural number \sum_^k b_i 10^i, is called the integer part of, and is denoted by in the remainder of this article. The sequence of the

ai

represents the number 0.a_1a_2\ldots = \sum_^\infty \frac,which belongs to the interval

[0,1),

and is called the fractional part of (except when all

ai

are equal to).

Finite decimal approximations

Any real number can be approximated to any desired degree of accuracy by rational numbers with finite decimal representations.

Assume

x\geq0

. Then for every integer

n\geq1

there is a finite decimal

rn=a0.a1a2 … an

such that:

r_n\leq x < r_n+\frac.

Proof:Let

rn=

stylep
10n
, where

p=\lfloor10nx\rfloor

.Then

p\leq10nx<p+1

, and the result follows from dividing all sides by

10n

.(The fact that

rn

has a finite decimal representation is easily established.)

Non-uniqueness of decimal representation and notational conventions

See main article: 0.999.... Some real numbers

x

have two infinite decimal representations. For example, the number 1 may be equally represented by 1.000... as by 0.999... (where the infinite sequences of trailing 0's or 9's, respectively, are represented by "..."). Conventionally, the decimal representation without trailing 9's is preferred. Moreover, in the standard decimal representation of

x

, an infinite sequence of trailing 0's appearing after the decimal point is omitted, along with the decimal point itself if

x

is an integer.

Certain procedures for constructing the decimal expansion of

x

will avoid the problem of trailing 9's. For instance, the following algorithmic procedure will give the standard decimal representation: Given

x\geq0

, we first define

a0

(the integer part of

x

) to be the largest integer such that

a0\leqx

(i.e.,

a0=\lfloorx\rfloor

). If

x=a0

the procedure terminates. Otherwise, for (a_i)_^ already found, we define

ak

inductively to be the largest integer such that: