Perfect approximation of functions