[Gambas-devel] [Gambas-user] gb.gsl: Polynomial arithmetic / gb.flint

Tobias Boege taboege at ...176...
Sat Nov 29 13:38:50 CET 2014


On Fri, 28 Nov 2014, Beno?t Minisini wrote:
> Le 28/11/2014 12:05, Tobias Boege a ?crit :
> > Hi Benoit,
> >
> > the Polynomial class in gb.gsl does not support all the arithmetic
> > operations I'm going to need. I'd like to multiply two polynomials and
> > to divide a polynomial by a (non-zero) scalar. I just saw that GSL
> > doesn't implement polynomial arithmetic at all and you wrote the addition
> > and subtraction functions by hand...
> >
> > What do you think about the FLINT library? I just glanced at its
> > documentation and it looks like a treasure chest, and already pretty
> > object-oriented. I'll add gb.flint somewhere near the top of my TODO
> > list...
> >
> > And out of curiosity: for the polynomials with real or complex
> > coefficients, there is an euclidean division operation defined. The
> > GB_OPERATOR_DESC structure has no entry for the MOD operator, or does it?
> > If not, there is no chance of doing euclidean division via operators?
> >
> > Regards,
> > Tobi
> >
> 
> I was not aware of the FLINT library. If you want to make a component 
> from it, start from a copy of gb.gsl to mimic its structure.
> 

AFAICS, FLINT has different types of polynomials, depending on what ring
they're defined over, none of which are the real or complex numbers nor
anything compatible. For real polynomials we could use polynomials over
Q because there are no non-rational numbers on a computer, but I see no
such trick for complex numbers. Also, I think it'd be more straight forward
to stick to FLINT's scheme, i.e. have QPolynomial, FqPolynomial,
ZPolynomial, etc. classes.

There seems to be an extension library, "Arb", which has real or complex
polynomials... So, I could mimic gb.gsl's Polynomial using a complex
polynomial from Arb which I could name just Polynomial. What do you think?

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the Devel mailing list