fix off-by-one error

This commit is contained in:
NunoSempere 2023-08-11 14:32:18 +02:00
parent fc17561028
commit 94ba44dd9e

View File

@ -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){
// assumption: nuclear
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);
}
double yearly_probability_nuclear_collapse_after_recovery_example(uint64_t* seed){