denormals (was: Re: [PD] Lost at compilig cyclone ;-(((()

Thomas Grill gr at grrrr.org
Sun Jun 27 13:12:21 CEST 2004


> another branch free possibility would be to do something like:
>
> f*= !PD_BADFLOAT(f);
>
> which would be branch free.

Hmmm, but the PD_BADFLOAT macro isn't branch free at the moment, so the
above code won't be either.


>> #define IS_ALMOST_DENORMAL(f) (fabs(f) < 3.e-34)
> well, isn't this, what the PD_BADFLOAT is doing?

No, in devel_0_37 this is (((*(unsigned int*)&(f))&0x7f800000) <
0x08000000), which means that the mantissa is tested for leading bits (real
denormals).
However, the question is if all almost denormals can be realiably bashed to
zero before they become real denormals and stress the cpu.

best greetings,
Thomas





More information about the Pd-list mailing list