package math.polynomials;

import math.utils.ArrayUtil;
import math.utils.Util;

public class Poly14 {
    public static void main(String[] args) {
        // dzielenie Poly/Poly
        Jdm d1 = new Jdm(2, "x", 3);
        Jdm d2 = new Jdm(-5, "x", 2);
        Jdm d3 = new Jdm(3, "x", 1);
        Jdm d4 = new Jdm(-1, "x", 0);
        Jdm[] arrd = {d1, d2, d3, d4};
        Poly pold = new Poly(arrd);
        Util.print(pold);
        Jdm e1 = new Jdm(1, "x", 2);
        Jdm e2 = new Jdm(-4, "x", 1);
        Jdm e3 = new Jdm(7, "x", 0);
        Jdm[] arre = {e1, e2, e3};
        Poly pole = new Poly(arre);
        Util.print(pole);
        Poly[] di = PolyUtil.div(pold, pole);
        ArrayUtil.print(di);
    }
}
