Commit 0ca7b07a by Pranay Gupta

removed trailing whitespaces

parent a8186651
Pipeline #1327 canceled with stage
......@@ -80,22 +80,22 @@ static float rsqrt_exptab[DUMTAB1SIZE], rsqrt_mantissatab[DUMTAB2SIZE];
static void init_rsqrt(void)
{
int i;
union
union
{
float f;
int32_t l;
}u;
} u;
for (i = 0; i < DUMTAB1SIZE; i++)
{
int32_t l = (i ? (i == DUMTAB1SIZE-1 ? DUMTAB1SIZE-2 : i) : 1)<< 23;
u.l = l;
rsqrt_exptab[i] = 1./sqrt(u.f);
rsqrt_exptab[i] = 1./sqrt(u.f);
}
for (i = 0; i < DUMTAB2SIZE; i++)
{
float f = 1 + (1./DUMTAB2SIZE) * i;
rsqrt_mantissatab[i] = 1./sqrt(f);
rsqrt_mantissatab[i] = 1./sqrt(f);
}
}
......@@ -107,7 +107,7 @@ t_float q8_rsqrt(t_float f0)
{
float f;
int32_t l;
}u;
} u;
u.f = f0;
if (f0 < 0.) return (0);
else return (t_float)(rsqrt_exptab[(u.l >> 23) & 0xff] *
......@@ -120,7 +120,7 @@ t_float q8_sqrt(t_float f0)
{
float f;
int32_t l;
}u;
} u;
u.f = f0;
if (f0 < 0) return (0);
else return (t_float)(f0 * rsqrt_exptab[(u.l >> 23) & 0xff] *
......@@ -134,8 +134,6 @@ t_float qsqrt(t_float f) {return (q8_sqrt(f)); }
t_float qrsqrt(t_float f) {return (q8_rsqrt(f)); }
#endif
typedef struct sigrsqrt
{
t_object x_obj;
......@@ -160,7 +158,7 @@ static t_int *sigrsqrt_perform(t_int *w)
{
float f;
int32_t l;
}u;
} u;
while (n--)
{
......@@ -273,24 +271,23 @@ static t_int *sigwrap_perform(t_int *w)
{
t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
t_int n = *(t_int *)(w+3);
int integer;
while (n--)
{
t_sample f = *in++;
if (f >= 0.)
if (f >= 0.)
{
integer = (int)f;
f = (GOODINT(integer)? f - integer : 0.);
}
else if(f < 0.)
{
integer = (int)f;
f = (GOODINT(integer)? f - integer + 1. : 0.);
}
*out++ = f;
}
return (w + 4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment