LAL  7.5.0.1-89842e6
XLALChisqTest.c File Reference

Prototypes

static void Usage (const char *program, int exitcode)
 
static void ParseOptions (int argc, char *argv[])
 
int main (int argc, char *argv[])
 

Go to the source code of this file.

Macros

#define CHECKOUTPUT(msg, expr, value, acc)
 
#define CHECKXLALLogChisqCCDF(chi2, dof, value, acc)
 

Variables

int verbose = 1
 

Macro Definition Documentation

◆ CHECKOUTPUT

#define CHECKOUTPUT (   msg,
  expr,
  value,
  acc 
)
Value:
do { \
double result = expr; \
if(fabs((result - value) / value) > acc) { \
fprintf(stderr, "%s: expected %.17g, got %.17g (fractional error is %g; upto %g allowed)\n", msg, value, result, fabs((result - value) / value), acc); \
exit(1); \
} else if(verbose) { \
fprintf(stderr, "%s: expected %.17g, got %.17g (fractional error is %g; upto %g allowed)\n", msg, value, result, fabs((result - value) / value), acc); \
} \
if(XLALGetBaseErrno()) { \
fprintf(stderr, "%s: returned error\n", msg); \
exit(1); \
} \
} while(0)
int verbose
Definition: XLALChisqTest.c:61
int XLALGetBaseErrno(void)
Gets the XLAL base error number ignoring the internal-function-failed flag.
Definition: XLALError.c:356

Definition at line 141 of file XLALChisqTest.c.

◆ CHECKXLALLogChisqCCDF

#define CHECKXLALLogChisqCCDF (   chi2,
  dof,
  value,
  acc 
)
Value:
do { \
char msg[100]; \
sprintf(msg, "XLALLogChisqCCDF(%.17g, %.17g)", chi2, dof); \
CHECKOUTPUT(msg, XLALLogChisqCCDF(chi2, dof), value, acc); \
} while(0)
double XLALLogChisqCCDF(double chi2, double dof)
Compute the natural logarithm of the complementary cumulative probability function of the distributi...
Definition: XLALChisq.c:54

Definition at line 156 of file XLALChisqTest.c.

Function Documentation

◆ Usage()

static void Usage ( const char *  program,
int  exitcode 
)
static

Definition at line 70 of file XLALChisqTest.c.

◆ ParseOptions()

static void ParseOptions ( int  argc,
char *  argv[] 
)
static

Definition at line 88 of file XLALChisqTest.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 167 of file XLALChisqTest.c.

Variable Documentation

◆ verbose

int verbose = 1

Definition at line 61 of file XLALChisqTest.c.