From 65be468ae2b5bd42c6eb5f9fcf27bc5c7b33c6dc Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Sat, 4 Jun 2011 12:03:13 +0200 Subject: MathematicaCompat.h: Fix merge error --- .../KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index e48daa2..18cbb7e 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -17,9 +17,11 @@ #endif #ifdef KRANC_C -#define Sign(x) (signbit(x)?-1:+1) +# define Sign(x) (copysign(1.0,(x))) +# define ToReal(x) ((CCTK_REAL)(x)) #else -#define Sign(x) (sgn(x)) +# define Sign(x) (sgn(x)) +# define ToReal(x) (real((x),kind(khalf))) #endif #define MinMod(x, y) ((x) * (y) < 0 ? 0 : (fabs((x)) < fabs((y)) ? (x) : (y))) @@ -41,13 +43,6 @@ #define Cosh(x) (cosh(x)) #define Tanh(x) (tanh(x)) -#ifdef KRANC_C -# define Sign(x) (copysign(1.0,(x))) -# define ToReal(x) ((CCTK_REAL)(x)) -#else -# define Sign(x) (sgn(x)) -# define ToReal(x) (real((x),kind(khalf))) -#endif #if 0 -- cgit v1.2.3