Root-finding algorithm for shifted Signum function

115 Views Asked by At

So a simplified version of my problem is essentially this : I am working with a discrete function of the form $f(x)=\text{sgn}(x-i)$ for a natural number $i$ (where $\text{sgn}(x)$ is $1$ for $x\geq0$ and $-1$ otherwise). I am trying to find $i$, which I know to be in the interval $[a,b]$. Evaluation of $f(x)$ is very expensive, so minimising the number of evaluations is the most important priority. I am currently using the bisection method, but is there a faster way? The size of the interval $i$ is on will typically be at most about $1000$.