News, Trends and discussions in the field of Machine Learning, Computer Vision and Data Science

FLOATING POINT REPRESENTATION

An Introduction to IEE 754 floating point number representation:IEEE 754 Floating point is the most common representation used to store real numbers in a computer.Index1. What are floating point numbers2. How to represent a floating point number.a. Single and Double precisions3.Data ranges

What are floating point number:

The term ‘floating point’ refers to the decimal point (or) binary point in a real number.The decimal point placed in between group of digits is called floating point numbers.

Ex: 28.36, 0.00124

Floating point number representation IEEE 754 standard:

Floating point number contains three components1. Sign bit - Represents the sign of floating point number.2. Exponent - Represents the magnitude of the exponent (explained at later part) (Ex: 1.086 * 10^6)3. Mantissa - Represents the precision bits of the number. (Ex: 1.086* 10^6)

In general to maximize the representable numbers, FP numbers are typically stored in ‘normalized’ form. This puts a radix point after a non-zero digit. Fig 1 & 2 are normalized representation of floating point (FP) numbers.

In order to represent in more optimized way number is represented with base 2, since only non-zero value possible is 1, this is implicitly stored.

Demoralized floating point representation:

If the exponent is all zeros and the fraction part is non-zero’s, then the value is ‘denormalized’ number. Which does not have any assumed leading but as 1 before decimal point