We present an analysis of the approximation error for addimensional quasiperiodic function f with Diophantine frequencies, approximated by a periodic function with the fundamental domain. When f has a certain regularity, its global behavior can be described by a finite number of Fourier components and has a polynomial decay at infinity. Meanwhile, we discuss the approximation rate. Finally, these analytical results are verified by some examples.