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

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