let Polynomial = require('./polynomial.js'); let mul, div, gcd; console.log(process.argv[2]); let n = parseInt(process.argv[2]); let f = new Polynomial.Class([1, 1, 1, 0, 1]); let g = new Polynomial.Class([0, 1, 1]); mul = Polynomial.multiply(f, g, 2).coefficients; try { div = Polynomial.divide(f, g, 2).coefficients } catch (e) { console.log(e) } try { gcd = Polynomial.gcd(f, g, 2).coefficients; } catch (e) { console.log(e); } console.log([mul, div, gcd])