Is this a continuation of this topic? If so, your function is a CDF, just vertically translated by a constant, so you could use the fact that it’s nondecreasing to shave off an instruction or two from the hot loop in the bisection method code. That could maybe be a performance improvement, if the evaluation of the function is cheap enough.