[PlanetCCRMA] Pentium-4 and denormal numbers on planetccrma
Fernando Lopez-Lezcano
nando at ccrma.Stanford.EDU
Fri Jan 28 15:24:01 PST 2005
On Fri, 2005-01-28 at 15:17, Fernando Lopez-Lezcano wrote:
> 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);
not "flat", "float" :-)
or perhaps it'd work best with flat constants?
-- Fernando
More information about the PlanetCCRMA
mailing list