FAILURE MAP
← Case archive

FA-64159 / Medication dosing calculations / Member archive

Percentage taper schedule rounded to tablets: percent of current dose · case 04

Later taper steps drop by the same number of milligrams as the first step.

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

Input {start_mg, step_pct, every_days, min_mg, tablet_mg, days}. Day 0 uses start_mg. On each day d > 0 with d % every_days == 0 (while the dose is non-zero), the dose becomes current*(100-step_pct)/100 rounded half-up to a tablet_mg multiple; if that does not lower the dose, it is lowered by one tablet_mg instead; a result below min_mg stops the taper (0). Return the list of daily doses for days days.

Why this case matters

Tapers compound percentage reductions with dispensing granularity; stepping day, rounding and stop rules are distinct decisions.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
weekly 25 percent taper[60.0, 60.0, 60.0, 45.0, 45.0, 45.0, 30.0, 30.0, 30.0, 15.0, 15.0, 15.0, 0.0, 0.0][60.0, 60.0, 60.0, 45.0, 45.0, 45.0, 35.0, 35.0, 35.0, 25.0, 25.0, 25.0, 20.0, 20.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 ↗