DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦306738bfd⟧ TextFile

    Length: 394 (0x18a)
    Types: TextFile
    Names: »random.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/src/random.c« 

TextFile

/*  Copyright 1982 Gary Perlman */

/*LINTLIBRARY*/
#include "stat.h"
FUN(random,random number initialization,5.2,12/21/86)

double	Maxrand;
#define	MAX32 2147483648.0
#define	MAX16 32768.0
#define MAXRAND (sizeof (int) == 4 ? MAX32 : MAX16)

initrand (seed)
int 	seed;
	{
	long 	clock;
	if (seed == 0)
		{
		time (&clock);
		seed = clock + getpid ();
		}
	srand (seed);
	Maxrand = MAXRAND;
	}