FAILURE MAP
← Case archive

FA-96860 / Recipe scaling and nutrition / Member archive

Servings scaler: countable floor of one · case 05

Scaling one egg for eight down to one serving lists 0 eggs.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

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 fixture

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

Boundary fixtureActualExpectedOutcome
regression: countable floor of one[["garlic clove", "0", "each"], ["milk", "5/8", "cup"], ["flour", "3/4", "cup"], ["cumin", "1/2", "tsp"], ["salt", "1 3/8", "tsp"]][["garlic clove", "1", "each"], ["milk", "5/8", "cup"], ["flour", "3/4", "cup"], ["cumin", "1/2", "tsp"], ["salt", "1 3/8", "tsp"]]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 ↗