ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 30 Jun 2014 03:01:58 +0200Implementing PARI/GP scriptshttps://ask.sagemath.org/question/23138/implementing-parigp-scripts/ Hello, I have the following `gp` script which I would like to use in SAGE.
Script: http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp
Description: http://pari.math.u-bordeaux.fr/archives/pari-users-0011/msg00005.html
This script is used to find cardinality of an elliptic curve over binary fields. I've also taken a look at
http://trac.sagemath.org/ticket/11548
but was unable to implement either.
I thought that just copying and pasting the codes would enable me to call the functions used, but I was wrong. I'm using SAGE on VirtualBox on Windows. Any help will be appreciated!BlackadderMon, 30 Jun 2014 03:01:58 +0200https://ask.sagemath.org/question/23138/How to correctly load and use a pari/gp script in sage notebookhttps://ask.sagemath.org/question/8800/how-to-correctly-load-and-use-a-parigp-script-in-sage-notebook/
Take for example the script http://math.stanford.edu/~stange/scripts/tate_via_nets.gp
What I do is copying the script to a txt file and name it tatepairing.gp.
Then I go to my sage notebook and choose above the option 'gp'. In the first block I write "\r filename" where filename is the whole path of the file tatepairing.gp (so C:....\tatepairing.gp) and evaluate it.
If you go to the link you see a function tate_pairing_alg with input an elliptic curve, two points on it and an integer. Therefore I define (over $\mathbb{F}_5$)
e = ellinit([0,0,0,4,0]*Mod(1,5))
P1= [2,4]
P2=[1,0]
Now I do tate_pairing_alg(e, P1, P2, 4), the answer is
*** at top-level: tatepairing.tate_pairing_alg(e,P
*** ^--------------------
*** not a function in function call
If you see me doing things wrongly please let me know it :-)
ThanksNadoriSat, 17 Mar 2012 10:22:50 +0100https://ask.sagemath.org/question/8800/