FA-96865 / Recipe scaling and nutrition / Member archive
Servings scaler: eighth-cup rounding · case 05
0.19 cup prints as 1/8 instead of 1/4 and small amounts collapse to pinch too early.
Case contract
Scale [name, qty, unit, kind] rows from base to target servings. Factor f=target/base (both must be positive, else an error string). Seasoning rows scale by 1+(f-1)*3/4 (damped); other rows by f. Unit "each" rounds half-up to an integer with a floor of 1. Other units round half-up to the nearest 1/8 and print as reduced kitchen fractions ("1 1/2", "3/4", "2"); a zero result prints "pinch".
Why this case matters
Home and commercial recipe scalers must keep countable items whole and print measurable fractions cooks can actually portion.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: eighth-cup rounding | [["flour", "1/4", "cup"], ["pepper", "pinch", "tsp"], ["cumin", "1/8", "tsp"], ["egg", "1", "each"]] | [["flour", "1/4", "cup"], ["pepper", "pinch", "tsp"], ["cumin", "1/4", "tsp"], ["egg", "1", "each"]] | 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 ↗