Hello Oliver,
thanks for checking this special case. Should be fixed now (recent git version).
(%i2) gf_set(2,1);
(%o2) gf_data(characteristic = 2, exponent = 1, reduction = x, primitive = 1,
cardinality = 2, order = 1, factors_of_order = [])
(%i3) gf_primitive_p (1);
(%o3) true
(%i4) gf_set(3,1);
(%o4) gf_data(characteristic = 3, exponent = 1, reduction = x, primitive = 2,
cardinality = 3, order = 2, factors_of_order = [[2, 1]])
(%i5) gf_primitive_p (1);
(%o5) false
(%i6) gf_primitive_p (2);
(%o6) true
In case of exponent = 1 gf_-functions use corresponding zn_-functions.
zn_-functions also allow non-prime moduli. E.g.
(%i7) zn_primroot(14);
(%o7) 3
(%i8) zn_order(3, 14);
(%o8) 6
(%i9) totient(14);
(%o9) 6
Greetings
Volker
2012/12/10 Oliver Kullmann <O.Kullmann at swansea.ac.uk>:
> Hello,
>
> gf_set(2,1,x);
> [1,x]
> gf_primitive();
> 1
> gf_primitive_p(1);
>
> Maxima encountered a Lisp error:
>
> In function ARRAY-DIMENSION, the value of the only argument is
> NIL
> which is not of the expected type ARRAY
>
> Similar with p=3 etc.
>
>
> As far as I remember, the old gf-implementation had problems with the
> case of the fields of order p in general, so it might be worth checking
> these cases.
>
> Greetings
>
> Oliver
>