[GiNaC-list] quo behaviour
Ralf Stephan
ralf at ark.in-berlin.de
Wed Aug 18 12:21:04 CEST 2004
> I guess one needs to re-express quo()/rem() in terms of pquo()/prem() to
> make that work?
Only your question made me aware of prem(). Now, that seems possible
but prem() itself appears to have problems:
> prem(x*y^3,y*x^3,x);
x*y^3
This would (according to the tutorial) satisfy
x^(-3)*x*y^3 = y*x^3*q + prem (=x*y^3), so
q = pquo() = (x^(-3)-1)*y^2/x^2 which doesn't seem right.
There is also the problem of quo() returning a fail (decompose_rational()
needs it) which surprised my computations, giving an error, something with
commutativity, and I needed some time to see that I was working with a fail
that I got from quo().
Thanks,
ralf
More information about the GiNaC-list
mailing list