FAILURE MAP
← Case archive

FA-62648 / Tax bracket computation / Member archive

Carryforwards offset the whole year's income · case 03

Taxable income drops to zero in a year after a large loss.

Member previewVariant 3 · 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 eighty-percent-limit 1[[0, 0, 0, 0, 0], [[1, 8130], [4, 10000]]][[0, 0, 4000, 6374, 0], [[0, 8504], [1, 10000], [4, 10000]]]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 ↗