Gentoo Archives: gentoo-science

From: Burcin Erocal <burcin@××××××.org>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] Re: polynomial arithmetic
Date: Wed, 16 Apr 2014 07:31:33
Message-Id: 20140416093127.5081fb20@carl.erocal.org
In Reply to: Re: [gentoo-science] Re: polynomial arithmetic by "François Bissey"
1 On Wed, 16 Apr 2014 19:13:54 +1200
2 François Bissey <fbissey@××××××××××××.nz> wrote:
3
4 > On 2014-04-16 19:06, François Bissey wrote:
5 > > On 2014-04-16 18:25, Thomas Kahle wrote:
6 > >> On 16/04/14 08:15, grozin@g.o wrote:
7 > >>> On Sun, 13 Apr 2014, hasufell wrote:
8 > >>>> I'm looking for a C lib that can do basic polynomial arithmetic
9 > >>>> as well
10 > >>>> as algebraic stuff like modular inverse.
11 > >>> Maybe GiNaC. It definitely can do polynomials.
12
13 I wouldn't recommend using GiNaC if you know which algebraic domain you
14 are working with. Once the domain is known, there are special algorithms
15 you can take advantage of for arithmetic. GiNaC's generic
16 implementation is faster only if you have really sparse polynomials.
17
18 > >>> Another possibility is pari. It can be used as a library, not
19 > >>> only via
20 > >>> gp. It is highly optimized and efficient.
21 > >>
22 > >> I'm pretty sure that this can be done in sage. You could see
23 > >> which library they use under the hood. Taking this to
24 > >> sci-mailing list, there your question gets a lot more attention.
25 > >> Definitely can be done in sage. What they use under the hood
26 > >> depends
27 > > on the ring the polynomial are defined over. But I think for most
28 > > applications singular is used.
29
30 As Thomas said, Sage picks the underlying library depending on the
31 coefficient ring, number of variables, etc. Which domain do you want to
32 work with?
33
34 NTL [1] and FLINT [2] are good options for univariate polynomials over
35 various base rings for instance.
36
37 [1] http://www.shoup.net/ntl/
38
39 [2] http://flintlib.org/
40
41
42 Cheers,
43 Burcin