I was looking at the openjdk-1.7.0_25
source code and I have seen this method:
/**
* Returns {@code true} if the specified number is a
* Not-a-Number (NaN) value, {@code false} otherwise.
*
* @param v the value to be tested.
* @return {@code true} if the argument is NaN;
* {@code false} otherwise.
*/
static public boolean isNaN(float v) {
return (v != v);
}
I can't understand how it works, when this method can return true
?