Eureka/demo/fixture/SPEC.md
Eureka 37c8c04e6a demo: tabsplit fixture with a seeded rule-3 bug, setup script, Soul brief
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 03:19:09 +00:00

526 B

tabsplit: spec

split_cents(total, n) splits a bill of total cents between n payers and returns the list of each payer's share in cents.

Rules, from the person who owns the bill-splitting feature:

  1. Exact. The shares sum to total. Not a cent lost, not a cent invented.
  2. One share per payer. The list has exactly n entries.
  3. Fair. No two shares differ by more than one cent. Nobody pays 2 cents more than their friend because of rounding.
  4. Refuses nonsense. n < 1 raises ValueError.