Do you know how Double.IsNan() implemented?
public static bool IsNaN(double d)
{
return (d != d);
}From stackoverflow. The same for java.
It’s really funny when you find something like this. You find it when you not really need it, just try quick way to remove noise data – starts with zeros, then found you need to remove NaNs – and catch this. Firstly it’s impressive – a few moments later you understand that it’s proper, it’s just from school’s math and logic, nothing more but you enjoy this moments…
No comments:
Post a Comment