John Cremona wrote:
> William,  how much work would it be for a good student programmer to
> rewrite sympow in a way which would make everyone happy?  I expect that
> Mark would cooperate even though he does not seem to want to do this
> himself.  Sympow is in several separate files so the task could be split
> up.  One possibilty might be to ask the pari developers if they might be
> interested in converting it to be part of the pari library.

W.r.t. error handling etc., it's not terribly large:

    60    336   2965 sympow-1.018.1/analrank.c
   277   1447  11590 sympow-1.018.1/conductors.c
    66    221   2959 sympow-1.018.1/analytic.c
   170    684   7488 sympow-1.018.1/factor.c
   204    429   5063 sympow-1.018.1/sympow.h
   137    637   6289 sympow-1.018.1/ec_ap.c
   173    694   7541 sympow-1.018.1/ec_ap_large.c
   166    698   7191 sympow-1.018.1/ec_ap_bsgs.c
   173    700   8254 sympow-1.018.1/moddeg.c
   287   1121  13895 sympow-1.018.1/init_curve.c
   158    533   7303 sympow-1.018.1/prepare.c
   188    672   8394 sympow-1.018.1/eulerfactors.c
    74    319   3771 sympow-1.018.1/main.c
    43    222   1842 sympow-1.018.1/util.c
    44    364   2882 sympow-1.018.1/help.c
   123    476   5743 sympow-1.018.1/disk.c
     7     27    252 sympow-1.018.1/config.h
   593   2263  25063 sympow-1.018.1/QD.c
     8     12    125 sympow-1.018.1/fpu.c
   176    581   7733 sympow-1.018.1/compute.c
   147   1165   8215 sympow-1.018.1/rootno.c
    61    159   2687 sympow-1.018.1/periods.c
   204    679   8957 sympow-1.018.1/generate.c
   165    620   8349 sympow-1.018.1/compute2.c
  3704  15059 164551 total

But one should probably start with reformatting it before making any
(further) logical changes... ;-)


The GP stuff is redundant, or a separate thing?


-leif

> 
> John
> 
> On 8 Jun 2016 7:27 pm, "leif" <not.rea...@online.de
> <mailto:not.rea...@online.de>> wrote:
> 
>     Dima Pasechnik wrote:
>     >
>     >
>     > On Wednesday, June 8, 2016 at 3:28:26 PM UTC+1, Jeroen Demeyer wrote:
>     >
>     >     On 2016-06-08 15:07, William Stein wrote:
>     >     > Thanks.  Here is the *actual* code from sympow:
>     >     >
>     >     >   fclose(F); printf("Left with %i entries in param_data\n",i);
>     >     >   F=fopen("datafiles/param_data","w");
>     >     >   ...
>     >
>     >     The interesting stuff is what is below the fopen() call, i.e.
>     the stuff
>     >     hidden by the "..."
>     >
>     > F=fopen("datafiles/param_data","w");
>     >  for (j=0;j<i;j++) fprintf(F,"%s",PARAM[j]); fclose(F);}
>     >
>     > there is also
>     >
>     > void txt2bin(int num,char *B,FILE *R)
>     > {double *P; FILE *F; P=malloc(36*4*num*sizeof(double));
>     >  read_file_mesh(num,P,R); F=fopen(B,"w");
>     >  fwrite(P,sizeof(double),36*4*num,F); fclose(F); free(P);}
> 
>     ... where the return value of malloc() isn't checked either.
> 
> 
>     -leif


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to