The Matlab functions fft,fft2,fftn and their inverses ifft,ifft2,ifftN implement what is called as the Discrete Fourier Transform (DFT) in $1$,$2$ and $N$ dimensions. The mathematical expression for those transforms is:
$$ X[k] = \sum_{n=0}^{N-1} x[n] e^{-j \frac{2\pi}{N} n k} ~~~ \text{, for} ~~~ k=0,1,2,...,N-1$$
$$ x[n] = \frac{1}{N} \sum_{k=0}^{N-1} X[k] e^{j \frac{2\pi}{N} k n} ~~~ \text{, for} ~~~ n=0,1,2,...,N-1$$
Which is the 1D forward and inverse DFT in particular. Here x[n] is a discrete-time sequence of length $N$ samples and $X[k]$ is a complex valued discrete sequence of length $N$.
Note that the DFT can be considered as the samples of a continuous frequency function (the Discrete-Time Fourier Transform, DTFT) $X(e^{j\omega})$ which is given by:
$$ X(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n] e^{-j \omega n } $$
for which the inverse is:
$$ x[n] = \frac{1}{2\pi} \int_{-\pi}^{\pi} X(e^{j\omega}) e^{j\omega n} d\omega $$
Note that DFT $X[k]$ is considered to be as the samples of DTFT $X(e^{j\omega })$ and both are operating on the same sequence $x[n]$ (assuming $x[n]$finite length) but produce two different outputs; one of them is a discrete sequence $X[k]$ while the other is a continuous function of $\omega$, $X(e^{j\omega})$.
Furthermore their inverses are the same; $x[n] = \mathcal{IDFT} \{X[k]\}$, $x[n] = \mathcal{IDTFT} \{X(e^{j\omega n})\}$. Hence this might have tempted you to think that the matlab function ifft2 was actually implementing the inverse DTFT by an approximation; which is not the case as it computes the inverse of the DFT which is a finite summation exactly computed in a computer.