for (Monomial<BigInteger> monomial : poly) {
coefficient = monomial.coefficient();
exp = monomial.exponent();
temp.clear();
temp.add(new Complex(new Rational(coefficient.getVal())));
for (int i = 0; i < exp.length(); ++i)
if ((lExp = exp.getVal(i)) != 0)
temp.add(Tensors.pow(varsArray[i].simpleTensor, new Complex(lExp)));
sum.add(Tensors.multiply(temp.toArray(new Tensor[temp.size()])));
}
return Tensors.sum(sum.toArray(new Tensor[sum.size()]));
}