[Maxima] Maxima's rat package and "quotient is not exact"

Richard Fateman fateman at cs.berkeley.edu
Thu May 11 13:53:34 CDT 2006

Without looking at the details:

thankyou thankyou thankyou... especially
if this is related to bugs that are fixed by changing the GCD switch.

PREM  is computing a polynomial pseudo-remainder.  it is always
possible to compute a pseudo remainder of 2 integer-coeff polys, essentially
by premultiplying the dividend.
e.g. you cannot divide (x+1)  by 3*x  over the integers to get an 
integer-coeff polynomial,
but you can divide 3*x+3*1    by 3*x.  The pseudo-remainder is 3.

Now what strikes me here is that there is %i  floating around, and %i has 
rules from ordinary variables, and there may be a difference in treatment of 
from inside and outside the rat package. But maybe there is just a bug in 
It should have been copied from Knuth vol 2.

I do not have the time to look at it -- and I haven't gotten my office 
machine to run maxima yet... maybe tomorrow...

But running the commercial macsyma, the problem does not encounter an error,
neither does it seem to be computing PREM of those objects.


----- Original Message ----- 
From: "Raymond Toy" <raymond.toy at ericsson.com>
To: <maxima at math.utexas.edu>
Sent: Thursday, May 11, 2006 11:05 AM
Subject: [Maxima] Maxima's rat package and "quotient is not exact"

> I was looking at the integration bug report [ 826627 ] integrate
> quotient (gcd?)  problems
> (http://sourceforge.net/tracker/index.php?func=detail&aid=826627&group_id=4933&atid=104933)
> and noticed that the gcd problem for the integral integrate(
> x*%e^(a*x)*sin(sqrt(b-a^2)*x/2), x) was "fairly" simple.  After some
> poking around, I see that it is calling PREM like so:
> (PREM (#:A4334 3 14 2 (#:|(b-a^2)^(1/2)4333| 1 (#:%I4331 1 -13)) 1
>       (#:B4332 1 -6) 0 (#:|(b-a^2)^(1/2)4333| 1 (#:B4332 1 (#:%I4331 1 
> 1))))
>      (#:A4334 1 (#:%I4331 1 2) 0 (#:|(b-a^2)^(1/2)4333| 1 1)))
> and this returns
> (#:A4334 2 (#:|(b-a^2)^(1/2)4333| 1 -12) 0
>        (#:|(b-a^2)^(1/2)4333| 1 (#:B4332 1 -4)))
> As I understand it, PREM is computing the remainder from dividing two
> polynomials.  In this case, the polynomials are
>    14*a^3 - 13*%i*c*a^2 - 6*b*a +%i*b*c
>    2*%i*a + c
> where I have used a for #:A4334, b for #:B4332, c for
> #:|b-a^2)^(1/2)4333| and %i for #:%i4331.  I'm guessing that #:%i4331
> is really %i based on how some computations are done, but I'm not
> sure.
> So prem is returning
>   -12*c*a^2 - 4*b*c
> Which seems not right.  The remainder should be a scalar since the
> divisor is 1st order.
> Is this interpretation correct?  I'm not really familiar with how the
> rat package works.
> If my interpretation is correct, then prem is the problem causing at
> least this "quotient is not exact" issue.
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

More information about the Maxima mailing list