[PlanetCCRMA] Pentium-4 and denormal numbers on planetccrma

Steve Harris S.W.Harris@ecs.soton.ac.uk
Fri Jan 28 15:36:01 2005


On Fri, Jan 28, 2005 at 03:17:41PM -0800, Fernando Pablo Lopez-Lezcano wrote:
> On Fri, 2005-01-28 at 14:51, Fernando Lopez-Lezcano wrote:
> > On Wed, 2005-01-12 at 03:40, Steve Harris wrote:
> > > On Mon, Jan 10, 2005 at 11:07:55 +0100, andersvi@extern.uio.no wrote:
> > > NB, using the SSE instruction set uses a more efficient denormal handler
> > > (about 40x slower than processing a normal number), but it still doesnt
> > > zero them, if you also call this function I hacked up when the program
> > > starts:
> > 
> > Hi Steve, I'm trying to use this to see if I can get freeverb back from 
> > denormal hell, but I can't compile it as position independent code as in
> > that mode the compiler uses the bx register (I did some searches but
> > could not find a solution that both compiled and did not segfault :-)
> 
> I tried adding noise to the inputs (from
> http://www.musicdsp.org/files/denormal.pdf):
> 
> unsigned int rand_state = 1;
> 
> inline add_white_noise (float &val) {
>   rand_state = rand_state * 1234567UL + 890123UL;
>   int mantissa = rand_state & 0x807F0000;
>   int flt_rnd = mantissa | 0x1e999999;
>   val += *reinterpret_cast <const flat*> (&flt_rnd);
> }
> 
> And while it is a hack it did work, surprisingly. 
> Perhaps not the best solution.....

Its a perfectly reasonable solution, sorry, I should have suggested it.
The thing to test would be to turn up the RT60 time as high as posible and
measure the amplitude of the output to see how much it affects the SNR.

- Steve