Why Random loss symbol does not work well
问题 I try to make random loss from a given bit stream. Assume that I have a bit stream as 10 01 10 11 00 Now I will create a code to implement random loss. The function with two inputs are original bit stream and percent loss. Output function is output bit stream int* bitloss(int* orbit,int size_orbit,float loss_percent) { srand(time(NULL)); int* out_bitstream=(int*)malloc(sizeof(int)*size_orbit); double randval ; for(int i=0;i<size_orbit,i++) { randval = (double)rand()/(double)RAND_MAX; if