Hi Jan, hi John, On 2014-05-04, John Cremona <[email protected]> wrote: > On 4 May 2014 13:20, Jan Medina <[email protected]> wrote: >> I wan to calculate log(\theta+i,\theta) for i in a finte field and theta a >> primtive element >> > > You can see the documentation of this function like this: > > sage: F=GF(101) > sage: a=F(3) > > sage: a.log? > > and even the code using a.log??
I somehow have the impression that part of the problem is that John thinks in terms of methods ( a.log() ), while Jan is thinking in terms of functions ( log(a) ). Anyway, the documentation of the *function* "log" can be seen with sage: log? and the source code with sage: log?? And it seems to be the case that ultimately the function call log(a) will end up with the method call a.log(). So, answering Jan's question: Yes, if alpha is is an element of a finite field with primitive element theta, then log(alpha,theta) is essentially the same as directly calling alpha.log(theta), and this the discrete logarithm. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
