|
|
last edited 16 years ago by alfredo |
1 2 3 4 5 6 | ||
Editor:
Time: 2007/11/17 22:29:19 GMT-8 |
||
Note: fix indentation |
changed: - Axiom provides functionality to evaluate operators using a given evaluation function. Unfortunately, it is broken. \begin{axiom} g := operator 'g; eval(g(1783), g, i+->i) eval(g(n), g, i+->i) eval(a*g(n), g, i+->i) eval(a*g(1783), g, i+->i) \end{axiom} I guess that the problem is in 'smprep$FS':: smprep(lop, lexp, lfunc, p) == ..(v := mainVariable p) case "failed" => p::% ..symbolIfCan(k := v::K) case SY => p::% ..g := (op := operator k) .....(arg := [eval(a,lop,lexp,lfunc) for a in argument k]$List(%)) ..q := map(eval(#1::%, lop, lexp, lfunc), ...........univariate(p, k))$SparseUnivariatePolynomialFunctions2(MP, %) ..(n := position(name op, lop)) < minIndex lop => q g ..a:% := 0 ..f := eval((lfunc.n) arg, lop, lexp, lfunc) ..e := lexp.n ..while q ^= 0 repeat ....m := degree q ....qr := divide(m, e) ....t1 := f ** (qr.quotient)::N ....t2 := g ** (qr.remainder)::N ....a := a + leadingCoefficient(q) * t1 * t2 ....q := reductum q ..a It seems that Axiom picks the wrong 'mainVariable' in the broken case, namely 'a' instead of 'g(1783)'. I badly need this fixed... Martin
Axiom provides functionality to evaluate operators using a given evaluation function. Unfortunately, it is broken.
axiomg := operator 'g;
axiomeval(g(1783), g, i+->i)
![]() | (1) |
axiomeval(g(n), g, i+->i)
![]() | (2) |
axiomeval(a*g(n), g, i+->i)
![]() | (3) |
axiomeval(a*g(1783), g, i+->i)
![]() | (4) |
I guess that the problem is in 'smprep$FS':
smprep(lop, lexp, lfunc, p) == ..(v := mainVariable p) case "failed" => p::% ..symbolIfCan(k := v::K) case SY => p::% ..g := (op := operator k) .....(arg := [eval(a,lop,lexp,lfunc) for a in argument k]$List(%)) ..q := map(eval(#1::%, lop, lexp, lfunc), ...........univariate(p, k))$SparseUnivariatePolynomialFunctions2(MP, %) ..(n := position(name op, lop)) < minIndex lop => q g ..a:% := 0 ..f := eval((lfunc.n) arg, lop, lexp, lfunc) ..e := lexp.n ..while q ^= 0 repeat ....m := degree q ....qr := divide(m, e) ....t1 := f ** (qr.quotient)::N ....t2 := g ** (qr.remainder)::N ....a := a + leadingCoefficient(q) * t1 * t2 ....q := reductum q ..a
It seems that Axiom picks the wrong mainVariable
in the broken case, namely a
instead of g(1783)
. I badly need this fixed...
Martin