Floating-point representation (source code)

= Floating-point representation
{title2=$(-1)^s m\beta^e$}

= Floating point
{synonym}

A finite normal <floating-point representation> stores a sign, a <significand> and a bounded <integer> <exponent>, representing $(-1)^s m\beta^e$ in radix $\beta$. Fixing the number of significand digits gives roughly constant relative precision across a wide dynamic range; the gap between adjacent representable values grows with the <exponent>.

For example, $6.5=1.101_2\,2^2$ in the <binary numeral system>. The normal leading <binary digit> is one and can be implicit in storage. <Subnormal numbers> use a different leading-digit rule near zero. IEEE formats also reserve encodings for signed zero, infinities and <NaN>, so the bit pattern cannot always be interpreted by the normal finite formula.<IEEE arithmetic in Oracle's Numerical Computation Guide>[§2.2, IEEE formats and normal/subnormal representations]{ref}