aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7>2006-08-21 14:56:48 +0000
committerschnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7>2006-08-21 14:56:48 +0000
commitfccd4b554cb73524f91ccbf44a359c47d9ef0d42 (patch)
treef021ed925e93c20520164d1a41411baa2f16c49b
parent9ab01fdfbb391a0c5ff210e404373bf83941c2ba (diff)
Add routines TAT_finite and TAT_isnormal.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinUtils/TGRtensor/trunk@42 b716e942-a2de-43ad-8f52-f3dfe468e4e7
-rw-r--r--src/isnan.c25
1 files 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
}