The filter I need to implement is H(z)=(0.875+0.322z^-1 + 0.283z^-2)/(1+0.334z^-1+0.654z^-2). For H(z)=0.333/(1+0.333z^-1) 32bit Q24 I used this code:
Int32 filter(int32 x) {
Q=24;
xn = floor(x*2^(Q-31));
int32;
int32 y1;
g = floor(0.333*2^(Q-31));
y=g*xn – xn - g*y1;
y1=y;
return(y);
}
but, I'm not sure how to do this in single precision floating point.