code: public double[] toWraparoundOrder(double data[]){
      double newdata[] = new double[2*n];
      int nh = n/2;
      newdata[0]   = data[0];
      newdata[1]   = 0.0;
      newdata[n]   = data[1];
      newdata[n+1] = 0.0;
      for(int i=1; i<nh; i++){
        newdata[2*i]      = data[2*i];
        newdata[2*i+1]    = data[2*i+1];
        newdata[2*(n-i)]  = data[2*i];
        newdata[2*(n-i)+1]=-data[2*i+1]; }
      return newdata; }
docs: Return data in wraparound order.
  i0 and stride are used to traverse data; the new array is in
  packed (i0=0, stride=1) format.
  @see <a href="package-summary.html#wraparound">wraparound format</A>