title: Binary search to find the minimum value above a given value
body: <p>I have a function that returns a double. The code listing below is an example that I'm using for testing, but the real function will be pulled from an analysis of a data set.</p>
  
  <pre><code>public double f(double x)
  {
      return (100000 - x) / 15000;
  }
  </code></pre>
  
  <p>It can be assumed that a higher value of x will always return a lower value, so as x approaches 0 the value returned can potentially increase, but it may always stay at 0. </p>
  
  <p>Values of x will always be positive.</p>
  
  <p>I'd like to be able to find the lowest value of f(x) that is >= to 7 when supplied with a given minimum and maximum value (precision only matters to 0.001). In the example above I'm using 100000 as the maximum value and 1 as the minimum.</p>
  
  <p>Is this a good candidate for a binary search or is there a better alternative?</p>