private void cftexp2(int n, double[] a, int aP, int nw, double[] w) {
        int j, k, l, m;

        m = n >> 1;
        l = n >> 2;
        while (l > 128) {
            for (k = l; k < m; k <<= 2) {
                for (j = k - l; j < m; j += 2 * k) {
                    cftmdl1(l, a, aP + j, w, nw - (l >> 1));
                    cftmdl1(l, a, aP + m + j, w, nw - (l >> 1));
                }
                for (j = 2 * k - l; j < m; j += 4 * k) {
                    cftmdl2(l, a, aP + j, w, nw - l);
                    cftmdl2(l, a, aP + m + j, w, nw - l);
                }
            }
            l >>= 2;
        }
        for (k = l; k < m; k <<= 2) {
            for (j = k - l; j < m; j += 2 * k) {
                cftmdl1(l, a, aP + j, w, nw - (l >> 1));
                cftfx41(l, a, aP + j, nw, w);
                cftmdl1(l, a, aP + m + j, w, nw - (l >> 1));
                cftfx41(l, a, aP + m + j, nw, w);
            }
            for (j = 2 * k - l; j < m; j += 4 * k) {
                cftmdl2(l, a, aP + j, w, nw - l);
                cftfx42(l, a, aP + j, nw, w);
                cftmdl2(l, a, aP + m + j, w, nw - l);
                cftfx42(l, a, aP + m + j, nw, w);
            }
        }
    }