function X = fftalt8(x)
    N = 8;
    W = exp(-1*sqrt(-1)*2*pi/N);
    for k = 1:1:4
        s1(k) = x(k) + x(k+4);
        s1(k+4) = x(k) - x(k+4);
    end
    for k = 1:1:2
        s2(k) = s1(k) + s1(k+2);
        s2(k+2) = s1(k+4) + ((W^2)*s1(k+6));
        s2(k+4) = s1(k) - s1(k+2);
        s2(k+6) = s1(k+4) - ((W^2)*s1(k+6));
    end
    s3(1) = s2(1) + s2(2);
    s3(2) = s2(3) + ((W^1)*s2(4));
    s3(3) = s2(5) + ((W^2)*s2(6));
    s3(4) = s2(7) + ((W^3)*s2(8));
    s3(5) = s2(1) - s2(2);
    s3(6) = s2(3) - ((W^1)*s2(4));
    s3(7) = s2(5) - ((W^2)*s2(6));
    s3(8) = s2(7) - ((W^3)*s2(8));
    
    X = s3;
end

