[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiomdeveloper] [#191 exquo and therefore gcd cannot handle UP(x, EXPR
From: 
billpage 
Subject: 
[Axiomdeveloper] [#191 exquo and therefore gcd cannot handle UP(x, EXPR INT)] 
Date: 
Mon, 11 Jul 2005 16:19:13 0500 
Changes
http://page.axiomdeveloper.org/zope/mathaction/191ExquoAndThereforeGcdCannotHandleUPXEXPRINT/diff

removed:


??changed:

 _______________________________________________________

Reply to this item at:

 <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=10530>

_______________________________________________
 Message sent via/by Savannah
 http://savannah.nongnu.org/

\begin{axiom}
gcd((x2^a)::UP(x, EXPR INT), simplify((x2^a)*(x+2^a))::UP(x, EXPR INT))
\end{axiom}
Gives 1, while the correct answer should be $x2^a$, as given by
\begin{axiom}
gcd((x2^a)::UP(x, EXPR INT),((x2^a)*(x+2^a))::UP(x, EXPR INT))
\end{axiom}
gcd((x2^a)::UP(x, EXPR INT), simplify((x2^a)*(x+2^a))::UP(x, EXPR
INT))
gives 1, while the correct answer should be x2^a, as given by
gcd((x2^a)::UP(x, EXPR INT),((x2^a)*(x+2^a))::UP(x, EXPR INT))
A workaround is presented on [EXPR_GCD]
Internal Cause
In EXPR INT, $2^a$ and $2^(2a)$ are treated as two variables
without relations in EXPR INT. Therefore exquo in::
gcdPrimitive(p1:SUPP,p2:SUPP)$PGCD
fails.
Thu 09/30/2004 at 09:31, comment !#3
Excuse me, I was to quick again. Here is the (hopefully correct)
anaylysis::
exquo(simplify((A2^a)*(A+2^a))::UP(A,EXPR INT),(A2^a)::UP(A,EXPR INT))
calls 'exquo$SUP(EXPR INT)'. This implements exact division of
polynomials p1 by p2 as usual. After each subtraction  done via
'fmecg$SUP'  the result is again stored in p1. exquo terminates
when p1 is the empty list  note that SUPs are stored as lists
of pairs (degree, coefficient)  or the degree of p2 is larger
than p1. In the latter case, exquo fails.
Thus, in our case, at one point p1 is $4^a2^(2a)$, which is zero
mathematically, but axiom does not know it. In particular,
p1 is not the empty list, but rather a constant polynomial...
It would be interesting to see how MuPAD or Aldor handle this.
Martin Rubey <kratt6>
Wed 09/29/2004 at 16:20, comment !#2:
The instance of exquo involved is the one in SMP.
Sorry, this is not correct. It is in FIELD (for EXPR INT)
Martin Rubey <kratt6>
Wed 09/29/2004 at 16:02, comment !#1:
I should have added:
\begin{axiom}
exquo(normalize(simplify(((A2^a)*(A+2^a)))::EXPR INT),normalize((A2^a)::EXPR
INT))
exquo(simplify((A2^a)*(A+2^a))::UP(A,EXPR INT),(A2^a)::UP(A,EXPR INT))
\end{axiom}
I'm afraid that this cannot be fixed easily, since there is no
general mechanism to determine whether an expression is zero or not,
which is needed in exquo. The instance of exquo involved is the
one in SMP.

forwarded from http://page.axiomdeveloper.org/zope/mathaction/address@hidden
 [Axiomdeveloper] [#191 exquo and therefore gcd cannot handle UP(x, EXPR INT)],
billpage <=