title: Division by zero prevention: Checking the divisor's expression doesn't result in zero vs. checking the divisor isn't zero?
body: <p>Is division by zero possible in the following case due to the floating point error in the subtraction?</p>
  
  <pre><code>float x, y, z;
  ...
  if (y != 1.0)
      z = x / (y - 1.0);
  </code></pre>
  
  <p>In other words, is the following any safer?</p>
  
  <pre><code>float divisor = y - 1.0;
  if (divisor != 0.0)
      z = x / divisor;
  </code></pre>