If your are looking for a 4-digit solution, I would ran a big loop like this:

Meta code:

C++

float results[10000]; int n = 0; for( float step = 0; i < 1; i+=0.00001 ) { results[n] = callProblem( i ); } //take a look on the sample

some divide and conquer approach

C++

float x = 0; float diff = 1;//Startvalue while( ) { result = callProblem(x); if( result > 0 ) { x -= diff; diff = diff/2; result = callProblem(x); } else { x += diff; diff = diff/2; result = callProblem(x); } }

Now, there is no "divide and conquer approach", as a technical term. It's nonsense in the following sense: you always "divide and conquer", to certain degree; so this is the talk about nothing. Anyway,

What have you triedso far?—SA