Bill Allombert on Fri, 31 Jan 2003 15:06:58 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: ffinit


On Fri, Jan 31, 2003 at 02:00:06PM +0000, Cherry Kearton wrote:
> I want to work with finite fields, and in the PARI manual it says that 
> ffinit is designed for this.  Specifically it says "For instance if P = 
> ffinit(3,2,y), you can represent elements in F3 2 as polmods modulo P." 
>  But if one sets
> a=Mod(1,P)
> then
> a+a+a=Mod(3,P),
> whereas I would expect Mod(0,P).
> 
> How is one supposed to deal with finite fields under GP?

You need to write
a=Mod(Mod(1,3),P)

? a+a+a
%9 = Mod(Mod(0, 3), Mod(1, 3)*y^2 + Mod(1, 3))

I agree it is a bit ugly.

Cheers,
Bill.