Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UREGINA1.BITNET!CRONEJP From: CRONEJP@UREGINA1.BITNET (Jonathan Crone) Newsgroups: comp.sys.amiga Subject: Problem with lattice. Message-ID: <8903271336.AA07363@jade.berkeley.edu> Date: 27 Mar 89 13:27:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 77 The following code causes Blink to complain bitterly with the following errors.... ""Undefined symbols "" _CXV45 _CXS55 _CXM55 _CXV54 _CXD55 _CXA55 the compile comand line is ""lc -L random "" this silly program is supposed to generate 100 random numbers by the addative congruative method, and then do a chi squared test. I'm running Lattice 5.0 (I've got the patches, but the semester has been a bloody blitz...) the wierd thing is that the Vax using VMS and a Unix system here compile the code just fine.... (and of course... run it as well) any ideas would be appreciated... /* Duh random number program */ /* IE: yet another stupid En330 assignment */ /* This is ugly code, but this is too stupid an assignment to create good code for... */ #include main() { int x[102]; float count[11]; int n,i; float sum=0; /* Set up the inital parameters */ x[1]=57; x[2]=34; x[3]=89; x[4]=92; x[5]=16; n=5; for (i=6;i++ < 101;) { x[i]= (x[(i-1)] + x[(i-n)]) % 100; } printf ("These are the random numbers \n"); for (i=1;i++ <= 20;) { printf("%d %d %d %d %d\n",x[i],x[i+20],x[i+40],x[i+60],x[i+80]); } for (i=1 ; i++ <101; ) { count[(x[i]/10))]++; /* take any digit move decimal to left, and use that single digit to access count array*/ } printf("These are the chi squared values\n"); for(i=0;i<10;i++) { count[i] = ((count[i]-10)*(count[i]-10))/10; sum += count[i]; printf("%d %f \n",i,count[i]); } printf("the sum of the chi squared test is %5.2f \n",sum); } JpC -------------------------------------------------------------------- Jonathan P. Crone CRONEJP@UREGINA1.BITNET cronejp@mcl.UUCP Heisenberg might have been here...