set_random

set_random -- starts random at a different initial number.

Syntax

set_random (integer_seed)

		

Arguments

integer_seed

Any integer number.

Returns

t

Description

This function seeds the random number generator to start the pseudo-random sequence at a different number. The same integer_seed will always produce the same pseudo-random sequence. set_random is commonly called with an unpredictable integer_seed, such as the result of clock.

Example

    Gamma> set_random(95);
    t
    Gamma> random();
    0.26711518364027142525
    Gamma> random();
    0.8748339582234621048
    Gamma> random();
    0.30958001874387264252
    Gamma> set_random(clock());
    t
    Gamma> random();
    0.41952831624075770378
    Gamma> random();
    0.99278739839792251587
    Gamma> random();
    0.42997436970472335815
    Gamma> 
    		

See Also

random

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.