Real Numbers
In C, whole numbers like int
are represented as 2s complement.
But it cannot represent real numbers like float
or double
.
Many real-world applications involve computations no only on whole numbers but also real numbers.
As we will see later, due to the finite number of bits, any representation of real numbers are really just an approximation of the actual numbers.
There are two major kinds of the approximation: