title: optim function with infinite value
body: <p>To minimize a function with respect to 3 parameters, I use the optim function and "L-BFGS-B" method.
  Here is the error message :</p>
  
  <blockquote>
    <p>Error in optim(c(3, 0.01, 0.75), fn = f, lower = c(0.6, 0.0001, 0.1),  : 
      L-BFGS-B needs finite values of 'fn'</p>
  </blockquote>
  
  <p>I already checked the values of the function when at least one of the three parameters reaches the "border" (ie the lower or the upper values) but it never gives an infinite value.</p>
  
  <p>How to know which values gave an infinite value in the optim function?</p>