diff --git a/contrib/MathEval/xmath.cpp b/contrib/MathEval/xmath.cpp
index 2fd8c6f85ce3901944ecd1c735ed8f6e836d9a17..8a6b0197a02f76d02f80c5f7228ab7d254076f4f 100644
--- a/contrib/MathEval/xmath.cpp
+++ b/contrib/MathEval/xmath.cpp
@@ -127,7 +127,7 @@ x_heavs(double x) //, double eps)
 #endif
 
 #if !defined(NAN)
-#define NAN 1.100
+#define NAN 1.e100
 #endif
 
 double