So there is an Intel page about what to do about denorms.  (BTW, i know exactly what denormals are and am quite familiar with IEEE-754 floating point standard.)my questions are two:what are the names of the system calls (in Visual Studio) to turn on these FTZ and DAZ bits so that denorms don't cause exceptions?what is the difference between the FTZ (Flush to zero) and DAZ (Denorms are zero) bits?  is the DAZ bit only one of interpretation?are denorms considered so rare that no real estate on the silicon is deemed necessary to deal with them numerically properly?  why is there even an exception for these?  (i guess that's a 3rd question.)
how to stop denormals from messing up a real-time process (like an audio app or plug)
untagged
On Windows you can do the following:#include <mmintrin.h>#define DISABLE_DENORMALS   \        int oldMXCSR = _mm_getcsr();        /*read the old MXCSR setting  */    \        int newMXCSR = oldMXCSR |= 0x8040;  /* set DAZ and FZ bits        */    \        _mm_setcsr( newMXCSR );             /* write the new MXCSR setting to the MXCSR */    #define RESTORE_DENORMALS   \        _mm_setcsr( oldMXCSR );On Mac (or any Posix system) you can do#include <fenv.h>#define DISABLE_DENORMALS   \    fenv_t fenv;                \        fegetenv(&fenv);        \        fesetenv(FE_DFL_DISABLE_SSE_DENORMS_ENV);#define RESTORE_DENORMALS   \        fesetenv(&fenv);and you can use either one asprocessing_function(...){DISABLE_DENORMALS// signal processing codeRESTORE_DENORMALS}Denorms are pretty rare for calculations that don't have feedback; they are pretty degenerate. And you have to remember that they correspond extremely small values. For any calculation that you would actually care about those values not being flushed to zero, you also probably don't care about how efficient the processing is.Denormals being flushed to zero is the right thing to do for audio; they also do appear more often than one would expect because of the decaying feedback structures that we tend to have in audio algorithms.FTZ makes it so that the result of your calculation is set to Zero if the result is denormal; it ensures you don't generate denormals.DAZ makes it so that inputs to your calculation are treated as Zero if they are denormal; it ensures that your calculations don't slow down if the input passed to you contains denormals.