General Digital Filter Algorithm in C language