Don't use sqrt because precision issues implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search implement sqrt using binary search