aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog4
-rw-r--r--src/algebra/prs.spad.pamphlet28
2 files changed, 16 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 58a523d9..2217b103 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2011-12-27 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * algebra/prs.spad.pamphlet (PseudoRemainderSequence): Tidy.
+
+2011-12-27 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/g-opt.boot (changeVariableDefinitionToStore): Tidy.
Remove handling of IF forms as no longer relevant.
* algebra/matfuns.spad.pamphlet
diff --git a/src/algebra/prs.spad.pamphlet b/src/algebra/prs.spad.pamphlet
index 1155ee6d..30a5b84f 100644
--- a/src/algebra/prs.spad.pamphlet
+++ b/src/algebra/prs.spad.pamphlet
@@ -858,15 +858,13 @@ PseudoRemainderSequence(R, polR) : Specification == Implementation where
dP : polR := differentiate P
rE := resultantEuclidean(P, dP)
d := d - degree(dP) - 1
- if zero?(d) then
- c1 : polR := a * (rE.coef1 exquo LC(P))::polR
- c2 : polR := a * (rE.coef2 exquo LC(P))::polR
- cr : R := a * (rE.resultant exquo LC(P))::R
- else
- c1 : polR := a * rE.coef1 * LC(P)**(d-1)::NNI
- c2 : polR := a * rE.coef2 * LC(P)**(d-1)::NNI
- cr : R := a * rE.resultant * LC(P)**(d-1)::NNI
- return construct(c1, c2, cr)
+ zero? d =>
+ [a * (rE.coef1 exquo LC(P))::polR,
+ a * (rE.coef2 exquo LC(P))::polR,
+ a * (rE.resultant exquo LC(P))::R]
+ [a * rE.coef1 * LC(P)**(d-1)::NNI,
+ a * rE.coef2 * LC(P)**(d-1)::NNI,
+ a * rE.resultant * LC(P)**(d-1)::NNI]
semiDiscriminantEuclidean(P : polR) :
Record(coef2 : polR, discriminant : R) ==
@@ -877,13 +875,11 @@ PseudoRemainderSequence(R, polR) : Specification == Implementation where
dP : polR := differentiate P
rE := semiResultantEuclidean2(P, dP)
d := d - degree(dP) - 1
- if zero?(d) then
- c2 : polR := a * (rE.coef2 exquo LC(P))::polR
- cr : R := a * (rE.resultant exquo LC(P))::R
- else
- c2 : polR := a * rE.coef2 * LC(P)**(d-1)::NNI
- cr : R := a * rE.resultant * LC(P)**(d-1)::NNI
- return construct(c2, cr)
+ zero? d =>
+ [a * (rE.coef2 exquo LC(P))::polR,
+ a * (rE.resultant exquo LC(P))::R]
+ [a * rE.coef2 * LC(P)**(d-1)::NNI,
+ a * rE.resultant * LC(P)**(d-1)::NNI]
if R has GcdDomain then
resultantReduit(P : polR, Q : polR) : R ==