[OT] Re: [GRASS-user] gdal import an nodata cells

Glynn Clements glynn at gclements.plus.com
Fri Jul 20 15:15:30 EDT 2007


Michael Perdue wrote:

> is float(nan) equal to double(nan)?

NaN isn't equal to anything, not even to itself:

	$ cat foo.c
	#include <stdio.h>
	int main(void)
	{
		double nan = 0.0/0.0;
		if (nan == nan)
			printf("equal\n");
		else
			printf("unequal\n");
		return 0;
	}
	$ gcc -Wall foo.c
	$ ./a.out
	unequal

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list