FA-62640 / Tax bracket computation / Member archive
A couple declared with a single part is accepted · case 05
A couple with 1.5 parts gets a negative extra-part count that raises the capped tax.
Case contract
solve(income, halves, couple): stipulated household quotient. Parts p = halves/2; the base is 2 parts for a couple and 1 otherwise (fewer halves than the base returns 'ERR:parts'). Tax with all parts = p * T(income/p) using slices 0% to 11294, 11% to 28797, 30% to 82341, 41% to 177106, 45% above. The benefit of each half-part beyond the base is capped at 1759: tax = max(full, T_base - 1759 * extra_halves) where T_base = base * T(income/base). Return whole units rounded down.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression parts-validation 1 | 31755 | "ERR:parts" | 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 ↗