...
/Floating Point Types Usage and Limitations
Floating Point Types Usage and Limitations
In this lesson, you will learn how to choose an appropriate type of the floating point and some limitations of these types.
Which floating type to use #
Unless there is a specific reason to choose otherwise, you can choose double
for floating point values. float
has lower precision than double
and real
, but it takes less number of bits and can be useful when we have limited memory. On the other hand, since the precision of real
is higher than double
on some hardware, it would be preferable for high precision calculations.
Limitations #
Let’s discuss a few limitations that we have with the floating point types.
Cannot represent all values
...Access this course and 1400+ top-rated courses and projects.