Is GiNaC really that dirty?

Chris Dams chrisd at
Tue Jul 17 16:57:52 CEST 2001


On Tue, 17 Jul 2001, Richard B. Kreckel wrote:

> Hmm, considering it.  However, I am curious: may I ask why one wants to
> cut off powers if the exponent exceeds a certain integer?  Series
> expansion `abuse' (no pun intended)?

No actually not. It is for efficiency reasons. I have some recursion
relations between some polynomials (in two variable with huge rational
numbers as coefficients), with multiplications and that sort of
stuff. In the end I only need the factor before variable^zero, but the
recursion relations also contain a derivative, so the higher order
coefficients do play a role, but most of them do not matter, so I want
to throw away the ones that do not matter. My program then runs much
faster, a factor 8 or something like that. Actually I do not think I am
really going to use it since I already got some results with a FORM
implementation of the same problem, but since facilities for procedures in
FORM are really bad, I wanted to see if there was something better than
FORM, and try it on some non-trivial problem.

Maybe you like to hear that since I plugged in your version of the
*checkdeg* function, it actually became faster than the FORM version I had
before (with my own version they were about equally fast). Well, I did
not really check what happens when memory usage becomes so large that my
programs needs to swap.


More information about the GiNaC-list mailing list