Approximation of periodic functions