Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is a float "single precision"?

I'm curious as to why the IEEE calls a 32 bit floating point number single precision. Was it just a means of standardization, or does 'single' actually refer to a single 'something'.

Is it simply a standardized level? As in, precision level 1 (single), precision level 2 (double) and so on? I've searched all over and found a great deal about the history of floating point numbers, but nothing that quite answers my question.

like image 984
Keith Grout Avatar asked Jul 19 '13 21:07

Keith Grout


People also ask

Why float is called single precision?

So a "single precision" float would fit in one register, while a "double precision" float would require two registers.

What is meant by single precision?

Single-precision floating-point format uses 32 bits of computer memory and can represent a wide range of numerical values. Often referred to as FP32, this format is best used for calculations that won't suffer from a bit of approximation.

Why is 32-bit called single precision?

In single-precision, 32-bit format, one bit is used to tell whether the number is positive or negative. Eight bits are reserved for the exponent, which (because it's binary) is 2 raised to some power. The remaining 23 bits are used to represent the digits that make up the number, called the significand.


2 Answers

On the machine I was working on at the time, a float occupied a single 36 bit register. A double occupied two 36 bit registers. The hardware had separate instructions for operating on the 1 register and 2 register versions of the number. I don't know for certain that that's where the terminology came from, but it's possible.

like image 136
Dale Wilson Avatar answered Oct 19 '22 12:10

Dale Wilson


In addition to the hardware view, on most systems the 32-bit format was used to implement the Fortran "real" type, and the 64 bit format to implement the Fortran "double precision" type.

like image 43
Patricia Shanahan Avatar answered Oct 19 '22 11:10

Patricia Shanahan