How do I detect if something is equal to NaN?

NaN is supposed to never equal any value, including itself or other NaN values. In languages like Java, JavaScript, and other languages that support IEEE standard floating point arithmetic, one way to detect NaN is to assign it to a variable and the variable wouldn't be equal to itself if it is NaN. Try this:

[scratchblocks]<((0) / (0)) = ((0) / (0))>[/scratchblocks] 0/0 is NaN.
Maybe the = block short-circuits to true if the same variable is put on both sides.