# Computing the Matrix Logarithm with the Romberg Integration Method
## 3 Numerical Tests
In one way or another, the values of \(Q1\), \(Q2\), and \(Q3\) were favorable for logm_romberg. The same can be stated for Set 3 regarding \(Q1\), \(Q2\), and \(Q3\), although unfortunately no significant digit was guaranteed by any code in the particular case of one of its matrices. The interquartile range, which measures the distribution of values and is calculated as \(Q3-Q1\), was always 0 in the case of logm_romberg for all three types of matrix. This indicates the high reliability of the code, as it guaranteed at least 14 correct digits in the vast majority of the matrices addressed. To conclude this comparative study, Table 8 shows the execution times invested by the four different codes in calculating the logarithm of the matrices that constituted our test battery. For Sets 1 and 2, logm_romberg required an intermediate amount of time, between that of logm_iss_full and logm_new. Even for Set 3, logm_romberg consumed less time than the abovementioned codes. Clearly, the most cost-effective code was logm. Notwithstanding, it should be clarified that logm was the only one composed of MATLAB built-in functions. Let us recall that the code for these functions is not interpreted as for any other written in MATLAB, but they have already been compiled to machine language and are part of executable files. Thus, from the point of view of the execution time, the comparison of logm with the rest of the implementations is far from fair. Moreover, these time results are graphically illustrated in Figures 0(h)-0(h), in the form of bar graphs. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & & \multicolumn{3}{c}{_m_} & \multicolumn{3}{c}{_s_} \\  & **Min.** & **Max.** & **Mean** & **Median** & **Min.** & **Max.** & **Mean** & **Median** \\ \hline logm\_romberg & 6 & 7 & 6.05 & 6 & 3 & 4 & 3.94 & 4 \\ logm\_iss\_full & 7 & 15 & 9.36 & 8 & 3 & 5 & 4.46 & 5 \\ logm\_new & 5 & 7 & 5.88 & 6 & 4 & 6 & 5.08 & 5 \\ logm\_romberg & 6 & 7 & 6.04 & 6 & 3 & 4 & 3.95 & 4 \\ logm\_iss\_full & 7 & 14 & 9.27 & 8 & 3 & 5 & 4.48 & 5 \\ logm\_new & 5 & 7 & 5.79 & 6 & 4 & 6 & 5.17 & 5 \\ logm\_romberg & 5 & 7 & 6.17 & 6 & 0 & 8 & 3.21 & 4 \\ logm\_iss\_full & 6 & 15 & 10.21 & 10 & 0 & 36 & 5.06 & 4 \\ logm\_new & 5 & 7 & 6.09 & 6 & 0 & 46 & 6.98 & 5 \\ logm\_5 & 7 & 6.09 & 6 & 0 & 46 & 6.98 & 5 \\ logm\_5 & 7 & 6.09 & 6 & 0 & 46 & 6.98 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Minimum, maximum, mean, and median parameters \(m\) and \(s\) employed for Sets 1, 2, and 3, respectively. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & **Min** & **Q1** & **Q2** & **Q3** & **Max.** & **Mean** & **Std. Dev.** & **Outliers** \\ \hline logm\_romberg & 13 & 14 & 14 & 14 & 14 & 13.91 & 0.29 & 9 \\ logm\_iss\_full & 11 & 13 & 13 & 13 & 13 & 12.81 & 0.44 & 17 \\ logm\_new & 13 & 13 & 13 & 14 & 14 & 13.29 & 0.46 & 0 \\ logm & 13 & 13 & 13 & 14 & 14 & 13.29 & 0.46 & 0 \\ \hline logm\_romberg & 12 & 14 & 14 & 14 & 14 & 13.82 & 0.41 & 17 \\ logm\_iss\_full & 11 & 13 & 13 & 13 & 13 & 12.83 & 0.40 & 16 \\ logm\_new & 13 & 13 & 13 & 13 & 14 & 13.21 & 0.41 & 21 \\ logm & 13 & 13 & 13 & 13 & 14 & 13.21 & 0.41 & 21 \\ \hline logm\_romberg & 0 & 14 & 14 & 14 & 15 & 13.32 & 2.92 & 17 \\ logm\_iss\_full & 0 & 13 & 14 & 14 & 15 & 12.99 & 2.90 & 5 \\ logm\_new & 0 & 13 & 13 & 14 & 15 & 12.70 & 2.57 & 8 \\ logm & 0 & 13 & 13 & 14 & 15 & 12.70 & 2.57 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Minimum, Q1, Q2 (median), Q3, maximum, mean, and standard deviation values, and number of outliers for the number of significant digits in the computed solution by the distinct codes for Sets 1, 2, and 3, respectively. \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **Set 1** & **Set 2** & **Set 3** \\ \hline T(logm\_romberg) & 6.06 & 6.01 & 3.64 \\ T(logm\_iss\_full) & 4.78 & 4.72 & 6.16 \\ T(logm\_new) & 7.12 & 7.26 & 4.05 \\ T(logm) & 1.69 & 1.76 & 0.75 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Time (T), in seconds, involved in the execution of all the codes for the three sets.