code: public double diagonalProduct() {
          BigDecimal result = BigDecimal.ONE;
  
          for (int i = 0; i < rows; i++) {
              result = result.multiply(BigDecimal.valueOf(get(i, i)));
          }
  
          return result.setScale(Matrices.ROUND_FACTOR,
                  RoundingMode.CEILING).doubleValue();
  
      }
docs: Calculates the product of diagonal elements of this matrix.
  
  @return the product of diagonal elements of this matrix