25 #include <lal/LALStdlib.h>
35 for(i = 0; i < 100000000; i++) {
40 in = rand() * 2000000000.0 / RAND_MAX;
41 in += (double) rand() / RAND_MAX;
46 if(fabs(in - out) > 1e-9) {
47 fprintf(stderr,
"XLALGPSSetREAL8() + XLALGPSGetREAL8() failed: input = %.17g s, output = %.17g s, difference = %.16g ns ~ %.2g%% (seed was %u)\n", in, out, (in - out) * 1e9, fabs(in - out) / in * 100.0, seed);
static int test_random_doubles(unsigned int seed)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
Sets GPS time given GPS seconds as a REAL8.
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
Returns the GPS time as a REAL8.
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.