[GiNaC-devel] Polynomial arithmetics (Was: please pull from ...)

Alexei Sheplyakov varg at theor.jinr.ru
Mon Sep 22 20:21:23 CEST 2008


Hello,

On Mon, Sep 22, 2008 at 07:34:22PM +0200, Bernard Parisse wrote:
 
> Did you consider the option of writing GiNaC::ex to giac::gen converters 
> and use giac factorization and gcd code instead?

I've tried to re-use gcd and factorization code from giac. But sanitazing
that code was very boring, and I've gave up. I guess I'll re-use (some)
ideas instead.

> I guess it would save you a lot of time and headaches

At the expense of another headaches (such as messy error handling),
unfortunately.

> (I have worked and extensive amount of time on these functions, I know 
> what I'm speaking of)

I'm aware of that.

> without much loss of performance since the initial and final conversions do
> not take much time with respect to these algorithms.

That's not quite true. First of all, the conversion (at least) doubles
the memory footprint. Secondly, GMP is quite slow when operating on small
(i.e. native) integers (because it always allocates them on heap).

Best regards,
	Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20080922/42fc819e/attachment-0001.sig 


More information about the GiNaC-devel mailing list