On Thu, Jul 31, 2003 at 10:45:01 +0200, Alfons Adriaensen wrote:
On Thu, Jul 31, 2003 at 09:26:49AM +0100, Steve Harris
wrote:
Several people have asked me what denormal
numbers are over the last few
weeks, well heres a much better description than my rambling head
scratching:
http://www.ecs.soton.ac.uk/~swh/denormal.ps
Its an extract from David Goldberg's article, "What Every Computer
Scientist Should Know about Floating-Point Arithmetic".
Do you know of a *very fast* (probably inline assembly) way to force
denormal FP numbers to zero ?
No, the thing I've been using is (from the music-dsp mailing list):
#define FLUSH_TO_ZERO(fv) (((*(unsigned int*)&(fv))&0x7f800000)==0)?0.0f:(fv)
but I'm beginning to suspect it doesn't always work.
Sometimes you can just add low amplitude whitenoise instead.
- Steve