Let
be the absolute error in the result, and
be the relative error in the argument. If
is somewhat larger than the machine representation error, then we have
.
For small
, errors are attenuated by the function and hence are limited by the machine precision.
For medium and large
, the error behaviour, like the function itself, is oscillatory and hence only absolute accuracy of the function can be maintained. For this range of
, the amplitude of the absolute error decays like
, which implies a strong attenuation of error. Eventually,
, which is asymptotically given by
, becomes so small that it cannot be calculated without causing underflow and therefore the function returns zero. Note that for large
, the errors are dominated by those of the math library function exp.