There is a special floating point number called NaN, which stands for "Not a Number."
You generally only encounter NaN as the result of doing something silly like dividing zero by zero.
double nan = 0.0 / 0.0;NaN is not equal to itself.
~void main() {
~double nan = 0.0 / 0.0;
// will be false
boolean equalToItself = nan == nan;
IO.println(equalToItself);
~}NaN is not greater than itself.
~void main() {
~double nan = 0.0 / 0.0;
// will be false
boolean greaterThanItself = nan > nan;
IO.println(greaterThanItself);
~}NaN is not less than itself.
~void main() {
~double nan = 0.0 / 0.0;
// will be false
boolean lessThanItself = nan < nan;
IO.println(lessThanItself);
~}NaN is not greater than, less than, or equal to any number.
~void main() {
~double nan = 0.0 / 0.0;
// will all be false
IO.println(nan < 5);
IO.println(nan > 5);
IO.println(nan == 5);
~}None of this is usually useful, but it is fun to know about.