[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53897] poly of conjugate complex pairs should
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #53897] poly of conjugate complex pairs should return a real polynomial |
Date: |
Mon, 14 May 2018 05:11:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
URL:
<http://savannah.gnu.org/bugs/?53897>
Summary: poly of conjugate complex pairs should return a real
polynomial
Project: GNU Octave
Submitted by: caliari
Submitted on: Mon 14 May 2018 09:11:56 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
If you try the following
n = 3;
fr = 436;
x = 1i * 2 * pi * fr * [-n:-1 1:n];
N = poly (x);
you see that N has spurious imaginary parts (quite large, in absolute value).
This should not happen, since the roots x are complex conjugate pairs. We
should first detect this fact (I thought to imag (sum (sort (x))) == 0, it is
probably possible to do without computations, but only with sorting and
comparison). Then, either we use the formula
+verbatim
(y-x(1))*(y-conj(x(1)) = y^2-2*real(x(1))*y+abs(x(1))^2
for each complex conjugate pair or we simply remove the spurious imaginary
parts after the computation of the coefficients.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53897>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #53897] poly of conjugate complex pairs should return a real polynomial,
Marco Caliari <=