Suppose we have the function below:
def func(x, value_):
assert 0 < x < value_
while x < value_:
x *= 2
Although value_ can be arbitrarily large, the while loop is not infinite and the number of comparisons is bounded above by value_. Consequently, is it correct that this function has computational complexity of O(N)?