I am not sure how large can this T get, but I would rather
do p.reserve(T) before the loop and then push_back or
p.resize(T) and then p[i] = 1.0/T.