FAILURE MAP
← Case archive

FA-64235 / Medication dosing calculations / Member archive

Oral liquid volume measured in a dosing syringe: maximum dose rounding guard · case 05

Rounding the volume up delivers more than the maximum dose.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input {weight_kg, mg_per_kg, max_mg, conc_mg, conc_ml (label strength conc_mg per conc_ml), syringe_ml (1, 5 or 10)}. dose = min(mg_per_kg*weight, max_mg); volume = dose/(conc_mg/conc_ml). Graduations: 1 mL syringe 0.01 mL, 5 mL syringe 0.2 mL, 10 mL syringe 0.5 mL. Round half-up to the graduation, but if that delivers more than max_mg round down instead. A rounded volume above syringe capacity returns {status SPLIT, syringes = ceil(volume/capacity)}; otherwise {status OK, volume_ml, dose_mg delivered}.

Why this case matters

Liquid dosing converts mg to mL through a label strength and then to what a syringe can actually measure; each step has a distinct defect.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
rounding up would exceed maximum{"dose_mg": 280.0, "status": "OK", "volume_ml": 7.0}{"dose_mg": 260.0, "status": "OK", "volume_ml": 6.5}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 ↗