Simplified sqrt function.