In both cases there are two '^' operators in the numerator (top) of the fraction, so I would expect two uses of Math.pow in each numerator. But you only have one.

Break the expressions up into...