aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}