/* drvRandom.c */ #include double drvRandom(double upper_limit) { return random() * upper_limit / RAND_MAX; }