Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 8

seed48()

Initialize the seed for a sequence of pseudo-random numbers

Synopsis:

#include <stdlib.h>

unsigned short int *seed48( 
    unsigned short int seed16v[3] );

Arguments:

seed16v
An array that comprises the 48 bits of the seed.

Library:

libc

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

Description:

The seed48() initializes the internal buffer r(n) of drand48(), lrand48(), and mrand48(). All 48 bits of the seed can be specified in an array of 3 short integers, where the entry with index 0 specifies the lowest bits. The constant multiplicand and addend of the algorithm are reset to the defaults: the multiplicand a = 0xFDEECE66D = 25214903917 and the addend c = 0xB = 11.

Returns:

A pointer to an array of 3 shorts which contains the old seed. This array is statically allocated, thus its contents are lost after each new call to seed48().

Classification:

POSIX 1003.1 XSI

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

See also:

drand48(), erand48(), jrand48(), lcong48(), lrand48(), mrand48(), nrand48(), srand48()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 124

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/seed48.html on line 124