I am working with the following function
Catch[Do[a = 2^(m(1 - c)) - 2.718/((m^.5)23.14c^(cm + .5) (1 - c)^((1 - c)*m + .5)); If[a <= 0, Throw[m/(m (1 - c) + 1)]], {c, 0.006, 1, 0.001}]], {m, 4, 2500}]
and would like to find its minimum between m=4 and m=2,500.
However, if I try writing
FindMinimum[ Catch[Do[a = 2^(m(1 - c)) - 2.718/((m^.5)23.14c^(cm + .5) (1 - c)^((1 - c)*m + .5)); If[a <= 0, Throw[m/(m (1 - c) + 1)]], {c, 0.006, 1, 0.001}]], {m, 4, 2500}]
it returns "FindMinimum::nrnum: The function value Null is not a real number at \ {m} = {4.}. >>".
I'm not sure why this is, as the function is equal to 1.11235 at m=4, with no imaginary part.
How can I get the 'FindMinimum' function to work?