FA-63833 / Actuarial life tables / Member archive
Median and quantile future lifetime: Degenerate quantiles are accepted · case 03
p=0 or p=1000 returns a time instead of invalid.
Case contract
Input l (from age x) and p (per mille surviving, 0<p<1000 else 'invalid'; also l_0<=0). Find the first t with l_t <= l_0 p/1000 and interpolate linearly: t-1 + (l_{t-1}-target)/(l_{t-1}-l_t). No crossing -> 'beyond table'. Rounded to 6.
Why this case matters
Life-table arithmetic compounds across ages, so one misplaced index or assumption shifts every downstream value.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| p zero rejected | 2.0 | "invalid" | 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 ↗