Changeset 2a7c6d in git


Ignore:
Timestamp:
Jun 30, 1999, 1:54:31 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
ea056987bdd3cf2746d4393a7bd2155ef94c9754
Parents:
421acf7eca9294ad2da6b13d870a21a192bd8a74
Message:
* hannes/wenk: rand -> siRand


git-svn-id: file:///usr/local/Singular/svn/trunk@3192 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/mpr_base.cc

    r421acf r2a7c6d  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mpr_base.cc,v 1.5 1999-06-30 10:34:34 Singular Exp $ */
     4/* $Id: mpr_base.cc,v 1.6 1999-06-30 11:54:31 Singular Exp $ */
    55
    66/*
     
    696696    l= (int *)Alloc( (dim+1) * sizeof(int) ); // [1..dim-1]
    697697
    698     srand48( (long)(seed*(index+MAXSEED*18)) );  // index+MAXSEED*MAXVARS
    699698    for(i = 1; i < dim; i++)
    700699    {
    701       l[i]= 1 + ((unsigned int) mrand48()) % LIFT_COOR;
     700      l[i]= 1 + siRand() % LIFT_COOR;
    702701    }
    703702  }
     
    14591458  time_t *tp = NULL;
    14601459
    1461   //srand((long)(((int)time(tp) % MAXSEED)+MAXSEED*18));
    1462 
    14631460  while ( i <= dim )
    14641461  {
    1465     //shift[i]= (mprfloat) (RVMULT*rand()/(RAND_MAX+1.0));
    1466     shift[i]= (mprfloat) (RVMULT*siRand()/(INT_MAX+1.0));
     1462    shift[i]= (mprfloat) (RVMULT*siRand()/(MAX_INT_VAL+1.0));
    14671463    i++;
    14681464    for ( j= 1; j < i-1; j++ )
     
    29352931        else if ( i <= uvar + 2 )
    29362932        {
    2937 //          pevpoint[i]=nInit(IsPrime(1+(int) (MAXEVPOINT*rand()/(RAND_MAX+1.0))));
    2938           pevpoint[i]=nInit(IsPrime(1+(int) (MAXEVPOINT*siRand()/(INT_MAX+1.0))));
     2933          pevpoint[i]=nInit(IsPrime(1+(int) (MAXEVPOINT*siRand()/(MAX_INT_VAL+1.0))));
    29392934          //pevpoint[i]=nInit(383);
    29402935        }
     
    30563051        if ( i <= uvar + 2 )
    30573052        {
    3058           pevpoint[i]=nInit(IsPrime(1+(int) (MAXEVPOINT*siRand()/(INT_MAX+1.0))));
     3053          pevpoint[i]=nInit(IsPrime(1+(int) (MAXEVPOINT*siRand()/(MAX_INT_VAL+1.0))));
    30593054          //pevpoint[i]=nInit(383);
    30603055        } else pevpoint[i]=nInit(0);
Note: See TracChangeset for help on using the changeset viewer.