Correct errors in square(double).