initial check-in, version 0.5.0

This commit is contained in:
Rich Felker 2011-02-12 00:22:29 -05:00
commit 0b44a0315b
1021 changed files with 45711 additions and 0 deletions

14
src/prng/__rand48_step.c Normal file
View file

@ -0,0 +1,14 @@
#include <stdlib.h>
#include <inttypes.h>
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
{
uint64_t a, x;
x = xi[0] | xi[1]<<16 | xi[2]+0ULL<<32;
a = lc[0] | lc[1]<<16 | lc[2]+0ULL<<32;
x = a*x + lc[3];
xi[0] = x;
xi[1] = x>>16;
xi[2] = x>>32;
return x & 0xffffffffffffull;
}