Remove use of math.Pow for doing ^2 operations.

math.Pow does a lot of checks that are not needed in this case making it an order of magnitude slower than just doing the multiplication manually.