aboutsummaryrefslogtreecommitdiff
path: root/src/isnan.c
blob: 2034748790b1df24fd3b80a1bf4fb58b93329aa2 (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
33
34
35
36
37
38
39
40
41
/* $Header$ */

#include <math.h>

#include "cctk.h"

int CCTK_FCALL CCTK_FNAME(TAT_finite) (const CCTK_REAL * restrict const x)
{
#ifdef HAVE_FINITE
  return finite(*x);
#else
  return 1;
#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_isnan) (const CCTK_REAL * restrict const x)
{
#ifdef HAVE_ISNAN
  return isnan(*x);
#else
  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
}