The If statement inside FindRoot in the following example is evaluating x<100 to be indeterminate. I'm confused as to why and cannot fix it.
The code is:
myroot := FindRoot[If[x < 100, x, x - 1, x - 2], {x, 0}]; myroot
And the output I get is:
{x -> 2.}
where I would expect to see {x -> 0.}. I am using Mathematica 10.0. Thanks!