26 #include <lal/LALStdlib.h>
37 static char buffer[4][512];
49 snprintf(cmd,
sizeof(cmd),
"echo 'scale=17 ; %s' | bc", expr);
50 stream = popen(cmd,
"r");
51 fgets(res, 512, stream);
63 gps.
gpsSeconds = floor((rand() / (
double) RAND_MAX - 0.5) * 200000000);
64 gps.
gpsNanoSeconds = floor(rand() / ((
double) RAND_MAX + 1) * 1000000000);
72 double tolerance = 1e-9;
77 for(i = 0; i < 6000; i++) {
85 x = pow(100., (rand() / (
double) RAND_MAX) * 2. - 1.);
int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr)
Parse an ASCII string into a LIGOTimeGPS structure.
static LIGOTimeGPS compute_with_bc(const char *expr)
static LIGOTimeGPS random_LIGOTimeGPS(void)
static const char * print_LIGOTimeGPS(const LIGOTimeGPS *gps)
char * XLALGPSToStr(char *, const LIGOTimeGPS *t)
Return a string containing the ASCII base 10 representation of a LIGOTimeGPS.
LIGOTimeGPS * XLALGPSMultiply(LIGOTimeGPS *gps, REAL8 x)
Multiply a GPS time by a number.
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
Difference between two GPS times as double.
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.
INT4 gpsSeconds
Seconds since 0h UTC 6 Jan 1980.
INT4 gpsNanoSeconds
Residual nanoseconds.