in the good function bool good(double x){ double temp=( x*x + sqrt(x) ); if(temp-c>0) return 0; else if(temp-c<=0) return 1; }
why are we doing,
if(temp-c>0) return 0; else if(temp-c<=0) return 1;
instead of return temp-c== 0;
Help needed in Binary search EDU
in the good function bool good(double x){ double temp=( x*x + sqrt(x) ); if(temp-c>0) return 0; else if(temp-c<=0) return 1; }
why are we doing,
if(temp-c>0) return 0; else if(temp-c<=0) return 1;
instead of return temp-c== 0;