forked from personal/squiggle.c
fix off-by-one error
This commit is contained in:
parent
fc17561028
commit
94ba44dd9e
|
@ -24,7 +24,7 @@ double yearly_probability_nuclear_collapse_2023(uint64_t* seed){
|
||||||
double yearly_probability_nuclear_collapse_after_recovery(double year, double rebuilding_period_length_years, uint64_t* seed){
|
double yearly_probability_nuclear_collapse_after_recovery(double year, double rebuilding_period_length_years, uint64_t* seed){
|
||||||
// assumption: nuclear
|
// assumption: nuclear
|
||||||
double successes = 1.0;
|
double successes = 1.0;
|
||||||
double failures = (year - rebuilding_period_length_years - 1960);
|
double failures = (year - rebuilding_period_length_years - 1960 - 1);
|
||||||
return sample_laplace(successes, failures, seed);
|
return sample_laplace(successes, failures, seed);
|
||||||
}
|
}
|
||||||
double yearly_probability_nuclear_collapse_after_recovery_example(uint64_t* seed){
|
double yearly_probability_nuclear_collapse_after_recovery_example(uint64_t* seed){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user