Fixed point (Q format) and IEEE 754 inspector

Q15/Q31 and any Qm.n; float16/32/64 bits, exact value, rounding error and ULP.

How to use it

  1. Choose a Q format (Q15, Q31 or any Qm.n) or an IEEE 754 float size.
  2. Type a value or the raw bits.
  3. Read the exact stored value, the rounding error and the ULP.

Questions

Why is 0.1 not exact?

Neither binary fixed point nor binary floating point can represent 0.1 exactly; the tool shows the nearest value and the error.

What is a ULP?

A unit in the last place: the gap between a value and the next one the format can hold. Correct rounding is off by at most half of it.

Related tools

Lessons that explain it

Also useful for: q15, q31, qm.n, iq math, float, float16, half, single, double, mantissa.