# Is the problem well conditioned or not $x=1-e^p$.

For large numbers $$|p|\gg1$$ we want to compute $$x=1-e^p$$.

Is the problem for $$|p|\gg 1$$ well conditioned.

We have $$\kappa = \frac{\|x'\|}{\|x\|}\cdot \|p\|=\frac{\|-e^p\|}{\|1-e^p\|}\cdot \|p\|$$

If $$p>0$$ we have $$\kappa=\frac{e^p}{-1+e^p} \cdot p=\frac{pe^p}{e^p-1}\approx p$$ so the problem is ill conditioned.

If $$p<0$$ $$\kappa=\frac{e^p}{1-e^p}\cdot -p=\frac{-p e^p}{1-e^p}\approx -p e^p \to 0 ~(p\to-\infty),$$ so the problem is well conditioned. I am not sure if my work is correct.

• It's when $|p|\ll 1$ that the problem is ill-conditioned. Then $e^p\approx 1$ and so the subtraction loses precision. – TonyK Jan 13 at 10:56
• We are assuming $p$ is large in absolute value always. Be it negative or positive. – badatmath Jan 13 at 10:58
• Then the problem is not ill-conditioned. – TonyK Jan 13 at 11:51
• I fixed the obvious error in the derivative but otherwise I still have a large condition number for positive $p$. – badatmath Jan 13 at 11:57
• The function $$y=\frac{\left|-e^x\right|}{\left|1-e^x\right|}\left|x\right|$$ explodes at $+\infty$ and tends to $0$ at $-\infty$ – badatmath Jan 13 at 12:02