For example, let $n=10^4$ and
\begin{align*}
\int_{0.5}^{1}{\frac{\exp (u)}{u}du}&=\log \left| u \right|+\sum\limits_{s=0}^{10000}{h_{s}^{-u}}{\Bigr|}_{0.5}^{1} \\
& =\log \left| 1 \right|+\sum\limits_{s=0}^{\infty }{h_{s}^{-1}}-\log \left| 0.5 \right|-\sum\limits_{s=0}^{\infty }{h_{s}^{-0.5}}
\\
& =-\log \left| 0.5 \right|+\left( h_{0}^{-1}-h_{0}^{-0.5} \right)+\left( h_{1}^{-1}-h_{1}^{-0.5} \right)+\left(
h_{2}^{-1}-h_{2}^{-0.5} \right)+\cdots +\left( h_{10000}^{-1}-h_{10000}^{-0.5} \right) \\
& =\text{0}\text{.340439646634805}
\end{align*}
If we use the matlab function expint.m to calculate it,
\begin{align*}
\int_{0.5}^{1}{\frac{\exp (u)}{u}du}&=\exp \operatorname{int}(0.5)-\exp \operatorname{int}(1) \\
& =\text{0}\text{.340389660380640}
\end{align*}
The margin of the error by using (3.12) for $n=10^4$ is 4.9986e-005.