code: public void print() {
          int big = (int)Math.abs(
              Math.max(max(Math.abs(m00), Math.abs(m01), Math.abs(m02)),
                       max(Math.abs(m10), Math.abs(m11), Math.abs(m12))));
  
          int digits = 1;
          if (Double.isNaN(big) || Double.isInfinite(big)) {  // avoid infinite loop
              digits = 5;
          } else {
              while ((big /= 10) != 0) digits++;  // cheap log()
          }
  
          System.out.println(nfs(m00, digits, 4) + " " +
                             nfs(m01, digits, 4) + " " +
                             nfs(m02, digits, 4));
  
          System.out.println(nfs(m10, digits, 4) + " " +
                             nfs(m11, digits, 4) + " " +
                             nfs(m12, digits, 4));
  
          System.out.println();
      }
docs: ////////////////////////////////////////////////////////////