On 21 September 2015 at 00:06, Vincent Delecroix
<[email protected]> wrote:
> On 20/09/15 22:05, sumayyah shams wrote:
>>
>> I have the following code where I want to add 2 points on the curve with P
>> is any point (r,s) on the curve
>>
>> K.<B>=NumberField(x^2-17,'B')
>> r,s= var('r s')
>> E=EllipticCurve([0,0,0,-3267,45630])
>> P=E([r,s]); P
>> T=E([-15/2+27/2*B,0]); T
>> P+T
>>
>> unfortunately it says "TypeError: unable to convert r to a rational"
>>
>> Can someone tell me what's wrong with the code
>
>
> This is wrong
>
>   P=E([r,s])
>
> What would you expect from such a command? E is defined over a number field.
> Hence coordinates should be elements of that number field...

If what you want is a generic formula for adding your point T to a
general point (r,s) then you'll need to work harder, changing your
base field to Q(sqrt(17),r,s) where (r,s) satisfies the equation,

>
>
> --
> 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.

-- 
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.

Reply via email to