Created
May 16, 2012 14:32
-
-
Save mloskot/2710802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* For NAN */ | |
#ifdef __GNUC__ | |
#define _GNU_SOURCE | |
#endif | |
#include <math.h> |
Here is the IEEE-compatible way: https://gist.github.com/2711003
In fact, if you look at GCC code of NAN you can see similar NAN trick, but with slightly different pattern.
awesome, thanks!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
any idea how to get access to
NAN
with visual studio (2010) such that _isnan works with it? Reason I ask is that I'm currently hacking and slashing around with osm2pgsql, trying to get it compiled on windows. I ran into some NAN issues that I've not given much thought to (past getting it to compile): https://github.com/springmeyer/osm2pgsql/commit/a6c3496c8692ad2ff99c52e28cefd3a52eed114e