Louis . Granboulan on Thu, 2 Jul 1998 11:03:14 +0200


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

ANSI conformance


Apply this patch if you don't want to negate
an unsigned long !

*** pari-2.0.9.alpha/src/basemath/arith1.c.orig	Thu Jun 11 14:05:30 1998
--- pari-2.0.9.alpha/src/basemath/arith1.c	Wed Jul  1 11:54:57 1998
***************
*** 930,936 ****
          if (s < 0) 
          {
            ul = (p1[2]+d);
!           ul /= b; v = sb? (long)-ul: (long)ul;
          }
          else
          {
--- 930,936 ----
          if (s < 0) 
          {
            ul = (p1[2]+d);
!           ul /= b; v = sb? -(long)ul: (long)ul;
          }
          else
          {
*** pari-2.0.9.alpha/src/kernel/none/mp.c.orig	Tue Jun  9 13:46:19 1998
--- pari-2.0.9.alpha/src/kernel/none/mp.c	Wed Jul  1 11:54:15 1998
***************
*** 876,882 ****
  #ifdef LONG_IS_64BIT
    if (! (z&0xffffffff)) { s = 32; z >>=32; } else s = 0;
  #endif  
!   z = z | -z;
    z = (z<<4) + z;
    z = (z<<6) + z;
    z = z ^ (z<<16); /* or  z = z - (z<<16);  or  z = z &~ (z<<16);  */
--- 876,882 ----
  #ifdef LONG_IS_64BIT
    if (! (z&0xffffffff)) { s = 32; z >>=32; } else s = 0;
  #endif  
!   z = z | -(long)z;
    z = (z<<4) + z;
    z = (z<<6) + z;
    z = z ^ (z<<16); /* or  z = z - (z<<16);  or  z = z &~ (z<<16);  */
*** pari-2.0.9.alpha/src/modules/mpqs.c.orig	Tue Jun 16 18:15:58 1998
--- pari-2.0.9.alpha/src/modules/mpqs.c	Wed Jul  1 11:58:44 1998
***************
*** 2007,2013 ****
  
    if (DEBUGLEVEL >= 5)
    {
!     fprintferr("MPQS: sieving interval = [%ld, %ld]\n", -M, M);
      fprintferr("MPQS: size of factor base = %ld\n", size_of_FB);
      fprintferr("MPQS: starting sieving index = %ld\n", starting_sieving_index);
    }
--- 2007,2013 ----
  
    if (DEBUGLEVEL >= 5)
    {
!     fprintferr("MPQS: sieving interval = [%ld, %ld]\n", -(long)M, M);
      fprintferr("MPQS: size of factor base = %ld\n", size_of_FB);
      fprintferr("MPQS: starting sieving index = %ld\n", starting_sieving_index);
    }