RAND(3) BSD Programmer's Manual RAND(3) NNAAMMEE rraanndd, ssrraanndd - bad random number generator SSYYNNOOPPSSIISS ##iinncclluuddee <<ssttddlliibb..hh>> _v_o_i_d ssrraanndd(_u_n_s_i_g_n_e_d _s_e_e_d); _i_n_t rraanndd(_v_o_i_d); DDEESSCCRRIIPPTTIIOONN TThheessee iinntteerrffaacceess aarree oobbssoolleetteedd bbyy rraannddoomm((33)).. The rraanndd() function computes a sequence of pseudo-random integers in the range of 0 to RAND_MAX (as defined by the header file <_s_t_d_l_i_b_._h>). The ssrraanndd() function sets its argument as the seed for a new sequence of pseudo-random numbers to be returned by rraanndd(). These sequences are re- peatable by calling ssrraanndd() with the same seed value. If no seed value is provided, the functions are automatically seeded with a value of 1. SSEEEE AALLSSOO random(3) SSTTAANNDDAARRDDSS The rraanndd() and ssrraanndd() functions conform to ANSI C X3.159-1989 (``ANSI C ''). 4.4BSD June 4, 1993 1