A short note on a bug that is easy to write, hard to see, and lives in a lot of hand-rolled survival and life-table code.
Fit a parametric mortality model (Gompertz, Gompertz–Makeham, Siler, …) to a life table by maximum likelihood and you eventually need the probability that an individual alive at the start of an age interval dies during it. If you have