title: Prevent FloatDomainError NaN
body: <p>In this calculation:</p>
  
  <pre><code>months = (saved_cents / spend_cents).to_f.floor
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>FloatDomainError: NaN
  </code></pre>
  
  <p>I think <code>saved_cents</code> and <code>spend_cents</code> are floats, that's why I don't understand why I get this error.</p>
  
  <p><b>What could be the reason for this error? And how can I fix it?</b></p>