I am stuck with a problem about finding the condition number of an algorithm. I tried to find an example, but i couldn't. Can anybody help me, please?

Given is $f(x)=\ln(x)$. We have the algorithm $f_{A}(x)=[\ln(x)](1+\varepsilon )$, where $\left | \varepsilon \right |\leq 5\mathrm{eps}$ and $\mathrm{eps}$ is the machine epsilon. What could be said about the condition number of this algorithm?

Well, i know that $x\in \mathbb{R}_{m}^{M}$ (the set of the machine numbers) there exists an $x_{A}$ such that $f_{A}(x)=f(x_{A})$. I also know that the condition number of an algorithm we compute with $\mathrm{cond}_{A}(f)= \mathrm{inf} \left \{\frac{\left \| x- x_{A} \right \|}{\left \| x \right \| \mathrm{eps}} \right \}$. The problem is how to find this $x_{A}$?

Can anybody help me with this problem, please? Thank you in advance!

  • 3
    $\begingroup$ Is this a homework question? $\endgroup$
    – Paul
    Mar 9, 2014 at 16:06
  • $\begingroup$ Can you state how you define the condition number of an algorithm (I assume that you equate "algorithm" and "function" here)? $\endgroup$ Mar 9, 2014 at 17:04
  • $\begingroup$ Yes, i equate algorithm and function here. $\endgroup$ Mar 9, 2014 at 17:34
  • 1
    $\begingroup$ That is not a good idea. Say, for a function you might have multiple different algorithms. $\endgroup$
    – shuhalo
    Mar 11, 2014 at 0:01

1 Answer 1


The condition number for a nonlinear function $f$ is

$$ cond(f) = \frac{x f'(x)}{f(x)} $$

so for $f(x) = ln(x)(1+\epsilon)$ that's

$$ \frac{x (1/x)(1+\epsilon)}{ln(x)(1+\epsilon)} = \frac{1}{ln(x)} $$

and as Martin stated, don't use "algorithm" and "function" interchangeably.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.