Update formulas.rst code blocks
Merge pull request #15559 from nmadhok/patch-1

Update formulas.rst code blocks