The special value NaN gets special treatment in all float related operations to ensure that your code does not lose track of the fact that a bad numeric operation occurred. Use the static Float.isNaN( float ) method to detect NaN values. Note there is also a NaN for double. Bill
Hi William, I agree with you, a careless programmer can make such a mistake while coding / debugging hence such a provision is provided in situations wherein one needs to find out whether a NaN value is occured during a programme.
Use the static Float.isNaN( float ) method to detect NaN values.
Ravindra Mohan.
My pie came with a little toothpic holding up this tiny ad: