[#5815290] Fix error if last expression is the result of a square root

For some reason roots don't have `.last()` on their expression. There might be a
better fix.
Merge pull request #5 from thinkthroughmath/rw/fix-decimals

[#5815290] Fix error if last expression is the result of a square root