FA-65049 / Epidemic compartment models / Member archive
Final epidemic size by bisection: convergence tolerance · case 04
Final sizes are only accurate to three decimals regardless of the requested tolerance.
Case contract
Attack fraction z is the positive root of z = 1-exp(-R0*z) found by bisection on (1e-9, 1] until the bracket is narrower than tol; for R0<=1 return [0.0, 0, 0.0]; return [z rounded 6, round(z*pop), overshoot z-(1-1/R0) rounded 6].
Why this case matters
Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: flu-like R0 1.5 | [0.58252, 5825, 0.249186] | [0.582812, 5828, 0.249478] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗