Louis . Granboulan on Fri, 3 Jul 1998 16:39:58 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Patches for g++ 2.7.2


Apply these patches (only the patch in anal.h and init.c are
needed, the two other do explicit casts)

UltraSPARC   167MHz    Solaris-2.5   g++ X11 dl2   13474   13418   2.0.9 (7)LG


*** pari-2.0.9.alpha/src/language/anal.h.orig	Mon Jun 15 17:36:59 1998
--- pari-2.0.9.alpha/src/language/anal.h	Fri Jul  3 16:29:20 1998
***************
*** 25,30 ****
--- 25,31 ----
  
  void term_color(int c);
  char *term_get_color(int c);
+ int term_width();
  
  void push_val(entree *ep, GEN a);
  void pop_val(entree *ep);
*** pari-2.0.9.alpha/src/language/init.c.orig	Tue Jun 16 17:25:22 1998
--- pari-2.0.9.alpha/src/language/init.c	Fri Jul  3 16:25:14 1998
***************
*** 530,536 ****
    long n,v;
    GEN x;
    entree *ep;
!   void (*sigfun)();
  
    if (!flag) { listloc = next_bloc; return; }
  
--- 530,536 ----
    long n,v;
    GEN x;
    entree *ep;
!   void (*sigfun)(int);
  
    if (!flag) { listloc = next_bloc; return; }
  
*** pari-2.0.9.alpha/src/basemath/arith2.c.orig	Tue Jun 16 17:15:49 1998
--- pari-2.0.9.alpha/src/basemath/arith2.c	Fri Jul  3 16:24:00 1998
***************
*** 102,110 ****
    maxnum |= 1;			/* make it odd. */
  
    /* Checked to be enough up to 40e6, attained at 155893 */
!   size = 1.09 * maxnum/log((double)maxnum) + 145;
    p1 = (byteptr) gpmalloc(size);
!   rootnum = sqrt((double)maxnum); /* implicitly cast it back to a long */
    rootnum |= 1;
    {
      byteptr p2 = initprimes0(rootnum, &psize, &last); /* recursive call */
--- 102,110 ----
    maxnum |= 1;			/* make it odd. */
  
    /* Checked to be enough up to 40e6, attained at 155893 */
!   size = (long) (1.09 * maxnum/log((double)maxnum)) + 145;
    p1 = (byteptr) gpmalloc(size);
!   rootnum = (long) sqrt((double)maxnum); /* cast it back to a long */
    rootnum |= 1;
    {
      byteptr p2 = initprimes0(rootnum, &psize, &last); /* recursive call */
*** pari-2.0.9.alpha/src/modules/stark.c.orig	Tue Jun  9 13:46:06 1998
--- pari-2.0.9.alpha/src/modules/stark.c	Fri Jul  3 16:23:28 1998
***************
*** 1169,1175 ****
    {
      C[j]=mael(dtcr,j,2);
      cond[j]=mael(dtcr,j,7);
!     nn[j]=(bit_accuracy(prec)*gtodouble((GEN)C[j])*0.35);
      if (nn[j]>nmax) nmax=nn[j];
    }
    if(DEBUGLEVEL>=2) fprintferr("nmax = %ld\n",nmax);
--- 1169,1175 ----
    {
      C[j]=mael(dtcr,j,2);
      cond[j]=mael(dtcr,j,7);
!     nn[j]=(long)(bit_accuracy(prec)*gtodouble((GEN)C[j])*0.35);
      if (nn[j]>nmax) nmax=nn[j];
    }
    if(DEBUGLEVEL>=2) fprintferr("nmax = %ld\n",nmax);
***************
*** 1474,1480 ****
  
        beta=vecmax(gabs(gtovec(polrelnum),newprec));
        p1=gceil(gdiv(mplog(beta),dbltor(2.3026)));
!       newprec=max(1.2*newprec,(long)(itos(p1)*pariK1+7)); 
        
        if (DEBUGLEVEL) err(warnprec,"QuadStark",newprec);
        nf=nfnewprec(nf,newprec);
--- 1474,1480 ----
  
        beta=vecmax(gabs(gtovec(polrelnum),newprec));
        p1=gceil(gdiv(mplog(beta),dbltor(2.3026)));
!       newprec=max((long)(1.2*newprec),(long)(itos(p1)*pariK1+7)); 
        
        if (DEBUGLEVEL) err(warnprec,"QuadStark",newprec);
        nf=nfnewprec(nf,newprec);