analistica/ex-1/pdf.c
2020-03-06 02:24:32 +01:00

19 lines
323 B
C

#include <stdio.h>
#include <gsl/gsl_randist.h>
int main(int argc, char** argv) {
size_t n = 1000;
double
left = -10,
right = +10,
dx = (right - left)/n;
double x = left;
for (size_t i = 0; i < n; i++) {
x += dx;
printf("%f %f\n", x, gsl_ran_landau_pdf(x));
}
return EXIT_SUCCESS;
}