<div dir="ltr"><div>Hello,<br><br></div>I have Scilab 5.4.1 and tried the code as you typed it and I get no rounding errors:<br><div><div><br>-->x=poly(0,'x')<br> x  =<br> <br>    x   <br> <br>-->f=(x-1)^2<br>
 f  =<br> <br>              2  <br>    1 - 2x + x   <br> <br>-->factors(f)<br> ans  =<br> <br> <br>       ans(1)<br> <br>  - 1 + x   <br> <br>       ans(2)<br> <br>  - 1 + x   <br> <br>-->roots(f)<br> ans  =<br> <br>
    1.  <br>    1. <br><br></div><div>Maybe some others can see what the issue is. Running on Windows 7 64 bit.<br><br></div><div>Cheers<br></div><div>Lester<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 15 September 2013 13:44, Manjusha Joshi <span dir="ltr"><<a href="mailto:manjusha.joshi@gmail.com" target="_blank">manjusha.joshi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br clear="all"><div><div> </div><div>-->x=poly(0,'x')</div><div> x  =</div><div> </div><div>    x   </div><div> </div><div>Hello,</div><div><br></div><div>I am defining polynomial in one variable</div>


<div> </div><div>-->f=(x-1)^2</div><div> f  =</div><div> </div><div>              2  </div><div>    1 - 2x + x  </div></div><div><br></div><div>I want to find factors and roots, which I can see easily as (x-1) (x-1) and roots are 1 1</div>


<div><br></div><div>How ever when I tried the command</div><div><div><br></div><div> </div><div>-->factors(f)</div><div> ans  =</div><div> </div><div> </div><div>       ans(1)</div><div> </div><div>  - 0.99999999999999989 + x   </div>


<div> </div><div>       ans(2)</div><div> </div><div>  - 0.99999999999999989 + x   </div><div> </div><div>-->roots(f)</div><div> ans  =</div><div> </div><div>    0.99999999999999989  </div><div>    0.99999999999999989  </div>


<div> </div><div>-->round(roots(f))</div><div> ans  =</div><div> </div><div>    1.  </div><div>    1.  </div><div> </div></div><div><br></div><div>After rounding roots I am getting the correct answer.</div>

<div><br></div><div>In earlier scilab version it was working with our rounding.</div><div><br></div><div>Is it a bug?</div><div><br></div><div>Looking forward for response.</div><div>

<br></div><div>Regards,</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>Manjusha S. Joshi <br>Pune, India<br>blog:<a href="http://manjushajoshi.wordpress.com/" target="_blank">http://manjushajoshi.wordpress.com/</a><div>
<br><br> 
</div></font></span></div>
<br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>