forked from personal/squiggle.c
29 lines
515 B
C
29 lines
515 B
C
|
#include "../../squiggle.h"
|
||
|
#include <math.h>
|
||
|
#include <stdint.h>
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
double laplace(double successes, double trials){
|
||
|
return (successes + 1)/(trials + 2);
|
||
|
}
|
||
|
|
||
|
double yearly_probability_nuclear_apocalypse(double year, uint64_t* seed)
|
||
|
{
|
||
|
double successes = 0;
|
||
|
double failures = (year - 1960);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
// set randomness seed
|
||
|
uint64_t* seed = malloc(sizeof(uint64_t));
|
||
|
*seed = 1000; // xorshift can't start with 0
|
||
|
|
||
|
int n = 1000 * 1000;
|
||
|
|
||
|
free(seed);
|
||
|
}
|