diff --git a/changelog b/changelog index c322d9e..e5f86c7 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20110812 tpd src/axiom-website/patches.html 20110812.01.rhx.patch +20110812 tpd src/input/Makefile document finite field bug +20110812 rhx src/input/ffieldbug.input added 20110807 tpd src/axiom-website/patches.html 20110807.01.tpd.patch 20110807 tpd src/interp/compiler.lisp treeshake compiler 20110807 tpd books/bookvol9 treeshake compiler diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 4e3099e..450baa5 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3580,5 +3580,7 @@ src/interp/ax.lisp removed aldor compiler hooks
books/bookvol9 treeshake compiler
20110807.01.tpd.patch books/bookvol9 treeshake compiler
+20110812.01.rhx.patch +src/input/ffieldbug.input added
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet index 1f3aeb6..bbd30bb 100644 --- a/src/input/Makefile.pamphlet +++ b/src/input/Makefile.pamphlet @@ -321,7 +321,8 @@ REGRESSTESTS= ackermann.regress \ exp.regress \ expexpan.regress explim.regress expr1.regress exprode.regress \ expr.regress exseries.regress exsum.regress exprpoly.regress \ - farray.regress ffdemo.regress fferr.regress ffx72.regress \ + farray.regress ffdemo.regress fferr.regress ffieldbug.regress \ + ffx72.regress \ fib.regress finitegraph.regress \ file.regress fixed.regress \ float1.regress float2.regress \ @@ -674,7 +675,8 @@ FILES= ${OUT}/ackermann.input \ ${OUT}/explim.input ${OUT}/explot2d.input ${OUT}/explot3d.input \ ${OUT}/expr1.input ${OUT}/exprpoly.input \ ${OUT}/farray.input ${OUT}/ffdemo.input \ - ${OUT}/fferr.input ${OUT}/ffrac.input ${OUT}/ffx72.input \ + ${OUT}/fferr.input ${OUT}/ffrac.input ${OUT}/ffieldbug.input \ + ${OUT}/ffx72.input \ ${OUT}/fib.input ${OUT}/finitegraph.input \ ${OUT}/fixed.input \ ${OUT}/file.input ${OUT}/float2.input \ @@ -1028,6 +1030,7 @@ DOCFILES= \ ${DOC}/f07fdf.input.dvi ${DOC}/f07fef.input.dvi \ ${DOC}/farray.input.dvi ${DOC}/ffdemo.input.dvi \ ${DOC}/fferr.input.dvi ${DOC}/ffrac.input.dvi \ + ${DOC}/ffieldbug.input.dvi \ ${DOC}/ffx72.input.dvi ${DOC}/fib.input.dvi \ ${DOC}/finitegraph.input.dvi \ ${DOC}/file.input.dvi ${DOC}/fixed.input.dvi \ diff --git a/src/input/ffieldbug.input.pamphlet b/src/input/ffieldbug.input.pamphlet new file mode 100644 index 0000000..844e2e8 --- /dev/null +++ b/src/input/ffieldbug.input.pamphlet @@ -0,0 +1,313 @@ +\documentclass{article} +\usepackage{axiom} +\setlength{\textwidth}{400pt} +\begin{document} +\title{\$SPAD/src/input ffieldbug.input} +\author{Paul Onions, Ralf Hemmecke} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\begin{chunk}{*} +)set break resume +)spool ffieldbug.output +)set message test on +)set message auto off +)clear all + +--S 1 of 29 +gf2 := PrimeField 2 +--R +--R +--R (1) PrimeField 2 +--R Type: Domain +--E 1 + +--S 2 of 29 +gf16 := FiniteFieldExtensionByPolynomial(gf2,x**4+x+1) +--R +--R +--R (2) FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--R Type: Domain +--E 2 + +--S 3 of 29 +a:=primitiveElement()$gf16 +--R +--R +--R (3) %A +--R Type: FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 3 + +--S 4 of 29 +p:POLY gf16:=a*x**3 +--R +--R +--R 3 +--R (4) %A x +--R Type: Polynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 4 + +--S 5 of 29 +q:POLY gf16:=a*x**2+1 +--R +--R +--R 2 +--R (5) %A x + 1 +--R Type: Polynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 5 + +--S 6 of 29 +p rem q +--R +--R +--RDaly Bug +--R >> Error detected within library code: +--R coerce: element doesn't belong to smaller field +--R +--R Continuing to read the file... +--R +--E 6 + +)clear all + +--S 7 of 29 +gf2 := PrimeField 2 +--R +--R +--R (1) PrimeField 2 +--R Type: Domain +--E 7 + +--S 8 of 29 +gf16:=FiniteFieldExtension(gf2,4) +--R +--R +--R (2) FiniteFieldExtension(PrimeField 2,4) +--R Type: Domain +--E 8 + +--S 9 of 29 +a:=primitiveElement()$gf16 +--R +--R +--R (3) %A +--R Type: FiniteFieldExtension(PrimeField 2,4) +--E 9 + +--S 10 of 29 +p:POLY gf16:=a*x**3 +--R +--R +--R 3 +--R (4) %A x +--R Type: Polynomial FiniteFieldExtension(PrimeField 2,4) +--E 10 + +--S 11 of 29 +q:POLY gf16:=a*x**2+1 +--R +--R +--R 2 +--R (5) %A x + 1 +--R Type: Polynomial FiniteFieldExtension(PrimeField 2,4) +--E 11 + +--S 12 of 29 +p rem q +--R +--R +--RDaly Bug +--R >> Error detected within library code: +--R coerce: element doesn't belong to smaller field +--R +--R Continuing to read the file... +--R +--E 12 + +)clear all + +--S 13 of 29 +gf2 := PrimeField 2 +--R +--R +--R (1) PrimeField 2 +--R Type: Domain +--E 13 + +--S 14 of 29 +gf16:=FiniteField(2,4) +--R +--R +--R (2) FiniteField(2,4) +--R Type: Domain +--E 14 + +--S 15 of 29 +a:=primitiveElement()$gf16 +--R +--R +--R (3) %A +--R Type: FiniteField(2,4) +--E 15 + +--S 16 of 29 +p:POLY gf16:=a*x**3 +--R +--R +--R 3 +--R (4) %A x +--R Type: Polynomial FiniteField(2,4) +--E 16 + +--S 17 of 29 +q:POLY gf16:=a*x**2+1 +--R +--R +--R 2 +--R (5) %A x + 1 +--R Type: Polynomial FiniteField(2,4) +--E 17 + +--S 18 of 29 +p rem q +--R +--R +--R (6) x +--R Type: UnivariatePolynomial(x,FiniteField(2,4)) +--E 18 + + +\end{chunk} +Ralf Hemmecke comments: +\begin{verbatim} +Yes, I'd say that this is abug. But maybe from the following transcript +you can see what is happening. + +Why have I used SUP? Well, Polynomial is a domain that can hold +polynomials in any variable. In fact, it's not a univariate polynomial +domain. So if you say p rem q, it has to figure out what you could +have meant. Well, your polynomials are univariate, so (I guess - I +haven't actually looked at the source code) internally p and q will be +coerced to a univariate polynomial (i.e. to type SUP(gf16)). As you see +below, for some reason, I don't yet understand, this goes wrong. ... + +I have no idea why coercion with FiniteField(2,4) works, but not with +FiniteFieldExtensionByPolynomial(PrimeField(2),?^4+?+1). + +\end{verbatim} +\begin{chunk}{*} + +)clear all + +--S 19 of 29 +gf2:=PrimeField 2 +--R +--R +--R (1) PrimeField 2 +--R Type: Domain +--E 19 + +--S 20 of 29 +gf16:=FiniteFieldExtensionByPolynomial(gf2,x**4+x+1) +--R +--R +--R (2) FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--R Type: Domain +--E 20 + +--S 21 of 29 +P:=SUP gf16 +--R +--R +--R (3) +--R SparseUnivariatePolynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4 +--R +?+1) +--R Type: Domain +--E 21 + +--S 22 of 29 +a:gf16:=primitiveElement() +--R +--R +--R (4) %A +--R Type: FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 22 + +--S 23 of 29 +p:P:=a*x^3 +--R +--R +--RDaly Bug +--R >> Error detected within library code: +--R coerce: element doesn't belong to smaller field +--R +--R Continuing to read the file... +--R +--E 23 + +--S 24 of 29 +m:P:=monomial(1,1) +--R +--R +--R (5) ? +--RType: SparseUnivariatePolynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 24 + +--S 25 of 29 +p:P:=a*m^3 +--R +--R +--R 3 +--R (6) %A ? +--RType: SparseUnivariatePolynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 25 + +--S 26 of 29 +q:P:=a*x^2+1 +--R +--R +--RDaly Bug +--R >> Error detected within library code: +--R coerce: element doesn't belong to smaller field +--R +--R Continuing to read the file... +--R +--E 26 + +--S 27 of 29 +a:=primitiveElement()$gf16 +--R +--R +--R (7) %A +--R Type: FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 27 + +--S 28 of 29 +q:P:=a*m^2+1 +--R +--R +--R 2 +--R (8) %A ? + 1 +--RType: SparseUnivariatePolynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 28 + +--S 29 of 29 +p rem q +--R +--R +--R (9) ? +--RType: SparseUnivariatePolynomial FiniteFieldExtensionByPolynomial(PrimeField 2,?**4+?+1) +--E 29 + +)spool +)lisp (bye) + +\end{chunk} +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document}