2023-11-17 20:48:23 +00:00
|
|
|
#include "../../squiggle.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
2023-11-18 21:10:21 +00:00
|
|
|
#include <stdlib.h>
|
2023-11-17 20:48:23 +00:00
|
|
|
|
|
|
|
// Estimate functions
|
2023-11-18 21:10:21 +00:00
|
|
|
int main()
|
|
|
|
{
|
2023-11-17 20:48:23 +00:00
|
|
|
// set randomness seed
|
2023-11-18 21:10:21 +00:00
|
|
|
uint64_t* seed = malloc(sizeof(uint64_t));
|
|
|
|
*seed = 1000; // xorshift can't start with 0
|
|
|
|
|
|
|
|
for (int i = 0; i < 100; i++) {
|
|
|
|
double sample = sample_lognormal(0, 10, seed);
|
|
|
|
printf("%f\n", sample);
|
|
|
|
}
|
|
|
|
free(seed);
|
2023-11-17 20:48:23 +00:00
|
|
|
}
|