
42 Numerical Methods and Optimization: An Introduction
2.1.2 Conversion of fractions
Consider a positive real number x. We can represent x as:
x = x
I
+ x
F
,
where x
I
= x is the integer part x,andx
F
= {x} is the fractional part of
x. For example, for x =5.3wehavex
I
= 5 and x
F
=0.3. We can convert x
I
and x
F
to another base separately and then combine the results. Note that
the x
F
part can be written in the form
x
F
=
∞
k=1
a
−k
10
−k
,
where a
−k
∈{0, 1, 2,...9},fork =1,...,∞.Ifa
−k
=0fork ≥ N,whereN
is some finite integer, then the fraction is said to terminate. For example,
1
8
=0.125 = 1 × 10
−1
+2× 10
−2
+5× 10
−3
terminates, whereas
1
6
=0.16666 ...=1× 10
−1
+6× 10
−2
+6× 10
−3
+ ··· ...