Here is a textbook question from "A First Course in Numerical Methods", book of the course "Numerical Analysis and Computational Mathematics". Since i am new to the topic i couldn't find a way for this question. Thanks in advance. (question):
Consider exponentiation, which is performed according to the formula $$x^y = e^{y\ln x},\quad x > 0.$$ Estimate the relative error in calculating $x^y$ in floating point, assuming $$\mathrm{fl}(\ln z) = (\ln z)(1+ \epsilon), \quad |\epsilon| ≤ \eta,$$ and that everything else is exact. Show that the sort of bound we have for elementary operations and for $\ln$ does not hold for exponentiation when $x^y$ is very large.
Just use the property $e^{x+y}=e^x e^y$ of the exponential function $$\mathrm{fl}(x^y) = e ^{y\;\mathrm{fl}(\ln x)} = e ^{y\,((\ln x) (1 + \epsilon))} = e ^{y\,(\ln x + \epsilon \ln x))} = e ^{y \ln x} \cdot e^{y \epsilon \ln x} = x^y \cdot e^{y \epsilon \ln x} $$ So the relative error is $$\frac{\left|x^y - \mathrm{fl} (x^y)\right|}{\left|x^y\right|} =\frac{\left|x^y - x^y\cdot e^{y \epsilon \ln x}\right|}{\left|x^y\right|} = \left|1- e^{y \epsilon \ln x}\right|$$ which is unbounded. For not too large $x,y$ you have $$\left|1- e^{y \epsilon \ln x}\right|\approx \left|1- (1 + y\epsilon \ln x+O(\epsilon^2)\right| \approx \left| y\epsilon \ln x\right| $$