From bug-request at octave dot org Tue Jul 27 18:35:35 2004 Subject: Re: root (x^{1/n}) inconsistency or problem ? From: Paul Kienzle To: "Pascal A. Dupuis" Cc: bug at octave dot org Date: Tue, 27 Jul 2004 19:34:42 -0400 On Jul 27, 2004, at 11:23 AM, Pascal A. Dupuis wrote: > I work a lot on System Identification problems, and I often have to > find the roots of some real polynomial, which must be design occur as > complex conjugate pairs, if any. So, performing operations on a > complex vector x where imag(sum(x)) is constrained to be 0 should > result in a vector with the same constraint. Thus, for exponentiating > with m = 1/n, n integer > 1: > > positive real value: OK > complex conjugate pair: return the principal value, > i.e. abs(c)^m*exp(+/-arg*m*j) > negative real value, n even: result has to be complex > n odd: I would prefer - (abs(x))^1/n, which is > real and such that result ^n = x > > I agree that, with this approach, this opens another problem, > i.e. detecting that m is the reciprocal of some integer. Have you looked at Algorithm 835: MultRoot---a Matlab package for computing polynomial roots and multiplicities in TOMS? It claims " MultRoot is a collection of Matlab modules for accurate computation of polynomial roots, especially roots with non-trivial multiplicities." Let us know how it works. - Paul ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------