title: gcc: division by zero
body: <p>I am getting <strong>division by zero</strong> error at this line:</p>
  
  <pre><code>if (tim2_st_ovf &lt; T2_PREK_250)
  </code></pre>
  
  <p>These values are defines like this:</p>
  
  <pre><code>volatile uint8_t tim2_st_ovf = 0;
  
  #define T2_PREK_250    ((250 * (F_CPU / 1000)) / ((UINT8_MAX + 1) * 1024))
  #define F_CPU    16000000UL
  </code></pre>
  
  <p>And <code>UINT8_MAX</code> equals to 255.</p>
  
  <p>Why am I getting this? I calculated it several times on calculator and am getting ~15. Also, if I change 1024 to 1023 it doesnt show any error.</p>