For
it is based on the Chebyshev expansion
where
.
For
For
,
to within the representation accuracy of the machine and so this approximation is used.
None.
None.
If
and
are the relative errors in the argument and the result respectively, then in principle,
That is, a relative error in the argument,
, is amplified by a factor approximately
, in the result.
The equality should hold if
is greater than the
machine precision (
due to data errors etc.) but if
is due simply to the round-off in the machine representation it is possible that an extra figure may be lost in internal calculation round-off.
The behaviour of the amplification factor is shown in the following graph:
Figure 1
None.
function s10aa_example
fprintf('s10aa example results\n\n');
x = [20.0 -5.0 0.5 5.0];
n = size(x,2);
result = x;
for j=1:n
[result(j), ifail] = s10aa(x(j));
end
disp(' x tanh(x)');
fprintf('%12.3e%12.3e\n',[x; result]);