Floating Point Number

What is a Floating Point Number?

In programming, a floating point number is a number in which the position of the decimal point can be “floating” and not in a fixed position within a number. It is also referred to as ‘float’.

Arithmetic operations with floating point numbers are considerably more complex than with binary numbers or two’s complement numbers. This is why the floating point unit (FPU) takes care of the calculation tasks within a processor. Arithmetic units can process floating point numbers in accordance with IEEE-754. A floating point unit (FPU) has been part of every processor since the 486 from Intel.

Floating point numbers contain numbers with places before and after the decimal point. The problem with this is that you not only have to save and process the numerical value before and after the decimal point, but also the position of the comma. That is why there are special data types for floating point numbers in computer science, which are processed separately and for which the floating point representation applies.

Since fixed positions for the pre- and post-decimal places would be more of a hindrance in the case of decimal numbers, it has been ensured with the floating point representation that the comma can take any position. It is said that the comma “slides”. Hence the word “floating point”. This means that if a number has many places before the decimal point, there is less space for the number of places after the decimal point. The reverse is of course also true. Floating point numbers solve the problems with the precision and size of a number.