title: Flush-to-zero denormals - is it reliable?
body: <p>For signal processing this has been an issue like forever and right I'm still taking precautions of adding a small constant whenever a denormal can happen, e.g.:</p>
  
  <pre><code>float coef = 0.9f;
  for (int i=0; i&lt;cnt; i++) dst[i] = state = state * 0.9f + 1E-15f;
  </code></pre>
  
  <p>This is obviously hardly ideal, but in the past I had numerous problems that even if I tried to set FTZ, it actually didn't work on some computers apparently. Currently I'm using Intel IPP like this:</p>
  
  <pre><code>ippSetDenormAreZeros(b);
  const int success = ippSetFlushToZero(b, NULL) == ippStsNoErr;
  </code></pre>
  
  <p>So how reliable is this? Is there a better way? A reliable way? Unfortunately I need to support like all ancient CPUs from say Core2duo, Windows and OSX. However I'm generally using SSE2 and newer and CLANG with -mfpmath=sse and -ffast-math.</p>