function val = maxerror(pol)

[t1,f1] = fminbnd(@fun,1,2,optimset('TolX',1e-15),pol);
[t2,f2] = fminbnd(@fun,2,3,optimset('TolX',1e-15),pol);
val = max([abs(pol*[1;-1;1;-1]),-f1,-f2]);

return

%------------------------------------------------------------

function val = fun(t,pol)

z = exp(i*t);
val = -abs(polyval(pol,z)-1/gamma(z));

return




