Add sqrt function and tests.