Fix for equation comparison bug where replacing 1.44 with 1.2^2 didn't work.

I should take a look at the denominator-related logic at some point to see if
there isn't a simpler way to do things.

Test Plan:
New test cases in test.html

Auditors: eater