<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Philippe,<br>
<br>
Le 23/11/2016 19:37, philippe a écrit :<br>
</div>
<blockquote cite="mid:o14nkn$rou$1@blaine.gmane.org" type="cite">Hi,
<br>
<br>
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 :
<br>
.../...<br>
I would like to find a solution for all polynomials with
real/complex coefficients , any idea ?
<br>
</blockquote>
.<br>
For all rationals, no (see Tim's post). But for some of them, yes:
you should use Scilab 6.0-b. <br>
Some issues of this kind were reported and fixed quite recently:<br>
<font color="#000000"><font style="font-size: 11pt" size="2"><a
class="western" href="http://bugzilla.scilab.org/8493"><a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/8493">http://bugzilla.scilab.org/8493</a></a>
<a class="western"
href="https://codereview.scilab.org/#/c/18420">https://codereview.scilab.org/#/c/18420</a></font></font>
<br>
<title></title>
<meta name="generator" content="LibreOffice 5.1.5.2 (Windows)">
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.11cm }
p.western { font-size: 11pt }
a.western:visited { so-language: fr-FR }
a.cjk:visited { so-language: en-US }
a.ctl:visited { so-language: en-US }
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<font style="font-size: 11pt" size="2"><a class="western"
href="http://bugzilla.scilab.org/13893">http://bugzilla.scilab.org/13893</a>
<br>
</font> <br>
<tt>X = poly(0,'x');</tt><tt><br>
</tt><tt>A = (X-1)^2; </tt><tt><br>
</tt><tt>B = (X-1)*(X-2);</tt><tt><br>
</tt><tt>A = A+%i*0</tt><tt><br>
</tt><tt>A/B</tt><tt><br>
</tt><tt><br>
</tt><tt>-->A/B // Scilab 5.5.2<br>
ans =<br>
2 <br>
1 - 2x + 1x <br>
-------------- <br>
2 <br>
2 - 3x + x <br>
<br>
--> A/B // Scilab 6</tt><tt><br>
</tt><tt> ans =</tt><tt> </tt><tt><br>
</tt><tt> -1 + x </tt><tt><br>
</tt><tt> ------- </tt><tt> </tt><tt><br>
</tt><tt> -2 + x </tt><tt><br>
</tt><br>
HTH<br>
Samuel<br>
<br>
<title></title>
<meta name="generator" content="LibreOffice 5.1.5.2 (Windows)">
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.11cm }
p.western { font-size: 11pt }
a.western:visited { so-language: fr-FR }
a.cjk:visited { so-language: en-US }
a.ctl:visited { so-language: en-US }
</style>
</body>
</html>