Update formulas.rst code blocks