*** Welcome to piglix ***

Single precision


Single-precision floating-point format is a computer number format that occupies 4 bytes (32 bits) in computer memory and represents a wide dynamic range of values by using a floating point.

In IEEE 754-2008 the 32-bit base-2 format is officially referred to as binary32. It was called single in IEEE 754-1985. In older computers, different floating-point formats of 4 bytes were used, e.g., GW-BASIC's single-precision data type was the 32-bit MBF floating-point format.

One of the first programming languages to provide single- and double-precision floating-point data types was Fortran. Before the widespread adoption of IEEE 754-1985, the representation and properties of the double float data type depended on the computer manufacturer and computer model.

Single-precision binary floating-point is used due to its wider range over fixed point (of the same bit-width), even if at the cost of precision. A signed 32-bit integer can have a maximum value of 231 − 1 = 2,147,483,647, whereas the maximum representable IEEE 754 floating-point value is (2 − 2−23) × 2127 ≈ 3.402823 × 1038. All integers with 6 or fewer significant decimal digits can be converted to an IEEE 754 floating-point value without loss of precision, some integers up to 9 significant decimal digits can be converted to an IEEE 754 floating-point value without loss of precision, but no more than 9 significant decimal digits can be stored. As an example, the 32-bit integer 2,147,483,647 converts to 2,147,483,650 in IEEE 754 form.


...
Wikipedia

...