Пример #1
0
double
erand48(unsigned short xseed[3])
{
	__dorand48(xseed);
	return ldexp((double) xseed[0], -48) +
	       ldexp((double) xseed[1], -32) +
	       ldexp((double) xseed[2], -16);
}
Пример #2
0
double
_erand48_r (struct _reent *r,
       unsigned short xseed[3])
{
  __dorand48(r, xseed);
  return ldexp((double) xseed[0], -48) +
    ldexp((double) xseed[1], -32) +
    ldexp((double) xseed[2], -16);
}
Пример #3
0
long
mrand48(void)
{
	__dorand48(__rand48_seed);
	return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1];
}
Пример #4
0
long
jrand48(unsigned short xseed[3])
{
	__dorand48(xseed);
	return ((long) xseed[2] << 16) + (long) xseed[1];
}
Пример #5
0
long
mrand48(void)
{
	__dorand48(__rand48_seed);
	return (int16_t)__rand48_seed[2] * 65536 + __rand48_seed[1];
}
Пример #6
0
long _jrand48_r(struct _reent *r, unsigned short xseed[3])
{
  __dorand48(r, xseed);
  return ((long) xseed[2] << 16) + (long) xseed[1];
}