FAILURE MAP
← Case archive

FA-63893 / Medication dosing calculations / Member archive

Pediatric mg/kg/day dose divided by interval: reported daily total · case 03

The daily total shown to the prescriber disagrees with the sum of the rounded doses.

Member previewVariant 3 · 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
every 8 hours normal order{"daily_mg": 736.0, "dose_mg": 245.0, "doses_per_day": 3}{"daily_mg": 735.0, "dose_mg": 245.0, "doses_per_day": 3}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 ↗