You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
398 B
C
24 lines
398 B
C
#include "genlib.h"
|
|
#include "log.h"
|
|
#include <math.h>
|
|
#include <stdio.h>
|
|
|
|
/*cardsin covariance function*/
|
|
double cardsin(double h) {
|
|
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.;
|
|
}
|
|
|
|
log_info("RESULT = success, z = %f", z);
|
|
|
|
return z;
|
|
}
|