Nuke warnings in tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*Copyright (c) 2004 Nils O. Selåsdal <NOS {on} Utel {dot} no> */
|
||||
/*Copyright (c) 2004 Nils O. Sel�sdal <NOS {on} Utel {dot} no> */
|
||||
/*Straight forward attempt at a Mersenne Twister PRNG */
|
||||
|
||||
#include "ucore/mersenne_twister.h"
|
||||
@@ -24,7 +24,7 @@ enum {
|
||||
|
||||
void mtsrand(int seed, MTRand *r)
|
||||
{
|
||||
int j;
|
||||
unsigned j;
|
||||
for (j = 0 ; j < N ; j++) {
|
||||
r->x[j] = seed * ((j+1)<< 3)|0x1;
|
||||
}
|
||||
@@ -36,16 +36,16 @@ unsigned int mtrand(MTRand *r)
|
||||
{
|
||||
unsigned int y;
|
||||
unsigned int ch[] = {0, a};
|
||||
|
||||
|
||||
y = r->x[r->i] & U;
|
||||
y |= r->x[r->i % N];
|
||||
y &= LL;
|
||||
|
||||
|
||||
r->x[r->i] = r->x[(r->i + M ) %N];
|
||||
r->x[r->i] ^= y >> 1;
|
||||
|
||||
r->x[r->i] ^= ch[y&0x1];
|
||||
|
||||
|
||||
y = r->x[r->i];
|
||||
y ^= y >> u;
|
||||
y ^= (y << s) & b;
|
||||
@@ -55,7 +55,7 @@ unsigned int mtrand(MTRand *r)
|
||||
r->i = (r->i + 1) % N;
|
||||
|
||||
return y;
|
||||
}
|
||||
}
|
||||
#ifdef TEST_MT
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
Reference in New Issue
Block a user