/* * @(#) smt1_3.c - Random generator quality 'error' function tester * (Task 1_3 at the Special Military Training course). * (c) 1996 Ivan Maidanski http://ivmai.chat.ru * Freeware program source. All rights reserved. ** * Language: ANSI C * Tested with: Borland C++ v3.1 * Last modified: 1996-12-09 10:15:00 GMT+03:00 */ #include #include #define K 12 int m[1000]; int rnd_func(int x) { return (x*5%(1<0 && x<1) m[(int)(x*n)]++; chi=0.0; x=-3.0/sqrt(2); delta=3.0*sqrt(2)/n; for (i=0;i