I know that the time complexity of the normal ternary search is O(log3 n), but what if it is used with floating point numbers?
An Example: What is the time complexity of this block of this block of code?
double s = -100, m1, m2, e = 100, EPS = 1e-6;
while(abs(s-e) > EPS)
{
m1 = s + (e - s) / 3;
m2 = e - (e - s) / 3;
if(condition)
e = m2;
else
s = m1;
}
All this does is search for a real number between -100 and 100, but the time complexity changes when the precision of the EPS variable changes.