diff --git a/doc/ref/fieldfin.xml b/doc/ref/fieldfin.xml index bf7b567851..2eebddea30 100644 --- a/doc/ref/fieldfin.xml +++ b/doc/ref/fieldfin.xml @@ -178,8 +178,8 @@ Finally note that elements of large prime fields are stored and displayed as residue class objects. So

Z(65537); -ZmodpZObj( 3, 65537 ) +gap> Z(NextPrimeInt(2^30)); +ZmodpZObj( 2, 1073741827 ) ]]> diff --git a/lib/ffe.gd b/lib/ffe.gd index 82ee6a4c0a..0928bc9c40 100644 --- a/lib/ffe.gd +++ b/lib/ffe.gd @@ -18,6 +18,7 @@ ## ## ## +## ## ## ## For creating elements of a finite field, @@ -30,8 +31,8 @@ ##

## &GAP; can represent elements of all finite fields ## GF(p^d) such that either -## (1) p^d <= 65536 (in which case an extremely efficient -## internal representation is used); +## (1) p^d <= MAXSIZE_GF_INTERNAL (in which case an +## efficient internal representation is used); ## (2) d = 1, (in which case, for large p, the field is represented ## using the machinery of residue class rings ## (see section ) or @@ -39,6 +40,11 @@ ## p elements is known, or can be computed ## (see ). ##

+## +## MAXSIZE_GF_INTERNAL may depend on the word size of your computer +## and the version of &GAP; but will typically be either 2^{16} or +## 2^{24}.

+## ## If you attempt to construct an element of GF(p^d) for which ## d > 1 and the relevant Conway polynomial is not known, ## and not necessarily easy to find @@ -107,14 +113,15 @@ ## 0*Z(2) ## gap> a*a; ## Z(2^5)^2 -## gap> b := Z(3,12); +## gap> b := Z(3,20); ## z ## gap> b*b; ## z2 ## gap> b+b; ## 2z ## gap> Print(b^100,"\n"); -## Z(3)^0+Z(3,12)^5+Z(3,12)^6+2*Z(3,12)^8+Z(3,12)^10+Z(3,12)^11 +## 2*Z(3,20)^2+Z(3,20)^4+Z(3,20)^6+Z(3,20)^7+2*Z(3,20)^9+2*Z(3,20)^10+2*Z\ +## (3,20)^12+2*Z(3,20)^15+2*Z(3,20)^17+Z(3,20)^18+Z(3,20)^19 ## ]]> ## Z(11,40); @@ -270,7 +277,7 @@ DeclareCategoryCollections( "IsFFECollColl" ); ## true ## gap> Z(256) > Z(101); ## false -## gap> Z(2,20) < Z(2,20)^2; # this illustrates the lexicographic ordering +## gap> Z(2,30) < Z(2,30)^2; # this illustrates the lexicographic ordering ## false ## ]]> ##