Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

ulp

The gap between a float and the next one up - one step of its last stored bit. The gap grows as numbers get bigger.

For a normal x with 2^e <= |x| < 2^(e+1), ulp(x) = 2^(e - p + 1) (p = 24 for binary32, 53 for binary64); correct rounding to nearest keeps the error within half an ulp.

Examples

  • Between 1.0f and the next float the gap is 2⁻²³, about 1.19 × 10⁻⁷.

Read the full section →