Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Accessing functions inside .gp files

I am newbie thus please forgive me if my request is trivial! I want to read a file of gp extension. And in that file, I have functions. How could call these functions when I want to use it? \r Example: In sage notebook() \r

  1. List item pari.allocatemem(90000000) Z.<x>=GF(2)[] \r List item p = x^163 + x^7 + x^6 + x^3 + 1\r b = 0x423d0900aeb5645491fee539c297946cbc6a4f1f5\r p1 = p.polynomial(x)\r bb = Z(b.digits(2))\r a1 = gp.Mod(bb._pari_(), p)\r pari.read(get_remote_file("http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp"))\r gp.ecpc(p1, a1)\r \r When, I try the above code in a terminal, it works fine. But when I try it in sage notebook(), it works till line 8. And when it reaches 9, it says

Traceback (click to the left of this block for traceback) ... * not a function in function call That means, I am unable to call the function ecpc inside the file. Thus, could you help me how to access that function being outside?

Accessing functions inside .gp files

I am newbie thus please forgive me if my request is trivial! I want to read a file of gp extension. And in that file, I have functions. How could call these functions when I want to use it? \r
Example: In sage notebook() \r

1. pari.allocatemem(90000000)
2. Z.<x>=GF(2)[]
3. p = x^163 + x^7 + x^6 + x^3 + 1
4. b = 0x423d0900aeb5645491fee539c297946cbc6a4f1f5
5. p1 = p.polynomial(x)
6. bb = Z(b.digits(2))
7. a1 = gp.Mod(bb._pari_(), p)
8. pari.read(get_remote_file("http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp"))
9. gp.ecpc(p1, a1)

  1. List item pari.allocatemem(90000000) Z.<x>=GF(2)[] \r List item p = x^163 + x^7 + x^6 + x^3 + 1\r b = 0x423d0900aeb5645491fee539c297946cbc6a4f1f5\r p1 = p.polynomial(x)\r bb = Z(b.digits(2))\r a1 = gp.Mod(bb._pari_(), p)\r pari.read(get_remote_file("http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp"))\r gp.ecpc(p1, a1)\r \r

    When, I try the above code in a terminal, it works fine. But when I try it in sage notebook(), it works till line 8. And when it reaches 9, it says

says

Traceback (click to the left of this block for traceback) ... traceback)
...
* not a function in function call call
That means, I am unable to call the function ecpc inside the file. Thus, could you help me how to access that function being outside?

click to hide/show revision 3
retagged

Accessing functions inside .gp files

I am newbie thus please forgive me if my request is trivial! I want to read a file of gp extension. And in that file, I have functions. How could call these functions when I want to use it?
Example: In sage notebook()

1. pari.allocatemem(90000000)
2. Z.<x>=GF(2)[]
3. p = x^163 + x^7 + x^6 + x^3 + 1
4. b = 0x423d0900aeb5645491fee539c297946cbc6a4f1f5
5. p1 = p.polynomial(x)
6. bb = Z(b.digits(2))
7. a1 = gp.Mod(bb._pari_(), p)
8. pari.read(get_remote_file("http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp"))
9. gp.ecpc(p1, a1)

When, I try the above code in a terminal, it works fine. But when I try it in sage notebook(), it works till line 8. And when it reaches 9, it says

Traceback (click to the left of this block for traceback)
...
* not a function in function call
That means, I am unable to call the function ecpc inside the file. Thus, could you help me how to access that function being outside?