diff options
Diffstat (limited to 'src/classify.c')
-rw-r--r-- | src/classify.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/classify.c b/src/classify.c new file mode 100644 index 0000000..a2feeb6 --- /dev/null +++ b/src/classify.c @@ -0,0 +1,32 @@ +/* $Header$ */ + +#include <math.h> + +#include "cctk.h" + +int CCTK_FCALL CCTK_FNAME(TAT_isnan) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_ISNAN + return isnan(*x); +#else + return 0; +#endif +} + +int CCTK_FCALL CCTK_FNAME(TAT_isinf) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_ISINF + return isinf(*x); +#else + return 0; +#endif +} + +int CCTK_FCALL CCTK_FNAME(TAT_finite) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_FINITE + return finite(*x); +#else + return 1; +#endif +} |