From fccd4b554cb73524f91ccbf44a359c47d9ef0d42 Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 21 Aug 2006 14:56:48 +0000 Subject: Add routines TAT_finite and TAT_isnormal. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinUtils/TGRtensor/trunk@42 b716e942-a2de-43ad-8f52-f3dfe468e4e7 --- src/isnan.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/isnan.c b/src/isnan.c index a2feeb6..2034748 100644 --- a/src/isnan.c +++ b/src/isnan.c @@ -4,12 +4,12 @@ #include "cctk.h" -int CCTK_FCALL CCTK_FNAME(TAT_isnan) (const CCTK_REAL * restrict const x) +int CCTK_FCALL CCTK_FNAME(TAT_finite) (const CCTK_REAL * restrict const x) { -#ifdef HAVE_ISNAN - return isnan(*x); +#ifdef HAVE_FINITE + return finite(*x); #else - return 0; + return 1; #endif } @@ -22,11 +22,20 @@ int CCTK_FCALL CCTK_FNAME(TAT_isinf) (const CCTK_REAL * restrict const x) #endif } -int CCTK_FCALL CCTK_FNAME(TAT_finite) (const CCTK_REAL * restrict const x) +int CCTK_FCALL CCTK_FNAME(TAT_isnan) (const CCTK_REAL * restrict const x) { -#ifdef HAVE_FINITE - return finite(*x); +#ifdef HAVE_ISNAN + return isnan(*x); #else - return 1; + return 0; +#endif +} + +int CCTK_FCALL CCTK_FNAME(TAT_isnormal) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_ISNORMAL + return isnormal(*x); +#else + return 0; #endif } -- cgit v1.2.3