NaN.fyi

Understanding Not a Number across programming languages

NaN === NaNfalse

The value that's not equal to itself (and other mysteries)

Programming Languages

🟨

JavaScript

NaN === NaN // false
🐍

Python

float("nan") != float("nan") # True

Java

Double.NaN != Double.NaN // true

C++

std::isnan(nan) // true
🦀

Rust

f64::NAN != f64::NAN // true
🐹

Go

math.NaN() != math.NaN() // true