Comment

Comment by pwnna

Don't quote me on this, but I recall the rational for NaN is because NaN is typically the result of a division by 0.

Divisions by 0 can be thought of as infinity (for the sake of this explanation, but mathematicians will cringe), but it is not any particular infinity. In the sense that x / 0 does not necessarily have to equal y / 0. For that definition, the result of a division by 0, NaN, must not equal itself.

You can use `isNaN`, tho.

parent pwnna 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton