# Computing the Matrix Logarithm with the Romberg Integration Method
## 3 Numerical Tests
** & **Outliers** \\ \hline logm\_romberg & 3.54 \(\times\)\(10^{-15}\) & 5.32 \(\times\)\(10^{-15}\) & 6.15 \(\times\)\(10^{-15}\) & 7.43 \(\times\)\(10^{-15}\) & 1.62 \(\times\)\(10^{-14}\)  
Figures 1d-3d present the performance profile. For an \(\alpha\) from 1 to 5, this graph gives the percentage of matrices in terms of one (\(p\)), for which the error of a code is less than or equal to \(\alpha\) times the smallest error achieved by any of them. As \(\alpha\) increases, the probability of the codes desirably tends toward 1. Therefore, those codes with the highest values in most of the plots are more reliable and accurate. To reduce the influence of relative errors smaller than the unit roundoff in the performance profile pictures, these errors were modified according to the transformation described in [55]. Clearly, logm_romberg was the code generally placed at the top for most test cases, followed in Sets 1 and 2 by logm_new and logm, with identical values to each other, or by logm_iss_full in Set 3. Nonetheless, logm_romberg was slightly surpassed by logm_new and logm for an \(\alpha\) close to 3 in the second set of matrices. Table 5 also lists, in its second column, the value of the integral of the performance profile function, i.e., the area enclosed between the X-axis, the value of \(p\), and the lines \(\alpha=0\) and \(\alpha=5\). Once again, the largest area values provided by logm_romberg revealed that it was, broadly speaking and as previously mentioned, more accurate and reliable than its competitors. By means of pie charts, Figures 1e-3e represent the matrix percentage for which each code delivered the smallest or largest relative error. It is noticeable how logm_romberg always corresponds to the largest sector of the left-hand pies (90%, 83%, and 64%, respectively, for each matrix group) and the smallest part of the right-hand ones (0% for Sets 1 and 2, and 7% for Set 3). Table 6 collects the minima, maxima, means, and medians achieved for the parameters \(m\) and \(s\). In the case of logm_romberg, \(m\) stands for the number of rows actually required in the Romberg tableau for the logarithm computation of the matrices that compose each set; that is, the value of the variable \(i\) in Algorithm 2. The needed values of \(m\) ranged from 6 to 7 for Sets 1 and 2, and from 5 to 7 for Set 3. However, the most frequently used value was 6. Recall that the maximum allowed value of \(m\) was 7 in all our runs. For the rest of the codes, \(m\) represents the Pade approximant degree. Clearly, this means that the values of \(m\) should not be compared between logm_romberg and the others. On the other hand, \(s\) denotes the number of square roots that executed by the codes. These numerical values of \(s\), included in Table 6, have been also visualized in the form of box plots in Figures 1f-3f, with the objective of representing them graphically through their quartiles. Thus, for each box, its bottom, central, and top marks signify the 25 th (\(Q1\)), the 50 th (\(Q2\) or median), and the 75 th (\(Q3\)) percentiles. Outliers, individually represented by symbol '+', are the values outside the interval \([Q1-1.5\cdot(Q3-Q1),\ Q3+1.5\cdot(Q3-Q1)]\), as stated above. The whiskers extend to the most extreme datapoints in the cited range. It is obvious from these data that logm_romberg performed a smaller number of roots than the other codes. Except for logm_romberg, the high values of \(s\) achieved by the rest of the codes for some matrices in Set 3 are remarkable. Different statistical data corresponding to the number of significant digits achieved in the computed solution by each code are compiled at numerical level in Table 7 and as a box plot in Figures 1g-3g. On average, logm_romberg provided the largest number of valid digits. In detail, this code guarantees that its solutions have, in the worst case, at least 13 significant digits for the matrices in Set 1, and 12 digits for Set 2. For this latter set, this value was improved by logm_new and logm, guaranteeing at least 13 digits.