Scale ingredient quantities without mangling fractions

recipe-box · Claude · branch feat/scaling · claude-opus-5 · cwd /home/user/code/recipe-box · id d1e026e5-3bf5-bb25-9dc7-17baa1fc920a · 2026-09-05 14:03 · 2 msgs · 19 tools · 1 min read · updated 2 days ago

Doubling a recipe produced unreadable decimals instead of familiar fractions.

tools: Read, Edit, Bash
← recipe-box Download .md
cd /home/user/code/recipe-box && claude --resume d1e026e5-3bf5-bb25-9dc7-17baa1fc920aResume works while the transcript is within Claude Code's retention window (~30 days).
Tool calls
Bash Bash: 8 calls (53.3%) 8 Edit Edit: 5 calls (33.3%) 5 Read Read: 2 calls (13.3%) 2
Token usage25.6K total
Input21.6K
Cache creation0
Cache read0
Output3.9K
Cache hit ratio0%· cold cache

Doubling a recipe produced unreadable decimals instead of familiar fractions.

Conversation

Turn 1 — User

Doubling a recipe gives me 0.6666666666666666 cups.

Turn 2 — Assistant

Quantities are now kept as exact fractions through the scaling arithmetic and only converted for display, snapping to the denominators people actually use in a kitchen.

Two thirds doubled now reads as one and a third rather than a decimal expansion.

Turn 3 — User

What about something that does not divide nicely?

Turn 4 — Assistant

It falls back to the nearest common fraction and marks the value approximate, which is what a written recipe does anyway.

Subjects

  • [[Web App]]
  • [[Validation]]

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date