public static String realFormatArray(final double[] x){
  final StringBuilder sb=new StringBuilder();
  sb.append("[");
  for (int i=0; i < x.length; i++) {
    if (i > 0) {
      sb.append(", ");
    }
    sb.append(realFormat(x[i]));
  }
  sb.append("]");
  return sb.toString();
}

public static String realFormatArray ( final double [ ] x ) { final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "[" ) ; for ( int i = 0 ; i < x . length ; i ++ ) { if ( i > 0 ) { sb . append ( ", " ) ; } sb . append ( realFormat ( x [ i ] ) ) ; } sb . append ( "]" ) ; return sb . toString ( ) ; }
format a real array in a way that can be easily ported to c # .
