FAILURE MAP
← Case archive

FA-63879 / Medication dosing calculations / Member archive

Pediatric mg/kg/day dose divided by interval: daily ceiling · case 04

Large children receive more than the maximum daily amount when the single-dose cap is loose.

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

Input {weight_kg, mg_per_kg_day, interval_h (divides 24), max_single_mg, max_daily_mg, round_mg}. Toy rule: doses/day = 24 / interval_h; daily = min(mg_per_kg_day * weight, max_daily_mg); per-dose = min(daily / doses, max_single_mg), then rounded DOWN to a multiple of round_mg. Return {doses_per_day, dose_mg, daily_mg = dose_mg * doses_per_day}.

Why this case matters

Divided-dose calculators must count administrations per day correctly and apply both ceilings before rounding down to a measurable increment.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
daily ceiling limits large child{"daily_mg": 3000.0, "dose_mg": 1500.0, "doses_per_day": 2}{"daily_mg": 2000.0, "dose_mg": 1000.0, "doses_per_day": 2}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 ↗