| American Citizen on Fri, 17 Apr 2026 04:39:28 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: hitting major roadblocks |
To all:Here's what I had before in my gp pari script at the very top of my file. This worked okay normally in interactive gp.
read("pf1000");
read("ellpool.gp");
And I hit errors when compiling with the gp2c-run command.
Here's what fixed the problem.
#1. I explicitly took all pertinent code related to the
"ellcntpool(e,p,cnt)" function and put that code into the pari script.
It took 3 runs since there were dependencies of that command upon other gp pari commands, but I was able to finally put all the gp pari code into the script as a complete set, with no outside dependencies.
#2. I was able to read the huge pf1000 file into one of the pari script functions as follows
do_run(pfname) = {
my(v,e,E,p,k,pf,pfsz);
if(pfname==0,print("Need pf file name.");return(););
[pf,pfsz]=readvec(pfname);
This enable me to select any pf file ( I have several such as pf100,
pf500, pf2000, etc) where pf is primitive fraction list and execute the
do_run() command.
This successfully passed the "gp2c-run" command and come up with functional pari script run code.
This is to let you know what works. And thank you Bill for responding to my post, it is appreciated. Randall On 4/16/26 02:10, Bill Allombert wrote:
On Wed, Apr 15, 2026 at 05:21:19PM -0700, American Citizen wrote:Hi While I have a gp pari file with two read statements embedded in the top of the file, and they work great, everything falls apart, after running the "gp2c-run" command and the read statements seem to be causing major blowups in the my_gp_pari_program.gp.run file. Sample script: read("pf1000"); // HUGE DATA VECTOR read("ellpool.gp"); // sophisticated elliptic curve program to create a rational lattice of points on an given elliptic curve to a set heightYou should do something like pf1000 = read("pf1000"); \r ellpool.gp That is, do not mix data and code: -- use \r to read GP code -- use data=read("datafile") to read data Do not write GP code in your data file, that is write [1,2,3] and not data=[1,2,3] If you need to read several data, you can use readvec. Cheers, Bill