Hello Philippe,

Le 23/11/2016 19:37, philippe a écrit :
Hi,

I have a problem to simplify automatically rational with an imaginary part. In my case I only manipulate polynomials with real coefficients but some imaginary part arise due to rounding errors. See this example :
.../...
I would like to find a solution for all polynomials with real/complex coefficients , any idea ?
.
For all rationals, no (see Tim's post). But for some of them, yes: you should use Scilab 6.0-b.
Some issues of this kind were reported and fixed quite recently:
http://bugzilla.scilab.org/8493 https://codereview.scilab.org/#/c/18420
http://bugzilla.scilab.org/13893

X = poly(0,'x');
A = (X-1)^2;
B = (X-1)*(X-2);
A = A+%i*0
A/B

-->A/B   // Scilab 5.5.2
 ans  =
                2
    1 - 2x +  1x
   --------------
              2
    2 - 3x + x

--> A/B  // Scilab 6
 ans  =
   -1 + x
   -------
   -2 + x

HTH
Samuel

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to