Home / Science / Maths, statistics and computing / Computer science / Floating point inspector (IEEE 754)Tool #575

Floating point inspector: IEEE 754 half, single and double bits, exact value, ULP and rounding error of any number

See how a computer really stores 0.1 or any other number: the sign, exponent and mantissa bits in half, single and double precision, the exact stored value to the last digit, the rounding error, the next float up and down, and the ULP. Flip bits to see what any pattern means.

Keep it one tap away for everyday use.

Bookmark Floating point inspector (IEEE 754)?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Number
  2. Bits
  3. Exact value
  4. Error
Nothing is uploadedWorks offline once open

Number

Any decimal, like 0.1, -2.5e-3 or 6.02214076e23, or inf, -inf, NaN. It is rounded to the nearest value the format can hold (ties to even), exactly, with whole-number arithmetic.

SignExponentMantissa (fraction)

Press any bit to flip it and see what the pattern means.

In all three formats

Rounding error = stored value − the number you typed. Half precision keeps about 3 significant digits, single about 7, double about 16.

Download

What it does

Computers store most numbers as binary floating point, defined by the IEEE 754 standard. Many simple decimals, such as 0.1, have no exact binary form, so the computer keeps the nearest value it can. That is why 0.1 + 0.2 is not exactly 0.3 in most programming languages. This inspector shows exactly what is stored:

  • The bits, coloured by part: 1 sign bit, the exponent bits and the mantissa (fraction) bits, in half (16-bit), single (32-bit, float in C and Java) or double (64-bit, the number type of JavaScript and Python).
  • The exponent with its bias removed, the significand 1.xxx in binary and decimal, and the value as significand × 2 to a power.
  • The exact stored value, every digit of it, worked out with whole-number arithmetic so nothing is rounded on the way.
  • The shortest decimal that gives the same bits (what most languages print).
  • The rounding error: stored value minus what you typed, exactly, relative to the number, and in ULPs.
  • The ULP (unit in the last place), the gap to the next larger float, and the next float up and down.
  • A table of the same number in all three formats.

How to use it

  1. Type a number: 0.1, -2.5e-3, 6.02214076e23, inf, -inf or NaN.
  2. Choose Half 16, Single 32 or Double 64.
  3. Read the coloured bits and the facts below them.
  4. Press any bit to flip it. The page then shows what that pattern means. You can also type a pattern in hex (like 0x3FB999999999999A) or choose one of the Special values: zero, negative zero, the smallest subnormal, the smallest normal, one, one plus machine epsilon, the largest finite value, infinity and NaN.
  5. Next up and Next down walk to the neighbouring floats, one bit pattern at a time.
  6. Save the format table as CSV, or everything as an image, PDF or Word file.

Worked example

Type 0.1 and choose double. The bits are 0x3FB999999999999A: sign 0, exponent bits 01111111011 = 1019, minus the bias 1023 = −4, and a mantissa of 1001 1001 … 1010. The page shows “0.1 is stored as 0.1000000000000000055511151231257827021181583404541015625”. The rounding error is 0.0000000000000000055511151231257827021181583404541015625, which is 0.4 ULP; the ULP here is 2^−56 = 0.00000000000000001387778780781445675529539585113525390625.

In the all-formats table, half precision stores 0.1 as 0.0999755859375 (bits 0x2E66, error −2.441e-5, −0.4 ULP) and single as 0.100000001490116119384765625 (0x3DCCCCCD, error 1.490e-9, 0.2 ULP).

Terms

  • Bias: the exponent is stored as a whole number with a fixed offset added (15, 127 or 1023), so it needs no sign bit.
  • Normal numbers have an implied leading 1 before the mantissa. Subnormal numbers (exponent bits all zero) drop it, filling the gap down to zero with less precision.
  • Infinity and NaN have exponent bits all one. NaN, “not a number”, comes from sums like 0 ÷ 0.
  • Machine epsilon is the gap from 1 to the next float: 2^−10, 2^−23 and 2^−52 for the three formats.
  • Round to nearest, ties to even: the standard rule. A value exactly halfway between two floats goes to the one whose last bit is 0.

Tips

  • Any whole number up to 2^53 (9,007,199,254,740,992) is exact in double; 9007199254740993 is not, and rounds down.
  • Half precision only reaches 65,504. 65520 is exactly halfway to the next step and rounds to infinity.
  • Programs that convert a decimal to single by going through double first can, very rarely, round twice and land one float off. This tool rounds the exact decimal directly.

What it does not do

It covers the three binary formats. It does not do decimal floating point (decimal64), bfloat16, extended 80-bit precision, other rounding modes, or the payload bits and signalling flag of NaNs beyond showing them.

FAQ

Why does 0.1 + 0.2 give 0.30000000000000004? Both are stored slightly off, and the sum rounds to the double just above the one nearest 0.3. Type 0.3 and press Next up to see that neighbour.

Is anything sent anywhere? No. Everything is worked out in your browser and the page keeps working offline.

Where the numbers come from

  • The IEEE 754 binary16, binary32 and binary64 formats and round-to-nearest, ties-to-even rounding (general computer science).
  • Checked against Python for 62 numbers in each format, including overflow, subnormal and halfway cases: bit patterns from numpy and struct, the correctly rounded float of each exact decimal (fractions.Fraction), exact stored values and rounding errors (Fraction), next up and down (np.nextafter), ULP (np.spacing) and the shortest round-trip decimal (numpy's repr).

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Algorithm visualiser #573 Watch bubble, insertion, selection, merge, quick, heap, counting and radix sort work on your own list, one step at a time, with exact comparison, swap and write counts. Also linear and binary search, and the tables for longest common subsequence, edit distance and the 0/1 knapsack. Big-O and runtime comparison plotter #574 Draw how each complexity class grows, add your own formulas in n, and see how long each takes at any input size. Paste measured run times (or open a file, or time built-in algorithms in your browser) and a least-squares fit picks the best Big-O class. Cache and memory hierarchy simulator #576 Run an address trace (pasted, from a file, or generated: array walks, matrix multiply loop orders, random) through one or two cache levels. See every hit and miss with its tag, set and offset, compulsory, capacity and conflict misses, the cache contents at any step, and the average memory access time. Compiler stage visualiser #577 Write a short program in a tiny language (variables, whole-number arithmetic, if, while, print) and watch each stage of a compiler: the lexer's tokens, the parser's syntax tree drawn as a picture, the stack-machine bytecode, and a virtual machine you can step through one instruction at a time. Finite state machine and regex visualiser #559 Turn a regular expression into a Thompson NFA, a DFA (subset construction) and the minimal DFA, drawn as state diagrams with transition tables. Step through a test string state by state, or type your own DFA and minimise it.