FAILURE MAP
← Case archive

FA-62660 / Tax bracket computation / Member archive

The 80% limit is rounded to the nearest unit · case 05

In some years one extra unit of carryforward is used.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

solve(years, life): years are pre-deduction incomes by year index (negative = operating loss). A loss year reports taxable 0 and creates a carryforward [origin, amount]. In an income year, carryforwards older than life years (year - origin > life) expire; the rest are applied oldest first, limited in total to floor(80% of that year's income). Return [taxable_by_year, remaining] where remaining lists [origin, amount] with amount > 0 not expired as of the final year.

Why this case matters

Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression limit-rounding 1[[0, 40960, 5000, 0, 4186, 4000, 0], [[6, 3000]]][[0, 40960, 5000, 0, 4187, 4000, 0], [[6, 3000]]]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 ↗