diff --git a/src/lmptype.h b/src/lmptype.h
index 253f9a7470a400ef4330e7619c9d89a6e60e7a7f..6c3cbb59ed5a11d832b65d29df51c8b2e1646499 100644
--- a/src/lmptype.h
+++ b/src/lmptype.h
@@ -39,6 +39,7 @@
 #include <limits.h>
 #include <stdint.h>
 #include <inttypes.h>
+#include <cmath>
 
 // grrr - IBM Power6 does not provide this def in their system header files
 
@@ -200,7 +201,7 @@ typedef int bigint;
 #define _noalias
 #endif
 
-#define ISFINITE(x) isfinite(x)
+#define ISFINITE(x) std::isfinite(x)
 
 // settings to enable LAMMPS to build under Windows