10. What is the meaning of NaN and AnA in java
Answers
Answered by
1
Answer:
If you are asking "what good is NaN?" in Java (or any other language), I can give you a use case where it is very handy: when I have a 2-D array of floats, but my calculation has no meaningful value for some portion of that 2-D array, I'll fill that value with "NaN". This can be used to signal downstream users of my calculation (such as when it is turned into a raster image) "don't pay attention to the value at this point". Very useful! – Dan H Jun 6 '18 at 13:36
Similar questions