Lines Matching refs:nn

54     int nn,kk;  in main()  local
56 nn = (1<<Tab[i].symsize) - 1; in main()
57 kk = nn - Tab[i].nroots; in main()
58 printf("Testing (%d,%d) code...\n",nn,kk); in main()
68 int nn = 255; in exercise_8() local
69 unsigned char block[nn],tblock[nn]; in exercise_8()
70 int errlocs[nn],derrlocs[nn]; in exercise_8()
83 for(errors=0;errors<=(nn-kk)/2;errors++){ in exercise_8()
87 block[i] = random() & nn; in exercise_8()
98 errval = random() & nn; in exercise_8()
102 errloc = random() % nn; in exercise_8()
118 printf("(%d,%d) decoder says %d errors, true number is %d\n",nn,kk,derrors,errors); in exercise_8()
123 printf("(%d,%d) decoder indicates error in location %d without error\n",nn,kk,derrlocs[i]); in exercise_8()
128 printf("(%d,%d) decoder uncorrected errors! output ^ input:",nn,kk); in exercise_8()
130 for(i=0;i<nn;i++) in exercise_8()
140 int nn = (1<<e->symsize) - 1; in exercise_char() local
141 unsigned char block[nn],tblock[nn]; in exercise_char()
142 int errlocs[nn],derrlocs[nn]; in exercise_char()
155 kk = nn - e->nroots; in exercise_char()
167 block[i] = random() & nn; in exercise_char()
178 errval = random() & nn; in exercise_char()
182 errloc = random() % nn; in exercise_char()
198 printf("(%d,%d) decoder says %d errors, true number is %d\n",nn,kk,derrors,errors); in exercise_char()
203 printf("(%d,%d) decoder indicates error in location %d without error\n",nn,kk,derrlocs[i]); in exercise_char()
208 printf("(%d,%d) decoder uncorrected errors! output ^ input:",nn,kk); in exercise_char()
210 for(i=0;i<nn;i++) in exercise_char()
221 int nn = (1<<e->symsize) - 1; in exercise_int() local
222 int block[nn],tblock[nn]; in exercise_int()
223 int errlocs[nn],derrlocs[nn]; in exercise_int()
233 kk = nn - e->nroots; in exercise_int()
245 block[i] = random() & nn; in exercise_int()
256 errval = random() & nn; in exercise_int()
260 errloc = random() % nn; in exercise_int()
276 printf("(%d,%d) decoder says %d errors, true number is %d\n",nn,kk,derrors,errors); in exercise_int()
281 printf("(%d,%d) decoder indicates error in location %d without error\n",nn,kk,derrlocs[i]); in exercise_int()
286 printf("(%d,%d) decoder uncorrected errors! output ^ input:",nn,kk); in exercise_int()
288 for(i=0;i<nn;i++) in exercise_int()