On 17/05/10 16:42, Frank Warmerdam wrote: > I'm using the C API. Is there a nice portable way to check for NaN in C > code? Frank, double is_nan(double v) { return v != v; } Best regards, -- Mateusz Loskot, http://mateusz.loskot.net