From 0342b562bad57693756aad8c1057e4eb4a52e798 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Thu, 2 Feb 2012 01:39:27 -0600 Subject: MathematicaCompat.h: Cast to CCTK_REAL This might not be necessary --- .../Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Auxiliary') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index 72a05f9..cd2f99f 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -1,5 +1,5 @@ - -#define Power(x, y) (pow(x,y)) + +#define Power(x, y) (pow(x,(CCTK_REAL) y)) #define Sqrt(x) (sqrt(x)) -- cgit v1.2.3 From d368a87b161d0a0ea9e51397f20752c090601b37 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Sat, 4 Feb 2012 19:23:02 -0600 Subject: MathematicaCompat.h: Add explicit cast to CCTK_REAL in Sign --- .../Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Auxiliary') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index cd2f99f..812a268 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -17,7 +17,7 @@ #endif #ifdef KRANC_C -# define Sign(x) (copysign(1.0,(x))) +# define Sign(x) (copysign( (CCTK_REAL) 1.0,(CCTK_REAL) (x))) # define ToReal(x) ((CCTK_REAL)(x)) #else # define Sign(x) (sgn(x)) @@ -48,7 +48,7 @@ #define Sech(x) (1./cosh(x)) #ifdef KRANC_C -# define Sign(x) (copysign(1.0,(x))) +# define Sign(x) (copysign( (CCTK_REAL) 1.0,(CCTK_REAL) (x))) # define ToReal(x) ((CCTK_REAL)(x)) #else # define Sign(x) (sgn(x)) -- cgit v1.2.3 From c0a4594a29badfd4e2141aa09170709a8d9e9f8e Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Sat, 4 Feb 2012 19:23:27 -0600 Subject: MathematicaCompat.h: Add IntAbs function We might want to tidy this up later --- Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Auxiliary') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index 812a268..fd34c44 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -5,6 +5,7 @@ #ifdef KRANC_C # define Abs(x) (fabs(x)) +# define IntAbs(x) (abs(x)) # define Min(x, y) (fmin(x,y)) # define Min3(x, y, z) (fmin(fmin((x), (y)), (z))) # define Max(x, y) (fmax(x,y)) -- cgit v1.2.3