ss2tf returns spurious imaginary parts in coefficients of denominator
Reported by Stéphane MOTTELET (@mottelet)
BUG DESCRIPTION:
----------------
ss2tf returns spurious imaginary parts in coefficients of denominator. This makes ss2tf unitary test fail, as roots of the denominator are not exactly complex conjugate.
HOW TO REPRODUCE THE BUG:
-------------------------
test_run cacsd ss2tf
disp(coeff(h.den(1,1)))
ans =
--> coeff(h.den(1,1))
ans =
-0.6296 15.4568 - 8.882D-16i 35.104 - 1.776D-15i 25.39 1.4 1.
The output in scilab-5.5.2 is correct :
--> coeff(h.den(1,1))
ans =
- 0.6296 15.4568 35.104 25.39 1.4 1.
OTHER INFORMATION:
------------------
Another unitary test is failing, a priori for the same reason (spurious imaginary parts in coeff of polynom)
-> exec('SCI/modules/cacsd/tests/unit_tests/zpk.tst',-1)
à la ligne 106 de la fonction assert_checkalmostequal ( /Users/mottelet/GIT/scilab_6.0/scilab/modules/development_tools/macros/assert/assert_checkalmostequal.sci ligne 120 )
à la ligne 364 du fichier exécuté /Users/mottelet/GIT/scilab_6.0/scilab/modules/cacsd/tests/unit_tests/zpk.tst
assert_checkalmostequal : Type erroné de l'argument d'entrée n°2 : Un polynôme attendu.
--> s1.D
ans =
1 0
8.882D-16 +1.110D-16s 1
s1.D should be a regular matrix, not a matrix of polynoms.