Relative error estimation of a special type of GapP function
This is #P-hard, already for an arbitrary fixed constant approximation factor. As you noted, it allows you to approximate $|f(x)|$ for any GapP-function $f$, and therefore if $f$ is any #P (or GapP) function, it allows you to approximate $|f(x)-y|$ for a given $y$. With this, you can still compute $f(x)$ by a form of binary search.
Specifically, fix a constant $k\ge\gamma^2+1$, where $\gamma&gt;1$ is the approximation factor. Starting with an initial estimate $0\le f(x)\le 2^{n^c}$, if you already have $a_0&lt;a_1$ such that $a_0\le f(x)\le a_1$, you compute $a'_0\le a'_1$ such that $a'_0\le f(x)\le a'_1$ and $a'_1-a'_0\le\lfloor(1-\frac1k)(a'_1-a'_0)\rfloor$ by computing the approximations $d_0,d_1$ such that
$$\gamma^{-1}d_i\le|f(x)-a_i|\le\gamma d_i,$$
and putting
$$[a'_0,a'_1]=\begin{cases}\bigl[a_0,a_1-\lceil\frac1k(a_1-a_0)\rceil\bigr]&amp;d_0\le d_1,\\{}\bigl[a_0+\lceil\frac1k(a_1-a_0)\rceil,a_1\bigr]&amp;\text{otherwise.}\end{cases}$$
To see that this is correct: if, for example, $d_0\le d_1$, then
$$f(x)-a_0\le\gamma^2(a_1-f(x)),$$
hence
$$f(x)\le\frac{a_0+\gamma^2a_1}{\gamma^2+1}=a_1-\frac{a_1-a_0}{\gamma^2+1}\le a_1-\frac{a_1-a_0}k.$$
The case $d_1\ge d_0$ is symmetric.