/* xnormal.c */ #include #include "random.h" #include "normal.h" /* test normal_rand() R times, by N trials uniformly filling M=20 bins print bin occupancies and report chi-square statistic */ double dist[19] = { -1.645, -1.282, -1.037, -0.842, -0.674, -0.524, -0.385, -0.253, -0.126, 0.0, 0.126, 0.253, 0.385, 0.524, 0.674, 0.842, 1.037, 1.282, 1.645 }; int main() { const int M=20, N=1000, R=5; int i, j, k, a[M]; double v, y; usrand (0); for (i=0; i