Hereby, we choose the formula so that a difference of zero leads to a weight of one.
we also store the amounts of each term in each recipe, so that we can quickly retrieve the amount of a term in a given recipe when comparing recipes.