atom feed11 messages in at.iem.pd-dev[PD-dev] amd64: rsqrt~
FromSent OnAttachments
Tim BlechmannSep 10, 2005 2:36 pm 
Thomas GrillSep 10, 2005 3:59 pm 
IOhannes m zmoelnigSep 11, 2005 10:23 am 
Mathieu BouchardSep 11, 2005 11:57 am 
IOhannes m zmoelnigSep 11, 2005 12:10 pm 
Tim BlechmannSep 11, 2005 12:36 pm 
Mathieu BouchardSep 11, 2005 1:47 pm 
IOhannes m zmölnigSep 11, 2005 1:56 pm 
Thomas GrillSep 11, 2005 2:30 pm 
Tim BlechmannSep 11, 2005 4:13 pm 
Mathieu BouchardSep 11, 2005 8:06 pm 
Subject:[PD-dev] amd64: rsqrt~
From:Tim Blechmann (TimB@gmx.net)
Date:Sep 10, 2005 2:36:05 pm
List:at.iem.pd-dev

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

-- mailto:TimB@gmx.de ICQ: 96771783 http://www.mokabar.tk

latest mp3: kMW.mp3 http://mattin.org/mp3.html

After one look at this planet any visitor from outer space would say "I want to see the manager." William S. Burroughs