[scilab-Users] Strange poly() results

allan.cornet at scilab.org allan.cornet at scilab.org
Wed May 2 06:14:01 CEST 2012


Hi,

I open a bug report @ http://bugzilla.scilab.org/show_bug.cgi?id=11064

This trouble is fixed in current master:

http://www.scilab.org/fr/communities/developer_zone/scilab_versions/development_version/nightly_builds/branch_master


Allan


On Tue, 1 May 2012 17:25:07 -0500, steven hallacy wrote:
> Not sure if it helps, but here's some more information about my
> setup:
>
> -->[version, opts] = getversion()
>  opts =
>
> !ICC x64 tk modelicac atlas release Jul 20 2011 11:01:29 !
>  version =
>
>  scilab-5.3.3
>
> Stephen
>
> -------------------------
> From: sahallacy at hotmail.com
> To: users at lists.scilab.org
> Date: Tue, 1 May 2012 17:19:31 -0500
> Subject: RE: [scilab-Users] Strange poly() results
>
>  Hello,
>
> I'm getting the same results as Kevin. I am running scilab-5.3.3_x64
> on windows 7.
>
> -->clean(coeff(poly(roots(poly([1 1 1],"x","c")),"x","r")))
>  ans =
>
>  1. + 0.4330127i 1. 1.
>
> Stephen
>
>> Date: Tue, 1 May 2012 21:24:48 +0200
>> From: serge.steer at inria.fr
>> To: users at lists.scilab.org
>> Subject: Re: [scilab-Users] Strange poly() results
>>
>> PLease can you provide more information (Operating system, Scilab
> version,...)
>>
>> On my Linux box with Scilab-5.3.3 I got
>> -->clean(coeff(poly(roots(poly([1 1 1],"x","c")),"x","r")))
>> ans =
>>
>> 1. 1. 1.
>> Serge Steer
>> INRIA
>>
>> ----- Mail original -----
>> > De: "Kevin McCoy"
>> > À: users at lists.scilab.org
>> > Envoyé: Lundi 30 Avril 2012 16:39:24
>> > Objet: [scilab-Users] Strange poly() results
>> > When I run the following:
>> >
>> > clean(coeff(poly(roots(poly([1 1 1],"x","c")),"x","r"))) I get ...
>> >
>> > ans =
>> >
>> > 1. + 0.4330127i 1. 1.
>> >
>> > But I'm expecting ...
>> >
>> > ans =
>> >
>> > 1. 1. 1.
>> >
>> > Am I doing something wrong? The documentation says that roots()
> and
>> > poly()
>> > are inverse functions, that is, if I construct a polynomial (using
>> > poly(pr,"x","r"), where pr are the roots of a polynomial), then I
>> > should get
>> > back that original polynomial.
>> >
>> > Here are some other outputs:
>> >
>> > clean(coeff(poly(roots(poly([1 1],"x","c")),"x","r"))) --> 1. 1.
>> > [correct]
>> >
>> > clean(coeff(poly(roots(poly([1 0 1],"x","c")),"x","r"))) --> 1. 0.
> 1.
>> > [correct]
>> >
>> > clean(coeff(poly(roots(poly([1 0 0 1],"x","c")),"x","r"))) -->
> 0.625 +
>> > 0.2165064i 0.4330127i 0 1. [incorrect]
>> >
>> > clean(coeff(poly(roots(poly([1 1 2],"x","c")),"x","r"))) --> 0.5 +
>> > 0.1653595i 0.5 1. [incorrect]
>> >
>> > What am I doing wrong?
>> >
>> > Thanks!
>> >
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://mailinglists.scilab.org/Strange-poly-results-tp3950884.html
>> > Sent from the Scilab users - Mailing Lists Archives mailing list
>> > archive at Nabble.com.
>> >
>> > --
>> > To unsubscribe from this mailing-list, please send an empty mail
> to
>> > users-unsubscribe at lists.scilab.org
>> > To check the archives of this mailing list, see
>> > http://mailinglists.scilab.org/
>>
>> --
>> To unsubscribe from this mailing-list, please send an empty mail to
>> users-unsubscribe at lists.scilab.org
>> To check the archives of this mailing list, see
>> http://mailinglists.scilab.org/
>>



More information about the users mailing list