code: static public double elliptic(double[] x) {
  
      double sum = 0.0;
      double a = 1e6;
  
      for (int i = 0; i < x.length; i++) {
        sum += Math.pow(a, (((double) i) / ((double) (x.length - 1)))) * x[i] * x[i];
      }
  
      return (sum);
    }
docs: Elliptic