FAILURE MAP
← Case archive

FA-59010 / Payroll withholding rules / Member archive

Overtime regular rate with bonuses and differentials: premium cent rounding · case 05

Overtime premiums ending in a half cent or more are a cent short.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

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 fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[11238, 96930][11239, 96931]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 ↗