code: public void print(PrintWriter output, int w, int d)
      {
          DecimalFormat format = new DecimalFormat();
          format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US));
          format.setMinimumIntegerDigits(1);
          format.setMaximumFractionDigits(d);
          format.setMinimumFractionDigits(d);
          format.setGroupingUsed(false);
          print(output, format, w + 2);
      }
docs: Print the matrix to the output stream.   Line the elements up in
  columns with a Fortran-like 'Fw.d' style format.
  
  @param output Output stream.
  @param w      Column width.
  @param d      Number of digits after the decimal.