IEEE 754 standard.
2 types:
- single precision
- double precision
Single Precision
Uses bits.
- sign bit - bit
- exponent - bit
- mantissa - bit
Single-Precision Sign Bit
if positive or zero. if negative.
Single-Precision Exponent
Exponent field range - . In this range is defined for normal numbers. and are reserved for subnormal, infinite, signed zeros and NaN.
To support negative exponents, (half of ) is subtracted from this range. . This range is the representable range.
Single-Precision Mantissa
In scientific notation, the part that doesn’t contain the base and the power.
In binary scientific notation, there will always be exactly one bit before the dot. So the inital is not included in the mantissa.
Double Precision
Uses bits.
- sign bit - bit
- exponent - bit
- mantissa - bit
Double Precision Sign Bit
if positive or zero. if negative.
Double Precision Exponent
Exponent field range - . In this range is defined for normal numbers. and are reserved for subnormal, infinite, signed zeros and NaN.
To support negative exponents, (half of ) is subtracted from this range. . This range is the representable range.
Double Precision Mantissa
In scientific notation, the part that doesn’t contain the base and the power.
In binary scientific notation, there will always be exactly one bit before the dot. So we don’t include that one.