x[i][P] = (count[int(x[i][LABLE])]*1.0)/sample_count; add 1.0, thanks @TreapDB