| John Cremona on Mon, 11 Jun 2012 11:33:48 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Fwd: Accessing functions inside .gp files |
My earlier reply (similar to Bill's) went to the original poster
instead of the list:
---------- Forwarded message ----------
From: John Cremona <john.cremona@gmail.com>
Date: 11 June 2012 09:33
Subject: Re: Accessing functions inside .gp files
To: Mehari <mehzera75@gmail.com>
I think your question is not about using gp, but about using gp from
within Sage. So you should be asking sage-support.
John Cremona
On 11 June 2012 08:39, Mehari <mehzera75@gmail.com> wrote:
> 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?
>