Suppose I have some arbitrary analytic function over the reals e.g.:
$$ x \mapsto \frac{\sqrt{\sin(x)+2e^x}}{x^2 - \ln(x^x)} $$
Given some input of arbitrary precision $x$ how can I evaluate such an expression to a given precision such that the first $n$ bits are correct.
For example consider $ a + b $, to evaluate this expression to n bits I need only evaluate $ a $ and $ b $ to $ n $ bits.
However for multiplication to evaluate to $ n $ bits I need to evaluate $ a $ and $ b $ to a higher precision to avoid precision loss in the result.
In general given an analytic function (e.g. $ x \mapsto \sqrt{x}) $ can I determine what precision I need to evaluate its arguments in order to get $ n $ bits in the result?
Sorry, no level of precision will ensure that the first $n$ bits are correct. For example, if the value of the expression happens to be exactly $2$ (but you don't know that), a numerical evaluation may well give you something slightly less than $2$, and then even the first bit will be wrong.
What you might be able to do is to guarantee that the absolute error will be at most a given number $\epsilon$.