FAILURE MAP
← Case archive

FA-64172 / Medication dosing calculations / Member archive

Percentage taper schedule rounded to tablets: stop threshold · case 02

The taper stops one step early when the dose reaches exactly the minimum.

Member previewVariant 2 · 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
rounding stall forces one tablet step[10.0, 7.5, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0][10.0, 7.5, 5.0, 2.5, 0.0, 0.0, 0.0, 0.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 ↗