Can we recover integers $a_i$ from the sum $a_0 + a_1e+a_2e^2+\cdots+a_ne^n$? Since $e$ is transcendental, the function $f:\mathbb Z_{\geq 0}^{n+1}\to \mathbb R$ is injective,
$$ f(\underset{\text{Integers}\ \geq\ 0}{\underbrace{a_0,a_1,\ldots, a_n}}) = a_0 + a_1e+a_2e^2+\cdots a_ne^n$$
Since $f$ is injective, in principle, the numbers $a_i$ can be deduced given the output of $f$.
And since the numbers $a_i$ are non-negative, any interval of the real numbers intersects the codomain of $f$ on only finitely many points.$^*$
I'm wondering whether, in practice, the integer coefficients $a_i$ can be recovered from the value of $f$. Does it suffice to have only polynomially many (in $n$) bits of $f$? (i.e., polynomial in $n$). And can this be done in polynomial time?
There is an exponential-time algorithm, namely: Simply enumerate all $a$ for which $f(a)\leq t$ for a given target value $t$. In fact, in my application I know that $a_0+a_1+\cdots +a_n = 2^n$, so the enumeration is quite simple.

I have the same question for
$$g(a_0,a_1,\ldots, a_n) = \sum_{k=0}^ne^{\frac{i\pi}{p}k}a_k$$
In my application, I can choose $p$, e.g., a prime with $2n&lt;p$, so that the contributions all lie in the north-east region of the complex plane.
$^*$ (Thanks to Emil Jerabek for pointing out that, without that constraint, $f$ cannot be computed from finitely many bits).
This is impossible. No finite number of bits of $f(a_0,\dots,a_n)$ suffices to determine any of $a_0,\dots,a_n$; in fact, any nondegenerate real interval contains the values $f(a_0,\dots,a_n)$ for infinitely many vectors $(a_0,\dots,a_n)\in\mathbb Z^{n+1}$, and this holds even you fix all but two of the $a_0,\dots,a_n$ in advance.