I want to run through two function, f(x) and g(x) for x = 0 to 1000
My goal is to find which value of x makes f and g intercept.
So, while f(x) != g(x)
I want to keep running.
When f(x) = g(x)
I want the loop to stop, and return that value of x
.
My problem:
x is not necessarily an integer. Actually, in my case, I have to deal with many decimals.
Is there a smart way to figure out an approximate float value of x that allows some error?
Thank you!