code: public BigInteger calculateFofX(final BigInteger x)
      {
          // pick up the 0th term directly:
          BigInteger ret = coefficients[0];
  
          // for each of the other terms:
          for (int term = 1, n = coefficients.length; term < n; term++)
          {
              // the index of term N is N:
              final int indexOfTerm = term;
  
              // the exponent of term N is N:
              final int powerOfTerm = term;
  
              BigInteger base = x;
              BigInteger power = base.pow(powerOfTerm);
  
              BigInteger add = coefficients[indexOfTerm].multiply(power);
              ret = ret.add(add);
          }
          return ret;
      }
docs: ==================================================