about summary refs log tree commit diff
path: root/src/prng/lrand48.c
blob: a3c4e4e2b2bb09e69627a7bbd0ff655c1f4eec8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdlib.h>
#include <inttypes.h>

uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
extern unsigned short __seed48[7];

long nrand48(unsigned short s[3])
{
	return __rand48_step(s, __seed48+3) >> 17;
}

long lrand48(void)
{
	return nrand48(__seed48);
}