convertimate Floating point (IEEE 754)

IEEE 754 floating-point converter

Convert a decimal number to its 32-bit or 64-bit floating-point bits, or paste hex bits to read the number they hold.

3DCCCCCDfloat32 hex

A 32-bit float cannot hold 0.1 exactly: it stores 0.10000000149, a relative error of 1.5e-8.

What it means

Where does it sit in the float range?

Uses round-to-nearest, as every processor does by default. The binary form shows sign, exponent and fraction separated by spaces.

Every unit

That number in every format

Learn

Three things worth knowing

Shortcuts

Popular number conversions

Background

About floating point

A float stores a number as sign × 1.fraction × 2exponent. A 32-bit float has 1 sign bit, 8 exponent bits and 23 fraction bits, about 7 significant digits; a 64-bit double has 11 and 52, about 16 digits.

Most decimal fractions have no exact binary form, so they are rounded: 0.1 is really 0.100000001490116… as a float and 0.1000000000000000055… as a double. That is why 0.1 + 0.2 is not exactly 0.3 in most programming languages.