Multiplying big polynomials

122 views
Skip to first unread message

Stephen Montgomery-Smith

unread,
Jul 2, 2012, 4:17:35 PM7/2/12
to sage-s...@googlegroups.com
I have a need to multiply polynomials of large degree (like degree
2000). The coefficients are non-negative real numbers, whose size
varies a lot.

Right now I am doing it using C++ code, and using the FFT. Because the
size of the coefficients varies considerably, I have to use high
precision floating point arithmetic packages like gmp or cln.

I have a gut feeling that Mathematica or GiNaC do polynomial
multiplication long hand. This is great for polynomials of small degree.

Does sage multiply large polynomials, whose coefficients are floating
point, using the FFT? And does it account for the fact that the FFT
might lose precision, whereas long hand seems to retain precision
(because the coefficients are non-negative)?

In short, can sage help me?

I looked at some announcements for FLINT, and I see this does this for
polynomials over the rationals or more exotic fields. My coefficients
are all rational, but the denominators are huge and I prefer not to go
in that direction.

Stephen Montgomery-Smith

unread,
Jul 2, 2012, 5:42:40 PM7/2/12
to sage-s...@googlegroups.com
Perhaps this is the answer to my question:

http://osdir.com/ml/sage-devel/2010-04/msg00598.html

Maybe polynomial multiplication of polynomials with real coefficients
was never implemented because of potential for floating point errors.

Zimmermann Paul

unread,
Jul 3, 2012, 1:13:36 PM7/3/12
to sage-s...@googlegroups.com
Hi Stephen,

as said in http://osdir.com/ml/sage-devel/2010-04/msg00598.html,
you should contact Andreas Enge or Joris van der Hoeven who are
specialists of this topic.

In particular you might have a look at MPFRCX
(http://www.multiprecision.org/index.php?prog=mpfrcx).

Paul Zimmermann
Reply all
Reply to author
Forward
0 new messages