Relative error between a real and complex number.

1. Nov 23, 2008

Pacopag

1. The problem statement, all variables and given/known data
So I've got a polynomial with real roots. It turns out that if you perturb one of the coefficients by a small amount, two of the roots end up in the complex plane. Now I want to find the relative error in my computation. For two real numbers, say x1 and x2, I would take
$$rel.err. = {{x1-x2}\over{x1}}$$.
But what do I do if x1 is real and x2 is complex?

2. Relevant equations

3. The attempt at a solution

2. Nov 23, 2008

olgranpappy

mabye try
$$\frac{|x_1-x_2|}{x_1}$$

3. Nov 23, 2008

Pacopag

Yes. That makes sense. It is the distance between the two values. Works in the complex plane too. Thanks.