/* tlran1.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: lran1 setlran1 Input parameters: s -> unsigned integer: pseudorandom generator seed n -> integer: sample size */ #include "ccmath.h" void main(int na,char **av) { unsigned int s,r; int n,i; if(na!=3){ printf("para: seed(hex) num_out\n"); exit(-1);} sscanf(*++av,"%x",&s); n=atoi(*++av); printf(" seed= %x\n",s); printf(" sample size= %d\n",n); /* initialize pseudorandom integer generator */ setlran1(s); for(i=0; i