For an i.i.d. sequence of random variables with a semiexponential dist
ribution, we give a functional form of the Erdos-Renyi law for partial
sums. In contrast to the classical case, that is, the case where the
random variables have exponential moments of all orders, the set of li
mit points is not a subset elf the continuous functions. This reflects
the bigger influence of extreme values. The proof is based on a large
deviation principle for the trajectories of the corresponding random
walk. The normalization in this large deviation principle differs from
the usual normalization and depends on the tail of the distribution.
In the same way, we prove a functional limit law for moving averages.