[Scilab-users] scilab 5.4.1 simple calculations need rounding
Manjusha Joshi
manjusha.joshi at gmail.com
Sun Sep 15 14:44:16 CEST 2013
-->x=poly(0,'x')
x =
x
Hello,
I am defining polynomial in one variable
-->f=(x-1)^2
f =
2
1 - 2x + x
I want to find factors and roots, which I can see easily as (x-1) (x-1) and
roots are 1 1
How ever when I tried the command
-->factors(f)
ans =
ans(1)
- 0.99999999999999989 + x
ans(2)
- 0.99999999999999989 + x
-->roots(f)
ans =
0.99999999999999989
0.99999999999999989
-->round(roots(f))
ans =
1.
1.
After rounding roots I am getting the correct answer.
In earlier scilab version it was working with our rounding.
Is it a bug?
Looking forward for response.
Regards,
--
Manjusha S. Joshi
Pune, India
blog:http://manjushajoshi.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130915/a67ce891/attachment.htm>
More information about the users
mailing list