| Bill Allombert on Mon, 11 Jun 2012 11:23:29 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Accessing functions inside .gp files |
On Mon, Jun 11, 2012 at 07:39:59AM +0000, Mehari 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?
Your question is related to the SAGE interface, not PARI: somehow pari.read does not
create gp.ecpc. I suggest you ask it on the sage mailing list, or you can try to use
GP instead.
Cheers,
Bill.