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

NaN

The special float value meaning "no sensible answer", such as 0 / 0; it is not equal to anything, not even itself.

A NaN has an all-ones exponent field and a nonzero fraction; invalid operations (0/0, inf - inf, sqrt(-1)) produce one, most operations propagate it, and every ordered comparison with a NaN is false while != is true.

Examples

  • 0.0 / 0.0 gives NaN, and NaN == NaN is false.

Read the full section →