blob: 81546b5f945e48ffa930b224179245c8e17412b0 [file] [log] [blame]
#include <inttypes.h>
#include <stdlib.h>
#include "rand48_impl.h"
double erand48(unsigned short s[3]) {
union {
uint64_t u;
double f;
} x = {0x3ff0000000000000ULL | __rand48_step(s, __seed48 + 3) << 4};
return x.f - 1.0;
}
double drand48(void) {
return erand48(__seed48);
}