Write a function to determine if a given integer x is a palindrome.
Return True if x reads the same forward and backward, otherwise return False. Negative integers are not palindromes, and the solution should avoid converting the integer to a string.
Implement def is_palindrome(x):. The input is an integer, and the output is a boolean.
def is_palindrome(x):