Table of contents
IEEE-754 Floating-Point Formats (x86)
This page summarizes IEEE-754 binary floating-point formats as implemented on Intel x86 CPUs up to Core 2.
Intel x86 supports:
- Binary32 (single precision)
- Binary64 (double precision)
- x87 80-bit extended precision
Intel CPUs do not implement IEEE quad (128-bit) precision in hardware.
Binary32 (Single Precision, 32-bit)
+----+------------------+----------------------+ | S | Exponent (8) | Fraction (23) | +----+------------------+----------------------+ 31 30 23 22 0
- Sign: 1 bit (bit 31)
- Exponent: 8 bits (bits 30–23)
- Fraction: 23 bits (bits 22–0)
- Bias: 127 (0x7F)
- value = (−1)^S × 2^(E − 127) × (1.F)
- Minimum normal: 2⁻¹²⁶ ≈ 1.17549435e−38
- Maximum finite: (2 − 2⁻²³) × 2¹²⁷ ≈ 3.40282347e+38
- +0 Exponent = 0x00, Fraction = 0x000000 Hex: 0x00000000
- −0 Exponent = 0x00, Fraction = 0x000000 Hex: 0x80000000
- +∞ Exponent = 0xFF, Fraction = 0x000000 Hex: 0x7F800000
- −∞ Exponent = 0xFF, Fraction = 0x000000 Hex: 0xFF800000
- Quiet NaN Exponent = 0xFF, Fraction MSB = 1 Hex: 0x7FC00000
- Signaling NaN Exponent = 0xFF, Fraction MSB = 0, Fraction ≠ 0 Hex: 0x7FA00000
Binary64 (Double Precision, 64-bit)
+----+----------------------+----------------------------------------+ | S | Exponent (11) | Fraction (52) | +----+----------------------+----------------------------------------+ 63 62 52 51 0
- Sign: 1 bit (bit 63)
- Exponent: 11 bits (bits 62–52)
- Fraction: 52 bits (bits 51–0)
- Bias: 1023 (0x3FF)
- value = (−1)^S × 2^(E − 1023) × (1.F)
- Minimum normal: 2⁻¹⁰²² ≈ 2.225074e−308
- Maximum finite: (2 − 2⁻⁵²) × 2¹⁰²³ ≈ 1.797693e+308
- +0 Exponent = 0x000, Fraction = 0x0000000000000 Hex: 0x0000000000000000
- −0 Exponent = 0x000, Fraction = 0x0000000000000 Hex: 0x8000000000000000
- +∞ Exponent = 0x7FF, Fraction = 0x0000000000000 Hex: 0x7FF0000000000000
- −∞ Exponent = 0x7FF, Fraction = 0x0000000000000 Hex: 0xFFF0000000000000
- Quiet NaN Exponent = 0x7FF, Fraction MSB = 1 Hex: 0x7FF8000000000000
- Signaling NaN Exponent = 0x7FF, Fraction MSB = 0, Fraction ≠ 0 Hex: 0x7FF4000000000000
x87 Extended Precision (80-bit)
+----+----------------------+--+--------------------------------------+ | S | Exponent (15) |J | Fraction (63) | +----+----------------------+--+--------------------------------------+ 79 78 64 63 0
- Sign: 1 bit (bit 79)
- Exponent: 15 bits (bits 78–64)
- Integer bit (J): 1 bit (bit 63, explicit)
- Fraction: 63 bits (bits 62–0)
- Bias: 16383 (0x3FFF)
- value = (−1)^S × 2^(E − 16383) × (J.F)
- Minimum normal: 2⁻¹⁶³⁸² ≈ 3.3621e−4932
- Maximum finite: (2 − 2⁻⁶³) × 2¹⁶³⁸³ ≈ 1.1897e+4932
- +0 Exponent = 0x0000, J = 0, Fraction = 0 Hex: 00 00 00 00 00 00 00 00 00 00
- −0 Exponent = 0x0000, J = 0, Fraction = 0 Hex: 00 00 00 00 00 00 00 00 00 80
- +∞ Exponent = 0x7FFF, J = 1, Fraction = 0 Hex: 00 00 00 00 00 00 00 80 FF 7F
- −∞ Exponent = 0x7FFF, J = 1, Fraction = 0 Hex: 00 00 00 00 00 00 00 80 FF FF
- Quiet NaN Exponent = 0x7FFF, J = 1, Fraction MSB = 1 Hex: 00 00 00 00 00 00 00 C0 FF 7F
- Signaling NaN Exponent = 0x7FFF, J = 1, Fraction MSB = 0 Hex: 00 00 00 00 00 00 00 A0 FF 7F
- Pseudo-NaN Exponent = 0x7FFF, J = 0 Hex: architecture-specific
- x87 always computes using 80-bit extended precision
- SSE instructions operate only on 32-bit and 64-bit formats
- Intel CPUs up to Core 2 never implement IEEE-754 quad precision
- The C type
long doubleis ABI-defined - Extra precision may exist only in registers, not memory
- Binary32: 32 bits total, 8 exponent bits, 23 fraction bits
- Binary64: 64 bits total, 11 exponent bits, 52 fraction bits
- x87 Extended: 80 bits total, 15 exponent bits, 63 fraction bits, explicit integer bit
This project is an independent, unofficial work based on publicly available information and reverse-engineering research, and is not affiliated with, endorsed by, sponsored by, or associated with Intel Corporation or its affiliates. It is provided "as is", without warranty of any kind. The author assumes no responsibility or liability for any use, misuse, damage, data loss, hardware failure, or other consequences arising from its use. Intel, Pentium, Core and related trademarks are the property of their respective owners and are used solely for identification and informational purposes.