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

floating-point number

A number with a fractional part, stored approximately.

f32 and f64 are IEEE 754 binary floating-point types; many decimal fractions (0.1) are stored approximately.

Examples

  • 0.1 + 0.2 prints 0.30000000000000004, so 0.1 + 0.2 == 0.3 is false; compare with (sum - 0.3).abs() < 1e-9 instead.

Read the full section →