//d = rand()%(n+1);
//printf("d=%d total=%f randPd=%f\n", d, total, randPd);
//printf("!!!d=%d\n", d);
//d = rand()%(n+1);
//printf("d=%d total=%f randPd=%f\n", d, total, randPd);
//printf("!!!d=%d\n", d);
randomX = calloc(n*d,sizeof(float));
randomXcopy = calloc(n*d,sizeof(float));
randomX = calloc(n*d,sizeof(float));
randomXcopy = calloc(n*d,sizeof(float));