QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Generate a pseudo-random double
#include <stdlib.h> double drand48( void );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The drand48() function uses a linear congruential algorithm and 48-bit integer arithmetic to generate a nonnegative double uniformly distributed over the interval [0.0, 1.0].
The erand48() function is a thread-safe version of drand48().
A pseudo-random double.