FAILURE MAP
← Case archive

FA-64030 / Medication dosing calculations / Member archive

Body-surface-area dose with capping and dose banding: BSA hundredths rounding · case 05

BSA values are systematically 0.01 m2 low (1.82 reported as 1.81).

Member previewVariant 5 · 3 implementations · 7 checks per implementation

Case contract

Input {height_cm, weight_kg (integers), mg_m2, bands}. BSA (Mosteller) = sqrt(height*weight/3600) rounded half-up to 0.01 m2, computed exactly as (isqrt(100*h*w)+3)//6 hundredths, and capped at 2.00 m2. dose = mg_m2 * BSA. Dose banding: the band with the smallest absolute difference that is within 5% of the dose (difference*20 <= dose) is used, ties going to the lower band; otherwise the dose is rounded half-up to a whole mg. Return {bsa, dose_mg, banded}.

Why this case matters

Dose banding systems take a calculated BSA dose and snap it to prefilled products; BSA rounding, the cap and the tolerance each fail separately.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
BSA hundredths rounding{"banded": false, "bsa": 1.86, "dose_mg": 19}{"banded": false, "bsa": 1.87, "dose_mg": 19}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 ↗