FA-97827 / Knitting and sewing pattern grading / Member archive
Top-down sock fit calculator: stitch multiple rounding · case 02
A 2x2 rib sock casts on 58 stitches.
Case contract
Leg stitches = foot_circ*(1 - neg_ease/100)*gauge/10 rounded to the nearest multiple of `multiple` (half-up). Heel flap = half the stitches; flap rows = heel stitches; gusset pick-up per side = flap rows/2 + 1. Return {cast_on, heel_sts, flap_rows, pickup}.
Why this case matters
Sock patterns size with negative ease and derive heel flap and gusset counts.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| standard sock | {"cast_on": 63, "flap_rows": 31, "heel_sts": 31, "pickup": 16} | {"cast_on": 64, "flap_rows": 32, "heel_sts": 32, "pickup": 17} | 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 ↗