public inbox for gentoo-science@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-science] Re: polynomial arithmetic
       [not found] ` <alpine.LRH.2.11.1404161313010.15766@star.inp.nsk.su>
@ 2014-04-16  6:25   ` Thomas Kahle
  2014-04-16  7:06     ` François Bissey
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Kahle @ 2014-04-16  6:25 UTC (permalink / raw
  To: hasufell; +Cc: gentoo-science

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

On 16/04/14 08:15, grozin@gentoo.org wrote:
> On Sun, 13 Apr 2014, hasufell wrote:
>> I'm looking for a C lib that can do basic polynomial arithmetic as well
>> as algebraic stuff like modular inverse.
> Maybe GiNaC. It definitely can do polynomials.
> 
> Another possibility is pari. It can be used as a library, not only via
> gp. It is highly optimized and efficient.

I'm pretty sure that this can be done in sage.  You could see
which library they use under the hood.  Taking this to
sci-mailing list, there your question gets a lot more attention.

Cheers,
Thomas


-- 
Thomas Kahle
http://dev.gentoo.org/~tomka/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 601 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Re: polynomial arithmetic
  2014-04-16  6:25   ` [gentoo-science] Re: polynomial arithmetic Thomas Kahle
@ 2014-04-16  7:06     ` François Bissey
  2014-04-16  7:13       ` François Bissey
  0 siblings, 1 reply; 4+ messages in thread
From: François Bissey @ 2014-04-16  7:06 UTC (permalink / raw
  To: gentoo-science

On 2014-04-16 18:25, Thomas Kahle wrote:
> On 16/04/14 08:15, grozin@gentoo.org wrote:
>> On Sun, 13 Apr 2014, hasufell wrote:
>>> I'm looking for a C lib that can do basic polynomial arithmetic as 
>>> well
>>> as algebraic stuff like modular inverse.
>> Maybe GiNaC. It definitely can do polynomials.
>> 
>> Another possibility is pari. It can be used as a library, not only via
>> gp. It is highly optimized and efficient.
> 
> I'm pretty sure that this can be done in sage.  You could see
> which library they use under the hood.  Taking this to
> sci-mailing list, there your question gets a lot more attention.
> 
Definitely can be done in sage. What they use under the hood depends
on the ring the polynomial are defined over. But I think for most
applications singular is used.

I wouldn't say singular is very basic. At a more basic level you
may be able to use python with numpy:
http://docs.scipy.org/doc/numpy/reference/routines.polynomials.polynomial.html
And of course maxima can do some stuff with polynomial too
http://maxima.sourceforge.net/docs/manual/en/maxima_14.html

François


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Re: polynomial arithmetic
  2014-04-16  7:06     ` François Bissey
@ 2014-04-16  7:13       ` François Bissey
  2014-04-16  7:31         ` Burcin Erocal
  0 siblings, 1 reply; 4+ messages in thread
From: François Bissey @ 2014-04-16  7:13 UTC (permalink / raw
  To: gentoo-science

On 2014-04-16 19:06, François Bissey wrote:
> On 2014-04-16 18:25, Thomas Kahle wrote:
>> On 16/04/14 08:15, grozin@gentoo.org wrote:
>>> On Sun, 13 Apr 2014, hasufell wrote:
>>>> I'm looking for a C lib that can do basic polynomial arithmetic as 
>>>> well
>>>> as algebraic stuff like modular inverse.
>>> Maybe GiNaC. It definitely can do polynomials.
>>> 
>>> Another possibility is pari. It can be used as a library, not only 
>>> via
>>> gp. It is highly optimized and efficient.
>> 
>> I'm pretty sure that this can be done in sage.  You could see
>> which library they use under the hood.  Taking this to
>> sci-mailing list, there your question gets a lot more attention.
>> Definitely can be done in sage. What they use under the hood depends
> on the ring the polynomial are defined over. But I think for most
> applications singular is used.
> 
> I wouldn't say singular is very basic. At a more basic level you
> may be able to use python with numpy:
> http://docs.scipy.org/doc/numpy/reference/routines.polynomials.polynomial.html
> And of course maxima can do some stuff with polynomial too
> http://maxima.sourceforge.net/docs/manual/en/maxima_14.html
> 
Missed the C library bit. Not sure about basic ones. Especially modular 
inverse,
just searching for that may narrow your field.

François


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Re: polynomial arithmetic
  2014-04-16  7:13       ` François Bissey
@ 2014-04-16  7:31         ` Burcin Erocal
  0 siblings, 0 replies; 4+ messages in thread
From: Burcin Erocal @ 2014-04-16  7:31 UTC (permalink / raw
  To: gentoo-science

On Wed, 16 Apr 2014 19:13:54 +1200
François Bissey <fbissey@slingshot.co.nz> wrote:

> On 2014-04-16 19:06, François Bissey wrote:
> > On 2014-04-16 18:25, Thomas Kahle wrote:
> >> On 16/04/14 08:15, grozin@gentoo.org wrote:
> >>> On Sun, 13 Apr 2014, hasufell wrote:
> >>>> I'm looking for a C lib that can do basic polynomial arithmetic
> >>>> as well
> >>>> as algebraic stuff like modular inverse.
> >>> Maybe GiNaC. It definitely can do polynomials.

I wouldn't recommend using GiNaC if you know which algebraic domain you
are working with. Once the domain is known, there are special algorithms
you can take advantage of for arithmetic. GiNaC's generic
implementation is faster only if you have really sparse polynomials.

> >>> Another possibility is pari. It can be used as a library, not
> >>> only via
> >>> gp. It is highly optimized and efficient.
> >> 
> >> I'm pretty sure that this can be done in sage.  You could see
> >> which library they use under the hood.  Taking this to
> >> sci-mailing list, there your question gets a lot more attention.
> >> Definitely can be done in sage. What they use under the hood
> >> depends
> > on the ring the polynomial are defined over. But I think for most
> > applications singular is used.

As Thomas said, Sage picks the underlying library depending on the
coefficient ring, number of variables, etc. Which domain do you want to
work with?

NTL [1] and FLINT [2] are good options for univariate polynomials over
various base rings for instance.

[1] http://www.shoup.net/ntl/

[2] http://flintlib.org/


Cheers,
Burcin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-16  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <534AA6A3.9020808@gentoo.org>
     [not found] ` <alpine.LRH.2.11.1404161313010.15766@star.inp.nsk.su>
2014-04-16  6:25   ` [gentoo-science] Re: polynomial arithmetic Thomas Kahle
2014-04-16  7:06     ` François Bissey
2014-04-16  7:13       ` François Bissey
2014-04-16  7:31         ` Burcin Erocal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox