Math's connection with cooking extends beyond the mathematical constant that sounds like a dessert. For example, using differential equations to model fluid flow and heat transfer, research teams have found how spaghetti curls as it's cooked, how to rotate a pan to make the perfect crepe (thin pancake), and the temperature setting to get the perfect steak. Mathematics helps understand cooking, and parallels it in that following a recipe can lead to good results, but asking questions like "What if we tried this?" can lead to a masterpiece.
Most of us use volume measurements—a cup of this, a tablespoon of that—when cooking, but good cooks will tell you that it is better to measure by weight than by volume. Why? Because even though ingredients like sugar and flour are solids, their grains don't fill up 100% of the space they occupy (in fact, more like 65%), and that amount varies depending on how well the sugar or flour is packed into the cup. So a cup of flour one day could weigh more or less than a cup the next day, and thus change what you're mixing or cooking, whereas 120 grams of flour is constant. Packing is an active area of math research, both in finding packings that take up the least space and in finding those that minimize the number of containers used. Results in packing can be useful for error-correcting codes, which are crucial in cell phone and Internet communication.
Eugenia Cheng talks about the mathematics of cooking.
For More Information: How to Bake Pi: An Edible Exploration of the Mathematics of Mathematics, Eugenia Cheng, 2016.