Converts grams of sugar per litre to the °Bx of the solution.
°Bx is grams per hundred grams and a liqueur's sweetness is in grams per
litre, so the two differ by the density, which itself depends on the
concentration we're solving for. We find the fixed point of
syrupSugarKgPerL, starting from the answer for a density of one. It
converges in a few passes because density changes much more slowly than
concentration.
proofAndSweeten uses this to evaluate the sugar's volume at the
drink's final concentration instead of at a fixed one.
Converts grams of sugar per litre to the °Bx of the solution.
°Bx is grams per hundred grams and a liqueur's sweetness is in grams per litre, so the two differ by the density, which itself depends on the concentration we're solving for. We find the fixed point of syrupSugarKgPerL, starting from the answer for a density of one. It converges in a few passes because density changes much more slowly than concentration.
proofAndSweeten uses this to evaluate the sugar's volume at the drink's final concentration instead of at a fixed one.