19 lines
323 B
C
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;
|
|
}
|