lcong48()

Initialize a sequence of pseudo-random numbers

Synopsis:

#include <stdlib.h>

void lcong48( unsigned short int param[7] );

Since:

BlackBerry 10.0.0

Arguments:

param
An array of 7 short integers that are used to initialize the sequence;
  • The first three entries are used to initialize the seed.
  • The next three are used to initialize the multiplicand.
  • The last entry is used to initialize the addend. You can't use values greater than 0xFFFF as the addend.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The lcong48() function gives you full control over the multiplicand and addend used in drand48(), erand48(), lrand48(), nrand48(), mrand48(), and jrand48(), and the seed used in drand48(), lrand48(), and mrand48().

Classification:

POSIX 1003.1 XSI

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread No

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus