aboutsummaryrefslogtreecommitdiff
path: root/src/isnan.c
blob: a2feeb6e8843269c68288b7ef4cebf4a805b1fbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
}