how can we find two inputs x1, x2 such that ƒ(x1) = ƒ(x2)

Dear all,

I am a newbie in c++ and am having some difficulty to find a pair of (x1,x2) such that f(x1) = f(x2) where x1, x2 are integers and f=(pow(x,3)+floor(log(x))+pow(2,x)+floor(x/2010))%65535.


I have no problem getting x1 and x2 for f=x*pow(2,8)+(x*x)%65535. This i can use binary operator to perform it.

Kind assistance is needed in this matter.
The function definition seems to be a bit ambiguous. Is this a correct interpretation?
1
2
3
int f(int x){
	return int(x*x*x+floor(log((double)x))+pow(2.0,(double)x)+floor(double(x)/2010.0))%65535;
}

If it is, try it for x>30.
I barley recognise this formula. Which is it? I remember something like this I can't remember if it's calculus or engineering... Or maybe we were just using the same math books and I remeber this for some odd reason.

Knowing what formula you are trying to emulate would also help us write the code.
Topic archived. No new replies allowed.