In this Scilab code, I am converting a state space system to a transfer function and the output should be G(s)= (s+3)/(s^3+6s^2+11s+6) but I got this output G(s)=(1 +8.882D-16s)/(2 +3s +s² ) . I know there is a common factor (s+3) between a numerator and a denominator that had been cancelled but if I converted the same transfer function to a state space system again, I will get a different system with different matrices dimensions and values than the original system which does not happen in Matlab. Is there any way to avoid this problem and remove this term (8.882D-16s) from the transfer function?
clear
A=[-1 0 1; 1 -2 0;0 0 -3];
B=[0;0;1];
C=[1 1 0];
D=[0];
sys=syslin('c', A, B, C, D); // c....continuous time domain system
//linear system
G=ss2tf(sys)
disp(G)
ss=tf2ss(G)
[A,B,C,D]=abcd(ss) ```