FAILURE MAP
← Case archive

FA-64099 / Medication dosing calculations / Member archive

Pharmacokinetic loading and maintenance doses: dosing unit rounding · case 04

A 162.5 mg requirement with 25 mg units is given as 150 mg.

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

Input {target, current, vd_l_kg, weight_kg, f, cl_ml_min, tau_h, unit_mg}. Toy one-compartment rule: loading = max(0, (target-current)*Vd*weight/F); maintenance = target*CL*tau/F with CL in L/h = cl_ml_min*60/1000. Both are rounded half-up to a multiple of unit_mg. Return {loading_mg, maintenance_mg}.

Why this case matters

Loading and maintenance calculations chain unit conversions and bioavailability; each factor is an independent defect site.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
drug-naive loading{"loading_mg": 750.0, "maintenance_mg": 1050.0}{"loading_mg": 800.0, "maintenance_mg": 1100.0}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 ↗