# Two Taylor Algorithms for Computing the Action of the Matrix Exponential on a Vector
## 3 Numerical Experiments
Regarding the mean values, expmv needed the highest orders of approximation polynomials, followed by expmvtay2, expmvtay1, and expmAvtay. The function expv was always invoked using the default value of \(m\), which corresponded to 30. Concerning the value of \(s\), also in average terms, expmAvtay always required the smallest values, while expmvtay1, in the case of matrix Sets 1 and 2, or expmv, in the case of Set 3, demanded the highest values. Alternatively, Figures 1e-3e graphically represent the values of \(m\) required in the computation of each of the matrices that compose our test battery by the distinct methods. In addition to the above analysis related to the accuracy of the results provided by all the codes, their computational costs have also been examined from the point of view of the number of matrix-vector products and the execution time invested by each of them. Thus, Table 5 lists the total number of matrix-vector products carried out by the seven codes in the computation of the matrices of our three sets. As can be noted, expmvtay2 performed the lowest number of products, followed by expmvtay1. Then, following an increasing order in the number of operations involved, expmv, expleja, expmAvtay, and expm_newAv would be cited, exchanging the position of these last two codes for Set 3. By far, the largest number of products was carried out by expv. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{_m_} & \multicolumn{4}{c}{_s_} \\ \hline  & **Min.** & **Max.** & **Mean** & **Median** & **Min.** & **Max.** & **Mean** & **Median** \\ \hline expmvtay1 & 40 & 44 & 40.13 & 40.00 & 1 & 45 & 23.65 & 23.00 \\ expmvtay2 & 40 & 58 & 45.07 & 44.00 & 1 & 43 & 17.77 & 20.00 \\ expmAvtay & 9 & 30 & 27.54 & 30.00 & 0 & 7 & 5.29 & 6.00 \\ expmv & 15 & 55 & 53.94 & 55.00 & 1 & 38 & 17.03 & 17.00 \\ expm\_newAv & 7 & 13 & 12.94 & 13.00 & 0 & 9 & 7.47 & 8.00 \\ expleja & 16 & 100 & 97.63 & 99.00 & 1 & 9 & 4.40 & 4.50 \\ expv & 30 & 30 & 30.00 & 30.00 & - & - & - & - \\ \hline expmvtay1 & 40 & 43 & 40.34 & 40.00 & 1 & 45 & 25.60 & 25.50 \\ expmvtay2 & 40 & 58 & 45.85 & 44.00 & 1 & 44 & 19.08 & 21.00 \\ expmAvtay & 25 & 30 & 27.50 & 27.50 & 0 & 7 & 5.50 & 6.00 \\ expmv & 45 & 55 & 54.09 & 55.00 & 2 & 37 & 18.96 & 19.00 \\ expm\_newAv & 13 & 13 & 13.00 & 13.00 & 2 & 9 & 7.59 & 8.00 \\ expjeja & 66 & 100 & 98.05 & 99.00 & 2 & 11 & 5.80 & 5.00 \\ expv & 30 & 30 & 30.00 & 30.00 & - & - & - & - \\ \hline expmvtay1 & 40 & 60 & 40.83 & 40.00 & 1 & 45 & 8.10 & 1.00 \\ expmvtay2 & 40 & 60 & 41.52 & 40.00 & 1 & 45 & 7.26 & 1.00 \\ expmAvtay & 12 & 30 & 25.45 & 25.00 & 0 & 8 & 2.07 & 0.00 \\ expmv & 17 & 55 & 42.05 & 42.50 & 1 & 189 & 9.26 & 2.00 \\ expm\_newAv & 9 & 13 & 12.24 & 13.00 & 0 & 11 & 2.62 & 1.00 \\ expjeja & 18 & 100 & 65.48 & 72.00 & 1 & 583 & 105.44 & 6.00 \\ expv & 30 & 30 & 30.00 & 30.00 & - & - & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Minimum, maximum, mean, and median parameters \(m\) and \(s\) employed for Sets 1, 2, and 3, respectively. In a more detailed way, Figures 1f-3f show the ratio between the number of matrix-vector products required by expmvtay1, expmAvtay, expmv, expm_newAv, or expleja and that needed by expmvtay2 in the computation of the matrices of the test sets, decreasingly ordered according to the quotient P(expmvtay1)/P(expmvtay2). In order not to distort these figures and to better appreciate the rest of the results, the ratio with respect to expv has not been considered, due to its excessively high number of products demanded. In the case of Sets 1 and 2, this factor reached values greater than or equal to one in the vast majority of the matrices. For Set 3, it took values belonging to the intervals [1.00, 1.19], [0.89, 43.45], [0.31, 8.93], [0.85, 35.97], and [0.25, 25.78], respectively, for expmvtay1, expmAvtay, expmv, expm_newAv, and expleja.