shbhar commented on PR #16971: URL: https://github.com/apache/lucene/pull/16971#issuecomment-6616606375
>Do you know when this returns true?: v != v (v is a float or double). > Actually there's one method testing exactly this. Which one? Wow, had to look it up and v != v is true when v is NaN and the internal implementation in JDK for `Double.isNaN()` is actually done that way! It reinforces my intuition to not rely on common sense too much when dealing with floating point numbers :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
