Implement SQRT function