public static void realWrite(final OutputStream out,final double[] x,final int dp) throws IOException {
  out.write((byte)'[');
  for (int i=0; i < x.length; i++) {
    if (i > 0) {
      out.write(COMMA_BYTES);
    }
    realWrite(out,x[i],dp);
  }
  out.write((byte)']');
}

public static void realWrite ( final OutputStream out , final double [ ] x , final int dp ) throws IOException { out . write ( ( byte ) '[' ) ; for ( int i = 0 ; i < x . length ; i ++ ) { if ( i > 0 ) { out . write ( COMMA_BYTES ) ; } realWrite ( out , x [ i ] , dp ) ; } out . write ( ( byte ) ']' ) ; }
format a real array in a way that can be easily ported to c # .
