Skip to content

IEEE 754

IEEE 754 is the technical standard that defines how computers represent and calculate with floating-point numbers. Published by the Institute of Electrical and Electronics Engineers (IEEE), it fixes the binary encoding of real numbers so that the same computation gives consistent results across different processors and languages.

The standard splits each number into three fields: a sign bit, an exponent that sets the magnitude, and a significand, also called the mantissa, that carries the precision. A value equals the significand scaled by the base raised to the exponent, with the sign applied. Because the significand holds a fixed number of bits, most real numbers can be stored only as the nearest representable value, which is the origin of rounding error.

IEEE 754 specifies several binary interchange formats of increasing width:

  • binary16: The 16-bit half-precision format, used where memory and speed matter more than accuracy.
  • binary32: The 32-bit single-precision format common in graphics and machine learning.
  • binary64: The 64-bit double-precision format, with 53 bits of precision, that backs Python’s float.
  • binary128: The 128-bit quadruple-precision format for demanding numerical work.
Two horizontal bars for binary32 and binary64. Each splits into a narrow yellow sign field, a white exponent field, and a wide teal significand field. Widths are proportional to the bit counts.
The significand takes most of the bits, which is why wider formats carry more precision.

Beyond ordinary numbers, the standard reserves encodings for signed zero, positive and negative infinity, and NaN, short for Not a Number. It also defines several rounding rules, with round half to even as the default. The 2008 and 2019 revisions extended the original 1985 standard with decimal formats and further operations.

How to Round Numbers in Python

Tutorial

How to Round Numbers in Python

In this tutorial, you'll learn what kinds of mistakes you might make when rounding numbers and how you can best manage or avoid them. It's a great place to start for the early-intermediate Python developer interested in using Python for finance, data science, or scientific computing.

intermediate best-practices python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated July 23, 2026