Each 64-bit floating-point number is broken up into three parts:
- 1 bit is used for the sign (
-
/+
) - 11 bits are used for the exponent
- 52 bits are used for the fraction
In researching floating-point arithmetic, some key terminology comes up frequently. Understanding what a significand is and how a radix point relates to it can help explain where the term "floating-point" comes from.
-
Precision: The length of the significand (see significand below).
-
Radix: (Latin for "root") This is the amount of unique numbers that represent a numeric system. A binary system has a radix of 2.
-
Radix Point: The symbol (
.
) used to separate the integer portion from the fractional portion of a floating-point number.123.45
-
Significand / Mantissa: A string of digits that have a specific radix (see radix above). For the number
123.45
, the significand (aka mantissa) would be the full number without taking the radix point (see radix point above) into account:12345
.
A radix point will sit either at the beginning, the end, or inside of a significand -- hence the name floating-point. The placement of the radix point is dependent on the biased exponent value of the floating-point number. This is the 11-bit portion referenced at the beginning. See this gist for more on biased exponents.