Floating Point Numbers in Matlab

Floating point numbers are utilized in most calculations performed in Matlab and other programming languages. Often misunderstood, floating-point arithmetic can cause many confounding problems in addition, subtraction, multiplication, division, comparison, and other types of calculations. In this series of posts, I would like to describe the basics of floating point numbers that conform to  IEEE Standard 754 , introduce several Matlab functions that provide information about floating point numbers, provide a pair of functions that convert between the decimal and binary floating point representations, present some examples of how to view floating point numbers in different formats, and demonstrate how to handle some common problems with their arithmetic. In this post, I will give a brief overview of floating point numbers, introduce several Matlab functions that handle floats, and delve into detail of one of these functions named eps.

Continue reading