The reason for this is something that Derbyshire relegated to a footnote several pages before (p. 335, 128). If you look at the logarithmic integral, its primary definition is
(Abramowitz & Stegun 5.1.3) where Ei is a particular exponential integral which Matlab does have, although that fact is not so obvious and you need the symbolic toolbox. [there is a workaround for Ei, see below]. However, there is a 2pi ambiguity when taking the log, since for any integer n, log(z) and log(z)+2*pi*i*n are equally valid answers. That means that Ei(logz)) depends on n and you have to pin down the actual angle.
If z = Ae^(i*b) where b is restricted to the range -pi<b<=pi in the first place, then Li(z) and Ei(log(z)) give the same result.
b = logint(2+i)
c = ei(log(2+i))
b = 1.4113 + 1.2247i
c = 1.4113 + 1.2247i
In this case, though,
and you have to keep track of the number of times you go around the circle so as to remove ambiguity.
loga = log(20)*(.5+14.134725i)
loga = 1.4979 +42.3439i
ans = -0.105384042414102 + 3.147487521958689i
as advertised. That's what he did in footnote 128.
If you don't have the symbolic toolbox, since expint is available in basic Matlab you can use
function y = ei_alt(z)
y = -expint(-z) + (log(z)-log(1/z))/2 - log(-z);
Ei(logz)) can distinguish how many times you go around the circle, but Li(z) as defined on p.114 (and generalized so that the path of integration is a straight line from 0 to complex number z) cannot. To say as he did on p. 340 that he used the Li function is highly misleading, as you found out.