#include "genlib.h" #include "log.h" #include #include #include /*cardsin covariance function*/ double cardsin(double h) { clock_t t = clock(); log_info("RESULT = in progress, h = %f", h); float delta = 20.371; double z; if (h != 0) { z = (double)(h * delta); z = sin(z) / z; } else { z = 1.; } t = clock() - t; double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time log_info("RESULT = success, z = %f, ELAPSED = %f seconds", z, time_taken); return z; }