class MullerNewtonSolver implements IRootsSolver {

    @VisibleForTesting
    static Complex computeB2(Complex f2, Complex f1, Complex q2, Complex f0) {
        double tmp;
        double re0, re1, re2, re3;
        double im0, im1, im2, im3;
        /* { f2 f1 - } */
        re0 = f2.getRe() - f1.getRe();
        im0 = f2.getIm() - f1.getIm();
        /* { q2 } */
        re1 = q2.getRe();
        im1 = q2.getIm();
        /* { q2 } */
        re2 = q2.getRe();
        im2 = q2.getIm();
        /* { f0 f1 - } */
        re3 = f0.getRe() - f1.getRe();
        im3 = f0.getIm() - f1.getIm();
        /* { * } */
        tmp = re2 * re3 - im2 * im3;
        im2 = re2 * im3 + im2 * re3;
        re2 = tmp;
        /* { f2 f1 - } */
        re3 = f2.getRe() - f1.getRe();
        im3 = f2.getIm() - f1.getIm();
        /* { 2 * } */
        re3 *= 2;
        im3 *= 2;
        /* { + } */
        re2 += re3;
        im2 += im3;
        /* { * } */
        tmp = re1 * re2 - im1 * im2;
        im1 = re1 * im2 + im1 * re2;
        re1 = tmp;
        /* { + } */
        re0 += re1;
        im0 += im1;
        /* .build() */
        return Complex.cart(re0, im0);
    }

    public  MullerNewtonSolver();

}