FA-59002 / Payroll withholding rules / Member archive
Overtime regular rate with bonuses and differentials: shift differential in regular rate · case 02
Night-shift workers with overtime are underpaid on their premium.
Case contract
Input weekly {hours, rate, bonus, discretionary, diff_hours, diff}. Straight pay = hours*rate + diff_hours*diff. Regular rate = (straight pay + bonus unless discretionary) / hours. Overtime premium = regular rate * max(0, hours-40) / 2, rounded half-up to the cent. Total = straight pay + bonus + premium. Zero hours returns [0, bonus]. Return [premium, total].
Why this case matters
Nondiscretionary bonuses and shift differentials raise the regular rate, and only a half-time premium is owed on top of straight-time pay.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [9444, 125022] | [9632, 125210] | 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 ↗