code: public static FloatMatrix cholesky(FloatMatrix A) {
          FloatMatrix result = A.dup();
          int info = NativeBlas.spotrf('U', A.rows, result.data, 0, A.rows);
          if (info < 0) {
              throw new LapackArgumentException("DPOTRF", -info);
          } else if (info > 0) {
              throw new LapackPositivityException("DPOTRF", "Minor " + info + " was negative. Matrix must be positive definite.");
          }
          clearLower(result);
          return result;
      }
docs: if (info )
  Compute Cholesky decomposition of A
  
  @param A symmetric, positive definite matrix (only upper half is used)
  @return upper triangular matrix U such that  A = U' * U