The Cheffers Cookbook

Course three

Kitchen Math

On the menu: adding, subtracting, multiplying and dividing — always seasoning the top of the pile.

New kitchen skills

Add · Remove · Combine · Divide · Add dry ingredients · whole-number division.

One rule to remember

All of Chef's math follows a single rule: arithmetic happens to whatever is on top of the mixing bowl. You never write “x = a + b”. Instead, you put a value into the bowl, then season the top plate with other ingredients, one step at a time:

InstructionWhat happens to the top of the bowl
Add sugar to the mixing bowl.top = top + sugar
Remove sugar from the mixing bowl.top = top − sugar
Combine sugar into the mixing bowl.top = top × sugar
Divide sugar into the mixing bowl.top = top ÷ sugar

Two comforting details. First, the ingredient itself is never used up — Add sugar reads the amount from the bag, it doesn't empty the bag. Second, the rest of the pile underneath is untouched; only the top plate changes.

A word problem, as dinner

You baked 3 batches of 12 cookies. Somebody (no names) nibbled 4 of them. The rest are split fairly between 5 friends. How many cookies does each friend get? In math class you'd write (12 × 3 − 4) ÷ 5. Chef has no parentheses — instead you do the steps in order, exactly like punching them into a calculator:

Fair Share Cookies · recipe Open in playground ▶
Fair Share Cookies.

Three batches of a dozen cookies, minus a few sneaky nibbles, split fairly between five hungry friends. How many does each friend get?

Ingredients.
12 g cookies
3 g batches
4 g sneaky nibbles
5 g hungry friends

Method.
Put cookies into the mixing bowl. Combine batches into the mixing bowl. Remove sneaky nibbles from the mixing bowl. Divide hungry friends into the mixing bowl. Pour contents of the mixing bowl into the baking dish.

Serves 1.
Output
6

The top of the bowl, step by step

InstructionTop of bowlMeaning
Put cookies…12start with one batch
Combine batches…3612 × 3 batches
Remove sneaky nibbles…3236 − 4 nibbled
Divide hungry friends…632 ÷ 5, whole cookies only
Chef doesn't do crumbs

Wait — 32 ÷ 5 is 6.4, so where did the .4 go? In the bin. Every value in Chef is a whole number, and division simply drops the fraction. Nobody gets crumbs: 32 cookies between 5 friends is 6 each, and the 2 left over silently vanish into the cook's pocket. Keep this in mind whenever you divide — order matters! Dividing too early can grind your numbers down to 0.

The buffet move

One more math instruction, and it's a crowd-pleaser: Add dry ingredients to the mixing bowl. sums up every dry ingredient in the recipe in one go and puts the total into the bowl as a new value. It's the buffet approach: everything on one plate. (Only dry ingredients count — liquids stay out of it, and so do undecided cups and teaspoons.)

Ingredients.
2 g flour
3 g sugar

Method.
Add dry ingredients to the mixing bowl.   ← puts 5 into the bowl
Try it
  • Change hungry friends to 4. Now 32 ÷ 4 = 8, no cookies lost.
  • Compute the leftovers instead: after dividing, Combine hungry friends (6 × 5 = 30), then… can you get to the 2 missing cookies from there? You'll want a second copy of the total in the bowl — plan your Puts.
  • Swap the method order so the division happens first. Watch truncation wreck the answer, and appreciate why the recipe multiplies before it divides.