Hmm, In looking at ell_point.py at line 1181 it looks like it does the
right thing.  Somehow the pari error of division by 0 (perhaps in non-
prime finite
fields?) doesn't get raised as a ZeroDivisionError.  This is a problem
with the interface with pari:

p = 100019
K.<a> = GF(p)
L.<b> = GF(p^2)
K(1)/K(0)
L(1)/L(0)

Note that the errors given by K and L and different.  And, if we work
over small characteristic, say p=7, we get a different set of errors.

Victor


On Aug 6, 1:13 pm, VictorMiller <victorsmil...@gmail.com> wrote:
> Slight change.  The code I gave works, but the following fails.  I
> really don't know what there is about a non-prime finite field that
> causes this.
>
> Victor
>
> p=100019
> E = EllipticCurve(j=GF(p^2,'r')(1728))
> M = (p+1)//3
> # find an element of order 3
> while True:
>   P = M*E.random_element()
>   if P != 0:
>      break
> P.weil_pairing(2*P,3)
>
> On Aug 6, 1:05 pm, VictorMiller <victorsmil...@gmail.com> wrote:
>
> > In calculating the Weil Pairing of two points I get a pari division by
> > zero error.  Needless to say this shouldn't happen.  I think that the
> > solution is that if either of the miller_functions that are calculated
> > yield a 0 then the value of the Weil Pairing must be 1.
>
> > Here's some code that provokes the error
>
> > p=100019
> > E = EllipticCurve(j=GF(p)(1728))
> > M = (p+1)//3
> > # find an element of order 3
> > while True:
> >    P = M*E.random_element()
> >    if P != 0:
> >       break
> > P.weil_pairing(2*P,3)
>
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to