Pushing changes before incorporating new merges into develop and develop-nr

This commit is contained in:
yilmazt
2019-05-28 21:56:41 +02:00
parent f6a4a6b99a
commit 3c1d1bffee
23 changed files with 609 additions and 229 deletions
+2 -9
View File
@@ -21,6 +21,7 @@
#include <time.h>
#include <stdlib.h>
#include "SIMULATION/TOOLS/sim.h"
unsigned int s0, s1, s2, b;
@@ -32,7 +33,6 @@ unsigned int s0, s1, s2, b;
unsigned int taus(void)
{
b = (((s0 << 13) ^ s0) >> 19);
s0 = (((s0 & 0xFFFFFFFE) << 12)^ b);
b = (((s1 << 2) ^ s1) >> 25);
@@ -41,7 +41,7 @@ unsigned int taus(void)
s2 = (((s2 & 0xFFFFFFF0) << 17)^ b);
return s0 ^ s1 ^ s2;
}
#if 1
void set_taus_seed(unsigned int seed_init)
{
@@ -63,25 +63,18 @@ void set_taus_seed(unsigned int seed_init)
s2 = result;
}
}
#endif
#ifdef MAIN
main()
{
unsigned int i,rand;
set_taus_seed();
for (i=0; i<10; i++) {
rand = taus();
printf("%u\n",rand);
}
}
#endif //MAIN