Re: [linux-audio-dev] Denormal numbers

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Denormal numbers
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Thu Jul 31 2003 - 12:05:51 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 31 2003 - 12:19:07 EEST