function y = fft3(x,u,ip,op)
% y = fft3(x,u,ip,op)
% y  : the 3 point DFT of x 
% u  : a vector of precomputed multiplicative constants
% ip : input permutation
% op : ouput permutation

y = zeros(3,1);
x = x(ip);                                        % input permutation
x(2:3) = KRED([2],[1],1,x(2:3));                  % reduction operations
y(1) = x(1)+x(2);                                 % DC term calculation
% -------------------- block : 1 -------------------------------------------------
y(2) = x(2)*u(1);                       
% -------------------- block : 2 -------------------------------------------------
y(3) = x(3)*u(2);                       
% --------------------------------------------------------------------------------
y(2) = y(1)+y(2);                                 % DC term calculation
y(2:3) = tKRED([2],[1],1,y(2:3));                 % transpose reduction operations
y = y(op);                                        % output permutation

% For complex data - 
% Total Number of Real Multiplications : 4
% Total Number of Real Additions: 12

