[Scilab-users] lack of simplification for rational

Samuel Gougeon sgougeon at free.fr
Wed Nov 23 20:57:03 CET 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161123/7bf91df9/attachment.htm>


More information about the users mailing list