From 57c33d88ae00ba4f6445c010c99787bc8e0014ff Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 25 Feb 2009 12:14:43 +0000 Subject: [PATCH] hack for MSVC: define INFINITY and NAN if necessary --- contrib/MathEval/xmath.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/MathEval/xmath.cpp b/contrib/MathEval/xmath.cpp index 5e2cb808ce..48c70da1bf 100644 --- a/contrib/MathEval/xmath.cpp +++ b/contrib/MathEval/xmath.cpp @@ -122,6 +122,14 @@ x_heavs(double x) //, double eps) return (fabs(x) < eps) ? 0.5*(1+ x/eps +1/3.14*sin(3.14*x/eps)):(x<0? 0:1); } +#if !defined(INFINITY) +#define INFINITY 1.e100 +#endif + +#if !defined(NAN) +#define NAN (1./0.) +#endif + double x_delta(double x) { -- GitLab