diff options
Diffstat (limited to 'src/algebra/newpoly.spad.pamphlet')
-rw-r--r-- | src/algebra/newpoly.spad.pamphlet | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/algebra/newpoly.spad.pamphlet b/src/algebra/newpoly.spad.pamphlet index 65bdcde7..d695d8ee 100644 --- a/src/algebra/newpoly.spad.pamphlet +++ b/src/algebra/newpoly.spad.pamphlet @@ -120,7 +120,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where e := yy.first.k; y := per(yy.rest) -- while (not empty? xx) repeat repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break xx:= rep fmecg(per rest(xx), u, xx.first.c, y) if empty? xx then break per xx @@ -134,7 +134,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where empty? xx => [x, co, 0] pow: NNI := 0; e := yy.first.k; y := per(yy.rest); repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break xx:= rep fmecg(co * per rest(xx), u, xx.first.c, y) pow := pow + 1 if empty? xx then break @@ -151,7 +151,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where (co = -1) => - monicModulo(-x,-y) xx:= rep x; e := yy.first.k; y := per(yy.rest) repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break xx:= rep fmecg(co * per rest(xx), u, xx.first.c, y) if empty? xx then break per xx @@ -167,7 +167,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where pow: NNI := subtractIfCan(xx.first.k,e)::NNI + 1 qq: Rep := []; y := per(yy.rest) repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break qq := cons([u::NNI, xx.first.c]$Term, rep (co * per qq)) xx := rep fmecg(co * per rest(xx), u, xx.first.c, y) pow := subtractIfCan(pow,1)::NNI @@ -183,7 +183,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where (empty? xx) or (xx.first.k < e) => 0 qq: Rep := []; co := yy.first.c; y := per(yy.rest) repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break qq := cons([u::NNI, xx.first.c]$Term, rep (co * per qq)) xx := rep fmecg(co * per rest(xx), u, xx.first.c, y) if empty? xx then break @@ -236,7 +236,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where pow: NNI := subtractIfCan(xx.first.k,e)::NNI + 1 qq: Rep := []; y := per(yy.rest) repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break qq := cons([u::NNI, xx.first.c]$Term, rep (co * per qq)) xx := rep fmecg(co * per rest(xx), u, xx.first.c, y) pow := subtractIfCan(pow,1)::NNI @@ -257,7 +257,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where pow: NNI := subtractIfCan(xx.first.k,e)::NNI + 1 qq: Rep := []; co := yy.first.c; y := per(yy.rest) repeat - if (u:=subtractIfCan(xx.first.k,e)) case "failed" then break + if (u:=subtractIfCan(xx.first.k,e)) case nothing then break qq := cons([u::NNI, xx.first.c]$Term, rep (co * per qq)) xx := rep fmecg(co * per rest(xx), u, xx.first.c, y) pow := subtractIfCan(pow,1)::NNI |