Update of /cvsroot/pure-data/externals/iemlib/iemlib1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30481/iemlib/iemlib1/src
Modified Files: iem_sqrt4~.c Log Message: union tabfudge_f instead *(long *)(float *) for HCS's strict aliasing
Index: iem_sqrt4~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/iemlib1/src/iem_sqrt4~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** iem_sqrt4~.c 9 Dec 2006 01:57:26 -0000 1.1 --- iem_sqrt4~.c 24 Oct 2007 15:59:23 -0000 1.2 *************** *** 34,38 **** t_float f = *in; t_float g, h; ! long l = *(long *)(in);
if(f < 0.0f) --- 34,38 ---- t_float f = *in; t_float g, h; ! union tabfudge_f tf;
if(f < 0.0f) *************** *** 45,49 **** else { ! g = iem_sqrt4_tilde_exptab[(l >> 23) & 0xff] * iem_sqrt4_tilde_mantissatab[(l >> 13) & 0x3ff]; h = f * (1.5f * g - 0.5f * g * g * g * f); *out++ = h; --- 45,50 ---- else { ! tf.tf_f = f; ! g = iem_sqrt4_tilde_exptab[((tf.tf_l) >> 23) & 0xff] * iem_sqrt4_tilde_mantissatab[((tf.tf_l) >> 13) & 0x3ff]; h = f * (1.5f * g - 0.5f * g * g * g * f); *out++ = h;