Main Archive Specials Wiki | FAQ Links Submit Forum


Denormal numbers

References : Compiled by Merlijn Blaauw
Linked file : other001.txt

Notes :
this text describes some ways to avoid denormalisation. Denormalisation happens when FPU's go mad processing very small numbers




Comments


Added on : 31/01/04 by andy[ AT ]a2hd[ DOT ]com
Comment :
See also the entry about 'branchless min, max and clip' by Laurent Soras in this section,

Using the following function,
            
float clip (float x, float a, float b)
{
   x1 = fabs (x-a);
   x2 = fabs (x-b);
   x = x1 + (a+b);
   x -= x2;
   x *= 0.5;
   return (x);
}

If you apply clipping from -1.0 to 1.0 will have a side effect of squashing denormal numbers to zero due to loss of precision on the order of ~1.0.e-20.  The upside is that it is branchless, but possibly more expensive than adding noise and certainly more so than adding a DC offset.




Add your own comment
Comments are displayed in fixed width, no HTML code allowed!
Email:

Comment:

Are you human?



Site created and maintained by Bram
Graphic design by line.out | Server sponsered by fxpansion