hi miller, hi devs ...
the current implementation of rsqrt~ is most likely broken. i was sshing to carmen's amd64 machine ... looked like that filling the lookup table isn't really working ...
static void init_rsqrt(void) { int i; for (i = 0; i < DUMTAB1SIZE; i++) { float f; long l = (i ? (i == DUMTAB1SIZE-1 ? DUMTAB1SIZE-2 : i) : 1)<< 23; *(long *)(&f) = l; rsqrt_exptab[i] = 1./sqrt(f); } for (i = 0; i < DUMTAB2SIZE; i++) { float f = 1 + (1./DUMTAB2SIZE) * i; rsqrt_mantissatab[i] = 1./sqrt(f); } }
couldn't really look into it, but i guess, the wild cast in *(long *)(&f) = l; might be a problem on th x86_64 architecture ...
not really a problem for devel, since devel most likely uses sse instructions to do the rsqrt computation ... but someone who is into vanilla pd might be interested in having a look at it ..
cheers ... tim