I'm attempting to solve the following equation for x to make the if statement true. I have tried using a linear congruence equation however could not get the right answer.
I am using the assumptions that integer overflow occurs at 2^63-1, and x is of type long
Could someone give me a pointer with how to do this?
long arg1 = 1234123412341234;
long arg2 = -3456345634563456;
if(x * arg1 == arg2) {
//true
}