diff --git a/src/general/Macros.h b/src/general/Macros.h
index 27d6fc203b4254b975cd2675f0acb355940ea9cd..8e8018010f2e9d96426e6a5d8f80fea255524e3c 100644
--- a/src/general/Macros.h
+++ b/src/general/Macros.h
@@ -43,6 +43,8 @@
 #define M_PI 3.14159265358979323846
 #endif 
 
+//fix for osx/linux/win
+#define  _isnan(x) std::isnan(x)
 
 // should be true only when using this file in the simulation core
 //#define _SIMULATOR 1