Assume a function $f(x)$ is given numerically for $x>0$, i.e. for any $x>0$ there is a numerical procedure to obtain $f(x)$ to any desired precision.

Also assume that the function $f(x)$ has a trans-series expansion for small $x$:

$$f(x) = \sum_{n=0}^\infty c_n x^n + \sum_{j=0}^{J} e^{-a_j/x} \sum_{n=n_1}^\infty d_n^j x^n$$

Here the simplest case $J=0$, i.e. only 1 set of exponential terms, is already of interest in which case we'd have

$$f(x) = \sum_{n=0}^\infty c_n x^n + e^{-a/x} \sum_{n=n_1}^\infty d_n x^n$$

Obtaining $c_n$ numerically is not difficult. But is there an efficient numerically stable algorithm to obtain the coefficients $d_n^j$ which are the coefficients of the exponentially small terms?

Obviously if all $c_n$ are known, one can study $f(x) - \sum_n c_n x^n$ and extract $d_n^j$ somehow but any numerical error on any of the $c_n$'s will make this determination very imprecise, simply because the subtracted terms are many orders of magnitude larger than the interesting remaining terms. Also, even if infinite precision is assumed on the $c_n$ one needs all of them.

If the numerical precision on the calculation of $f(x)$ is fixed and only a finite number of $c_n$ coefficients can be extracted with some precision, is there a way to still extract at least some of the $d_n^j$ coefficients to some (meaningful) precision?