On 11 May 2017 at 08:16, Waldek Hebisch <[email protected]> wrote: > Bill Page wrote: >> >> http://axiom-wiki.newsynthesis.org/SandBoxBugGroebnerFactorize >> >> A simple example of Groebner factorization works: > <snip> >> But the following moderately complex problem fails: > <snip> >> with the message >> >> >> Error detected within library code: >> index out of range >> >> The error apparently originates from 'npcoef.spad' in: >> >> -- >> check(tterm:TermC,ulist:Vector(P)) : Union(Detc,"failed") == >> cfu:P := 1$P;doit:NNI := 0;poselt:NNI := 0;pp:Union(P,"failed") >> termlist : List(VTerm) := tterm.detfacts >> vterm : VTerm := empty() >> #termlist = 1 => >> vterm := termlist.first >> for elterm in vterm while doit<2 repeat >> (cu1 := elterm.pcoef) ~= 0 => cfu := cu1*cfu >> doit := doit+1 >> poselt := position(elterm, vterm)::NNI >> doit = 2 or (pp := tterm.coefu exquo cfu) case "failed" => "failed" >> [vterm.poselt.expt, pp::P, poselt]$Detc >> "failed" >> -- >> >> It looks like this line: >> >> (cu1 := elterm.pcoef) ~= 0 => cfu := cu1*cfu >> >> causes premature exit from the loop and really should be: >> >> if (cu1 := elterm.pcoef) ~= 0 then cfu := cu1*cfu >> >> in order that poselt be set properly on exit from the loop. > > No. If poselt is not set, then check may simply fail. >
??? poselt is set to 0 by default. If this is not changed in the loop than vterm.poselt will produce an index error. This looks to me like just a simple programming error. What do you mean by "may simply fail"? check does not return "failed" in the case I am worried about, instead it aborts with an index error. >> In any case after fixing the index problem as above, another problem arises: >> >> >> Error detected within library code: >> Table construction failed in MLIFT >> >> in 'mlift.spad'. >> > > This is affected by a few bugs in pgcd. Actually, it seem > that 'nontCoprime' in pgcd.spad is quite buggy. > Assuming that one avoids the index error above are you suggesting that 'nontCoprime' is the source of this error in mlift? -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
