[GiNaC-devel] factorization and stuff

Jens Vollinga jensv at nikhef.nl
Wed Sep 10 09:44:07 CEST 2008


Hi,

Richard B. Kreckel schrieb:
> Now, I'm getting:
>  > 
> factor(expand((77+102*x^4+27*x+11*x^3+25*x^2)*(85+66*x^4+29*x+57*x^3+92*x^2)));
> Not a 32-bit integer: 2955677175
> 
> Woops! Sorry for being a nuisance.  ;-)

thanks for the report, and thanks for the patch!

> This leaves me wondering whether other numeric -> int conversions should 
> be treated likewise. What about gamma inside the hensel_univar function? 
> I don't know what it is. Can we assume with reasonable certainty that it 
> fits the target unsigned int format?

You are completely right. This is bad stuff and it is probably happening 
at more places. When I started programming the code I didn't fully 
understand the algorithm behind it. Programming it was actually the way 
to understand how the mathematics works.

Anyway, now the code is feature complete. Next is the actual testing and 
debugging. Right, I didn't really test the code yet! If that second step 
is finished I am going to clean-up, rewrite, comment, and optimize the code.

Currently, the multivariate code breaks for example for x+x*y-1. Have to 
fix that.

Regards,
Jens



More information about the GiNaC-devel mailing list