[Gambas-user] function that finds ... BIS

Ru Vuott vuott at ...325...
Tue Jun 11 20:18:52 CEST 2013


Thanks, Benoît, I immediately report that to our friend.

Regards
vuott






--- Mar 11/6/13, Benoît Minisini <gambas at ...1...> ha scritto:

> Da: Benoît Minisini <gambas at ...1...>
> Oggetto: Re: [Gambas-user] function that finds ...  BIS
> A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
> Data: Martedì 11 giugno 2013, 19:57
> Le 11/06/2013 18:53, Ru Vuott a
> écrit :
> > Hello Tobi,
> >
> > our friend thanks you, however he said that he was
> referring to "Ruffini's rule".
> >
> > http://en.wikipedia.org/wiki/Ruffini%27s_rule
> >
> > bye
> > vuott
> >
> 
> In Gambas 3, you can use the gb.gsl component and its
> 'Polynomial' class 
> for that.
> 
> For example, to solve '7*(x^3)+6*(x^2)-6*(x^1)+4*(x^0)':
> 
>    Dim hPoly As Polynomial
>    Dim aSolve As Float[]
>    Dim I As Integer
> 
>    hPoly = [4, -6, 6, 7]
>    Print hPoly.ToString
>    aSolve = hPoly.Solve()
>    Print aSolve.Count;; "solution(s)"
>    For I = 0 To aSolve.Max
>      Print aSolve[I]
>    Next
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list